Sleep state detection method and device, electronic equipment, storage medium and computer program product

By collecting physiological parameters during the nocturnal period and calculating the posterior probability of non-restorative sleep using the kernel density estimation function, the problem of high cost of identifying non-restorative sleep in the prior art is solved, and low-cost sleep state assessment and day-night evaluation are achieved Rhythm abnormal recognition.

CN119302611APending Publication Date: 2025-01-14SOUTHWEST UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411440086.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify non-restorative sleep at low cost, and wearing EEG collection equipment is expensive and is not suitable for general promotion.

Method used

The wearable device collects physiological parameters during the nocturnal period, uses the kernel density estimation function and prior probability to calculate the posterior probability of non-restorative sleep, and combines sleep quality and behavioral habit scores to determine the sleep state.

Benefits of technology

It realizes effective identification of non-restorative sleep at low cost, provides sleep quality and behavioral habit scores, helps identify circadian abnormalities, and promotes early intervention and health management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119302611A_ABST
    Figure CN119302611A_ABST
Patent Text Reader

Abstract

The invention provides a sleep state detection method and device, electronic equipment, a storage medium and a computer program product, and the method comprises the steps: obtaining specified physiological parameters of wearable equipment of a target user in a plurality of time slots of a night rhythm period, and converting a specified sample value of the time slot based on the specified physiological parameter of each time slot; sorting the specified sample values of the plurality of time slots of the night rhythm period according to the size to obtain the sorted specified sample values of the plurality of time slots; for each time slot, determining the posterior probability of the non-restorative sleep of the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to the sorting position of the time slot, a prior probability estimation value of the non-restorative sleep and a prior probability estimation value of the restorative sleep; and determining the sleep state of the target user in the night rhythm period according to the posterior probability of the non-restorative sleep of the plurality of time slots in the night rhythm period. According to the scheme, detection of the sleep state is achieved with low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical data processing technology, and in particular to a sleep state detection method and device, electronic equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Wearable devices (such as electrocardiograph clothing, heart rate belts, smart bracelets, smart watches, etc.) can collect the wearer's physiological parameters in real time, and the collected physiological parameters can be used to evaluate the wearer's physical condition. The most common evaluation demand at present is the identification of the wearer's sleep state. In modern society, with the increasing pressure of life and work, non-restorative sleep has become an important factor affecting people's health. Non-restorative sleep refers to sleep with poor quality despite sufficient sleep time. In this case, you still feel tired after waking up, and you cannot achieve the desired physical and mental recovery effect, which has a significant impact on your mental and physical health.

[0003] In related solutions, non-restorative sleep can be identified by monitoring brain waves. However, this identification method of wearing EEG acquisition equipment is expensive and not suitable for general home users. At present, a convenient and fast method for quantitative detection of sleep status is urgently needed. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a sleep state detection method and device, electronic device, computer-readable storage medium, and computer program product, which are used to detect the sleep state at a relatively low cost.

[0005] On the one hand, the present application provides a method for detecting a sleep state, comprising:

[0006] Obtaining designated physiological parameters of a wearable device of a target user in multiple time slots during a night rhythm period, and converting designated sample values ​​of each time slot based on the designated physiological parameters of the time slot; wherein the designated sample value is a parameter for quantifying the degree of activation of the parasympathetic nerve;

[0007] Sorting the designated sample values ​​of the multiple time slots in the night rhythm period according to size to obtain the designated sample values ​​of the multiple time slots after sorting;

[0008] For each time slot, determining the posterior probability of non-restorative sleep in the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to a sorted position of the time slot, a prior probability estimation value of non-restorative sleep, and a prior probability estimation value of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep;

[0009] The sleep state of the target user in the nocturnal rhythm period is determined according to the posterior probabilities of non-restorative sleep in the multiple time slots of the nocturnal rhythm period.

[0010] In one embodiment, determining the sleep state of the target user in the nocturnal rhythm period according to the posterior probabilities of non-restorative sleep in multiple time slots of the nocturnal rhythm period includes:

[0011] Determine a sleep quality score according to the proportion of time slots in which the posterior probability of non-restorative sleep in a first interval within the nocturnal rhythm period is greater than a preset probability threshold; wherein the first interval includes a preset first number of time slots in front of a specified sample value;

[0012] Determine a sleep behavior habit score according to the proportion of time slots in which the posterior probability of non-restorative sleep in a second interval within the nocturnal rhythm period is greater than the probability threshold; wherein the second interval includes time slots in the nocturnal rhythm period other than the first interval;

[0013] The sleep state of the target user in the nocturnal rhythm period is determined according to the sleep quality score and the sleep behavior habit score.

[0014] In one embodiment, the sleep state includes poor sleep quality indicated by the sleep quality score; or, the sleep state includes good sleep quality indicated by the sleep quality score, and good sleep behavior habits indicated by the sleep behavior habit score; or, the sleep state includes good sleep quality indicated by the sleep quality score, and poor sleep behavior habits indicated by the sleep behavior habit score.

[0015] In one embodiment, the method further comprises:

[0016] If the target user has a problem of poor sleep quality in the sleep state of a specified number of consecutive night rhythm periods, it is determined that the target user has chronic non-restorative sleep symptoms.

