Intelligent sleep aiding method and device, equipment and storage medium

By collecting the user's heart rate and respiratory rate, calculating adaptive thresholds and thresholds, and automatically controlling the activation of the electromagnetic field generator, the accuracy and intelligence issues of the electromagnetic field generator sleep aid method are solved, improving the sleep aid effect and the degree of non-observation.

CN121401577AActive Publication Date: 2026-01-27PANKE RHYTHM (SUZHOU) BIOTECHNOLOGY CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202512000045.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-01-27
Estimated Expiration
2045-12-29

AI Technical Summary

Technical Problem

Existing electromagnetic field generator sleep aids are not ideal in terms of accuracy, effectiveness, and intelligence. They cannot precisely control the opening and closing of the electromagnetic field according to the user's actual physiological state, thus affecting the user's sleep quality.

Method used

By collecting the user's initial heart rate and respiratory rate, calculating the adaptive threshold for volatility and the adaptive threshold for coefficient of variation, and combining the instantaneous volatility of heart rate and the coefficient of variation of respiratory rate, it is determined whether the user is awake, and the electromagnetic field generator is automatically activated when the conditions are met within a preset time.

Benefits of technology

It improves the accuracy and intelligence of sleep aids, reduces interference with users' sleep, and enhances the sleep aid effect and the degree of unconsciousness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121401577A_ABST
    Figure CN121401577A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of human body rhythm, in particular to an intelligent sleep aiding method, device and equipment and a storage medium, and the method comprises the steps: determining a fluctuation degree adaptive threshold value and a variation coefficient adaptive threshold value based on the collected initial heart rate and initial respiration rate and a preset resting time length; determining a heart rate instantaneous fluctuation degree based on the initial heart rate corresponding to the heart rate sliding window; determining a respiratory rate variation coefficient based on the initial respiratory rate corresponding to the respiratory rate sliding window; and starting an electromagnetic field generator in response to the conditions that the heart rate instantaneous fluctuation degree is greater than the fluctuation degree self-adaptive threshold value, the respiration rate variation coefficient is greater than the variation coefficient self-adaptive threshold value and a preset judgment duration is continued. According to the application, the sleep-aiding precision, the sleep-aiding effect and the sleep-aiding intelligent level of sleep aiding of the user can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of human circadian rhythm technology, and in particular to an intelligent sleep aid method, device, equipment, and storage medium. Background Technology

[0002] With the increasing public awareness of health, the use of physical devices to help improve sleep has gradually become more popular. Among them, the electromagnetic field generator has received widespread attention in the field of sleep aids because it can emit extremely low-frequency electromagnetic waves (electromagnetic fields) that help with sleep.

[0003] Currently, the methods of using electromagnetic field generators to aid sleep are as follows: First, the user manually turns on the electromagnetic field generator before going to sleep, and the electromagnetic field generator works continuously for a predetermined period of time at a fixed power and frequency or until the user manually turns it off; Second, the electromagnetic field generator has a built-in clock that can automatically turn on and off during a preset time period (such as 11 p.m. to 6 a.m.).

[0004] However, if the user is already in deep sleep during the electromagnetic field generator's operating hours after it is turned on manually or automatically, the electromagnetic field will affect the user's sleep. If the user wakes up unexpectedly during the electromagnetic field generator's non-operating hours, the electromagnetic field generator will no longer generate an electromagnetic field and will therefore be unable to continue to help the user sleep. It is evident that the current method of using electromagnetic field generators for sleep aid is not ideal in terms of accuracy, effectiveness, and intelligence. Summary of the Invention

[0005] To improve the accuracy, effectiveness, and intelligence of sleep aids for users, this application provides an intelligent sleep aid method, device, equipment, and storage medium.

[0006] Firstly, this application provides an intelligent sleep aid method, including:

[0007] 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.

[0008] 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.

[0009] 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.

[0010] Secondly, this application provides an intelligent sleep aid device, comprising:

[0011] 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.

[0012] 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.

[0013] 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.

[0014] Thirdly, this application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the method described above.

[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.

[0016] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.

[0017] The aforementioned intelligent sleep aid method, device, equipment, and storage medium automatically activate the electromagnetic field generator by setting the instantaneous heart rate fluctuation greater than the fluctuation adaptive threshold and the respiratory rate coefficient of variation greater than the coefficient of variation adaptive threshold, and continuously preset the judgment duration. First, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are calculated by collecting the user's heart rate and respiration during the user's resting period; that is, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are adaptively dependent on the user's actual physiological state during the resting period and are not fixed values. Second, the instantaneous heart rate fluctuation and the coefficient of variation of the respiratory rate are calculated by collecting heart rate and respiratory rate data in real time. These instantaneous heart rate fluctuation and respiratory rate coefficients of variation can be used to reflect the user's current actual physiological state. In other words, different users have a different set of instantaneous heart rate fluctuation, respiratory rate coefficient of variation, fluctuation adaptive threshold, and coefficient of variation adaptive threshold for that user. This set of data is used to determine whether the user is currently awake and decide whether to proceed. The automatic activation of the electromagnetic field generator enhances the accuracy, effectiveness, and intelligence of sleep aids for users. Furthermore, the decision to activate the generator is not based on a single condition, but rather on a comprehensive assessment of both heart rate and respiratory rate data. The activation is not determined solely by a single heart rate fluctuation exceeding an adaptive threshold or a respiratory rate coefficient of variation exceeding an adaptive threshold; rather, these conditions are continuously monitored for a preset duration. This improves the accuracy of determining the user's current state of consciousness. If the conditions are met, the user is considered awake, and the generator is activated, further enhancing the accuracy, effectiveness, and intelligence of sleep aids. Additionally, when the user actively activates the physiological data acquisition device, the electromagnetic field generator adaptively activates based on the user's current physiological state using an intelligent sleep aid control strategy, requiring no human intervention and improving the seamlessness and intelligence of the sleep aid process.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1This is a flowchart of an intelligent sleep aid method provided in the embodiments of this application;

[0021] Figure 2 This is a schematic diagram of the structure of an intelligent sleep aid device provided in the embodiments of this application;

[0022] Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application;

[0023] Figure 4 This is an internal structural diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this disclosure.

[0025] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings herein are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0026] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0027] Example 1

