Sleep-aiding sound closing method, breathing machine and controller

By comparing the respiratory rate and tidal volume with the baseline values, and combining a hybrid volume attenuation algorithm and a high-precision timer, the sleep-aiding sound can be gradually turned off, solving the problem of inaccurate shutoff of the sleep-aiding sound, and improving the sleep experience and the matching degree between the system and individual sleep characteristics.

CN120679065APending Publication Date: 2025-09-23BORISTAI (SHENZHEN) MEDICAL EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510530037.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

The existing method of turning off sleep-aid sounds lacks accurate judgment. It may turn off the sleep-aid sounds before the user falls asleep, interrupting the sleeping atmosphere, or continue to play the sounds after the user enters deep sleep, interfering with sleep quality and causing energy waste.

Method used

By obtaining the target respiratory rate and tidal volume and comparing them with the baseline values ​​in the sleeping state, a hybrid volume attenuation algorithm is used to gradually turn off the sleep-aiding sound. Combined with the collaborative control of the high-precision timer and audio playback module, the sound intensity is ensured to decrease steadily.

Benefits of technology

It achieves precise shutoff of sleep-aiding sounds, avoids auditory stress response, improves the continuity and comfort of the sleep experience, and reduces the impact of external interference on sleep. Users can independently adjust the system response mechanism to match individual sleep characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120679065A_ABST
    Figure CN120679065A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of sleep-aiding sound turn-off, and discloses a sleep-aiding sound turn-off method, a breathing machine and a controller. The method comprises the steps of obtaining a target respiratory rate, a target tidal volume, a target respiratory rate reference value and a target tidal volume reference value, comparing the target respiratory rate with the target respiratory rate reference value to obtain a first result, and comparing the target tidal volume with the target tidal volume reference value to obtain a second result, judging that the user enters a sleep state according to the first result and the second result, determining that the user enters the sleep state, and stopping playing the sleep-aiding sound. According to the embodiment of the invention, the target respiratory rate, the target tidal volume, the target respiratory rate reference value and the target tidal volume reference value can be acquired and compared and analyzed, so that the sleep-aiding sound can be closed after the user enters the sleep state, a more intelligent solution for closing the sleep-aiding sound is provided for the user, and the user experience is improved. The user can enter the sleep state more comfortably, and the overall sleep experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of shutting off sleep-aid sounds, and in particular to a method for shutting off sleep-aid sounds, a ventilator, and a controller. Background Art

[0002] In the healthcare field, sleep apnea machines are widely used to help people with breathing disorders improve their sleep quality. However, a large proportion of people who use sleep apnea machines also experience insomnia and difficulty falling asleep. These users often rely on devices such as mobile phones and radios to play sleep-inducing sounds to assist them in falling asleep.

[0003] However, the existing control method for playing sleep-aiding sounds has obvious limitations. On the one hand, there is a lack of accurate judgment basis for turning off the sleep-aiding sounds. If it is turned off too early, the user may not have fallen asleep yet. Restarting the sleep-aiding sounds at this time is not only inconvenient to operate, but also interrupts the sleeping atmosphere that the user has just established, making it more difficult to fall asleep and greatly reducing the sleep-aiding effect. On the other hand, if the sleep-aiding sounds continue to play, even if the user has entered a deep sleep, the unnecessary sounds may interfere with sleep, affecting the depth and quality of sleep, and causing unnecessary energy waste. Summary of the Invention

[0004] One purpose of the embodiments of the present application is to provide a method for turning off sleep-aiding sounds, a ventilator, a controller, and a computer storage medium to solve the technical problem that it is difficult to define the time point for turning off the sleep-aiding sounds.

[0005] In a first aspect, an embodiment of the present application provides a method for turning off sleep-aiding sounds, which is applied to a ventilator. The method includes:

[0006] Obtain a target respiratory rate, a target tidal volume, a target respiratory rate baseline value, and a target tidal volume baseline value, wherein the target respiratory rate is the respiratory rate of the user when the ventilator plays a sleep-aiding sound, the target tidal volume is the tidal volume of the user when the ventilator plays a sleep-aiding sound, the target respiratory rate baseline value is the respiratory rate baseline value of the user in a sleeping state, and the target tidal volume baseline value is the tidal volume baseline value of the user in a sleeping state;

[0007] Comparing the target respiratory rate with the target respiratory rate reference value to obtain a first result, and comparing the target tidal volume with the target tidal volume reference value to obtain a second result;

[0008] determining that the user enters a sleeping state according to the first result and the second result;

[0009] Determine that the user has entered a sleeping state, and stop playing the sleep-aiding sound.

[0010] Optionally, determining that the user enters a sleeping state and turning off the playing of the sleep-aiding sound includes:

[0011] Obtaining a target volume value, wherein the target volume value is the volume value currently played by the ventilator;

[0012] Obtaining a target volume value and a target off threshold, wherein the target volume value is the volume value currently played by the ventilator, and the target off threshold is the volume value currently determined to be off for playing the sleep-aiding sound;

[0013] generating an attenuation volume table according to the hybrid volume attenuation algorithm and the target volume value, wherein the attenuation volume table includes the volume value corresponding to each time point during the volume attenuation process;

[0014] Update the volume value corresponding to each time point according to the attenuation volume table;

[0015] Determine the time point corresponding to when the volume value is equal to the target closing threshold as the target time point;

[0016] When the target time point is detected, the playing of the sleep-aiding sound is turned off.

[0017] The embodiment of the present application implements a progressive attenuation shutdown strategy for sleep-aiding sounds by constructing an intelligent control mechanism based on a hybrid volume attenuation algorithm. The system dynamically generates an accurate volume attenuation curve based on the pre-set total attenuation duration, adjustment frequency, and target shutdown threshold. During playback, the volume amplitude is adjusted frame by frame with second-level accuracy using the collaborative control of a high-precision timer and the audio playback module to ensure that the sound intensity decreases steadily following the preset curve until the target shutdown threshold is reached and playback is terminated. It effectively avoids the auditory stress response that may be caused by the sudden shutdown of sleep-aiding sounds in traditional solutions, and by simulating the gradual weakening of natural sounds, it significantly reduces interference with the user's sleep state, and effectively improves the continuity and comfort of the user's sleep experience.

[0018] Optionally, before the target time point is detected and the playing of the sleep-aiding sound is turned off, the method further includes:

[0019] Obtain the baseline values ​​of awake respiratory rate and awake tidal volume;

[0020] Comparing the target respiratory rate with the awake respiratory rate reference value to obtain a third result, and comparing the target tidal volume with the awake tidal volume reference value to obtain a fourth result;

[0021] determining that the user enters a sober state according to the third result and the fourth result;

[0022] Determine that the user is awake, and play the sleep-aiding sound at the current volume.

[0023] The embodiment of the present application can continue to play the sleep-aiding sound after detecting that the user is awake during the volume attenuation process, and terminate the task of shutting down the sleep-aiding sound, effectively avoiding the operation process in which the user needs to manually restart the sleep-aiding sound in the traditional solution, eliminating the destruction of the sleep atmosphere due to human intervention, and minimizing the impact of external interference on the sleep state, helping the user to quickly fall asleep again in a comfortable and uninterrupted sleep-aiding environment, significantly improving the user's sleep experience.