[0017] In one embodiment, before determining the posterior probability of non-restorative sleep in each time slot based on the specified sample value of the time slot, the first kernel density estimation function and the second kernel density estimation function corresponding to the sorting position of the time slot, the prior probability estimation value of non-restorative sleep, and the prior probability estimation value of restorative sleep for each time slot, the method further includes:

[0018] Acquire the designated physiological parameters of multiple time slots of multiple sample users in the non-restorative sleep group during the night rhythm period, and convert the designated sample value of each time slot based on the designated physiological parameters of each time slot of each sample user;

[0019] For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user;

[0020] Dividing the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users;

[0021] For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, a first kernel density estimation function corresponding to the sorting position m is fitted; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0022] In one embodiment, before determining the posterior probability of non-restorative sleep in each time slot based on the specified sample value of the time slot, the first kernel density estimation function and the second kernel density estimation function corresponding to the sorting position of the time slot, the prior probability estimation value of non-restorative sleep, and the prior probability estimation value of restorative sleep for each time slot, the method further includes:

[0023] Acquire the designated physiological parameters of multiple time slots of multiple sample users in the restorative sleep group during the night rhythm period, and convert the designated sample value of each time slot based on the designated physiological parameters of each time slot of each sample user;

[0024] For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user;

[0025] Dividing the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users;

[0026] For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, a second kernel density estimation function corresponding to the sorting position m is fitted; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0027] On the other hand, the present application provides a sleep state detection device, comprising:

[0028] A conversion module, used to obtain the specified physiological parameters of the wearable device of the target user in multiple time slots during the night rhythm period, and convert the specified sample value of each time slot based on the specified physiological parameters of the time slot; wherein the specified sample value is a parameter for quantifying the degree of parasympathetic nerve activation;

[0029] A sorting module, used for sorting the designated sample values ​​of the multiple time slots in the nocturnal rhythm period according to the size, to obtain the designated sample values ​​of the multiple time slots after sorting;

[0030] a determination module, configured to determine, for each time slot, a posterior probability of non-restorative sleep in the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to a sorted position of the time slot, a prior probability estimation value of non-restorative sleep, and a prior probability estimation value of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep;

[0031] The detection module is used to determine the sleep state of the target user in the nocturnal rhythm period according to the posterior probability of non-restorative sleep in multiple time slots of the nocturnal rhythm period.

[0032] Furthermore, the present application provides an electronic device, the electronic device comprising:

[0033] processor;

[0034] a memory for storing processor-executable instructions;

[0035] Wherein, the processor is configured to execute the above-mentioned sleep state detection method.

[0036] Furthermore, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can be executed by a processor to complete the above-mentioned sleep state detection method.

[0037] In addition, the present application provides a computer program product, including a computer program / instruction, which implements the above-mentioned sleep state detection method when executed by a processor.

[0038] This application scheme uses relatively low-cost wearable devices to collect the target user's specified physiological parameters during the night rhythm period. Through corresponding processing, the target user's sleep state during the night rhythm period can be determined, and non-restorative sleep can be effectively identified at a low cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.

[0040] Figure 1 A schematic diagram of an application scenario of a sleep state detection method provided in an embodiment of the present application;

[0041] Figure 2 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application;

[0042] Figure 3 A schematic diagram showing a comparison of parasympathetic nerve activation levels between a restorative sleep group and a non-restorative sleep group provided in an embodiment of the present application;

[0043] Figure 4 A flowchart of a sleep state detection method provided in an embodiment of the present application;

[0044] Figure 5 An embodiment of the present application provides Figure 4 Detailed flow chart of step 440;

[0045] Figure 6 A schematic diagram showing a comparison of the posterior probabilities of non-restorative sleep between restorative sleep data and non-restorative sleep data provided in an embodiment of the present application;

[0046] Figure 7 A schematic diagram of non-restorative sleep data provided by an embodiment of the present application;

[0047] Figure 8 A schematic diagram of non-restorative sleep data provided by another embodiment of the present application;

[0048] Fig. 9 A schematic diagram of non-restorative sleep data provided by another embodiment of the present application;

[0049] Fig.10 A schematic diagram of a flow chart of a method for generating a first kernel density estimation function provided in an embodiment of the present application;

[0050] Fig.11 A schematic diagram of a flow chart of a method for generating a second kernel density estimation function provided in an embodiment of the present application;

[0051] Fig.12 A schematic diagram of the fitting effect of the kernel density estimation function provided in one embodiment of the present application;

[0052] Fig.13 A block diagram of a sleep state detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0054] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0055] Figure 1 Schematic diagram of an application scenario of the sleep state detection method provided in the embodiment of the present application. Figure 1 As shown, the application scenario includes a client 20 and a server 30; the client 20 can be a wearable device such as an electrocardiograph, a heart rate belt, a smart bracelet, a smart watch, etc., which is used to send specified physiological parameters collected during the night rhythm period to the server 30; the server 30 can be a host, a tablet computer, a mobile phone, a server, a server cluster or a cloud computing center, which can detect the sleep state of the target user based on the specified physiological parameters fed back by the client.

[0056] like Figure 2 As shown, this embodiment provides an electronic device 1, including: at least one processor 11 and a memory 12, Figure 2 A processor 11 is taken as an example. The processor 11 and the memory 12 are connected via a bus 10. The memory 12 stores instructions that can be executed by the processor 11. The instructions are executed by the processor 11 so that the electronic device 1 can execute all or part of the process of the method in the following embodiment. In one embodiment, the electronic device 1 can be the above-mentioned server 30, which is used to execute the sleep state detection method.

