Heart rate data classification method, device, equipment and storage medium

By generating heart rate thresholds in heart rate data to correct and eliminate high-frequency noise, and using the heart rate classification model for classification, the problem of interference in heart rate data in wearable devices is solved and the accuracy of classification is improved.

CN114176550BActive Publication Date: 2024-10-29SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111626125.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-10-29
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

Human heart rate data in wearable devices is easily interfered by the external environment and movement, resulting in false detection and poor classification results.

Method used

By obtaining initial heart rate data, generating heart rate thresholds for correction, eliminating high-frequency noise, and using the heart rate classification model to classify data, improving classification accuracy.

Benefits of technology

It effectively avoids high-frequency noise interference and misidentification of wearable devices, and improves the accuracy of heart rate data classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114176550B_ABST
    Figure CN114176550B_ABST
Patent Text Reader

Abstract

The present application is about a heart rate data classification method, device, equipment and storage medium, and specifically relates to the field of medical data detection. The method includes: obtaining initial heart rate data; generating a heart rate threshold value according to the size of the initial heart rate value within the target time interval; correcting each initial heart rate value in the initial heart rate data according to the heart rate threshold value to obtain first preprocessed data; performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data; processing the second preprocessed data according to a heart rate classification model to obtain a category result corresponding to the initial heart rate data. In the above scheme, by successively performing correction operations and noise removal operations on the initial heart rate data, while avoiding high-frequency noise interference, it also avoids the influence of data misidentified by the wearable device on the classification of heart rate data, thereby further improving the accuracy of heart rate data classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical data detection, and in particular to a heart rate data classification method, device, equipment and storage medium. Background Art

[0002] In the field of medical health, human heart rate is a very important indicator that reflects the health status of the human body. The human heart rate can reflect the state of the human body to a certain extent.

[0003] In the field of medical health, heart rate acquisition equipment can collect the human heart rate. For example, through wearable devices such as bracelets, the human heart rate can be collected more accurately. At this time, the data processing equipment in the wearable device can analyze the human heart rate. In the analysis, the heart rate signal is decomposed to remove the high-frequency noise in the human heart rate, and then the human heart rate data is classified according to the characteristics of the human heart rate data to complete the judgment of the human health status.

[0004] In the above scheme, the human heart rate data collected by the wearable device is easily interfered by the external environment and the human movement. The human heart rate data may contain misdetected data, resulting in poor classification effect of the human heart rate data. Summary of the invention

[0005] The present application provides a heart rate data classification method, device, equipment and storage medium, which improves the classification accuracy of heart rate data classification. The technical solution is as follows.

[0006] On the one hand, a heart rate data classification method is provided, the method comprising:

[0007] Acquire initial heart rate data; the initial heart rate data includes initial heart rate values ​​sorted by time;

[0008] Generate a heart rate threshold value according to the initial heart rate value within the target time interval;

[0009] Correcting each initial heart rate value in the initial heart rate data according to the heart rate threshold to obtain first preprocessed data;

[0010] Performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data;

[0011] The second preprocessed data is processed according to the heart rate classification model to obtain a category result corresponding to the initial heart rate data.

[0012] In another aspect, a heart rate data classification device is provided, the device comprising:

[0013] An initial heart rate acquisition module, used to acquire initial heart rate data; the initial heart rate data includes initial heart rate values ​​sorted by time;

[0014] A heart rate threshold generation module, used to generate a heart rate threshold according to the size of the initial heart rate value within the target time interval;

[0015] A first preprocessing module, configured to correct each initial heart rate value in the initial heart rate data according to the heart rate threshold value to obtain first preprocessing data;

[0016] A second preprocessing module, used for performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data;

[0017] The category acquisition module is used to process the second preprocessed data according to the heart rate classification model to obtain the category result corresponding to the initial heart rate data.

[0018] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the above-mentioned heart rate data classification method.

[0019] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned heart rate data classification method.

[0020] The technical solution provided by this application may have the following beneficial effects:

[0021] When it is necessary to classify the heart rate data of the human body, the computer device can first determine the target time interval in the heart rate data, and determine the heart rate threshold as the basis for judging abnormal heart rate according to the heart rate data in the time interval; after the heart rate threshold is determined, each initial heart rate value in the initial heart rate data can be judged as abnormal by the heart rate threshold to correct the initial heart rate data into the first preprocessed data; the computer device further processes the corrected first preprocessed data through the denoising algorithm to obtain the second preprocessed data to input the heart rate classification model, thereby completing the classification of the initial heart rate data. In the above scheme, by successively performing the correction operation and the denoising operation on the initial heart rate data, while avoiding the interference of high-frequency noise, it also avoids the influence of the data misidentified by the wearable device on the classification of the heart rate data, thereby further improving the accuracy of the classification of the heart rate data. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 It is a structural diagram of a heart rate data classification system according to an exemplary embodiment.

[0024] Figure 2 is a flowchart of a method for classifying heart rate data according to an exemplary embodiment.

[0025] Figure 3 is a flowchart of a method for classifying heart rate data according to an exemplary embodiment.

[0026] Figure 4 A schematic diagram showing the changes of collected original heart rate time series data is shown.

[0027] Figure 5 A schematic diagram of obtaining new heart rate time series data after replacing abnormal values ​​is shown.