[0024] Optionally, after the target time point is detected and the playing of the sleep-aiding sound is turned off, the method further includes:

[0025] Obtaining the third result and the fourth result corresponding to the target time point;

[0026] determining whether the user enters a wakeful state based on the third result and the fourth result corresponding to the target time point;

[0027] If it is determined that the user has entered a wakeful state, adjusting the shutdown threshold;

[0028] If it is determined that the user has not entered the awake state, the closing threshold remains unchanged.

[0029] The embodiment of the present application can construct an adaptive adjustment mechanism. When it is detected that turning off the sleep-aiding sound causes the user to wake up, the shutdown threshold is automatically adjusted. Through continuous parameter optimization and feedback correction, the mechanism gradually achieves a precise match between the shutdown threshold and the user's sound sensitivity, effectively reducing the stress response caused by turning off the sound, forming a personalized control strategy that fits the individual's sleep characteristics, and improving the user experience.

[0030] Optionally, obtaining a target respiratory rate reference value and a target tidal volume reference value includes:

[0031] Obtain a sensitivity setting request, where the sensitivity setting request carries a target sensitivity set by a user;

[0032] Obtaining a historical respiratory rate baseline value, a historical tidal volume baseline value, and a preset duration, wherein the historical respiratory rate baseline value is the longest-lasting respiratory rate of the user during the last sleep state, the historical tidal volume baseline value is the longest-lasting tidal volume of the user during the last sleep state, and the preset duration is the shortest time required to determine that the user has entered a sleep state;

[0033] The historical respiratory rate reference value, the historical tidal volume reference value, and the preset duration are adjusted according to the target sensitivity to obtain the target respiratory rate reference value, the target tidal volume reference value, and the target preset duration.

[0034] The embodiments of this application enable users to independently adjust the system's response mechanism through an open sensitivity setting function. Users can flexibly select an adaptive mode from three sensitivity options: high, medium, and low, based on their last usage, effectively improving the system's matching with their individual sleep characteristics and significantly optimizing the system's interactive experience.

[0035] Optionally, the determining whether the user enters a sleeping state according to the first result and the second result includes:

[0036] If the first result is that the target respiratory rate is less than or equal to the target respiratory rate reference value, and the second result is that the target tidal volume is less than or equal to the target tidal volume reference value, and the maintenance time reaches the target preset time length, it is determined that the user enters a sleep state.

[0037] Optionally, obtaining the target respiratory rate and target tidal volume includes:

[0038] Obtaining a target respiratory flow signal, wherein the target respiratory flow signal is a respiratory flow signal of the user when the sleep-aiding sound is played;

[0039] The target respiratory rate and the target tidal volume are calculated according to the target respiratory flow signal.

[0040] In a second aspect, an embodiment of the present application provides a ventilator, comprising:

[0041] case;

[0042] a blower, disposed in the housing;

[0043] a flow sensor, disposed in the housing;

[0044] a pressure sensor, disposed in the housing;

[0045] a humidifier, disposed in the housing;

[0046] a speaker, disposed in the housing;

[0047] An audio playback module is disposed in the housing;

[0048] a wireless communication module, disposed in the housing;

[0049] A user interaction device, disposed on the housing;

[0050] The controller is respectively connected to the blower, the flow sensor, the pressure sensor, the millimeter-wave radar sensor, the humidifier, the speaker, the audio playback module, the wireless communication module and the user interaction device, and can execute the above-mentioned sleep-aid sound turning off method.

[0051] In a third aspect, an embodiment of the present application provides a controller comprising a memory and a processor, wherein the memory is connected to the processor, and the processor is configured to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the controller implements the above-mentioned method of turning off sleep-aid sounds.

[0052] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the above-mentioned method for turning off sleep-aid sounds.

[0053] The embodiments of the present application can achieve the following technical effects: in the method for turning off the sleep-aiding sound provided in the embodiments of the present application, the target respiratory frequency, target tidal volume, target respiratory frequency baseline value and target tidal volume baseline value are obtained, the target respiratory frequency is compared with the target respiratory frequency baseline value to obtain a first result, the target tidal volume is compared with the target tidal volume baseline value to obtain a second result, and the user is judged to have entered a sleep state based on the first result and the second result, and after determining that the user has entered a sleep state, the sleep-aiding sound is turned off. The embodiments of the present application can accurately determine that the user has entered a sleep state and turn off the sleep-aiding sound by obtaining the target respiratory frequency, target tidal volume, target respiratory frequency baseline value and target tidal volume baseline value and comparing and analyzing them, thereby providing the user with a more intelligent solution for turning off the sleep-aiding sound, allowing the user to enter a sleep state more comfortably and improve the overall sleep experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1a A schematic structural diagram of a ventilator provided in an embodiment of the present application;

[0056] Figure 1b A circuit block diagram of a ventilator provided in an embodiment of the present application;

[0057] Figure 2 A flowchart of a method for turning off sleep-aid sounds provided in an embodiment of the present application;

[0058] Figure 3 A schematic diagram of a respiratory flow signal provided in an embodiment of the present application

[0059] Figure 4 A schematic diagram of the structure of a sleep-aid sound turning-off device provided in an embodiment of the present application;

[0060] Figure 5 This is a schematic diagram of the structure of a controller provided in an embodiment of the present application; DETAILED DESCRIPTION

[0061] In order to make the purpose, technical solutions and advantages of this application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0062] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other and are all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart. Furthermore, the words "first", "second", "third", etc. used in this application do not limit the data and execution order, but only distinguish between the same items or similar items with basically the same functions and effects.

[0063] See also Figure 1a and Figure 1b A ventilator 100 provided in an embodiment of the present application includes a housing 11, a blower 12, a flow sensor 13, a pressure sensor 14, an audio playback module 15, a humidifier 16, a speaker 17, a controller 18, a wireless communication module 19 and a user interaction device 20.

[0064] The housing 11 can be configured in any suitable shape, such as a triangular prism, an irregular shape, etc. Within the housing 11, a corresponding structure can be configured based on the operating characteristics of the ventilator 100. For example, if the ventilator 100 is used to deliver air at a suitable temperature and humidity, the interior of the housing 11 can be configured with a structure for accommodating a water tank treated by the humidifier 16, a channel for refilling the water tank, and / or a detachable structure for removing the water tank.

[0065] The blower 12 is disposed in the housing 11 and is used to deliver air to the user. During operation, the controller 18 sends control instructions to the blower 12, and the blower 12 delivers airflow of different pressures and adjusts the speed of the airflow according to the control instructions.

[0066] In some embodiments, the blower 12 can be a centrifugal blower, a turbine blower, or a silent brushless DC motor blower. A centrifugal blower generates centrifugal force through a high-speed rotating impeller, drawing air in from the center and ejecting it radially to form a stable airflow. It is compact and quiet, making it suitable for home ventilators. A turbine blower is similar to a centrifugal blower, but uses turbine blades with higher speeds. It achieves efficient airflow output through axial air intake and radial air outlet. Its high speed provides fast response, making it suitable for the dual-pressure switching requirements of BiPAP. A silent brushless DC motor blower, by using a brushless DC motor, eliminates brush friction noise, improving energy efficiency and reliability. It also has a built-in sensor for real-time noise monitoring, using reverse sound waves to offset vibration noise, making it more suitable for users who are extremely sensitive to noise.