[0028] Figure 1 This is a flowchart of an intelligent sleep aid method provided in Embodiment 1 of this application, for reference. Figure 1 The method can be executed by a device that performs the method, which can be implemented in software and / or hardware, and the method includes:

[0029] S110. Based on the collected initial heart rate and initial respiratory rate, and the preset resting time, determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation.

[0030] It should be noted that the intelligent sleep aid method shown in this embodiment is applied to an intelligent sleep aid system, which includes a physiological state data acquisition device and an electromagnetic field generator. Specifically, the physiological state data acquisition device in this embodiment is a heart rate belt, which includes at least two types: one is a wearable heart rate belt that can be worn on the user's body, such as on the wrist; the other is a piezoelectric sensing heart rate belt that can be placed between the bed board and the mattress. In other embodiments, the specific form of the physiological state data acquisition device and the heart rate belt is not limited. The physiological state data acquisition device is used to collect the heart rate and respiratory rate of a user preparing to sleep. If the user wearing the wearable heart rate belt at night causes it to activate, or lying in bed causes the piezoelectric sensing heart rate belt to activate, then it can be considered that the user is preparing to sleep. The electromagnetic field generator is wirelessly connected to the aforementioned physiological state data acquisition device. The wireless connection method includes, but is not limited to, Bluetooth connection. The electromagnetic field generator is used to acquire heart rate and respiratory rate data wirelessly transmitted by the physiological state data acquisition device and process the acquired 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 a 7.83Hz electromagnetic wave, which has a sleep-aiding effect.

[0031] The physiological state data acquisition device can collect the user's heart rate and respiratory rate at a fixed frequency after startup. In this embodiment, the fixed frequency is 1 time / second. In other embodiments, the specific frequency is not limited. The heart rate and respiratory rate collected by the physiological state data acquisition device are recorded as the raw heart rate and raw respiratory rate, respectively. During the data acquisition phase, a set of corresponding raw heart rate and raw respiratory rate can be collected every second.

[0032] It should be noted that the raw heart rate and raw respiratory rate are derived from corresponding waveform data. When a user is lying in bed, movements such as turning over, coughing, talking, or using a mobile phone, or deformations of objects like blankets and mattresses, can cause noise. This noise further affects the waveforms corresponding to the raw heart rate and respiratory rate, becoming noise and leading to inaccurate readings. To reduce the impact of this noise on the waveforms and improve the accuracy of the raw heart rate and respiratory rate, the physiological state data acquisition unit performs filtering and noise reduction on the raw heart rate and respiratory rate before sending them to the electromagnetic field generator. The filtered raw heart rate and respiratory rate are recorded as the initial heart rate and initial respiratory rate, respectively. Furthermore, the physiological state data acquisition unit sends the initial heart rate and initial respiratory rate generated every second to the electromagnetic field generator sequentially.

[0033] It should also be noted that this embodiment aims to comprehensively determine whether the user is awake based on data from both heart rate and respiratory rate, in order to improve the accuracy and robustness of the judgment. If the user is awake, an electromagnetic field generator can be activated to emit an electromagnetic field to assist the user in falling asleep. In order to determine whether the user is awake, it is necessary to first establish judgment thresholds related to the initial heart rate and initial respiratory rate.

[0034] The heart rate threshold is defined as the adaptive volatility threshold, which is compared with the instantaneous heart rate volatility. This instantaneous heart rate volatility is calculated based on multiple initial heart rates collected during the user's resting period (30 minutes after the physiological state data collector is activated). This instantaneous heart rate volatility reflects the user's level of alertness. It should be noted that when a user is awake, the brain is active and easily influenced by external light, sound, and thoughts, and the sympathetic nervous system is relatively active; the heart rate will experience instantaneous, minute fluctuations due to these internal and external stimuli. For example, suddenly remembering a trivial matter might cause a slight increase in heart rate for a few beats before returning to normal; this "micro-fluctuation" is statistically manifested as an increase in instantaneous heart rate volatility. When a user sleeps (especially during deep sleep), the brain rests, the parasympathetic nervous system is completely dominant, and the body is in a state of extreme relaxation and stability; the heart rate, like a metronome, is very stable and regular, therefore the instantaneous heart rate volatility becomes very small.

[0035] The threshold corresponding to the respiratory rate is designated as the adaptive threshold for the coefficient of variation (CV). This adaptive threshold is compared with the CV, which is calculated based on multiple initial respiratory rates collected during the user's resting period (30 minutes after the physiological state data acquisition device is activated). The CV represents the degree of change in the user's breathing intervals during the resting period, and thus can also be used to reflect the user's level of alertness. It should be noted that when a user is awake, breathing is affected by consciousness, speaking, sighing, etc., resulting in an irregular rhythm and significant changes in the breathing intervals, i.e., a larger CV. When a user is asleep, breathing is dominated by the brainstem center, the rhythm becomes very regular, and the CV significantly decreases.

[0036] S120. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of heart rate; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the coefficient of variation of respiratory rate.