[0028] Figure 6 The figure shows the processing results of a segment of heart rate time series data.

[0029] Figure 7 is a structural block diagram of a heart rate data classification device according to an exemplary embodiment.

[0030] Figure 8 It is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0031] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0032] It should be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B.

[0033] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.

[0034] In an embodiment of the present application, "predefinition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). The present application does not limit its specific implementation method.

[0035] The heart rate data classification method provided in the embodiment of the present application can be applied to a computer device with strong data processing capabilities. The heart rate data classification method includes a training method for a heart rate data classification model, and the heart rate data classification model can realize the processing of input heart rate data to obtain a heart rate data category corresponding to the input heart rate data to indicate the health status of the human body. In a possible implementation, the heart rate data classification method provided in the embodiment of the present application can be applied to a personal computer, a workstation or a server, that is, the heart rate data classification model is trained by at least one of a personal computer, a workstation and a server.

[0036] Figure 1 1 is a structural diagram of a heart rate data classification system according to an exemplary embodiment. The heart rate data classification system includes a server 110 and a terminal 120. The terminal 120 and the server 110 perform data communication via a communication network, which can be a wired network or a wireless network.

[0037] Optionally, an application with a heart rate data processing function is installed in the terminal 120. The application may be a professional image processing application, a social application, a virtual reality application, or an AI application with a heart rate data processing function, which is not limited in the embodiments of the present application.

[0038] Optionally, the terminal 120 may be a terminal device having a heart rate data acquisition component, which is used to acquire heart rate data and store it in a data storage module in the terminal 120. For example, the terminal 120 may be a wearable device with a heart rate acquisition function; the terminal 120 may also be a terminal device having a data transmission interface, which is used to receive heart rate data collected by a wearable device having a heart rate data acquisition component.

[0039] Optionally, the terminal 120 may be a wearable device terminal such as a smart watch, a smart bracelet, or smart glasses, or a smart terminal connected to a wearable device having a human body data acquisition sensor, and the embodiments of the present application do not impose any restrictions on this.

[0040] The server 110 may be implemented as a single server or a server cluster consisting of a group of servers, which may be a physical server or a cloud server. In a possible implementation, the server 110 is a background server of an application in the terminal 120 .

[0041] In a possible implementation of the embodiment of the present application, the server 110 trains the heart rate data classification model through a pre-set training sample set (including each training sample), wherein the training sample set may contain training sample heart rate data of different categories, and each training sample heart rate data has its own category annotation information (i.e., label value). After the server 110 completes the training process of the heart rate data classification model, the trained heart rate data classification model is sent to the terminal 120 via a wired network or a wireless network.

[0042] The terminal 120 receives the trained heart rate data classification model and sends the data information (such as weight information) corresponding to the heart rate data classification model to an application with a heart rate data classification function, so that when the user uses the application, the input heart rate data can be classified and processed to identify the health status indicated by the input heart rate data.

[0043] In another possible implementation of the embodiment of the present application, the terminal 120 can independently implement the heart rate data classification process. Taking the terminal 120 as a smart watch as an example, when the smart watch is in operation, the heart rate data of the person wearing the smart watch can be read, and the smart watch can be processed through the heart rate processing application in the smart watch. The heart rate processing application calls the heart rate data classification model pre-set in the smart watch to process the heart rate data collected by the smart watch, so as to obtain the health status indicated by the heart rate data.

[0044] Optionally, the smart watch can also send the health status obtained through analysis to a server corresponding to the heart rate processing application so as to save the health status of the human body in the server 110 .

[0045] Optionally, the above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms and other technical computing services.

[0046] Optionally, the system may further include a management device, which is used to manage the system (such as managing the connection status between each module and the server, etc.), and the management device is connected to the server via a communication network. Optionally, the communication network is a wired network or a wireless network.

[0047] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any other network, including but not limited to any combination of local area network, metropolitan area network, wide area network, mobile, limited or wireless network, private network or virtual private network. In some embodiments, the technology and / or format including hypertext markup language, extensible markup language, etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, Internet protocol security, etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.

[0048] Figure 2 is a flowchart of a method for classifying heart rate data according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The server or terminal in the heart rate data classification system shown. Figure 2 As shown, the heart rate data classification method may include the following steps:

[0049] Step 201, obtaining initial heart rate data.

[0050] The initial heart rate data includes initial heart rate values ​​sorted by time.

[0051] Optionally, the initial heart rate data may be heart rate data of a target human body collected by a wearable device.

[0052] That is, the wearable device detects the target human body's heart rate according to the pulse beat information it monitors and according to the specified period, thereby obtaining the initial heart rate values ​​in the initial heart rate data, which are sorted by time.

[0053] Step 202: Generate a heart rate threshold value according to the initial heart rate value within the target time interval.

[0054] After the computer device obtains the initial heart rate value collected by the wearable device, in order to avoid the wearable device being interfered with by the external environment and collecting misidentification information, which interferes with the subsequent heart rate classification, the initial heart rate data needs to be preprocessed.

[0055] The computer device can obtain a target time interval in the initial heart rate data, and generate a heart rate threshold according to the size of the initial heart rate value in the target time interval as an abnormality detection frame, thereby detecting and processing the initial heart rate data.

