Health state change identification method and device based on time sequence heart rate mode
By clustering and multimodal deep learning of users' nighttime heart rate sequences, normal and abnormal patterns are identified, which solves the shortcomings of individualized heart rate assessment in existing technologies and realizes individualized prediction and early warning of long-term health status.
Patent Information
- Application Number
- CN202511615559.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-01-23
AI Technical Summary
Existing sleep heart rate health assessment methods lack individual considerations, cannot effectively capture the dynamic pattern characteristics of heart rate curves, and are difficult to predict and warn of long-term health status.
By performing K-means and K-shape clustering on the user's nighttime heart rate sequences over M consecutive days, normal and abnormal pattern clusters are formed. Combined with a multimodal deep learning network, a health status representation vector is generated, and an individual health status label is output.
It enables early warning of potential health risks and long-term tracking of individual health, improving the individualization and sustainability of health status prediction.
Smart Images

Figure CN121393894A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of heart rate data processing, in particular to a health state change recognition method and device based on time sequence heart rate mode. BACKGROUND
[0002] Sleep is an important process for maintaining human physiological and psychological health, and heart rate changes during sleep are key indicators reflecting autonomic nervous system function, cardiovascular status, and overall health level. Long-term sleep heart rate abnormalities may be closely related to various health problems such as arrhythmia, sleep apnea, and excessive stress load. Therefore, continuous and accurate monitoring and analysis of night heart rate is of great significance for realizing individualized health management. With the popularity of wearable devices (such as smart bands and watches), long-term, continuous, and non-disturbing collection of user night heart rate has been realized, providing a data basis for individualized and continuous individual health monitoring.
[0003] At present, the main sleep heart rate health evaluation methods can be divided into the following three categories: Alarm mechanism based on absolute threshold: alarm is performed by setting fixed heart rate boundaries (such as below 40 beats per minute or above 120 beats per minute). This method is simple to implement, but lacks individualization and relies only on instantaneous values, making it difficult to reveal the overall shape and evolution of the heart rate sequence, and prone to false positives or false negatives.
[0004] 2. Method based on statistics and machine learning: statistical features such as mean and variance are calculated or classification models are trained to identify abnormalities. This method is more flexible than the threshold method, but it usually relies on manually designed features and fails to effectively capture dynamic pattern features of heart rate curves. Meanwhile, the analysis is usually limited to a single day or a single time, lacking long-term trend tracking and unable to reveal the change rule of health status over time.
[0005] 3. Method based on deep learning: some studies use deep learning models (such as convolutional neural networks and recurrent neural networks) to detect abnormalities in heart rate or electrocardiogram signals. However, the model is usually trained based on population data, lacking individualization for a single user and unable to adapt to individual differences. In addition, existing methods usually stop at the stage of static and isolated data analysis, rarely considering the pattern evolution of continuous time windows as input, making it difficult to achieve long-term health status prediction and early warning. SUMMARY
[0006] The purpose of the present application is to provide a health state change recognition method and device based on time sequence heart rate mode, which can realize long-term health status prediction and early warning.
[0007] In a first aspect of an embodiment of the present application, a health state change recognition method based on time sequence heart rate mode is provided, comprising: obtaining a night heart rate sequence of the user for M consecutive days; obtaining a night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days; calculating a daily heart rate average value of the user for N consecutive days based on the night heart rate sequence of the user for N consecutive days; performing K-means clustering on the daily heart rate average value of the user for N consecutive days to obtain a plurality of first clustering clusters; performing K-shape clustering on the night heart rate sequence corresponding to the daily heart rate average value in each first clustering cluster to obtain a plurality of second clustering clusters; calculating a sample proportion value of each second clustering cluster and determining the second clustering cluster with the largest sample proportion value as a normal mode cluster; determining whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster, and if there is a second clustering cluster that is not an abnormal mode cluster in other second clustering clusters, the corresponding second clustering cluster is also determined as a normal mode cluster; forming a dual-mode clustering graph based on the normal mode cluster and the abnormal mode cluster, and obtaining a mode feature vector based on the normal mode cluster and the abnormal mode cluster; forming a three-dimensional mode graph based on a plurality of dual-mode clustering graphs; forming a mode feature vector sequence based on a plurality of mode feature vectors; obtaining user auxiliary information; inputting the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, the multi-modal deep learning network generating a health state representation vector based on the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information, and the multi-modal deep learning network outputting an individual health state label based on the health state representation vector.
[0008] As a preferred embodiment of the present application, obtaining a night heart rate sequence of the user for M consecutive days comprises: collecting the night heart rate of the user from falling asleep to waking up, and filtering the night heart rate; segmenting the filtered night heart rate by time, and calculating the heart rate average value of each time segment based on the night heart rate of each time segment, and taking all the heart rate average values of the user from falling asleep to waking up as a night heart rate sequence.
[0009] As a preferred embodiment of the present application, obtaining a night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days comprises: setting a sliding window with a length of N days, determining the current starting position of the sliding window in the night heart rate sequence of the user for M consecutive days, and obtaining the night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days based on the sliding window with the determined current starting position; wherein the current starting position is determined by adding a step value to the last starting position of the sliding window in the night heart rate sequence of the user for M consecutive days, and if there is no last starting position, the current starting position is the first night heart rate sequence.
[0010] As a preferred embodiment of the present application, determining whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster comprises: calculating an average of all daily mean heart rates in the normal mode cluster to obtain a first average value; selecting a second cluster from the other second clusters, calculating an average of all daily mean heart rates in the second cluster to obtain a second average value, calculating a difference between the second average value and the first average value to obtain a mean difference value, determining whether the mean difference value is greater than a mean difference threshold value, if the mean difference value is greater than the mean difference threshold value, determining the corresponding second cluster as an abnormal mode cluster, if the mean difference value is less than or equal to the mean difference threshold value, determining the corresponding second cluster as a remaining second cluster.
[0011] As a preferred embodiment of the present application, determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster further comprises: selecting a daily mean heart rate from the normal mode cluster, and determining a night heart rate sequence corresponding to the daily mean heart rate as a first night heart rate sequence; selecting a second cluster from the remaining second clusters, selecting a daily mean heart rate from the second cluster and determining a night heart rate sequence corresponding to the daily mean heart rate as a second night heart rate sequence, calculating a dynamic time warping distance value based on the second night heart rate sequence and the first night heart rate sequence, determining whether the dynamic time warping distance value is greater than a distance threshold value, if the dynamic time warping distance value is greater than the distance threshold value, determining the corresponding second cluster as an abnormal mode cluster, if the dynamic time warping distance value is less than or equal to the distance threshold value, determining the corresponding second cluster as a remaining second cluster.
[0012] As a preferred embodiment of the present application, determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster further comprises: calculating a standard deviation of all mean heart rates in the normal mode cluster to obtain a first standard deviation value; selecting a second cluster from the remaining second clusters, calculating a standard deviation of all daily mean heart rates in the second cluster to obtain a second standard deviation value, calculating a difference between the second standard deviation value and the first standard deviation value to obtain a standard deviation value, determining whether the standard deviation value is greater than a standard deviation threshold value, if the standard deviation value is greater than the standard deviation threshold value, determining whether a sample proportion value of the second cluster is greater than a proportion threshold value, if the sample proportion value is greater than the proportion threshold value, determining the corresponding second cluster as an abnormal mode cluster.
[0013] As a preferred embodiment of the present application, obtaining the mode feature vector based on the normal mode cluster and the abnormal mode cluster comprises: The normal state proportion value, the normal state mean value, and the normal state standard deviation value are calculated based on the normal state mode cluster, the abnormal state proportion value, the abnormal state mean value, and the abnormal state standard deviation value are calculated based on the abnormal state mode cluster, the mode difference value is calculated based on the normal state mode cluster and the abnormal state mode cluster, and the mode feature vector is formed by combining the normal state proportion value, the normal state mean value, the normal state standard deviation value, the abnormal state proportion value, the abnormal state mean value, the abnormal state standard deviation value, and the mode difference value.
[0014] In a second aspect of the embodiments of the present application, a health state change recognition device based on a time sequence heart rate mode is provided, comprising: A night heart rate sequence acquisition module is configured to acquire a night heart rate sequence of a user for M consecutive days. A double-mode clustering graph and mode feature vector acquisition module is configured to acquire a night heart rate sequence of a user for N consecutive days from the night heart rate sequence of the user for M consecutive days, calculate a daily heart rate mean value of the user for N consecutive days based on the night heart rate sequence of the user for N consecutive days, perform K-means clustering on the daily heart rate mean value of the user for N consecutive days to obtain a plurality of first clustering clusters, perform K-shape clustering on the night heart rate sequence corresponding to the daily heart rate mean value in each first clustering cluster to obtain a plurality of second clustering clusters, calculate a sample proportion value of each second clustering cluster, and determine a second clustering cluster with the largest sample proportion value as a normal state mode cluster; determine whether other second clustering clusters are abnormal state mode clusters based on the normal state mode cluster, and if there is a second clustering cluster that is not an abnormal state mode cluster in the other second clustering clusters, determine the corresponding second clustering cluster as a normal state mode cluster as well; form a double-mode clustering graph based on the normal state mode cluster and the abnormal state mode cluster, and acquire a mode feature vector based on the normal state mode cluster and the abnormal state mode cluster. A health state label acquisition module is configured to form a three-dimensional mode graph based on a plurality of double-mode clustering graphs, form a mode feature vector sequence based on a plurality of mode feature vectors, acquire user auxiliary information, input the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, generate a health state representation vector based on the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information, and output an individual health state label based on the health state representation vector.
[0015] In a third aspect of the embodiments of the present application, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the method provided in the first aspect.
[0016] In a fourth aspect of the embodiments of the present application, an electronic device is provided, comprising one or more processors, and a memory associated with the one or more processors, the memory being configured to store program instructions, which, when executed by the one or more processors, perform the method provided in the first aspect.
[0017] In summary, the present application has the following beneficial effects: The method of the embodiment of the present application first performs double-mode clustering on the historical night heart rate data of the user to determine normal mode clusters and abnormal mode clusters, then forms double-mode clustering graphs based on the normal mode clusters and the abnormal mode clusters and obtains mode feature vectors based on the normal mode clusters and the abnormal mode clusters, and finally inputs a three-dimensional mode graph formed based on a plurality of double-mode clustering graphs, a mode feature vector sequence formed based on a plurality of mode feature vectors, and user auxiliary information into a multi-modal deep learning network to obtain an individual health state label, thereby finally realizing early warning of potential health risks and long-term tracking of individual health.
[0018] Further or more detailed beneficial effects will be described in the specific embodiments in combination with specific embodiments. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A flow chart of a health state change recognition method based on time sequence heart rate modes according to an embodiment of the present application is shown; Figure 2 A block diagram of a health state change recognition device based on time sequence heart rate modes according to an embodiment of the present application is shown; Figure 3 A block diagram of an electronic device according to an embodiment of the present application is shown; Figure 4 A double-mode clustering graph formed based on normal mode clusters and abnormal mode clusters according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0020] Embodiments of the present application will be described in more detail by referring to the attached drawings. Although certain embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein, but rather these embodiments are provided so as to more thoroughly and completely understand the present application. It should be understood that the drawings and embodiments of the present application are merely for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0021] In the description of the embodiments of the present application, the term “comprising” and similar terms are to be interpreted as open-ended, i.e., “including but not limited to”. The term “based on” is to be interpreted as “based, at least in part, on”. The term “one embodiment” or “the embodiment” is to be interpreted as “at least one embodiment”. The terms “first”, “second”, etc. can refer to different or same objects. Other explicit and implicit definitions can also be included below.
[0022] Figure 1A flow chart of a health state change recognition method 100 based on a time sequence heart rate pattern of an embodiment of the present application is shown. The method 100 comprises: Step 102. Obtain a night heart rate sequence of a user for M consecutive days.
[0023] In this embodiment, obtaining a night heart rate sequence of a user for M consecutive days specifically comprises: Step 301. Collect the night heart rate of the user from falling asleep to waking up, and perform filtering processing on the night heart rate; segment the night heart rate after filtering processing according to time, and calculate the heart rate average value of each time segment based on the night heart rate of each time segment, and take all the heart rate average values of the user from falling asleep to waking up as a night heart rate sequence.
[0024] The filtering function is to remove the instantaneous mutation of the night heart rate, and reduce the influence of instantaneous fluctuation on subsequent pattern recognition. In this embodiment, the average heart rate can be calculated every 10 seconds. Assuming that the user falls asleep at 8 pm and wakes up at 6 am, 3600 heart rate average values can be obtained in one night (i.e. from falling asleep to waking up), and the 3600 heart rate average values are taken as a night heart rate sequence. A night heart rate sequence can be obtained by performing step 301 every day, and M night heart rate sequences can be obtained after M consecutive days. The value of M may, for example, be 180.
[0025] Referring to Figure 1 The method 100 in this embodiment further comprises: Step 104. Obtain a night heart rate sequence of a user for N consecutive days from the night heart rate sequences of the user for M consecutive days; calculate the daily heart rate average value of the user for N consecutive days based on the night heart rate sequences of the user for N consecutive days; perform K-means clustering on the daily heart rate average value of the user for N consecutive days to obtain a plurality of first clustering clusters; perform K-shape clustering on the night heart rate sequence corresponding to the daily heart rate average value in each first clustering cluster to obtain a plurality of second clustering clusters; calculate the sample proportion value of each second clustering cluster and determine the second clustering cluster with the largest sample proportion value as a normal mode cluster; determine whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster, if there is a second clustering cluster that is not an abnormal mode cluster in other second clustering clusters, then the corresponding second clustering cluster is also determined as a normal mode cluster; form a dual-mode clustering diagram based on the normal mode cluster and the abnormal mode cluster, and obtain a mode feature vector based on the normal mode cluster and the abnormal mode cluster.
[0026] In this embodiment, obtaining a night heart rate sequence of a user for N consecutive days from the night heart rate sequences of the user for M consecutive days specifically comprises: A sliding window with a length of N days is set, a current start position of the sliding window in the sequence of the user's consecutive M nights' heart rates is determined, and a sequence of the user's consecutive N nights' heart rates is obtained from the sequence of the user's consecutive M nights' heart rates based on the sliding window with the determined current start position; wherein the current start position is determined by adding a step value to a last start position of the sliding window in the sequence of the user's consecutive M nights' heart rates, and if the last start position does not exist, the current start position is the first night heart rate sequence.
[0027] The value of N can be 90, and the step value can be 15. When the step 104 is performed for the first time, the sequence of the user's consecutive 90 nights' heart rates is the first night heart rate sequence to the 90th night heart rate sequence in the sequence of the user's consecutive 180 nights' heart rates; when the step 104 is performed for the second time, the sequence of the user's consecutive 90 nights' heart rates is the 16th night heart rate sequence to the 105th night heart rate sequence in the sequence of the user's consecutive 180 nights' heart rates; when the step 104 is performed for the third time, the sequence of the user's consecutive 90 nights' heart rates is the 31st night heart rate sequence to the 120th night heart rate sequence in the sequence of the user's consecutive 180 nights' heart rates; in summary, the sequence of the user's consecutive N nights' heart rates can be obtained from the sequence of the user's consecutive M nights' heart rates each time the step 104 is performed.
[0028] After the sequence of the user's consecutive 90 nights' heart rates is obtained each time, a daily heart rate average of the user's consecutive 90 nights is calculated based on the sequence of the user's consecutive 90 nights' heart rates. Assuming that there are 3600 heart rate averages in a night heart rate sequence, an average of the 3600 heart rate averages can obtain a daily heart rate average. In summary, a night heart rate sequence can calculate a daily heart rate average, and the sequence of the user's consecutive 90 nights' heart rates can calculate 90 daily heart rate averages.
[0029] After the daily heart rate average of the user's consecutive 90 nights is calculated each time, K-means clustering is performed on the daily heart rate average of the user's consecutive 90 nights to obtain a plurality of first clustering clusters. K-means clustering is a prior art, and this embodiment only needs to call a K-means clustering function to perform K-means clustering on the 90 daily heart rate averages. Assuming that 2 first clustering clusters are obtained after K-means clustering is performed, the first first clustering cluster has 70 daily heart rate averages, and the second first clustering cluster has 20 daily heart rate averages.
[0030] After each first clustering cluster is obtained, the diurnal mean heart rate corresponding to the nocturnal heart rate sequence in each first clustering cluster needs to be K-shape clustered to obtain several second clustering clusters. K-shape clustering itself is prior art, and this embodiment only needs to call the K-shape clustering function to K-shape cluster the 70 nocturnal heart rate sequences corresponding to the 70 diurnal mean heart rates in the first first clustering cluster, and call the K-shape clustering function to K-shape cluster the 20 nocturnal heart rate sequences corresponding to the 20 diurnal mean heart rates in the second first clustering cluster. Assuming that after K-shape clustering the first first clustering cluster, 2 second clustering clusters are obtained, wherein the first second clustering cluster has 60 diurnal mean heart rates, and the second second clustering cluster has 10 diurnal mean heart rates; after K-shape clustering the second first clustering cluster, 2 second clustering clusters are also obtained, wherein the third second clustering cluster has 15 diurnal mean heart rates, and the fourth second clustering cluster has 5 diurnal mean heart rates.
[0031] After each second clustering cluster is obtained, the sample proportion value of each second clustering cluster also needs to be calculated, and the second clustering cluster with the largest sample proportion value is determined as the normal mode cluster. Assuming that the sample proportion value calculated for the first second clustering cluster is 12 / 18; the sample proportion value calculated for the second second clustering cluster is 2 / 18; the sample proportion value calculated for the third second clustering cluster is 3 / 18; and the sample proportion value calculated for the fourth second clustering cluster is 1 / 18. Because the sample proportion value of the first second clustering cluster is the largest, the first second clustering cluster is determined as the normal mode cluster, and the second second clustering cluster, the third second clustering cluster, and the fourth second clustering cluster are other second clustering clusters.
[0032] After each normal mode cluster is determined, it is also necessary to determine whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster. In this embodiment, determining whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster specifically includes: Step 401. Calculate the average of all diurnal mean heart rates in the normal mode cluster to obtain a first average. The first second clustering cluster (i.e., the normal mode cluster) has 60 diurnal mean heart rates, and the first average can be obtained by averaging the 60 diurnal mean heart rates.
[0033] Step 402. Select a second clustering cluster from other second clustering clusters, calculate the average of all diurnal mean heart rates in the second clustering cluster to obtain a second average, calculate the difference between the second average and the first average to obtain a mean difference value, determine whether the mean difference value is greater than a mean difference threshold, if the mean difference value is greater than the mean difference threshold, the corresponding second clustering cluster is determined as an abnormal mode cluster; if the mean difference value is less than or equal to the mean difference threshold, the corresponding second clustering cluster is determined as a remaining second clustering cluster.
[0034] Since the other second cluster includes 3 second clusters (i.e. the 2nd second cluster, the 3rd second cluster, the 4th second cluster), step 402 needs to be executed for 3 times. Assuming that the 2nd second cluster (with 10 daily mean heart rate values) is selected when step 402 is executed for the 1st time, then the 10 daily mean heart rate values need to be averaged to obtain a second average value, and then the difference between the second average value and the first average value is calculated to obtain a mean difference value, and then the mean difference value is compared with the mean difference threshold value, if the mean difference value is greater than the mean difference threshold value, then the 2nd second cluster is determined as an abnormal mode cluster; otherwise, the 2nd second cluster is determined as a remaining second cluster. Assuming that the 3rd second cluster (with 15 daily mean heart rate values) is selected when step 402 is executed for the 2nd time, then the 15 daily mean heart rate values need to be averaged to obtain a second average value, and then the difference between the second average value and the first average value is calculated to obtain a mean difference value, and then the mean difference value is compared with the mean difference threshold value, if the mean difference value is greater than the mean difference threshold value, then the 3rd second cluster is determined as an abnormal mode cluster; otherwise, the 3rd second cluster is determined as a remaining second cluster. Assuming that the 4th second cluster (with 5 daily mean heart rate values) is selected when step 402 is executed for the 3rd time, then the 5 daily mean heart rate values need to be averaged to obtain a second average value, and then the difference between the second average value and the first average value is calculated to obtain a mean difference value, and then the mean difference value is compared with the mean difference threshold value, if the mean difference value is greater than the mean difference threshold value, then the 4th second cluster is determined as an abnormal mode cluster; otherwise, the 4th second cluster is determined as a remaining second cluster.
[0035] If the 2nd second cluster, the 3rd second cluster and the 4th second cluster are all determined as abnormal mode clusters, then the step of determining whether the other second cluster is an abnormal mode cluster based on the normal mode cluster ends. The present embodiment assumes that the 3rd second cluster is determined as an abnormal mode cluster, and the 2nd second cluster and the 4th second cluster are determined as remaining second clusters, then the step of determining whether the other second cluster is an abnormal mode cluster based on the normal mode cluster still needs to be executed.
[0036] In the present embodiment, the step of determining whether the other second cluster is an abnormal mode cluster based on the normal mode cluster further includes: Step 403. Select a daily mean heart rate value from the normal mode cluster, and determine the nighttime heart rate sequence corresponding to the daily mean heart rate value as the first nighttime heart rate sequence. Select a daily mean heart rate value from the 60 daily mean heart rate values of the 1st second cluster (i.e. the normal mode cluster), and the nighttime heart rate sequence corresponding to the daily mean heart rate value is already known, and directly determine the nighttime heart rate sequence as the first nighttime heart rate sequence.
[0037] Step 404. Selecting a second cluster from the remaining second clusters, selecting a daily average heart rate from the second cluster and determining a night heart rate sequence corresponding to the daily average heart rate as a second night heart rate sequence, calculating a dynamic time warping distance value based on the second night heart rate sequence and the first night heart rate sequence, determining whether the dynamic time warping distance value is greater than the distance threshold, if the dynamic time warping distance value is greater than the distance threshold, determining the corresponding second cluster as an abnormal mode cluster; if the dynamic time warping distance value is less than or equal to the distance threshold, determining the corresponding second cluster as the remaining second cluster.
[0038] Since the remaining second clusters include two second clusters (i.e., the second second cluster and the fourth second cluster), step 404 needs to be executed twice. Assuming that the second second cluster (with 10 daily average heart rates) is selected in the first execution of step 404, a daily average heart rate needs to be selected from the 10 daily average heart rates and the night heart rate sequence corresponding to the daily average heart rate is determined as a second night heart rate sequence, then the dynamic time warping distance value calculation function is called to obtain the dynamic time warping distance value of the first night heart rate sequence and the second night heart rate sequence, and then the dynamic time warping distance value is compared with the distance threshold, if the dynamic time warping distance value is greater than the distance threshold, the second second cluster is determined as an abnormal mode cluster; otherwise, the second second cluster is determined as the remaining second cluster. Assuming that the fourth second cluster (with 5 daily average heart rates) is selected in the second execution of step 404, a daily average heart rate needs to be selected from the 5 daily average heart rates and the night heart rate sequence corresponding to the daily average heart rate is determined as a second night heart rate sequence, then the dynamic time warping distance value calculation function is called to obtain the dynamic time warping distance value of the first night heart rate sequence and the second night heart rate sequence, and then the dynamic time warping distance value is compared with the distance threshold, if the dynamic time warping distance value is greater than the distance threshold, the fourth second cluster is determined as an abnormal mode cluster; otherwise, the fourth second cluster is determined as the remaining second cluster.
[0039] If the second second cluster and the fourth second cluster are both determined as abnormal mode clusters, the step of determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster ends. The embodiment assumes that the fourth second cluster is determined as an abnormal mode cluster and the second second cluster is determined as the remaining second cluster, and the step of determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster needs to be continued.
[0040] In the embodiment, the step of determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster further includes: Step 405. Calculate the standard deviation of all the daily average heart rates in the normal mode cluster to obtain a first standard deviation value. The first second cluster (i.e. the normal mode cluster) has 60 daily average heart rates, so calculating the standard deviation of these 60 daily average heart rates can obtain the first standard deviation value.
[0041] Step 406. Select a second cluster from the remaining second clusters, calculate the standard deviation of all the daily average heart rates in the second cluster to obtain a second standard deviation value, calculate the difference between the second standard deviation value and the first standard deviation value to obtain a standard difference value, determine whether the standard difference value is greater than a standard difference threshold value, if the standard difference value is greater than the standard difference threshold value, determine whether the sample proportion value of the second cluster is greater than a proportion threshold value, if the sample proportion value is greater than the proportion threshold value, determine the corresponding second cluster as an abnormal mode cluster.
[0042] Since the remaining second clusters include one second cluster (i.e. the second second cluster), step 406 only needs to be executed once. When the first execution of step 406 selects the second second cluster (which has 10 daily average heart rates), it is necessary to first calculate the standard deviation of these 10 daily average heart rates to obtain a second standard deviation value, then calculate the difference between the second standard deviation value and the first standard deviation value to obtain a standard difference value, and then compare the standard difference value with the standard difference threshold value. If the standard difference value is greater than the standard difference threshold value, further compare the sample proportion value of the second second cluster (which has been calculated in the previous step) with the proportion threshold value. If the sample proportion value is greater than the proportion threshold value, determine the second second cluster as an abnormal mode cluster. In this embodiment, it is assumed that the standard difference value of the second second cluster is less than the standard difference threshold value, so the second second cluster is not determined as an abnormal mode cluster.
[0043] At this point, the step of determining whether other second clusters are abnormal mode clusters based on the normal mode cluster has been completed. In this embodiment, the third second cluster and the fourth second cluster in the other second clusters are determined as abnormal mode clusters, and the second second cluster is not an abnormal mode cluster, so step 104 will also determine the second second cluster as a normal mode cluster. At this time, the normal mode cluster has 70 daily average heart rates (combining the 60 daily average heart rates in the first second cluster and the 10 daily average heart rates in the second second cluster), and the abnormal mode cluster has 20 daily average heart rates (combining the 15 daily average heart rates in the third second cluster and the 5 daily average heart rates in the fourth second cluster).
[0044] After each determination of the normal mode cluster and the abnormal mode cluster, a dual-mode clustering map is also needed to be formed based on the normal mode cluster and the abnormal mode cluster. The average diurnal heart rate of the normal mode cluster is determined according to the average diurnal heart rate of the normal mode cluster, and the density estimation of the night heart rate sequence of the normal mode cluster in the time dimension is performed, so as to obtain the normal heart rate distribution density map of the heart rate change over time. At the same time, the average diurnal heart rate of the abnormal mode cluster is determined according to the average diurnal heart rate of the abnormal mode cluster, and the density estimation of the night heart rate sequence of the abnormal mode cluster in the time dimension is performed, so as to obtain the abnormal heart rate distribution density map of the heart rate change over time. The horizontal axis of the heart rate distribution density map represents the sleep process (from falling asleep to waking up), the vertical axis is the heart rate value (bpm), the color depth reflects the heart rate distribution density, and the cluster center curve is marked on the map with a dashed line to reflect the morphology of the corresponding mode. The normal heart rate distribution density map and the abnormal heart rate distribution density map are displayed side by side (the vertical axis range is unified), that is, a dual-mode clustering map with comparability is formed, as shown in Figure 4
[0045] After each determination of the normal mode cluster and the abnormal mode cluster, a dual-mode clustering map is also needed to be formed based on the normal mode cluster and the abnormal mode cluster. The average diurnal heart rate of the normal mode cluster is determined according to the average diurnal heart rate of the normal mode cluster, and the density estimation of the night heart rate sequence of the normal mode cluster in the time dimension is performed, so as to obtain the normal heart rate distribution density map of the heart rate change over time. At the same time, the average diurnal heart rate of the abnormal mode cluster is determined according to the average diurnal heart rate of the abnormal mode cluster, and the density estimation of the night heart rate sequence of the abnormal mode cluster in the time dimension is performed, so as to obtain the abnormal heart rate distribution density map of the heart rate change over time. The horizontal axis of the heart rate distribution density map represents the sleep process (from falling asleep to waking up), the vertical axis is the heart rate value (bpm), the color depth reflects the heart rate distribution density, and the cluster center curve is marked on the map with a dashed line to reflect the morphology of the corresponding mode. The normal heart rate distribution density map and the abnormal heart rate distribution density map are displayed side by side (the vertical axis range is unified), that is, a dual-mode clustering map with comparability is formed, as shown in Figure 4
[0045] In this embodiment, the mode feature vector is obtained based on the normal mode cluster and the abnormal mode cluster, and specifically includes: The normal proportion value, the normal mean value, and the normal standard deviation value are calculated based on the normal mode cluster, the abnormal proportion value, the abnormal mean value, and the abnormal standard deviation value are calculated based on the abnormal mode cluster, the inter-mode difference value is calculated based on the normal mode cluster and the abnormal mode cluster, and the normal proportion value, the normal mean value, the normal standard deviation value, the abnormal proportion value, the abnormal mean value, the abnormal standard deviation value, and the inter-mode difference value are combined to form the mode feature vector. The normal proportion value is the number of diurnal heart rate average values in the normal mode cluster divided by the total number of diurnal heart rate average values. The abnormal proportion value is the number of diurnal heart rate average values in the abnormal mode cluster divided by the total number of diurnal heart rate average values. The normal mean value is the average of the diurnal heart rate average values in the normal mode cluster. The abnormal mean value is the average of the diurnal heart rate average values in the abnormal mode cluster. The normal standard deviation value is the standard deviation of the diurnal heart rate average values in the normal mode cluster. The abnormal standard deviation value is the standard deviation of the diurnal heart rate average values in the abnormal mode cluster. The normal cluster center curve and the abnormal cluster center curve can be obtained through the dual-mode clustering map, and the inter-mode difference value can be obtained by calculating the dynamic time warping distance value based on the normal cluster center curve and the abnormal cluster center curve.
[0046] After multiple executions of step 104, multiple dual-mode clustering maps and multiple mode feature vectors can be obtained.
[0047] Referring to Figure 1As shown, the method 100 in this embodiment also includes: Step 106. Form a three-dimensional pattern graph based on a plurality of dual-mode clustering graphs; form a mode feature vector sequence based on a plurality of mode feature vectors; obtain user auxiliary information; input the three-dimensional pattern graph, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, and the multi-modal deep learning network generates a health state representation vector based on the three-dimensional pattern graph, the mode feature vector sequence, and the user auxiliary information, and the multi-modal deep learning network outputs an individual health state label based on the health state representation vector.
[0048] Stacking a plurality of dual-mode clustering graphs can obtain a three-dimensional pattern graph, which directly uses existing technologies. Arranging a plurality of mode feature vectors in order can obtain a mode feature vector sequence, for example, the mode feature vector sequence is , wherein, is the first mode feature vector, is the second mode feature vector, and each mode feature vector includes a normal state proportion value, a normal state mean value, a normal state standard deviation value, an abnormal state proportion value, an abnormal state mean value, an abnormal state standard deviation value, and a mode difference value.
[0049] The multi-modal deep learning network has been trained in advance, and when used, only the three-dimensional pattern graph, the mode feature vector sequence, and the user auxiliary information need to be input into the multi-modal deep learning network. The multi-modal deep learning network can process the input three-dimensional pattern graph through its internal three-dimensional pattern graph processing module, process the input mode feature vector sequence through its internal mode feature vector sequence processing module, and process the input user auxiliary information through its internal user auxiliary information processing module. Finally, the processing results of the three modules are fused at the feature layer through a multi-modal feature fusion and prediction module, the weighted combination of multi-modal information is realized through an attention mechanism, and then a unified health state representation vector is generated, and an individual health state label (which can be an abnormal change time node or a risk level) is output through a classification or regression layer, thereby realizing early warning of potential health risks and long-term tracking of individual health.
[0050] When the individual health state label output by the multi-modal deep learning network shows that the user has a health problem, the individual health state label can be input into a label interpretation module (including a pre-constructed label library and a pre-trained label interpretation model), and the label interpretation module can output potential physiological or psychological reasons and intervention measures and behavior suggestions to generate a personalized improvement plan (including work and rest adjustment, exercise plan, sleep optimization, etc.) for the user.
[0051] Figure 2A block diagram of a time series-based government data processing apparatus 200 of an embodiment of the application is shown. The apparatus 200 includes a night heart rate sequence acquisition module 202 configured to acquire a night heart rate sequence of a user for M consecutive days; a dual-mode clustering map and mode feature vector acquisition module 204 configured to acquire a night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days; calculate a daily average heart rate of the user for N consecutive days based on the night heart rate sequence of the user for N consecutive days; perform K-means clustering on the daily average heart rate of the user for N consecutive days to obtain a plurality of first clustering clusters; perform K-shape clustering on the night heart rate sequence corresponding to the daily average heart rate in each first clustering cluster to obtain a plurality of second clustering clusters; calculate a sample proportion value of each second clustering cluster and determine a second clustering cluster with the largest sample proportion value as a normal mode cluster; determine whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster, if there is a second clustering cluster that is not an abnormal mode cluster in the other second clustering clusters, then the corresponding second clustering cluster is also determined as a normal mode cluster; form a dual-mode clustering map based on the normal mode cluster and the abnormal mode cluster, and acquire a mode feature vector based on the normal mode cluster and the abnormal mode cluster; a health status label acquisition module 206 configured to form a three-dimensional mode map based on a plurality of dual-mode clustering maps; form a mode feature vector sequence based on a plurality of mode feature vectors; acquire user auxiliary information; input the three-dimensional mode map, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, the multi-modal deep learning network generates a health status representation vector based on the three-dimensional mode map, the mode feature vector sequence, and the user auxiliary information, and the multi-modal deep learning network outputs an individual health status label based on the health status representation vector.
[0052] Figure 3 A block diagram of an electronic device 300 of some embodiments of the application is shown. The device 300 includes a processor 301, which can perform various appropriate actions and processes according to computer program instructions loaded into a random access memory (RAM) 303 from a computer program instructions stored in a read-only memory (ROM) 302. In the RAM 303, various programs and data required for the operation of the device 300 can also be stored. The processor 301, the ROM 302, and the RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.
[0053] The various processes and processes described above, such as the method 100, can be performed by the processor 301. For example, in some embodiments, the method 100 can be implemented as a software program tangibly embodied in a machine-readable medium. In some embodiments, some or all of the software program can be loaded and / or installed onto the device 300 via the ROM 302. When the software program is loaded onto the RAM 303 and executed by the processor 301, one or more acts of the method 100 described above can be performed.
[0054] The functions outlined herein above can be performed at least in part by one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program- specific Integrated Circuits (ASICs), Program- specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0055] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces a means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. The program code can be retrieved from a machine-readable medium, loaded onto the machine, and executed by the machine. The machine can be a general purpose computer, a special purpose computer, or another programmable data processing apparatus to produce a means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. Program code can be stored in a machine-readable medium, which can be any available medium that can be accessed by a general purpose computer or a special purpose computer, or other programmable data processing apparatus. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in a machine- readable format. Program code stored in a machine-readable medium can be executed by a general purpose computer or a special purpose computer, or other programmable data processing apparatus, to produce a means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0056] The present application can be a method, an apparatus, a system, and / or a program product. The program product can include a machine-readable medium having machine-readable program instructions stored therein to implement various aspects of the present application. The machine-readable program instructions described herein can be downloaded to various computing / processing devices from a machine-readable medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives machine-readable program instructions from the network and forwards the machine-readable program instructions to a machine-readable medium within the each computing / processing device for storage and / or installation.
[0057] Machine program instructions for performing operations of the present application can be assembly instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The machine readable program instructions may, in entirety, be executed on a user's computer, executed partially on a user's computer, executed as a standalone software package, executed partially on a user's computer and partially on a remote computer, or executed entirely on a remote computer or server. In situations
[0058] In the context of the present application, a machine-readable medium can be a tangible medium that can contain or store program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable storage medium can include, but are not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium would include a wired or wireless electrical connection, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. Further, while operations are depicted in a particular, chronological order, this should not be understood as requiring such order or sequence of operations, or that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, while specific implementations are discussed, these should not be understood to limit the scope of the present application. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.
[0059] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A health status change recognition method based on a timing heart rate pattern, characterized by, The method comprises the following steps: obtaining a night heart rate sequence of a user for M consecutive days; obtaining a night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days; calculating a daily heart rate average value of the user for N consecutive days based on the night heart rate sequence of the user for N consecutive days; performing K-means clustering on the daily heart rate average value of the user for N consecutive days to obtain a plurality of first clustering clusters; performing K-shape clustering on the night heart rate sequence corresponding to the daily heart rate average value in each first clustering cluster to obtain a plurality of second clustering clusters; calculating a sample proportion value of each second clustering cluster and determining the second clustering cluster with the largest sample proportion value as a normal mode cluster; determining whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster, and if there is a second clustering cluster that is not an abnormal mode cluster in the other second clustering clusters, the corresponding second clustering cluster is also determined as a normal mode cluster; forming a dual-mode clustering graph based on the normal mode cluster and the abnormal mode cluster, and obtaining a mode feature vector based on the normal mode cluster and the abnormal mode cluster; forming a three-dimensional mode graph based on a plurality of dual-mode clustering graphs; forming a mode feature vector sequence based on a plurality of mode feature vectors; obtaining user auxiliary information; inputting the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, the multi-modal deep learning network generating a health state representation vector based on the three-dimensional mode graph, the mode feature vector sequence, and the user auxiliary information, and the multi-modal deep learning network outputting an individual health state label based on the health state representation vector.
2. The method of claim 1, wherein, The method comprises the following steps: collecting the night heart rate of the user from falling asleep to waking up, and filtering the night heart rate; segmenting the filtered night heart rate by time, and calculating the heart rate average value of each time segment based on the night heart rate of each time segment, and taking all the heart rate average values of the user from falling asleep to waking up as a night heart rate sequence.
3. The method of claim 2, wherein, The method comprises the following steps: setting a sliding window with a length of N days, determining the current starting position of the sliding window in the night heart rate sequence of the user for M consecutive days, and obtaining the night heart rate sequence of the user for N consecutive days from the night heart rate sequence of the user for M consecutive days based on the sliding window with the determined current starting position; wherein the current starting position is determined by adding a step value to the last starting position of the sliding window in the night heart rate sequence of the user for M consecutive days, and if there is no last starting position, the current starting position is the first night heart rate sequence.
4. The method of claim 1, wherein, The method comprises the following steps: calculating the average value of all daily heart rate average values in the normal mode cluster to obtain a first average value; selecting a second cluster from the other second clusters, calculating an average of all mean diurnal heart rates in the second cluster to obtain a second average value, calculating a difference between the second average value and the first average value to obtain a mean difference value, determining whether the mean difference value is greater than a mean difference threshold value, if the mean difference value is greater than the mean difference threshold value, determining the corresponding second cluster as an abnormal mode cluster, if the mean difference value is less than or equal to the mean difference threshold value, determining the corresponding second cluster as a remaining second cluster.
5. The method of claim 4, wherein, Determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster further includes: selecting a mean diurnal heart rate from the normal mode cluster, and determining a night heart rate sequence corresponding to the mean diurnal heart rate as a first night heart rate sequence; selecting a second cluster from the remaining second clusters, selecting a mean diurnal heart rate from the second cluster, and determining a night heart rate sequence corresponding to the mean diurnal heart rate as a second night heart rate sequence, calculating a dynamic time warping distance value based on the second night heart rate sequence and the first night heart rate sequence, determining whether the dynamic time warping distance value is greater than a distance threshold value, if the dynamic time warping distance value is greater than the distance threshold value, determining the corresponding second cluster as an abnormal mode cluster, if the dynamic time warping distance value is less than or equal to the distance threshold value, determining the corresponding second cluster as a remaining second cluster.
6. The method of claim 5, wherein, Determining whether the other second clusters are abnormal mode clusters based on the normal mode cluster further includes: calculating a standard deviation of all mean heart rates in the normal mode cluster to obtain a first standard deviation value; selecting a second cluster from the remaining second clusters, calculating a standard deviation of all mean diurnal heart rates in the second cluster to obtain a second standard deviation value, calculating a difference between the second standard deviation value and the first standard deviation value to obtain a standard difference value, determining whether the standard difference value is greater than a standard difference threshold value, if the standard difference value is greater than the standard difference threshold value, determining whether a sample proportion value of the second cluster is greater than a proportion threshold value, if the sample proportion value is greater than the proportion threshold value, determining the corresponding second cluster as an abnormal mode cluster.
7. The method of claim 1, wherein, Obtaining a mode feature vector based on the normal mode cluster and the abnormal mode cluster includes: calculating a normal proportion value, a normal mean value, and a normal standard deviation value based on the normal mode cluster, calculating an abnormal proportion value, an abnormal mean value, and an abnormal standard deviation value based on the abnormal mode cluster, calculating a mode difference value based on the normal mode cluster and the abnormal mode cluster, and combining the normal proportion value, the normal mean value, the normal standard deviation value, the abnormal proportion value, the abnormal mean value, the abnormal standard deviation value, and the mode difference value to form a mode feature vector.
8. A health state change recognition apparatus based on a timing heart rate pattern, characterized by including: a night heart rate sequence acquisition module configured to acquire night heart rate sequences of a user for M consecutive days; The dual-mode clustering map and mode feature vector obtaining module is configured to obtain a user's night heart rate sequence for consecutive N days from the user's night heart rate sequence for consecutive M days; calculate the user's daily heart rate average for consecutive N days based on the user's night heart rate sequence for consecutive N days; perform K-means clustering on the user's daily heart rate average for consecutive N days to obtain a plurality of first clustering clusters; perform K-shape clustering on the night heart rate sequence corresponding to the daily heart rate average in each first clustering cluster to obtain a plurality of second clustering clusters; calculate the sample proportion value of each second clustering cluster and determine the second clustering cluster with the largest sample proportion value as the normal mode cluster; determine whether other second clustering clusters are abnormal mode clusters based on the normal mode cluster, and if there is a second clustering cluster that is not an abnormal mode cluster in the other second clustering clusters, the corresponding second clustering cluster is also determined as a normal mode cluster; form a dual-mode clustering map based on the normal mode cluster and the abnormal mode cluster, and obtain a mode feature vector based on the normal mode cluster and the abnormal mode cluster; The health status label obtaining module is configured to form a three-dimensional mode map based on a plurality of dual-mode clustering maps; form a mode feature vector sequence based on a plurality of mode feature vectors; obtain user auxiliary information; input the three-dimensional mode map, the mode feature vector sequence, and the user auxiliary information into a multi-modal deep learning network, the multi-modal deep learning network generates a health status representation vector based on the three-dimensional mode map, the mode feature vector sequence, and the user auxiliary information, and the multi-modal deep learning network outputs an individual health status label based on the health status representation vector.
9. A computer program product, characterised in that, The computer program is executed by a processor to implement the steps of the method of any one of claims 1-7.
10. An electronic device, comprising: The computer program is executed by a processor to implement the steps of the method of any one of claims 1-7. The computer program is executed by a processor to implement the steps of the method of any one of claims 1-7.