[0037] It's important to note that the human body has both sympathetic and parasympathetic nervous systems. The sympathetic nervous system is dominant when we are awake, tense, or stressed; it increases heart rate to prepare for challenges, but also makes the heart rate more unstable and prone to fluctuations. The parasympathetic nervous system, on the other hand, is dominant when we are relaxed, calm, or asleep. It slows down the heart rate, keeping it stable and allowing the body to repair itself, resulting in a very stable and regular heart rate.

[0038] It should be noted that in this embodiment, at the end of the resting period, the adaptive threshold for volatility and the adaptive threshold for coefficient of variation can be calculated. After the resting period ends, it is necessary to further calculate the instantaneous volatility of heart rate based on a certain number of initial heart rates, and it is also necessary to further calculate the coefficient of variation of respiratory rate based on a certain number of initial respiratory rates. Starting from a certain second after the end of the resting period, the instantaneous volatility of heart rate and the coefficient of variation of respiratory rate are calculated once per second.

[0039] Since the instantaneous heart rate variability needs to reflect the user's heart rate fluctuations over a short period of time, the number of initial heart rates required to calculate the instantaneous heart rate variability is relatively small. In this embodiment, the number of initial heart rates required to calculate the instantaneous heart rate variability is set to 5. The respiratory rate variation coefficient reflects the changes in respiratory intervals over a longer period of time, which means that a larger number of initial respiratory rates are needed. The number of initial respiratory rates required to calculate the respiratory rate variation coefficient is set to 60. 60 initial respiratory rates can basically cover about 15 complete respiratory cycles, thereby reliably assessing the overall regularity of the breathing pattern.

[0040] Since the coefficient of variation of respiratory rate (CVR) requires a large number of initial respiratory rates, a 60-second window following the end of the resting period is defined as a sliding window in time, denoted as the respiratory rate window. This window is 60 seconds long and contains 60 initial respiratory rates. Therefore, at the 60th second after the end of the resting period, the corresponding CVR can be calculated using these 60 initial respiratory rates. Because a set of corresponding CVR and instantaneous heart rate variability needs to be calculated every second thereafter, and the first calculated CVR occurs at the earliest at the 60th second after the end of the resting period, another sliding window in time can be set from the 56th second to the 60th second after the end of the resting period. This window can contain 5 initial heart rates, denoted as the heart rate window. The 5 initial heart rates contained in this heart rate window can be used for the extreme first instantaneous heart rate variability and can be calculated together with the CVR at the 60th second. It should be noted that, in order to calculate a corresponding set of instantaneous heart rate fluctuations and respiratory rate variation coefficients every second, and to set the sliding step size of both the heart rate sliding window and the respiratory rate sliding window to 1 second, starting from the 60th second after the end of the resting period, there is a corresponding set of heart rate sliding windows and respiratory rate sliding windows every second. Furthermore, a corresponding set of instantaneous heart rate fluctuations and respiratory rate variation coefficients can be calculated every second.

[0041] It should be noted that the main unit in the electromagnetic field generator is used to receive and store the initial heart rate and initial respiratory rate. Compared with a normal calculator, the main unit in the electromagnetic field generator has lower data storage and data calculation capabilities.

[0042] In an optional embodiment, to prevent the initial heart rate and initial respiratory rate received by the host in the electromagnetic field generator from causing excessive data storage pressure on the host, in this embodiment the host only stores the initial heart rate contained in the current heart rate sliding window and only stores the initial respiratory rate contained in the current respiratory rate sliding window, and deletes the initial heart rate or initial respiratory rate outside the sliding window.

[0043] In an optional embodiment, to reduce the computational burden on the host computer in the electromagnetic field generator when processing the initial heart rate and initial respiratory rate, this embodiment also optimizes the format of the data involved in calculating the instantaneous fluctuation of heart rate and the coefficient of variation of respiratory rate based on the initial heart rate and initial respiratory rate. It should be noted that the data in the process of calculating the instantaneous fluctuation of heart rate and the coefficient of variation of respiratory rate based on the initial heart rate and initial respiratory rate are generally floating-point numbers. Floating-point numbers are a way of representing real numbers in the host computer, using the exponent and mantissa to define the position of the decimal point; for example, 3.14 may be represented in memory as... However, the calculation process of floating-point numbers is complex, time-consuming, and resource-intensive; while fixed-point numbers are numbers with a fixed decimal point position. They are essentially ordinary integers, but in the program, certain bits of this integer are defined as the decimal part. Their calculation is simple and fast, and they consume fewer resources. Therefore, in this embodiment, the initial heart rate and initial respiratory rate are converted from floating-point numbers to fixed-point numbers before being stored and calculated.

[0044] Specifically, this embodiment uses Q-format data to standardize the representation of fixed-point numbers, where Qm.n represents a number with m integer digits and n decimal digits (a total of m+n digits). The data format of this fixed-point number is as follows (by convention, the lower 16 bits of a 32-bit integer represent the decimal part, and the higher 16 bits represent the integer part):

[0045]

[0046] The conversion formula for converting a floating-point number (float_value) to its 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) means converting “(float_value · (1 << 16))” to a fixed-point number.

[0049] For example, 3.14 is converted to Q16.16;

[0050] (Because 1 << 16 = 65536) = 205,719.04;

[0051] After rounding, Q_3_14 = 205719.

[0052] Another example is converting the initial heart rate of 5 contained in the heart rate sliding window from a floating-point number to a fixed-point number (Q16.16 format), as follows:

[0053]

[0054] S130. 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, the electromagnetic field generator is activated.

[0055] It should be noted that, taking the instantaneous heart rate variability and respiratory rate coefficient of variation corresponding to one second as examples, if the instantaneous heart rate variability is greater than the variability adaptive threshold and the respiratory rate coefficient of variation is greater than the coefficient of variation adaptive threshold in that second, it can be said that the user is awake in that second. However, since this only indicates the user's awakeness in that single second, the user may be judged as not awake in the next second. For example, the user's instantaneous body movement or noise while lying in bed may lead to the judgment that the user is awake in the current second, but the user may be judged as not awake in the next second. Therefore, judging whether a user is awake based solely on the judgment result corresponding to a single second has poor stability and accuracy.