[0067] The flow sensor 13 is located within the housing 11 and is used to detect changes in airflow in real time, ensuring that the ventilator 100 accurately responds to the user's breathing needs. The flow sensor 13 can detect the user's inhalation and exhalation time, flow rate, and tidal volume (the amount of gas per breath), forming a respiratory waveform for determining breathing patterns. For example, in CPAP mode, if the flow sensor 13 detects a sudden increase in flow rate when the user inhales, it will send a signal to the controller 18, which will then respond by controlling the blower 12 to briefly increase the airflow to maintain airway patency.

[0068] In some embodiments, the flow sensor 13 may be a differential pressure sensor, a hot wire sensor, an ultrasonic sensor, or the like. A differential pressure sensor can measure the pressure difference before and after an airflow passes through a narrow passage to infer the flow velocity, and is low-cost and simple in structure. A hot wire sensor can calculate the flow velocity by heating a metal wire and causing a change in resistance due to the cooling effect of the airflow. An ultrasonic sensor can emit ultrasonic waves and calculate the flow velocity by measuring the effect of the airflow on the propagation time of the sound waves.

[0069] The pressure sensor 14 is disposed in the housing 11 and is used to monitor changes in airway pressure in real time to ensure that the pressure output by the ventilator 100 is accurate and stable. The pressure sensor 14 can continuously monitor the airway pressure output by the ventilator to ensure that the actual pressure is consistent with the preset value (the error is usually ≤±0.5cmH2O). In addition, the pressure sensor 14 provides pressure data and the flow sensor 13 provides flow rate data. The combination of the two can calculate parameters such as airway resistance and lung compliance. The signal of the pressure sensor 14 is fed back to the controller 18 to achieve real-time regulation of the blower 12 speed to maintain the target pressure.

[0070] In some embodiments, the pressure sensor 14 can also dynamically adjust pressure based on the user's breathing cycle. During the inspiratory phase, the pressure sensor 14 detects the user's inspiratory effort (a brief drop in pressure), triggering the ventilator to increase pressure to assist inspiration (the IPAP phase of BiPAP). During the expiratory phase, the pressure sensor 14 detects the start of exhalation (a rise in pressure), and rapidly reduces pressure to reduce expiratory resistance (the EPAP phase of BiPAP).

[0071] The audio playback module 15 is arranged in the shell 11 and is responsible for accurately controlling the playback process of the sleep-aiding sound according to preset parameters, such as the volume attenuation curve, the target shutdown threshold, etc., including correctly decoding the audio data at the beginning of playback and converting it into an analog signal for amplification and output, and gradually adjusting the volume according to the monitoring results of the timer during playback until the target shutdown threshold is reached and playback is stopped, so as to achieve progressive shutdown of the sleep-aiding sound, avoid waking the user, and thus improve the user's sleep experience.

[0072] In some embodiments, the audio playback module 15 includes an audio decoding chip, a digital-to-analog converter (DAC), a power amplifier, an audio filter, and a microcontroller. The microcontroller is electrically connected to the audio decoding chip, DAC, power amplifier, and audio filter. The audio decoding chip's main function is to decode various audio formats; the DAC converts digital audio signals into analog audio signals; the power amplifier amplifies the analog audio signals to provide sufficient power to drive the speakers; the audio filter filters the audio signal, removing noise and unwanted frequency components to enhance audio purity; and the microcontroller controls various functions of the audio playback module, such as volume adjustment and playback mode switching.

[0073] The humidifier 16 is arranged in the housing 11 and is used to heat and humidify the conveying air flow, simulating the humid environment of the human body during natural breathing, and avoiding the irritation of the respiratory mucosa by dry air. The positive pressure airflow continuously output by the ventilator 100 will accelerate the evaporation of water from the nasal cavity and throat mucosa, leading to problems such as dry mouth, nasal congestion, and nose bleeding. The humidifier 16 can increase the humidity of the gas by 60-80%, maintain the moisture of the mucosa, and reduce mechanical ventilation-related damage. In addition, by precisely controlling the gas temperature (usually set to 27-30°C), the temperature of the humidified gas in the pipeline is higher than the ambient dew point, avoiding the condensation of water vapor to form "pipeline water accumulation".

[0074] In some embodiments, the humidifier 16 can also be a passive humidifier, which does not require water or electricity. It captures moisture and heat in the patient's exhaled gas through hygroscopic materials (such as lithium chloride or high molecular polymers) to humidify the inhaled gas. It is suitable for short-term use (such as travel, hospital transfer) or scenarios where there is no power access.

[0075] The speaker 17 is arranged on the shell 11 and is used to output audio signals to achieve safety monitoring, operation guidance and intelligent interaction through sound feedback. The controller 18 controls the speaker 17 to output corresponding audio signals according to preset logic, such as please check the water tank, please check the mask connection, etc.

[0076] The wireless communication module 19 is disposed within the housing 11 and is capable of wireless data transmission through various wireless communication technologies, such as Wi-Fi, Bluetooth, ZigBee, 4G / 5G, etc. The ventilator 100 can connect to Wi-Fi or establish a connection with a wireless router or hotspot through the wireless communication module 19, and can connect to the Internet, thereby accessing various resources on the Internet and obtaining online resources for sleep-aiding sounds, thereby meeting the diverse needs of different users for sound resources.

[0077] The user interaction device 20 is provided in the housing 11 and is used to control the operation of the device and set functional parameters. The user interaction device 20 includes two levels: hardware structure and software logic. The hardware structure includes physical buttons, rotary buttons and touch screens, etc. The physical buttons can realize power on and off, mode switching and parameter adjustment, etc. The rotary button can quickly adjust the value, such as adjusting the pressure range. The touch screen can graphically navigate the menu and visualize the relevant data. The software logic level includes the user interface architecture, which can adopt a tree structure, with the main menu and submenu levels not exceeding 3 layers to ensure that the operation path is simple so that the elderly can get started quickly.

[0078] In some embodiments, users can select "Sleep Aid Mode" on the main interface and choose the type and source of sleep-aid sounds. Sound types can include white noise (rain, wind, etc.), soft music, or human voices, and the source can be preset or online. Then, they can enter the secondary interface and select "Sensitivity Settings." Using the rotary knob or touchscreen, they can select one of the three preset sensitivity options: high, medium, or low to activate Sleep Aid Mode.

[0079] The controller 18 can send control instructions to the blower 12 to control the output power of the airflow delivered by the blower 12; the controller 18 can receive the airflow data fed back by the flow sensor 13 in real time. Once the flow rate data changes abnormally, such as exceeding the normal range, the controller 18 will start the corresponding adjustment mechanism according to the preset algorithm, such as adjusting the output power of the blower 12 to ensure the stability and adaptability of the airflow delivered by the ventilator; the controller 18 can receive the airway pressure data fed back by the pressure sensor 14, and compare it with the preset value. If the pressure data exceeds or falls below the preset safety threshold range, the controller 18 will control the speed of the blower 12 to accurately adjust the airflow. tract pressure; the controller 18 can send a control instruction to the audio playback module 15, and the audio playback module 15 turns on or off the sleep-aiding sound according to the control instruction; the controller 18 sends a control instruction to the humidifier 16 to control the humidifier 16 to adjust the temperature and humidity of the conveying air flow; the controller 18 can send a control instruction to the speaker 17, and the speaker 17 emits an audio with a sleep-aiding effect after receiving the instruction; the controller 18 uses the wireless communication module 19 to realize wireless data transmission and communicate with other devices or networks; the controller 18 can receive interaction instructions from the user interaction device 20, and control the relevant components to make adjustments according to various interaction instructions input by the user.