[0057] The memory 12 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.

[0058] The present application also provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by the processor 11 to complete the sleep state detection method provided by the present application.

[0059] The present application also provides a computer program product, including a computer program / instruction, which implements the sleep state detection method provided in the present application when the computer program / instruction is executed by a processor.

[0060] The human biological clock is regulated by the suprachiasmatic nucleus (SCN) in the brain, which is responsible for controlling circadian rhythm regulation, including sleep and wake cycles. The normal night rhythm sleep cycle promotes physiological repair at night to ensure that physiological and psychological activities during the day are full of energy. However, non-restorative sleep is often associated with circadian rhythm disorders, which may lead to a weakened sleep recovery effect and lack of energy during daytime activities. By detecting non-restorative sleep states, circadian rhythm abnormalities can be effectively identified, which is conducive to early intervention of abnormal circadian rhythms. Studies have shown that people with non-restorative sleep usually show problems such as difficulty falling asleep, going to bed early or poor sleep quality. Long-term non-restorative sleep is causally related to depression and anxiety. Therefore, by identifying non-restorative sleep, circadian rhythm abnormalities can be revealed, thereby providing a scientific basis for clinical diagnosis and intervention, and helping to prevent and improve physical and mental diseases caused by circadian rhythm abnormalities.

[0061] This solution collects the user's specified physiological parameters in multiple time slots during the night rhythm period through wearable devices, and converts the specified physiological parameters into specified sample values ​​for quantifying the degree of parasympathetic nerve activation, and evaluates the user's sleep state with the specified sample values. Among them, the night rhythm period can be configured based on experience. For example, 0:00 to 7:00 at night can be used as the night rhythm period, and a night rhythm period can be divided into multiple non-overlapping time slots. The length of each time slot is configured as needed. For example, a night rhythm period can be divided into time slots of 5 minutes in length, so that 84 time slots can be obtained. In this case, each user can obtain a specified sample value in a night rhythm period.

[0062] The designated physiological parameters can be selected according to the hardware and software conditions of the wearable device and the business requirements. For example, the designated physiological parameters can be dynamic electrocardiogram signals, heartbeat interval sequences, etc. The designated sample values ​​can be the mean of heartbeat intervals, the total power of a specific sub-band, the high frequency power spectrum (HF) characteristics of the heartbeat rhythm (for example, the total power of 0.15 to 0.4 Hz), etc.

[0063] There are differences in the size of the specified sample values ​​between people who had restorative sleep and those who had non-restorative sleep. Figure 3 , which is a schematic diagram comparing the parasympathetic nerve activation levels of the restorative sleep group and the non-restorative sleep group provided in one embodiment of the present application, such as Figure 3As shown, the restorative sleep group includes multiple people who perceive themselves as restorative sleep, and the non-restorative sleep group includes multiple people who perceive themselves as non-restorative sleep. The designated sample values ​​of the individuals in the restorative sleep group in each time slot during the nocturnal rhythm period are arranged from left to right in order from high to low. After sorting, the sequence numbers of the designated sample values ​​correspond to the time slot numbers from left to right. Since the restorative sleep group consists of multiple people, each person has a designated sample value in each time slot number, and the distribution of the designated sample values ​​of multiple people in a single time slot is plotted as Figure 3 Box plots of the recovery sleep group. The horizontal axis of each box plot corresponds to a time slot, and each time slot has its corresponding box plot from left to right; the vertical axis corresponds to the size of the high-frequency power spectrum (HF) feature as the specified sample value.

[0064] The designated sample values ​​of each time slot of a single person in the non-restorative sleep group during the nocturnal rhythm period are arranged from left to right in order from high to low, and the sequence numbers of the designated sample values ​​after sorting correspond to the time slot numbers from left to right. Since the restorative sleep group consists of multiple people, each person has a designated sample value in each time slot number, and the distribution of the designated sample values ​​of multiple people in a single time slot is plotted as Figure 3 Box plots of non-restorative sleep in the middle, the horizontal axis of each box plot corresponds to a time slot, and each time slot from left to right has its corresponding box plot; the vertical axis corresponds to the size of the high-frequency power spectrum (HF) feature as the specified sample value.

[0065] from Figure 3 It can be seen that the high-frequency power spectrum characteristics of the non-restorative sleep group are significantly smaller than those of the restorative sleep group, indicating that the people in the non-restorative sleep group have insufficient parasympathetic nerve activation during the nocturnal rhythm period. Existing studies have confirmed that the function of parasympathetic nerve activation is to promote organ rest and recovery. The above comparison results are consistent with existing studies, indicating that this scheme will analyze the effectiveness and reliability of sleep recovery effects by sorting designated sample values ​​according to parasympathetic nerve activation. With the help of the sorting of parasympathetic nerve activation during the nocturnal rhythm period, problems such as difficulty falling asleep, early awakening, frequent sleep interruptions, and poor sleep and rest effects are all quantified as insufficient parasympathetic nerve activation. In addition, by sorting the parasympathetic nerve activation during the nocturnal rhythm period, differences in rest behavior between individuals will not affect the horizontal comparability of the data.