[0056] To improve the stability and accuracy of the judgment result on whether the user is awake, this implementation, when detecting that the instantaneous fluctuation of heart rate is greater than the fluctuation adaptive threshold and the coefficient of variation of respiratory rate is greater than the coefficient of variation adaptive threshold, also determines whether this situation (instantaneous fluctuation of heart rate is greater than the fluctuation adaptive threshold and the coefficient of variation of respiratory rate is greater than the coefficient of variation adaptive threshold) can continue for a preset judgment period. For example, the preset judgment period is an integer number of seconds between 10 seconds and 60 seconds, such as 60 seconds. This ensures that the judgment result on whether the user is awake is stable and real, rather than random fluctuations.

[0057] Specifically, if the instantaneous fluctuation of heart rate is detected to be greater than the fluctuation adaptive threshold, and the coefficient of variation of respiratory rate is greater than the coefficient of variation adaptive threshold, and this situation continues for the preset judgment time, it is highly likely that the user is currently in a stable awake state. At this time, it also means that the user has not fallen asleep for a considerable period of time, and it is appropriate to start the electromagnetic field generator to emit an electromagnetic field to help the user fall asleep as soon as possible.

[0058] It should be noted that this embodiment uses the condition that the instantaneous heart rate fluctuation exceeds the fluctuation adaptive threshold and the respiratory rate coefficient of variation exceeds the coefficient of variation adaptive threshold, and a preset judgment period is used as the automatic start condition for the electromagnetic field generator. First, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are calculated by collecting the user's heart rate and respiration during the user's resting period. That is, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are adaptive and depend on the user's actual physiological state during the resting period, and are not fixed values. Second, the instantaneous heart rate fluctuation and the coefficient of variation of the respiratory rate are calculated by collecting the heart rate and respiratory rate in real time. This instantaneous heart rate fluctuation and the coefficient of variation of the respiratory rate can be used to reflect the user's current actual physiological state. That is, different users have a different set of instantaneous heart rate fluctuation, respiratory rate coefficient of variation, fluctuation adaptive threshold, and coefficient of variation adaptive threshold for that user. This set of data is used to determine whether the user is currently in a conscious state and to decide whether to automatically start the generator. Activating the electromagnetic field generator can improve the accuracy, effectiveness, and intelligence of sleep aids for users. Furthermore, the decision to activate the electromagnetic field generator is not based on a single condition, but rather on a comprehensive assessment of both heart rate and respiratory rate data. The determination is not simply based on a single instance of heart rate fluctuation exceeding an adaptive threshold or respiratory rate coefficient of variation exceeding an adaptive threshold; rather, these conditions are continuously monitored for a preset duration. This improves the accuracy of determining whether the user is awake. If the conditions are met, the user is considered awake, and the electromagnetic field generator is then activated, further enhancing the accuracy, effectiveness, and intelligence of sleep aids. Additionally, after the user actively activates the physiological state data acquisition device, the electromagnetic field generator adaptively activates based on the user's current physiological state using an intelligent sleep aid control strategy, requiring no human intervention and improving the seamlessness and intelligence of the sleep aid process.

[0059] Example 2

[0060] This application provides a second embodiment of an intelligent sleep aid method, which optimizes the "determining an adaptive threshold for volatility and an adaptive threshold for the coefficient of variation based on the collected initial heart rate and initial respiratory rate, and a preset resting duration" in the first embodiment. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0061] S211. The initial heart rate is filtered based on preset heart rate filtering conditions to obtain a filtered heart rate; wherein the heart rate filtering conditions include at least 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, the initial heart rate is filtered out; 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, the initial heart rate is filtered out.

[0062] It should be noted that although the initial heart rate and initial respiratory rate received per second by the host of the electromagnetic field generator are data obtained after filtering the raw heart rate and raw respiratory rate by the host of the physiological state data acquisition device, the initial heart rate and initial respiratory rate received per second by the host of the electromagnetic field generator may still be abnormal data. The abnormality is manifested in the following two aspects: First, the heart rate amplitude of the initial heart rate and initial respiratory rate is abnormally large; Second, the change of the initial heart rate and initial respiratory rate in the current second compared with the previous second is abnormally large.

[0063] Therefore, after obtaining the initial heart rate and initial respiratory rate, the main unit of the electromagnetic field generator needs to filter out abnormal data.

[0064] Specifically, taking the initial heart rate as an example, in order to filter out abnormal data in the initial heart rate, this embodiment has preset heart rate filtering conditions. In this embodiment, the heart rate filtering conditions include two judgment filtering judgment conditions: First, in response to the heart rate amplitude of the initial heart rate being greater than the 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 the preset heart rate difference threshold, the initial heart rate is filtered out.

[0065] In practice, once the acquired initial heart rate meets any of the heart rate filtering conditions, the initial heart rate is filtered out; if the initial heart rate is not filtered out, it is recorded as the filtered heart rate.

[0066] It should be noted that if a user's heart rate changes drastically within a short period of 1 second, exceeding the heart rate difference, it is highly unusual at rest (unless there is a sudden serious arrhythmia, but this is not the target of this device's monitoring). This is more likely due to motion causing sensor signal distortion, with the algorithm misinterpreting motion noise as a heartbeat.

[0067] In an optional embodiment, the preset heart rate difference is preferably 20 bpm. This heart rate difference is a balance between engineering experience and physiology. If the heart rate difference is set too small (e.g., 5 bpm), it will be too sensitive and may easily miss normal sinus arrhythmia. If it is set too large (e.g., 30 bpm), some obvious artifacts will be missed. 20 bpm is a robust value that can effectively capture most transient abnormal jumps caused by exercise.

