Intelligent mattress water temperature control method and system based on AI
By installing multiple sensors on the smart mattress to collect user data in real time, and using the comfort temperature model and neural network model to generate a personalized temperature control strategy, the existing smart mattress temperature control system is solved, and the problem of the inability to effectively deal with individual users' individual differences and the inability to dynamically learn user sleep habits is achieved, achieving high-precision and personalized sleep temperature control effects.
Patent Information
- Application Number
- CN202411678339.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-28
AI Technical Summary
The existing smart mattress temperature control system cannot effectively deal with individual users' differences and cannot adjust the water temperature in real time. It ignores the different needs of users for temperature at different sleep stages, and cannot dynamically learn users' sleep habits, resulting in insufficient adjustment effects and personalization.
By installing multiple sensors inside the mattress, users' body temperature, ambient temperature, heart rate, breathing frequency and body movement data are collected in real time, and the user's comfort temperature interval is calculated using the preset comfort temperature model, and an initial water temperature regulation control strategy is generated based on the user's historical sleep data. At the same time, through the pre-trained neural network model, a personalized temperature control strategy is generated based on the real-time monitored sleep data, and the surface temperature of the mattress is dynamically adjusted.
It realizes fine control over individual differences of users, can dynamically adjust the water temperature according to the user's actual sleep state and temperature needs, and improves the user's sleep comfort and overall sleep quality.
Smart Images