[0066] See also Figure 4 , is a flow chart of a sleep state detection method provided in an embodiment of the present application, such as Figure 4 As shown, the method may include the following steps 410 to 430.

[0067] Step 410: Obtain the specified physiological parameters of the target user's wearable device in multiple time slots during the night rhythm period, and convert the specified sample value of each time slot based on the specified physiological parameters of the time slot to obtain the specified sample values ​​of multiple time slots during the night rhythm period; wherein the specified sample value is a parameter for quantifying the degree of parasympathetic nerve activation.

[0068] The target users are those who need to perform sleep status detection. The target users need to wear at least one wearable device, which can be an electrocardiogram clothing, a heart rate belt, a smart bracelet, a smart watch, etc.

[0069] The night rhythm period can be configured as needed. For example, the night rhythm period can be set to 0:00 to 7:00 at night, or another time period can be customized as the night rhythm period according to the sleep habits of the target user. The length of the night rhythm period set in this solution is fixed. The length of the time slot can be configured based on experience. For example, the length of the time slot is 5 minutes, and a night rhythm period can be divided into 84 time slots.

[0070] The wearable device can collect the designated physiological parameters of the target user in multiple time slots during the night rhythm period and transmit them to the server. The server can convert the designated sample value of each time slot based on the designated physiological parameters of the time slot. The designated physiological parameters and designated sample values ​​can be selected as needed, and the conversion method refers to the existing calculation rules and is not limited here. The calculated designated sample value can quantify the degree of parasympathetic nerve activation. For example: the designated sample value is the aforementioned high-frequency power spectrum feature HF.

[0071] Step 420: sorting the designated sample values ​​of the multiple time slots in the night rhythm period according to size, and obtaining the designated sample values ​​of the multiple time slots after sorting.

[0072] After obtaining the designated sample values ​​of multiple time slots in the nocturnal rhythm period, the designated sample values ​​may be sorted in order from large to small or from small to large, thereby obtaining the designated sample values ​​of multiple time slots after sorting.

[0073] Step 430: For each time slot, determine the posterior probability of non-restorative sleep in the time slot based on the specified sample value of the time slot, the first kernel density estimation function and the second kernel density estimation function corresponding to the sorting position of the time slot, the prior probability estimate of non-restorative sleep, and the prior probability estimate of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep.

[0074] For any time slot, the corresponding first kernel density estimation function and second kernel density estimation function can be determined based on the sorting position of the time slot. The sorting positions of all time slots in the nocturnal rhythm period are pre-configured with the first kernel density estimation function and the second kernel density estimation function.

[0075] Exemplarily, the posterior probability of non-restorative sleep in any time slot can be expressed by the following formula (1):

[0076]

[0077] in, represents the posterior probability that the current time slot belongs to category j (j = 1 or 2, 1 represents non-restorative sleep, 2 represents restorative sleep) under the condition of the specified sample value x0 of the current time slot; represents the prior probability estimate of category j (j=1 or 2, 1 represents non-restorative sleep, 2 represents restorative sleep), the prior probability estimate of non-restorative sleep can be preset to 0.5, and the prior probability estimate of restorative sleep can be preset to 0.5; represents the prior probability estimate of category k (k = 1 and 2, 1 represents non-restorative sleep, 2 represents restorative sleep); It is the kernel density estimate of category j under the condition of the specified sample value x0, which is obtained by substituting the specified sample value x0 into the first kernel density estimation function Or the second kernel density estimation function We obtain that when calculating the posterior probability of non-restorative sleep, we select j = 1, that is, substitute it into the first kernel density estimation function It is the kernel density estimate of category k under the condition of the specified sample value x0, which is obtained by substituting the specified sample value x0 into the first kernel density estimation function and the second kernel density estimation function get.

[0078] When the prior probability estimate of non-restorative sleep is preset to 0.5 and the prior probability estimate of restorative sleep is preset to 0.5, the formula for calculating the posterior probability of non-restorative sleep in any time slot can be converted to the following formula (2):

[0079]

[0080] Step 440: Determine the sleep state of the target user in the nocturnal rhythm period according to the posterior probabilities of non-restorative sleep in multiple time slots in the nocturnal rhythm period.

[0081] After calculating the posterior probability that each time slot belongs to non-restorative sleep for multiple time slots in the nocturnal rhythm period, the sleep state of the target user in this nocturnal rhythm period can be determined based on the multiple posterior probabilities.

[0082] Through the above measures, with the help of relatively low-cost wearable devices, the specified physiological parameters of the target user during the night rhythm period can be collected. Through corresponding processing, the sleep state of the target user during the night rhythm period can be determined, and non-restorative sleep can be effectively identified at a low cost.

[0083] In one embodiment, see Figure 5 , provided in one embodiment of the present application Figure 4 The detailed flow chart of step 440 is as follows: Figure 5 As shown, when executing step 440, the following steps 510 to 530 may be executed.

[0084] Step 510: Determine a sleep quality score based on the proportion of time slots in which the posterior probability of non-restorative sleep in the first interval within the nocturnal rhythm period is greater than a preset probability threshold; wherein the first interval includes a preset first number of time slots with a specified sample value in front.

[0085] Here, the first number can be configured based on experience. For example, the night rhythm period includes 84 time slots in total, and 50% of 84, that is, 42, can be used as the first number. In this case, the 42 time slots with the largest designated sample values ​​after sorting are used as the first interval.