[0056] Optionally, the target time interval can be a time interval of any target time length in the initial heart rate data. In the target time interval, there are various initial heart rate data, and since the human heart rate data collected by the wearable device generally does not change significantly, the approximate range of the target human heart rate (i.e., the heart rate threshold) can be determined based on the initial heart rate data in the interval, and the heart rate data beyond the range is abnormal heart rate data.

[0057] Optionally, the target time interval can also be a time area in which the heart rate is relatively stable within each time interval of the initial heart rate data, that is, the computer device can divide the initial heart rate data into each time interval, and obtain the variance of the initial heart rate value within each time interval, and obtain the time interval with the smallest variance as the target time interval. In this case, the target time interval is the interval in which the heart rate is most stable during the wearable device detection process, and the heart rate threshold generated by this interval can better detect and identify abnormal heart rates.

[0058] Optionally, the heart rate threshold can be generated by the average heart rate in the target time interval. For example, when the average heart rate in the target time interval is 70 (in times per minute), the heart rate threshold can be determined as 70*0.5 and 70*1.5. The two heart rate thresholds are used to detect excessively high heart rate and excessively low heart rate, respectively.

[0059] Step 203: Correct each initial heart rate value in the initial heart rate data according to the heart rate threshold to obtain first preprocessed data.

[0060] After obtaining the heart rate threshold, the heart rate threshold can be used to detect each initial heart rate value in the initial heart rate threshold. When it is detected that the reasonable heart rate range indicated by the heart rate threshold is not met, it can be considered that the initial heart rate value is a heart rate value that may be abnormal. At this time, the abnormal heart rate value can be corrected (for example, replaced or deleted), thereby screening the initial heart rate values ​​in the initial heart rate data to obtain the first preprocessed data.

[0061] At this time, the first pre-processed data corrects most of the misidentified data collected by the wearable device due to environmental influences. When the first pre-processed data is subsequently processed, the accuracy of heart rate data recognition can be significantly improved.

[0062] Step 204: Perform high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data.

[0063] After correcting the initial heart rate data to obtain the first preprocessed data, the computer device can then perform high-frequency noise elimination processing on the first preprocessed data. The heart rate time series data is a non-stationary time series data and contains some noise, which will cause great interference to the results of analysis based on vital sign data. Optionally, the above-mentioned high-frequency noise elimination processing can be processed by empirical mode decomposition (EMD) or ensemble empirical mode decomposition (EEMD) algorithm to adaptively decompose the signal into a finite number of intrinsic mode functions (IMF) to generate a highly localized time-frequency estimate of the signal, thereby removing the high-frequency signal in the heart rate time series data to generate the second preprocessed data.

[0064] Step 205: Process the second preprocessed data according to the heart rate classification model to obtain a category result corresponding to the initial heart rate data.

[0065] The second preprocessed data after abnormal data correction and high-frequency noise elimination can be considered as data suitable for analysis, and the computer device can perform data processing on the second preprocessing device. In an embodiment of the present application, the computer device can input the second preprocessed data into a heart rate classification model, and obtain the recognition probability corresponding to the initial heart rate data through the heart rate classification model, thereby obtaining the category result corresponding to the initial heart rate data.

[0066] Taking health judgment as an example, when the heart rate classification model is a binary classification machine learning model, when the computer device inputs the second preprocessed data into the heart rate classification model, the heart rate classification model processes it and outputs a probability distribution corresponding to the second preprocessed data, that is, it outputs a healthy probability P1 and an unhealthy probability P2. When the healthy probability P1 is greater than the threshold, the category result corresponding to the initial heart rate data is determined to be healthy.

[0067] In summary, when it is necessary to classify the heart rate data of the human body, the computer device can first determine the target time interval in the heart rate data, and determine the heart rate threshold as the basis for judging the abnormal heart rate based on the heart rate data in the time interval; after the heart rate threshold is determined, the heart rate threshold can be used to judge the abnormality of each initial heart rate value in the initial heart rate data, so as to correct the initial heart rate data into the first preprocessed data; the computer device further processes the corrected first preprocessed data through the denoising algorithm to obtain the second preprocessed data to input the heart rate classification model, thereby completing the classification of the initial heart rate data. In the above scheme, by successively performing the correction operation and the denoising operation on the initial heart rate data, while avoiding the interference of high-frequency noise, it also avoids the influence of the data misidentified by the wearable device on the classification of the heart rate data, thereby further improving the accuracy of the classification of the heart rate data.

[0068] Figure 3 is a flowchart of a method for classifying heart rate data according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The server or terminal in the heart rate data classification system shown. Figure 3 As shown, the heart rate data classification method may include the following steps:

[0069] Step 301, obtaining initial heart rate data.

[0070] In an embodiment of the present application, the initial heart rate data includes initial heart rate values ​​sorted by time. For example, the initial heart rate values ​​may be as shown in Table 1 below.

[0071] Table 1

[0072] 70 72 80 71 … 76 69 84

[0073] The initial heart rate data in Table 1 is the heart rate data of the target human body collected by the wearable device at a specified frequency, and the time intervals between adjacent initial heart rate values ​​are the same.

[0074] Step 302, obtaining each initial heart rate value within the target time interval, and calculating the average heart rate within the target time interval.

[0075] Before correcting the initial heart rate value in the initial heart rate data, the initial heart rate values ​​in the target time zone can be obtained first, and the average of the initial heart rate values ​​in the interval is calculated as the heart rate average value in the target interval. At this time, the heart rate average value can represent the approximate situation of the heart rate value in the target time interval.

