An intelligent snore-stopping sleep-aiding bed control system based on offline voice and snore sound recognition and a control method thereof
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN LIGHT LIFE TECH CO LTD
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-07
AI Technical Summary
多数智能床仅能被动响应用户手动指令,无法主动感知睡眠状态并干预,例如无法在检测到鼾声时自动调整床体姿态以改善呼吸通畅度,导致用户因打鼾频繁憋醒,睡眠质量难以保障
[0006]本发明有益效果:通过本地离线处理语音与鼾声信号,能让用户在深夜无需寻找遥控器或点亮手机,避免手动操作的繁琐与睡意打断。系统主动监测鼾声并自动调整床体姿态,有效降低打鼾憋醒的频率,显著提升睡眠的连续性与深度。所有识别过程均在床头终端内部完成,不上传任何语音数据,彻底消除卧室隐私泄露的风险,让用户在私密空间使用更安心。结合方言自学习功能与多协议适配,既能精准识别中老年用户的口语指令,又能无缝联动不同品牌的灯具、音箱、空调等设备,构建一体化的助眠环境。动态优先级仲裁机制防止语音控制与止鼾任务冲突,减少误触发与资源浪费。闭环反馈与自学习优化功能,能根据实际止鼾效果不断微调策略,避免传统固定程序失效的问题。整套系统在断网环境下依然稳定运行,既降低了对外部网络的依赖,又保证了夜间干预的即时性与可靠性。
Smart Images