[0086] Here, the probability threshold can be configured empirically. Figure 6 , which is a schematic diagram of comparing the posterior probabilities of restorative sleep data and non-restorative sleep data in non-restorative sleep according to an embodiment of the present application, Figure 6 The horizontal axis represents multiple time slots when the parasympathetic nerve activation changes from high to low, and the vertical axis represents the posterior probability of non-restorative sleep. Figure 6 The restorative sleep data is the posterior probability of non-restorative sleep calculated based on the specified physiological parameters of the people in the restorative sleep group at multiple time slots. Figure 6The non-restorative sleep data in the non-restorative sleep group are the posterior probabilities of non-restorative sleep calculated based on the specified physiological parameters of the non-restorative sleep group in multiple time slots. Among them, the non-restorative sleep data showed a posterior probability of non-restorative sleep significantly greater than 0.5 in the time slots with relatively high parasympathetic activation, while the restorative sleep data showed a posterior probability of non-restorative sleep significantly less than 0.5 in most time slots. In the two time slots with the weakest parasympathetic nerve activation during the night rhythm period, the posterior probabilities of non-restorative sleep in the two groups of data are close to 0.5, indicating that the distinction between the two is reduced. In this case, the probability threshold can be set to any value such as 0.5, 0.52, 0.55, etc. according to statistical data. It is worth mentioning that the sum of the posterior probabilities of the sample value x0 of the current observation object belonging to non-restorative sleep and restorative sleep in the current observation time slot is equal to 1. Therefore, when the posterior probability of its belonging to non-restorative sleep is greater than 0.5, the current observation object belongs to non-restorative sleep with a greater probability in the current time slot.

[0087] Multiple time slots in the first interval are more likely to observe the deep sleep of the target user. The more time slots in the first interval where the posterior probability of non-restorative sleep is greater than the probability threshold, the less deep sleep with high parasympathetic nerve activation should have occurred, and the greater the impact on the sleep recovery effect.

[0088] Therefore, the number of time slots in which the posterior probability of non-restorative sleep in the first interval is greater than the probability threshold is counted, and the statistical result is divided by the total number of time slots in the first interval to obtain the time slot ratio. Furthermore, the sleep quality score can be converted according to the time slot ratio. The larger the time slot ratio, the worse the sleep quality of the target user. Exemplarily, the time slot ratio and the sleep quality score can be negatively correlated through a preset conversion method. In this case, the higher the sleep quality score, the better the sleep quality. Alternatively, the time slot ratio and the sleep quality score can be positively correlated through a preset conversion method. In this case, the higher the sleep quality score, the worse the sleep quality.

[0089] Step 520: Determine a sleep behavior habit score according to the proportion of time slots in which the posterior probability of non-restorative sleep in the second interval of the nocturnal rhythm period is greater than a probability threshold; wherein the second interval includes time slots in the nocturnal rhythm period other than the first interval.

[0090] For the second interval of the night rhythm period other than the first interval, the number of time slots in which the posterior probability of non-restorative sleep in the second interval is greater than the probability threshold can be counted, and the statistical result can be divided by the total number of time slots in the second interval to obtain the time slot ratio. Further, the sleep behavior habit score can be converted from the time slot ratio.

[0091] The specified sample values ​​of each time slot in the second interval are low, and the parasympathetic nerve activation is weak, indicating that the time slots in the second interval are light sleep or before falling asleep. The larger the proportion of time slots in which the posterior probability of non-restorative sleep calculated in the second interval is greater than the probability threshold, the higher the possibility that the target user has high-pressure activities before bedtime (such as playing games, staying up late, etc.) that lead to sleep deprivation. In other words, the target user's sleeping habits are worse.

[0092] For example, the time slot ratio calculated in the second interval can be negatively correlated with the sleep behavior habit score through a preset conversion method. In this case, the higher the sleep behavior habit score, the better the sleep behavior habit. Alternatively, the time slot ratio calculated in the second interval can be positively correlated with the sleep behavior habit score through a preset conversion method. In this case, the higher the sleep behavior habit score, the worse the sleep behavior habit.

[0093] Step 530: Determine the sleep state of the target user during the night rhythm period according to the sleep quality score and the sleep behavior habit score.

[0094] After calculating the sleep quality score and the sleep behavior habit score for the target user, the sleep status of the target user during the night rhythm period can be obtained.

[0095] Through the above measures, the target user's sleep quality during deep sleep can be evaluated based on the sleep quality score, and the target user's behavior habits before bedtime can be evaluated based on the sleep behavior habit score, thereby comprehensively evaluating the target user's sleep state during the night rhythm period.

[0096] In one embodiment, if the sleep quality score indicates poor sleep quality, for example: the time slot ratio calculated in the first interval is negatively correlated with the sleep quality score, and the sleep quality score is low, the lower the sleep quality score, the worse the sleep quality; or, the time slot ratio calculated in the first interval is positively correlated with the sleep quality score, and the sleep quality score is high, the higher the sleep quality score, the worse the sleep quality. In this case, there is no need to pay attention to the sleep behavior habit score, and it can be determined that the target user's sleep state in the night rhythm period is poor sleep quality.