[0076] In one possible implementation, the target time interval is the complete time interval corresponding to the initial heart rate data, that is, the initial heart rate values ​​within the target time interval at this time are the initial heart rate values ​​in the initial heart rate data, and the average heart rate within the target time is the average heart rate of the initial heart rate data, which represents the overall heart rate situation during the entire process of the initial heart rate data.

[0077] In a possible implementation, the initial heart rate data is divided into candidate time intervals according to the target time interval; the mean of the heart rate data in each candidate time interval is obtained, and the mean sequence is obtained by size; the candidate time interval corresponding to the median of the mean sequence is determined as the target time interval.

[0078] The computer device can also first divide the initial heart rate data into candidate time intervals, calculate the mean of each candidate time interval, and sort the mean of each candidate time interval. At this time, the overall ranking of the heart rate conditions of each candidate time interval can be obtained. The computer device then determines the candidate time interval corresponding to the median of the mean sequence as the target time interval. At this time, the target time interval can better represent the overall situation of the initial heart rate data. The abnormal data conditions determined by the target time interval can better screen out abnormal heart rate thresholds.

[0079] In the above solution, the target time interval may be a fixed time interval in the initial heart rate data, and in another possible implementation, the target time interval corresponding to the first initial heart rate value is determined according to the moment information of the first initial heart rate value.

[0080] That is, when it is necessary to verify the first initial heart rate value in the initial heart rate data, the target time interval is determined according to the moment information of the first initial heart rate value. In other words, the computer device can calculate the corresponding target time interval for each initial heart rate value, and verify each initial heart rate value through different target time intervals.

[0081] Step 303: The product of the heart rate mean and the first ratio is determined as the high heart rate threshold corresponding to the target time interval.

[0082] After the heart rate average value in the target time interval is obtained, the heart rate average value may be multiplied by the first ratio to obtain a high heart rate threshold value.

[0083] Optionally, when the mean heart rate is mHR, the high heart rate mean may be defined as (1+r)mHR. r is a custom parameter and may be modified according to actual conditions.

[0084] Step 304: The product of the heart rate mean and the second ratio is determined as the low heart rate threshold corresponding to the target time interval.

[0085] After obtaining the heart rate average value in the target time interval, the heart rate average value may be multiplied by the second ratio to obtain a low heart rate threshold value.

[0086] Optionally, when the mean heart rate is mHR, the low mean heart rate may be defined as (1-r)mHR.

[0087] For example, when r is 0.5, the high heart rate threshold is 1.5 times the heart rate average, and the low heart rate threshold is 0.5 times the heart rate average. When the initial heart rate value is not between the high heart rate threshold and the low heart rate threshold, it is considered that the initial heart rate value is abnormal.

[0088] Step 305: Correct each initial heart rate value in the initial heart rate data according to the heart rate threshold to obtain first preprocessed data.

[0089] After the heart rate threshold is obtained, each initial heart rate value can be corrected to reduce the impact of erroneously collected data on the real heart rate data.

[0090] In one possible implementation, when the moment information of the first initial heart rate value is less than the first moment, the target time period after the first initial heart rate value is obtained as the target time interval; when the moment information of the first initial heart rate value is greater than the second moment, the target time period before the first initial heart rate value is obtained as the target time interval; when the moment information of the first initial heart rate value is greater than the first moment and less than the second moment, the first initial heart rate value is taken as the midpoint and the target time period is taken as the interval length to obtain the target time interval.

[0091] In the initial heart rate data shown in Table 1, when the time information of the first initial heart rate value is in the middle position, the first initial heart rate value can be used as the midpoint and the target time period can be used as the interval length to obtain the target time interval;

[0092] When the moment information of the first initial heart rate value is at the front position, that is, the moment information is less than the first moment, when the first initial heart rate value is used as the midpoint, the target time interval constructed with the target time period as the interval length may exceed the range of Table 1. Therefore, the computer device can use the moment information of the first initial heart rate value as the left endpoint of the interval, and obtain the target time period after the first initial heart rate value as the target time interval.

[0093] When the moment information of the first initial heart rate value is at the rear end, that is, the moment information is greater than the second moment, when the first initial heart rate value is taken as the midpoint, the target time interval constructed with the target time period as the interval length may also exceed the range of Table 1. Therefore, the computer device can use the moment information of the first initial heart rate value as the right endpoint of the interval, and obtain the target time period before the first initial heart rate value as the target time interval.

[0094] In one possible implementation, determine whether the first initial heart rate value is in a first threshold interval formed by a low heart rate threshold and a high heart rate threshold corresponding to the first initial heart rate value; when the first initial heart rate value is not in the first threshold interval, update the first initial heart rate value to the median of the target time interval corresponding to the first initial heart rate value.

[0095] After obtaining the target time interval corresponding to the first initial heart rate value, the first initial heart rate value can be detected by the heart rate threshold obtained by the target time interval. When the first initial heart rate value is not within the first threshold interval, it means that the first initial heart rate is too high or too low and does not conform to the normal physiological condition. It is likely that the data is abnormal and collected by the acquisition device due to a problem.