[0068] S212. Filter the initial respiratory rate collected based on the preset respiratory rate filtering conditions to obtain the filtered respiratory rate.

[0069] The filtering logic of the preset respiratory rate filtering condition is the same as that of the heart rate filtering condition mentioned above, and will not be repeated here; and the respiratory rate that is not filtered out is recorded as the filtered respiratory rate.

[0070] S213. Based on the filtered heart rate and the filtered respiratory rate, as well as the preset resting duration, determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation.

[0071] The implementation logic of S213 is the same as that of step S110 in Example 1, except that the initial heart rate in step S110 is replaced with the filtered heart rate and the initial respiratory rate is replaced with the filtered respiratory rate.

[0072] It should be noted that since the initial heart rate and initial respiratory rate may be abnormal, in this embodiment, abnormal initial heart rate and initial respiratory rate are filtered out by appropriate filtering conditions. Then, the fluctuation adaptive threshold and coefficient of variation adaptive threshold are calculated by using the normal filtered heart rate and filtered respiratory rate. This can improve the accuracy of the fluctuation adaptive threshold and coefficient of variation adaptive threshold, and further improve the accuracy (precision) of the subsequent electromagnetic field generator start-up, as well as the sleep aid effect for users.

[0073] S220. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of heart rate; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the coefficient of variation of respiratory rate.

[0074] S230. 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, the electromagnetic field generator is activated.

[0075] Example 3

[0076] This application provides a third embodiment of an intelligent sleep aid method, which optimizes the "determining an adaptive threshold for volatility and an adaptive threshold for the coefficient of variation based on the filtered heart rate, the filtered respiratory rate, and a preset resting duration" in embodiment two. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0077] S311. The initial heart rate collected is filtered based on preset heart rate filtering conditions to obtain a filtered heart rate; wherein the heart rate filtering conditions include at least 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, the initial heart rate is filtered out; 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, the initial heart rate is filtered out.

[0078] S312. Filter the initial respiratory rate collected based on the preset respiratory rate filtering conditions to obtain the filtered respiratory rate.

[0079] S313A: Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array.

[0080] In this embodiment, the preset resting time is 30 minutes, or 1800 seconds. Under the condition that all initial heart rates are not filtered out (ideal situation), 1800 filtered heart rates can be obtained within the resting time, and the set of all filtered heart rates obtained within the resting time is denoted as the 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, Determine the median heart rate of the resting heart rate array.

[0082] The median heart rate 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 this new set of data is 69, which is the median heart rate hm.

[0083] S313C. Based on the resting heart rate array and the median heart rate, determine the heart rate dispersion.

[0084] Specifically, the dispersion of the resting heart rate array can be calculated using the resting heart rate array and the corresponding median heart rate, denoted as heart rate dispersion hd. This heart rate dispersion is used to characterize the general range of heart rate fluctuations when the filtered heart rate fluctuates relative to the median heart rate within the resting duration.

[0085] S313D: Based on the median heart rate, the heart rate dispersion, and the preset heart rate dispersion coefficient, determine the adaptive threshold for volatility.

[0086] The volatility adaptive threshold T1 is calculated in accordance with the following formulas regarding the median heart rate hm and the heart rate dispersion hd:

[0087] T1 = hm + K·hd; where K is the preset heart rate dispersion coefficient, which takes the value of 3 or 4;

[0088] It should be noted that since the median heart rate (hm) and heart rate dispersion (hd) are calculated based on the heart rate data measured by the user during the resting period, and the adaptive fluctuation threshold T1 can be calculated at the end of the resting period, it indicates that the adaptive fluctuation threshold T1 is closely related to the user's actual physiological state during the resting period. Different users have different physiological state data during the resting period. Therefore, the adaptive fluctuation threshold T1 achieves adaptive changes based on the user's actual physiological state during the resting period, rather than being a fixed threshold. This improves the accuracy of the threshold setting, thereby facilitating the improvement of the accuracy of subsequent sleep aids for users.

[0089] Furthermore, the heart rate dispersion (hd) characterizes the general range of heart rate fluctuations when the filtered heart rate fluctuates relative to the median heart rate over a resting period. For users with relatively small fluctuations, the heart rate dispersion (hd) is small, resulting in a smaller calculated volatility adaptive threshold (T1). Subsequent checks are needed to determine if the instantaneous heart rate volatility exceeds the volatility adaptive threshold (T1). If the volatility adaptive threshold (T1) is small, even slight instantaneous heart rate fluctuations are more likely to trigger this condition. Conversely, for users with large fluctuations, the heart rate dispersion (hd) is large, resulting in a larger calculated volatility adaptive threshold (T1). Subsequent checks are needed to determine if the instantaneous heart rate volatility exceeds the volatility adaptive threshold (T1). If the volatility adaptive threshold (T1) is large, even larger instantaneous heart rate volatility is required to trigger this condition. This ensures that the volatility adaptive threshold (T1) is set accurately to match the user's actual physiological state, improving the accuracy of the T1 setting.

[0090] S313E: Obtain the 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.

[0091] The logic for determining the adaptive threshold T2 of the coefficient of variation is the same as the steps S313A-S313D above, and will not be repeated here.

[0092] It should be noted that since the settings of the volatility adaptive threshold T1 and the coefficient of variation adaptive threshold T2 can accurately match the user's actual physiological state at the current time, the accuracy of the settings of the volatility adaptive threshold T1 and the coefficient of variation adaptive threshold T2 can be effectively guaranteed, thereby facilitating the subsequent improvement of the accuracy of sleep aid for users.

