An indoor temperature regulation method and system based on sleep habit analysis
By filtering, extracting, enhancing, and reconstructing the signals from the monitoring radar echo data, and combining this with a predictive model for temperature adjustment, the accuracy problem of sleep habit analysis in non-wearable devices has been solved, achieving higher precision and more comfortable temperature control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGXI QIYELIAN TECH CO LTD
- Filing Date
- 2025-08-25
- Publication Date
- 2026-06-12
Smart Images

Figure CN120744394B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of sleep habit analysis, and specifically relates to an indoor temperature regulation method and system based on sleep habit analysis. Background Technology
[0002] Sleep habit analysis typically includes the following aspects: sleep duration, sleep onset time, number of awakenings, etc. This data can help us understand our sleep patterns, identify potential problems, and take corresponding measures to improve them.
[0003] For places that require temperature regulation, such as hospitals, nursing homes, and nurseries, it is common practice to analyze the sleep habits of the elderly, children, and patients, and then control the temperature regulation equipment in real time based on the analysis results to ensure that the target is in a comfortable environment.
[0004] There are generally two methods for analyzing sleep habits in existing technologies: one is through wearable devices, and the other is through non-wearable devices. Non-wearable devices usually acquire sleep characteristic data of the target through radar and then perform sleep habit analysis. However, in reality, due to the influence of the external environment and the human body, the radar echo data will contain a lot of noise and some invalid data. Noise and invalid data will significantly affect the accuracy of sleep habit analysis, and in the subsequent temperature adjustment process, the temperature adjustment may not match the actual sleep state of the target. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides an indoor temperature regulation method and system based on sleep habit analysis, which solves the technical problems in the prior art.
[0006] In a first aspect, the present invention provides the following technical solution: an indoor temperature regulation method based on sleep habit analysis, comprising:
[0007] Acquire sleep analysis echo data returned by a monitoring radar installed indoors, and perform signal filtering and invalid signal removal on the sleep analysis echo data to obtain filtered sleep analysis echo signals;
[0008] The selected sleep analysis echo signals are extracted to obtain the extracted sleep analysis signal;
[0009] The extracted sleep analysis signal is enhanced and reconstructed to obtain a reconstructed sleep analysis signal;
[0010] Obtain a preset sleep habit prediction model and historical training data. Use the historical training data to predict the preset sleep habit prediction model to obtain a target prediction model. Input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data.
[0011] The indoor temperature is adjusted based on the sleep state prediction data.
[0012] Compared with existing technologies, the beneficial effects of this invention are as follows: First, this invention acquires sleep analysis echo data returned by a monitoring radar installed indoors. The sleep analysis echo data is then filtered and invalid signals are removed to obtain a filtered sleep analysis echo signal. Next, the filtered sleep analysis echo signal is extracted to obtain an extracted sleep analysis signal. Then, the extracted sleep analysis signal is enhanced and reconstructed to obtain a reconstructed sleep analysis signal. Next, a preset sleep habit prediction model and historical training data are acquired. The preset sleep habit prediction model is then used to predict using the historical training data to obtain a target prediction model. The reconstructed sleep analysis signal is input into the target prediction model for prediction to output sleep state prediction data. Finally, based on the sleep state prediction… This invention regulates indoor temperature using data. First, it performs signal filtering and invalid signal removal to improve the signal-to-noise ratio, outputting a higher quality signal while effectively eliminating invalid signals and removing the influence of body movements. Next, it extracts the signal, effectively avoiding decomposition errors caused by improper parameter selection. It also avoids estimation errors caused by the overlap of respiratory harmonics and respiratory-heartbeat intermodulation products with the heartbeat fundamental frequency, thus improving signal accuracy and reliability. Then, it enhances and reconstructs the signal to effectively amplify it and remove environmental noise, further improving the accuracy of the signal output. Finally, it adjusts the temperature based on the output sleep state prediction data, ensuring the target remains in a comfortable environment while also achieving energy savings.
[0013] Preferably, the step of filtering and removing invalid signals from the sleep analysis echo data to obtain filtered sleep analysis echo signals includes:
[0014] The intermediate frequency (IF) signal is extracted from the sleep analysis echo data. The IF signal is sampled and converted from analog to digital to obtain sampled data. The sampled data is then arranged in a matrix to obtain a data matrix. ,in, The number of pulse cycles in the slow time dimension. This represents the number of sampling points in the fast time dimension;
[0015] Perform on each row of the data matrix Point FFT calculation is performed to obtain the spectrum matrix. Phase demodulation is performed on each column of the spectrum matrix to obtain a phase sequence. ,in, Indicates the first The phase information of each distance unit is used to calculate the proximity of adjacent phases in the phase sequence. :
[0016] ;
[0017] In the formula, , They represent the first Phase information of each distance cell, For sequence index, For sequence lag values, For modulo operation;
[0018] Select Intimacy The maximum value is determined, and the maximum value is used as a reference to traverse to both sides. If the absolute value of the intimacy value adjacent to the maximum value is less than the intimacy threshold, the maximum value and the corresponding adjacent intimacy value are stored in the effective sequence, and the echo signal of the corresponding distance gate in the effective sequence is determined to obtain the effective echo signal sequence.
[0019] Calculate the signal-to-noise ratio of each echo signal in the effective echo signal sequence. :
[0020] ;
[0021] In the formula, The frequency range of sleep characteristics. For the first The echo signal at frequency Power at the location;
[0022] Based on the signal-to-noise ratio Determine the fusion feature signal :
[0023] ;
[0024] In the formula, The number of echo signals in the valid echo signal sequence. For the first One echo signal;
[0025] Based on the fusion feature signal Determine the selection criteria for sleep analysis echo signals.
[0026] Preferably, the fusion feature signal is based on The steps for determining the selection criteria for sleep analysis echo signals include:
[0027] Body motion detection is performed on the fused feature signal. If body motion exists in the fused feature signal, Fourier transform and component decomposition are performed on the fused feature signal to obtain time component and frequency component. Time component with amplitude greater than amplitude threshold is removed to obtain new time component. New frequency component is determined in the frequency component based on the new time component.
[0028] The new time component and the new frequency component are reconstructed and inverse Fourier transformed to obtain a new feature signal, and the new feature signal is used for body motion detection.
[0029] If body movement is present in the new feature signal, the amplitude threshold is reduced and the process of Fourier transform, component decomposition and component elimination is repeated until there is no body movement, so as to output the eliminated feature signal.
[0030] The rejection feature signal is divided into several signal segments, and the invalidity judgment value of each signal segment is calculated. :
[0031] ;
[0032] In the formula, Indicates the range of sleep characteristic frequencies in the signal segment The sum of the power spectrum in the range of 0.1-0.7 Hz. Indicates the range of sleep characteristic frequencies in the signal segment The sum of the five largest power spectra within;
[0033] Invalid judgment value Signal segments below the judgment threshold are discarded to obtain filtered sleep analysis echo signals.
[0034] Preferably, the step of extracting signals from the screened sleep analysis echo signals to obtain extracted sleep analysis signals includes:
[0035] The selected sleep analysis echo signal Modeling:
[0036] ;
[0037] In the formula, The initial target signal, It is white noise;
[0038] Based on the target signal Constructing a posterior probability model:
[0039] ;
[0040] ;
[0041] In the formula, For posterior probability, For noise variance, To filter the sequence length of sleep analysis echo signals, The sign for conjugate transpose. Let be the diagonal matrix of the variances of each component in the initial target signal. , These are heartbeat signal amplitude, heartbeat signal frequency, respiratory signal amplitude, and respiratory signal frequency, respectively. The mean of all components in the initial target signal. To solve for the signal;
[0042] Determine the target signal posterior distribution Based on the posterior distribution Determine signal expectation :
[0043] ;
[0044] In the formula, For hyperparameter set, , For mathematical expectation calculation, For the first The hyperparameter set for the next iteration;
[0045] Maximize the expected value of the signal and iteratively update the hyperparameter set until the iteration stopping condition is met, so as to output the final hyperparameter set. :
[0046] ;
[0047] ; ;
[0048] ;
[0049] In the formula, Represents the components in the target signal. , , They represent the first The noise variance after each iteration, the diagonal matrix of the variances of each component in the initial target signal, and the mean of each component in the initial target signal. For the first The mean of each component in the initial target signal after the next iteration;
[0050] The final hyperparameter set Substitute the values into the posterior probability model to convert the posterior probability model into an objective function. Then, use a preset algorithm to solve the objective function to output the extracted sleep analysis signal.
[0051] Preferably, the step of performing signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain a reconstructed sleep analysis signal includes:
[0052] The reconstructed sleep analysis signal is used to calculate the first signal entropy of the extracted sleep analysis signal in different dimensions. :
[0053] ;
[0054] In the formula, For the first Dimensional sleep signal analysis;
[0055] Several first sub-matrices are extracted from the reconstructed sleep analysis signal, centered on the largest signal entropy. Discrete Fourier transform and signal entropy calculation are then performed on these first sub-matrices to obtain the second signal entropy. With the third signal entropy :
[0056] ; ;
[0057] In the formula, The frequency range of sleep characteristics. For frequency The first Discrete Fourier transform representation of the first submatrix;
[0058] Based on the second signal entropy With the third signal entropy Determine the entropy ratio and the entropy ratio The first submatrix corresponding to the maximum value is used as the second submatrix:
[0059] ;
[0060] The reconstructed sleep analysis signal is determined based on the second sub-matrix.
[0061] Preferably, the step of determining the reconstructed sleep analysis signal based on the second sub-matrix includes:
[0062] Calculate the second submatrix signal-to-noise ratio :
[0063] ;
[0064] In the formula, It is the Discrete Fourier Transform;
[0065] Determine the gain in different dimensions Through signal-to-noise ratio in different dimensions Normalize the gain to make To obtain the adjusted gain The real signal, imaginary signal, amplitude signal and phase signal are extracted from the second sub-matrix, and the real signal, imaginary signal, amplitude signal and phase signal are weighted and fused by adjusting the gain to obtain the fused feature matrix;
[0066] The PCA algorithm is used to correct the fused feature matrix to obtain corrected signal features. A pre-trained target network is then obtained, and the corrected signal features are input into the target network for reconstruction to obtain a reconstructed sleep analysis signal.
[0067] Preferably, the step of adjusting the indoor temperature based on the sleep state prediction data includes:
[0068] The deep sleep period and the awake period are extracted from the sleep state prediction data. If the external environment is summer and the user is in a deep sleep state, the temperature regulation device is controlled to heat up. If the external environment is summer and the user is about to wake up, the temperature regulation device is controlled to cool down. If the external environment is winter and the user is in a deep sleep state, the temperature regulation device is controlled to turn off, cool down, or work intermittently. If the external environment is winter and the user is about to wake up, the temperature regulation device is controlled to turn on or heat up.
[0069] Secondly, the present invention provides the following technical solution: an indoor temperature control system based on sleep habit analysis, the system comprising:
[0070] The rejection module is used to acquire sleep analysis echo data returned by the monitoring radar set up indoors, and to perform signal filtering and invalid signal rejection on the sleep analysis echo data to obtain filtered sleep analysis echo signals.
[0071] The extraction module is used to extract signals from the screened sleep analysis echo signals to obtain extracted sleep analysis signals;
[0072] The reconstruction module is used to perform signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain a reconstructed sleep analysis signal;
[0073] The output module is used to acquire a preset sleep habit prediction model and historical training data, predict the preset sleep habit prediction model using the historical training data to obtain a target prediction model, and input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data.
[0074] The adjustment module is used to adjust the indoor temperature based on the sleep state prediction data.
[0075] Thirdly, the present invention provides the following technical solution: a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the indoor temperature regulation method based on sleep habit analysis as described above.
[0076] Fourthly, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described method for regulating indoor temperature based on sleep habit analysis. Attached Figure Description
[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0078] Figure 1 A flowchart of an indoor temperature regulation method based on sleep habit analysis provided in Embodiment 1 of the present invention;
[0079] Figure 2 This is a structural block diagram of the indoor temperature control system based on sleep habit analysis provided in Embodiment 2 of the present invention;
[0080] Figure 3 This is a schematic diagram of the hardware structure of a computer provided for another embodiment of the present invention.
[0081] The embodiments of the present invention will be further described below with reference to the accompanying drawings. Detailed Implementation
[0082] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain embodiments of the present invention, and should not be construed as limiting the present invention.
[0083] Example 1
[0084] In Embodiment 1 of the present invention, as Figure 1 As shown, an indoor temperature regulation method based on sleep habit analysis includes:
[0085] S1. Acquire sleep analysis echo data returned by the monitoring radar installed indoors, and perform signal filtering and invalid signal removal on the sleep analysis echo data to obtain filtered sleep analysis echo signals;
[0086] Specifically, the monitoring radar can be installed at the head of the bed.
[0087] Step S1 includes:
[0088] S11. Extract the intermediate frequency signal from the sleep analysis echo data, sample the intermediate frequency signal and convert the analog signal into a digital signal to obtain sampled data, and arrange the sampled data into a matrix to obtain a data matrix. ,in, The number of pulse cycles in the slow time dimension. This represents the number of sampling points in the fast time dimension.
[0089] S12, Perform processing on each row of the data matrix. Point FFT calculation is performed to obtain the spectrum matrix. Phase demodulation is performed on each column of the spectrum matrix to obtain a phase sequence. ,in, Indicates the first The phase information of each distance unit is used to calculate the proximity of adjacent phases in the phase sequence. :
[0090] ;
[0091] In the formula, , They represent the first Phase information of each distance cell, For sequence index, For sequence lag values, For modulo operation;
[0092] Specifically, for each phase information, it also includes row data in the matrix, meaning each phase information includes B phase data. By performing modulo operations, it can be ensured that the sequence can correctly cycle during lag, and that when the lag value of the sequence is different... Will After the generation, in practice, the range of the sequence lag value is between -B+1 and B-1, and the phase demodulation here adopts the MDACM demodulation algorithm in the existing technology.
[0093] S13, Select Intimacy Level The maximum value is determined, and the maximum value is used as a reference to traverse to both sides. If the absolute value of the intimacy value adjacent to the maximum value is less than the intimacy threshold, the maximum value and the corresponding adjacent intimacy value are stored in the effective sequence, and the echo signal of the corresponding distance gate in the effective sequence is determined to obtain the effective echo signal sequence.
[0094] Specifically, the intimacy threshold here is 0.05.
[0095] S14. Calculate the signal-to-noise ratio of each echo signal in the effective echo signal sequence. :
[0096] ;
[0097] In the formula, The frequency range of sleep characteristics. For the first The echo signal at frequency Power at the location;
[0098] Specifically, the sleep characteristic frequency range here includes the heart rate range and the respiratory rate range.
[0099] S15, Based on the signal-to-noise ratio Determine the fusion feature signal :
[0100] ;
[0101] In the formula, The number of echo signals in the valid echo signal sequence. For the first One echo signal.
[0102] S16, Based on the fused feature signal Determine and screen sleep analysis echo signals;
[0103] Step S16 includes:
[0104] S161. Perform body motion detection on the fused feature signal. If there is body motion in the fused feature signal, perform Fourier transform and component decomposition on the fused feature signal to obtain time component and frequency component. Remove time component with amplitude greater than amplitude threshold to obtain new time component. Determine new frequency component in the frequency component based on the new time component.
[0105] Specifically, the body movements here refer to random body movements (RBMs), which can be detected using the existing CFAR algorithm. In actual monitoring, there may be unconscious movements of body parts such as hands, legs, or torso, or even the entire body. These unnecessary but unavoidable movements are considered random body movements. The amplitude of the reflected signal of random body movements is usually stronger than that of breathing movements on the millimeter scale. Therefore, breathing movements may be masked by this interference. For example, the estimation of respiratory frequency may be affected by the interference. Therefore, in subsequent steps, it is necessary to remove the influence of random body movements. At the same time, the time component and frequency component can be obtained by non-negative matrix factorization, and the two are corresponding. The amplitude threshold here is 1. Once the new time component is determined by the amplitude threshold, the corresponding frequency component can be selected based on the new time component to obtain the new frequency component.
[0106] S162. Reconstruct and inverse Fourier transform the new time component and the new frequency component to obtain a new feature signal, and perform body motion detection on the new feature signal.
[0107] S163. If there is body movement in the new feature signal, reduce the amplitude threshold and repeat the process of Fourier transform, component decomposition and component elimination until there is no body movement, so as to output the eliminated feature signal.
[0108] Specifically, the above process is an iterative repetition process, and the amplitude threshold decreases by 0.1 each time. After several repetitions, until no body movement can be detected in the signal, the corresponding removal feature signal can be output.
[0109] S164. Divide the elimination feature signal into several signal segments and calculate the invalidity judgment value of each signal segment. :
[0110] ;
[0111] In the formula, Indicates the range of sleep characteristic frequencies in the signal segment The sum of the power spectrum in the range of 0.1-0.7 Hz. Indicates the range of sleep characteristic frequencies in the signal segment The sum of the five largest power spectra within;
[0112] Specifically, setting the Hz range to 0.1-0.7 Hz here can effectively improve detection quality. Among the invalidation values for normal breathing, ineffective breathing, and apnea, ineffective breathing has the lowest invalidation value. Therefore, in subsequent steps, invalid breathing can be eliminated by setting a threshold.
[0113] S165, invalid judgment value Signal segments below the judgment threshold are discarded to obtain filtered sleep analysis echo signals;
[0114] Specifically, the threshold for judgment here is 0.1.
[0115] S2. Extract the selected sleep analysis echo signal to obtain the extracted sleep analysis signal;
[0116] Step S2 includes:
[0117] S21. Screening the sleep analysis echo signal Modeling:
[0118] ;
[0119] In the formula, The initial target signal, It is white noise;
[0120] Specifically, the frequency and amplitude of breathing and heartbeat, as well as white noise, all conform to a normal distribution, a phenomenon that can be explained by the central limit theorem.
[0121] S22, Based on target signal Constructing a posterior probability model:
[0122] ;
[0123] ;
[0124] In the formula, For posterior probability, For noise variance, To filter the sequence length of sleep analysis echo signals, The sign for conjugate transpose. Let be the diagonal matrix of the variances of each component in the initial target signal. , These are heartbeat signal amplitude, heartbeat signal frequency, respiratory signal amplitude, and respiratory signal frequency, respectively. The mean of all components in the initial target signal. To solve for the signal.
[0125] S23. Determine the target signal posterior distribution Based on the posterior distribution Determine signal expectation :
[0126] ;
[0127] In the formula, For hyperparameter set, , For mathematical expectation calculation, For the first The hyperparameter set for the next iteration.
[0128] S24. Maximize the expected value of the signal and iteratively update the hyperparameter set until the iteration stopping condition is met, so as to output the final hyperparameter set. :
[0129] ;
[0130] ; ;
[0131] ;
[0132] In the formula, Represents the components in the target signal. , , They represent the first The noise variance after each iteration, the diagonal matrix of the variances of each component in the initial target signal, and the mean of each component in the initial target signal. For the first The mean value of each component in the initial target signal after the next iteration.
[0133] S25. The final hyperparameter set Substitute the values into the posterior probability model to convert the posterior probability model into an objective function, and use a preset algorithm to solve the objective function to output the extracted sleep analysis signal;
[0134] Specifically, after determining the final hyperparameter set, the unknowns of the model at this point are the initial target signal and the solution signal. The model is then used as an objective function with unknowns and solved using the particle swarm optimization algorithm in the existing technology. The final solution signal is then used as the signal for extracting sleep analysis.
[0135] S3. Perform signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain a reconstructed sleep analysis signal;
[0136] Step S3 includes:
[0137] S31. Calculate the first signal entropy of the extracted sleep analysis signal in different dimensions based on the reconstructed sleep analysis signal. :
[0138] ;
[0139] In the formula, For the first The sleep analysis signal has dimensions ranging from 1 to 10 in this application.
[0140] S32. Extract several first sub-matrices from the reconstructed sleep analysis signal, centered on the largest signal entropy. Perform discrete Fourier transform and signal entropy calculation on the first sub-matrices to obtain the second signal entropy. With the third signal entropy :
[0141] ; ;
[0142] In the formula, The frequency range of sleep characteristics. For frequency The first Discrete Fourier transform representation of the first submatrix.
[0143] S33, Based on the second signal entropy With the third signal entropy Determine the entropy ratio and the entropy ratio The first submatrix corresponding to the maximum value is used as the second submatrix:
[0144] ;
[0145] Specifically, the signal entropy within the sleep characteristic frequency range and the signal entropy within the body movement range are used as the entropy ratio. When a human remains still and breathes normally in the environment, the breathing signal is stronger than the human's movement signal, resulting in a significant entropy ratio greater than 1. When the target moves, the power of the reflected signal affected by the human movement is enhanced, and the breathing signal is greatly covered, at which point the entropy ratio is less than 1.
[0146] S34. Determine the reconstructed sleep analysis signal based on the second sub-matrix;
[0147] Step S34 includes:
[0148] S341. Calculate the second submatrix signal-to-noise ratio :
[0149] ;
[0150] In the formula, This is the Discrete Fourier Transform.
[0151] S342. Determine the gain in different dimensions. Through signal-to-noise ratio in different dimensions Normalize the gain to make To obtain the adjusted gain The real signal, imaginary signal, amplitude signal and phase signal are extracted from the second sub-matrix, and the real signal, imaginary signal, amplitude signal and phase signal are weighted and fused by adjusting the gain to obtain the fused feature matrix;
[0152] Specifically, for the second submatrix, there is a corresponding second submatrix for each dimension. For the decomposed real signal, imaginary signal, amplitude signal and phase signal, the four statistics are fused according to the dimensions by adjusting the gain to obtain the fused feature matrix.
[0153] S343. The PCA algorithm is used to correct the fusion feature matrix to obtain the corrected signal features, the pre-trained target network is obtained, and the corrected signal features are input into the target network for reconstruction to obtain the reconstructed sleep analysis signal.
[0154] Specifically, during the correction process, the fused feature matrix is decentered using the PCA algorithm, and then the covariance matrix is calculated. Based on the covariance matrix, the first principal component is selected from the eigenvector corresponding to the largest eigenvalue after eigenvalue decomposition as the correction signal feature.
[0155] Meanwhile, the target network here is the U-Net network in the prior art. The target distribution can be obtained from the noisy distribution through forward diffusion and backward diffusion, and then fine-grained sleep feature waveform information can be reconstructed from the signal features.
[0156] S4. Obtain a preset sleep habit prediction model and historical training data. Use the historical training data to predict the preset sleep habit prediction model to obtain a target prediction model. Input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data.
[0157] Specifically, the historical training data here refers to the sleep data of the target within a historical time period, while the sleep habit prediction model is the random forest model in the existing technology. By inputting the reconstructed sleep analysis signal into the random forest model, the sleep state prediction data can be output. The target's deep sleep time, awake time, number of awakenings, etc. can be obtained from the sleep state prediction data.
[0158] S5. Adjust the indoor temperature based on the sleep state prediction data.
[0159] Step S5 includes:
[0160] The deep sleep period and the wakefulness period are extracted from the sleep state prediction data. If the external environment is summer and the user is in a deep sleep state, the temperature regulation device is controlled to heat up. If the external environment is summer and the user is about to wake up, the temperature regulation device is controlled to cool down. If the external environment is winter and the user is in a deep sleep state, the temperature regulation device is controlled to turn off, cool down, or work intermittently. If the external environment is winter and the user is about to wake up, the temperature regulation device is controlled to turn on or heat up.
[0161] Specifically, when the target is in a deep sleep state, the body temperature will drop by about 1 degree. Therefore, by controlling temperature regulation equipment such as air conditioners, their opening and closing and temperature can be controlled in real time to keep the target in a comfortable environment, while also achieving energy saving.
[0162] The indoor temperature regulation method based on sleep habit analysis provided in Embodiment 1 of this invention first acquires sleep analysis echo data returned by a monitoring radar installed indoors. The sleep analysis echo data is then filtered and invalid signals are removed to obtain a filtered sleep analysis echo signal. Next, the filtered sleep analysis echo signal is extracted to obtain an extracted sleep analysis signal. Then, the extracted sleep analysis signal is enhanced and reconstructed to obtain a reconstructed sleep analysis signal. Next, a preset sleep habit prediction model and historical training data are acquired. The preset sleep habit prediction model is then used to predict using the historical training data to obtain a target prediction model. The reconstructed sleep analysis signal is input into the target prediction model for prediction to output sleep state prediction data. Finally, based on sleep... This invention uses sleep state prediction data to regulate indoor temperature. First, it performs signal filtering and invalid signal removal to improve the signal-to-noise ratio, outputting a higher quality signal while effectively eliminating invalid signals and removing the influence of body movements. Next, it extracts the signal, effectively avoiding decomposition errors caused by improper parameter selection, and avoiding estimation errors caused by the overlap of respiratory harmonics and respiratory-heartbeat intermodulation products with the heartbeat fundamental frequency, thus improving signal accuracy and reliability. Then, it enhances and reconstructs the signal to effectively strengthen it and remove environmental noise, further improving the accuracy of the signal output. Finally, it adjusts the temperature based on the output sleep state prediction data, ensuring the target remains in a comfortable environment while also achieving energy savings.
[0163] Example 2
[0164] like Figure 2 As shown, in Embodiment 2 of the present invention, an indoor temperature control system based on sleep habit analysis is provided, the system comprising:
[0165] The elimination module 1 is used to acquire sleep analysis echo data returned by the monitoring radar set up indoors, and to perform signal filtering and invalid signal elimination on the sleep analysis echo data to obtain filtered sleep analysis echo signals.
[0166] Extraction module 2 is used to extract signals from the screened sleep analysis echo signals to obtain extracted sleep analysis signals;
[0167] Reconstruction module 3 is used to perform signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain a reconstructed sleep analysis signal;
[0168] Output module 4 is used to acquire a preset sleep habit prediction model and historical training data, predict the preset sleep habit prediction model using the historical training data to obtain a target prediction model, and input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data.
[0169] Adjustment module 5 is used to adjust the indoor temperature based on the sleep state prediction data;
[0170] The rejection module 1 includes:
[0171] The sampling submodule is used to extract the intermediate frequency signal from the sleep analysis echo data, sample the intermediate frequency signal and convert the analog signal into a digital signal to obtain sampled data, and arrange the sampled data into a matrix to obtain a data matrix. ,in, The number of pulse cycles in the slow time dimension. This represents the number of sampling points in the fast time dimension;
[0172] The demodulation submodule is used to perform demodulation on each row of the data matrix. Point FFT calculation is performed to obtain the spectrum matrix. Phase demodulation is performed on each column of the spectrum matrix to obtain a phase sequence. ,in, Indicates the first The phase information of each distance unit is used to calculate the proximity of adjacent phases in the phase sequence. :
[0173] ;
[0174] In the formula, , They represent the first Phase information of each distance cell, For sequence index, For sequence lag values, For modulo operation;
[0175] The intimacy submodule is used to select intimacy level. The maximum value is determined, and the maximum value is used as a reference to traverse to both sides. If the absolute value of the intimacy value adjacent to the maximum value is less than the intimacy threshold, the maximum value and the corresponding adjacent intimacy value are stored in the effective sequence, and the echo signal of the corresponding distance gate in the effective sequence is determined to obtain the effective echo signal sequence.
[0176] The effective calculation submodule is used to calculate the signal-to-noise ratio of each echo signal in the effective echo signal sequence. :
[0177] ;
[0178] In the formula, The frequency range of sleep characteristics. For the first The echo signal at frequency Power at the location;
[0179] The feature fusion submodule is used to integrate features based on the signal-to-noise ratio. Determine the fusion feature signal :
[0180] ;
[0181] In the formula, The number of echo signals in the valid echo signal sequence. For the first One echo signal;
[0182] The filtering submodule is used to filter based on the fused feature signal. Determine the selection criteria for sleep analysis echo signals.
[0183] The filtering submodule includes:
[0184] The detection unit is used to detect body movements in the fused feature signal. If there are body movements in the fused feature signal, the fused feature signal is subjected to Fourier transform and component decomposition to obtain time components and frequency components. Time components with amplitudes greater than the amplitude threshold are removed to obtain new time components. A new frequency component is determined in the frequency components based on the new time components.
[0185] The new feature unit is used to reconstruct and inverse Fourier transform the new time component and the new frequency component to obtain a new feature signal, and to perform body motion detection on the new feature signal;
[0186] The component iteration unit is used to reduce the amplitude threshold and repeat the process of Fourier transform, component decomposition and component elimination if there is body movement in the new feature signal, until there is no body movement, so as to output the eliminated feature signal.
[0187] The judgment value unit is used to divide the rejection feature signal into several signal segments and calculate the invalidity judgment value of the signal segments. :
[0188] ;
[0189] In the formula, Indicates the range of sleep characteristic frequencies in the signal segment The sum of the power spectrum in the range of 0.1-0.7 Hz. Indicates the range of sleep characteristic frequencies in the signal segment The sum of the five largest power spectra within;
[0190] The rejection unit is used to remove invalid judgment values. Signal segments below the judgment threshold are discarded to obtain filtered sleep analysis echo signals.
[0191] The extraction module 2 includes:
[0192] The modeling submodule is used to process the filtered sleep analysis echo signals. Modeling:
[0193] ;
[0194] In the formula, The initial target signal, It is white noise;
[0195] The posterior submodule is used for testing based on the target signal. Constructing a posterior probability model:
[0196] ;
[0197] ;
[0198] In the formula, For posterior probability, For noise variance, To filter the sequence length of sleep analysis echo signals, The sign for conjugate transpose. Let be the diagonal matrix of the variances of each component in the initial target signal. , These are heartbeat signal amplitude, heartbeat signal frequency, respiratory signal amplitude, and respiratory signal frequency, respectively. The mean of all components in the initial target signal. To solve for the signal;
[0199] The expectation submodule is used to determine the target signal. posterior distribution Based on the posterior distribution Determine signal expectation :
[0200] ;
[0201] In the formula, For hyperparameter set, , For mathematical expectation calculation, For the first The hyperparameter set for the next iteration;
[0202] The maximization submodule is used to maximize the expected signal and iteratively update the hyperparameter set until the iteration stopping condition is met, so as to output the final hyperparameter set. :
[0203] ;
[0204] ; ;
[0205] ;
[0206] In the formula, Represents the components in the target signal. , , They represent the first The noise variance after each iteration, the diagonal matrix of the variances of each component in the initial target signal, and the mean of each component in the initial target signal. For the first The mean of each component in the initial target signal after the next iteration;
[0207] The function submodule is used to process the final hyperparameter set. Substitute the values into the posterior probability model to convert the posterior probability model into an objective function. Then, use a preset algorithm to solve the objective function to output the extracted sleep analysis signal.
[0208] The reconstruction module 3 includes:
[0209] The first signal entropy submodule is used to calculate the first signal entropy of the extracted sleep analysis signal in different dimensions from the reconstructed sleep analysis signal. :
[0210] ;
[0211] In the formula, For the first Dimensional sleep signal analysis;
[0212] The second signal entropy submodule is used to extract several first sub-matrices from the reconstructed sleep analysis signal, centered on the largest signal entropy, and to perform discrete Fourier transform and signal entropy calculation on the first sub-matrices to obtain the second signal entropy. With the third signal entropy :
[0213] ; ;
[0214] In the formula, The frequency range of sleep characteristics. For frequency The first Discrete Fourier transform representation of the first submatrix;
[0215] Matrix submodule, used for based on the second signal entropy With the third signal entropy Determine the entropy ratio and the entropy ratio The first submatrix corresponding to the maximum value is used as the second submatrix:
[0216] ;
[0217] The reconstruction submodule is used to determine the reconstructed sleep analysis signal based on the second submatrix.
[0218] The reconstruction submodule includes:
[0219] Signal-to-noise ratio unit, used to calculate the second submatrix signal-to-noise ratio :
[0220] ;
[0221] In the formula, It is the Discrete Fourier Transform;
[0222] Weighted fusion unit, used to determine the gain in different dimensions. Through signal-to-noise ratio in different dimensions Normalize the gain to make To obtain the adjusted gain The real signal, imaginary signal, amplitude signal and phase signal are extracted from the second sub-matrix, and the real signal, imaginary signal, amplitude signal and phase signal are weighted and fused by adjusting the gain to obtain the fused feature matrix;
[0223] The correction unit is used to correct the fused feature matrix using the PCA algorithm to obtain the corrected signal features, acquire the pre-trained target network, and input the corrected signal features into the target network for reconstruction to obtain the reconstructed sleep analysis signal.
[0224] The adjustment module 5 is specifically used for:
[0225] The deep sleep period and the awake period are extracted from the sleep state prediction data. If the external environment is summer and the user is in a deep sleep state, the temperature regulation device is controlled to heat up. If the external environment is summer and the user is about to wake up, the temperature regulation device is controlled to cool down. If the external environment is winter and the user is in a deep sleep state, the temperature regulation device is controlled to turn off, cool down, or work intermittently. If the external environment is winter and the user is about to wake up, the temperature regulation device is controlled to turn on or heat up.
[0226] In other embodiments of the present invention, the present invention provides the following technical solution: a computer, including a memory 102, a processor 101, and a computer program stored in the memory 102 and executable on the processor 101, wherein the processor 101 executes the computer program to implement the indoor temperature regulation method based on sleep habit analysis as described above.
[0227] Specifically, the processor 101 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of the present invention.
[0228] The memory 102 may include a large-capacity memory for data or instructions. For example, and not limitingly, the memory 102 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 102 may include removable or non-removable (or fixed) media. Where appropriate, the memory 102 may be internal or external to a data processing device. In a particular embodiment, the memory 102 is non-volatile memory. In a particular embodiment, the memory 102 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable read-only memory (PROM), an erasable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), an electrically alterable read-only memory (EAROM), or flash memory, or a combination of two or more of these. Where appropriate, the RAM can be Static Random-Access Memory (SRAM) or Dynamic Random-Access Memory (DRAM). DRAM can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0229] The memory 102 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 101.
[0230] The processor 101 reads and executes the computer program instructions stored in the memory 102 to implement the above-mentioned indoor temperature regulation method based on sleep habit analysis.
[0231] In some embodiments, the computer may further include a communication interface 103 and a bus 100. For example, Figure 3 As shown, the processor 101, memory 102, and communication interface 103 are connected through bus 100 and complete communication with each other.
[0232] The communication interface 103 is used to enable communication between the various modules, devices, units, and / or equipment in the embodiments of the present invention. The communication interface 103 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0233] Bus 100 includes hardware, software, or both, that couples components of a computer device together. Bus 100 includes, but is not limited to, at least one of the following: data bus, address bus, control bus, expansion bus, and local bus. For example, and not as a limitation, bus 100 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 100 may include one or more buses. Although specific buses are described and illustrated in the embodiments of the present invention, the present invention is contemplated by any suitable bus or interconnect.
[0234] The computer can execute the indoor temperature regulation method based on sleep habit analysis of the present invention based on the acquisition of an indoor temperature regulation system based on sleep habit analysis, thereby realizing indoor temperature regulation based on sleep habit analysis.
[0235] In some further embodiments of the present invention, in conjunction with the above-described indoor temperature regulation method based on sleep habit analysis, the present invention provides the following technical solution: a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-described indoor temperature regulation method based on sleep habit analysis.
[0236] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0237] More specific examples of readable media (a non-exhaustive list) include: electrical connections (electronic devices) with one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0238] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0239] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0240] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for regulating indoor temperature based on sleep habit analysis, characterized in that, include: Acquire sleep analysis echo data returned by a monitoring radar installed indoors, and perform signal filtering and invalid signal removal on the sleep analysis echo data to obtain filtered sleep analysis echo signals; The selected sleep analysis echo signals are extracted to obtain the extracted sleep analysis signal; The extracted sleep analysis signal is enhanced and reconstructed to obtain a reconstructed sleep analysis signal; Obtain a preset sleep habit prediction model and historical training data. Use the historical training data to predict the preset sleep habit prediction model to obtain a target prediction model. Input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data. The indoor temperature is adjusted based on the sleep state prediction data. The step of filtering and removing invalid signals from the sleep analysis echo data to obtain filtered sleep analysis echo signals includes: extracting a medium frequency signal in the sleep analysis echo data, sampling the medium frequency signal and converting an analog signal into a digital signal to obtain sampling data, arranging the sampling data in a matrix form to obtain a data matrix wherein, is a number of pulse cycles in a slow time dimension, is a number of sampling points in a fast time dimension; performing a point FFT calculation on each row of the data matrix to obtain a spectrum matrix performing phase demodulation on each column of the spectrum matrix to obtain a phase sequence : ; In the formula, , respectively represent phase information of the first distance unit, is a sequence index, is a sequence lag value, is a modulo operation; Select Intimacy The maximum value is determined, and the maximum value is used as a reference to traverse to both sides. If the absolute value of the intimacy value adjacent to the maximum value is less than the intimacy threshold, the maximum value and the corresponding adjacent intimacy value are stored in the effective sequence, and the echo signal of the corresponding distance gate in the effective sequence is determined to obtain the effective echo signal sequence. Calculate the signal-to-noise ratio of each echo signal in the effective echo signal sequence. : ; In the formula, The frequency range of sleep characteristics. For the first The echo signal at frequency Power at the location; Based on the signal-to-noise ratio Determine the fusion feature signal : ; In the formula, The number of echo signals in the valid echo signal sequence. For the first One echo signal; Based on the fusion feature signal Determine and screen sleep analysis echo signals; The based on the fused feature signal The steps for determining the selection criteria for sleep analysis echo signals include: Body motion detection is performed on the fused feature signal. If body motion exists in the fused feature signal, Fourier transform and component decomposition are performed on the fused feature signal to obtain time component and frequency component. Time component with amplitude greater than amplitude threshold is removed to obtain new time component. New frequency component is determined in the frequency component based on the new time component. The new time component and the new frequency component are reconstructed and inverse Fourier transformed to obtain a new feature signal, and the new feature signal is used for body motion detection. If body movement is present in the new feature signal, the amplitude threshold is reduced and the process of Fourier transform, component decomposition and component elimination is repeated until there is no body movement, so as to output the eliminated feature signal. The rejection feature signal is divided into several signal segments, and the invalidity judgment value of each signal segment is calculated. : ; In the formula, Indicates the range of sleep characteristic frequencies in the signal segment The sum of the power spectrum in the range of 0.1-0.7 Hz. Indicates the range of sleep characteristic frequencies in the signal segment The sum of the five largest power spectra within; Invalid judgment value Signal segments below the judgment threshold are discarded to obtain filtered sleep analysis echo signals.
2. The indoor temperature regulation method based on sleep habit analysis according to claim 1, characterized in that, The step of extracting signals from the screened sleep analysis echo signals to obtain the extracted sleep analysis signal includes: The selected sleep analysis echo signal Modeling: ; In the formula, For the initial target signal, It is white noise; Based on the target signal Constructing a posterior probability model: ; ; In the formula, For posterior probability, For noise variance, To filter the sequence length of sleep analysis echo signals, The sign for conjugate transpose. Let be the diagonal matrix of the variances of each component in the initial target signal. , These are heartbeat signal amplitude, heartbeat signal frequency, respiratory signal amplitude, and respiratory signal frequency, respectively. The mean of all components in the initial target signal. To solve for the signal; Determine the target signal posterior distribution Based on the posterior distribution Determine signal expectation : ; In the formula, For hyperparameter set, , For mathematical expectation calculation, For the first The hyperparameter set for the next iteration; Maximize the expected value of the signal and iteratively update the hyperparameter set until the iteration stopping condition is met, so as to output the final hyperparameter set. : ; ; ; ; In the formula, Represents the components in the target signal. , , They represent the first The noise variance after each iteration, the diagonal matrix of the variances of each component in the initial target signal, and the mean of each component in the initial target signal. For the first The mean of each component in the initial target signal after the next iteration; The final hyperparameter set Substitute the values into the posterior probability model to convert the posterior probability model into an objective function. Then, use a preset algorithm to solve the objective function to output the extracted sleep analysis signal.
3. The indoor temperature regulation method based on sleep habit analysis according to claim 1, characterized in that, The step of performing signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain the reconstructed sleep analysis signal includes: The reconstructed sleep analysis signal is used to calculate the first signal entropy of the extracted sleep analysis signal in different dimensions. : ; In the formula, For the first Dimensional sleep signal analysis; Several first sub-matrices are extracted from the reconstructed sleep analysis signal, centered on the largest signal entropy. Discrete Fourier transform and signal entropy calculation are then performed on these first sub-matrices to obtain the second signal entropy. With the third signal entropy : ; ; In the formula, The frequency range of sleep characteristics. For frequency The first Discrete Fourier transform representation of the first submatrix; Based on the second signal entropy With the third signal entropy Determine the entropy ratio and the entropy ratio The first submatrix corresponding to the maximum value is used as the second submatrix: ; The reconstructed sleep analysis signal is determined based on the second sub-matrix.
4. The indoor temperature regulation method based on sleep habit analysis according to claim 3, characterized in that, The step of determining the reconstructed sleep analysis signal based on the second sub-matrix includes: Calculate the second submatrix signal-to-noise ratio : ; In the formula, It is the Discrete Fourier Transform; Determine the gain in different dimensions Through signal-to-noise ratio in different dimensions Normalize the gain to make To obtain the adjusted gain The real signal, imaginary signal, amplitude signal and phase signal are extracted from the second sub-matrix, and the real signal, imaginary signal, amplitude signal and phase signal are weighted and fused by adjusting the gain to obtain the fused feature matrix; The PCA algorithm is used to correct the fused feature matrix to obtain corrected signal features. A pre-trained target network is then obtained, and the corrected signal features are input into the target network for reconstruction to obtain a reconstructed sleep analysis signal.
5. The indoor temperature regulation method based on sleep habit analysis according to claim 1, characterized in that, The step of adjusting the indoor temperature based on the sleep state prediction data includes: The deep sleep period and the awake period are extracted from the sleep state prediction data. If the external environment is summer and the user is in a deep sleep state, the temperature regulation device is controlled to heat up. If the external environment is summer and the user is about to wake up, the temperature regulation device is controlled to cool down. If the external environment is winter and the user is in a deep sleep state, the temperature regulation device is controlled to turn off, cool down, or work intermittently. If the external environment is winter and the user is about to wake up, the temperature regulation device is controlled to turn on or heat up.
6. An indoor temperature control system based on sleep habit analysis, wherein the system employs the indoor temperature control method based on sleep habit analysis as described in claim 1, characterized in that, The system includes: The rejection module is used to acquire sleep analysis echo data returned by the monitoring radar set up indoors, and to perform signal filtering and invalid signal rejection on the sleep analysis echo data to obtain filtered sleep analysis echo signals. The extraction module is used to extract signals from the screened sleep analysis echo signals to obtain extracted sleep analysis signals; The reconstruction module is used to perform signal enhancement and signal reconstruction on the extracted sleep analysis signal to obtain a reconstructed sleep analysis signal; The output module is used to acquire a preset sleep habit prediction model and historical training data, predict the preset sleep habit prediction model using the historical training data to obtain a target prediction model, and input the reconstructed sleep analysis signal into the target prediction model for prediction to output sleep state prediction data. The adjustment module is used to adjust the indoor temperature based on the sleep state prediction data.
7. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the indoor temperature regulation method based on sleep habit analysis as described in any one of claims 1 to 5.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the indoor temperature regulation method based on sleep habit analysis as described in any one of claims 1 to 5.