Figure CN122531399A_ABST
Abstract
Description
Technical Field
[0001] This invention proposes an intelligent anti-snoring and sleep aid bed control system and its control method based on offline voice and snoring recognition, which relates to the fields of smart home, smart bed control, offline voice recognition, offline acoustic recognition, wireless communication control and sleep health assistance technology. Background Technology
[0002] With the rapid development of the smart home and sleep health industries, smart beds with functions such as backrest lifting, leg lifting, and posture adjustment have gradually entered homes, hotels, and health and wellness institutions. However, the control methods of existing smart beds are still mainly based on remote controls, physical buttons, or mobile apps, which have revealed many shortcomings in actual use. When users are drowsy at night, they often need to fumble for the remote control or unlock their mobile phones to operate the bed, resulting in a serious lack of ease of operation. Most smart beds can only passively respond to manual commands from users and cannot actively sense and intervene in the sleep state. For example, they cannot automatically adjust the bed posture to improve breathing patency when snoring is detected, causing users to wake up frequently due to snoring, making it difficult to guarantee sleep quality.
[0003] Some smart beds attempt to incorporate cloud-based voice control solutions, but voice data needs to be uploaded to a server for recognition. Given the bedroom's sensitive privacy environment, users have significant concerns about the leakage of voice information. Furthermore, bed controls and peripheral sleep aids such as lights, speakers, and air conditioning typically operate independently, lacking a unified coordination mechanism, making it difficult to create an integrated sleep environment encompassing reading, sleep aid, and anti-snoring. Existing voice control systems have weak support for dialects and less common languages; in markets with elderly users or specific regions, users often encounter difficulties operating the bed smoothly due to pronunciation not being recognized. These issues collectively hinder the intelligent experience and widespread application of smart beds, necessitating a localized, proactive, and multi-device-linked comprehensive control solution. Summary of the Invention
[0004] This invention provides an intelligent anti-snoring sleep aid bed control system and its control method based on offline voice and snoring recognition, to solve the problems mentioned in the background art above: This invention proposes a control method for an intelligent anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition, the method comprising: S1. Acquire user voice signals and sleep environment sound signals through the microphone acquisition unit of the bedside control terminal, perform noise reduction and filtering processing on the voice signals, and perform silent segment removal processing on the sleep environment sound signals to generate a pre-processed audio data stream; extract features from the pre-processed audio data stream to separate the voice feature vector and snoring feature vector, and generate a dual-channel acoustic feature dataset. S2. Input the dual-channel acoustic feature dataset into the offline speech recognition module, and use the acoustic model to match and recognize the user's preset wake words and control commands to generate a voice control command set; input the dual-channel acoustic feature dataset into the offline snoring recognition module, and use the snoring spectrum template to identify snoring events during the user's sleep process to generate snoring event trigger signals. S3. Transmit the voice control command set and snoring event trigger signal to the main control management module, parse the voice control command type, verify the duration and intensity of the snoring event trigger signal, and generate parsed control commands and verified snoring events; perform priority arbitration on the parsed control commands and verified snoring events to generate a priority queue of tasks to be executed. S4. Map control strategies to the queue of tasks to be executed. When the task type is a voice control command, generate a smart bed posture adjustment strategy or a peripheral sleep aid device linkage strategy. When the task type is a snoring event, generate a bed lifting angle calculation strategy and a sleep environment monitoring continuation strategy, and generate a structured control strategy set. S5. Input the structured control strategy set into the wireless communication module, select the corresponding communication protocol according to the control strategy type for signal encapsulation, and generate wireless control messages; send the wireless control messages to the smart bed controller through RF2.4G, RF433, BLE or infrared communication links to generate bed drive commands and peripheral device drive commands. S6. The intelligent bed controller receives bed drive commands and generates bed posture adjustment feedback signals; the peripheral sleep aid device control interface receives peripheral device drive commands and generates environmental parameter adjustment feedback signals. S7. Evaluate the current control effect based on the bed posture adjustment feedback signal and the environmental parameter adjustment feedback signal. If the snoring event is not eliminated, trigger the next stage of bed fine-tuning strategy. When the voice control command is completed, release the corresponding computing resources and update the task queue status, and generate a control closed-loop confirmation signal.
[0005] This invention proposes an intelligent anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition, the system comprising: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are made to implement the method described in any one of the above.
[0006] The beneficial effects of this invention are as follows: By processing voice and snoring signals locally and offline, users can operate the system at night without needing to search for a remote control or turn on their phone, avoiding the hassle of manual operation and the interruption of sleep. The system actively monitors snoring and automatically adjusts the bed position, effectively reducing the frequency of waking up due to snoring and significantly improving the continuity and depth of sleep. All recognition processes are completed within the bedside terminal, without uploading any voice data, completely eliminating the risk of bedroom privacy leaks and allowing users to use the system with greater peace of mind in their private space. Combined with dialect self-learning function and multi-protocol adaptation, it can accurately recognize the spoken commands of middle-aged and elderly users and seamlessly connect with different brands of lamps, speakers, air conditioners, and other devices to create an integrated sleep-aiding environment. A dynamic priority arbitration mechanism prevents conflicts between voice control and anti-snoring tasks, reducing false triggers and resource waste. Closed-loop feedback and self-learning optimization functions can continuously fine-tune the strategy based on the actual anti-snoring effect, avoiding the problem of traditional fixed programs failing. The entire system still operates stably in an offline environment, reducing dependence on external networks while ensuring the immediacy and reliability of nighttime intervention. Attached Figure Description
[0007] Figure 1 This is a diagram illustrating the steps of the method described in this invention; Figure 2 This is a detailed flowchart of step S3 in this invention. Detailed Implementation
[0008] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0009] One embodiment of the present invention, such as Figure 1 As shown, a control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition is disclosed, the method comprising: S1. Acquire user voice signals and sleep environment sound signals through the microphone acquisition unit of the bedside control terminal, perform noise reduction and filtering processing on the voice signals, and perform silent segment removal processing on the sleep environment sound signals to generate a pre-processed audio data stream; extract features from the pre-processed audio data stream to separate the voice feature vector and snoring feature vector, and generate a dual-channel acoustic feature dataset. S2. Input the dual-channel acoustic feature dataset into the offline speech recognition module, and use the acoustic model to match and recognize the user's preset wake words and control commands to generate a voice control command set; input the dual-channel acoustic feature dataset into the offline snoring recognition module, and use the snoring spectrum template to identify snoring events during the user's sleep process to generate snoring event trigger signals. S3. Transmit the voice control command set and snoring event trigger signal to the main control management module, parse the voice control command type, verify the duration and intensity of the snoring event trigger signal, and generate parsed control commands and verified snoring events; perform priority arbitration on the parsed control commands and verified snoring events to generate a priority queue of tasks to be executed. S4. Map control strategies to the queue of tasks to be executed. When the task type is a voice control command, generate a smart bed posture adjustment strategy or a peripheral sleep aid device linkage strategy. When the task type is a snoring event, generate a bed lifting angle calculation strategy and a sleep environment monitoring continuation strategy, and generate a structured control strategy set. S5. Input the structured control strategy set into the wireless communication module, select the corresponding communication protocol according to the control strategy type for signal encapsulation, and generate wireless control messages; send the wireless control messages to the smart bed controller through RF2.4G, RF433, BLE or infrared communication links to generate bed drive commands and peripheral device drive commands. S6. The smart bed controller receives bed drive commands and drives the smart bed to perform actions such as lifting the back and legs, fine-tuning the angle, switching postures, or returning to the initial state, generating a bed posture adjustment feedback signal; the peripheral sleep aid device control interface receives peripheral device drive commands and controls the Bluetooth speaker to play white noise, the smart lights to adjust brightness and color temperature, and the air conditioner fan to adjust temperature and humidity, generating an environmental parameter adjustment feedback signal. S7. Evaluate the current control effect based on the bed posture adjustment feedback signal and the environmental parameter adjustment feedback signal. If the snoring event is not eliminated, trigger the next stage of bed fine-tuning strategy. When the voice control command is completed, release the corresponding computing resources and update the task queue status, and generate a control closed-loop confirmation signal.
[0010] The working principle and effects of the above technical solution are as follows: By processing voice and snoring signals locally and offline, users can avoid the inconvenience of manual operation by not searching for a remote control or turning on their phone before bed or when feeling drowsy in the middle of the night. Simultaneously, both voice and snoring recognition are completed locally, without uploading to the cloud, avoiding the privacy risks of bedroom voice data leakage. It actively monitors snoring and automatically adjusts the bed position, reducing the number of times users are awakened by snoring and improving sleep continuity. It coordinates with Bluetooth speakers, smart lights, air conditioners, and other devices to enhance the adaptability of the sleep environment, making the sleep-aiding atmosphere more suited to personal habits. A priority arbitration mechanism prevents conflicts between voice control and anti-snoring tasks, reducing the probability of misoperation. A closed-loop feedback adjustment strategy avoids stopping intervention before snoring subsides, improving the reliability of the anti-snoring effect and making the overall sleep experience more stable and worry-free.
[0011] In one embodiment of the present invention, S1 includes: S11. Perform frame-by-frame windowing processing on the dual-channel acoustic feature dataset, extract Mel frequency cepstral coefficients and energy entropy features frame by frame, remove low-energy noise frames and abnormal pulse interference frames, and generate a pure acoustic feature frame sequence. S12. Input the pure acoustic feature frame sequence into the pre-trained deep neural network model, divide the speech segment and snoring segment by voiceprint activity detection, mark the speaker's voiceprint identifier for the speech segment, mark the spectral peak and periodic characteristics for the snoring segment, and generate a set of labeled acoustic segments. S13. Perform channel equalization on the set of labeled acoustic segments to compensate for the differences in sound attenuation at different distances and directions, unify the amplitude and phase distribution of acoustic features, and generate a normalized acoustic feature matrix. S14. Slide and stitch the normalized acoustic feature matrix along the time axis to construct a continuous temporal feature tensor, synchronously record the acquisition timestamps and signal strengths of each feature segment, and generate a dual-channel acoustic feature dataset with spatiotemporal markers.
[0012] The working principle and effects of the above technical solution are as follows: By performing frame-by-frame windowing and feature filtering on the audio signal, environmental noise and sudden interference can be effectively filtered out, improving the accuracy of voice and snoring recognition and reducing the probability of false triggers. Using a deep neural network to detect voiceprint activity on clean acoustic frames can accurately distinguish between human voices and snoring, and can also mark spectral peaks and periodic characteristics, enhancing adaptability to different users and snoring types. Channel equalization processing compensates for the attenuation differences of sound during propagation, avoiding the problem of decreased recognition sensitivity due to changes in distance or orientation, and ensuring consistency in near-field and far-field recognition. Constructing a continuous temporal feature tensor and adding timestamps and intensity records improves the system's ability to capture the duration and variation patterns of snoring, preventing instantaneous noise from being misjudged as snoring events. The entire process runs offline locally, avoiding the privacy leakage risks associated with cloud transmission and reducing dependence on the network environment, making nighttime monitoring more stable and reliable.
[0013] In one embodiment of the present invention, S2 includes: S21. Perform endpoint detection on the speech feature vectors in the dual-channel acoustic feature dataset to lock the effective speech interval. Then, perform similarity matching between the dynamic time warping algorithm and the locally stored wake word template. When the matching degree exceeds the preset threshold, activate the speech recognition engine. S22. The activated speech recognition engine performs phoneme decoding and language model scoring on the effective speech range, and performs adaptive matching by combining the user's self-learned dialect acoustic feature library, outputting the control command text with the highest confidence, and generating a set of voice control commands with confidence scores. S23. Perform short-time energy and zero-crossing rate analysis on the snoring feature vector in the dual-channel acoustic feature dataset, count the number and duration of snoring pulses per unit time, compare the multi-dimensional features with the predefined snoring spectrum template library, and generate a snoring event probability distribution map. S24. Perform continuous frame tracking on the probability distribution map of snoring events. When the snoring probability of N consecutive frames is higher than the trigger threshold and there are no other strong interference sources, it is determined to be a valid snoring event, and a snoring event trigger signal with intensity level is generated.
[0014] The working principle and effects of the above technical solution are as follows: Accurately locking the effective speech interval through endpoint detection, combined with a dynamic time warping algorithm to match the wake word, effectively improves the wake-up response accuracy and reduces the probability of false activation caused by environmental noise. Adaptive matching using a user-learned dialect acoustic feature library covers the pronunciation habits of users from different regions while reducing reliance on standard Mandarin, making it smoother for middle-aged and elderly users. Short-time energy and zero-crossing rate analysis of snoring features, followed by continuous frame tracking to determine valid events, significantly reduces false positives from momentary interference such as coughing and turning over, avoiding unnecessary frequent adjustments to the bed. The entire recognition process is completed offline locally, ensuring the privacy and security of bedroom voice data while reducing reliance on the network environment, making nighttime monitoring more reliable.
[0015] In one embodiment of the present invention, step S21 includes: Linear predictive coding coefficients are extracted from the effective speech segment set, the time-domain speech signal is converted into a frequency-domain acoustic parameter sequence, and the influence of channel differences is eliminated by cepstral mean normalization to generate a standardized speech feature sequence. The standardized speech feature sequence is dynamically time-normalized and aligned with the locally stored wake word template library. The Euclidean distance between feature vectors is calculated frame by frame, and the similarity score of the global optimal matching path is accumulated to generate the wake word matching score. The wake-up word matching score is compared with the preset activation threshold. When the matching score exceeds the activation threshold for multiple consecutive frames and there are no other interfering sound sources, an engine activation request is sent to the main control management module to generate a speech recognition engine start command.
[0016] The working principle and effects of the above technical solution are as follows: By using linear predictive coding coefficient conversion and cepstral mean normalization, it can eliminate differences in sound attenuation at different distances and directions, improve the accuracy of wake-up word matching, and avoid recognition deviations caused by channel interference. The dynamic time warping alignment mechanism can adapt to wake-up word pronunciations at different speeds, enhancing compatibility with different users' speaking habits, allowing even the elderly and children to wake up smoothly. The continuous multi-frame matching and exclusion of interference sources significantly reduces false activations caused by momentary noises such as coughing and door closing, preventing unwarranted bed adjustments from affecting sleep. Standardized feature sequences simplify the subsequent recognition process, reduce local computing resource consumption, and make offline operation more stable. The entire wake-up process does not require an internet connection, protecting bedroom voice privacy and avoiding response delays caused by network fluctuations, making nighttime use more reassuring.
[0017] One embodiment of the present invention, such as Figure 2 As shown, S3 includes: S31. Fill semantic slots in each instruction in the voice control instruction set, extract the action type, target device, adjustment parameters and execution conditions in the instruction, convert the natural language instruction into a structured instruction object containing device address and control code, and generate parsed control instructions. S32. Accumulate the duration and intensity of the snoring event trigger signal, combine historical snoring records with the current bed posture, verify whether it is continuous physiological snoring rather than transient interference, filter out occasional false trigger signals, and generate a verified snoring event. S33. Establish a multi-event priority arbitration rule, set the priority of snoring prevention task to be higher than that of ordinary voice control task, the priority of emergency adjustment task to be higher than that of regular scenario task, and sort the tasks according to the event reception timestamp under the same priority to generate a priority queue of tasks to be executed. S34. Perform conflict detection on the task queue to be executed. When there are conflicting control instructions, retain the high-priority instructions and prompt the user with the conflict resolution result. Update the execution order and dependencies of the task queue and generate the final schedulable task execution sequence.
[0018] The working principle and effects of the above technical solution are as follows: By extracting key elements of commands through semantic slot filling, colloquial expressions can be transformed into precise structured commands, improving the accuracy of command execution and reducing erroneous device responses caused by ambiguous expressions. Combining historical snoring records with current bed posture verification events can effectively filter out momentary disturbances such as turning over and coughing, avoiding meaningless bed adjustments and reducing the probability of being disturbed at night. Setting snoring-stopping tasks as priority over ordinary voice control allows emergency interventions to take effect promptly, enhancing the reliability of sleep protection. The conflict detection mechanism automatically retains high-priority commands and prompts the user, avoiding device malfunctions caused by conflicting operations and making control more orderly in multi-command scenarios.
[0019] In one embodiment of the present invention, S32 includes: The time window of the snoring event trigger signal is extracted, the duration of continuous snoring is counted, the energy peak and frequency distribution of the snoring pulse per unit time are calculated, and the original snoring feature group with duration markers and intensity parameters is generated. Retrieve historical snoring records stored locally, extract the duration distribution, intensity fluctuation patterns, and corresponding bed posture adjustment effects of the user's past snoring, and generate a personalized snoring characteristic baseline for the user; Read the current smart bed's posture sensor data to obtain the headboard lifting angle, bed tilt, and user sleeping posture distribution, and generate the current bed posture parameter set; The original snoring feature set is compared with the user's personalized snoring feature baseline. Combined with the current bed posture parameter set, it is determined whether the snoring fluctuates with changes in posture. Instantaneous interference signals caused by turning over, coughing or external noise are filtered out to generate an effective snoring candidate set after preliminary screening. A continuous frame consistency check is performed on the valid snoring candidate set. When the snoring intensity and duration of multiple consecutive frames meet the physiological snoring characteristics and there is no overlap with other strong sound sources, it is marked as a continuous physiological snoring event, and a checked snoring event is generated.
[0020] The working principle and effects of the above technical solution are as follows: By using time window interception and multi-dimensional feature statistics, it can accurately distinguish between brief noises and genuine snoring, significantly improving the accuracy of snoring detection and reducing false triggers caused by turning over or coughing. Combined with the user's personalized snoring history, the system can identify individual-specific snoring patterns, enhancing its adaptability to users with different physical conditions and making anti-snoring strategies more aligned with actual needs. Introducing current bed posture parameters for joint judgment avoids the problem of misjudging snoring even after bed adjustments, preventing ineffective repeated adjustments. A continuous frame consistency verification mechanism further filters transient interference, ensuring that intervention is only initiated when continuous physiological snoring is confirmed, effectively reducing the frequency of unexplained disturbances at night. This verification process runs locally offline, protecting user privacy and ensuring stable operation in environments without network connectivity, making sleep monitoring more secure and reliable.
[0021] In one embodiment of the present invention, step S4 includes: S41. Traverse the voice control commands in the task queue to be executed. When the command points to the smart bed control, query the current bed posture parameters and physical limit values, calculate the difference between the target posture and the current posture, and generate a bed posture adjustment strategy that includes lifting speed, acceleration and target angle. S42. When the voice control command is directed at an external sleep aid device, the device type and control parameters are parsed to generate the volume curve, playback duration and fade-out strategy of the Bluetooth speaker, the brightness gradient, color temperature switching and delayed shutdown strategy of the smart lamp, and the temperature setting, fan speed adjustment and operation mode strategy of the air conditioner fan. S43. When the task type is a snoring event, read the current user's sleeping position and snoring intensity level, call the pre-stored anti-snoring angle mapping table, calculate the optimal angle and lifting step of the head of the bed, and generate a phased progressive bed lifting strategy. S44. Synchronously generate a sleep environment monitoring continuation strategy, set the monitoring window period and re-examination frequency after snoring adjustment, if the snoring is not relieved during the monitoring period, trigger the secondary adjustment strategy, if the snoring disappears, start the bed slow reset timer, and generate a complete closed-loop control logic.
[0022] The working principle and effects of the above technical solution are as follows: By combining the current bed posture with physical limits to generate adjustment strategies, the accuracy of bed movements can be improved, avoiding motor overload or mechanical damage caused by exceeding the travel range. Customized volume curves and brightness gradients for peripheral sleep aids create a comfortable sleep atmosphere while reducing the risk of sudden awakenings. Using a pre-stored anti-snoring angle mapping table to raise the headboard in stages enhances the stability of the anti-snoring effect and avoids sleep interruptions caused by large-scale adjustments at once. The synchronously generated monitoring and continuation strategy continuously tracks the effect after adjustment; if snoring is not relieved, a secondary adjustment is automatically triggered; if it disappears, it slowly resets, ensuring the effectiveness of the intervention while reducing the impact of frequent changes on sleep. The entire strategy is generated locally, without internet access, making control more timely and reliable.
[0023] In one embodiment of the present invention, step S5 includes: S51. Read the communication identifier in the structured control strategy set, select RF2.4G, RF433, BLE or infrared communication protocol according to the target device type, configure the corresponding carrier frequency, modulation method and transmission power, and generate communication configuration parameters adapted to different hardware interfaces. S52. The control strategy is binary encoded, and a device address header, instruction length field, data payload field and cyclic redundancy check code are added. The data is then encapsulated into a wireless control message that conforms to the communication protocol specification and a radio frequency signal frame to be sent is generated. S53. Start the transmission queue of the wireless communication module, send wireless control messages in order of priority, enable the automatic retransmission mechanism and response timeout detection, ensure that the control messages reliably reach the target controller, and generate a transmission record with transmission status mark. S54. The intelligent bed controller receives and parses wireless control messages, extracts bed drive commands and peripheral device drive commands, performs integrity verification and permission verification on the commands, and generates low-level control signals that can directly drive hardware actuators.
[0024] The working principle and effects of the above technical solution are as follows: By adapting communication configurations to different hardware interfaces, the compatibility of various smart beds and peripheral devices can be improved, reducing the probability of control failures due to protocol incompatibility. Adding cyclic redundancy check during message encapsulation enhances data transmission integrity and reduces device malfunctions caused by erroneous commands. Priority-based transmission combined with an automatic retransmission mechanism ensures timely delivery of critical tasks such as anti-snoring measures while preventing command loss due to network fluctuations or interference. Integrity and authorization verification of commands on the controller side effectively prevents interference from illegal signals and enhances system stability. The entire communication process is completed locally, without relying on an external network, making control response more timely and reliable.
[0025] In one embodiment of the present invention, S51 includes: Read the communication identifier field from the structured control policy set, extract the target device type, device address, and communication frequency band requirements, and generate the original communication identifier dataset; The original communication identifier dataset is matched with the locally stored communication protocol library. Based on the device type, the compatible items in RF2.4G, RF433, BLE or infrared communication protocols are selected to generate a protocol matching result set. Configure parameters for the protocol matching result set, set the corresponding carrier frequency, modulation method and transmission power for each adapted protocol, and generate a preliminary communication configuration parameter set; Perform compatibility verification on the initial communication configuration parameter group, check whether there is a conflict in the transmit power or whether the frequency bands overlap between different devices, and generate conflict-free optimized communication configuration parameters; The optimized communication configuration parameters are categorized and encapsulated according to hardware interface type to generate communication configuration parameter sets adapted to different hardware interfaces.
[0026] The working principle and effects of the above technical solution are as follows: By extracting the communication identifier field and matching it with the local protocol library, the most suitable communication method for the current device can be quickly identified, improving the success rate of command transmission and reducing control failures caused by protocol incompatibility. Setting carrier frequency and transmission power separately for different devices ensures signal coverage while reducing unnecessary power consumption and extending the battery life of the bedside terminal. Adding a compatibility verification step avoids frequency band overlap or power conflicts when multiple devices are working simultaneously, preventing device unresponsiveness caused by signal interference. Classifying and encapsulating optimized parameters according to interface type simplifies the subsequent message assembly process, allowing control commands to reach the target device faster. The entire configuration process is completed automatically locally, eliminating the need for manual user settings, saving debugging time, and preventing device malfunctions due to configuration errors, making nighttime control more worry-free and reliable.
[0027] In one embodiment of the present invention, step S6 includes: S61, the intelligent bed controller parses the bed drive commands, controls the backrest push rod, leg push rod and lumbar support mechanism to move in coordination through the motor drive circuit, and collects motor current and position sensor data in real time to generate actual posture data including the current angle and movement state; S62, the peripheral sleep aid device control interface parses peripheral device drive commands, sends audio playback and control commands to the speaker via Bluetooth protocol, sends brightness and color temperature adjustment commands to the lamp via wireless LAN, sends operating parameter setting commands to the air conditioner fan via infrared encoding, and generates execution status feedback for each device; S63. Collect the completion data of bed posture adjustment and the response status data of peripheral equipment, compare the expected control target with the actual execution result, mark the execution success, execution in progress or execution failure status, and generate bed posture adjustment feedback signal and environmental parameter adjustment feedback signal. S64. Summarize the bed posture adjustment feedback signal and the environmental parameter adjustment feedback signal into a system operation status snapshot, record the start time, execution duration and final effect of this control action, and generate a traceable control execution log.
[0028] The working principle and effects of the above technical solution are as follows: By parsing the bed drive commands and coordinating the control of multiple sets of push rods and support mechanisms, the accuracy of posture adjustment can be improved, reducing the probability of motor damage due to overload. Peripheral device interfaces send commands to speakers, lights, and air conditioners according to different protocols, enhancing cross-brand device compatibility and reducing control failures caused by protocol incompatibility. Collecting actual execution data and comparing it with expected targets can promptly detect stutters or deviations, avoiding problems such as incomplete bed movements or erroneous device responses. Generating execution status receipts and feedback signals allows the system to understand the operation of each stage and provides a basis for subsequent optimization and adjustments. Summarizing operational status snapshots and recording control logs facilitates tracing the root cause of problems and allows users to understand the effect of each sleep intervention, improving the user experience.
[0029] In one embodiment of the present invention, step S7 includes: S71. Read the actual posture data in the bed posture adjustment feedback signal, combine it with the real-time snoring characteristics in the dual-channel acoustic feature dataset, evaluate the improvement of breathing patency after anti-snoring adjustment, calculate the snoring intensity attenuation rate and duration change rate, and generate a quantitative evaluation report of control effect. S72. When the assessment report shows that the snoring intensity has not been significantly reduced or the duration has not been shortened, the backup anti-snoring strategy library is called to calculate the new round of bed fine-tuning angle and adjustment direction, generate advanced anti-snoring control instructions and jump to S5 to re-execute; S73. After the voice control command is executed and a success signal is received from the device, clear the occupied mark of the command in the task queue, release the corresponding memory buffer and communication port resources, and update the idle status bit of the task queue. S74. Write the control closed-loop confirmation signal to the local storage module, update the user's sleep behavior profile and device usage preference model, optimize the generation parameters of subsequent control strategies, and generate system self-learning optimization feedback.
[0030] The working principle and effects of the above technical solution are as follows: By combining posture data with real-time snoring characteristics to assess breathing patency, the anti-snoring effect can be accurately quantified, avoiding ineffective interventions caused by adjustments based solely on experience. When snoring is not significantly relieved, a backup strategy is automatically invoked for fine-tuning, enhancing the system's ability to cope with complex snoring and reducing the problems caused by the failure of a single solution. Timely release of memory and communication ports occupied by completed tasks improves system resource utilization and prevents lag or response delays after long-term operation. Each control result is written to local storage and the user's sleep model is updated, allowing the device to better understand user habits over time and continuously optimize anti-snoring and sleep-aiding strategies. The entire closed-loop process is completed locally, without uploading private data, ensuring response speed and eliminating the risk of personal information leakage, making nighttime sleep adjustments smarter and more reassuring.
[0031] One embodiment of the present invention provides an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition, the system comprising: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are made to implement the method described in any one of the above.
[0032] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition, characterized in that, The method includes: S1. Acquire user voice signals and sleep environment sound signals through the microphone acquisition unit of the bedside control terminal, perform noise reduction and filtering processing on the voice signals, and perform silent segment removal processing on the sleep environment sound signals to generate a pre-processed audio data stream; extract features from the pre-processed audio data stream to separate the voice feature vector and snoring feature vector, and generate a dual-channel acoustic feature dataset. S2. Input the dual-channel acoustic feature dataset into the offline speech recognition module, and use the acoustic model to match and recognize the user's preset wake words and control commands to generate a voice control command set; input the dual-channel acoustic feature dataset into the offline snoring recognition module, and use the snoring spectrum template to identify snoring events during the user's sleep process to generate snoring event trigger signals. S3. Transmit the voice control command set and snoring event trigger signal to the main control management module, parse the voice control command type, verify the duration and intensity of the snoring event trigger signal, and generate parsed control commands and verified snoring events; perform priority arbitration on the parsed control commands and verified snoring events to generate a priority queue of tasks to be executed. S4. Map control strategies to the queue of tasks to be executed. When the task type is a voice control command, generate a smart bed posture adjustment strategy or a peripheral sleep aid device linkage strategy. When the task type is a snoring event, generate a bed lifting angle calculation strategy and a sleep environment monitoring continuation strategy, and generate a structured control strategy set. S5. Input the structured control strategy set into the wireless communication module, select the corresponding communication protocol according to the control strategy type for signal encapsulation, and generate wireless control messages; send the wireless control messages to the smart bed controller through RF2.4G, RF433, BLE or infrared communication links to generate bed drive commands and peripheral device drive commands. S6. The intelligent bed controller receives bed drive commands and generates bed posture adjustment feedback signals; the peripheral sleep aid device control interface receives peripheral device drive commands and generates environmental parameter adjustment feedback signals. S7. Evaluate the current control effect based on the bed posture adjustment feedback signal and the environmental parameter adjustment feedback signal. If the snoring event is not eliminated, trigger the next stage of bed fine-tuning strategy. When the voice control command is completed, release the corresponding computing resources and update the task queue status, and generate a control closed-loop confirmation signal.
2. The control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, S1 includes: S11. Perform frame-by-frame windowing processing on the dual-channel acoustic feature dataset, extract Mel frequency cepstral coefficients and energy entropy features frame by frame, remove low-energy noise frames and abnormal pulse interference frames, and generate a pure acoustic feature frame sequence. S12. Input the pure acoustic feature frame sequence into the pre-trained deep neural network model, divide the speech segment and snoring segment by voiceprint activity detection, mark the speaker's voiceprint identifier for the speech segment, mark the spectral peak and periodic characteristics for the snoring segment, and generate a set of labeled acoustic segments. S13. Perform channel equalization on the set of labeled acoustic segments to compensate for the differences in sound attenuation at different distances and directions, unify the amplitude and phase distribution of acoustic features, and generate a normalized acoustic feature matrix. S14. Slide and stitch the normalized acoustic feature matrix along the time axis to construct a continuous temporal feature tensor, synchronously record the acquisition timestamps and signal strengths of each feature segment, and generate a dual-channel acoustic feature dataset with spatiotemporal markers.
3. The control method for an intelligent anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition as described in claim 1, characterized in that, S2 includes: S21. Perform endpoint detection on the speech feature vectors in the dual-channel acoustic feature dataset to lock the effective speech interval. Then, perform similarity matching between the dynamic time warping algorithm and the locally stored wake word template. When the matching degree exceeds the preset threshold, activate the speech recognition engine. S22. The activated speech recognition engine performs phoneme decoding and language model scoring on the effective speech range, and performs adaptive matching by combining the user's self-learned dialect acoustic feature library, outputting the control command text with the highest confidence, and generating a set of voice control commands with confidence scores. S23. Perform short-time energy and zero-crossing rate analysis on the snoring feature vector in the dual-channel acoustic feature dataset, count the number and duration of snoring pulses per unit time, compare the multi-dimensional features with the predefined snoring spectrum template library, and generate a snoring event probability distribution map. S24. Perform continuous frame tracking on the probability distribution map of snoring events. When the snoring probability of N consecutive frames is higher than the trigger threshold and there are no other strong interference sources, it is determined to be a valid snoring event, and a snoring event trigger signal with intensity level is generated.
4. The control method of the intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, The S3 includes: S31. Fill semantic slots in each instruction in the voice control instruction set, extract the action type, target device, adjustment parameters and execution conditions in the instruction, convert the natural language instruction into a structured instruction object containing device address and control code, and generate parsed control instructions. S32. Accumulate the duration and intensity of the snoring event trigger signal, combine historical snoring records with the current bed posture, verify whether it is continuous physiological snoring rather than transient interference, filter out occasional false trigger signals, and generate a verified snoring event. S33. Establish a multi-event priority arbitration rule, set the priority of snoring prevention task to be higher than that of ordinary voice control task, the priority of emergency adjustment task to be higher than that of regular scenario task, and sort the tasks according to the event reception timestamp under the same priority to generate a priority queue of tasks to be executed. S34. Perform conflict detection on the task queue to be executed. When there are conflicting control instructions, retain the high-priority instructions and prompt the user with the conflict resolution result. Update the execution order and dependencies of the task queue and generate the final schedulable task execution sequence.
5. The control method for an intelligent anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition according to claim 4, characterized in that, S32 includes: The time window of the snoring event trigger signal is extracted, the duration of continuous snoring is counted, the energy peak value and frequency distribution of the snoring pulse per unit time are calculated, and the original snoring feature group with duration marker and intensity parameter is generated. Retrieve historical snoring records stored locally, extract the duration distribution, intensity fluctuation patterns, and corresponding bed posture adjustment effects of the user's past snoring, and generate a personalized snoring characteristic baseline for the user; Read the current smart bed's posture sensor data to obtain the headboard lifting angle, bed tilt, and user sleeping posture distribution, and generate the current bed posture parameter set; The original snoring feature set is compared with the user's personalized snoring feature baseline. Combined with the current bed posture parameter set, it is determined whether the snoring fluctuates with changes in posture. Instantaneous interference signals caused by turning over, coughing or external noise are filtered out to generate an effective snoring candidate set after preliminary screening. A continuous frame consistency check is performed on the valid snoring candidate set. When the snoring intensity and duration of multiple consecutive frames meet the physiological snoring characteristics and there is no overlap with other strong sound sources, it is marked as a continuous physiological snoring event, and a checked snoring event is generated.
6. The control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, The S4 includes: S41. Traverse the voice control commands in the queue of tasks to be executed. When the command points to the smart bed control, query the current bed posture parameters and physical limit values, calculate the difference between the target posture and the current posture, and generate a bed posture adjustment strategy that includes lifting speed, acceleration and target angle. S42. When the voice control command is directed at an external sleep aid device, the device type and control parameters are parsed to generate the volume curve, playback duration and fade-out strategy of the Bluetooth speaker, the brightness gradient, color temperature switching and delayed shutdown strategy of the smart lamp, and the temperature setting, fan speed adjustment and operation mode strategy of the air conditioner fan. S43. When the task type is a snoring event, read the current user's sleeping position and snoring intensity level, call the pre-stored anti-snoring angle mapping table, calculate the optimal angle and lifting step of the head of the bed, and generate a phased progressive bed lifting strategy. S44. Synchronously generate a sleep environment monitoring continuation strategy, set the monitoring window period and re-examination frequency after snoring adjustment, if the snoring is not relieved during the monitoring period, trigger the secondary adjustment strategy, if the snoring disappears, start the bed slow reset timer, and generate a complete closed-loop control logic.
7. The control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, The S5 includes: S51. Read the communication identifier in the structured control strategy set, select RF2.4G, RF433, BLE or infrared communication protocol according to the target device type, configure the corresponding carrier frequency, modulation method and transmission power, and generate communication configuration parameters adapted to different hardware interfaces. S52. The control strategy is binary encoded, and a device address header, instruction length field, data payload field and cyclic redundancy check code are added. The data is then encapsulated into a wireless control message that conforms to the communication protocol specification and a radio frequency signal frame to be sent is generated. S53. Start the transmission queue of the wireless communication module, send wireless control messages in order of priority, enable the automatic retransmission mechanism and response timeout detection, ensure that the control messages reliably reach the target controller, and generate a transmission record with transmission status mark. S54. The intelligent bed controller receives and parses wireless control messages, extracts bed drive commands and peripheral device drive commands, performs integrity verification and permission verification on the commands, and generates low-level control signals that can directly drive hardware actuators.
8. The control method for an intelligent anti-snoring sleep aid bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, The S6 includes: S61, the intelligent bed controller parses the bed drive commands, controls the backrest push rod, leg push rod and lumbar support mechanism to move in coordination through the motor drive circuit, and collects motor current and position sensor data in real time to generate actual posture data including the current angle and movement state; S62, the peripheral sleep aid device control interface parses peripheral device drive commands, sends audio playback and control commands to the speaker via Bluetooth protocol, sends brightness and color temperature adjustment commands to the lamp via wireless LAN, sends operating parameter setting commands to the air conditioner fan via infrared encoding, and generates execution status feedback for each device; S63. Collect the completion data of bed posture adjustment and the response status data of peripheral equipment, compare the expected control target with the actual execution result, mark the execution success, execution in progress or execution failure status, and generate bed posture adjustment feedback signal and environmental parameter adjustment feedback signal. S64. Summarize the bed posture adjustment feedback signal and the environmental parameter adjustment feedback signal into a system operation status snapshot, record the start time, execution duration and final effect of this control action, and generate a traceable control execution log.
9. The control method for an intelligent anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition according to claim 1, characterized in that, The S7 includes: S71. Read the actual posture data in the bed posture adjustment feedback signal, combine it with the real-time snoring characteristics in the dual-channel acoustic feature dataset, evaluate the improvement of breathing patency after anti-snoring adjustment, calculate the snoring intensity attenuation rate and duration change rate, and generate a quantitative evaluation report of control effect. S72. When the assessment report shows that the snoring intensity has not been significantly reduced or the duration has not been shortened, the backup anti-snoring strategy library is called to calculate the new round of bed fine-tuning angle and adjustment direction, generate advanced anti-snoring control instructions and jump to S5 to re-execute; S73. After the voice control command is executed and a success signal is received from the device, clear the occupied mark of the command in the task queue, release the corresponding memory buffer and communication port resources, and update the idle status bit of the task queue. S74. Write the control closed-loop confirmation signal to the local storage module, update the user's sleep behavior profile and device usage preference model, optimize the generation parameters of subsequent control strategies, and generate system self-learning optimization feedback.
10. A smart anti-snoring and sleep-aiding bed control system based on offline voice and snoring recognition, characterized in that, The system includes: One or more processors; Memory, used to store one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 9.