Intelligent sleep assisting method, device, equipment and storage medium
By collecting users' heart rate and respiratory rate data, adaptively calculating the fluctuation and coefficient of variation thresholds, determining the user's awake state, and automatically activating the electromagnetic field generator, the accuracy and intelligence issues of existing electromagnetic field generator sleep aid methods are solved, achieving a more precise sleep aid effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-27
AI Technical Summary
The accuracy, effectiveness, and intelligence of existing electromagnetic field generator-based sleep aids are not ideal, and they cannot accurately adjust the sleep aid time and intensity according to the user's actual physiological state.
By collecting the user's heart rate and respiratory rate data, the system adaptively calculates the fluctuation and coefficient of variation thresholds, and combines the instantaneous fluctuation of heart rate and the coefficient of variation of respiratory rate to determine the user's awake state. After a preset duration, the electromagnetic field generator is automatically activated.
It improves the precision and intelligence of sleep aids, reduces human intervention, and enhances the effectiveness and seamlessness of sleep aids.
Smart Images

Figure CN121401577B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of human rhythm, and in particular to an intelligent sleep-aiding method, device, equipment and storage medium. BACKGROUND
[0002] With the improvement of public health awareness, the way of using physical devices to assist in improving sleep gradually popularizes; among them, the electromagnetic field generator, a physical device, has attracted widespread attention in the sleep-aiding field because it can emit extremely low frequency electromagnetic waves (electromagnetic fields) to aid sleep.
[0003] At present, the way of using the electromagnetic field generator to aid sleep is as follows: first, the user manually turns on the electromagnetic field generator before going to sleep, and the electromagnetic field generator works at a fixed power and frequency for a predetermined time or until the user manually turns it off; second, the electromagnetic field generator is built-in clock, which can automatically turn on and off at a preset time period (such as 11 pm to 6 am).
[0004] However, after manually or automatically turning on the electromagnetic field generator, if the user has entered deep sleep during the working period of the electromagnetic field generator, the electromagnetic field will become a factor affecting the user's sleep, and if the user wakes up unexpectedly during the non-working period of the electromagnetic field generator, the electromagnetic field generator will no longer generate electromagnetic field, resulting in the inability to continue to aid sleep; it can be seen that the current way of using the electromagnetic field generator to aid sleep is not ideal in terms of sleep-aiding accuracy, sleep-aiding effect and sleep-aiding intelligence. SUMMARY
[0005] In order to improve the sleep-aiding accuracy, sleep-aiding effect and sleep-aiding intelligence level of the user, the present application provides an intelligent sleep-aiding method, device, equipment and storage medium.
[0006] In a first aspect, the present application provides an intelligent sleep-aiding method, comprising:
[0007] Based on the collected initial heart rate and initial respiratory rate, and the preset resting time length, determine the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold;
[0008] Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous heart rate fluctuation degree; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the respiratory rate coefficient of variation;
[0009] In response to the existence of the instantaneous heart rate fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate coefficient of variation greater than the coefficient of variation adaptive threshold, and the duration of the preset judgment time length, start the electromagnetic field generator.
[0010] In a second aspect, the present application provides an intelligent sleep-aiding device, comprising:
[0011] The threshold determination module is configured to determine the fluctuation adaptive threshold and the coefficient of variation adaptive threshold based on the collected initial heart rate and initial respiratory rate, and a preset resting time length.
[0012] The parameter calculation module is configured to determine the heart rate instantaneous fluctuation based on the initial heart rate corresponding to the heart rate sliding window, and determine the respiratory rate coefficient of variation based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0013] The start control module is configured to start the electromagnetic field generator in response to the existence of the heart rate instantaneous fluctuation being greater than the fluctuation adaptive threshold, the respiratory rate coefficient of variation being greater than the coefficient of variation adaptive threshold, and the duration being greater than the preset judgment time length.
[0014] In a third aspect, the present application provides a computer device, which comprises a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method when executing the computer program.
[0015] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in the above method.
[0016] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program, which is executed by a processor to implement the steps in any of the above method embodiments.
[0017] The intelligent sleep assisting method, device, equipment and storage medium, by taking the condition that the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient is greater than the variation coefficient adaptive threshold, and the condition lasts for a preset judgment duration as the automatic starting condition of the electromagnetic field generator, first, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are calculated based on the heart rate and the respiration of the user in the resting duration, that is, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are adaptive to the actual physiological state of the user in the resting duration, and are not fixed values; second, the heart rate instantaneous fluctuation degree and the respiratory rate variation coefficient are calculated based on the real-time collected heart rate and respiratory rate, and the heart rate instantaneous fluctuation degree and the respiratory rate variation coefficient can be used to reflect the actual physiological state of the user; that is, different users have different sets of heart rate instantaneous fluctuation degree, respiratory rate variation coefficient, fluctuation degree adaptive threshold and variation coefficient adaptive threshold for the user, and the current state of the user is determined based on the set of data, and it is determined whether to automatically start the electromagnetic field generator, which can improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user; in addition, the condition of whether to start the electromagnetic field generator is not determined by a single condition, but is determined by the data of the heart rate and the respiratory rate, and the condition is not determined by the condition that the single heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold and the respiratory rate variation coefficient is greater than the variation coefficient adaptive threshold, but the condition lasts for a preset judgment duration, which can improve the accuracy of determining whether the user is in a wakeful state, and the electromagnetic field generator is started when the condition is met, which can further improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user; in addition, after the user actively starts the physiological state data collector, the electromagnetic field generator is automatically started based on the current physiological state of the user according to the control strategy of the intelligent sleep assisting method, without human intervention, which improves the degree of no feeling and the intelligent level of sleep assisting.
[0018] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the application, nor is it used to limit the scope of the application. Other features of the application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.
[0020] Figure 1A flow chart of an intelligent sleep assisting method provided in an embodiment of the present application;
[0021] Figure 2 A structural schematic diagram of an intelligent sleep assisting device provided in an embodiment of the present application;
[0022] Figure 3 A structural schematic diagram of a computer device provided in an embodiment of the present application;
[0023] Figure 4 An internal structural diagram of a computer readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and not intended to limit the present disclosure.
[0025] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, device, product or apparatus that includes a series of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or apparatuses.
[0026] In this paper, the term "and / or" is only a description of the relationship between the associated objects, which means that there can be three relationships. For example, A and / or B can represent three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " in this paper generally represents a "or" relationship between the front and rear associated objects.
[0027] Embodiment one
[0028] Figure 1 A flow chart of an intelligent sleep assisting method provided in an embodiment one of the present application, referring to Figure 1 The method can be executed by a device for executing the method, which can be realized by software and / or hardware, and the method comprises:
[0029] S110, based on the collected initial heart rate and initial respiratory rate, and the preset resting time length, determining the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold.
[0030] It should be noted that the intelligent sleep assisting method shown in the embodiment is applied to an intelligent sleep assisting system, which comprises a physiological state data collector and an electromagnetic field generator. The physiological state data collector in the embodiment is specifically a heart rate strap, which comprises at least two types. One is a wearable heart rate strap, which can be worn on the user's body, such as the wrist. The other is a piezoelectric sensor type heart rate strap, which can be arranged between the bed board and the mattress. In other embodiments, the specific form of the physiological state data collector and the heart rate strap is not limited. The physiological state data collector is used to collect the heart rate and the respiratory rate of the user who is preparing to sleep. If the user wears the wearable heart rate strap at night, the wearable heart rate strap is started, or if the user lies on the bed, the piezoelectric sensor type heart rate strap is started, it can be considered that the user is preparing to sleep. The electromagnetic field generator is wirelessly connected to the physiological state data collector. The wireless connection includes but is not limited to Bluetooth connection, and the specific form is not limited. The electromagnetic field generator is used to obtain the heart rate data and the respiratory rate data wirelessly transmitted by the physiological state data collector, and process the obtained data to determine whether to emit an electromagnetic field. The electromagnetic field is an extremely low frequency electromagnetic wave. For example, the extremely low frequency electromagnetic wave is specifically an electromagnetic wave of 7.83 Hz, which has a sleep assisting effect.
[0031] The physiological state data collector can collect the heart rate and the respiratory rate of the user at a fixed frequency after starting. The fixed frequency is 1 time per second in the embodiment, and the specific form is not limited in other embodiments. The heart rate and the respiratory rate collected by the physiological state data collector are recorded as original heart rate and original respiratory rate, respectively. In the data collection stage, a corresponding set of original heart rate and original respiratory rate can be collected every second.
[0032] It should be noted that the original heart rate and the original respiratory rate are derived from corresponding waveform data. When the user lies on the bed, body turning, coughing, speaking, using a mobile phone, and other body movement behaviors, or object deformation behaviors such as quilt and mattress deformation can cause corresponding responses. The response will further affect the waveform corresponding to the original heart rate and the original respiratory rate, becoming noise of the waveform corresponding to the original heart rate and the original respiratory rate, resulting in poor accuracy of the original heart rate and the original respiratory rate. In order to reduce the influence of the noise on the waveform corresponding to the original heart rate and the original respiratory rate, and improve the accuracy of the original heart rate and the original respiratory rate, the collector host in the physiological state data collector further performs filtering, denoising and other filtering operations on the original heart rate and the original respiratory rate before sending the heart rate data and the respiratory rate data to the electromagnetic field generator. The original heart rate and the original respiratory rate after filtering are recorded as initial heart rate and initial respiratory rate, respectively. Further, the physiological state data collector sends the initial heart rate and the initial respiratory rate generated every second to the electromagnetic field generator in turn.
[0033] It also needs to be explained that the embodiment wants to judge whether the user is in a wakeful state from the data of heart rate and respiratory rate, so as to improve the accuracy and robustness of the judgment; if the user is in a wakeful state, the electromagnetic field generator can be started to emit electromagnetic field to assist the user to sleep; in order to realize the judgment of whether the user is in a wakeful state, the judgment threshold value related to the initial heart rate and the initial respiratory rate needs to be established.
[0034] Wherein, and the judgment threshold value corresponding to the heart rate is recorded as the fluctuation adaptive threshold value, which is used for comparison with the heart rate instantaneous fluctuation degree, which is calculated based on the multiple initial heart rates collected within the resting time length (30 minutes after the physiological state data collector is started). The heart rate instantaneous fluctuation degree is used to reflect the degree of wakefulness of the user. It needs to be explained that when the user is awake, the brain is active and is easily affected by external light, sound and thoughts, and the sympathetic nerve is relatively active; the heart rate will produce instantaneous and slight fluctuations in response to these internal and external stimuli; for example, suddenly thinking of a trivial matter, the heart rate may accelerate slightly for a few beats and then recover; this "micro-fluctuation" is manifested as an increase in the heart rate instantaneous fluctuation degree in statistics; when the user is sleeping (especially deep sleep), the brain is resting, the parasympathetic nerve is completely dominant, and the body is in a state of extreme relaxation and stability; the heart rate is like a metronome, very stable and regular, so the heart rate instantaneous fluctuation degree becomes very small.
[0035] Wherein, and the judgment threshold value corresponding to the heart rate is recorded as the fluctuation adaptive threshold value, which is used for comparison with the heart rate instantaneous fluctuation degree, which is calculated based on the multiple initial heart rates collected within the resting time length (30 minutes after the physiological state data collector is started). The heart rate instantaneous fluctuation degree is used to reflect the degree of wakefulness of the user. It needs to be explained that when the user is awake, the brain is active and is easily affected by external light, sound and thoughts, and the sympathetic nerve is relatively active; the heart rate will produce instantaneous and slight fluctuations in response to these internal and external stimuli; for example, suddenly thinking of a trivial matter, the heart rate may accelerate slightly for a few beats and then recover; this "micro-fluctuation" is manifested as an increase in the heart rate instantaneous fluctuation degree in statistics; when the user is sleeping (especially deep sleep), the brain is resting, the parasympathetic nerve is completely dominant, and the body is in a state of extreme relaxation and stability; the heart rate is like a metronome, very stable and regular, so the heart rate instantaneous fluctuation degree becomes very small.
[0036] S120, determining the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; determining the respiratory rate variation coefficient based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0037] It should be noted that the human body has sympathetic nerves and parasympathetic nerves. Among them, the sympathetic nerves dominate when awake, nervous, and under pressure, which will make the heart rate faster, prepare to respond to challenges, but at the same time make the heart rate more unstable and more prone to fluctuation; the parasympathetic nerves dominate when relaxed, calm, and sleeping. It will slow down the heart rate and keep it stable, allowing the body to repair, so the heart rate will be very stable and regular.
[0038] It should be noted that at the end of the resting duration, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold can be calculated, and after the resting duration, the heart rate instantaneous fluctuation needs to be further calculated based on a certain number of initial heart rates, and the respiratory rate coefficient of variation also needs to be further calculated based on a certain number of initial respiratory rates; from a certain second after the end of the resting duration, the heart rate instantaneous fluctuation and the respiratory rate coefficient of variation are calculated once every second.
[0039] Among them, since the heart rate instantaneous fluctuation needs to reflect the heart rate fluctuation of the user in a short time, the number of initial heart rates required to calculate the heart rate instantaneous fluctuation is small, and in the embodiment, the number of initial heart rates required to calculate the heart rate instantaneous fluctuation is set to 5; the respiratory interval change reflected by the respiratory rate coefficient of variation needs to be reflected in a longer time, that is, a larger number of initial respiratory rates are required, and the number of initial respiratory rates required to calculate the respiratory rate coefficient of variation is set to 60. 60 initial respiratory rates can basically cover about 15 complete respiratory cycles, so as to reliably evaluate the overall regularity of the respiratory pattern.
[0040] Since the initial respiratory rate required for the respiratory rate coefficient of variation is large in quantity, 60 seconds after the end of the resting time is defined as a sliding window in time, and the sliding window is recorded as a respiratory rate sliding window, the length of the respiratory rate sliding window is 60 seconds, and 60 initial respiratory rates are included. Therefore, at the 60th second after the end of the resting time, the corresponding respiratory rate coefficient of variation can be calculated by the 60 initial respiratory rates in the respiratory rate sliding window. Since subsequent calculations of a group of corresponding respiratory rate coefficients of variation and heart rate instantaneous fluctuation degrees are required every second, and the first calculated respiratory rate coefficient of variation is calculated at the earliest 60th second after the end of the resting time, another sliding window in time can be set from the 56th second to the 60th second after the end of the resting time. The sliding window can include 5 initial heart rates, and the sliding window is recorded as a heart rate sliding window. The 5 initial heart rates included in the heart rate sliding window can be used for the extreme first heart rate instantaneous fluctuation degree, and can be calculated together with the respiratory rate coefficient of variation at the 60th second. It should be noted that, in order to calculate a group of corresponding heart rate instantaneous fluctuation degrees and respiratory rate coefficients of variation every second, the sliding steps of the heart rate sliding window and the respiratory rate sliding window are both set to 1 second. Thus, from the 60th second after the end of the resting time, there is a corresponding group of heart rate sliding window and respiratory rate sliding window every second, and further, a group of corresponding heart rate instantaneous fluctuation degrees and respiratory rate coefficients of variation can be calculated every second.
[0041] It should be noted that the host in the electromagnetic field generator is used to receive and store the initial heart rate and the initial respiratory rate. Compared with a normal calculator, the host in the electromagnetic field generator has lower data storage capacity and data calculation capacity.
[0042] In an optional embodiment, in order to prevent the initial heart rate and the initial respiratory rate received by the host in the electromagnetic field generator from causing a large data storage pressure on the host, the host in the embodiment only stores the initial heart rates included in the heart rate sliding window at the current time, and only stores the initial respiratory rates included in the respiratory rate sliding window at the current time. The initial heart rates or the initial respiratory rates outside the sliding window are deleted.
[0043] In an optional embodiment, in order to reduce the calculation pressure of the host in the electromagnetic field generator on the initial heart rate and the initial respiratory rate, the embodiment also optimizes the format of each data involved in the process of calculating the heart rate instantaneous fluctuation degree and the respiratory rate coefficient of variation based on the initial heart rate and the initial respiratory rate. It should be noted that each data in the process of calculating the heart rate instantaneous fluctuation degree and the respiratory rate coefficient of variation based on the initial heart rate and the initial respiratory rate is generally a floating point number, which is a way of representing real numbers in the host. The position of the decimal point is determined by the exponent and the mantissa. For example, 3.14 in the memory can be represented as However, the calculation of floating point numbers is complex, time-consuming and resource-consuming; while fixed point numbers are numbers with fixed decimal point positions, which are essentially ordinary integers, but in the program, it is agreed that some bits of the integer are the decimal part, and the calculation is simple and fast, and the resource consumption is less; therefore, the initial heart rate and the initial respiratory rate are converted from floating point numbers to fixed point numbers, and then stored and operated.
[0044] Specifically, the embodiment adopts Q format data to standardize the representation of fixed point numbers, and Qm.n represents a number with m-bit integer and n-bit decimal (total m+n bits); the data format of the fixed point number is as follows (it is agreed that the low 16 bits of the 32-bit integer represent the decimal part, and the high 16 bits represent the integer part):
[0045]
[0046] The conversion formula of converting the floating point number float_value into the corresponding fixed point number Q_value is as follows:
[0047] Q_value = (int32_t)(float_value · (1 << 16));
[0048] Where << is the left shift symbol, 1 << 16 = 65536; (int32_t) represents converting “(float_value · (1 << 16))” to a fixed point number.
[0049] For example, convert 3.14 to Q16.16;
[0050] (because 1 << 16 = 65536) = 205,719.04;
[0051] After rounding, Q_3_14 = 205719.
[0052] Another example is to convert 5 initial heart rates contained in the heart rate sliding window from floating point numbers to fixed point numbers (Q16.16 format), as follows:
[0053]
[0054] S130, in response to the existence of the heart rate instantaneous fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and the duration of the preset judgment time, starting the electromagnetic field generator.
[0055] It should be noted that, taking the heart rate instantaneous fluctuation degree corresponding to 1 second and the respiratory rate coefficient of variation as an example, if the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold and the respiratory rate coefficient of variation is greater than the coefficient of variation adaptive threshold, it can be explained that the user is in a wakeful state at this second, but since it can only be explained that the user is in a wakeful state at this second, the user may be judged to be not in a wakeful state at the next second. For example, the instantaneous body movement behavior or noise of the user lying on the bed may cause the user to be judged to be in a wakeful state at the current second, but the user is judged to be not in a wakeful state at the next second. Therefore, the stability and accuracy of the judgment result of whether the user is wakeful or not based on the judgment result corresponding to a single second is poor.
[0056] To improve the stability and accuracy of the judgment result of whether the user is wakeful or not, the present embodiment further judges whether the case (the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold and the respiratory rate coefficient of variation is greater than the coefficient of variation adaptive threshold) can be sustained for a preset judgment duration when it is detected that the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold and the respiratory rate coefficient of variation is greater than the coefficient of variation adaptive threshold. For example, the preset judgment duration is an integer second duration in 10-60 seconds, such as 60 seconds. In this way, it can be ensured that the judgment result of whether the user is currently wakeful or not is stable and real, rather than accidental fluctuation.
[0057] Specifically, if it is detected that the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold and the respiratory rate coefficient of variation is greater than the coefficient of variation adaptive threshold, and the case is sustained for a preset judgment duration, it can be explained with high probability that the user is currently in a stable wakeful state, which also indicates that the user has not slept for a considerable period of time. Therefore, it is suitable to start the electromagnetic field generator to emit an electromagnetic field to assist the user to fall asleep as soon as possible.
[0058] It should be noted that, in the embodiment, the instantaneous fluctuation degree of heart rate greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and lasting for a preset judgment duration are taken as the automatic starting conditions of the electromagnetic field generator. First, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are further calculated based on the collected heart rate and respiration of the user within the resting duration, that is, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are adaptive to the actual physiological state of the user within the resting duration, and are not fixed values. Second, the instantaneous fluctuation degree of heart rate and the respiratory rate variation coefficient are calculated based on the real-time collected heart rate and respiratory rate, and the instantaneous fluctuation degree of heart rate and the respiratory rate variation coefficient can be used to reflect the current actual physiological state of the user. That is, different users have different sets of instantaneous fluctuation degree of heart rate, respiratory rate variation coefficient, fluctuation degree adaptive threshold and variation coefficient adaptive threshold for the user, and the set of data is used to determine whether the user is currently in a wakeful state, and to determine whether to automatically start the electromagnetic field generator, so as to improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user. In addition, the judgment of whether to start the electromagnetic field generator is not simply determined by a single condition, but is determined by the data of heart rate and respiratory rate, and the judgment is not based on the instantaneous fluctuation degree of heart rate greater than the fluctuation degree adaptive threshold and the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold to start the electromagnetic field generator, but also requires the condition to last for a preset judgment duration, so as to improve the accuracy of determining whether the user is currently in a wakeful state, and to determine that the user is in a wakeful state when the condition is met, and then to start the electromagnetic field generator, so as to further improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user. In addition, after the user actively starts the physiological state data collector, the electromagnetic field generator is adaptively started according to the current physiological state of the user by the control strategy of the intelligent sleep assisting method, without human intervention, thereby improving the degree of unconsciousness and the intelligent level of sleep assisting.
[0059] Embodiment Two
[0060] The intelligent sleep assisting method provided in Embodiment Two of the present application optimizes the "determining the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold based on the collected initial heart rate and initial respiratory rate, and the preset resting duration" in Embodiment One. It should be noted that the parts not described in the embodiment can be referred to the description of other embodiments. The method comprises:
[0061] S211, filtering the collected initial heart rate based on a preset heart rate filtering condition to obtain a filtered heart rate; wherein the heart rate filtering condition at least includes one of the following: in response to the heart rate amplitude of the initial heart rate being greater than a preset heart rate amplitude threshold, filtering out the initial heart rate; in response to the heart rate difference between the initial heart rate and the previous initial heart rate being greater than a preset heart rate difference threshold, filtering out the initial heart rate.
[0062] It should be noted that the initial heart rate and the initial respiratory rate received by the host of the electromagnetic field generator per second are already filtered by the host of the physiological state data collector, but the initial heart rate and the initial respiratory rate received by the host of the electromagnetic field generator per second may still be abnormal data, which is abnormal in the following two aspects: first, the amplitude of the initial heart rate and the initial respiratory rate is abnormally large; second, the change amplitude of the initial heart rate and the initial respiratory rate of the current second compared to the last second is abnormally large.
[0063] Therefore, the host of the electromagnetic field generator needs to filter out abnormal data after obtaining the initial heart rate and the initial respiratory rate.
[0064] Specifically, taking the initial heart rate as an example, in order to filter out abnormal data in the initial heart rate, the embodiment is provided with a heart rate filtering condition, and in the embodiment, the heart rate filtering condition includes two judgment filtering conditions: first, in response to the amplitude of the initial heart rate being greater than a preset heart rate amplitude threshold, the initial heart rate is filtered out; second, in response to the heart rate difference (absolute value of the difference) between the initial heart rate and the previous initial heart rate being greater than a preset heart rate difference threshold, the initial heart rate is filtered out.
[0065] In implementation, once the obtained initial heart rate meets any one of the judgment filtering conditions of the heart rate filtering condition, the initial heart rate is filtered out; if the initial heart rate is not filtered out, the initial heart rate is recorded as a filtered heart rate.
[0066] It should be noted that in a short 1 second, if the heart rate of the user changes dramatically beyond the heart rate difference, it is extremely unusual in a resting state (unless a serious arrhythmia occurs, but this is not the monitoring target of the device), which is more likely to be due to motion causing sensor signal distortion, and the algorithm misinterprets the motion noise as a heartbeat.
[0067] In an optional embodiment, the preset heart rate difference is preferably 20 bpm, which is a balance of engineering experience and physiology. If the heart rate difference is set too small (such as 5 bpm), it will be too sensitive and prone to misjudging normal sinus arrhythmia; if it is set too large (such as 30 bpm), it will let some obvious artifacts slip through, and 20 bpm is a robust value that can effectively capture most transient abnormal jumps caused by motion.
[0068] S212, filtering the collected initial respiratory rate based on a preset respiratory rate filtering condition to obtain a filtered respiratory rate.
[0069] The filtering logic of the preset respiratory rate filtering condition is the same as the above-mentioned heart rate filtering condition, which will not be described here; and the respiratory rate that is not filtered out is recorded as a filtered respiratory rate.
[0070] S213, determine the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold based on the filtered heart rate and the filtered respiration rate, and a preset resting time length.
[0071] Wherein, the implementation logic of S213 is the same as S110 in Embodiment One, only replacing the initial heart rate in S110 with the filtered heart rate, and replacing the initial respiration rate with the filtered respiration rate.
[0072] It should be noted that, since the initial heart rate and the initial respiration rate may be abnormal, in this embodiment, the abnormal initial heart rate and the initial respiration rate are filtered out through the corresponding filtering conditions, and then the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold are calculated based on the normal filtered heart rate and the filtered respiration rate, which can improve the accuracy of the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold, and further improve the accuracy of the subsequent electromagnetic field generator starting and the sleep aid effect on the user.
[0073] S220, determine the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; determine the respiration rate coefficient of variation based on the initial respiration rate corresponding to the respiration rate sliding window.
[0074] S230, in response to the existence of the heart rate instantaneous fluctuation degree being greater than the fluctuation degree adaptive threshold, the respiration rate coefficient of variation being greater than the coefficient of variation adaptive threshold, and lasting for a preset judgment time length, start the electromagnetic field generator.
[0075] Embodiment Three
[0076] The intelligent sleep aid method provided in Embodiment Three optimizes the "determine the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold based on the filtered heart rate and the filtered respiration rate, and a preset resting time length" in Embodiment Two; it should be noted that the parts not described in this embodiment can be referred to the descriptions of other embodiments, and the method comprises:
[0077] S311, filter the collected initial heart rate based on a preset heart rate filtering condition to obtain a filtered heart rate; wherein the heart rate filtering condition at least includes one of the following: in response to the heart rate amplitude of the initial heart rate being greater than a preset heart rate amplitude threshold, filter out the initial heart rate; in response to the heart rate difference between the initial heart rate and the previous initial heart rate being greater than a preset heart rate difference threshold, filter out the initial heart rate.
[0078] S312, filter the collected initial respiration rate based on a preset respiration rate filtering condition to obtain a filtered respiration rate.
[0079] S313A, obtain the filtered heart rate in the preset resting time length to obtain a resting heart rate array.
[0080] In the embodiment, the preset resting time length is 30 minutes, i.e. 1800 seconds. In the ideal condition where all initial heart rates are not filtered out, 1800 filtered heart rates can be obtained in the resting time length, and the set of all filtered heart rates obtained in the resting time length is recorded as a resting heart rate array hr_data. For example, the resting heart rate array hr_data is [68, 70, 69, 71, 125, 69, 68,...].
[0081] S313B, determining a heart rate median of the resting heart rate array.
[0082] The heart rate median is the median of a new set of data obtained by sorting the filtered heart rates in the resting heart rate array in ascending order. For example, the new set of data obtained by sorting the filtered heart rates in the resting heart rate array in ascending order is [68, 68, 69, 69, 70, 71, 125,...], and the median of the new set of data is 69, i.e. the heart rate median hm.
[0083] S313C, determining a heart rate dispersion based on the resting heart rate array and the heart rate median.
[0084] The heart rate dispersion hd corresponding to the resting heart rate array can be calculated based on the resting heart rate array and the heart rate median corresponding to the resting heart rate array. The heart rate dispersion is used to represent the general heart rate fluctuation range when the filtered heart rates of the user in the resting time length fluctuate around the heart rate median.
[0085] S313D, determining a fluctuation degree adaptive threshold based on the heart rate median, the heart rate dispersion, and a preset heart rate dispersion coefficient.
[0086] The fluctuation degree adaptive threshold T1 and the heart rate median hm and the heart rate dispersion hd satisfy the following calculation formula:
[0087] T1 = hm + K·hd; where K is a preset heart rate dispersion coefficient, and the value of K is 3 or 4.
[0088] It should be noted that since the heart rate median hm and the heart rate dispersion hd are calculated based on the heart rate data measured by the user within the resting duration, and the fluctuation degree adaptive threshold T1 is calculated at the end of the resting duration, it is closely related to the real physiological state of the user within the resting duration. Different users have different physiological state data within the resting duration, so the fluctuation degree adaptive threshold T1 realizes the adaptive change of the real physiological state of the user within the resting duration, rather than a fixed threshold, which improves the accuracy of threshold setting, thereby facilitating the improvement of the precision of subsequent sleep assistance for the user.
[0089] In addition, the heart rate dispersion hd represents the general heart rate fluctuation range when the filtered heart rate fluctuates around the heart rate median within the resting duration of the user. For users with a small fluctuation degree, the heart rate dispersion hd is small, so the calculated fluctuation degree adaptive threshold T1 is also small. Subsequently, it is still necessary to determine whether the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold T1. If the fluctuation degree adaptive threshold T1 is small, a slight heart rate instantaneous fluctuation degree is more likely to trigger the determination condition. For users with a large fluctuation degree, the heart rate dispersion hd is large, so the calculated fluctuation degree adaptive threshold T1 is also large. Subsequently, it is still necessary to determine whether the heart rate instantaneous fluctuation degree is greater than the fluctuation degree adaptive threshold T1. If the fluctuation degree adaptive threshold T1 is large, a larger heart rate instantaneous fluctuation degree is required to trigger the determination condition. In this way, the setting of the fluctuation degree adaptive threshold T1 can accurately fit the actual physiological state of the user, thereby improving the accuracy of the setting of the fluctuation degree adaptive threshold T1.
[0090] S313E, obtaining the respiratory rate within the preset resting duration to obtain a resting respiratory rate array; determining a coefficient of variation adaptive threshold based on the resting respiratory rate array.
[0091] The determination logic of the coefficient of variation adaptive threshold T2 is the same as the above S313A-S313D steps, which will not be described here.
[0092] It should be noted that since the setting of the fluctuation degree adaptive threshold T1 and the coefficient of variation adaptive threshold T2 can accurately fit the actual physiological state of the user in the current period, the accuracy of the setting of the fluctuation degree adaptive threshold T1 and the coefficient of variation adaptive threshold T2 can be effectively guaranteed, thereby facilitating the improvement of the precision of subsequent sleep assistance for the user.
[0093] S320, determining a heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; and determining a respiratory rate coefficient of variation based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0094] S330, in response to the existence of the heart rate instantaneous fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and the duration of the preset judgment time, starting the electromagnetic field generator.
[0095] Embodiment Four
[0096] The intelligent sleep assisting method provided in Embodiment Four optimizes the "determining the heart rate dispersion degree based on the resting heart rate array and the heart rate median" in Embodiment Three; it should be noted that the parts not described in this embodiment can be referred to the descriptions of other embodiments. The method comprises:
[0097] S411, filtering the collected initial heart rate based on a preset heart rate filtering condition to obtain a filtered heart rate; wherein the heart rate filtering condition at least comprises one of the following: in response to the heart rate amplitude of the initial heart rate greater than a preset heart rate amplitude threshold, filtering out the initial heart rate; in response to the heart rate difference between the initial heart rate and the previous initial heart rate greater than a preset heart rate difference threshold, filtering out the initial heart rate.
[0098] S412, filtering the collected initial respiratory rate based on a preset respiratory rate filtering condition to obtain a filtered respiratory rate.
[0099] S413A, obtaining the filtered heart rate in the preset resting time to obtain a resting heart rate array.
[0100] S413B, determining the heart rate median of the resting heart rate array.
[0101] S413C1, determining the heart rate absolute difference corresponding to each resting heart rate based on each resting heart rate in the resting heart rate array and the heart rate median to obtain a heart rate absolute difference array.
[0102] wherein, and the filtered heart rate in the resting heart rate array is denoted as resting heart rate To calculate the heart rate dispersion degree hd, first, the heart rate absolute difference of each resting heart rate in the resting heart rate array respectively with the heart rate median hm is calculated. wherein, i represents the order of the resting heart rate in the resting heart rate array; and the set of the heart rate absolute difference corresponding to each resting heart rate is denoted as the heart rate absolute difference array.
[0103] For example, assuming that the heart rate median hm is 69, and the resting heart rate array is [68, 70, 69, 125, 69, 68, 71];
[0104] Then, the calculated absolute difference array of the heart rate is: [|68-69|=1, |70-69|=1, |69-69|=0, |125-69|=56, |69-69|=0, |68-69|=1, |71-69|=2]=[1,1, 0, 56, 0, 1, 2].
[0105] S413C2, determine the median corresponding to the absolute difference array of the heart rate, and obtain the heart rate dispersion.
[0106] The heart rate dispersion is the median corresponding to the absolute difference array of the heart rate. For example, the median of the absolute difference array [1,1, 0, 56, 0, 1, 2] is 1, that is, the heart rate dispersion is 1. It is indicated that most of the resting heart rates in the resting heart rate array fluctuate within 1 bpm above and below the 69 bpm benchmark.
[0107] S413D, determine the fluctuation adaptive threshold based on the median of the heart rate, the heart rate dispersion, and a preset heart rate dispersion coefficient.
[0108] S413E, obtain the respiratory rate in the preset resting time, and obtain a resting respiratory rate array; determine a coefficient of variation adaptive threshold based on the resting respiratory rate array.
[0109] S420, determine the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; determine the respiratory rate coefficient of variation based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0110] S430, in response to the heart rate instantaneous fluctuation degree being greater than the fluctuation adaptive threshold, the respiratory rate coefficient of variation being greater than the coefficient of variation adaptive threshold, and lasting for a preset judgment time, start the electromagnetic field generator.
[0111] Embodiment five
[0112] The intelligent sleep assisting method provided in Embodiment five optimizes the “determining the respiratory rate coefficient of variation based on the initial respiratory rate corresponding to the respiratory rate sliding window” in Embodiment two. It should be noted that the parts not described in this embodiment can be referred to the descriptions of other embodiments. The method comprises the following steps:
[0113] S211, filter the collected initial heart rate based on a preset heart rate filtering condition, and obtain a filtered heart rate; wherein the heart rate filtering condition at least includes one of the following: in response to the heart rate amplitude of the initial heart rate being greater than a preset heart rate amplitude threshold, filtering out the initial heart rate; in response to the heart rate difference between the initial heart rate and the previous initial heart rate being greater than a preset heart rate difference threshold, filtering out the initial heart rate.
[0114] S512, filtering the collected initial respiratory rate based on a preset respiratory rate filtering condition to obtain a filtered respiratory rate.
[0115] S513, determining a fluctuation adaptive threshold and a coefficient of variation adaptive threshold based on the filtered heart rate, the filtered respiratory rate, and a preset resting time length.
[0116] S521, determining a heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window.
[0117] Each heart rate sliding window contains a plurality of (5 in this embodiment) initial heart rates, and the standard deviation of the plurality of initial heart rates corresponding to the heart rate sliding window is denoted as the heart rate instantaneous fluctuation degree.
[0118] It should be noted that the greater the heart rate instantaneous fluctuation degree, the more likely the user is currently in a wakeful state.
[0119] S522, determining a filtered respiratory rate array based on the filtered respiratory rate corresponding to the respiratory rate sliding window.
[0120] The respiratory rate sliding window contains a plurality of (60 in this embodiment) filtered respiratory rates, and the set of filtered respiratory rates corresponding to the respiratory rate sliding window is denoted as the filtered respiratory rate array.
[0121] S523, determining a filtered respiratory rate mean and a filtered respiratory rate standard deviation corresponding to the filtered respiratory rate array.
[0122] The filtered respiratory rate array contains a plurality of filtered respiratory rates. To calculate the respiratory rate coefficient of variation corresponding to the filtered respiratory rate array, the mean and the standard deviation of the filtered respiratory rates in the filtered respiratory rate array are first calculated, and the mean is denoted as the filtered respiratory rate mean, and the standard deviation is denoted as the filtered respiratory rate standard deviation.
[0123] S524, determining a respiratory rate coefficient of variation based on the filtered respiratory rate mean and the filtered respiratory rate standard deviation.
[0124] The calculation formula between the respiratory rate coefficient of variation RR_CV, the filtered respiratory rate mean RR_mean, and the filtered respiratory rate standard deviation RR_std is:
[0125] RR_CV = (RR_std / RR_mean) · 100%;
[0126] It should be noted that the respiratory rate variation coefficient is used to reflect the change of respiratory interval; the reason why the respiratory rate variation coefficient is used as a judgment basis in this embodiment instead of the filtered respiratory rate standard deviation RR_std is that: when awake, breathing is affected by consciousness, speaking, sighing, etc., the rhythm is irregular, and the change of respiratory interval is large, that is, RR_std is large. When the user is sleeping, the breathing is dominated by the brainstem center, and the rhythm becomes very regular, and RR_std is significantly reduced; the respiratory rate variation coefficient RR_CV is a relative value, which eliminates the influence of individual basic respiratory rate speed (such as RR_mean is 12 times / minute vs 18 times / minute) on the absolute value of volatility, so that the threshold is more universal. The respiratory variation coefficient in sleep is usually less than 25%, while in wakefulness it can reach more than 30%-40%.
[0127] S530, in response to the existence of the heart rate instantaneous fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and the duration of the preset judgment duration, starting the electromagnetic field generator.
[0128] Embodiment six
[0129] The intelligent sleep assisting method provided in Embodiment Six of the present application supplements the method described in Embodiment One; it should be noted that the parts not described in detail in this embodiment can refer to the descriptions of other embodiments; this method comprises:
[0130] S610, determining the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold based on the collected initial heart rate and initial respiratory rate, and the preset resting duration.
[0131] S620, determining the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; determining the respiratory rate variation coefficient based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0132] S630, in response to the existence of the heart rate instantaneous fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and the duration of the preset judgment duration, starting the electromagnetic field generator.
[0133] S640, in response to the existence of the heart rate instantaneous fluctuation degree less than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient less than the variation coefficient adaptive threshold, and the duration of the preset continuous duration, and the opening duration of the electromagnetic field generator greater than or equal to the preset opening duration threshold, closing the electromagnetic field generator.
[0134] It should be noted that the electromagnetic field emitted by the electromagnetic field generator can help the user fall asleep when the user is relatively awake, but if the user has entered a sleep state and the electromagnetic field generator still emits an electromagnetic field, the electromagnetic field at this time will affect the user's sleep; therefore, the electromagnetic field generator needs to be turned off in time when it is determined that the user has entered a sleep state.
[0135] In this embodiment, at least two conditions need to be met to turn off the electromagnetic field generator: first, it is determined that the heart rate instantaneous fluctuation degree is less than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient is less than the variation coefficient adaptive threshold, and the determination result lasts for a preset continuous time length; second, the opening time length of the electromagnetic field generator is greater than or equal to a preset opening time length threshold.
[0136] In this embodiment, the preset continuous time length is preferably 3 minutes, and in other embodiments, it is not specifically limited; it should be noted that in addition to determining that the heart rate instantaneous fluctuation degree is less than the fluctuation degree adaptive threshold and the respiratory rate variation coefficient is less than the variation coefficient adaptive threshold, it is further determined whether the determination result lasts for a preset continuous time length, which is to avoid false positives caused by the accidental situation that the heart rate instantaneous fluctuation degree is less than the fluctuation degree adaptive threshold and the respiratory rate variation coefficient is less than the variation coefficient adaptive threshold only in a single second or a very short time, so that the determination result lasts for a preset continuous time length, which can ensure the stability and accuracy of the determination result of whether the user is in a sleep state at this time, thereby improving the closing accuracy when the electromagnetic field is turned off subsequently.
[0137] In addition, in this embodiment, the second determination condition, i.e., the opening time length of the electromagnetic field generator is greater than or equal to a preset opening time length threshold, is to ensure that the electromagnetic field generator can be started for a period of time after being turned on, so as to avoid frequent starting and stopping of the electromagnetic field generator, which will also interfere with the user's sleep and help improve the sleep-aiding effect. In this embodiment, the preset opening time length threshold is preferably 30 minutes.
[0138] Embodiment Seven
[0139] The intelligent sleep-aiding method provided in Embodiment Seven of the present application supplements the method described in Embodiment Six; it should be noted that the parts not described in this embodiment can be referred to the descriptions of other embodiments, and the method comprises:
[0140] S710, determining the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold based on the collected initial heart rate and initial respiratory rate, and a preset resting time length.
[0141] S720, determining the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window, and determining the respiratory rate variation coefficient based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0142] S730, in response to the existence of the heart rate instantaneous fluctuation degree greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and the duration of the preset judgment length, starting the electromagnetic field generator.
[0143] S740, in response to the existence of the heart rate instantaneous fluctuation degree less than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient less than the variation coefficient adaptive threshold, and the duration of the preset continuous length, and the opening length of the electromagnetic field generator greater than or equal to the preset opening length threshold, closing the electromagnetic field generator.
[0144] S750, in response to the closing length of the electromagnetic field generator greater than the preset closing length threshold, re-determining whether to start the electromagnetic field generator.
[0145] Wherein, after the electromagnetic field generator is closed, if the electromagnetic field generator is started again in a very short time, the phenomenon of frequent opening and closing of the electromagnetic field generator will occur, thereby causing interference to the user's sleep. Therefore, if it is detected that the user has entered the wake-up state again within a very short time after the electromagnetic field generator is closed, the electromagnetic field generator needs to be started again, the electromagnetic field generator cannot be started immediately, and certain conditions need to be met before it can be started again.
[0146] In the embodiment, the certain condition is specifically that the closing length of the electromagnetic field generator is greater than the preset closing length threshold; wherein the preset closing length threshold is preferably 10 minutes. If the certain condition is met, the determination of whether to start the electromagnetic field generator is performed again according to each step shown in Embodiment 1.
[0147] It should be noted that in the intelligent sleep-aiding method shown in each of the above embodiments, the user does not need to operate or set the device after preparing to sleep, and the electromagnetic field generator can be automatically turned on and off according to the user's physiological state, thereby improving the intelligence and non-sensitivity level of sleep-aiding, and saving device energy consumption.
[0148] It should be understood that although each step in the flowchart involved in each of the above embodiments is shown in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the flowchart involved in each of the above embodiments can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0149] Embodiment Eight
[0150] Based on the same inventive concept, the embodiments also provide an intelligent sleep-aiding device for implementing the intelligent sleep-aiding method described above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more intelligent sleep-aiding device embodiments provided below can refer to the limitations of the intelligent sleep-aiding method described above, which will not be repeated here.
[0151] In this embodiment, as shown in Figure 2 An intelligent sleep-aiding device is provided, comprising:
[0152] A threshold determination module is configured to determine the fluctuation degree adaptive threshold and the coefficient of variation adaptive threshold based on the collected initial heart rate and initial respiratory rate, and the preset resting time length;
[0153] A parameter calculation module is configured to determine the heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window, and determine the respiratory rate coefficient of variation based on the initial respiratory rate corresponding to the respiratory rate sliding window.
[0154] A start control module is configured to start the electromagnetic field generator in response to the existence of the heart rate instantaneous fluctuation degree being greater than the fluctuation degree adaptive threshold, the respiratory rate coefficient of variation being greater than the coefficient of variation adaptive threshold, and the duration being greater than the preset judgment time length.
[0155] Each module in the above intelligent sleep-aiding device can be realized by software, hardware and their combinations in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to call and execute the operations corresponding to the above modules by the processor.
[0156] It should be noted that, in the embodiment, the instantaneous fluctuation degree of heart rate greater than the fluctuation degree adaptive threshold, the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold, and lasting for a preset judgment duration are taken as the automatic starting conditions of the electromagnetic field generator. First, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are further calculated based on the collected heart rate and respiration of the user within the resting duration, that is, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are adaptively dependent on the actual physiological state of the user within the resting duration, and are not fixed values. Second, the instantaneous fluctuation degree of heart rate and the respiratory rate variation coefficient are calculated based on the real-time collected heart rate and respiratory rate, and the instantaneous fluctuation degree of heart rate and the respiratory rate variation coefficient can be used to reflect the current actual physiological state of the user. That is, different users have different sets of instantaneous fluctuation degree of heart rate, respiratory rate variation coefficient, fluctuation degree adaptive threshold and variation coefficient adaptive threshold for the user, which are used to determine whether the user is in a current wakeful state and to decide whether to automatically start the electromagnetic field generator, so as to improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user. In addition, the judgment of whether to start the electromagnetic field generator is not simply determined by a single condition, but is determined by the data of heart rate and respiratory rate, and the condition of the instantaneous fluctuation degree of heart rate greater than the fluctuation degree adaptive threshold and the respiratory rate variation coefficient greater than the variation coefficient adaptive threshold is not used to start the electromagnetic field generator, but the condition needs to last for a preset judgment duration, so as to improve the accuracy of determining whether the user is in a current wakeful state, and to determine that the user is in a wakeful state when the condition is met, and then to start the electromagnetic field generator, so as to further improve the sleep assisting accuracy, sleep assisting effect and sleep assisting intelligent level of the user. In addition, after the user actively starts the physiological state data collector, the electromagnetic field generator is adaptively started according to the current physiological state of the user by the control strategy of the intelligent sleep assisting method, without human intervention, so as to improve the degree of unconsciousness and the intelligent level of sleep assisting.
[0157] In an optional embodiment, the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold are determined based on the collected initial heart rate and initial respiratory rate, and a preset resting duration, and the method comprises the following steps:
[0158] filtering the collected initial heart rate based on a preset heart rate filtering condition to obtain a filtered heart rate;
[0159] filtering the collected initial respiratory rate based on a preset respiratory rate filtering condition to obtain a filtered respiratory rate;
[0160] determining the fluctuation degree adaptive threshold and the variation coefficient adaptive threshold based on the filtered heart rate and the filtered respiratory rate, and a preset resting duration;
[0161] The heart rate filtering condition at least includes one of the following:
[0162] filtering the initial heart rate in response to a heart rate amplitude of the initial heart rate being greater than a preset heart rate amplitude threshold value;
[0163] filtering the initial heart rate in response to a heart rate difference between the initial heart rate and a previous initial heart rate being greater than a preset heart rate difference threshold value.
[0164] In an optional embodiment, the determining the fluctuation adaptive threshold value and the coefficient of variation adaptive threshold value based on the filtered heart rate and the filtered respiration rate, and a preset resting time length comprises:
[0165] obtaining the filtered heart rate within the preset resting time length to obtain a resting heart rate array;
[0166] determining a heart rate median of the resting heart rate array;
[0167] determining a heart rate dispersion based on the resting heart rate array and the heart rate median;
[0168] determining a fluctuation adaptive threshold value based on the heart rate median, the heart rate dispersion, and a preset heart rate dispersion coefficient;
[0169] obtaining the respiration rate within the preset resting time length to obtain a resting respiration rate array; and determining a coefficient of variation adaptive threshold value based on the resting respiration rate array.
[0170] In an optional embodiment, the determining the heart rate dispersion based on the resting heart rate array and the heart rate median comprises:
[0171] determining a heart rate absolute difference corresponding to each resting heart rate based on each resting heart rate and the heart rate median to obtain a heart rate absolute difference array;
[0172] determining a heart rate dispersion corresponding to a median of the heart rate absolute difference array.
[0173] In an optional embodiment, the determining the respiration rate coefficient of variation based on the initial respiration rate corresponding to the respiration rate sliding window comprises:
[0174] determining a filtered respiration rate array based on the filtered respiration rate corresponding to the respiration rate sliding window;
[0175] determining a filtered respiration rate mean and a filtered respiration rate standard deviation corresponding to the filtered respiration rate array;
[0176] determining a respiration rate coefficient of variation based on the filtered respiration rate mean and the filtered respiration rate standard deviation.
[0177] In an optional embodiment, the intelligent sleep aid device further comprises:
[0178] The generator closing module is configured to close the electromagnetic field generator in response to the existence of the heart rate instantaneous fluctuation degree being less than the fluctuation degree adaptive threshold, the respiratory rate coefficient of variation being less than the coefficient of variation adaptive threshold, and the duration being greater than or equal to the preset continuous duration threshold, and the electromagnetic field generator being turned on for a duration greater than or equal to the preset turn-on duration threshold.
[0179] In an optional embodiment, the intelligent sleep aid device further comprises:
[0180] The generator restarting module is configured to re-judge whether to start the electromagnetic field generator in response to the duration of the electromagnetic field generator being greater than the preset duration threshold.
[0181] Embodiment Nine
[0182] In this embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 3 The computer device includes a processor, a memory, and a network interface connected through a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The database of the computer device is configured to store data. The network interface of the computer device is configured to communicate with an external terminal through a network connection. The computer program is executed by the processor to implement an intelligent sleep aid method.
[0183] Those skilled in the art can understand that Figure 3 the structure shown in the figure is only a block diagram of part of the structure related to the present disclosure, and does not constitute a limitation on the computer device to which the present disclosure is applied. A specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0184] Embodiment Ten
[0185] In this embodiment, a computer readable storage medium is provided, as shown in Figure 4 which stores a computer program. The computer program is executed by the processor to implement the steps in each of the above method embodiments.
[0186] Embodiment Eleven
[0187] In this embodiment, a computer program product is provided, which includes a computer program. The computer program is executed by the processor to implement the steps in each of the above method embodiments.
[0188] It should be noted that the collected information is information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant national and regional laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user selection authorization or refusal.
[0189] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided by the present disclosure can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided by the present disclosure can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.
[0190] The technical features of the above embodiments can be combined in any way. To make the description concise, not all possible combinations of the technical features in the above embodiments are described, but as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present disclosure.
[0191] The above-described embodiments are merely illustrative of several embodiments of the present disclosure, which are described in a relatively specific and detailed manner, but should not be construed as limiting the scope of the patent of the present disclosure. It should be noted that, for those skilled in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the appended claims.
Claims
1. A smart sleep aid method, characterized in that, include: Based on the collected initial heart rate and initial respiratory rate, as well as the preset resting time, the adaptive thresholds for volatility and coefficient of variation are determined. Based on the initial heart rate corresponding to the heart rate sliding window, the instantaneous heart rate fluctuation is determined; based on the initial respiratory rate corresponding to the respiratory rate sliding window, the respiratory rate variation coefficient is determined. In response to the presence of instantaneous heart rate fluctuation greater than the fluctuation adaptive threshold and respiratory rate coefficient of variation greater than the coefficient of variation adaptive threshold, and for a preset judgment duration, the electromagnetic field generator is activated. Among them, based on the filtered heart rate and filtered respiratory rate, and the preset resting duration, adaptive thresholds for volatility and coefficient of variation are determined, including: Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array; wherein, the filtered heart rate is obtained by filtering the initial heart rate; Determine the median heart rate of the resting heart rate array; Based on the resting heart rate array and the median heart rate, the heart rate dispersion is determined; Based on the median heart rate, the heart rate dispersion, and the preset heart rate dispersion coefficient, an adaptive threshold for volatility is determined. Obtain the post-filtered respiratory rate within a preset resting time to obtain a resting respiratory rate array; determine an adaptive threshold for the coefficient of variation based on the resting respiratory rate array; wherein, the post-filtered respiratory rate is obtained by filtering the initial respiratory rate; The step of determining the heart rate dispersion based on the resting heart rate array and the median heart rate includes: Based on each resting heart rate in the resting heart rate array and the median heart rate, the absolute difference of heart rate corresponding to each resting heart rate is determined, and the absolute difference of heart rate array is obtained. The median corresponding to the absolute difference array of heart rates is determined to obtain the heart rate dispersion.
2. The method according to claim 1, characterized in that, The determination of the adaptive thresholds for volatility and coefficient of variation based on the collected initial heart rate and initial respiratory rate, and the preset resting duration, includes: The initial heart rate is filtered based on preset heart rate filtering conditions to obtain the filtered heart rate. The initial respiratory rate is filtered based on preset respiratory rate filtration conditions to obtain the filtered respiratory rate. Based on the filtered heart rate and the filtered respiratory rate, as well as the preset resting duration, the adaptive threshold for volatility and the adaptive threshold for coefficient of variation are determined. The heart rate filtering conditions include at least one of the following: If the initial heart rate amplitude is greater than a preset heart rate amplitude threshold, the initial heart rate is filtered out. If the difference between the initial heart rate and the previous initial heart rate is greater than a preset heart rate difference threshold, the initial heart rate is filtered out.
3. The method according to claim 2, characterized in that, The determination of the coefficient of variation of respiratory rate based on the initial respiratory rate corresponding to the respiratory rate sliding window includes: Based on the filtered respiratory rate corresponding to the respiratory rate sliding window, a filtered respiratory rate array is determined; Determine the mean and standard deviation of the filtered respiration rate corresponding to the filtered respiration rate array; The coefficient of variation of respiratory rate is determined based on the mean of the filtered respiratory rate and the standard deviation of the filtered respiratory rate.
4. The method according to claim 1, characterized in that, Also includes: In response to the existence of the instantaneous heart rate fluctuation being less than the fluctuation adaptive threshold, the respiratory rate coefficient of variation being less than the coefficient of variation adaptive threshold and continuing for a preset duration, and the electromagnetic field generator being turned on for a duration greater than or equal to a preset turn-on duration threshold, the electromagnetic field generator is turned off.
5. The method according to claim 4, characterized in that, Also includes: If the shutdown duration of the electromagnetic field generator exceeds a preset shutdown duration threshold, a new determination is made as to whether to restart the electromagnetic field generator.
6. A smart sleep aid device, characterized in that, The device includes: The threshold determination module is used to determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation based on the collected initial heart rate and initial respiratory rate, as well as the preset resting time. The parameter calculation module is used to determine the instantaneous fluctuation of heart rate based on the initial heart rate corresponding to the heart rate sliding window; and to determine the coefficient of variation of respiratory rate based on the initial respiratory rate corresponding to the respiratory rate sliding window. The start control module is used to start the electromagnetic field generator in response to the presence of the instantaneous heart rate fluctuation being greater than the fluctuation adaptive threshold and the respiratory rate coefficient of variation being greater than the coefficient of variation adaptive threshold, and for a preset judgment duration. Among them, based on the filtered heart rate and filtered respiratory rate, and the preset resting duration, adaptive thresholds for volatility and coefficient of variation are determined, including: Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array; wherein, the filtered heart rate is obtained by filtering the initial heart rate; Determine the median heart rate of the resting heart rate array; Based on the resting heart rate array and the median heart rate, the heart rate dispersion is determined; Based on the median heart rate, the heart rate dispersion, and the preset heart rate dispersion coefficient, an adaptive threshold for volatility is determined. Obtain the post-filtered respiratory rate within a preset resting time to obtain a resting respiratory rate array; determine an adaptive threshold for the coefficient of variation based on the resting respiratory rate array; wherein, the post-filtered respiratory rate is obtained by filtering the initial respiratory rate; The step of determining the heart rate dispersion based on the resting heart rate array and the median heart rate includes: Based on each resting heart rate in the resting heart rate array and the median heart rate, the absolute difference of heart rate corresponding to each resting heart rate is determined, and the absolute difference of heart rate array is obtained. The median corresponding to the absolute difference array of heart rates is determined to obtain the heart rate dispersion.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Non-contact respiratory sleep syndrome monitoring and early warning device
CN120360504A
Sleep apnea real-time early warning system based on heart rate variability analysis
CN121176863A