[0093] S320. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of heart rate; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the coefficient of variation of respiratory rate.

[0094] S330. 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, the electromagnetic field generator is activated.

[0095] Example 4

[0096] This application provides a smart sleep aid method in Embodiment 4, which optimizes the "determining heart rate dispersion based on the resting heart rate array and the median heart rate" in Embodiment 3. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0097] S411. The initial heart rate is filtered based on preset heart rate filtering conditions to obtain a filtered heart rate; wherein the heart rate filtering conditions include at least 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, the initial heart rate is filtered out; 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, the initial heart rate is filtered out.

[0098] S412. Filter the initial respiratory rate collected based on the preset respiratory rate filtering conditions to obtain the filtered respiratory rate.

[0099] S413A: Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array;

[0100] S413B, Determine the median heart rate of the resting heart rate array.

[0101] S413C1. Based on the resting heart rate in the resting heart rate array and the median heart rate, determine the absolute difference of heart rate corresponding to each resting heart rate, and obtain the absolute difference of heart rate array.

[0102] Among them, the filtered heart rate in the resting heart rate array is recorded as the resting heart rate. To calculate the heart rate dispersion (hd), it is first necessary to calculate the resting heart rate in each resting heart rate array. The absolute difference in heart rate from the median heart rate (hm) | -hm|, where i represents the order of resting heart rates in the resting heart rate array; and each resting heart rate The set of the corresponding absolute differences in heart rate is denoted as the absolute difference in heart rate array.

[0103] For example, suppose the median heart rate 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 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 heart rates to obtain the heart rate dispersion.

[0106] The heart rate dispersion is the median of the heart rate absolute difference array. Taking the heart rate absolute difference array [1,1,0, 56, 0, 1, 2] as an example, the median of the heart rate absolute difference array is 1, that is, the heart rate dispersion is 1. It indicates that most resting heart rates in the resting heart rate array fluctuate within a range of 1 bpm above and below 69 bpm.

[0107] S413D: Based on the median heart rate, the heart rate dispersion, and the preset heart rate dispersion coefficient, determine the adaptive threshold for volatility.

[0108] S413E: Obtain the 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.

[0109] S420. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous heart rate fluctuation; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the respiratory rate variation coefficient.

[0110] S430. 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, the electromagnetic field generator is activated.

[0111] Example 5

[0112] This application provides a smart sleep aid method in Embodiment 5, which optimizes the "determining the respiratory rate variation coefficient based on the initial respiratory rate corresponding to the respiratory rate sliding window" in Embodiment 2. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0113] S211. The initial heart rate is filtered based on preset heart rate filtering conditions to obtain a filtered heart rate; wherein the heart rate filtering conditions include at least 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, the initial heart rate is filtered out; 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, the initial heart rate is filtered out.

[0114] S512. Filter the initial respiratory rate collected based on the preset respiratory rate filtering conditions to obtain the filtered respiratory rate.

[0115] S513. Based on the filtered heart rate and the filtered respiratory rate, as well as the preset resting duration, determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation.

[0116] S521. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of the heart rate.

[0117] Each heart rate sliding window contains multiple (five in this embodiment) initial heart rates, and the standard deviation of the multiple initial heart rates corresponding to the heart rate sliding window is denoted as the instantaneous heart rate variability.

[0118] It should be noted that the greater the instantaneous fluctuation of the heart rate, the more likely the user is to be awake.

[0119] S522. Determine the post-filtration respiratory rate array based on the post-filtration respiratory rate corresponding to the respiratory rate sliding window.

[0120] The set of multiple (60 in this embodiment) post-filtration respiratory rates corresponding to the respiratory rate sliding window is denoted as the post-filtration respiratory rate array.

[0121] S523. Determine the mean and standard deviation of the filtration respiration rate corresponding to the filtration respiration rate array.

[0122] The post-filtration respiratory rate array contains multiple post-filtration respiratory rates. To calculate the coefficient of variation of the respiratory rate corresponding to the post-filtration respiratory rate array, this step requires first calculating the mean and standard deviation of each post-filtration respiratory rate in the array. The mean is recorded as the post-filtration respiratory rate mean, and the standard deviation is recorded as the post-filtration respiratory rate standard deviation.

[0123] S524. Determine the coefficient of variation of the respiratory rate based on the mean of the filtered respiratory rate and the standard deviation of the filtered respiratory rate.

[0124] The formula for calculating the coefficient of variation of respiratory rate RR_CV, the mean post-filtration respiratory rate RR_mean, and the standard deviation of post-filtration respiratory rate RR_std is as follows:

[0125] RR_CV = (RR_std / RR_mean) · 100%;

[0126] It should be noted that the respiratory rate variation coefficient is used to reflect the changes in respiratory intervals. This embodiment uses the respiratory rate variation coefficient as a criterion rather than the filtered respiratory rate standard deviation (RR_std) because: when awake, breathing is affected by consciousness, speaking, sighing, etc., resulting in irregular rhythms and larger variations in respiratory intervals, i.e., a larger RR_std. When the user sleeps, breathing is dominated by the brainstem center, the rhythm becomes very regular, and RR_std significantly decreases. The respiratory rate variation coefficient (RR_CV) is a relative value, eliminating the influence of individual baseline respiratory rate (e.g., RR_mean 12 breaths / minute vs 18 breaths / minute) on the absolute value of fluctuation, making the threshold more universal. The respiratory rate variation coefficient is usually below 25% during sleep, while it can reach 30%-40% or more when awake.

[0127] S530. 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, the electromagnetic field generator is activated.

[0128] Example 6

[0129] This application provides a smart sleep aid method in Embodiment Six, which supplements the method described in Embodiment One. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0130] S610. Based on the collected initial heart rate and initial respiratory rate, and the preset resting time, determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation.