[0096] At this time, in order to ensure that the corrected initial heart rate values ​​are still sorted according to the specified period, the abnormal first initial heart rate value is replaced with the median within the target time interval, and the abnormal heart rate value is replaced by a relatively stable heart rate value to minimize the impact of abnormal data on the overall initial heart rate data.

[0097] In another possible implementation, it is determined whether the second initial heart rate value is in a second threshold interval formed by a low heart rate threshold and a high heart rate threshold corresponding to the second initial heart rate value; when the second initial heart rate value is not in the second threshold interval, the second initial heart rate value is deleted.

[0098] Alternatively, when the computer device detects that the second initial heart rate value is not within the second threshold interval, the computer device may directly delete the second initial heart rate value to avoid the influence of abnormal data on the overall initial heart rate data.

[0099] In a possible implementation of the embodiment of the present application, the computer device may process the data through an adaptive algorithm to remove abnormal values ​​caused by misdetection of the bracelet, thereby obtaining first preprocessed data.

[0100] In the adaptive algorithm, the heart rate data monitored by bracelets and other means are prone to spike noise caused by false detection. Therefore, it is very necessary to pre-process the heart rate data to eliminate the negative impact of abnormal values. The description of the adaptive filtering algorithm is as follows:

[0101] 1. For each heart rate value in the heart rate sequence data, use the test heart rate value HR i Centered on the ground, calculate the average of the 2m+1 heart rate values ​​before and after (recorded as mHR),

[0102] 2. Set the heart rate value HR i Compare with mHR. If HR i <(1-r)mHR or HR i >(1+r)mHR, the median of m heart rate values ​​is used instead of HR i , otherwise it remains unchanged.

[0103] When testing heart rate HR i When it is located at the first m points or the last m points of the entire heart rate sequence data, the window size for calculating the average value is less than m. In this case, the following processing is performed: when it is located at the first m points, the right window size remains unchanged, and all the data points on the left are included in the calculation window; when it is located at the last m points, the left window size remains unchanged, and all the data points on the right are included in the calculation window.

[0104] Figure 4 A schematic diagram showing the changes of the collected original heart rate time series data is shown. Figure 4 It can be seen that there are many outliers. The data is preprocessed by adaptive filtering algorithm. Figure 5 A schematic diagram of obtaining new heart rate time series data after replacing abnormal values ​​is shown.

[0105] Step 306: each first preprocessed heart rate value in the first preprocessed data is processed by a complete set empirical mode decomposition (CEEMDAN) algorithm with adaptive noise as a time series signal in time series to obtain second preprocessed data.

[0106] Heart rate time series data is a non-stationary time series data, and is often accompanied by some high-frequency noise, which is very disadvantageous when analyzing heart rate time series data, resulting in errors in the analysis results. In the embodiment of the present application, the method of using empirical mode decomposition is proposed to effectively remove high-frequency signals (noise) and non-stationary items in heart rate time series data.

[0107] Empirical Mode Decomposition (EMD) is data-driven. Its purpose is to adaptively decompose the signal into a finite number of Intrinsic Mode Functions (IMFs) based on the inherent characteristics of the signal itself, generating a highly localized time-frequency estimate of the signal. It also has the characteristics of adaptability and multi-resolution.

[0108] Ensemble Empirical Mode Decomposition (EEMD) is aimed at the modal mixing problem of EMD. The modal components obtained by EMD are averaged and applied to the original signal with Gaussian white noise added. The resulting decomposition solves the EMD modal mixing problem, but introduces a new mixing problem.

[0109] Complete Ensemble Empirical Mode Decomposition with Adaptive Noise (CEEMDAN) adds a specific noise in each stage of decomposition and calculates a unique residual to obtain each mode. The decomposition obtained is complete and the error is negligible in numerical terms. When analyzing ECG signals, CEEMDAN has better modal spectrum separation than EEMD and requires fewer screening iterations, effectively reducing the computational cost.

[0110] In a possible implementation, the computer device may process the first preprocessed heart rate data by using an EMD algorithm, and the EMD algorithm is as follows:

[0111] The heart rate time series data can be regarded as a signal X[t], which is decomposed into K IMF components (IMF i [t]) and a residual component R K [t], i = 1, 2, ..., K, that is, X[t] can be reconstructed from all IMF components:

[0112]

[0113] EMD algorithm [1] Here are the steps:

[0114] (a) Set the value of the threshold ε, i = 1;

[0115] (b) Remember v i [t] = X[t];

[0116] (c) Extract the i-th IMF component:

[0117] (1)j=1,h i,j [t] = v i [t];

[0118] (2) Extract h i,j All extreme points of [t] (including maximum and minimum points);

[0119] (3) h i,jThe maximum and minimum points of [t] are interpolated using cubic sampling to obtain the upper and lower envelopes

[0120] (4) Generate a local mean curve using the upper and lower envelopes

[0121] (5) Update h i,j+1 [t] = h i,j [t]-m i,j [t], j = j + 1;

[0122] (6) Calculate SD(j) = ||h i,j+1 [t]-h i,j [t]|| 2 / ||h i,j [t]|| 2 ;

[0123] (7) Compare SD(j) with the threshold ε: If SD(j) < ε, then IMF i [t] = h i,j+1 [t]; otherwise return to step (2);

[0124] (d) Update the remaining component v i+1 [t] = v i [t]-IMF i [t];