[0080] The controller 18 serves as the core of the ventilator 100 and is capable of coordinating the operation of the various components. The controller 18 can be a general-purpose processor (e.g., a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA, CPLD, etc.), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. In addition, the controller 18 can also be any conventional processor, controller, microcontroller, or state machine. The controller 18 can also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.

[0081] As another aspect of the present invention, the present invention provides a method for turning off sleep-aiding sounds, which is applied to the ventilator. Figure 2 , ways to turn off sleep-aid sounds include:

[0082] S21: Obtain the target respiratory rate, target tidal volume, target respiratory rate baseline value, and target tidal volume baseline value. The target respiratory rate is the user's respiratory rate when the ventilator plays the sleep-aiding sound. The target tidal volume is the user's tidal volume when the ventilator plays the sleep-aiding sound. The target respiratory rate baseline value is the user's respiratory rate baseline value when the ventilator plays the sleep-aiding sound. The target tidal volume baseline value is the user's tidal volume baseline value when the ventilator plays the sleep-aiding sound.

[0083] In this step, respiratory rate refers to the number of breaths per minute, in bpm. Tidal volume refers to the volume of gas inhaled or exhaled per breath, in ml. The flow sensor directly measures the instantaneous gas flow rate in the breathing circuit (unit: L / min or mL / s) and converts it into an electrical signal. Figure 3 , which is the waveform diagram of the user's normal breathing. In the inhalation phase, the airflow enters the user's lungs, and the electrical signal is a positive waveform. In the exhalation phase, the airflow is exhaled from the user's lungs, and the corresponding electrical signal presents a positive attenuation waveform. Please refer to Figure 3 By counting the number of complete inhalation and exhalation cycles within a unit of time (e.g., 1 minute), the respiratory rate is obtained. By integrating the curve of this electrical signal over time and calculating the total volume of gas inhaled or exhaled, the tidal volume is obtained.

[0084] As is understandable, respiratory rate and tidal volume, as fundamental physiological parameters of the human body, possess significant clinical value and research significance in the field of vital sign monitoring. They are key indicators for assessing an individual's physiological state and health level. The dynamic changes in their values ​​can provide important evidence for determining whether a person is awake or asleep. The baseline respiratory rate value is a reference value for determining whether a person is awake or asleep based on respiratory rate. During wakefulness, the reference range for adults is generally maintained between 12-20 bpm. During sleep, due to decreased metabolic rate and weakened sympathetic nerve excitability, the respiratory center's regulatory mechanism for respiratory movements changes, resulting in a corresponding decrease in respiratory rate, with a reference range of generally 10-14 bpm. The baseline tidal volume value is a reference value for determining whether a person is awake or asleep based on tidal volume. During wakefulness, the reference range for adults is generally maintained between 500-600 ml. During sleep, especially after entering deep sleep, due to general muscle relaxation, respiratory muscle contraction strength decreases, respiratory movement amplitude decreases, and tidal volume also decreases, with a reference range of generally 400-500 ml.

[0085] When the user uses the above-mentioned ventilator, after turning on the sleep-aid mode and playing the sleep-aid sound, the flow sensor collects the user's breathing vital signs to obtain a respiratory flow signal. The respiratory frequency and tidal volume are calculated based on the respiratory flow signal to obtain the target respiratory frequency and target tidal volume. The initial settings of the respiratory frequency of 16bpm and the tidal volume of 480ml are used as the respiratory frequency baseline value and tidal volume baseline value for judging whether the user has entered a sleeping state. The respiratory frequency of 20bpm and the tidal volume of 600ml are used as the respiratory frequency baseline value and tidal volume baseline value for judging whether the user has entered a waking state. The ventilator has a historical data statistics function, which can automatically record the respiratory frequency and tidal volume during each use. By continuously analyzing the user's individual breathing pattern, the respiratory frequency baseline value and tidal volume baseline value for the sleeping / waking state are corrected. After long-term use, the respiratory frequency baseline value and the tidal volume baseline value gradually match the user's personalized physiological characteristics.

[0086] S22: Compare the target respiratory frequency with the target respiratory frequency reference value to obtain a first result, and compare the target tidal volume with the target tidal volume reference value to obtain a second result.

[0087] In this step, the target respiratory rate is compared with the target respiratory rate reference value in real time to determine whether the target respiratory rate is less than or equal to the target respiratory rate reference value, thereby obtaining a first result. Furthermore, the target tidal volume is compared with the target tidal volume reference value to determine whether the target tidal volume is less than or equal to the target tidal volume reference value, thereby obtaining a second result.

[0088] S23: Determine whether the user enters a sleeping state according to the first result and the second result.

[0089] In this step, if the first result is that the target respiratory rate is less than or equal to the target respiratory rate baseline value, that is, it can be determined at the respiratory rate level that the user has entered a sleep state, and if the second result is that the target tidal volume is less than or equal to the target tidal volume baseline value, that is, it can be determined at the tidal volume level that the user has entered a sleep state. When it can be determined that the user has entered a sleep state from both of these physiological parameter levels, it is determined that the user has entered a sleep state. Through the dual parameter verification mechanism and the cross-analysis of multi-dimensional physiological indicators, the accuracy and reliability of the determination of the user's sleep state can be effectively improved.

[0090] S24: Determine that the user has entered a sleeping state, and turn off the playing of the sleep-aiding sound.

[0091] In this step, after determining that the user has entered a sleeping state, a closing instruction is immediately sent to the audio playback module. After receiving the closing instruction, the audio playback module stops decoding the currently decoding sleep-aiding sound audio file, and the sleep-aiding sound can be turned off.

[0092] The embodiment of the present application can obtain the target respiratory rate, target tidal volume, target respiratory rate baseline value and target tidal volume baseline value, and compare and analyze them, so as to accurately determine whether to turn off the sleep-aiding sound after the user enters the sleep state, and provide the user with a smarter solution for turning off the sleep-aiding sound, so that the user can enter the sleep state more comfortably and improve the overall sleep experience.

[0093] In some embodiments, determining that the user has entered a sleep state and turning off the playing of sleep-aiding sounds include the following steps:

[0094] S241: Obtain a target volume value and a target off threshold value. The target volume value is the volume value currently played by the ventilator, and the target off threshold value is the volume value currently determined to turn off the playing of the sleep-aiding sound.

[0095] S242: Generate an attenuation volume table according to the mixed volume attenuation algorithm and the target volume value, where the attenuation volume table includes the volume value corresponding to each time point during the volume attenuation process.

[0096] S243: Update the volume value corresponding to each time point according to the attenuation volume table.

[0097] S244: Determine the time point corresponding to when the volume value is equal to the target off threshold as the target time point.

[0098] S245: When the target time point is detected, the sleep-aiding sound is turned off.