[0131] S620. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of heart rate; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the coefficient of variation of respiratory rate.

[0132] S630. 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, the electromagnetic field generator is activated.

[0133] S640. 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 the continuous duration being preset, and the on-time of the electromagnetic field generator being greater than or equal to the preset on-time threshold, the electromagnetic field generator is turned off.

[0134] It should be noted that the electromagnetic field emitted by the electromagnetic field generator can help users fall asleep when they are relatively awake. However, if the user has already fallen asleep and the electromagnetic field generator continues to emit electromagnetic fields, the electromagnetic fields will affect the user's sleep. Therefore, the electromagnetic field generator should be turned off in time when it is determined that the user has fallen asleep.

[0135] In this embodiment, turning off the electromagnetic field generator requires at least two judgment conditions to be met: First, it is determined that the instantaneous fluctuation of the heart rate is less than the fluctuation adaptive threshold and the coefficient of variation of the respiratory rate is less than the coefficient of variation adaptive threshold, and the judgment result continues for a preset continuous duration; Second, the on-time of the electromagnetic field generator is greater than or equal to the preset on-time threshold.

[0136] In this embodiment, the preset continuous duration is preferably 3 minutes. In other embodiments, the specific duration is not limited. It should be noted that the purpose of further determining whether the judgment result should be continuously preset for a continuous duration after determining that the instantaneous fluctuation of heart rate is less than the fluctuation adaptive threshold and the coefficient of variation of respiratory rate is less than the coefficient of variation adaptive threshold is to avoid misjudgment caused by the accidental situation that the instantaneous fluctuation of heart rate is less than the fluctuation adaptive threshold and the coefficient of variation of respiratory rate is less than the coefficient of variation adaptive threshold only in a single second or for a very short period of time. Making the above judgment result continuously preset for a continuous duration can ensure the stability and accuracy of the judgment result of whether the user is in a sleep state, thereby improving the shut-off accuracy when the electromagnetic field is subsequently turned off.

[0137] Furthermore, in this embodiment, the second judgment condition, namely that the on-time of the electromagnetic field generator is greater than or equal to a preset on-time threshold, serves to ensure that the electromagnetic field generator can continue to operate for a period of time after being turned on, avoiding frequent on-and-off cycles that could interfere with the user's sleep, thus helping to improve the sleep-aiding effect. In this embodiment, the preset on-time threshold is preferably 30 minutes.

[0138] Example 7

[0139] This application provides a smart sleep aid method in Embodiment Seven, which supplements the method described in Embodiment Six. It should be noted that for parts not detailed in this embodiment, please refer to the descriptions in other embodiments. The method includes:

[0140] S710. Based on the collected initial heart rate and initial respiratory rate, and the preset resting time, determine the adaptive threshold for volatility and the adaptive threshold for coefficient of variation.

[0141] S720. Based on the initial heart rate corresponding to the heart rate sliding window, determine the instantaneous fluctuation of heart rate; based on the initial respiratory rate corresponding to the respiratory rate sliding window, determine the coefficient of variation of respiratory rate.

[0142] S730, 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, the electromagnetic field generator is activated.

[0143] S740. 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 the continuous duration being preset, and the on-time of the electromagnetic field generator being greater than or equal to the preset on-time threshold, the electromagnetic field generator is turned off.

[0144] S750. In response to the electromagnetic field generator's shutdown duration being greater than a preset shutdown duration threshold, re-determine whether to start the electromagnetic field generator.

[0145] If the electromagnetic field generator is turned on again within a short period of time after it has been turned off, the generator will frequently turn on and off, thus interfering with the user's sleep. Therefore, if the user is detected to have returned to a waking state within a short period of time after the electromagnetic field generator has been turned off, the generator should not be turned on immediately. It should only be turned on under certain conditions.

[0146] In this embodiment, the specific condition is that the shutdown duration of the electromagnetic field generator is greater than a preset shutdown duration threshold; wherein, the preset shutdown duration threshold is preferably 10 minutes. If this condition is met, the determination of whether to turn on the electromagnetic field generator is repeated according to the steps shown in Embodiment 1.

[0147] It should be noted that in the intelligent sleep aid methods shown in the above embodiments, after the user is ready to fall asleep, there is no need to operate or set the device. The electromagnetic field generator can automatically turn on and off according to the user's actual physiological state, which improves the intelligence and non-intrusiveness of sleep aid and saves device energy consumption.

[0148] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0149] Example 8

[0150] Based on the same inventive concept, this embodiment also provides an intelligent sleep aid device for implementing the intelligent sleep aid method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more intelligent sleep aid device embodiments provided below can be found in the limitations of the intelligent sleep aid method described above, and will not be repeated here.

[0151] In this embodiment, as Figure 2 As shown, a smart sleep aid device is provided, comprising:

[0152] 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.

[0153] 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.

[0154] 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.

