A sleep monitoring mattress and air conditioner linkage sleep aiding method and system
Patent Information
- Application Number
- CN202611189368.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
AI Technical Summary
传统空调的固定温度设定方式难以适配上述不同睡眠阶段的差异化温控需求,夜间因温度过高或过低引发的微觉醒频繁发生,睡眠连续性受到明显干扰
[0007]本发明有益效果:通过体动信号与心率变异性特征的联合分析,本方法能够在用户睡眠状态发生动态变化时准确区分入睡、深睡、REM及觉醒等不同阶段,既能在深睡阶段自动降低环境温度以维持睡眠深度,又能在觉醒前适当升温辅助用户自然苏醒,大幅降低了夜间因温度不适引发的微觉醒频次。同时,个人睡眠温度曲线的持续学习机制使得系统能够不断贴合用户个体化的温度偏好,增强了温控调节的针对性与适配精度,减少了传统固定温度设定方式下温控参数与实际需求之间的偏差。对于睡眠浅、易惊醒的人群,本方法有效避免了因环境温度突变或持续不适而导致的睡眠中断问题,显著提高了睡眠连续性与整体睡眠质量。此外,床垫与空调的联动调控避免了用户夜间手动调节温度的操作,既能保障睡眠过程不被人为干扰,又能使环境温度始终处于与当前睡眠阶段相匹配的舒适区间,整体睡眠体验得到明显改善。
Smart Images