[0099] In S241, the volume value is a numerical indicator used to measure the size or strength of a sound. In different devices and systems, the representation and range of the volume value may vary. Generally speaking, it is a relative value, usually expressed between 0 and 100 or 0 to the maximum scale. 0 means no sound or silent state, and as the value increases, the sound gradually becomes louder. The shutdown threshold is the volume value for determining whether to turn off the sleep-aiding sound and is saved in the memory. The shutdown threshold is initially set to 5%, which retains the sound background noise and eliminates the influence of surrounding noise. Obtaining the target volume value is to call the volume acquisition interface to obtain the current volume from the audio playback module. Obtaining the target shutdown threshold is to obtain the shutdown threshold currently saved in the memory from the memory.

[0100] In S242, a hybrid volume attenuation algorithm is used to control volume attenuation. The total attenuation duration can be set to 1 minute. Linear attenuation is used in the first half of the time, and the volume drops evenly over time to 50% of the current volume, V(t) = V0*(1-t / T), where V0 represents the target volume value and T represents the total attenuation duration. The second half of the time uses exponential attenuation V(t) = 0.5V0*exp(-k*(tT / 2)), where the attenuation coefficient k = 2ln(0.5*V0 / Vmin) / T, where Vmin represents the minimum volume value, which is generally set to a smaller volume value, for example, 1%. The hybrid volume attenuation algorithm decays slowly in the first half and accelerates in the second half, which is in line with the auditory characteristics of the human ear. The attenuation coefficient table stores the volume values ​​corresponding to each time point in the volume attenuation process. The system uses a mathematical model constructed based on the hybrid volume attenuation algorithm to iteratively calculate the volume second by second through a preset attenuation formula. Specifically, the total decay duration is set to T seconds, and the system updates parameters once per second. Using discretization, the continuous volume decay process is converted into a one-dimensional array containing T elements. Each element in the array represents the volume value at a corresponding point in time. The calculation process strictly follows the decay formula to ensure that the volume changes conform to the preset decay curve characteristics.

[0101] Understandably, to ensure volume control accuracy and system compatibility, the values ​​of each element in the array are uniformly rounded to the nearest percentile. This quantization strategy maintains smooth volume changes while converting the calculated results to integers through rounding, adapting to the volume adjustment interface specifications of audio playback devices.

[0102] In step S243, after the volume decay table is generated, the system immediately triggers a high-precision timer. This timer uses second-level accuracy as the time base and periodically counts according to the preset total decay duration T. During the volume decay process, the timer sends a time synchronization signal to the system, driving the audio playback module to extract the volume value at the corresponding time point from the volume decay table.

[0103] After receiving real-time volume parameters, the audio playback module uses digital signal processing technology to precisely adjust the amplitude of the sleep-inducing audio, ensuring that the output volume strictly matches the volume value in the attenuation volume meter. This process utilizes a closed-loop control strategy, continuously comparing parameters and adjusting feedback to achieve smooth attenuation of the sleep-inducing audio volume, effectively preventing sudden volume changes from disrupting the user's sleep state and creating a comfortable sound environment experience.

[0104] In step S244, a binary search or linear traversal algorithm is used to search the pre-built volume attenuation table to precisely locate the target time point that matches the target shutdown threshold. Specifically, if the volume attenuation table is stored in an ordered time series, a binary search algorithm is prioritized to rapidly locate the target volume value by continuously narrowing the interval range. The target volume value is the volume value at which the volume value in the attenuation table equals the target shutdown threshold. If the data has not been sorted, a linear traversal method is used to compare the values ​​of each element in the table one by one. When a volume value is detected to be exactly equal to the target shutdown threshold, the index position of the element in the table is recorded and mapped to the actual timeline, and the corresponding timestamp is determined as the target time point.

[0105] In S245, when the timer reaches the preset target time, a pre-set interrupt mechanism is triggered. The timer compares the current time value with the timestamp of the target time in real time. Once a match is detected, it immediately sends a termination instruction to the audio playback control module. Upon receiving the instruction, the audio playback module executes a standardized shutdown process, including stopping the decoding and output of audio data, releasing related audio resources, and closing the audio stream channel, thereby turning off the sleep-inducing sounds.

[0106] The embodiment of the present application implements a progressive attenuation shutdown strategy for sleep-aiding sounds by constructing an intelligent control mechanism based on a hybrid volume attenuation algorithm. The system dynamically generates an accurate volume attenuation curve based on the pre-set total attenuation duration, adjustment frequency, and target shutdown threshold. During playback, the volume amplitude is adjusted frame by frame with second-level accuracy using the collaborative control of a high-precision timer and the audio playback module to ensure that the sound intensity decreases steadily following the preset curve until the target shutdown threshold is reached and playback is terminated. It effectively avoids the auditory stress response that may be caused by the sudden shutdown of sleep-aiding sounds in traditional solutions, and by simulating the gradual weakening of natural sounds, it significantly reduces interference with the user's sleep state, and effectively improves the continuity and comfort of the user's sleep experience.

[0107] In some embodiments, before the target time point is detected and the playing of the sleep-aiding sound is turned off, the following steps are also included:

[0108] S31: Acquire a baseline value of the awake respiratory rate and a baseline value of the awake tidal volume.

[0109] S32: Compare the target respiratory rate with the awake respiratory rate reference value to obtain a third result, and compare the target tidal volume with the awake tidal volume reference value to obtain a fourth result.

[0110] S33: Determine whether the user enters the awake state according to the third result and the fourth result.

[0111] S34: Determine that the user is awake, and play the sleep-aiding sound at the current volume.

[0112] In S31, the awake respiratory rate baseline value is a reference value for determining whether the user has entered a waking state based on the respiratory rate, and the awake tidal volume baseline value is a reference value for determining whether the user has entered a waking state based on the tidal volume. The system initially sets a respiratory rate of 20 bpm and a tidal volume of 600 ml as the respiratory rate and tidal volume baseline values ​​for determining whether the user has entered a waking state. The system obtains the respiratory rate and tidal volume over a period of time during use, for example, the first 5 minutes, when the user is still waking. The system then calculates the longest-lasting respiratory rate and tidal volume during this period, i.e., the mode value of the respiratory rate and tidal volume. If the difference between the mode value of the respiratory rate and the initial setting is greater than 2 bpm, the awake respiratory rate baseline value is updated to the mode value of the respiratory rate; otherwise, it is not updated. If the difference between the mode value of the tidal volume and the initial setting is greater than 50 ml, the awake tidal volume baseline value is updated to the mode value of the tidal volume; otherwise, it is not updated. In this way, after multiple uses, the awake respiratory rate baseline value and the awake tidal volume baseline value will match the user's actual situation. The updated baseline values ​​of awake respiratory rate and awake tidal volume are saved to the memory for direct access and compared with the mode values ​​of respiratory rate and tidal volume obtained within 5 minutes before the start of the next use period to determine whether to update the baseline values ​​of awake respiratory rate and awake tidal volume.

[0113] In S32, the target respiratory rate is compared with the awake respiratory rate reference value in real time to determine whether the target respiratory rate is greater than or equal to the target respiratory rate reference value, thereby obtaining a third result. Furthermore, the target tidal volume is compared with the awake tidal volume reference value to determine whether the target tidal volume is greater than or equal to the awake tidal volume reference value, thereby obtaining a fourth result.