[0125] (e) If v i+1 If there is at most one extreme point of [t], the entire algorithm process ends; otherwise, i=i+1, and returns to step (c).

[0126] Further, in the embodiment of the present application, since CEEMDAN has better modal spectrum separation capability than EEMD, the number of screening iterations required is also less, which effectively reduces the calculation cost. Therefore, the computer device can also process the first pre-processed heart rate data through the CEEMDAN (Complete Ensemble Empirical Mode Decomposition with Adaptive Noise) algorithm. The CEEMDAN algorithm is as follows:

[0127] remember is the kth modal component obtained by decomposition, and the operator E is defined k (·) indicates that the kth modal component of a given input signal is obtained by EMD calculation, W i [t] are different realizations of Gaussian white noise with zero mean and unit variance, i = 1, 2, …, N, and λ0 is the standard deviation of the Gaussian white noise.

[0128] (a) Using the EMD algorithm to calculate X[t]+λ0·W i [t](i=1,2,…,N) are decomposed to obtain their first modal component IMF respectively i,1 [t];

[0129] (b) Calculate the first modal component of the CEEMDAN method:

[0130]

[0131] (c) Calculate the first margin:

[0132] (d) Decompose R1[t]+λ1·E1(Wi[t])(i=1 , 2,…,N) to obtain the first modal component, λ k is the standard deviation of the Gaussian white noise in the kth stage, and then the second modal component can be obtained:

[0133]

[0134] (e) For k = 2, 3, ..., K, calculate the kth residual component:

[0135] (f) Decompose R using the EMD method k [t]+λ k ·E k (W i [t])(i=1,2,…,N) to get the first modal component, and the k+1th modal component can be obtained:

[0136]

[0137] (g) k = k + 1, return to step (e);

[0138] Repeat step (eg) until the remaining components have at most one extreme point and no further IMF can be extracted.

[0139] If K is the number of modal components, R K [t] is the final residual component, then the input signal X[t] can be reconstructed through all IMFs:

[0140]

[0141] Figure 6 The following figure shows the processing results of a segment of heart rate time series data. Figure 6As shown in the figure, the IMFs and residual components obtained by decomposing the heart rate time series data by CEEMDAN, among which IMF1-IMF3 are high-frequency signals, which are often some noises. They have no significant and effective effect on our classification and prediction analysis of heart rate data, but will bring interference. Therefore, during the process reconstruction, the IMFs of these high-frequency signals are removed. Figure 6 The remaining component in the lower right corner expresses a part of the non-stationary trend, which is also removed in the scheme shown in the embodiment of the present application.

[0142] Step 307: Process the second preprocessed data according to the heart rate classification model to obtain a category result corresponding to the initial heart rate data.

[0143] After CEEMDAN is used to filter out the high-frequency signals and non-stationary trends of the heart rate data, the second preprocessed data obtained is data with better feature expression capabilities. At this time, the computer device can use the trained heart rate classification model to process the second preprocessed data to obtain the category results corresponding to the initial heart rate data.

[0144] Optionally, when the heart rate classification model is a trained binary classification model, after the heart rate classification model processes the second preprocessed data, it can obtain the category probability distribution corresponding to the initial heart rate data to indicate the category result corresponding to the initial heart rate data.

[0145] Optionally, when the heart rate classification model is a regression model, the heart rate classification model can obtain a probability value corresponding to the initial heart rate data after processing the second preprocessed data, and the category result corresponding to the initial heart rate data can be indicated according to the size of the probability value.

[0146] For example, when the heart rate classification model is a regression model and the regression model is a polynomial regression model, the polynomial regression model can be a polynomial fitted by the sample heart rate data and the health level corresponding to the sample heart rate data. The input second preprocessed data is calculated through the polynomial, and the category result corresponding to the initial heart rate data can be output.

[0147] For another example, when the above-mentioned heart rate classification model is a binary classification model, such as a residual network model of the RESNET-50 structure, the binary classification model can be trained by sample heart rate data. Specifically, the computer device inputs the sample heart rate data into the binary classification model, and extracts features through the convolution layer in the binary classification model, and then inputs the extracted features into the fully connected layer in the binary classification model to obtain the prediction result corresponding to the sample heart rate data.

[0148] The binary classification model then calculates the prediction result of the sample heart rate data and the labeled category in the sample heart rate data through a loss function (such as a cross entropy loss function), and performs back propagation update based on the obtained loss function value, thereby completing the training process of the binary classification model.

[0149] Optionally, the above-mentioned category results can be determined according to a heart rate classification model. For example, when the heart rate classification model is a model trained with sample heart rate data as samples and health status (such as whether healthy) as annotations, the final identified category result is also whether the initial heart rate data represents the health of the target person.

[0150] That is to say, the computer device inputs the heart rate time series data after the above processing (i.e., the second pre-processed data) as data into a machine analysis model F(X) for prediction, and then there is the following mathematical function expression relationship:

[0151] y=F(X)

[0152] Wherein X represents the heart rate time series data, which is the heart rate time series data after outliers are removed by the adaptive filtering algorithm proposed in the embodiment of the present application and decomposed and reconstructed by CEEMDAN, and is a vector, and y is the model output result.

[0153] F(X) can be a binary classification model or a regression model. If it is a binary classification model, the output y is a value of 0 or 1, indicating whether the person is infected with the new coronavirus; if a regression model is selected, the output y value is a continuous value, which can express the risk of infection with the new coronavirus.