Figure CN119717932A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart mattresses, and in particular to a water temperature control method and system for a smart mattress based on AI. Background Art
[0002] In the prior art, smart mattress temperature control systems mainly rely on preset temperature curves or simple ambient temperature monitoring devices for water temperature regulation. These systems usually adjust the temperature inside the mattress by manual settings or based on fixed time periods, aiming to provide users with a relatively comfortable sleeping experience. Some systems may use basic sensors to collect ambient temperature data and make simple adjustments based on temperature changes, but lack fine-grained control of the user's individual body temperature and sleep state.
[0003] However, existing smart mattress temperature control systems have obvious shortcomings. First, they cannot effectively deal with individual differences among users, such as changes in body temperature and sensitivity to temperature. Second, traditional temperature control systems cannot adjust the water temperature in real time, and often ignore the different temperature requirements of users at different stages of sleep. In addition, the temperature control systems in the prior art are usually unable to dynamically learn the sleeping habits of users, resulting in the adjustment effect being not precise and personalized enough, and unable to provide users with an ideal sleeping experience.
[0004] Therefore, there is an urgent need to develop a new intelligent mattress water temperature control method and system. Summary of the invention
[0005] The present application provides an AI-based intelligent mattress water temperature control method and system to improve the user's sleeping comfort.
[0006] The present application provides an AI-based intelligent mattress water temperature control method, comprising: The user's body temperature data, ambient temperature data, heart rate, breathing rate and body movement data are collected through multiple sensors in the mattress; Based on the collected body temperature data and ambient temperature data, the user's current comfortable temperature range is calculated using the preset comfortable temperature model; Generate an initial water temperature adjustment control strategy based on the calculated comfortable temperature range and the user's historical sleep data, wherein the initial water temperature adjustment control strategy is used to control the temperature control unit in the water circulation system inside the mattress to adjust the water temperature so that the mattress surface temperature remains within the user's current comfortable temperature range; During the water temperature adjustment process, the user's body temperature changes, ambient temperature changes, sleep status and mattress surface temperature are monitored and recorded to obtain the user's sleep data; Based on the acquired sleep data, a personalized temperature control strategy is generated through a pre-trained neural network model; The personalized temperature control strategy is applied to the temperature control unit of the water circulation system to adjust the water temperature so that the surface temperature of the mattress can be personalized according to the user's actual sleeping state and temperature requirements.
[0007] The present application provides an AI-based intelligent mattress water temperature control system, comprising: The sensor unit is arranged inside the mattress and is used to collect the user's body temperature data, ambient temperature data, heart rate, breathing rate and body movement data; a central control unit, which is in communication with the plurality of sensor modules, and includes a data processing module for receiving body temperature data and ambient temperature data collected by the plurality of sensors; a comfortable temperature calculation module for calculating the user's current comfortable temperature range based on the body temperature data and ambient temperature data in combination with a preset comfortable temperature model; and an initial control strategy generation module for generating an initial water temperature regulation control strategy according to the comfortable temperature range and the user's historical sleep data; a water circulation subsystem connected to the central control unit, comprising a temperature control unit for adjusting the water temperature inside the mattress according to the initial water temperature adjustment control strategy so that the surface temperature of the mattress is maintained within a comfortable temperature range for the user; A monitoring unit, used to monitor and record the user's body temperature changes, ambient temperature changes, sleep state and mattress surface temperature during the water temperature adjustment process, and obtain the user's sleep data; wherein the sleep state is obtained through a sleep monitoring algorithm based on the user's heart rate, breathing rate, body movement and body temperature; a neural network model unit, embedded in the central control unit, for generating a personalized temperature control strategy according to the sleep data using a pre-trained neural network model; The temperature control execution unit is connected to the temperature control unit in the water circulation subsystem and is used to adjust the water temperature according to the personalized temperature control strategy so that the surface temperature of the mattress can be personalized according to the actual sleeping state and temperature requirements of the user.
[0008] The technical solution proposed in this application has the following beneficial technical effects: (1) By collecting the user's body temperature data and ambient temperature data in real time and combining it with the user's historical sleep data, the system can generate a personalized temperature control strategy, so that the mattress surface temperature can be dynamically adjusted according to the user's actual sleep state and needs, thereby improving the user's comfort. (2) It can continuously monitor the user's body temperature and ambient temperature changes during sleep, and adjust the mattress water temperature control strategy in real time based on the data to ensure that the temperature is always within the user's comfort zone and meet the temperature control needs of different sleep stages. (3) Through the pre-trained neural network model, the system can intelligently learn based on the user's sleep data, gradually optimize the temperature control strategy, achieve adaptive temperature control, and provide a more accurate and personalized sleep temperature control solution. (4) By accurately controlling the temperature of the mattress surface to keep it consistent with the user's body temperature and ambient temperature, the discomfort caused by excessively high or low temperatures can be avoided, thereby significantly improving the user's overall sleep quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is a flow chart of an AI-based smart mattress water temperature control method provided in the first embodiment of the present application.
[0010] Figure 2 It is a schematic diagram of an AI-based smart mattress water temperature control system provided in the second embodiment of the present application. DETAILED DESCRIPTION
[0011] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0012] The first embodiment of the present application provides a method for controlling water temperature of an intelligent mattress based on AI. Figure 1 , which is a schematic diagram of the first embodiment of the present application. Figure 1 The first embodiment of the present application provides an AI-based smart mattress water temperature control method for detailed description.
[0013] Step S101: Collect the user's body temperature data, ambient temperature data, heart rate, breathing rate and body movement data through multiple sensors in the mattress.
[0014] In step S101, the system collects the user's physiological and environmental data through multiple sensors in the mattress. Specifically, these sensors include temperature sensors for monitoring the user's body temperature, environmental sensors for detecting the ambient temperature, electrocardiogram sensors or photoplethysmography (PPG) sensors for capturing the user's heart rate, respiratory sensors for monitoring the user's breathing rate, and acceleration sensors for recording the user's body movements. These sensors are installed at various key locations of the mattress, such as different areas where the user lies, so as to accurately capture signal data related to the user's physiological state.
[0015] First, body temperature data is collected in real time through body temperature sensors. These sensors are usually designed to be embedded or contactable, and can sense and record the temperature of the skin surface when the user touches the mattress. The collection of this temperature data is usually continuous, allowing the system to obtain the user's body temperature changes at any time, especially during sleep, when small fluctuations in body temperature can reflect the user's sleep depth.
[0016] Ambient temperature data is recorded in real time by externally installed environmental sensors. Ambient temperature is crucial for regulating the surface temperature of the mattress while the user is sleeping, especially when the room temperature changes greatly, the water temperature control system of the mattress needs to be adjusted in time. These environmental sensors may be installed around the mattress or near the external area of the mattress, which can sense the temperature fluctuations in the room and feed the data back to the control system.
[0017] The collection of heart rate data mainly relies on electrocardiogram sensors or photoplethysmography sensors installed in the mattress. These sensors obtain heart rate information by detecting the electrical activity of the heart or measuring blood flow through light. Usually, these heart rate sensors can accurately capture the heart rate per minute without disturbing the user's sleep, providing key data reflecting the user's body's state of relaxation and tension.
[0018] For breathing rate, the system usually uses specific breathing sensors to record the user's breathing rhythm. These sensors can detect tiny chest or abdominal movements, thereby accurately calculating the user's breathing rate. Changes in breathing rate during sleep can help identify whether the user is in a light or deep sleep stage, so breathing rate data plays a critical role in subsequent sleep monitoring.
[0019] The collection of body motion data is completed through acceleration sensors. These sensors can detect the user's body motion information such as turning over and micro-movements during sleep in real time. Body motion data can not only reflect the user's comfort, but also be combined with other physiological signals to identify different sleep stages. Through these sensors, the system can continuously record the intensity, frequency and time points of the user's body motion, thereby providing a reference for the formulation of temperature control strategies.
[0020] The data collection process of the above sensors is real-time and continuous, and can provide detailed raw data for subsequent analysis. Each data type will have a significant change trend during the user's sleep, and the system can perceive these subtle changes through high-precision sensors. These data are transmitted to the central control system through wireless communication modules or built-in lines. The system pre-processes the collected data and inputs it into the subsequent temperature control model and algorithm. Ultimately, these data will be combined with the preset comfort temperature model to generate a personalized temperature control strategy that adapts to the user's individual physiological characteristics and sleep needs.
[0021] Step S102: Based on the collected body temperature data and ambient temperature data, the user's current comfortable temperature range is calculated using a preset comfortable temperature model.
[0022] Furthermore, the calculation of the user's current comfortable temperature range based on the collected body temperature data and ambient temperature data using a preset comfortable temperature model includes: The collected user temperature data and ambient temperature data are input into a preset comfortable temperature model, which is calculated based on the changing rules of human physiological parameters and ambient temperature; The comfortable temperature model dynamically adjusts the upper and lower limits of the comfortable temperature range based on the user's individual characteristics including body shape, age, and gender; The Bayesian update method is used to dynamically modify the model parameters of the comfort temperature model according to the real-time collected user data, so as to ensure that the comfort temperature range can adapt to the user's current physiological state and environmental conditions.
[0023] The core of the comfortable temperature model is to calculate a dynamic temperature range based on the user's individual physiological parameters and the real-time collected body temperature and ambient temperature data. This range can be used to control the water temperature regulation in the mattress water circulation system. This model not only needs to respond to the user's current state in real time, but also needs to dynamically adjust to adapt to the changing environment and individual characteristics of the user.
[0024] First, the system obtains the user's body temperature data from the temperature sensor in the mattress. Assuming that these sensors are placed in different parts of the mattress, they can record the temperature changes in the area where the user's body is in contact in real time. At the same time, the ambient temperature sensor will also obtain the external ambient temperature. These sensors can be installed in the room or around the mattress to ensure that accurate ambient temperature fluctuations are obtained. All sensors transmit data to the central controller through wireless modules, which synchronizes and organizes this data and uses it as input for the comfort temperature model.
[0025] The comfortable temperature model uses multivariate regression analysis or other data fitting methods to comprehensively analyze these body temperature and ambient temperature data with the user's individual physiological parameters. Physiological parameters include but are not limited to the user's body shape (weight, height), age, gender, etc. These parameters can be obtained through user input or the system based on historical data records. For example, a larger body size means that the user loses heat faster, and the model will adjust the upper and lower limits of the temperature range accordingly; the body temperature regulation efficiency of the elderly is usually lower, so the model will provide a narrower temperature range for such users to avoid discomfort caused by excessive body temperature fluctuations.
[0026] In terms of specific implementation, the comfortable temperature model can use machine learning algorithms, such as support vector machine regression (SVR) or multi-layer perceptron (MLP), etc. These models can learn the nonlinear relationship between different physical signs and comfortable temperature from the individual characteristics of the user and the ambient temperature. For example, the SVR model can use the user's historical body temperature data, ambient temperature, and sleep state (light sleep, deep sleep, etc.) as training data, and output a user's optimal comfortable temperature range through multi-dimensional feature mapping. The temperature range output by the model can be a certain range, such as 28 to 30 degrees Celsius, indicating that adjusting the water temperature within this range will make the user feel comfortable.
[0027] In order to ensure the dynamic response capability of the model, the system further uses the Bayesian update method to adjust the internal parameters of the comfort temperature model. The main function of the Bayesian update is to correct the prediction results of the model based on the real-time collected data to ensure that the model can continuously learn and optimize. For example, the system will regularly evaluate the changes in the user's body temperature, and in combination with the real-time ambient temperature, correct the model parameters to adapt to the current changes. Assuming that at a certain moment, the user's body temperature suddenly rises and exceeds the comfortable temperature range, the Bayesian update mechanism will quickly adjust the model by increasing the weight of the body temperature data so that the new comfortable temperature range is more in line with the user's real-time status.
[0028] The implementation process of the entire model also needs to take real-time into consideration, so it can be accelerated through edge computing devices. Edge computing can place part of the calculation on the sensor side for processing, rather than relying entirely on the central server, thereby shortening the delay in data transmission and processing, ensuring that the comfort temperature model can respond to user body temperature and environmental changes in real time and make temperature control decisions quickly.
[0029] In summary, the comfortable temperature model dynamically calculates the user's comfortable temperature range by combining the user's body temperature, ambient temperature and individual physiological parameters. The model can be implemented through machine learning algorithms such as support vector machine regression and multi-layer perceptron, and its adaptive ability in dynamic environments is ensured by the Bayesian update method.
[0030] In addition, in order to build a simple comfortable temperature model, a linear relationship can be used to estimate the user's comfortable temperature range. Based on the user's body temperature and ambient temperature, the model sets an appropriate mattress surface temperature range according to simple rules to ensure that the user feels comfortable during sleep.
[0031] Specifically, the system first collects the user's current body temperature data and ambient temperature data through multiple sensors in the mattress. Assuming the user's body temperature data is 36.5 degrees Celsius and the ambient temperature is 20 degrees Celsius, the model can be calculated according to the following simple rules: The model assumes that the user's comfort temperature should be slightly higher than the ambient temperature and adapt to the user's body temperature changes. For example, the model stipulates that the surface temperature of the mattress should be 2 to 3 degrees Celsius lower than the user's body temperature, but 5 to 7 degrees Celsius higher than the ambient temperature.
[0032] Based on this simple rule, if the user's current body temperature is 36.5 degrees Celsius, the model might calculate that the ideal range for the mattress surface temperature is 28 to 30 degrees Celsius. This range ensures that the temperature is neither too low (too different from the ambient temperature) nor too high (avoiding the user's body temperature rising and causing discomfort).
[0033] Therefore, the entire calculation process can be achieved through the following steps: subtract a fixed value (such as 2 degrees Celsius) from the user's current body temperature, while ensuring that the mattress surface temperature is higher than the ambient temperature by a certain value (such as 5 degrees Celsius). Then, the generated temperature range is the comfortable temperature range provided by the system. In this simple model, the user's individual characteristics (such as body shape, age, etc.) are not introduced in order to simplify the calculation and make the model easier to implement.
[0034] In this way, the model can be implemented based on sensor data and the user's current comfortable temperature range can be generated, thereby providing a basic temperature setting basis for the temperature control system. This simple comfortable temperature model is suitable for basic water temperature control systems and can effectively improve the user's sleeping experience.
[0035] Step S103: Generate an initial water temperature adjustment control strategy based on the calculated comfortable temperature range and the user's historical sleep data, wherein the initial water temperature adjustment control strategy is used to control the temperature control unit in the water circulation system inside the mattress to adjust the water temperature so that the mattress surface temperature remains within the user's current comfortable temperature range.
[0036] Furthermore, the initial water temperature adjustment control strategy is generated according to the calculated comfortable temperature range and the user's historical sleep data, including: Extract sleep status, body temperature change patterns and ambient temperature fluctuation information from the user's historical sleep data to form a personalized sleep feature vector; According to the currently calculated comfort temperature range and the user's historical sleep feature vector, an initial water temperature regulation control strategy is generated through a support vector regression algorithm. The initial control strategy includes a target water temperature setting and a temperature regulation rate. The target water temperature ensures that the mattress surface temperature is within the user's comfort range, and the temperature regulation rate is dynamically adjusted according to the user's sleep state.
[0037] In step S103, the system generates an initial water temperature regulation control strategy by combining the calculated comfortable temperature range and the user's historical sleep data. This process involves multiple steps to ensure that the mattress water circulation system can provide the best temperature control effect for the user. First, the system extracts key information from the user's historical sleep data, including the user's sleep state, body temperature change pattern, and ambient temperature fluctuation trend. By analyzing these historical data, the system can generate a personalized sleep feature vector. This feature vector includes the user's body temperature fluctuations in different sleep stages (such as light sleep, deep sleep, rapid eye movement, etc.), the appropriate temperature range, and the impact of ambient temperature on the user's body temperature.
[0038] Next, the system combines the real-time calculated comfort temperature range with the personalized sleep feature vector to generate the initial water temperature control strategy. To ensure the accuracy and personalization of the strategy, the system uses a support vector regression algorithm (SVR), which can accurately predict the most suitable water temperature setting and temperature adjustment rate for the user based on historical data and real-time input. The advantage of this algorithm is that it can handle complex nonlinear relationships, such as the dynamic relationship between the user's body temperature changes and the external ambient temperature.
[0039] Specifically, the initial water temperature regulation control strategy includes two core parts: target water temperature setting and temperature regulation rate. The target water temperature refers to the temperature range that needs to be maintained on the surface of the mattress to ensure the user's comfort. This target water temperature is not a single temperature value, but a dynamic range generated based on the comfort temperature model. For example, the system may set the surface temperature of the mattress to fluctuate between 28 and 30 degrees Celsius to ensure that the mattress can cope with changes in the user's body temperature and fluctuations in ambient temperature, so that the user feels comfortable throughout the sleep process.
[0040] The temperature adjustment rate is another key factor. The system dynamically adjusts the water temperature adjustment rate by analyzing the user's sleep state. In the light sleep stage, the system may choose a slower adjustment rate to avoid frequent temperature changes disturbing the user's sleep. In the deep sleep stage, the user's body temperature may change significantly. At this time, the system can speed up the temperature adjustment rate to ensure that the mattress surface temperature can quickly respond to changes in body temperature and avoid user discomfort.
[0041] The generation of this initial control strategy not only relies on the current comfort temperature range and historical data, but is also continuously optimized and adjusted through the support vector regression algorithm to ensure that the system can provide users with a personalized and dynamic temperature control experience.
[0042] In addition, the following steps can be used to generate the initial water temperature regulation control strategy: First, the system collects the user's current body temperature data and ambient temperature data, and calculates the user's comfortable temperature range through a preset comfortable temperature model. This process may simply determine a suitable temperature range based on the difference between body temperature and ambient temperature, such as 28 to 30 degrees Celsius.
[0043] Next, the system extracts the most basic trend information from the user's historical sleep data, such as the user's average body temperature changes in different sleep stages. If historical data shows that the user's body temperature usually drops slightly during deep sleep, the system can choose to slightly lower the mattress temperature by 1 to 2 degrees Celsius during deep sleep when generating the initial water temperature adjustment strategy, while keeping the temperature near the upper limit of the comfort zone during light sleep.
[0044] To further simplify the implementation, the initial water temperature adjustment control strategy can be generated according to the following basic rules: First, the system sets the target water temperature at the midpoint of the current comfortable temperature range. For example, if the comfortable temperature range is 28 to 30 degrees Celsius, the system can simply set the mattress surface temperature to 29 degrees Celsius. Then, the temperature adjustment rate can be set to a fixed value to ensure that the mattress temperature changes slowly and steadily, avoiding too fast adjustment that affects the user's sleep.
[0045] This simplified method can generate a preliminary temperature control strategy directly from the input data of body temperature and ambient temperature and the average trend in historical sleep data. This method only relies on basic comfort zone calculations and historical data trends, making the temperature control strategy generation process simple and easy to implement, and can meet basic user comfort needs.
[0046] Step S104: During the water temperature adjustment process, the user's body temperature changes, ambient temperature changes, sleep state and mattress surface temperature are monitored and recorded to obtain the user's sleep data; wherein the sleep state is obtained through a sleep monitoring algorithm based on the user's heart rate, breathing rate, body movement and body temperature.
[0047] In step S104, during the water temperature adjustment process, the system needs to monitor and record the user's body temperature changes, ambient temperature changes, sleep status, and mattress surface temperature in real time, in order to obtain comprehensive user sleep data to provide data support for subsequent temperature control strategy optimization.
[0048] First, the system collects the user's body temperature changes in real time through multiple sensors installed in the mattress. These sensors are usually distributed on the surface of the mattress and keep in contact with different contact areas of the user to obtain accurate body temperature data. The collection of body temperature data needs to be performed at a fixed frequency, such as recording every few minutes, to ensure that the system can reflect the dynamic changes in the user's body temperature. In addition, the ambient temperature sensor monitors the temperature changes of the user's sleeping environment. It is usually installed around the mattress or in different locations in the room to ensure that the temperature changes of the external environment can be reflected in the system in a timely manner. Ambient temperature has an important impact on water temperature regulation, so its data collection also needs to be continuous.
[0049] At the same time, the system also monitors the user's sleep state through intelligent algorithms. This can be judged by association with physiological indicators such as body temperature and heart rate changes. When the user is in light sleep, deep sleep or rapid eye movement (REM) stage, the pattern of body temperature change is usually different, and the system can use these changes to determine the user's sleep stage. Sleep state data is very important for further optimizing the water temperature regulation strategy, because different sleep stages have different sensitivities to temperature.
[0050] In addition, the system will simultaneously monitor the temperature of the mattress surface to ensure that the actual adjusted water temperature is consistent with the target temperature preset by the system. If the mattress surface temperature deviates from the comfortable temperature range, the system can make timely adjustments. Through real-time monitoring of these sensor data, the system can generate comprehensive user sleep data, including real-time feedback of the user's body temperature fluctuations, ambient temperature changes, and mattress surface temperature.
[0051] All collected data will be recorded and stored in the system's database for subsequent analysis and use. The recorded data is not only used for real-time adjustment, but also provides data support for subsequent neural network model training, thereby generating a more personalized temperature control strategy. In this way, this step can be implemented through common sensors and data processing technologies, and ensure that the water temperature regulation system is effectively adjusted according to the user's real-time physiological condition and environmental changes.
[0052] Furthermore, the sleep monitoring algorithm comprises the following steps: Multiple sensors in the mattress collect the user's heart rate data, breathing rate data, body movement data and body temperature data in real time; The heart rate data is processed using the wavelet transform method to obtain the heart rate frequency domain characteristics; Perform frequency domain analysis on the respiratory frequency data through fast Fourier transform, extract the main frequency component of the user's respiratory frequency, and obtain the main frequency characteristics of the respiratory frequency; According to the frequency domain characteristics of the heart rate and the main frequency characteristics of the respiratory frequency, combined with the body movement data, a multi-level amplitude analysis of the acceleration signal is performed to identify the amplitude and frequency information of the user's body movement; according to the identified body movement amplitude and frequency information of the user, a second-order difference method is used for analysis to obtain the frequency and amplitude change trend of the user's body movement in different sleep stages; According to the body movement frequency and amplitude change trends, heart rate frequency domain characteristics and respiratory frequency main frequency characteristics, a time sliding window technique is applied to obtain a change rate characteristic related to the user's sleep stage; Based on the user's body temperature data and the ambient temperature data, and in combination with the change rate characteristics, an inflection point detection algorithm is applied to detect the turning point of the temperature difference curve, and the stability information of the user's body temperature change is output; According to the heart rate frequency domain characteristics, the main frequency characteristics of the respiratory frequency, the body movement frequency and amplitude change trends, the stability information of the body temperature change, and combined with the user's historical sleep data, the user's sleep state is classified within a preset threshold range to obtain the user's sleep stage classification result.
[0053] In this embodiment, the entire sleep monitoring algorithm process can start with data collection from multiple sensors. Multiple sensors in the mattress collect various physiological data of the user in real time, including heart rate, breathing rate, body movement and body temperature. These sensors are combined with the mattress through embedded hardware devices to continuously monitor the physiological signals of the user during sleep. The collected data is transmitted to the central processing unit of the system via wireless or wired transmission as an input signal for subsequent analysis.
[0054] First, the collected heart rate data is input into the wavelet transform module for processing. Wavelet transform is a mathematical tool commonly used to analyze non-stationary signals, and is particularly suitable for processing data with multi-level time-frequency information such as heart rate. Through wavelet transform, frequency domain features can be extracted from the heart rate signal. Specifically, these features can include the manifestation of heart rate variability in different frequency bands. The purpose of this step is to convert the original heart rate data into frequency domain features that can be used to judge the physiological state. These frequency domain features can reflect the user's physiological state and sleep quality.
[0055] Next, the breathing rate data will be processed through fast Fourier transform (FFT). FFT is a common signal processing method used to convert time domain signals into frequency domain signals to help extract the main frequency components of the breathing frequency. Through this transformation, the system can accurately extract the main frequency characteristics in the user's breathing signal, so as to further understand the user's breathing pattern. These main frequency characteristics will serve as key data for analyzing the user's breathing status, and combined with the heart rate frequency domain characteristics, it is used to determine the user's overall physiological state.
[0056] After the frequency domain features of the heart rate and the main frequency features of the respiratory rate are extracted, the body motion data will be added to the analysis. For the body motion data, the multi-level amplitude analysis method of the acceleration signal is first used. This method can identify the intensity, frequency and other information of the user's body motion in a hierarchical manner, especially it can distinguish between larger turning movements and smaller micro-movements. The output of this analysis is the user's body motion frequency and amplitude information in different time periods, which will reflect the user's activities in different sleep stages. Then, the body motion data is further analyzed using the second-order difference method. The second-order difference can capture the trend of body motion changes, thereby helping the system identify the changes in the user's body motion pattern over time during sleep, and obtain the changing trend of body motion frequency and amplitude.
[0057] After obtaining the trend of body movement frequency and amplitude changes, heart rate frequency domain features, and respiratory frequency dominant frequency features, these features are input into the time sliding window technology for further analysis. The time sliding window technology can dynamically analyze these feature data through a set time window and output the rate of change features related to the user's different sleep stages. These rate of change features are used to capture the dynamic changes in the user's sleep stages, ensuring that the system can track the user's physiological state in real time and accurately identify the transition of sleep stages at different time points.
[0058] The system also processes the user's body temperature data and ambient temperature data. By calculating the temperature difference between body temperature and ambient temperature, the system can identify changes in the user's body temperature during sleep. By applying the inflection point detection algorithm to analyze the temperature difference curve, the turning points of the temperature difference curve can be detected. These turning points mark the stability of the user's body temperature changes. For example, when the user switches from deep sleep to light sleep, the change in body temperature often has specific inflection points. The system can capture these changes and output stability information of the body temperature change.
[0059] Finally, the system will also use the user's historical sleep data to conduct a comprehensive analysis based on all the extracted feature data, including heart rate frequency domain features, respiratory frequency main frequency features, body movement frequency and amplitude change trends, and stability information of body temperature changes. Through the set threshold range, these feature data will be used to classify the user's sleep state and output the final sleep stage classification results, distinguishing between light sleep, deep sleep, and wakefulness. This classification result is based on multi-dimensional physiological signal analysis to ensure accuracy and provide feedback for the subsequent intelligent temperature control system, so that the water temperature can be adjusted according to the user's actual sleep state.
[0060] Step S105: Generate a personalized temperature control strategy based on the obtained sleep data through a pre-trained neural network model.
[0061] Furthermore, the pre-trained neural network model includes a data pre-processing module, a multimodal fusion encoder, and a temperature control strategy generator; The input of the data preprocessing module is the user's sleep data, including the user's body temperature change data, ambient temperature change data, sleep state data and mattress surface temperature data; the data preprocessing module uses sliding window technology and adaptive normalization algorithm to convert data of different time scales into unified time series features to obtain standardized and time-series aligned feature vectors; The input of the multimodal fusion encoder is the feature vector provided by the data preprocessing module; the multimodal fusion encoder adopts a bidirectional long short-term memory network structure enhanced by an attention mechanism to process the physiological data and environmental data of the input data respectively, and then fuses the information of different modalities through a self-attention layer to obtain a fused potential feature representation; The input of the temperature control strategy generator is the fused latent feature representation; the temperature control strategy generator is implemented by a reinforcement learning model based on the Actor-Critic architecture, and is used to obtain a personalized temperature control strategy, including the target temperature and adjustment rate of the mattress surface, according to the fused latent feature representation; wherein the Actor network in the Actor-Critic architecture is implemented by a multi-layer perceptron structure, and is used to generate continuous temperature control actions; the Critic network uses a time difference learning method to estimate the value of each state-action pair; and the reward function design is implemented in combination with the user comfort score and the energy efficiency index.
[0062] In step S105, the system generates a personalized temperature control strategy based on the collected user sleep data through a pre-trained neural network model. The core of the neural network model is to make full use of the user's real-time data and historical data, combined with AI technology to provide users with a dynamically adjusted temperature control strategy.
[0063] First, the sleep data obtained by the system, including changes in user body temperature, ambient temperature fluctuations, sleep status, and mattress surface temperature, are used as input to the neural network model. In order to ensure the validity of the data, the system will use the data preprocessing module to process the data. Specifically, the system will use the sliding window technology to divide the data into small blocks at fixed time intervals, and apply an adaptive normalization algorithm so that data of different time scales can be processed in the same feature space. This step can effectively remove the noise of the data and ensure the timing alignment between the input time series data, thereby generating a standardized feature vector.
[0064] Next, the preprocessed data enters the multimodal fusion encoder. The encoder uses a bidirectional long short-term memory (Bi-LSTM) network structure to analyze the processed physiological data (such as body temperature) and environmental data (such as ambient temperature) separately. In order to enhance the accuracy of the network, the encoder uses an attention mechanism so that the model can focus on those parts of the data that are most critical to the generation of temperature control strategies. For example, during periods of time when the user's body temperature fluctuates drastically, the model can increase the weight of body temperature data, while when the ambient temperature changes greatly, the model can give priority to the impact of environmental data. Through the fusion of the self-attention layer, data from different modalities are processed comprehensively to generate a fused potential feature representation.
[0065] Based on these fused features, the system passes this information to the temperature control strategy generator. The temperature control strategy generator uses a reinforcement learning model based on the Actor-Critic architecture, which enables the system to generate more accurate, dynamic and personalized temperature control strategies. The Actor network is responsible for generating continuous temperature control actions, which are specific operations set for the mattress water circulation system, such as adjusting the amplitude and speed of the water temperature. The Critic network uses a time difference learning method to evaluate the impact of each temperature control action on the user experience, especially the user's comfort and energy efficiency. The Critic network will continuously optimize the temperature control strategy based on the user's comfort score and energy consumption data to ensure that the temperature control process can both meet the user's comfort needs and minimize unnecessary energy consumption.
[0066] The personalized temperature control strategy generated by the system in this way includes not only the target temperature of the mattress surface, but also the rate of temperature adjustment to ensure that the temperature control adjustment in different sleep stages is both fast and smooth. Through the reinforcement learning process of the Actor-Critic architecture, the system can continuously optimize the strategy in long-term use, so that the temperature control system can always maintain the best state and meet the personalized needs of users.
[0067] Furthermore, the adaptive normalization algorithm is dynamically adjusted based on the user's personalized data distribution, including the following steps: Collect data distribution of user body temperature and ambient temperature changes during multiple sleep cycles; By statistically analyzing the personalized data range of each user, the personalized data distribution parameters are calculated, including the minimum value, maximum value, standard deviation of body temperature and the range of change of ambient temperature; Dynamically adjust the upper and lower limits of normalization so that the normalization process adapts to the actual data range of individual users; During the normalization process, the fluctuation of user data is monitored in real time, and the normalization strategy is adaptively adjusted according to the distribution changes of user data to ensure that data at different time scales always maintain consistency and alignment.
[0068] The core of the adaptive normalization algorithm design is to dynamically adjust the data normalization process according to the user's personalized data distribution to ensure that the mattress water temperature control system can better reflect the specific physiological needs and environmental changes of each user. The algorithm is processed through several important steps to ensure the accuracy and consistency of data processing.
[0069] First, the system needs to continuously collect the user's body temperature data and ambient temperature data during multiple sleep cycles. Since each user's body temperature changes and sensitivity to ambient temperature vary, the system must monitor this data for a long time to capture enough sample data for reliable analysis. The sensor is responsible for continuously collecting this data and transmitting the data to the central controller through a wireless transmission module. The body temperature data includes the user's body temperature fluctuations in different sleep stages (such as light sleep, deep sleep, and rapid eye movement), while the ambient temperature data reflects the changes in the user's sleeping environment. The distribution of these data will serve as the basis for subsequent statistical analysis.
[0070] Next, the system processes the body temperature and ambient temperature data of each user through statistical analysis methods to generate personalized data distribution parameters. The purpose of this step is to determine the user's individualized data range, including the minimum, maximum, and standard deviation of body temperature and the fluctuation range of ambient temperature. Specifically, the system calculates the upper and lower limits of body temperature based on historical data to determine the user's body temperature range. For example, a user's body temperature may range from 36.2 degrees Celsius to 37.1 degrees Celsius, while the ambient temperature may range from 18 degrees Celsius to 24 degrees Celsius. By calculating the standard deviation of body temperature and ambient temperature, the system can evaluate the degree of discreteness of the data, which provides a basis for subsequent data normalization.
[0071] Once the system obtains the user's personalized data distribution parameters, the normalization process can be dynamically adjusted based on these parameters. Normally, normalization is to ensure that data from different sources are processed on the same scale, but due to the different data distribution of each user, a fixed normalization method may lead to deviations. Therefore, the system dynamically adjusts the upper and lower limits of normalization based on the user's actual data range. For example, if the user's body temperature ranges from 36.2 to 37.1 degrees Celsius, the upper and lower limits of normalization will be set according to this range, so that the body temperature data can effectively reflect the user's body temperature fluctuations after normalization. For ambient temperature data, the system also dynamically sets the upper and lower limits of normalization based on the actual temperature fluctuation range.
[0072] During the actual operation of normalization, the system also monitors the fluctuations of the user's body temperature and the ambient temperature in real time. Since the user's physiological state and external environment may change over time, the system must have the ability to adaptively adjust to these changes. When the system detects a change in the data distribution, such as the upper and lower limits of the user's body temperature deviating from the previous range, the system will automatically adjust the normalization strategy to ensure that the normalized data remains consistent and aligned. For example, if a user's body temperature ranges from 36.0 degrees Celsius to 37.3 degrees Celsius during multiple sleep cycles, the system will automatically update the normalization upper and lower limits to adapt to this change, ensuring that the processed data can accurately reflect the user's current physiological state.
[0073] Through this dynamic adjustment and monitoring, the normalization algorithm can ensure the accuracy and real-time nature of data processing and avoid data distortion caused by individual differences.
[0074] Furthermore, the multimodal fusion encoder ensures the balance between different modalities through a specific weight update mechanism, including the following steps: Use a multi-head attention mechanism to assign weights to data of different modalities, and set a balance weight between physiological data and environmental data during initialization; In each training process, the weights between different modalities are dynamically adjusted according to the degree of influence of input data on model output through the adaptive weight update mechanism; In the attention mechanism, a cross-modal self-attention module is used to enhance the information interaction between the modalities, ensure that the fusion of physiological data and environmental data can take into account the importance of both, and avoid policy deviations caused by data modality imbalance.
[0075] The design of the multimodal fusion encoder aims to achieve a balance when fusing physiological data and environmental data through a specific weight update mechanism, so that the final temperature control strategy can fully consider the user's body temperature changes and respond to ambient temperature fluctuations. The whole process uses a multi-head attention mechanism, dynamic weight adjustment, and cross-modal self-attention modules to ensure effective fusion between different data modalities and a balance in information transfer.
[0076] First, the multimodal fusion encoder uses a multi-head attention mechanism when processing data of different modalities. In this context, physiological data (such as the user's body temperature and heart rate) and environmental data (such as indoor temperature and humidity) are processed as two independent modalities in the model. In the initialization phase, the system assigns initial weights to each modality to ensure that physiological data and environmental data can influence the generation of temperature control strategies in a balanced manner in the early stages of model training. This initial weight assignment is usually set based on experience or experimental data. For example, in some user groups, body temperature data may have a greater impact on the temperature control strategy, so the weight of physiological data can be set higher during initialization, while the weight of environmental data can be set relatively lower.
[0077] As the model is continuously trained, the system will dynamically adjust the weights between different modalities through an adaptive weight update mechanism. During each training process, the system will analyze the degree of influence of the input data on the model output. Specifically, the model will monitor the contribution of each modality's data to the temperature control strategy. If a certain modality (such as physiological data) has a greater impact on the temperature control strategy at a certain moment, the weight of the modality will be increased accordingly during the training process. Conversely, if a certain modality's data contributes less to the model's output, the system will reduce the weight of the modality accordingly. This adaptive weight update mechanism ensures that the model can adjust its strategy according to changes in actual data and continuously optimize the balance of data in different modalities.
[0078] In order to enhance the information interaction between physiological data and environmental data, the encoder further adopts a cross-modal self-attention module. The advantage of the self-attention mechanism is that it enables the model to automatically identify and strengthen the potential impact of other modal data on a certain modality when processing a certain modality. In the cross-modal self-attention module, physiological data and environmental data are no longer independent of each other, but interact with each other through the self-attention mechanism. This means that when the system processes body temperature data, it can simultaneously consider the impact of ambient temperature on body temperature, and vice versa. This interaction of information helps to avoid the problem of data modality imbalance and ensures that the generated temperature control strategy can respond to changes in environmental conditions while taking into account the user's physiological state.
[0079] The design of the entire multimodal fusion encoder ultimately ensures that the weight distribution and fusion of information are dynamically adjusted and interactive during the processing of different modal data. This mechanism can effectively avoid the problem of policy deviation caused by data modality imbalance. For example, if the system relies too much on ambient temperature data and ignores the fluctuation of the user's body temperature, the temperature control strategy may fail. By using an adaptive weight update mechanism and a cross-modal self-attention module, the system can maintain sensitivity to physiological data and environmental data, ensuring that the generation of temperature control strategies can fully reflect the user's personalized needs and the influence of the external environment.
[0080] Furthermore, the Actor network in the temperature control strategy generator designs a special continuous action optimization strategy for the temperature regulation process, including the following steps: When the Actor network generates continuous temperature control actions, it sets a gradual temperature adjustment mechanism based on the user's current body temperature, ambient temperature, and sleep state to avoid too fast or too slow temperature changes; Different adjustment rates are set for different sleep stages, ensuring that the temperature changes slowly during light sleep and quickly adjusts according to the user's body temperature during deep sleep; The critic network evaluates the impact of each continuous action on user comfort in real time through a temporal difference learning algorithm, and combines the user's comfort score and energy consumption feedback to generate a reinforcement learning reward function to optimize energy efficiency while ensuring user comfort.
[0081] The Actor network of the temperature control strategy generator has designed a special continuous action optimization strategy for the water temperature adjustment process. The core goal of this strategy is to ensure the smoothness and adaptability of temperature changes in the process of dynamically adjusting the water temperature according to the user's body temperature, ambient temperature and sleep state, thereby improving user comfort and optimizing energy efficiency.
[0082] First, the Actor network takes into account the user's real-time physiological data and environmental factors when generating continuous temperature control actions. This data includes the user's current body temperature, the external environment temperature, and the specific stage of sleep the user is in (such as light sleep, deep sleep, or rapid eye movement). Based on these input data, the system sets a gradual adjustment mechanism for temperature regulation. This means that the temperature control system will not make sudden and drastic temperature adjustments, but will change the water temperature of the mattress in a smooth and continuous manner. This mechanism is designed to avoid the temperature changing too quickly, causing discomfort to the user, or changing too slowly, resulting in an inability to effectively respond to the user's body temperature fluctuations. In this case, the temperature control system can gradually adjust the water temperature within a small temperature range, so that the user feels comfortable during sleep without being disturbed by temperature changes.
[0083] To further optimize the temperature control action, the system sets different temperature adjustment rates according to different sleep stages. The light sleep stage is a period when the user is more susceptible to external stimuli. The system will adopt a gentler adjustment rate to avoid frequent or drastic temperature changes from interfering with the user's sleep. In this stage, the temperature control system's adjustment action will be very gentle, ensuring that the water temperature fluctuates slightly within a stable range. However, when the user enters the deep sleep stage, the user's body temperature usually fluctuates greatly. At this time, the system can speed up the water temperature adjustment rate. The deep sleep stage is less sensitive to temperature changes, so the system can quickly adjust the surface temperature of the mattress when it detects a change in the user's body temperature to ensure that the user is always in a comfortable temperature range.
[0084] At the same time, the Critic network uses a time-difference learning algorithm to evaluate the effect of each temperature control action in real time. Specifically, the Critic network will evaluate the impact of the current temperature control action on the user's comfort. The user's comfort is measured by a series of feedback data, including whether the user's body temperature is stable within the comfort range, whether the sleep state is disturbed by temperature changes, etc. In addition, the Critic network will also evaluate based on energy consumption data to ensure that the system minimizes energy use while providing the best user experience. For example, if the system finds that the temperature control action has improved the user's comfort, but the energy consumption is too large, the Critic network will provide negative feedback to this action.
[0085] In order to optimize user comfort while taking energy efficiency into account, the system evaluates each continuous temperature control action through a reinforcement learning reward function. The reward function combines the user comfort score and energy consumption feedback, and the system will make a trade-off through this function. On the one hand, if an action significantly improves the user's comfort, the system will give the action a positive reward; on the other hand, if the action causes unnecessary energy consumption, the system will reduce the score of the action. Through this reinforcement learning mechanism, the system can gradually optimize the temperature control strategy to ensure that during long-term use, the temperature control system can be adaptively adjusted according to the individual needs of the user and environmental conditions, and maximize energy efficiency while maintaining user comfort.
[0086] Furthermore, the reward function of the reinforcement learning This is achieved using the following formula 1: in, , and is the weight coefficient; It is the user comfort sub-function; is the energy efficiency sub-function; is the user habit learning sub-function; among them, the user comfort sub-function This is achieved using the following formula 2: in, The current user's body temperature; is the surface temperature of the mattress; The preset comfort temperature range Starting point; The preset comfort temperature range The end point; is the adjustment coefficient; Energy efficiency subfunction This is achieved using the following formula 3: in, is the energy consumption penalty coefficient; is the frequency of temperature regulation; is the surface temperature of the mattress; It is the last temperature setting value; User Habit Learning Subfunction This is achieved using the following formula 4: in, It is the first prediction made by the system based on the user's historical habits. Second mattress surface temperature; It is the actual monitored user's body temperature; is the width of the comfortable temperature range; is the number of samples at a time point.
[0087] First, the reward function The formula (1) is: in, , and is the weight coefficient. The specific value of each coefficient can be determined through experiments or model optimization process to achieve the purpose of balancing user experience and energy efficiency.
[0088] In this reward function, and The product of amplifies the synergistic effect of user comfort and user habit learning. When the system has high accuracy in learning user habits ( When the size of the space is larger and the comfort level is higher, the overall reward will be greatly increased. As the denominator, energy consumption is suppressed. , an additional penalty mechanism is introduced: when the match between comfort and user habit learning is low (i.e. and The difference between them is large), which will further increase the penalty for energy consumption.
[0089] User comfort subfunction Reflects the surface temperature of the mattress The user's current body temperature The function is implemented by formula (2): In this formula: Indicates the current user's body temperature, which is data collected in real time by sensors; Indicates the mattress surface temperature, which is the temperature the system is regulating; and Respectively represent the lower limit and upper limit of the preset comfort temperature range; is the adjustment factor, which defines the weight of the comfort score and affects the rate of change of the comfort score when the mattress temperature deviates from the user's body temperature.
[0090] When the user's temperature Falling into the comfort zone The user's comfort rating is a positive value, and the closer the mattress temperature is to the user's body temperature, the higher the comfort score. On the contrary, when the user's body temperature exceeds the comfort zone, the comfort score becomes a negative value, and the further the body temperature deviates, the greater the penalty.
[0091] Energy efficiency subfunction The energy consumption of the temperature control system is measured. Formula (3) explains the impact of the system's temperature adjustment frequency and temperature control strategy on energy consumption: In this formula: is the energy consumption penalty coefficient, which is used to adjust the negative impact of energy consumption on the total reward; It is the frequency of temperature adjustment, which indicates how frequently the temperature control system adjusts the temperature. The higher the frequency, the greater the energy consumption. Indicates the current mattress surface temperature; Indicates the last set mattress temperature.
[0092] Frequency of temperature regulation and temperature difference Determines the amount of energy consumption. When the temperature changes too quickly or frequently, the energy consumption will increase significantly, and the system will be subject to a large negative penalty, reducing the reward value. .
[0093] User Habit Learning Subfunction By comparing the degree of consistency between the mattress surface temperature predicted by the system and the actual user's body temperature, we can evaluate whether the system is effectively learning the user's temperature requirements. This subfunction is implemented by formula (4): In this formula: The system predicts the first Second mattress surface temperature; The actual monitored body temperature of the user; is the width of the comfortable temperature range, that is - ; Represents the number of samples at a time point, usually sample points in multiple sleep cycles.
[0094] This function passes The error at each time point is averaged to evaluate the system's learning of user habits. The smaller the error, that is, the closer the temperature predicted by the system is to the actual user's body temperature, the higher the user habit learning score. The higher the score, the lower the score. This score helps the system to continuously optimize its ability to adapt to user needs over a long period of use.
[0095] The three terms in formula (1) represent user comfort, energy efficiency, and the system's learning of user habits. By adjusting the parameters in each sub-function, the system can minimize energy consumption while maintaining user comfort and continuously improve the prediction of user temperature control needs.
[0096] The following is a neural network model reference implementation code for an AI-based smart mattress water temperature control system.
[0097] import torch import torch.nn as nn import torch.optim as optim import numpy as np # Data preprocessing module class DataPreprocessing: def __init__(self, window_size, min_val, max_val): """ Initialize the data preprocessing module :param window_size: sliding window size, used for time series data processing :param min_val: minimum value of adaptive normalization :param max_val: Maximum value of adaptive normalization """ self.window_size = window_size self.min_val = min_val self.max_val = max_val def sliding_window(self, data): """ Use sliding window technique to convert data into time series :param data: Input data, such as body temperature or ambient temperature :return: time series features """ sequences = [] for i in range(len(data) - self.window_size + 1): sequences.append(data[i:i + self.window_size]) return np.array(sequences) def adaptive_normalization(self, data): """ Use the adaptive normalization algorithm to normalize the data to the interval [0, 1]. :param data: Input body temperature or ambient temperature data :return: Normalized data """ return (data - self.min_val) / (self.max_val - self.min_val) # Multimodal fusion encoder (using bidirectional LSTM and multi-head attention mechanism) class MultiModalFusionEncoder(nn.Module): def __init__(self, input_dim, hidden_dim, num_heads): """ Initialize the multimodal fusion encoder :param input_dim: the dimension of the input feature :param hidden_dim: LSTM hidden layer size :param num_heads: the number of heads of the multi-head attention mechanism """ super(MultiModalFusionEncoder, self).__init__() self.bi_lstm = nn.LSTM(input_dim, hidden_dim, batch_first=True, bidirectional=True) self.multihead_attention = nn.MultiheadAttention(hidden_dim *2, num_heads) # Bidirectional LSTM output dimension doubled self.attention_layer = nn.Linear(hidden_dim * 2, hidden_dim) def forward(self, physiological_data, environmental_data): """ Forward propagation function :param physiological_data: physiological data input, such as user's body temperature :param environmental_data: Environmental data input, such as ambient temperature :return: The fused latent feature representation """ # LSTM encodes physiological data and environmental data physiological_encoded, _ = self.bi_lstm(physiological_data) environmental_encoded, _ = self.bi_lstm(environmental_data) # Multimodal fusion uses multi-head attention mechanism fused_data, _ = self.multihead_attention(physiological_encoded, environmental_encoded, environmental_encoded) fused_data = torch.relu(self.attention_layer(fused_data)) return fused_data # Temperature control strategy generator (based on Actor-Critic reinforcement learning model) class TemperatureControlPolicy(nn.Module): def __init__(self, input_dim, action_dim): """ Initialize the temperature control strategy generator (Actor-Critic architecture) :param input_dim: The dimension of the input feature (output from the multimodal fusion encoder) :param action_dim: dimension of the output action (temperature adjustment action) """ super(TemperatureControlPolicy, self).__init__() self.actor = nn.Sequential( nn.Linear(input_dim, 128), nn.ReLU(), nn.Linear(128, action_dim) ) self.critic = nn.Sequential( nn.Linear(input_dim, 128), nn.ReLU(), nn.Linear(128, 1) ) def forward(self, fused_features): """ Forward propagation, generating temperature control actions and value estimates :param fused_features: fused latent feature representation :return: Continuous action (temperature regulation) and value estimation """ action = self.actor(fused_features) value = self.critic(fused_features) return action, value # Reward function in reinforcement learning def reward_function(alpha, beta, gamma, U, E, H): """ Calculate the reward function R :param alpha: comfort weight coefficient :param beta: Energy efficiency weight coefficient :param gamma: User habit learning weight coefficient :param U: User comfort sub-function :param E: Energy efficiency subfunction :param H: User habit learning sub-function :return: Total reward value R """ # Calculate |U - H|, which is used to measure the difference between comfort and user habit learning difference = abs(U - H) # Calculate the product part, nonlinear combination of U and H product = (U ** alpha) * (H ** gamma) # Calculate the difference combination part, the influence of E and the suppression effect of difference energy_term = E ** beta / (1 + difference) # Final reward function, based on a combination of products and differences R = product - energy_term return R In order to train this AI-based neural network model for smart mattress water temperature control, the following process can be followed. First, starting with data preparation and preprocessing, the model will require the user's sleep data as input, including body temperature changes, ambient temperature changes, sleep status, and mattress surface temperature. These data are raw data collected by sensors and usually contain data at different time scales. Therefore, the first step is to use the data preprocessing module for processing. The preprocessing module converts the data into a time series form through a sliding window technique, so that the model can analyze continuous time periods, and applies an adaptive normalization algorithm to standardize these different input data to ensure that the data can be processed on a uniform scale.
[0098] After data preprocessing is completed, the standardized feature vector will be passed as input to the multimodal fusion encoder. The multimodal fusion encoder uses a bidirectional long short-term memory network (Bi-LSTM) to process the user's physiological data (such as body temperature) and environmental data (such as ambient temperature) respectively. Through this two-way processing method, the model can understand the time dependency and bidirectional relationship of the input data, thereby capturing the complex change pattern of the user's body temperature and ambient temperature. In order to further enhance the encoding effect, the model also uses an attention mechanism, which enables the model to dynamically focus on key data points and achieve a balanced fusion of information from different modalities. After encoding is completed, the fused latent feature representation will be used for subsequent strategy generation.
[0099] After the multimodal fusion encoding is completed, the temperature control strategy generator starts working. This module uses a reinforcement learning model based on the Actor-Critic architecture to achieve personalized temperature control strategy generation. The Actor network will generate continuous temperature control actions based on the fused features. These actions correspond to the adjustment operations of the mattress surface temperature to ensure that the temperature can be gradually adjusted according to the changes in the user's current body temperature and ambient temperature. At the same time, the Critic network evaluates the value of each action generated by the Actor network through a time difference learning algorithm. This evaluation not only takes into account the user's immediate comfort, but also evaluates the effect of the action over a long period of time, including the impact on energy consumption.
[0100] During the training process, the model is optimized through a reinforcement learning reward function. The reward function combines three important factors: user comfort, energy efficiency, and learning of user habits. User comfort is calculated by comparing the mattress surface temperature with the user's body temperature. The model strives to make the mattress surface temperature as close to the user's body temperature as possible to maximize the user's comfort. Energy efficiency is optimized by reducing frequent temperature changes. The Critic network gives negative feedback to actions that consume too much energy to reduce unnecessary energy consumption. Learning of user habits is evaluated through the model's memory and predictive ability of historical data, ensuring that over time, the system can generate more accurate temperature control strategies based on the individual needs of users.
[0101] To train this model, you can use common optimization algorithms, such as the Adam optimizer, to adjust the model's parameters so that the model gradually learns how to generate the optimal temperature control strategy under different sleep conditions. The entire training process requires a large amount of user sleep data. The system repeatedly optimizes the reward function and adjusts the weights of the Actor network and the Critic network, so that the model can not only adjust the temperature control strategy in real time, but also continuously optimize the user's sleep experience over time.
[0102] Through the above steps, the neural network model can be trained, from data preprocessing, feature fusion to strategy generation, to ensure that the model can provide users with accurate and personalized temperature control experience while maximizing energy efficiency.
[0103] Step S106: applying the personalized temperature control strategy to the temperature control unit of the water circulation system to adjust the water temperature so that the surface temperature of the mattress is adjusted in a personalized manner according to the actual sleeping state and temperature requirements of the user.
[0104] In step S106, the personalized temperature control strategy generated by the pre-trained neural network model is applied to the temperature control unit in the water circulation system to adjust the water temperature on the surface of the mattress. The purpose of this process is to perform dynamic and personalized temperature adjustment based on the user's actual sleeping state and temperature requirements, ensuring that the surface temperature of the mattress is always maintained in a range that is most suitable for the user.
[0105] First, a personalized temperature control strategy has been generated through a neural network model. This strategy not only relies on the user's historical sleep data, but also takes into account the real-time body temperature fluctuations, ambient temperature changes, and sleep stage experienced by the user during the current sleep process. Based on the strategy, the system will give a target water temperature range and determine the rate of temperature adjustment. Next, the system passes this temperature control strategy to the temperature control unit in the water circulation system.
[0106] The temperature control unit is one of the core components of the water circulation system and is responsible for controlling the temperature of the water flow in the mattress. Specifically, the unit includes heating and cooling modules that can increase or decrease the water temperature according to system instructions. According to the personalized strategy generated by the neural network model, the temperature control unit will first determine whether the current water temperature is within the required target range. If the water temperature deviates from the target temperature range, the system will instruct the temperature control unit to start the heating or cooling module to adjust the water temperature so that it gradually approaches the preset target temperature.
[0107] At the same time, the temperature change rate during the adjustment process is also very important. The system will take into account the user's sleep stage. For example, in the light sleep stage, the system may choose a slower temperature adjustment rate to avoid sudden temperature changes disturbing the user's sleep. In the deep sleep stage, the system may allow faster temperature changes to ensure that the temperature of the mattress surface can respond to changes in the user's body temperature in a timely manner.
[0108] Once the water temperature reaches the preset target range, the temperature control unit will maintain the water temperature stable to ensure that the mattress surface temperature is always within the user's comfort zone. The whole process will continue, the system will constantly monitor the user's body temperature and ambient temperature changes, and make fine adjustments based on the guidance of the personalized temperature control strategy, so that the mattress temperature regulation can adapt to the user's dynamic needs.
[0109] In this way, the system can ensure that the temperature of the mattress is always adjusted in line with the user's actual physiological needs, providing a personalized temperature control experience.
[0110] In the above embodiment, an AI-based intelligent mattress water temperature control method is provided. Correspondingly, the present application also provides an AI-based intelligent mattress water temperature control system. Figure 2 , which is a schematic diagram of an embodiment of an AI-based smart mattress water temperature control system of the present application. Since this embodiment, i.e., the second embodiment, is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The embodiments described below are merely illustrative.
[0111] The second embodiment of the present application provides an AI-based intelligent mattress water temperature control system, including: The sensor unit 201 is arranged inside the mattress and is used to collect the user's body temperature data, environmental temperature data, heart rate, breathing rate and body movement data; The central control unit 202 is connected to the multiple sensor modules in communication, and includes a data processing module for receiving the body temperature data and the ambient temperature data collected by the multiple sensors; a comfortable temperature calculation module for calculating the user's current comfortable temperature range based on the body temperature data and the ambient temperature data in combination with a preset comfortable temperature model; and an initial control strategy generation module for generating an initial water temperature adjustment control strategy according to the comfortable temperature range and the user's historical sleep data; The water circulation subsystem 203 is connected to the central control unit and includes a temperature control unit for adjusting the water temperature inside the mattress according to the initial water temperature adjustment control strategy so that the surface temperature of the mattress is kept within the user's comfortable temperature range; The monitoring unit 204 is used to monitor and record the user's body temperature changes, ambient temperature changes, sleep state and mattress surface temperature during the water temperature adjustment process to obtain the user's sleep data; wherein the sleep state is obtained through a sleep monitoring algorithm based on the user's heart rate, breathing rate, body movement and body temperature; A neural network model unit 205, embedded in the central control unit, for generating a personalized temperature control strategy according to the sleep data using a pre-trained neural network model; The temperature control execution unit 206 is connected to the temperature control unit in the water circulation subsystem, and is used to adjust the water temperature according to the personalized temperature control strategy, so that the surface temperature of the mattress is personalized according to the actual sleeping state and temperature requirements of the user.
[0112] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. An AI-based intelligent mattress water temperature control method, characterized in that: include: The user's body temperature data, ambient temperature data, heart rate, breathing rate and body movement data are collected through multiple sensors in the mattress; Based on the collected body temperature data and ambient temperature data, the user's current comfortable temperature range is calculated using the preset comfortable temperature model; Generate an initial water temperature adjustment control strategy based on the calculated comfortable temperature range and the user's historical sleep data, wherein the initial water temperature adjustment control strategy is used to control the temperature control unit in the water circulation system inside the mattress to adjust the water temperature so that the mattress surface temperature remains within the user's current comfortable temperature range; During the water temperature adjustment process, the user's body temperature changes, ambient temperature changes, sleep state and mattress surface temperature are monitored and recorded to obtain the user's sleep data; wherein the sleep state is obtained through a sleep monitoring algorithm based on the user's heart rate, breathing rate, body movement and body temperature; Based on the acquired sleep data, a personalized temperature control strategy is generated through a pre-trained neural network model; The personalized temperature control strategy is applied to the temperature control unit of the water circulation system to adjust the water temperature so that the surface temperature of the mattress can be personalized according to the user's actual sleeping state and temperature requirements.
2. The AI-based intelligent mattress water temperature control method according to claim 1, characterized in that: The sleep monitoring algorithm comprises the following steps: Multiple sensors in the mattress collect the user's heart rate data, breathing rate data, body movement data and body temperature data in real time; The heart rate data is processed using the wavelet transform method to obtain the heart rate frequency domain characteristics; Perform frequency domain analysis on the respiratory frequency data through fast Fourier transform, extract the main frequency component of the user's respiratory frequency, and obtain the main frequency characteristics of the respiratory frequency; According to the frequency domain characteristics of the heart rate and the main frequency characteristics of the respiratory frequency, combined with the body movement data, a multi-level amplitude analysis of the acceleration signal is performed to identify the amplitude and frequency information of the user's body movement; according to the identified body movement amplitude and frequency information of the user, a second-order difference method is used for analysis to obtain the frequency and amplitude change trend of the user's body movement in different sleep stages; According to the body movement frequency and amplitude change trends, heart rate frequency domain characteristics and respiratory frequency main frequency characteristics, a time sliding window technique is applied to obtain a change rate characteristic related to the user's sleep stage; Based on the user's body temperature data and the ambient temperature data, and in combination with the change rate characteristics, an inflection point detection algorithm is applied to detect the turning point of the temperature difference curve, and the stability information of the user's body temperature change is output; According to the heart rate frequency domain characteristics, the main frequency characteristics of the respiratory frequency, the body movement frequency and amplitude change trends, the stability information of the body temperature change, and combined with the user's historical sleep data, the user's sleep state is classified within a preset threshold range to obtain the user's sleep stage classification result.
3. The AI-based intelligent mattress water temperature control method according to claim 1, characterized in that: The method of calculating the user's current comfortable temperature range based on the collected body temperature data and ambient temperature data and using a preset comfortable temperature model includes: The collected user temperature data and ambient temperature data are input into a preset comfortable temperature model, which is calculated based on the changing rules of human physiological parameters and ambient temperature; The comfortable temperature model dynamically adjusts the upper and lower limits of the comfortable temperature range based on the user's individual characteristics including body shape, age, and gender; The Bayesian update method is used to dynamically modify the model parameters of the comfort temperature model according to the real-time collected user data, so as to ensure that the comfort temperature range can adapt to the user's current physiological state and environmental conditions.
4. The AI-based intelligent mattress water temperature control method according to claim 1, characterized in that: The initial water temperature adjustment control strategy is generated according to the calculated comfortable temperature range and the user's historical sleep data, including: Extract sleep status, body temperature change patterns and ambient temperature fluctuation information from the user's historical sleep data to form a personalized sleep feature vector; According to the currently calculated comfort temperature range and the user's historical sleep feature vector, an initial water temperature regulation control strategy is generated through a support vector regression algorithm. The initial control strategy includes a target water temperature setting and a temperature regulation rate. The target water temperature ensures that the mattress surface temperature is within the user's comfort range, and the temperature regulation rate is dynamically adjusted according to the user's sleep state.
5. The AI-based intelligent mattress water temperature control method according to claim 1, characterized in that: The pre-trained neural network model includes a data pre-processing module, a multimodal fusion encoder and a temperature control strategy generator; The input of the data preprocessing module is the user's sleep data, including the user's body temperature change data, ambient temperature change data, sleep state data and mattress surface temperature data; the data preprocessing module uses sliding window technology and adaptive normalization algorithm to convert data of different time scales into unified time series features to obtain standardized and time-series aligned feature vectors; The input of the multimodal fusion encoder is the feature vector provided by the data preprocessing module; the multimodal fusion encoder adopts a bidirectional long short-term memory network structure enhanced by an attention mechanism to process the physiological data and environmental data of the input data respectively, and then fuses the information of different modalities through a self-attention layer to obtain a fused potential feature representation; The input of the temperature control strategy generator is the fused latent feature representation; the temperature control strategy generator is implemented by a reinforcement learning model based on the Actor-Critic architecture, and is used to obtain a personalized temperature control strategy, including the target temperature and adjustment rate of the mattress surface, according to the fused latent feature representation; wherein the Actor network in the Actor-Critic architecture is implemented by a multi-layer perceptron structure, and is used to generate continuous temperature control actions; the Critic network uses a time difference learning method to estimate the value of each state-action pair; and the reward function design is implemented in combination with the user comfort score and the energy efficiency index.
6. The AI-based intelligent mattress water temperature control method according to claim 5, characterized in that: The adaptive normalization algorithm is dynamically adjusted based on the user's personalized data distribution, and includes the following steps: Collect data distribution of user body temperature and ambient temperature changes during multiple sleep cycles; By statistically analyzing the personalized data range of each user, the personalized data distribution parameters are calculated, including the minimum value, maximum value, standard deviation of body temperature and the range of change of ambient temperature; Dynamically adjust the upper and lower limits of normalization so that the normalization process adapts to the actual data range of individual users; During the normalization process, the fluctuation of user data is monitored in real time, and the normalization strategy is adaptively adjusted according to the distribution changes of user data to ensure that data at different time scales always maintain consistency and alignment.
7. The AI-based intelligent mattress water temperature control method according to claim 5, characterized in that: The multimodal fusion encoder ensures the balance between different modalities through a specific weight update mechanism, including the following steps: Use a multi-head attention mechanism to assign weights to data of different modalities, and set a balance weight between physiological data and environmental data during initialization; In each training process, the weights between different modalities are dynamically adjusted according to the degree of influence of input data on model output through the adaptive weight update mechanism; In the attention mechanism, a cross-modal self-attention module is used to enhance the information interaction between the modalities, ensure that the fusion of physiological data and environmental data can take into account the importance of both, and avoid policy deviations caused by data modality imbalance.
8. The AI-based intelligent mattress water temperature control method according to claim 5, characterized in that: The Actor network in the temperature control strategy generator designs a special continuous action optimization strategy for the temperature regulation process, including the following steps: When the Actor network generates continuous temperature control actions, it sets a gradual temperature adjustment mechanism based on the user's current body temperature, ambient temperature, and sleep state to avoid too fast or too slow temperature changes; Different adjustment rates are set for different sleep stages, ensuring that the temperature changes slowly during light sleep and quickly adjusts according to the user's body temperature during deep sleep; The critic network evaluates the impact of each continuous action on user comfort in real time through a temporal difference learning algorithm, and combines the user's comfort score and energy consumption feedback to generate a reinforcement learning reward function to optimize energy efficiency while ensuring user comfort.
9. The AI-based intelligent mattress water temperature control method according to claim 5, characterized in that: The reward function of reinforcement learning This is achieved using the following formula 1: in, , and is the weight coefficient; It is the user comfort sub-function; is the energy efficiency sub-function; is the user habit learning sub-function; among them, the user comfort sub-function This is achieved using the following formula 2: in, The current user's body temperature; is the surface temperature of the mattress; The preset comfort temperature range Starting point; The preset comfort temperature range The end point; is the adjustment coefficient; Energy efficiency subfunction This is achieved using the following formula 3: in, is the energy consumption penalty coefficient; is the frequency of temperature regulation; is the surface temperature of the mattress; It is the last temperature setting value; User Habit Learning Subfunction This is achieved using the following formula 4: in, It is the first prediction made by the system based on the user's historical habits. Second mattress surface temperature; It is the actual monitored user's body temperature; is the width of the comfortable temperature range; is the number of samples at a time point.
10. An AI-based intelligent mattress water temperature control system, characterized in that: include: The sensor unit is arranged inside the mattress and is used to collect the user's body temperature data, ambient temperature data, heart rate, breathing rate and body movement data; A central control unit is connected to the plurality of sensor modules for communication, and the central control unit includes a data processing module for receiving body temperature data and ambient temperature data collected by the plurality of sensors; a comfortable temperature calculation module for calculating the user's current comfortable temperature range based on the body temperature data and ambient temperature data in combination with a preset comfortable temperature model; and an initial control strategy generating module, for generating an initial water temperature regulating control strategy according to the comfortable temperature range and the user's historical sleep data; a water circulation subsystem connected to the central control unit, comprising a temperature control unit for adjusting the water temperature inside the mattress according to the initial water temperature adjustment control strategy so that the surface temperature of the mattress is maintained within a comfortable temperature range for the user; A monitoring unit, used to monitor and record the user's body temperature changes, ambient temperature changes, sleep state and mattress surface temperature during the water temperature adjustment process, and obtain the user's sleep data; wherein the sleep state is obtained through a sleep monitoring algorithm based on the user's heart rate, breathing rate, body movement and body temperature; a neural network model unit, embedded in the central control unit, for generating a personalized temperature control strategy according to the sleep data using a pre-trained neural network model; The temperature control execution unit is connected to the temperature control unit in the water circulation subsystem and is used to adjust the water temperature according to the personalized temperature control strategy so that the surface temperature of the mattress can be personalized according to the actual sleeping state and temperature requirements of the user.
Citation Information
Cited By
Temperature and humidity control method, controller, system and storage medium
CN120066175A
A temperature and humidity control method, controller, system and storage medium
CN120066175B
Sleep environment self-adjusting system based on multi-source heterogeneous data
CN121091722A