Figure CN122997615A_ABST
Abstract
Description
Technical Field
[0001] This invention proposes a method and system for linking a sleep monitoring mattress with an air conditioner to aid sleep, belonging to the field of smart home and sleep monitoring technology. Background Technology
[0002] Most existing sleep monitoring devices operate independently. While smart mattresses can collect user movement and surface temperature signals through built-in piezoelectric and temperature sensors, an effective collaborative mechanism has not yet been established between them and environmental control devices such as bedroom air conditioners. As the main temperature control device in the bedroom, the operating temperature and fan speed of the air conditioner are usually manually preset by the user or executed according to a fixed time program, making it impossible to sense the user's real-time sleep status and respond dynamically.
[0003] From the perspective of human sleep physiology, the body's core temperature naturally decreases during deep sleep, and a slightly lower ambient temperature at this time is more conducive to maintaining sleep depth. In the early stages of wakefulness, body temperature gradually rises, and appropriately increasing the ambient temperature can help users wake up naturally. The fixed temperature setting of traditional air conditioners is difficult to adapt to the differentiated temperature control needs of the above-mentioned different sleep stages. Micro-awakenings caused by excessively high or low temperatures occur frequently at night, significantly disrupting the continuity of sleep.
[0004] Currently, a few solutions have attempted to link mattress monitoring data with air conditioning control, but most of them use a single body movement threshold triggering method, failing to fully integrate multi-dimensional features such as body movement and heart rate variability to conduct fine division of sleep stages. At the same time, they lack continuous learning and curve modeling of users' personal temperature preferences, resulting in insufficient accuracy and personalization of temperature control adjustment, and poor adaptability to people with light sleep and easy awakening. Summary of the Invention
[0005] This invention provides a method and system for linking a sleep monitoring mattress with an air conditioner to aid sleep, in order to solve the problems mentioned in the background section above: This invention proposes a sleep-aiding method that links a sleep monitoring mattress with an air conditioner, the method comprising: S1. Extract body movement signals and calculate heart rate variability parameters from the user's vital signs signals collected by the sleep monitoring mattress. Remove artifacts and correct baselines from the original vital signs signals to generate standardized vital signs data. Perform joint time-domain and frequency-domain transformation on the standardized vital signs data to generate a multimodal sleep state feature set. S2. Perform sleep stage pattern matching processing on the multimodal sleep state feature set, and use the sleep stage recognition algorithm to map the vital signs to the preset sleep stage classification system to generate sleep stage classification data; perform sleep quality quantification processing on the sleep stage classification data, and calculate the current sleep quality score by combining body movement amplitude and heart rate variability indicators to generate sleep quality score data. S3. Perform environmental control requirement transformation processing on sleep quality score data, convert sleep stage classification data and sleep quality score data into control parameters for air conditioning temperature and fan speed, and generate air conditioning control parameter data; perform personalized curve matching processing on air conditioning control parameter data to generate personalized temperature benchmark data. S4. Perform control strategy fusion processing on personalized temperature benchmark data, combine current sleep stage classification data and sleep quality score data to limit the boundaries of air conditioner operating parameters, and generate air conditioner operating parameter limit data; perform time priority sorting processing on air conditioner operating parameter limit data to generate air conditioner control time sequence data; S5. Perform instruction decomposition and pre-allocation processing on the air conditioning control timing sequence data, decompose the control instructions into temperature adjustment sub-instructions and fan speed adjustment sub-instructions and allocate them to the air conditioning control module to generate air conditioning control sub-instruction data; perform linkage synchronization preparation processing on the air conditioning control sub-instruction data to generate a mattress and air conditioning linkage control ready signal.
[0006] This invention proposes a sleep-monitoring mattress and air conditioning linkage sleep aid system, 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.
[0007] The beneficial effects of this invention are as follows: Through joint analysis of body movement signals and heart rate variability characteristics, this method can accurately distinguish different stages such as sleep onset, deep sleep, REM sleep, and wakefulness when the user's sleep state changes dynamically. It can automatically lower the ambient temperature during deep sleep to maintain sleep depth and appropriately raise the temperature before wakefulness to assist the user in waking naturally, significantly reducing the frequency of micro-awakenings caused by temperature discomfort at night. Simultaneously, the continuous learning mechanism of the individual sleep temperature curve allows the system to continuously adapt to the user's individual temperature preferences, enhancing the targeting and accuracy of temperature control adjustment and reducing the deviation between temperature control parameters and actual needs under traditional fixed temperature settings. For individuals with light sleep and frequent awakenings, this method effectively avoids sleep interruptions caused by sudden changes or persistent discomfort in ambient temperature, significantly improving sleep continuity and overall sleep quality. Furthermore, the coordinated control of the mattress and air conditioner eliminates the need for manual temperature adjustments at night, ensuring uninterrupted sleep and maintaining the ambient temperature within a comfortable range matching the current sleep stage, resulting in a significantly improved overall sleep experience. Attached Figure Description
[0008] 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 S1 in this invention. Detailed Implementation
[0009] 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.
[0010] One embodiment of the present invention, such as Figure 1 As shown, a sleep-monitoring mattress and air conditioner are linked to promote sleep, the method comprising: S1. Extract body movement signals and calculate heart rate variability parameters from the user's vital signs signals collected by the sleep monitoring mattress. Remove artifacts and correct baselines from the original vital signs signals to generate standardized vital signs data. Perform joint time-domain and frequency-domain transformation on the standardized vital signs data to extract body movement frequency features and heart rate variability spectrum features to generate a multimodal sleep state feature set. S2. Perform sleep stage pattern matching processing on the multimodal sleep state feature set, and use the sleep stage recognition algorithm to map the vital signs to the preset sleep stage classification system to generate sleep stage classification data; perform sleep quality quantification processing on the sleep stage classification data, and calculate the current sleep quality score by combining body movement amplitude and heart rate variability indicators to generate sleep quality score data. S3. Perform environmental control requirement transformation processing on sleep quality score data, convert sleep stage classification data and sleep quality score data into control parameters for air conditioning temperature and fan speed, and generate air conditioning control parameter data; perform personalized curve matching processing on air conditioning control parameter data, retrieve historical temperature preference data matching the current user from the personal sleep temperature curve library, and generate personalized temperature benchmark data. S4. Perform control strategy fusion processing on personalized temperature benchmark data, combine current sleep stage classification data and sleep quality score data to limit the boundaries of air conditioner operating parameters, and generate air conditioner operating parameter limit data; perform time priority sorting processing on air conditioner operating parameter limit data to generate air conditioner control time sequence data; S5. Perform instruction decomposition and pre-allocation processing on the air conditioning control timing sequence data, decompose the control instructions into temperature adjustment sub-instructions and fan speed adjustment sub-instructions and allocate them to the air conditioning control module to generate air conditioning control sub-instruction data; perform linkage synchronization preparation processing on the air conditioning control sub-instruction data to generate a mattress and air conditioning linkage control ready signal.
[0011] The working principle and effects of the above technical solution are as follows: By collecting user vital signs signals in real time through the mattress and extracting multi-dimensional features, it can accurately capture physiological changes in different sleep stages, improving the accuracy of sleep state recognition and sleep quality assessment. By dynamically converting air conditioning control parameters based on the user's sleep state and matching personal historical sleep temperature preferences, the air conditioning control method can be tailored to the user's personalized sleep needs, improving the comfort of nighttime sleep. By imposing boundary constraints and prioritizing air conditioning operating parameters, the device control logic is standardized, reducing frequent and large-scale adjustments by the air conditioner, thus lowering energy consumption and operational wear. Through instruction decomposition and linkage preprocessing, the mattress monitoring and air conditioning control are synchronized, reducing device linkage delays and preventing lag in sleep environment adjustment from affecting the user's sleep state. This allows for dynamic optimization of the sleep environment based on real-time sleep status while ensuring the stability and smoothness of device linkage operation.
[0012] One embodiment of the present invention, such as Figure 2 As shown, S1 includes: S11. The distributed flexible sensor array deployed on the sleep monitoring mattress continuously picks up the human body's chest and abdomen undulation vibration signals, body surface micro-motion signals, and pulse coupled electrical signals, summarizing them to form a continuously sampled raw vital sign time-series data stream. An adaptive median filtering algorithm is used to remove abnormal sampling points caused by mattress deformation interference and instantaneous noise from turning over, completing the initial noise reduction output of the raw vital sign data for the entire time period. Simultaneously, the raw vital sign time-series data stream is split into an independent body movement sub-data stream and a pulse-derived heart rate sub-data stream, and the two types of sub-data streams are stored in the sensor temporary storage block. S12. Retrieve the two types of split sub-data streams stored in the sensor temporary storage block, and use the sliding window baseline fitting algorithm to correct the baseline offset component caused by signal drift frame by frame. Relying on the segmented artifact recognition model, locate the abrupt artifact segments caused by sudden limb movement and external force touching the mattress. Perform interpolation and completion operations on the artifact segments to complete the artifact removal and baseline correction operations of the full amount of original vital signs data. After the operation is completed, output the standardized vital signs data with uniform sampling accuracy and uniform amplitude range. S13. Split the normalized vital signs data into body movement component sequences and heart rate component sequences. Perform short-time Fourier transform on the body movement component sequences to obtain the frequency domain amplitude distribution. Simultaneously perform sliding time-domain statistical operations to extract time-domain statistics of continuous body movement intervals and single body movement duration. Perform power spectrum transformation operations on the heart rate component sequences to split the multi-band heart rate variability energy distribution. Store the time-domain parameter set and frequency-domain parameter set generated after the transformation of the two types of components respectively. S14. The time-domain and frequency-domain parameters corresponding to the motion component and the spectral-domain parameters corresponding to the heart rate variability component are collected. Extreme abnormal feature values that exceed the reasonable range of human physiology are removed from the parameter group. The remaining effective feature parameters are normalized and scaled to eliminate the data imbalance problem caused by the difference in the dimensions of different features, and a standardized one-dimensional feature unit is obtained. S15. All standardized single-dimensional feature units are spliced together according to the sleep time sequence. All spliced feature parameters are collected to form a multimodal sleep state feature set in a structured storage format. The sampling time axis information corresponding to each feature segment is synchronously bound within the feature set.
[0013] The working principle and effects of the above technical solution are as follows: By processing the original vital sign data stream through multi-level noise reduction and artifact correction, signal interference caused by mattress deformation and limb movement can be effectively eliminated, reducing invalid noise in the original vital sign data and avoiding deviations in vital sign analysis caused by chaotic signals. By using time-frequency joint transformation to mine multi-dimensional vital sign information of body movement and heart rate, subtle physiological changes during sleep can be fully explored, improving the comprehensiveness of sleep feature extraction. By screening outlier parameters and performing normalization scaling, the dimensional differences of different vital sign parameters are balanced, reducing the negative impact of data imbalance on subsequent sleep analysis. By temporally stitching and integrating various feature parameters, a well-organized sleep feature dataset is formed, ensuring the continuity and integrity of vital sign data and providing an accurate and reliable data foundation for subsequent sleep stage identification and quality assessment.
[0014] In one embodiment of the present invention, S13 includes: Read the full set of standardized vital signs data, and perform data splitting based on the differences in the physiological dimensions of signal representation. Divide the body motion component sequence corresponding to human body activity and the heart rate component sequence corresponding to heart rhythm changes. The two types of time-series components maintain the continuity of the original sampling time sequence and are stored in independent signal processing buffer blocks respectively. The body motion component sequence in the buffer block is called, and the time-series signal is converted into a frequency domain signal through short-time Fourier transform. The frequency domain amplitude and frequency distribution characteristics of the body motion signal in the whole time period are obtained. At the same time, the time domain operation is carried out by using a sliding statistical window to extract time domain indicators such as body motion interval, body motion duration, and body motion fluctuation amplitude. The body motion time domain parameter set and body motion frequency domain parameter set are summarized and generated. The heart rate component sequence in the buffer block is called, and the multi-frequency fluctuation characteristics of the heart rate signal are split by power spectrum transformation. The energy distribution and fluctuation characteristics of different frequency bands are analyzed, and multi-dimensional heart rate variability energy parameters and rhythm parameters are collected and summarized to generate a heart rate variability spectral domain parameter set. Data screening and processing were carried out on the body motion and time-frequency domain parameter sets and the heart rate spectrum domain parameter sets to filter out distorted data and abnormal parameters in the supraphysiological range generated during signal conversion, and retain effective and reliable vital sign parameters. The selected effective parameters are classified, collected, and stored in a structured manner. The time-series sampling information corresponding to each parameter is bound together to form a complete and clearly classified time-frequency domain parameter dataset of vital signs.
[0015] The working principle and effects of the above technical solution are as follows: By performing component decomposition processing on standardized vital sign data, body movement signals and heart rate signals can be processed separately, preventing mutual interference between the two types of physiological signals and ensuring the purity of single signal analysis. By analyzing body movement data through dual time-domain and frequency-domain operations, combined with power spectral transform to decompose heart rate fluctuation characteristics, subtle physiological changes during sleep can be deeply explored, improving the detail of vital sign feature extraction. By filtering out abnormal data from various parameters generated during the transformation, distorted parameters generated during the calculation process can be eliminated, reducing the interference of invalid data on subsequent analysis processes. By uniformly collecting and time-series binding storage of effective parameters, it is possible to ensure clear classification and complete dimensions of various vital sign parameters, and to guarantee the accuracy of subsequent sleep state identification and quality assessment, thereby improving the overall stability of sleep monitoring.
[0016] In one embodiment of the present invention, S15 includes: Read the MCP call priority sequence data with complete time sequence arrangement, parse the call order, operation weight and execution time sequence information of each MCP in the sequence level by level, extract the running resource requirement parameters corresponding to each model in batches, and summarize to generate MCP resource adaptation requirement data; The computing resources of MCP resource adaptation requirements are split and adapted. According to the computing power and processing complexity of each MCP, the corresponding processor computing power quota, memory usage quota and data read and write bandwidth resources are allocated to complete the initial allocation of computing power resources for a single model. Each MCP that has completed the computing power allocation is configured to run in an independent environment. Dedicated running blocks are allocated for MCPs of different functional types. The data processing channels and cache storage areas of each block are isolated to prevent resource contention and data interference during the parallel operation of multiple models and generate MCP resource pre-allocation data. Perform resource adaptation verification on the pre-allocated MCP resources, check the computing resources, storage space and operating environment parameters allocated to each MCP one by one, investigate problems such as insufficient resource configuration, resource redundancy and abnormal environment adaptation, and complete the calibration and optimization of all resource configuration parameters. Before parallel calls, a pre-test is performed on the calibrated MCP resource configuration system to verify the link connectivity, data read / write permissions, and computing power activation status of each independent operating environment. Once all parameters meet the requirements, a multi-MCP parallel call ready signal is generated.
[0017] The working principle and effects of the above technical solution are as follows: By combining the computational requirements of each model to perform refined computing power allocation and resource allocation, resource ratios can be adapted to the computational load of different models, reducing system resource waste or insufficient resource supply. By building mutually isolated independent operating environments, resource contention and data cross-interference during multi-model parallel computing can be eliminated, reducing the probability of computational errors during multi-task synchronous operation. By comprehensively verifying and calibrating resource configuration parameters, resource adaptation anomalies can be identified and corrected in a timely manner, avoiding problems such as model lag or computational failure caused by parameter configuration deviations. Through pre-emptive status detection of the operating environment, the availability status of links and computing power can be confirmed in advance, ensuring the stability and smoothness of multi-model parallel operation, and improving the overall system's batch computing execution efficiency and operational reliability.
[0018] In one embodiment of the present invention, S2 includes: S21. Retrieve the complete multimodal sleep state feature set, and perform temporal segmentation of the feature set according to the fixed duration sleep slice rule. Each temporal slice corresponds to a continuous human sleep process. The feature set is split into batches of independent segmented feature samples, and each segmented feature sample is stored separately in the feature segment cache space. S22. Call the pre-trained hierarchical sleep stage recognition model, read the feature samples of each segment in the feature segment cache space in sequence, compare the matching degree between the sample and the baseline feature template of each sleep stage based on the feature distribution similarity calculation, divide the sleep stages into four categories: wakefulness, light sleep, deep sleep, and REM sleep based on the matching degree value, and output the single-slice sleep labeling results segment by segment. S23. Collect the single-slice sleep labeling results corresponding to all time-series slices throughout the entire time period, reassemble and integrate them according to the original sampling time sequence, remove abnormal labeling nodes with irregular jumps between adjacent slices, perform secondary correction and labeling on the jump nodes in combination with the sleep features of the preceding and following segments, and integrate and correct the data to generate sleep stage classification data with continuous time sequence arrangement. S24. Extract the real-time body movement amplitude values and the proportion of heart rate variability energy corresponding to each sleep stage from the multimodal sleep state feature set, build a multi-factor weighted quantitative calculation formula, configure the factor weight coefficients corresponding to different sleep stages in the formula, and substitute the corresponding physiological indicator values in segments to carry out basic score calculation. S25. Summarize the basic scores for each sleep segment, deduct the deductions for excessive body movement and drastic fluctuations in heart rate variability within the segment, complete the single-cycle sleep score calculation, and compile the calculated full-time scores according to sleep time sequence to generate sleep quality score data with time sequence labeling.
[0019] The working principle and effects of the above technical solution are as follows: By uniformly slicing sleep feature data over time, refined sleep period samples can be extracted, allowing sleep state analysis to move beyond overall judgment and improving the detail of sleep stage identification. By comparing feature similarity through a model to classify sleep levels, different sleep states can be accurately distinguished, reducing identification bias caused by single-indicator judgments. Integrating and correcting the time-series labeling results can eliminate abrupt changes caused by slice identification, avoiding misjudgments of sudden state changes that lead to inaccurate sleep stage classification. By calculating sleep scores using a weighted average of multiple physiological indicators and correcting scores based on abnormal physical signs, the system can accurately reflect the actual sleep state of the human body, improving the accuracy of sleep quality scoring and ensuring the continuity and rationality of sleep assessment results across all time periods, providing reliable data support for subsequent intelligent regulation of the sleep environment.
[0020] In one embodiment of the present invention, step S21 includes: Read the complete multimodal sleep state feature set in the system storage block, parse the full-time body movement feature parameters and heart rate variability feature parameters contained in the feature set, extract the sampling time axis information bound to the feature set simultaneously, and retain the continuous and complete sleep time series feature data stream; A time-series slicing mechanism with fixed time intervals is used to uniformly divide the overall feature data stream, so that each slice covers the same duration of human sleep monitoring process, ensuring the consistency of the temporal dimension and the comparability of data for each feature sample. Data integrity screening is performed on multiple groups of time-series slices that have been segmented, and invalid slices with missing features or misaligned time sequences are removed, while valid slice units with complete parameters and continuous time sequences are retained. The selected effective time series slices are individually packaged into independent segmented feature samples, and the data dimensions and storage formats of each sample are standardized to eliminate storage differences between samples. All the properly organized segmented feature samples are imported in batches into a dedicated feature segmentation cache space, completing the partitioning and temporal orderly arrangement of the samples, providing standardized sample data for subsequent sleep stage recognition operations.
[0021] The working principle and effects of the above technical solution are as follows: By uniformly slicing the complete sleep feature data stream, long-term sleep monitoring data can be divided into standardized short-term samples, improving the granularity of sleep detail analysis. Integrity screening of the sliced samples eliminates defective and invalid data, reducing the occurrence of distorted analysis results due to abnormal samples. Unifying the data dimensions and storage format of all valid samples reduces format differences between samples, improving the adaptability of subsequent model recognition operations and overall processing speed. Orderly storing the standardized samples in a dedicated cache space standardizes data storage order, avoiding read errors caused by messy data arrangement. This ensures the smooth progress of subsequent sleep stage recognition processes and continuously improves the stability and accuracy of sleep state analysis results.
[0022] In one embodiment of the present invention, S3 includes: S31. Simultaneously read in sleep stage classification data and sleep quality score data, split the data into time-segment sleep stage labels and corresponding time-segment sleep scores, define the human thermal comfort threshold ranges corresponding to different sleep stages and different score ranges, convert the threshold ranges into air conditioning target temperature control ranges and air outlet rate ranges, and obtain preliminary environmental control quantitative indicators. S32. Based on the human sleep thermophysiological correlation conversion model, the preliminary environmental control quantitative indicators are converted into set temperature values and fan speed values that the air conditioner can recognize. The sleep start and end times corresponding to the effective time of each parameter are marked simultaneously. The batch conversion of original control parameters for multiple time periods is completed, and the conversion results are summarized to generate air conditioner control parameter data. S33. Read the user identification code stored in the mattress local storage module, retrieve the cloud personal sleep temperature curve library based on the identification code, filter the user's full-cycle historical sleep temperature records that match the code, split the historical records into historical temperature sampling sequences corresponding to different sleep stages, and remove abnormal temperature sampling records under single illness or extreme abnormal environmental conditions. S34. Collect and filter the historical temperature sampling sequences of each sleep stage, perform mean statistics and dispersion calculation on multiple groups of historical temperature values under the same sleep stage, and remove extreme samples from the sampling groups whose dispersion exceeds the preset limit, and retain the effective temperature statistics after convergence. S35. Arrange and integrate the effective temperature statistics corresponding to each sleep stage in chronological order, and use them as a temperature reference benchmark for a single time period. Integrate and summarize all benchmark values to generate personalized temperature benchmark data arranged in stages.
[0023] The working principle and effects of the above technical solution are as follows: By combining real-time sleep status and sleep quality to calculate environmental requirements, the air conditioning control parameters can be made to match the thermal comfort needs of the human body at different sleep stages, reducing the inadequacy of adaptability caused by fixed parameter control. By uniformly converting the control values into device-recognizable values and marking the effective time periods, precise control of the sleep environment at multiple time periods can be achieved, improving the adaptability accuracy of air conditioning control. By retrieving users' historical sleep temperature data and removing abnormal records, invalid temperature data in special scenarios can be filtered out, reducing the interference of extreme samples on the temperature benchmark. By performing statistical convergence processing on historical temperature data, temperature standards that fit users' long-term sleep habits can be extracted. This avoids the one-sidedness caused by single historical data and forms a personalized control benchmark that fits individual physical condition and sleep habits, significantly improving the comfort and adaptability of sleep environment control.
[0024] In one embodiment of the present invention, S35 includes: Retrieve the convergent effective temperature statistics corresponding to all sleep stages, synchronously match the sleep time interval and sleep stage identifier corresponding to each set of statistics, and establish a one-to-one mapping relationship between temperature values and sleep time periods. According to the order of the complete sleep monitoring timeline, the effective temperature statistics corresponding to different sleep periods are arranged in sequence, the transition temperature values between adjacent sleep switching nodes are filled in, and the numerical gaps at the time period connections are eliminated. A smoothing fitting operation is performed on the temperature value queue that has been arranged in time sequence to weaken the step numerical changes caused by single-segment statistical values and generate a continuously and gently changing time-segmented temperature reference unit. For each temperature reference unit, a floating adaptation tag for the sleep quality of the corresponding time period is bound. The tag content records the sleep score range adapted to the reference value. All time-segmented temperature reference units with adaptation tags are collected, and the data storage structure and time sequence arrangement format are standardized and uniformly organized to generate personalized temperature reference data arranged in stages.
[0025] The working principle and effects of the above technical solution are as follows: By accurately matching the effective temperature statistics with each sleep period, the temperature benchmark can be made to conform to the physiological needs of different sleep states, eliminating the situation where temperature parameters do not correspond to sleep stages. By supplementing the transitional temperature values at sleep switching nodes, data gaps at the transition points between time periods can be filled, avoiding the problem of temperature control logic discontinuity when switching sleep stages. By performing smooth fitting processing on the time-series temperature data, the step fluctuations of temperature parameters can be weakened, reducing the frequent and large-scale temperature adjustments by the air conditioner and improving the temperature stability of the sleep environment. By binding sleep quality adaptation tags, the temperature benchmark can adapt to the fine-tuning needs of different sleep states, ensuring the targeted nature of segmented temperature control and making the overall temperature control rhythm more gentle and natural, effectively improving the user's nighttime sleep comfort experience.
[0026] In one embodiment of the present invention, step S4 includes: S41. Extract the baseline temperature values of each stage within the personalized temperature baseline data for each time period, and simultaneously retrieve the corresponding sleep stage classification labels and sleep quality score values for the corresponding time period. Configure the floating correction coefficient of the baseline temperature for the three sleep states of light sleep, deep sleep, and rapid eye movement, and substitute the correction coefficient into the baseline temperature to complete the initial parameter fusion calculation. S42. Retrieve the hardware operation limit parameters of the air conditioning equipment itself, and combine them with the upper and lower limit thresholds for human sleep safety temperature control. Define the upper and lower limits of the values for the temperature parameters and derived wind speed parameters obtained through the initial fusion calculation. When the parameter values exceed the upper and lower limits, they will automatically converge to the critical limit point to complete the boundary constraint calculation of a single parameter. S43. Collect all temperature and wind speed parameters that have undergone boundary constraint calculations, bind the effective sleep period and corresponding sleep quality level information of each parameter, classify and collect the parameters after full constraint, and generate air conditioner operation parameter limit data with constraint threshold labels. S44. Disassemble all control parameters inside the air conditioner's operating parameter limit data, and use the sleep depth and real-time sleep quality score, which correspond to the sleep stage, as two indicators as priority calculation factors. Perform a two-factor weighted calculation to obtain the priority score of a single parameter. The higher the score, the earlier the corresponding control action is executed. S45. All control parameters are rearranged according to the priority score from high to low. The original timing mark is retained during the parameter arrangement process. After the orderly rearrangement of all parameters is completed, air conditioning control timing sequence data with continuous timing arrangement is generated.
[0027] The working principle and effects of the above technical solution are as follows: By combining and correcting the baseline temperature according to different sleep states, the temperature control parameters can be made to match the user's real-time sleep state, improving the matching degree between environmental regulation and sleep state. By setting two-way boundary constraints on the air conditioner's operating parameters, the operating values of the equipment can be limited to a safe and reasonable range, preventing equipment malfunctions and physical discomfort caused by abnormal parameter exceedances. By classifying and collecting the control parameters and binding them to sleep periods and quality information, the attributes of various control parameters can be made clearer, facilitating subsequent orderly calling and execution. By determining the control priority through a two-factor weighting method, key control actions that affect sleep quality can be prioritized, improving the targeting of environmental regulation. By prioritizing the control parameters and retaining time sequence marks, it is possible to ensure that emergency control actions are executed first, while maintaining the temporal rationality of the overall temperature control rhythm, making the air conditioner control process more in line with the human body's sleep change patterns.
[0028] In one embodiment of the present invention, S45 includes: Read all air conditioning control parameters with priority scores, collect the priority scores, corresponding sleep period information, and parameter constraint threshold information of all temperature control parameters and fan speed control parameters, and summarize them to form a complete control parameter sorting dataset; All control parameters in the sorted dataset are compared hierarchically, and the initial order is arranged according to the priority score from high to low, so that the control parameters that are suitable for sleep abnormalities and poor sleep quality are given priority in the order of execution. Iterate through all the control parameters after the initial sorting, retain the original time-series effective flag and sleep stage association flag carried by each parameter, maintain the time-series correspondence between the parameters and the sleep periods, and avoid the time-series disorder caused by the sorting operation; Perform adjacent parameter adaptation verification on the control parameters that have been arranged in sequence, and adjust the arrangement order of temperature and wind speed parameters within the same sleep period to ensure that multiple control parameters in the same stage are coordinated and matched and that the execution logic is unified. All control parameters that have completed priority optimization and timing calibration are collected and continuously integrated and arranged according to the complete timeline of sleep monitoring to generate a time-series data of air conditioning control with coherent timing and clear priority levels.
[0029] The working principle and effects of the above technical solution are as follows: By integrating the core information of various air conditioning control parameters to form a complete sorted dataset, the scheduling standards of various control parameters can be unified, improving the overall efficiency of parameter sorting. Parameters are arranged sequentially using priority scores, allowing for priority response to environmental adjustment needs during periods of poor sleep quality, thus improving the effectiveness of control during critical sleep stages. By preserving the original temporal markers of parameters during sorting operations, the correspondence between parameters and sleep periods can be maintained, avoiding temporal sequence errors caused by sorting processes. By verifying the compatibility of adjacent parameters and optimizing the arrangement of parameters in the same stage, temperature and fan speed adjustments can be synchronized, reducing logical conflicts when multiple parameters are executed simultaneously. This ensures both rapid implementation of emergency control actions and maintains a smooth and consistent air conditioning control rhythm throughout the night, effectively improving the rationality and stability of dynamic adjustment of the sleep environment.
[0030] In one embodiment of the present invention, step S5 includes: S51. Read the integrated parameters inside the air conditioning control time sequence data segment by segment, split the fields according to the parameter control object attributes, and separate the parameter fields specifically for changing the set temperature and the parameter fields specifically for adjusting the air outlet speed. The two types of fields are respectively grouped into independent parameter groups. S52. The temperature parameter group and the wind speed parameter group are respectively converted into digital instruction codes that can be parsed by the air conditioner main control chip. The encoding process is bound to the effective delay time of each instruction. The temperature type codes are summarized into temperature adjustment sub-instruction groups, and the wind speed type codes are summarized into wind speed adjustment sub-instruction groups. S53. Divide the internal temperature control subunit and airflow speed regulation subunit of the air conditioning control module. Send the temperature regulation sub-instruction group in batches to the temporary register of the temperature control subunit and the airflow speed regulation sub-instruction group in batches to the temporary register of the airflow speed regulation subunit. After the register completes the temporary storage of instructions, it summarizes all the sent codes to generate air conditioning control sub-instruction data. S54. The mattress main control unit and the air conditioner control module perform a two-way communication link self-test operation, sequentially verifying three operating indicators: data transmission baud rate, link packet loss rate, and module power supply voltage. After all indicators fall within the normal operating range of the equipment, the read and write permissions of the mattress sensor data temporary cache and the air conditioner command register are locked simultaneously. S55. After the end-to-end self-test is completed and the device read / write permissions are locked, the mattress main control unit generates a ready signal in a level format. The signal is then pushed to the air conditioning control module to complete the preparation for the full-process linkage synchronization and generate a ready signal for the linkage control of the mattress and the air conditioning.
[0031] The working principle and effects of the above technical solution are as follows: By classifying, splitting, and independently aggregating the air conditioning control parameters, the control logic of temperature and fan speed can be distinguished, reducing the command confusion caused by the mixing of these two types of parameters. By uniformly converting the parameters into digital codes that the device can recognize and binding their effective duration, the executability of control commands can be improved, allowing the air conditioning equipment to accurately receive various adjustment needs. By distributing commands to the corresponding control subunits and temporarily storing them, the command transmission process can be standardized, improving the regularity of command reception and storage at the device end. Through multi-index self-checking of the bidirectional communication link, link transmission anomalies and potential equipment operation hazards can be detected in advance, reducing the probability of command transmission packet loss and transmission failure. By locking data read and write permissions and generating a linkage ready signal, the synchronization and stability of the linkage process between the mattress and the air conditioning equipment can be ensured, and control errors caused by data corruption and tampering can be avoided, thus improving the overall operational reliability of the entire sleep linkage control system.
[0032] One embodiment of the present invention provides a sleep-aid system that links a sleep monitoring mattress with an air conditioner, 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.
[0033] 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 sleep-aiding method that links a sleep monitoring mattress with an air conditioner, characterized in that, The method includes: S1. Extract body movement signals and calculate heart rate variability parameters from the user's vital signs signals collected by the sleep monitoring mattress. Remove artifacts and correct baselines from the original vital signs signals to generate standardized vital signs data. Perform joint time-domain and frequency-domain transformation on the standardized vital signs data to generate a multimodal sleep state feature set. S2. Perform sleep stage pattern matching processing on the multimodal sleep state feature set, and use the sleep stage recognition algorithm to map the vital signs to the preset sleep stage classification system to generate sleep stage classification data; perform sleep quality quantification processing on the sleep stage classification data, and calculate the current sleep quality score by combining body movement amplitude and heart rate variability indicators to generate sleep quality score data. S3. Perform environmental control requirement transformation processing on sleep quality score data, convert sleep stage classification data and sleep quality score data into control parameters for air conditioning temperature and fan speed, and generate air conditioning control parameter data; perform personalized curve matching processing on air conditioning control parameter data to generate personalized temperature benchmark data. S4. Perform control strategy fusion processing on personalized temperature baseline data, combine current sleep stage classification data and sleep quality score data to limit the boundaries of air conditioner operating parameters, and generate air conditioner operating parameter limit data; perform time priority sorting processing on air conditioner operating parameter limit data to generate air conditioner control time sequence data; S5. Perform instruction decomposition and pre-allocation processing on the air conditioning control timing sequence data, decompose the control instructions into temperature adjustment sub-instructions and fan speed adjustment sub-instructions and allocate them to the air conditioning control module to generate air conditioning control sub-instruction data; perform linkage synchronization preparation processing on the air conditioning control sub-instruction data to generate a mattress and air conditioning linkage control ready signal.
2. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 1, characterized in that, S1 includes: S11. Continuously pick up the human chest and abdomen undulation vibration signal, body surface micro-motion signal and pulse coupled electrical signal, and summarize them to form a continuously sampled raw vital sign time series data stream, and complete the initial noise reduction output of the raw vital sign data for the whole time period; simultaneously split the raw vital sign time series data stream into an independent body movement sub-data stream and a pulse-derived heart rate sub-data stream, and store the two types of sub-data streams in the sensor temporary storage block. S12. Retrieve the two types of split sub-data streams stored in the sensor temporary storage block, use the sliding window baseline fitting algorithm to correct the baseline offset component caused by signal drift frame by frame, locate the abrupt artifact segment based on the segmented artifact recognition model, perform interpolation completion operation on the artifact segment, complete the artifact removal and baseline correction operation of the full amount of original vital signs data, and output the normalized vital signs data after the operation is completed. S13. Split the normalized vital signs data into body movement component sequences and heart rate component sequences. Perform short-time Fourier transform on the body movement component sequences to obtain the frequency domain amplitude distribution. Simultaneously perform sliding time-domain statistical operations to extract time-domain statistics of continuous body movement intervals and single body movement duration. Perform power spectrum transformation operations on the heart rate component sequences to split the multi-frequency band heart rate variability energy distribution. Store the time-domain parameter set and frequency-domain parameter set generated after the transformation of the two types of components respectively. S14. Collect the time-domain and frequency-domain parameters corresponding to the motion component and the spectral-domain parameters corresponding to the heart rate variability component, remove extreme abnormal feature values in the parameter group that exceed the reasonable range of human physiology, and perform dimension normalization and scaling on the remaining effective feature parameters to obtain standardized single-dimensional feature units. S15. All standardized single-dimensional feature units are spliced together according to the sleep time sequence. All spliced feature parameters are collected to form a multimodal sleep state feature set in a structured storage format. The sampling time axis information corresponding to each feature segment is synchronously bound within the feature set.
3. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 2, characterized in that, S13 includes: Read the full set of standardized vital signs data, and perform data splitting based on the differences in the physiological dimensions of signal representation. Divide the body motion component sequence corresponding to human body activity and the heart rate component sequence corresponding to heart rhythm changes. The two types of time-series components maintain the continuity of the original sampling time sequence and are stored in independent signal processing buffer blocks respectively. The body motion component sequence in the buffer block is called, and the time-series signal is converted into a frequency domain signal through short-time Fourier transform. The frequency domain amplitude and frequency distribution characteristics of the body motion signal in the whole time period are obtained. At the same time, time domain operations are carried out using a sliding statistical window to extract time domain indicators and generate body motion time domain parameter set and body motion frequency domain parameter set. The heart rate component sequence in the buffer block is called, and the multi-frequency fluctuation characteristics of the heart rate signal are split by power spectrum transformation. The energy distribution and fluctuation characteristics of different frequency bands are analyzed, and multi-dimensional heart rate variability energy parameters and rhythm parameters are collected and summarized to generate a heart rate variability spectral domain parameter set. Data screening and processing were carried out on the body motion and time-frequency domain parameter sets and the heart rate spectrum domain parameter sets to filter out distorted data and abnormal parameters in the supraphysiological range generated during signal conversion, and retain effective and reliable vital sign parameters. The selected effective parameters are classified, collected, and stored in a structured manner. The time-series sampling information corresponding to each parameter is bound together to form a complete and clearly classified time-frequency domain parameter dataset of vital signs.
4. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 2, characterized in that, S15 includes: Read the MCP call priority sequence data with complete time sequence arrangement, parse the call order, operation weight and execution time sequence information of each MCP in the sequence level by level, extract the running resource requirement parameters corresponding to each model in batches, and summarize to generate MCP resource adaptation requirement data; The computing resources of MCP resource adaptation requirements are split and adapted. According to the computing power and processing complexity of each MCP, the corresponding processor computing power quota, memory usage quota and data read and write bandwidth resources are allocated to complete the initial allocation of computing power resources for a single model. Each MCP that has completed the computing power allocation is configured to run in an independent environment. Dedicated running blocks are allocated for MCPs of different functional types. The data processing channels and cache storage areas of each block are isolated to prevent resource contention and data interference during the parallel operation of multiple models and generate MCP resource pre-allocation data. Perform resource adaptation verification on the pre-allocated MCP resources, check the computing resources, storage space and operating environment parameters allocated to each MCP one by one, investigate problems such as insufficient resource configuration, resource redundancy and abnormal environment adaptation, and complete the calibration and optimization of all resource configuration parameters. Before parallel calls, a pre-test is performed on the calibrated MCP resource configuration system to verify the link connectivity, data read / write permissions, and computing power activation status of each independent operating environment. Once all parameters meet the requirements, a multi-MCP parallel call ready signal is generated.
5. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 1, characterized in that, S2 includes: S21. Retrieve the complete multimodal sleep state feature set, and perform temporal segmentation of the feature set according to the fixed duration sleep slice rule. Each temporal slice corresponds to a continuous human sleep process. The feature set is split into batches of independent segmented feature samples, and each segmented feature sample is stored separately in the feature segment cache space. S22. Call the pre-trained hierarchical sleep stage recognition model, read the feature samples of each segment in the feature segment cache space in sequence, compare the matching degree between the sample and the baseline feature template of each sleep stage based on the feature distribution similarity calculation, divide the sleep stages into four categories: wakefulness, light sleep, deep sleep, and REM sleep based on the matching degree value, and output the single-slice sleep labeling results segment by segment. S23. Collect the single-slice sleep labeling results corresponding to all time-series slices throughout the entire time period, reassemble and integrate them according to the original sampling time sequence, perform secondary correction and labeling on the jump nodes in combination with the sleep features of the two segments before and after, and generate continuous time-series sleep stage classification data after integration and correction. S24. Extract the real-time body movement amplitude values and the proportion of heart rate variability energy corresponding to each sleep stage from the multimodal sleep state feature set, build a multi-factor weighted quantitative calculation formula, configure the factor weight coefficients corresponding to different sleep stages in the formula, and substitute the corresponding physiological indicator values in segments to carry out basic score calculation. S25. Summarize the basic scores for each sleep segment, deduct the deductions for excessive body movement and drastic fluctuations in heart rate variability within the segment, complete the single-cycle sleep score calculation, and compile the calculated full-time scores according to sleep time sequence to generate sleep quality score data with time sequence labeling.
6. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 1, characterized in that, The S3 includes: S31. Simultaneously read in sleep stage classification data and sleep quality score data, split the data into time-segment sleep stage labels and corresponding time-segment sleep scores, define the human thermal comfort threshold ranges corresponding to different sleep stages and different score ranges, convert the threshold ranges into air conditioning target temperature control ranges and air outlet rate ranges, and obtain preliminary environmental control quantitative indicators. S32. Based on the human sleep thermophysiological correlation conversion model, the preliminary environmental control quantitative indicators are converted into set temperature values and fan speed values that the air conditioner can recognize. The sleep start and end times corresponding to the effective time of each parameter are marked simultaneously. The batch conversion of original control parameters for multiple time periods is completed, and the conversion results are summarized to generate air conditioner control parameter data. S33. Read the user identification code stored in the mattress local storage module, retrieve the cloud personal sleep temperature curve library based on the identification code, filter the user's full-cycle historical sleep temperature records that match the code, split the historical records into historical temperature sampling sequences corresponding to different sleep stages, and remove abnormal temperature sampling records. S34. Collect and filter the historical temperature sampling sequences of each sleep stage, perform mean statistics and dispersion calculation on multiple groups of historical temperature values under the same sleep stage, and remove extreme samples from the sampling groups whose dispersion exceeds the preset limit, and retain the effective temperature statistics after convergence. S35. Arrange and integrate the effective temperature statistics corresponding to each sleep stage in chronological order, and use them as a temperature reference benchmark for a single time period. Integrate and summarize all benchmark values to generate personalized temperature benchmark data arranged in stages.
7. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 6, characterized in that, The S35 includes: Retrieve the convergent effective temperature statistics corresponding to all sleep stages, synchronously match the sleep time interval and sleep stage identifier corresponding to each set of statistics, and establish a one-to-one mapping relationship between temperature values and sleep time periods. According to the order of the complete sleep monitoring timeline, the effective temperature statistics corresponding to different sleep periods are arranged in sequence, the transition temperature values between adjacent sleep switching nodes are filled in, and the numerical gaps at the time period connections are eliminated. A smoothing fitting operation is performed on the temperature value queue that has been arranged in time sequence to weaken the step numerical changes caused by single-segment statistical values and generate a continuously and gently changing time-segmented temperature reference unit. For each temperature reference unit, a floating adaptation tag for the sleep quality of the corresponding time period is bound. The tag content records the sleep score range adapted to the reference value. All time-segmented temperature reference units with adaptation tags are collected, and the data storage structure and time sequence arrangement format are standardized and uniformly organized to generate personalized temperature reference data arranged in stages.
8. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 1, characterized in that, The S4 includes: S41. Extract the baseline temperature values of each stage within the personalized temperature baseline data for each time period, and simultaneously retrieve the corresponding sleep stage classification labels and sleep quality score values for the corresponding time period. Configure the floating correction coefficient of the baseline temperature for the three sleep states of light sleep, deep sleep, and rapid eye movement, and substitute the correction coefficient into the baseline temperature to complete the initial parameter fusion calculation. S42. Retrieve the hardware operation limit parameters of the air conditioning equipment itself, and combine them with the upper and lower limit thresholds for human sleep safety temperature control. Define the upper and lower limits of the values for the temperature parameters and derived wind speed parameters obtained through the initial fusion calculation. When the parameter values exceed the upper and lower limits, they will automatically converge to the critical limit point to complete the boundary constraint calculation of a single parameter. S43. Collect all temperature and wind speed parameters that have undergone boundary constraint calculations, bind the effective sleep period and corresponding sleep quality level information of each parameter, classify and collect the parameters after full constraint, and generate air conditioner operation parameter limit data with constraint threshold labels. S44. Disassemble all control parameters inside the air conditioner's operating parameter limit data, and use the sleep depth and real-time sleep quality score, which correspond to the sleep stage, as two indicators as priority calculation factors. Perform a two-factor weighted calculation to obtain the priority score of a single parameter. The higher the score, the earlier the corresponding control action is executed. S45. All control parameters are rearranged according to the priority score from high to low. The original timing mark is retained during the parameter arrangement process. After the orderly rearrangement of all parameters is completed, air conditioning control timing sequence data with continuous timing arrangement is generated.
9. The sleep-aiding method for linking a sleep monitoring mattress with an air conditioner according to claim 1, characterized in that, The S5 includes: S51. Read the integrated parameters inside the air conditioning control time sequence data segment by segment, split the fields according to the parameter control object attributes, and separate the parameter fields specifically for changing the set temperature and the parameter fields specifically for adjusting the air outlet speed. The two types of fields are respectively grouped into independent parameter groups. S52. The temperature parameter group and the wind speed parameter group are respectively converted into digital instruction codes that can be parsed by the air conditioner main control chip. The encoding process is bound to the effective delay time of each instruction. The temperature type codes are summarized into temperature adjustment sub-instruction groups, and the wind speed type codes are summarized into wind speed adjustment sub-instruction groups. S53. Divide the internal temperature control subunit and airflow speed regulation subunit of the air conditioning control module. Send the temperature regulation sub-instruction group in batches to the temporary register of the temperature control subunit and the airflow speed regulation sub-instruction group in batches to the temporary register of the airflow speed regulation subunit. After the register completes the temporary storage of instructions, it summarizes all the sent codes to generate air conditioning control sub-instruction data. S54. The mattress main control unit and the air conditioner control module perform a two-way communication link self-test operation, sequentially verifying three operating indicators: data transmission baud rate, link packet loss rate, and module power supply voltage. After all indicators fall within the normal operating range of the equipment, the read and write permissions of the mattress sensor data temporary cache and the air conditioner command register are locked simultaneously. S55. After the end-to-end self-test is completed and the device read / write permissions are locked, the mattress main control unit generates a ready signal in a level format. The signal is then pushed to the air conditioning control module to complete the preparation for the full-process linkage synchronization and generate a ready signal for the linkage control of the mattress and the air conditioning.
10. A sleep-monitoring mattress and air conditioner linkage sleep aid system, 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.