[0114] In S33, if the third result is that the target respiratory rate is greater than or equal to the awake respiratory rate baseline value, that is, it can be determined at the respiratory rate level that the user has entered the awake state, and if the fourth result is that the target tidal volume is greater than or equal to the awake tidal volume baseline value, that is, it can be determined at the tidal volume level that the user has entered the awake state. When it can be determined that the user has entered the awake state from the levels of these two physiological parameters, it is determined that the user has entered the awake state. Through the dual parameter verification mechanism and the cross-analysis of multi-dimensional physiological indicators, the accuracy and reliability of the judgment of the user entering the awake state can be effectively improved.

[0115] In S34, after determining that the user has entered the awake state, the volume value at the current time point is obtained, and the sleep-aiding sound continues to be played based on the volume value at the current time point, and the sleep-aiding sound closing task is terminated.

[0116] The embodiment of the present application can continue to play the sleep-aiding sound after detecting that the user is awake during the volume attenuation process, and terminate the task of shutting down the sleep-aiding sound, effectively avoiding the operation process in which the user needs to manually restart the sleep-aiding sound in the traditional solution, eliminating the destruction of the sleep atmosphere due to human intervention, and minimizing the impact of external interference on the sleep state, helping the user to quickly fall asleep again in a comfortable and uninterrupted sleep-aiding environment, significantly improving the user's sleep experience.

[0117] In some embodiments, after the target time point is detected and the sleep-aiding sound is turned off, the following steps are further included:

[0118] S41: Obtain the third result and the fourth result corresponding to the target time point.

[0119] S42: Determine whether the user enters the awake state based on the third result and the fourth result corresponding to the target time point.

[0120] S43: If it is determined that the user enters the awake state, the closing threshold is adjusted.

[0121] S44: If it is determined that the user has not entered the awake state, the closing threshold remains unchanged.

[0122] In S41, while the sleep-aid sound playback is turned off, the target respiratory rate is compared with the awake respiratory rate reference value to determine whether the target respiratory rate is greater than or equal to the target respiratory rate reference value, thereby obtaining a third result. Furthermore, the target tidal volume is compared with the awake tidal volume reference value to determine whether the target tidal volume is greater than or equal to the awake tidal volume reference value, thereby obtaining a fourth result.

[0123] In S42 , it is determined whether the third result is that the target respiratory rate is greater than or equal to the target respiratory rate reference value, and whether the fourth result is that the target tidal volume is greater than or equal to the awake tidal volume reference value.

[0124] In S43, if the third result is that the target respiratory rate is greater than or equal to the target respiratory rate reference value, and the fourth result is that the target tidal volume is greater than or equal to the awake tidal volume reference value, it is determined that the user has entered the awake state, and the shutdown threshold is adjusted, for example, lowered by 1%.

[0125] In S44 , if the third result is that the target respiratory rate is less than the target respiratory rate reference value, or the fourth result is that the target tidal volume is less than the awake tidal volume reference value, it is determined that the user has not entered the awake state, and the closing threshold remains unchanged.

[0126] The embodiment of the present application can construct an adaptive adjustment mechanism. When it is detected that turning off the sleep-aiding sound causes the user to wake up, the shutdown threshold is automatically adjusted. Through continuous parameter optimization and feedback correction, the mechanism gradually achieves a precise match between the shutdown threshold and the user's sound sensitivity, effectively reducing the stress response caused by turning off the sound, forming a personalized control strategy that fits the individual's sleep characteristics, and improving the user experience.

[0127] In some embodiments, obtaining a target respiratory rate reference value and a target tidal volume reference value comprises the following steps:

[0128] S51: Obtain a sensitivity setting request, where the sensitivity setting request carries a target sensitivity set by the user.

[0129] S52: Obtain a historical respiratory rate baseline value, a historical tidal volume baseline value, and a preset duration. The historical respiratory rate baseline value is the respiratory rate with the longest duration during the last sleep state of the user. The historical tidal volume baseline value is the tidal volume with the longest duration during the last sleep state of the user. The preset duration is the shortest time required to determine that the user has entered a sleep state.

[0130] S53: Adjusting the historical respiratory rate reference value, the historical tidal volume reference value, and the preset duration according to the target sensitivity to obtain the target respiratory rate reference value, the target tidal volume reference value, and the target preset duration.

[0131] In S51, the target sensitivity is one of the three pre-set sensitivity options in the sensitivity setting, namely high sensitivity, medium sensitivity and low sensitivity. After the user turns on the "sleep aid mode", the user can select the sensitivity in the sensitivity setting according to the last use. For example, if the sleep aid sound was turned off before entering the sleep state during the last use, low sensitivity can be selected in the sensitivity setting. The user can initiate the sensitivity setting operation through the user interaction interface. After the user triggers the operation, the system will capture the interaction signal in real time and convert it into a standardized sensitivity setting request. The request contains the target sensitivity information manually selected by the user, and the specific value is one of the three preset options of high, medium and low. After receiving the request, the system first performs format verification and validity verification on the request data to ensure that the target sensitivity parameters meet the preset specifications; after the verification is passed, the system will update the current sensitivity configuration.

[0132] In S52, the system compiles statistics for each usage event, obtains the longest-lasting respiratory rate and tidal volume after the user enters sleep, i.e., the mode of respiratory rate and tidal volume, and saves them to memory. The preset duration is the minimum time required to determine that the user has entered sleep. Specifically, if the first result is that the target respiratory rate is less than or equal to the target respiratory rate baseline value, and if the second result is that the target tidal volume is less than or equal to the target tidal volume baseline value, and the first and second results are maintained for a preset duration, for example, 5 minutes, then the user is determined to have entered sleep. The preset duration is stored in memory. Obtaining the historical respiratory rate baseline value, historical tidal volume baseline value, and preset duration involves calling a data read interface to retrieve from memory the mode of respiratory rate and tidal volume values ​​after the user entered sleep during the last usage event. Simultaneously, the preset duration is retrieved from a designated memory location.

[0133] In S53, the system adjusts the historical respiratory rate baseline value, the historical tidal volume baseline value and the preset duration according to the target sensitivity to obtain the target respiratory rate baseline value, the target tidal volume baseline value and the target preset duration. Specifically, if the target sensitivity is high, the historical respiratory rate baseline value and the historical tidal volume baseline value are adjusted upward, and the preset duration is adjusted downward. The adjustment process supports two quantification methods, which can be used in percentage scaling mode, such as increasing by 10% of the original value, or in absolute value increase and decrease mode, such as increasing the respiratory rate by 2 bpm, increasing the tidal volume by 50 ml, and reducing the preset duration by 2 minutes, to obtain the target respiratory rate baseline value, target tidal volume baseline value and the target preset duration. The target tidal volume baseline value and the target preset duration are set; if the target sensitivity is medium sensitivity, the historical respiratory rate baseline value, the historical tidal volume baseline value and the preset duration will not be adjusted, and they will be directly used as the target respiratory rate baseline value, the target tidal volume baseline value and the target preset duration; if the target sensitivity is low sensitivity, the historical respiratory rate baseline value and the historical tidal volume baseline value will be lowered, and the preset duration will be increased. Both percentage and absolute value adjustment methods are also supported, such as a 10% reduction, or a reduction of 2 bpm in respiratory rate, 50 ml in tidal volume, and 2 minutes in preset duration to obtain the target respiratory rate baseline value, target tidal volume baseline value and target preset duration.