[0097] If the sleep quality score indicates good sleep quality, for example: the time slot ratio calculated in the first interval is negatively correlated with the sleep quality score, and the sleep quality score is high, the higher the sleep quality score, the better the sleep quality; or, the time slot ratio calculated in the first interval is positively correlated with the sleep quality score, and the sleep quality score is low, the lower the sleep quality score, the better the sleep quality. And, the sleep behavior habit score indicates good sleep behavior habits, for example: the time slot ratio calculated in the second interval is negatively correlated with the sleep behavior habit score, and the sleep behavior habit score is high, the higher the sleep behavior habit score, the better the sleep behavior habit; or, the time slot ratio calculated in the second interval is positively correlated with the sleep behavior habit score, and the sleep behavior habit score is low, the lower the sleep behavior habit score, the better the sleep behavior habit. In this case, it can be determined that the target user's sleep state during the night rhythm period is good sleep quality and good sleep behavior habits.

[0098] If the sleep quality score indicates good sleep quality, for example: the time slot ratio calculated in the first interval is negatively correlated with the sleep quality score, and the sleep quality score is high, the higher the sleep quality score, the better the sleep quality; or, the time slot ratio calculated in the first interval is positively correlated with the sleep quality score, and the sleep quality score is low, the lower the sleep quality score, the better the sleep quality. And, the sleep behavior habit score indicates poor sleep behavior habits, for example: the time slot ratio calculated in the second interval is negatively correlated with the sleep behavior habit score, and the sleep behavior habit score is low, the lower the sleep behavior habit score, the worse the sleep behavior habit; or, the time slot ratio calculated in the second interval is positively correlated with the sleep behavior habit score, and the sleep behavior habit score is high, the higher the sleep behavior habit score, the worse the sleep behavior habit. In this case, it can be determined that the target user's sleep state during the night rhythm period is good sleep quality and poor sleep behavior habits.

[0099] In one embodiment, the sleep state of the target user can be tracked for a long time. If the target user has a problem of poor sleep quality in the sleep state of a specified number of consecutive night rhythm periods, it can be determined that the target user has chronic non-restorative sleep symptoms. Here, the specified number can be set based on experience. For example, the specified number can be any value such as 3, 5, 7, etc. If the specified number is selected as 3, then when the target user has a problem of poor sleep quality in the night rhythm period for three consecutive days, it can be determined that the target user has chronic non-restorative sleep symptoms.

[0100] See also Figure 7 , which is a schematic diagram of non-restorative sleep data provided by an embodiment of the present application; see Figure 8 , which is a schematic diagram of non-restorative sleep data provided by another embodiment of the present application; see Fig. 9, is a schematic diagram of non-restorative sleep data provided by yet another embodiment of the present application. Figures 7 to 9 These are the non-restorative sleep data for three consecutive days for subjects with chronic non-restorative sleep symptoms. The data distribution is consistent with their subjective feelings.

[0101] In one embodiment, before executing step 430, a first kernel density estimation function needs to be generated. Fig.10 , is a flow chart of a method for generating a first kernel density estimation function provided in an embodiment of the present application, such as Fig.10 As shown, the method may include the following steps 1010 to 1040.

[0102] Step 1010: obtaining designated physiological parameters of multiple time slots of multiple sample users in the non-restorative sleep group during the nocturnal rhythm period, and converting designated sample values ​​of each time slot based on the designated physiological parameters of each time slot of each sample user.

[0103] The non-restorative sleep group includes a number of sample users who perceive themselves as having non-restorative sleep.

[0104] Each sample user wears at least one wearable device, through which the specified physiological parameters of the sample user can be collected. Here, the specified physiological parameters used when generating the kernel density estimation function should be consistent with the specified physiological parameters used in the subsequent detection process of step 410 to step 440.

[0105] Furthermore, for each sample user's designated physiological parameter in each time slot, a designated sample value of the sample user in the time slot is calculated. For each sample user, designated sample values ​​of multiple time slots can be obtained.

[0106] Step 1020: For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user.

[0107] For each sample user, the designated sample values ​​of the sample user may be sorted in descending order, thereby obtaining a plurality of sorted designated sample values ​​corresponding to the sample user.

[0108] Step 1030: Divide the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users.

[0109] The mth designated sample value among the sorted designated sample values ​​of the multiple sample users is divided into the mth time slot, so that the multiple designated sample values ​​of the multiple sample users can be divided into M time slots. The value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0110] Step 1040: For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, fit a first kernel density estimation function corresponding to the sorting position m; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0111] After the sorting is completed, for the mth time slot, a first kernel density estimation function corresponding to the sorting position m may be fitted based on the distribution of the specified sample values ​​of multiple sample users in the time slot.

[0112] Exemplarily, the form of the first kernel density estimation function can be expressed by the following formula (3):

[0113]

[0114] in, is the estimated density function at point x0, that is, the value of the probability density function; N is the number of samples, that is, the total number of sample users; φ λ (x0-x i ) is the kernel function. The choice of kernel function will affect the smoothness and shape of the first kernel density estimation function. Common kernel functions include Gaussian kernel function, Epanechnikov kernel function, etc.; λ is the bandwidth parameter, which controls the width of the kernel function, thereby affecting the smoothness of the first kernel density estimation function. A larger λ will result in a smoother first kernel density estimation function, while a smaller λ will result in a sharper peak in the first kernel density estimation function. λ can be configured as needed; x0 is the point for which density estimation is required; xi represents the i-th observation in the data set (that is, all specified sample values ​​in a time slot), and i is the index.