[0154] In summary, when it is necessary to classify the heart rate data of the human body, the computer device can first determine the target time interval in the heart rate data, and determine the heart rate threshold as the basis for judging the abnormal heart rate based on the heart rate data in the time interval; after the heart rate threshold is determined, the heart rate threshold can be used to judge the abnormality of each initial heart rate value in the initial heart rate data, so as to correct the initial heart rate data into the first preprocessed data; the computer device further processes the corrected first preprocessed data through the denoising algorithm to obtain the second preprocessed data to input the heart rate classification model, thereby completing the classification of the initial heart rate data. In the above scheme, by successively performing the correction operation and the denoising operation on the initial heart rate data, while avoiding the interference of high-frequency noise, it also avoids the influence of the data misidentified by the wearable device on the classification of the heart rate data, thereby further improving the accuracy of the classification of the heart rate data.

[0155] Figure 7 : is a structural block diagram of a heart rate data classification device according to an exemplary embodiment. The device comprises:

[0156] The initial heart rate acquisition module 701 is used to acquire initial heart rate data; the initial heart rate data includes each initial heart rate value sorted by time;

[0157] A heart rate threshold generating module 702, configured to generate a heart rate threshold according to the initial heart rate value within a target time interval;

[0158] A first preprocessing module 703, configured to correct each initial heart rate value in the initial heart rate data according to the heart rate threshold value to obtain first preprocessing data;

[0159] A second preprocessing module 704 is used to perform high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data;

[0160] The category acquisition module 705 is used to process the second pre-processed data according to the heart rate classification model to obtain the category result corresponding to the initial heart rate data.

[0161] In a possible implementation, the heart rate threshold includes a high heart rate threshold and a low heart rate threshold;

[0162] The heart rate threshold generation module is further used to:

[0163] Obtaining each initial heart rate value within a target time interval, and calculating the average heart rate within the target time interval;

[0164] Determine the product of the heart rate mean and the first ratio as the high heart rate threshold corresponding to the target time interval;

[0165] The product of the heart rate average and the second ratio is determined as the low heart rate threshold corresponding to the target time interval.

[0166] In a possible implementation manner, the device further includes:

[0167] An interval division module, used for dividing the initial heart rate data into candidate time intervals according to the target time interval;

[0168] The mean sorting module is used to obtain the mean of the heart rate data in each candidate time interval and sort them by size to obtain a mean sequence;

[0169] The first interval determination module is used to determine the candidate time interval corresponding to the median of the mean sequence as the target time interval.

[0170] In a possible implementation manner, the device further includes:

[0171] A second interval determination module, configured to determine the target time interval corresponding to the first initial heart rate value according to the time information of the first initial heart rate value;

[0172] The first preprocessing module is further used to:

[0173] determining whether the first initial heart rate value is within a first threshold interval consisting of a low heart rate threshold and a high heart rate threshold corresponding to the first initial heart rate value;

[0174] When the first initial heart rate value is not within the first threshold interval, the first initial heart rate value is updated to a median within the target time interval corresponding to the first initial heart rate value.

[0175] In a possible implementation, the first preprocessing module is further configured to:

[0176] When the time information of the first initial heart rate value is less than the first time, obtaining the target time period after the first initial heart rate value as the target time interval;

[0177] When the time information of the first initial heart rate value is greater than the second time information, obtaining the target time period before the first initial heart rate value as the target time interval;

[0178] When the time information of the first initial heart rate value is greater than the first time and less than the second time, the first initial heart rate value is taken as the midpoint and the target time period is taken as the interval length to obtain the target time interval.

[0179] In a possible implementation, the first preprocessing module is further configured to:

[0180] Determining whether the second initial heart rate value is within a second threshold interval consisting of a low heart rate threshold and a high heart rate threshold corresponding to the second initial heart rate value;

[0181] When the second initial heart rate value is not within the second threshold range, the second initial heart rate value is deleted.

[0182] In a possible implementation, the second preprocessing module is further used to process each first preprocessed heart rate value in the first preprocessed data as a time series signal according to a time series through a complete set empirical mode decomposition (CEEMDAN) algorithm with adaptive noise to obtain second preprocessed data.

[0183] In summary, when it is necessary to classify the heart rate data of the human body, the computer device can first determine the target time interval in the heart rate data, and determine the heart rate threshold as the basis for judging the abnormal heart rate based on the heart rate data in the time interval; after the heart rate threshold is determined, the heart rate threshold can be used to judge the abnormality of each initial heart rate value in the initial heart rate data, so as to correct the initial heart rate data into the first preprocessed data; the computer device further processes the corrected first preprocessed data through the denoising algorithm to obtain the second preprocessed data to input the heart rate classification model, thereby completing the classification of the initial heart rate data. In the above scheme, by successively performing the correction operation and the denoising operation on the initial heart rate data, while avoiding the interference of high-frequency noise, it also avoids the influence of the data misidentified by the wearable device on the classification of the heart rate data, thereby further improving the accuracy of the classification of the heart rate data.

[0184] See also Figure 8 , which is a schematic diagram of a computer device provided according to an exemplary embodiment of the present application, the computer device includes a memory and a processor, the memory is used to store a computer program, and when the computer program is executed by the processor, the above method is implemented.