[0134] The embodiments of this application enable users to independently adjust the system's response mechanism through an open sensitivity setting function. Users can flexibly select an adaptive mode from three sensitivity options: high, medium, and low, based on their last usage, effectively improving the system's matching with their individual sleep characteristics and significantly optimizing the system's interactive experience.

[0135] In some embodiments, users must first complete the basic sleep-inducing sound configuration before configuring the sensitivity. This configuration process involves selecting both the sound type and the sound source, creating a personalized sleep-inducing sound environment. Regarding sound types, the system offers a variety of audio options, covering three categories: natural sounds, musical melodies, and voice guidance. Natural sounds, exemplified by white noise, simulate background sounds like rain, wind, and waves, effectively blocking out external distractions and helping users relax. The light music category features soothing music from classical and New Age genres, using harmonious melodies and rhythms to regulate mood and promote nervous system relaxation. The voice category primarily includes professional sleep guidance and meditation audio, using gentle voice guidance to help users focus, calm their thoughts, and accelerate the onset of sleep. The sound source selection provides users with flexible resource access. The system features a built-in high-fidelity audio library with a wealth of pre-stored high-quality audio resources, ensuring stable playback even without an internet connection. Furthermore, the system supports network access, allowing users to connect to a cloud audio platform via wireless network to access a vast online audio library, meeting the diverse sound resource needs of different users.

[0136] The embodiments of the present application can allow users to build a unique sleep-aiding sound environment based on their own preferences and usage scenarios through the combination of sound type and sound source selection, significantly improving the user experience and functional adaptability of the ventilator.

[0137] In some embodiments, determining that the user has entered a sleep state based on the first result and the second result includes:

[0138] If the first result is that the target respiratory rate is less than or equal to the target respiratory rate reference value, and the second result is that the target tidal volume is less than or equal to the target tidal volume reference value, and the maintenance time reaches the target preset time length, it is determined that the user enters the sleep state.

[0139] In some embodiments, obtaining the target respiratory rate and target tidal volume includes the following steps:

[0140] Obtain a target respiratory flow signal, which is the user's respiratory flow signal when the sleep-aiding sound is playing. Calculate the target respiratory rate and target tidal volume based on the target respiratory flow signal.

[0141] The system collects target respiratory flow signals through high-precision flow sensors and combines them with advanced signal processing algorithms to ensure the accuracy and real-time nature of respiratory flow signal acquisition. The target respiratory flow signals acquired by the system contain multi-dimensional information such as airflow intensity and flow velocity during inhalation and exhalation, providing a reliable data basis for subsequent physiological parameter calculations. After completing the acquisition of the target respiratory flow signals, the system accurately calculates the target respiratory frequency and target tidal volume by analyzing the respiratory flow signals in the time domain and frequency domain. Specifically, the system uses digital signal processing technology to filter and reduce the noise of the respiratory flow signals, remove interference signals, and extract effective respiratory waveforms. Based on the waveform characteristics, the respiratory cycle is identified through a peak detection algorithm, and the number of breaths per unit time, i.e., the target respiratory frequency, is calculated. At the same time, the system accurately measures the volume of gas inhaled or exhaled during each breath based on the integral operation of the respiratory flow signals to obtain the target tidal volume.

[0142] It should be noted that, in each of the above-mentioned embodiments, there is not necessarily a certain order between the above-mentioned steps. A person skilled in the art can understand, based on the description of the embodiments of this application, that in different embodiments, the above-mentioned steps may have different execution orders, that is, they may be executed in parallel, or may be executed interchangeably, etc.

[0143] As another aspect of the present invention, an embodiment of the present invention provides a device for turning off sleep-aid sounds. The device can be a software module comprising several instructions stored in a memory, which a processor can access and execute to implement the sleep-aid sound turning-off method described in each of the above embodiments.

[0144] In some embodiments, the sleep-aiding sound silencing device can also be constructed from hardware devices. For example, the sleep-aiding sound silencing device can be constructed from one or more chips, and the chips can work in coordination with each other to complete the sleep-aiding sound silencing method described in the above embodiments. For another example, the sleep-aiding sound silencing device can also be constructed from various logic devices, such as a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0145] See also Figure 4 The sleep-aid sound turning off device includes: a parameter acquisition module 401 , a parameter comparison module 402 , a state judgment module 403 and a sound turning off module 404 .

[0146] The parameter acquisition module 401 is used to obtain the target respiratory frequency, target tidal volume, target respiratory frequency reference value and target tidal volume reference value. The target respiratory frequency is the user's respiratory frequency when the ventilator plays the sleep-aiding sound. The target tidal volume is the tidal volume of the user when the ventilator plays the sleep-aiding sound. The target respiratory frequency reference value is the user's respiratory frequency reference value when the ventilator plays the sleep-aiding sound. The target tidal volume reference value is the user's tidal volume reference value when the ventilator plays the sleep-aiding sound. The parameter comparison module 402 is used to compare the target respiratory frequency with the target respiratory frequency reference value to obtain a first result, and to compare the target tidal volume with the target tidal volume reference value to obtain a second result. The state judgment module 403 is used to determine whether the user has entered a sleep state based on the first result and the second result. The sound off module 404 is used to determine whether the user has entered a sleep state and turn off the playing of the sleep-aiding sound.

[0147] The sound shut-off module 404 is also used to: obtain the target volume value and the target shut-off threshold value, the target volume value is the volume value currently played by the ventilator, and the target shut-off threshold value is the volume value currently determined to shut down the sleep-aiding sound. An attenuation volume table is generated based on the mixed volume attenuation algorithm and the target volume value, and the attenuation volume table includes the volume value corresponding to each time point in the volume attenuation process. The volume value corresponding to each time point is updated according to the attenuation volume table. The time point corresponding to the volume value equal to the target shut-off threshold value is determined to be the target time point. When the target time point is detected, the sleep-aiding sound is turned off.

[0148] The sound muting module 404 is further configured to obtain a baseline awake breathing rate and a baseline awake tidal volume. The target breathing rate is compared with the baseline awake breathing rate to obtain a third result. The target tidal volume is compared with the baseline awake tidal volume to obtain a fourth result. Based on the third and fourth results, the user is determined to be awake. Upon determining that the user is awake, the sleep-aiding sound is played at the current volume.

[0149] The sound muting module 404 is further configured to obtain a third result and a fourth result corresponding to a target time point. Based on the third result and the fourth result corresponding to the target time point, the module determines whether the user has entered a wakeful state. If the user is determined to have entered a wakeful state, the muting threshold is adjusted. If the user is determined not to have entered a wakeful state, the muting threshold remains unchanged.

[0150] Parameter acquisition module 401 is further configured to obtain a sensitivity setting request, which carries a target sensitivity set by the user. It also obtains a historical respiratory rate baseline value, a historical tidal volume baseline value, and a preset duration. The historical respiratory rate baseline value is the longest-lasting respiratory rate during the user's last sleep state; the historical tidal volume baseline value is the longest-lasting tidal volume during the user's last sleep state; and the preset duration is the minimum time required to determine that the user has entered a sleep state. The historical respiratory rate baseline value, the historical tidal volume baseline value, and the preset duration are adjusted based on the target sensitivity to obtain a target respiratory rate baseline value, a target tidal volume baseline value, and a target preset duration.