[0115] By generating a first kernel density estimation function for each time slot, multiple first kernel density estimation functions can be obtained. Exemplarily, the night rhythm period is divided into 84 time slots, and 84 first kernel density estimation functions can be generated. The sorting position of any time slot corresponds to the first kernel density estimation function generated with the specified sample value of the time slot.

[0116] In one embodiment, if the Gaussian kernel function is used as the kernel function of the first kernel density estimation function, the first kernel density estimation function can be expressed by the following formula (4):

[0117]

[0118] in, is the estimated density function at point x0, that is, the value of the probability density function; N is the number of samples, that is, the total number of sample users; λ is the bandwidth parameter, which controls the width of the kernel function, thereby affecting the smoothness of the first kernel density estimation function; p is the number of dimensions of the data, and each observation value x i is a p-dimensional vector; e is the base of the natural logarithm; x0 is the point at which the density needs to be estimated, which is a p-dimensional vector; x i Represents the i-th observation in the data set (that is, all specified sample values ​​in a time slot), where i is the index.

[0119] In one embodiment, before executing step 430, a second kernel density estimation function needs to be generated. Fig.11 , is a flow chart of a method for generating a second kernel density estimation function provided in an embodiment of the present application, such as Fig.11 As shown, the method may include the following steps 1110 to 1140.

[0120] Step 1110: obtaining designated physiological parameters of multiple time slots of multiple sample users in the recovery sleep group during the night rhythm period, and converting designated sample values ​​of each time slot based on the designated physiological parameters of each time slot of each sample user.

[0121] Among them, the restorative sleep group includes multiple sample users who perceive themselves as having restorative sleep.

[0122] Each sample user wears at least one wearable device, through which the specified physiological parameters of the sample user can be collected. Here, the specified physiological parameters used when generating the kernel density estimation function should be consistent with the specified physiological parameters used in the subsequent detection process of step 410 to step 440.

[0123] Furthermore, for each sample user's designated physiological parameter in each time slot, a designated sample value of the sample user in the time slot is calculated. For each sample user, designated sample values ​​of multiple time slots can be obtained.

[0124] Step 1120: For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user.

[0125] For each sample user, the designated sample values ​​of the sample user may be sorted in descending order, thereby obtaining a plurality of sorted designated sample values ​​corresponding to the sample user.

[0126] Step 1130: Divide the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users.

[0127] The mth designated sample value among the sorted designated sample values ​​of the multiple sample users is divided into the mth time slot, so that the multiple designated sample values ​​of the multiple sample users can be divided into M time slots. The value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0128] Step 1140: For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, fit a second kernel density estimation function corresponding to the sorting position m; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

[0129] After the sorting is completed, for the mth time slot, a second kernel density estimation function corresponding to the sorting position m may be fitted based on the distribution of the specified sample values ​​of multiple sample users in the time slot.

[0130] The form of the second kernel density estimation function is equivalent to the first kernel density estimation function, see the aforementioned formula (3) and formula (4).

[0131] By generating a second kernel density estimation function for each time slot, multiple second kernel density estimation functions can be obtained. Exemplarily, the night rhythm period is divided into 84 time slots, and 84 second kernel density estimation functions can be generated. The sorting position of any time slot corresponds to the second kernel density estimation function generated with the specified sample value of the time slot.

[0132] See also Fig.12 , is a schematic diagram of the fitting effect of the kernel density estimation function provided in an embodiment of the present application, Fig.12 The sample values ​​specified in are the high-frequency power spectrum features. Fig.12 The dotted histogram in the middle is the statistical result of the specified sample values ​​of the non-restorative sleep group in a time slot. Fig.12 The dashed curve in the middle is the first kernel density estimation function corresponding to the sorting position of the time slot obtained by fitting. Fig.12 The solid line histogram in the middle is the statistical result of the specified sample values ​​of the recovery sleep group in a time slot. Fig.12 The solid line in the middle curve is the second kernel density estimation function corresponding to the sorting position of the time slot obtained by fitting.

[0133] Fig.13 is a block diagram of a sleep state detection device according to an embodiment of the present invention, such as Fig.13 As shown, the device may include:

[0134] The conversion module 1310 is used to obtain the specified physiological parameters of the wearable device of the target user in multiple time slots during the night rhythm period, and convert the specified sample value of each time slot based on the specified physiological parameters of the time slot; wherein the specified sample value is a parameter for quantifying the degree of parasympathetic nerve activation;

[0135] A sorting module 1320 is used to sort the designated sample values ​​of the multiple time slots in the night rhythm period according to the size, so as to obtain the designated sample values ​​of the multiple time slots after sorting;

[0136] A determination module 1330 is used to determine, for each time slot, a posterior probability of non-restorative sleep in the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to a sorted position of the time slot, a priori probability estimation value of non-restorative sleep, and a priori probability estimation value of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep;

[0137] The detection module 1340 is used to determine the sleep state of the target user in the nocturnal rhythm period according to the posterior probabilities of non-restorative sleep in multiple time slots of the nocturnal rhythm period.

[0138] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned sleep state detection method, and will not be repeated here.