[0155] The modules in the aforementioned intelligent sleep aid device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0156] It should be noted that this embodiment uses the condition that the instantaneous heart rate fluctuation exceeds the fluctuation adaptive threshold and the respiratory rate coefficient of variation exceeds the coefficient of variation adaptive threshold, and a preset judgment period is used as the automatic start condition for the electromagnetic field generator. First, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are calculated by collecting the user's heart rate and respiration during the user's resting period. That is, the fluctuation adaptive threshold and the coefficient of variation adaptive threshold are adaptive and depend on the user's actual physiological state during the resting period, and are not fixed values. Second, the instantaneous heart rate fluctuation and the coefficient of variation of the respiratory rate are calculated by collecting the heart rate and respiratory rate in real time. This instantaneous heart rate fluctuation and the coefficient of variation of the respiratory rate can be used to reflect the user's current actual physiological state. That is, different users have a different set of instantaneous heart rate fluctuation, respiratory rate coefficient of variation, fluctuation adaptive threshold, and coefficient of variation adaptive threshold for that user. This set of data is used to determine whether the user is currently in a conscious state and to decide whether to automatically start the generator. Activating the electromagnetic field generator can improve the accuracy, effectiveness, and intelligence of sleep aids for users. Furthermore, the decision to activate the electromagnetic field generator is not based on a single condition, but rather on a comprehensive assessment of both heart rate and respiratory rate data. The determination is not simply based on a single instance of heart rate fluctuation exceeding an adaptive threshold or respiratory rate coefficient of variation exceeding an adaptive threshold; rather, these conditions are continuously monitored for a preset duration. This improves the accuracy of determining whether the user is awake. If the conditions are met, the user is considered awake, and the electromagnetic field generator is then activated, further enhancing the accuracy, effectiveness, and intelligence of sleep aids. Additionally, after the user actively activates the physiological state data acquisition device, the electromagnetic field generator adaptively activates based on the user's current physiological state using an intelligent sleep aid control strategy, requiring no human intervention and improving the seamlessness and intelligence of the sleep aid process.

[0157] In an optional embodiment, determining the adaptive threshold for volatility and the adaptive threshold for coefficient of variation based on the acquired initial heart rate and initial respiratory rate, and a preset resting duration, includes:

[0158] The initial heart rate is filtered based on preset heart rate filtering conditions to obtain the filtered heart rate.

[0159] The initial respiratory rate is filtered based on preset respiratory rate filtration conditions to obtain the filtered respiratory rate.

[0160] 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.

[0161] The heart rate filtering conditions include at least one of the following:

[0162] If the initial heart rate amplitude is greater than a preset heart rate amplitude threshold, the initial heart rate is filtered out.

[0163] 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.

[0164] In an optional embodiment, determining the adaptive threshold for volatility and the adaptive threshold for coefficient of variation based on the filtered heart rate, the filtered respiratory rate, and a preset resting duration includes:

[0165] Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array;

[0166] Determine the median heart rate of the resting heart rate array;

[0167] Based on the resting heart rate array and the median heart rate, the heart rate dispersion is determined;

[0168] Based on the median heart rate, the heart rate dispersion, and the preset heart rate dispersion coefficient, an adaptive threshold for volatility is determined.

[0169] Obtain the respiratory rate within a preset resting time to obtain a resting respiratory rate array; based on the resting respiratory rate array, determine an adaptive threshold for the coefficient of variation.

[0170] In an optional embodiment, determining the heart rate dispersion based on the resting heart rate array and the median heart rate includes:

[0171] 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.

[0172] The median corresponding to the absolute difference array of heart rates is determined to obtain the heart rate dispersion.

[0173] In an optional embodiment, determining the coefficient of variation of respiratory rate based on the initial respiratory rate corresponding to the respiratory rate sliding window includes:

[0174] Based on the filtered respiratory rate corresponding to the respiratory rate sliding window, a filtered respiratory rate array is determined;

[0175] Determine the mean and standard deviation of the filtered respiration rate corresponding to the filtered respiration rate array;

[0176] 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.

[0177] In an optional embodiment, the smart sleep aid device further includes:

[0178] The generator shutdown module is used to shut down the electromagnetic field generator in response to the following: the instantaneous heart rate fluctuation is less than the fluctuation adaptive threshold, the respiratory rate coefficient of variation is less than the coefficient of variation adaptive threshold, and these conditions are maintained for a preset continuous duration; and the on-time of the electromagnetic field generator is greater than or equal to a preset on-time threshold.

[0179] In an optional embodiment, the smart sleep aid device further includes:

[0180] The generator restart module is used to re-determine whether to restart the electromagnetic field generator in response to the shutdown duration of the electromagnetic field generator exceeding a preset shutdown duration threshold.

[0181] Example 9

[0182] In this embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows. Figure 3 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements an intelligent sleep aid method.

[0183] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion 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 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0184] Example 10

[0185] In this embodiment, a computer-readable storage medium is provided, such as... Figure 4 As shown, a computer program is stored thereon, and when the computer program is executed by the processor, it implements the steps in the above-described method embodiments.

[0186] Example 11

[0187] In this embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0188] It should be noted that the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, necessary confidentiality measures have been taken, and it does not violate public order and good morals. Corresponding operation portals are provided for users to choose to authorize or refuse.

[0189] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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 random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this disclosure may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this disclosure may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0190] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0191] The embodiments described above are merely illustrative of several implementations of this disclosure, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent disclosure. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this disclosure, and these all fall within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by 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.

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 adaptive threshold for volatility and the adaptive threshold for coefficient of variation based on the filtered heart rate, the filtered respiratory rate, and the preset resting duration includes: Obtain the filtered heart rate within a preset resting time to obtain a resting heart rate array; 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 respiratory rate within a preset resting time to obtain a resting respiratory rate array; based on the resting respiratory rate array, determine an adaptive threshold for the coefficient of variation.

4. The method according to claim 3, characterized in that, The determination of 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.

5. 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.

6. 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.

7. The method according to claim 6, 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.

8. 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.

9. 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 7.

10. 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 7.

Citation Information

Patent Citations

  • Sleep staging method, device and equipment based on wearable equipment and storage medium

    CN114631790A

  • Non-contact respiratory sleep syndrome monitoring and early warning device

    CN120360504A

  • Human body respiration index monitoring management method and system based on cloud platform

    CN120514364A

  • Patient recovery evaluation method and system based on intelligent sensor

    CN120853943A

  • Sleep light awakening method based on user sleep curve

    CN121101480A