[0151] The state judgment module 403 is further configured to determine that the user has entered a sleep state if the first result is that the target respiratory rate is less than or equal to the target respiratory rate reference value, and the second result is that the target tidal volume is less than or equal to the target tidal volume reference value, and the maintenance time reaches the target preset time length.

[0152] The parameter acquisition module 401 is further configured to obtain a target respiratory flow signal, which is a respiratory flow signal of the user when the sleep-aiding sound is played, and calculate a target respiratory rate and a target tidal volume based on the target respiratory flow signal.

[0153] It should be noted that the aforementioned sleep-aid sound silencing device can execute the sleep-aid sound silencing method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiments of the sleep-aid sound silencing device, please refer to the sleep-aid sound silencing method provided in the embodiments of this application.

[0154] See also Figure 5 , Figure 5 1 is a schematic diagram of a controller according to an embodiment of the present invention. The computer device includes one or more processors and a memory. The memory is connected to the one or more processors, for example, via a bus.

[0155] The processor 51 is configured to support the computer device in executing the corresponding functions of the method in the above method embodiment. The processor can be a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof. The above hardware chip can be an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above PLD can be a complex programmable logic device (CPLD), a field programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0156] The memory 52 is used to store program code, etc. The memory 52 may include volatile memory (VM), such as random access memory (RAM); the memory may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD); the memory 52 may also include a combination of the above types of memory.

[0157] The memory 52 can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as the program instructions / modules corresponding to the sleep-aid sound silencing method in the embodiments of the present application. The processor 51 executes the non-volatile software programs, instructions, and modules stored in the memory to perform various functional applications and data processing of the sleep-aid sound silencing method and the sleep-aid sound silencing device, thereby realizing the functions of the various modules or units of the sleep-aid sound silencing method and the sleep-aid sound silencing device provided in the above-mentioned method embodiments.

[0158] The memory 52 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data generated based on the use of the sleep aid sound silencing device. In some embodiments, the memory 52 may optionally include a memory remote from the processor. Such remote memory may be connected to the sleep aid sound silencing device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0159] The one or more modules are stored in the memory 52. ​​When executed by the one or more processors 51, the sleep-aid sound turning off method in any of the above method embodiments is executed, for example, the method steps described in the above method embodiments are executed to realize the functions of the modules described in the above device embodiments.

[0160] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method as described in the above embodiment.

[0161] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0162] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A method for turning off sleep-aiding sounds, applied to a ventilator, characterized in that: include: Obtain a target respiratory rate, a target tidal volume, a target respiratory rate baseline value, and a target tidal volume baseline value, wherein the target respiratory rate is the respiratory rate of the user when the ventilator plays a sleep-aiding sound, the target tidal volume is the tidal volume of the user when the ventilator plays a sleep-aiding sound, the target respiratory rate baseline value is the respiratory rate baseline value of the user in a sleeping state, and the target tidal volume baseline value is the tidal volume baseline value of the user in a sleeping state; Comparing the target respiratory rate with the target respiratory rate reference value to obtain a first result, and comparing the target tidal volume with the target tidal volume reference value to obtain a second result; determining that the user enters a sleeping state according to the first result and the second result; Determine that the user has entered a sleeping state, and stop playing the sleep-aiding sound.

2. The method according to claim 1, characterized in that The determining that the user enters a sleeping state and turning off the playing of the sleep-aiding sound includes: Obtaining a target volume value and a target off threshold, wherein the target volume value is the volume value currently played by the ventilator, and the target off threshold is the volume value currently determined to be off for playing the sleep-aiding sound; generating an attenuation volume table according to the hybrid volume attenuation algorithm and the target volume value, wherein the attenuation volume table includes the volume value corresponding to each time point during the volume attenuation process; Update the volume value corresponding to each time point according to the attenuation volume table; Determine the time point corresponding to when the volume value is equal to the target closing threshold as the target time point; When the target time point is detected, the playing of the sleep-aiding sound is turned off.

3. The method according to claim 2, characterized in that Before detecting the target time point and turning off the playing of the sleep-aiding sound, the method further includes: Obtain the baseline values ​​of awake respiratory rate and awake tidal volume; Comparing the target respiratory rate with the awake respiratory rate reference value to obtain a third result, and comparing the target tidal volume with the awake tidal volume reference value to obtain a fourth result; determining that the user enters a sober state according to the third result and the fourth result; Determine that the user is awake, and play the sleep-aiding sound at the current volume.

4. The method according to claim 2, characterized in that After the target time point is detected and the playing of the sleep-aiding sound is turned off, the method further includes: Obtaining the third result and the fourth result corresponding to the target time point; determining whether the user enters a wakeful state based on the third result and the fourth result corresponding to the target time point; If it is determined that the user has entered a wakeful state, adjusting the shutdown threshold; If it is determined that the user has not entered the awake state, the closing threshold remains unchanged.

5. The method according to claim 1, wherein The obtaining of the target respiratory rate reference value and the target tidal volume reference value includes: Obtain a sensitivity setting request, where the sensitivity setting request carries a target sensitivity set by a user; Obtaining a historical respiratory rate baseline value, a historical tidal volume baseline value, and a preset duration, wherein the historical respiratory rate baseline value is the longest-lasting respiratory rate of the user during the last sleep state, the historical tidal volume baseline value is the longest-lasting tidal volume of the user during the last sleep state, and the preset duration is the shortest time required to determine that the user has entered a sleep state; The historical respiratory rate reference value, the historical tidal volume reference value, and the preset duration are adjusted according to the target sensitivity to obtain the target respiratory rate reference value, the target tidal volume reference value, and the target preset duration.

6. The method according to claim 5, characterized in that The determining, based on the first result and the second result, that the user enters a sleeping state includes: If the first result is that the target respiratory rate is less than or equal to the target respiratory rate reference value, and the second result is that the target tidal volume is less than or equal to the target tidal volume reference value, and the maintenance time reaches the target preset time length, it is determined that the user enters a sleep state.

7. The method according to claim 1, characterized in that The obtaining of the target respiratory rate and target tidal volume comprises: Obtaining a target respiratory flow signal, wherein the target respiratory flow signal is a respiratory flow signal of the user when the sleep-aiding sound is played; The target respiratory rate and the target tidal volume are calculated according to the target respiratory flow signal.

8. A ventilator, characterized in that: include: case; a blower, disposed in the housing; a flow sensor, disposed in the housing; a pressure sensor, disposed in the housing; a humidifier, disposed in the housing; a speaker, disposed in the housing; An audio playback module is disposed in the housing; a wireless communication module, disposed in the housing; A user interaction device, disposed on the housing; The controller is respectively connected to the blower, the flow sensor, the pressure sensor, the millimeter-wave radar sensor, the humidifier, the speaker, the audio playback module, the wireless communication module and the user interaction device, and can execute the sleep-aid sound turning off method as described in any one of claims 1 to 6.

9. A controller, characterized in that: The controller comprises a memory and a processor, wherein the memory is connected to the processor, and the processor is used to execute one or more computer programs stored in the memory. When the processor executes the one or more computer programs, the controller implements the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.