[0139] In several embodiments provided in the present application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0140] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0141] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

Claims

1. A method for detecting a sleeping state, characterized in that: include: Obtaining designated physiological parameters of a wearable device of a target user in multiple time slots during a night rhythm period, and converting designated sample values ​​of each time slot based on the designated physiological parameters of the time slot; wherein the designated sample value is a parameter for quantifying the degree of activation of the parasympathetic nerve; Sorting the designated sample values ​​of the multiple time slots in the night rhythm period according to size to obtain the designated sample values ​​of the multiple time slots after sorting; For each time slot, determining the posterior probability of non-restorative sleep in the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to a sorted position of the time slot, a prior probability estimation value of non-restorative sleep, and a prior probability estimation value of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep; The sleep state of the target user in the nocturnal rhythm period is determined according to the posterior probabilities of non-restorative sleep in the multiple time slots of the nocturnal rhythm period.

2. The method according to claim 1, characterized in that The step of determining the sleep state of the target user in the nocturnal rhythm period according to the posterior probability of non-restorative sleep in the multiple time slots of the nocturnal rhythm period comprises: Determine a sleep quality score according to the proportion of time slots in which the posterior probability of non-restorative sleep in a first interval within the nocturnal rhythm period is greater than a preset probability threshold; wherein the first interval includes a preset first number of time slots in front of a specified sample value; Determine a sleep behavior habit score according to the proportion of time slots in which the posterior probability of non-restorative sleep in a second interval within the nocturnal rhythm period is greater than the probability threshold; wherein the second interval includes time slots in the nocturnal rhythm period other than the first interval; The sleep state of the target user in the nocturnal rhythm period is determined according to the sleep quality score and the sleep behavior habit score.

3. The method according to claim 2, characterized in that The sleeping state includes poor sleep quality indicated by the sleep quality score; or, the sleeping state includes good sleep quality indicated by the sleep quality score, and good sleep behavior habits indicated by the sleep behavior habit score; or, the sleeping state includes good sleep quality indicated by the sleep quality score, and poor sleep behavior habits indicated by the sleep behavior habit score.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: If the target user has a problem of poor sleep quality in the sleep state of a specified number of consecutive night rhythm periods, it is determined that the target user has chronic non-restorative sleep symptoms.

5. The method according to claim 1, characterized in that Before determining the posterior probability of non-restorative sleep in each time slot based on the specified sample value of the time slot, the first kernel density estimation function and the second kernel density estimation function corresponding to the sorting position of the time slot, the prior probability estimation value of non-restorative sleep, and the prior probability estimation value of restorative sleep for each time slot, the method further includes: Acquire the designated physiological parameters of multiple time slots of multiple sample users in the non-restorative sleep group during the night rhythm period, and convert the designated sample value of each time slot based on the designated physiological parameters of each time slot of each sample user; For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user; Dividing the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users; For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, a first kernel density estimation function corresponding to the sorting position m is fitted; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

6. The method according to claim 1, characterized in that Before determining the posterior probability of non-restorative sleep in each time slot based on the specified sample value of the time slot, the first kernel density estimation function and the second kernel density estimation function corresponding to the sorting position of the time slot, the prior probability estimation value of non-restorative sleep, and the prior probability estimation value of restorative sleep for each time slot, the method further includes: Acquire the designated physiological parameters of multiple time slots of multiple sample users in the restorative sleep group during the night rhythm period, and convert the designated sample value of each time slot based on the designated physiological parameters of each time slot of each sample user; For each sample user, the designated sample values ​​of the sample user in multiple time slots are sorted according to size to obtain a plurality of sorted designated sample values ​​corresponding to the sample user; Dividing the sorted multiple designated sample values ​​of the multiple sample users into the same time slot in the same order to obtain multiple divided time slots, each time slot including the multiple designated sample values ​​of the multiple sample users; For the mth time slot, based on the distribution of multiple specified sample values ​​of multiple sample users in the time slot, a second kernel density estimation function corresponding to the sorting position m is fitted; wherein the value of m ranges from 1 to M, and M is the total number of time slots in the night rhythm period.

7. A sleep state detection device, characterized in that: include: A conversion module, used to obtain the specified physiological parameters of the wearable device of the target user in multiple time slots during the night rhythm period, and convert the specified sample value of each time slot based on the specified physiological parameters of the time slot; wherein the specified sample value is a parameter for quantifying the degree of parasympathetic nerve activation; A sorting module, used for sorting the designated sample values ​​of the multiple time slots in the nocturnal rhythm period according to the size, to obtain the designated sample values ​​of the multiple time slots after sorting; a determination module, configured to determine, for each time slot, a posterior probability of non-restorative sleep in the time slot based on a specified sample value of the time slot, a first kernel density estimation function and a second kernel density estimation function corresponding to a sorted position of the time slot, a prior probability estimation value of non-restorative sleep, and a prior probability estimation value of restorative sleep; the first kernel density estimation function corresponds to non-restorative sleep, and the second kernel density estimation function corresponds to restorative sleep; The detection module is used to determine the sleep state of the target user in the nocturnal rhythm period according to the posterior probability of non-restorative sleep in multiple time slots of the nocturnal rhythm period.

8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the sleep state detection method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the sleep state detection method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the sleep state detection method according to any one of claims 1 to 6 is implemented.