[0185] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0186] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the method in the above method embodiment.

[0187] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0188] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0189] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0190] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A heart rate data classification method, characterized in that: The method comprises: Acquire initial heart rate data; the initial heart rate data includes initial heart rate values ​​sorted by time; the initial heart rate data is the heart rate data of the target human body collected by the wearable device; Generate a heart rate threshold value according to the initial heart rate value within the target time interval; Correcting each initial heart rate value in the initial heart rate data according to the heart rate threshold to obtain first preprocessed data; Performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data; Processing the second preprocessed data according to the heart rate classification model to obtain a category result corresponding to the initial heart rate data; The heart rate threshold includes a high heart rate threshold and a low heart rate threshold; generating the heart rate threshold according to the size of the initial heart rate value within the target time interval includes: Obtaining each initial heart rate value within a target time interval, and calculating the average heart rate within the target time interval; Determine the product of the heart rate mean and the first ratio as the high heart rate threshold corresponding to the target time interval; Determine the product of the heart rate mean and the second ratio as the low heart rate threshold corresponding to the target time interval; Before generating the heart rate threshold according to the initial heart rate value within the target time interval, the method further includes: Determining the target time interval corresponding to the first initial heart rate value according to the time information of the first initial heart rate value; The step of correcting each initial heart rate value in the initial heart rate data according to the heart rate threshold comprises: determining whether the first initial heart rate value is within a first threshold interval consisting of a low heart rate threshold and a high heart rate threshold corresponding to the first initial heart rate value; When the first initial heart rate value is not within the first threshold interval, updating the first initial heart rate value to a median within the target time interval corresponding to the first initial heart rate value; Before generating the heart rate threshold according to the initial heart rate value in the target time interval, the method further includes: Dividing the initial heart rate data into candidate time intervals according to the target time interval; Get the mean of the heart rate data in each candidate time interval, sort them by size, and obtain the mean sequence; The candidate time interval corresponding to the median of the mean sequence is determined as the target time interval.

2. The method according to claim 1, characterized in that The step of determining the target time interval corresponding to the first initial heart rate value according to the time information of the first initial heart rate value includes: When the time information of the first initial heart rate value is less than the first time, obtaining the target time period after the first initial heart rate value as the target time interval; When the time information of the first initial heart rate value is greater than the second time information, obtaining the target time period before the first initial heart rate value as the target time interval; When the time information of the first initial heart rate value is greater than the first time and less than the second time, the first initial heart rate value is taken as the midpoint and the target time period is taken as the interval length to obtain the target time interval.

3. The method according to claim 1, characterized in that: The step of correcting each initial heart rate value in the initial heart rate data according to the heart rate threshold value further includes: Determining whether the second initial heart rate value is within a second threshold interval consisting of a low heart rate threshold and a high heart rate threshold corresponding to the second initial heart rate value; When the second initial heart rate value is not within the second threshold range, the second initial heart rate value is deleted.

4. The method according to any one of claims 1 to 3, characterized in that: The performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data includes: Each first preprocessed heart rate value in the first preprocessed data is used as a time series signal in time sequence and processed by a complete set empirical mode decomposition (CEEMDAN) algorithm with adaptive noise to obtain second preprocessed data.

5. A heart rate data classification device, characterized in that: The device comprises: An initial heart rate acquisition module is used to acquire initial heart rate data; the initial heart rate data includes initial heart rate values ​​sorted by time; the initial heart rate data is the heart rate data of the target human body collected by the wearable device; A heart rate threshold generation module, used to generate a heart rate threshold according to the size of the initial heart rate value within the target time interval; A first preprocessing module, configured to correct each initial heart rate value in the initial heart rate data according to the heart rate threshold value to obtain first preprocessing data; A second preprocessing module, used for performing high-frequency noise elimination processing on the first preprocessed data to obtain second preprocessed data; A category acquisition module, used for processing the second pre-processed data according to a heart rate classification model to obtain a category result corresponding to the initial heart rate data; The heart rate threshold includes a high heart rate threshold and a low heart rate threshold; the heart rate threshold generation module is also used for: Obtaining each initial heart rate value within a target time interval, and calculating the average heart rate within the target time interval; Determine the product of the heart rate mean and the first ratio as the high heart rate threshold corresponding to the target time interval; Determine the product of the heart rate mean and the second ratio as the low heart rate threshold corresponding to the target time interval; The device further includes a target interval determination module, which is used to determine the target time interval corresponding to the first initial heart rate value according to the time information of the first initial heart rate value before generating the heart rate threshold according to the size of the initial heart rate value in the target time interval; The first preprocessing module is also used for: determining whether the first initial heart rate value is within a first threshold interval consisting of a low heart rate threshold and a high heart rate threshold corresponding to the first initial heart rate value; When the first initial heart rate value is not within the first threshold interval, updating the first initial heart rate value to a median within the target time interval corresponding to the first initial heart rate value; The device also includes a target time interval determination module, which is used to: Dividing the initial heart rate data into candidate time intervals according to the target time interval; Get the mean of the heart rate data in each candidate time interval, sort them by size, and obtain the mean sequence; The candidate time interval corresponding to the median of the mean sequence is determined as the target time interval.

6. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the heart rate data classification method described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the heart rate data classification method described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electrocardiosignal classification method and device

    CN113520401A