An artificial intelligence-based deep sleep monitoring bed control system
By using multi-channel data acquisition and processing technology, the system identifies sleeping postures and corrects signals. Combined with artificial intelligence algorithms to optimize bed control, it solves the problems of signal offset and control interference caused by changes in sleeping posture, and improves the accuracy and stability of sleep staging.
Patent Information
- Application Number
- CN202611389007.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
Existing sleep monitoring technologies cannot effectively compensate for signal feature shifts when faced with changes in sleeping posture, leading to a decrease in the accuracy of sleep staging. Furthermore, bed control strategies fail to dynamically adapt to sleep stages, affecting sleep stability and bed posture adjustment.
By acquiring and processing multi-channel synchronous data, combined with piezoelectric thin film sensors, audio acquisition units and non-contact electrodes, the sleep posture type is identified and the signal is corrected. The Transformer and convolutional neural network are used to fuse features and generate bed control commands to dynamically adjust the bed posture to adapt to different sleep stages.
It improves the accuracy of sleep staging, reduces the impact of changes in sleeping posture on signals, ensures that bed control behavior does not interfere with sleep continuity, and enables on-demand adjustment of bed posture.
Smart Images

Figure CN123166633A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automatic control, specifically to a deep sleep monitoring bed control system based on artificial intelligence. Background Technology
[0002] Currently, non-invasive sleep monitoring technology based on impact mapping is widely used. Existing systems typically collect impact mapping signals by integrating piezoelectric thin-film sensors into the mattress, thereby extracting vital signs parameters such as heart rate and respiratory rate, and estimating sleep stages. Building on this, some smart bed systems are attempting to use sleep staging results for automatic adjustment of bed posture.
[0003] However, existing technologies still face two main challenges. Firstly, changes in sleeping posture significantly alter the transmission path and waveform morphology of impactogram signals. While current systems can identify sleeping postures, they lack effective mechanisms to compensate for signal characteristic shifts caused by posture differences, making it difficult to guarantee the accuracy of sleep staging after posture changes. Secondly, existing bed control strategies often employ simple stage mapping, failing to fully consider the varying tolerances of different sleep stages to external mechanical disturbances. The control actions themselves may interfere with sleep continuity, resulting in a lack of dynamic adaptation between sleep staging results and bed control behavior. This makes it difficult to maintain sleep stability while simultaneously adjusting bed posture as needed. Summary of the Invention
[0004] To achieve the above objectives, the present invention provides the following technical solution: a deep sleep monitoring bed control system based on artificial intelligence, comprising:
[0005] The data acquisition module is used to acquire the user's cardiac impaction signal and body pressure distribution signal through a piezoelectric thin film sensor array embedded in the mattress, acquire respiratory audio signal through an audio acquisition unit arranged at the head of the bed, acquire electrooculogram signal through a non-contact electrode embedded in the pillow, and synchronize the cardiac impaction signal, respiratory audio signal and electrooculogram signal in time to generate a multi-channel synchronous data stream.
[0006] The sleeping posture processing module receives a multi-channel synchronous data stream, identifies the user's current sleeping posture type based on the body pressure distribution signal in the multi-channel synchronous data stream, selects the corresponding effective sensing sub-region from the piezoelectric thin film sensor array based on the current sleeping posture type, and outputs an effective signal identifier containing the effective sensing sub-region.
[0007] The feature processing module extracts the effective cardiac impact map signal corresponding to the effective sensing sub-region from the multi-channel synchronous data stream based on the effective signal identifier, performs multi-scale feature extraction on the effective cardiac impact map signal, generates macro-feature set and micro-feature set, and calls the preset feature mapping matrix corresponding to the current sleeping position type as a condition, performs sleeping position dependency correction on the micro-feature set, and outputs the corrected micro-feature set.
[0008] The sleep staging module inputs the macroscopic feature set and the corrected microscopic feature set into the first processing stream based on the Transformer architecture and the second processing stream based on the convolutional neural network, respectively, for feature fusion, and generates the probability distribution of each sleep stage based on the fusion result;
[0009] The sequence optimization and control module performs global optimal path decoding on the probability distribution based on the directed graph of sleep state transition, outputs the sleep stage sequence, and generates bed control commands based on the sleep stage sequence.
[0010] Preferably, the data acquisition module acquires the user's cardiac impaction signal and body pressure distribution signal through a piezoelectric thin-film sensor array embedded in the mattress. This array consists of multiple independent piezoelectric sensing units arranged in a matrix. Each sensing unit converts the mechanical pressure generated by the user's heartbeat and changes in body position into an electrical signal, thereby simultaneously acquiring the cardiac impaction signal and body pressure distribution signal. Respiratory audio signals are acquired through an audio acquisition unit located at the head of the bed, and electrooculography (EOG) signals are acquired through non-contact electrodes embedded in the pillow. The system uses the sampling clock of the piezoelectric thin-film sensor array as a reference clock to resample or interpolate and align the respiratory audio signal and EOG signal, and sets a synchronization error tolerance threshold. The sampling rate of the cardiac impaction signal is 200Hz. The sampling rate for respiratory audio signals ranges from 8kHz to 48kHz, and the sampling rate for electrooculogram (EOG) signals ranges from 100Hz to 500Hz. For signals with a sampling rate higher than the reference sampling rate, the system first performs anti-aliasing filtering to eliminate high-frequency image components above the Nyquist frequency, and then performs downsampling. For signals with a sampling rate lower than the reference sampling rate, the system performs upsampling through interpolation to make its sampling rate consistent with the reference sampling rate. Because the anti-aliasing filtering blocks the spectral aliasing path before downsampling, and the interpolation upsampling restores the continuous phase of the signal waveform after upsampling, the deviation of each channel signal on the time axis in the multi-channel synchronous data stream is constrained within the synchronization error tolerance threshold, providing data support for subsequent time alignment.
[0011] Preferably, the non-contact electrode embedded in the occipital region is a capacitively coupled electrode. The electrode includes a flexible dielectric layer and a shielding layer. The shielding layer is used to suppress external power frequency electromagnetic interference and common-mode noise. The flexible dielectric layer is used to maintain a stable dielectric constant between the electrode and the skin. The electrode and the skin maintain a non-contact distance, and this distance meets the signal-to-noise ratio requirements for capacitively coupled signal acquisition. Since there is no need for conductive gel or direct contact between the electrode and the skin, the wearing comfort is improved while ensuring the quality of electrooculography signal acquisition.
[0012] Furthermore, the data acquisition module separates the electrooculogram (EOG) signal from the head micro-motion signal through adaptive filtering. This adaptive filter uses the mixed signal output from the non-contact electrode as the original input and the body pressure distribution change signal in the adjacent occipital region of the piezoelectric thin film sensor array as the reference input. By iteratively adjusting the filter weights, the micro-motion-related components in the reference channel cancel out the interference components in the original input, thereby effectively separating the EOG signal and the head micro-motion signal in the spectral overlap region. Since the motion artifacts in the head micro-motion signal and the cardiac impactogram signal are homologous, both generated by the mechanical movement of the user's head or torso, the system uses the separated head micro-motion signal as the reference channel input to perform motion artifact removal on the cardiac impactogram signal. By establishing a linear regression model of the motion artifact components in the head micro-motion signal and the cardiac impactogram signal, the estimated motion artifact components are subtracted from the cardiac impactogram signal in the effective sensing sub-region in real time, thereby restoring the heartbeat characteristics masked by body movement.
[0013] Preferably, after receiving multi-channel synchronous data streams, the sleeping posture processing module identifies the user's current sleeping posture type based on the body pressure distribution signal. This identification process is based on the differences in the pressure projection contours of the human body on the mattress under different sleeping postures. When lying supine, the body pressure distribution presents a bilaterally symmetrical pattern centered on the spine; when lying on the side, it presents a bimodal concentrated pattern with one shoulder and hip; and when lying prone, it presents a wide-area distribution pattern in the chest and abdomen region. After determining the current sleeping posture type, the system initially determines candidate sub-regions on the piezoelectric thin-film sensor array based on the anatomical projection area corresponding to the sleeping posture type. This anatomical projection area is pre-calibrated based on ergonomic measurement data, thereby compressing the entire array search space to a physiologically reasonable area and reducing... Ineffective computation; subsequently, the system calculates the signal-to-noise ratio (SNR) and signal energy concentration of the cardiac impact map signal in each candidate sub-region. The SNR is determined by the ratio of the power spectral density of the cardiac impact map signal in the main frequency band of the heartbeat to the power spectral density of out-of-band noise. The signal energy concentration is determined by the time-domain energy entropy value; the lower the time-domain energy entropy value, the more concentrated the signal energy is within the heartbeat cycle. The system selects the sub-region with the highest SNR and signal energy concentration as the effective sensing sub-region. When multiple effective sensing sub-regions exist, the system performs weighted fusion of the corresponding cardiac impact map signals according to the SNR weight of each sub-region, where the weighting coefficient w of the i-th effective sensing sub-region is...i Calculate using the following formula: In the formula, SNR i S represents the signal-to-noise ratio of the cardiac impact map signal in the i-th effective sensing sub-region, and M represents the number of effective sensing sub-regions; the fused effective cardiac impact map signal S fused Calculate using the following formula: In the formula S i The signal is the cardiac impact map signal corresponding to the i-th effective sensing sub-region. Because the sub-region with a higher signal-to-noise ratio is given a greater weight during the fusion process, while the weight of the sub-region with a low signal-to-noise ratio is diluted accordingly, the fused signal retains the principal component of the heartbeat while suppressing the random interference introduced by the noise sub-region, thereby generating a high-quality effective cardiac impact map signal that matches the current sleeping position type.
[0014] Preferably, the feature processing module extracts the effective cardiac impact map signal corresponding to the effective sensing sub-region from the multi-channel synchronous data stream based on the effective signal identifier. It then performs multi-scale feature extraction on this signal to generate macroscopic and microscopic feature sets. The macroscopic feature set is obtained by segmenting and aggregating the effective cardiac impact map signal, including time-domain indices of heart rate variability and respiratory rhythm coupling coefficients. The microscopic feature set is obtained by differentiating, integrating, and decomposing the local waveform within a single heartbeat cycle, including J-peak amplitude, K-peak slope, and differential features of the inter-beat interval. Because the waveform morphology and spectral distribution of the cardiac impact map signal change significantly under different sleeping positions due to variations in the state of the chest and mattress, the directly extracted microscopic feature set exhibits distribution differences across different sleeping positions. Directly inputting this into the sleep staging module would increase the misjudgment rate of sleep stages in side-lying or prone positions. Therefore, the system pre-collects calibrated cardiac impact map signals under different sleeping positions, extracts microscopic features to form a training sample set, and solves the mapping matrix W using least squares regression. posture and bias vector b posture The objective function of this least squares regression adds a distribution alignment constraint term between sleeping positions to the standard mean square error term, minimizing the intra-class variance of the mapped micro-features across different sleeping position types and making the inter-class mean difference approach zero; the operation of sleeping position dependency correction is expressed by the following formula: In the formula F micro For the set of microscopic features before correction, F corrected The corrected micro-feature set is shown below. Because the alignment constraint between sleeping positions is introduced into the objective function, the obtained mapping matrix fits the feature mapping relationship. It also forces the micro-feature distributions offset in the side-lying and prone positions to be mapped to the common feature space aligned with the supine position, thereby eliminating the systematic influence of sleeping position changes on the range of micro-feature values.
[0015] Preferably, the sleep staging module inputs the macroscopic feature set into a first processing stream based on a Transformer architecture to obtain a macroscopic feature sequence, and inputs the corrected microscopic feature set into a second processing stream based on a convolutional neural network to obtain a microscopic feature sequence. Simultaneously, it acquires a sleep posture condition vector corresponding to the current sleep posture type. This sleep posture condition vector is obtained by mapping the current sleep posture type through a fully connected layer after one-hot encoding. The dimension of the mapped sleep posture condition vector matches the intermediate feature dimension of the first and second processing streams. In the feature fusion stage, the system uses the macroscopic feature sequence as the query vector and the microscopic feature sequence as the key and value vectors to calculate attention weights. When calculating attention weights, the system concatenates the sleep posture condition vector with the query vector and then performs a first linear transformation to obtain a condition query vector. The system then concatenates the sleep posture condition vector with the key vector... The conditional key vector is obtained through a second linear transformation. This concatenated vector, connected by a learnable linear transformation, allows the semantic information of sleep posture to be cross-coupled with the components of the query and key vectors under the action of a fully connected weight matrix. Attention weights are obtained by the dot product of the conditional query vector and the conditional key vector. These attention weights are then used to perform a weighted summation of the value vectors to obtain the fusion feature. Since the macroscopic feature sequence carries long-cycle heart rate variability and respiratory rhythm information, and the microscopic feature sequence carries local heartbeat waveform details, a cross-modal attention mechanism is used, with macroscopic features as the query vector and microscopic features as the key and value vectors. This allows the long-cycle rhythm state to actively retrieve and weightedly aggregate associated local detail features, thereby generating a fusion feature that simultaneously contains global physiological rhythm and local waveform information. Based on this fusion feature, the probability distribution of each sleep stage is generated.
[0016] Furthermore, the first processing stream is a sleep posture conditional Transformer encoder, which includes multiple multi-head self-attention layers, each layer with multiple attention heads. The sleep posture condition vector is mapped to the scale modulation parameters of each attention head via a fully connected layer. These scale modulation parameters differentially scale the dot product of the condition query vector and the condition key vector according to the sleep posture type. When the user is in a supine position, the coupling between the heart and the mattress is stable and the baseline drift of the cardiac impaction signal is small. The system expands the attention perception range of the low-frequency components by reducing the scale modulation parameter value of the low-frequency components, thereby fully capturing the diastolic and systolic details in the periodic structure of the cardiac impaction. When a user is in a side-lying position, uneven body pressure distribution leads to an increase in high-frequency noise components in the cardiac impaction signal. The system increases the scale modulation parameter value of the high-frequency noise sensitive area to compress the proportion of this area in the attention weight distribution, thereby suppressing the interference of baseline drift caused by uneven body pressure on sleep stage discrimination. At the same time, the mapped sleep posture condition vector is subjected to a Hadamard product operation with the hidden layer output of the feedforward network to form a sleep posture adaptive gating. This Hadamard product operation broadcasts the sleep posture condition vector to the same dimension as the hidden layer output of the feedforward network and then multiplies it element by element, so that the output of neurons in the feedforward network whose activation values deviate from the normal range under different sleep postures are adaptively suppressed or enhanced.
[0017] Furthermore, the second processing stream is a one-dimensional convolutional neural network with sleeping posture conditionalization. This network includes multiple one-dimensional convolutional layers. The sleeping posture conditional vector is broadcast-expanded and then concatenated with the input feature maps of each convolutional layer along the channel dimension. This concatenation operation explicitly encodes the semantic information of sleeping posture into the input feature space of the convolutional layers. The response bias of the convolutional kernel is dynamically adjusted according to the sleeping posture type. The system generates a bias correction vector corresponding to the number of output channels of each convolutional layer based on the sleeping posture conditional vector, and adds this bias correction vector to the output feature map of the convolution operation. When the user is in a prone position, pressure on the chest and abdomen leads to cardiac impaction. The high-frequency micro-vibration details in the signal are masked by body pressure. The system restores the micro-vibration features of the cardiac impact map that are masked by body pressure by enhancing the gain coefficient of specific convolutional channels to enhance the high-frequency attenuation details. This gain coefficient is realized by the channel scaling vector generated by the sleeping posture condition vector through a fully connected mapping. The channel scaling vector is multiplied with the output feature map of the convolutional layer channel by channel. At the same time, in the cross-layer feature transfer path of the residual connection, the system performs channel-by-channel weighting on the sleeping posture condition vector and the shortcut output. This weighting operation is achieved by mapping the sleeping posture condition vector to a weight vector with the same number of shortcut output channels and then multiplying them channel by channel.
[0018] Preferably, the sequence optimization and control module performs global optimal path decoding on the probability distribution based on a directed graph of sleep state transitions. The node set of this directed graph includes the wakefulness stage, N1 light sleep stage, N2 light sleep stage, N3 deep sleep stage, and REM sleep stage. The directed edges between nodes represent the physiological feasibility of sleep state transitions. The system updates the edge weights of the directed graph of sleep state transitions online based on the user's historical sleep stage sequence, using the following update formula: In the formula W old为 Before the update, W obs The observed edge weights are statistically obtained from the sleep stage sequences within a preset number of sleep stage cycles traced back from the current moment. α is a smoothing coefficient and 0 < α < 1. This preset number is determined based on the physiological rule that the sleep cycle length of a normal adult is approximately ninety minutes, thus ensuring that the updated edge weights retain both the statistical prior of the user's long-term sleep rhythm and adapt to the dynamic changes in recent sleep structure. The global optimal path decoding uses the Viterbi algorithm, combining the probability distribution of each sleep stage and the updated edge weights to perform path search, and incorporating minimum dwell time constraints and taboo transition penalties. The minimum dwell time constraint is set according to sleep medicine standards.
[0019] Preferably, the sequence optimization and control module generates bed control commands based on the sleep stage sequence and a preset control mapping table. When N3 deep sleep is detected, the system controls the head / foot angle of the bed to adjust to a preset stable angle range, or maintains the current angle, and suspends unnecessary adjustments. This stable angle range is set according to the need to maintain the natural curvature of the spine during deep sleep. Since users are least sensitive to changes in body position during deep sleep, maintaining a stable angle can avoid micro-awakening caused by mechanical adjustment, thereby protecting the continuity of deep sleep. When REM sleep is detected, the system prohibits any angle adjustment. Since REM sleep is accompanied by a significant decrease in muscle tone and active dreaming, any bed movement may trigger an awakening response through vestibular stimulation. Prohibiting adjustment can protect the integrity of REM sleep. When awakening or N1 light sleep is detected, the system allows for fine-tuning of the angle at a rate lower than the preset adjustment rate and triggers environmental audio intervention.
[0020] This invention provides an artificial intelligence-based deep sleep monitoring bed control system. It has the following beneficial effects:
[0021] 1. This invention solves the problem of changes in the transmission path of cardiac impactor signals caused by changes in sleeping posture by selecting effective sensing sub-regions from the sensor array according to the type of sleeping posture and performing signal-to-noise ratio weighted fusion of signals from multiple sub-regions, thereby improving the acquisition quality of effective cardiac impactor signals under different sleeping postures.
[0022] 2. This invention solves the problem that the difference in sleeping posture causes the feature distribution to shift, which affects the accuracy of sleep staging, and further improves the accuracy of sleep staging under cross-sleeping posture conditions.
[0023] 3. This invention solves the problem of the control actions themselves interfering with the continuity of sleep due to the disconnect between the bed control behavior and the sleep state, and completes the adjustment of the bed posture while maintaining sleep stability. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of the system described in this invention;
[0025] Figure 2 This is a cross-sectional view of the non-contact capacitive coupling electrode structure of the present invention;
[0026] Figure 3 This is a schematic diagram of the workflow of the sleeping posture processing module of the present invention;
[0027] Figure 4 This is a diagram of the dual-branch network structure of the sleep staging module of the present invention. Detailed Implementation
[0028] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] In this embodiment, an artificial intelligence-based deep sleep monitoring bed control system includes a data acquisition module, a sleep posture processing module, a feature processing module, a sleep staging module, and a sequence optimization and control module. Figure 1 As shown, the modules work together to monitor the user's sleep state and coordinate the control of the bed's posture.
[0030] The data acquisition module collects the user's cardiac impaction signal and body pressure distribution signal through a piezoelectric thin-film sensor array embedded in the mattress. This piezoelectric thin-film sensor array consists of multiple independent piezoelectric sensing units arranged in a matrix. Each sensing unit converts the mechanical pressure generated by the user's heartbeat and changes in body position into an electrical signal, thereby simultaneously acquiring the cardiac impaction signal and body pressure distribution signal. Simultaneously, the system collects respiratory audio signals through an audio acquisition unit located at the head of the bed and electrooculography (EOG) signals through non-contact electrodes embedded in the pillow.
[0031] The system uses the sampling clock of the piezoelectric thin-film sensor array as the reference clock to resample or interpolate and align the respiratory audio signal and electrooculogram (EOG) signal, and sets a synchronization error tolerance threshold. The sampling rate of the cardiac impaction signal is exemplarily set to 500Hz, the respiratory audio signal to 16kHz, and the EOG signal to 250Hz. For respiratory audio signals with a sampling rate higher than the reference sampling rate, the system first performs anti-aliasing filtering to eliminate high-frequency image components above the Nyquist frequency. The cutoff frequency of the anti-aliasing filter is set according to the Nyquist frequency of the target sampling rate, and then downsamples to 500Hz. For EOG signals with a sampling rate lower than the reference sampling rate, the system upsamples to 500Hz through interpolation to match the reference sampling rate. The time-axis deviation of each channel signal in the multi-channel synchronous data stream is constrained within the synchronization error tolerance threshold, for example, set to ±2ms, thereby providing time-aligned data support for subsequent modules.
[0032] like Figure 2 As shown, the non-contact electrode embedded in the occipital region is a capacitively coupled electrode, comprising a flexible dielectric layer and a shielding layer. The shielding layer is used to suppress external power frequency electromagnetic interference and common-mode noise, while the flexible dielectric layer is used to maintain a stable dielectric constant between the electrode and the skin. A non-contact distance is maintained between the electrode and the skin, for example, set to 3 mm, and this distance meets the signal-to-noise ratio requirements for capacitively coupled signal acquisition.
[0033] Because non-contact electrodes inevitably couple with baseline drift and electromyographic artifacts caused by head micro-movements during the acquisition of electrooculogram (EOG) signals, the data acquisition module uses adaptive filtering to separate the EOG signals from the head micro-movement signals. This adaptive filter uses the mixed signal output from the non-contact electrodes as the original input and the body pressure distribution change signal in the vicinity of the occipital region from the piezoelectric thin-film sensor array as the reference input. By iteratively adjusting the filter weights, the micro-movement-related components in the reference channel cancel out the interference components in the original input, thereby effectively separating the EOG signals from the head micro-movement signals in the spectral overlap region.
[0034] The head micromotion signal and motion artifacts in the cardiac impactogram signal share a common origin, both generated by the mechanical movements of the user's head or torso. The system uses the separated head micromotion signal as the reference channel input to perform motion artifact removal on the cardiac impactogram signal. By establishing a linear regression model between the head micromotion signal and the motion artifact components in the cardiac impactogram signal, the estimated motion artifact components are subtracted from the cardiac impactogram signal of the effective sensing sub-region in real time, thereby restoring the cardiac pulsation characteristics masked by body movement and improving the signal-to-noise ratio of the cardiac impactogram signal during changes in body position.
[0035] After receiving multi-channel synchronous data streams, the sleeping posture processing module identifies the user's current sleeping posture type based on body pressure distribution signals. For example...Figure 3 As shown, the recognition process is based on the difference in the pressure projection contour of the human body on the mattress under different sleeping positions. When lying on the back, the body pressure distribution presents a symmetrical shape centered on the spine. When lying on the side, it presents a double-peak concentrated shape of the shoulder and hip on one side. When lying on the stomach, it presents a wide distribution shape in the chest and abdomen area.
[0036] After determining the current sleeping position, the system initially identifies candidate sub-regions on the piezoelectric thin-film sensor array based on the corresponding anatomical projection area. This anatomical projection area is pre-calibrated using ergonomic measurement data, thus compressing the entire array search space to a physiologically reasonable area and reducing unnecessary computation. Subsequently, the system calculates the signal-to-noise ratio (SNR) and signal energy concentration of the cardiac impact map signal for each candidate sub-region. The SNR is determined by the ratio of the power spectral density of the cardiac impact map signal within the main frequency band of the heartbeat to the out-of-band noise power spectral density. The signal energy concentration is determined by the time-domain energy entropy value; a lower time-domain energy entropy value indicates that the signal energy is more concentrated within the cardiac cycle.
[0037] The system selects the sub-region with the highest signal-to-noise ratio (SNR) exceeding a preset threshold and the highest signal energy concentration as the effective sensing sub-region. For example, the preset SNR threshold is set to 10 dB, and the signal energy concentration criterion is set to an energy entropy value below 0.8. When multiple effective sensing sub-regions exist, the system performs weighted fusion of the corresponding cardiac impaction signals according to the SNR weight of each sub-region. The weighting coefficient w of the i-th effective sensing sub-region... i According to the formula Calculate, where SNR i Let S be the signal-to-noise ratio of the cardiac impact map signal in the i-th effective sensing sub-region, and M be the number of effective sensing sub-regions. The fused effective cardiac impact map signal S... fused According to the formula Calculate, where S i This represents the cardiac impact map signal corresponding to the i-th effective sensing sub-region. Sub-regions with higher signal-to-noise ratios are given greater weight during the fusion process, while the weight of sub-regions with low signal-to-noise ratios is diluted accordingly. The fused signal retains the principal components of the heartbeat while suppressing random interference introduced by the noisy sub-regions, thereby generating a high-quality effective cardiac impact map signal that matches the current sleeping position type, and outputting an effective signal identifier containing the effective sensing sub-regions.
[0038] The feature processing module extracts the valid cardiac impactogram signal corresponding to the valid sensing sub-region from the multi-channel synchronous data stream based on the valid signal identifier. It then performs multi-scale feature extraction on this signal to generate macroscopic and microscopic feature sets. The macroscopic feature set is obtained by segmenting and aggregating the valid cardiac impactogram signal, including time-domain indices of heart rate variability and respiratory rhythm coupling coefficients. The microscopic feature set is obtained by performing differentiation, integration, and wavelet decomposition on local waveforms within a single heartbeat cycle, including J-peak amplitude, K-peak slope, and differential features of the heartbeat interval.
[0039] Because the waveform and spectral distribution of the impact cardiogram signal change significantly with different sleeping positions due to variations in the chest and mattress position, the directly extracted microscopic feature set exhibits distribution differences across different sleeping positions. Directly inputting this into the sleep staging module would increase the misclassification rate of sleep stages in side-lying or prone positions. Therefore, the system pre-collects calibrated impact cardiogram signals under different sleeping positions, extracts microscopic features to form a training sample set, and solves the mapping matrix W using least squares regression. posture and bias vector b posture The objective function of this least squares regression adds a sleep position distribution alignment constraint term to the standard mean squared error term, minimizing the within-class variance of the mapped micro-features across different sleep position types and bringing the between-class mean difference close to zero. The objective function is constructed as follows: Where N is the total number of training samples, Let μ be the target reference value (i.e., the expected mapping result) for a certain training sample, λ be the weight coefficient of the constraint term, and μ be the value of the target reference value (i.e., the expected mapping result). k Let μ be the mean vector of the micro-features after mapping to the k-th sleeping position type. ref This is the reference mean vector of the microscopic features mapped in the supine position.
[0040] The calculation for sleep posture dependence correction is expressed by the following formula: In the formula F micro For the set of microscopic features before correction, F corrected This represents the corrected set of micro-features. Because a distribution alignment constraint between sleeping positions is introduced into the objective function, the resulting mapping matrix fits the feature mapping relationship. It also forces the micro-feature distributions offset in the side-lying and prone positions to be mapped to a common feature space aligned with the supine position, thereby eliminating the systematic influence of sleeping position changes on the range of micro-feature values.
[0041] The sleep staging module inputs the macroscopic feature set into a first processing stream based on a Transformer architecture to obtain a macroscopic feature sequence, and then inputs the corrected microscopic feature set into a second processing stream based on a convolutional neural network to obtain a microscopic feature sequence. For example... Figure 4As shown, the sleeping posture condition vector corresponding to the current sleeping posture type is obtained at the same time. This sleeping posture condition vector is obtained by mapping the current sleeping posture type through a fully connected layer after one-hot encoding. The mapped sleeping posture condition vector has a dimension of 256, which matches the intermediate feature dimension of the first processing stream and the second processing stream.
[0042] In the feature fusion stage, the system uses the macroscopic feature sequence as the query vector and the microscopic feature sequence as the key vector and value vector, and calculates the attention weights. The system concatenates the sleeping posture condition vector with the query vector and then performs a first linear transformation to obtain the condition query vector. The system concatenates the sleeping posture condition vector with the key vector and then performs a second linear transformation to obtain the condition key vector.
[0043] Both the first and second linear transformations are fully connected mapping operations. Their function is to transform the concatenated combined vector to the same feature dimension as the original query vector and key vector, allowing the transformed conditional query vector and conditional key vector to participate in subsequent dot product attention operations. Simultaneously, since each output dimension in the fully connected mapping is obtained by linearly combining all components of the concatenated vector, the components of the sleeping posture conditional vector naturally form cross-coupling with the components of the query vector or key vector, thus integrating sleeping posture semantic information into the calculation of attention weights. Attention weights are obtained based on the dot product operation of the conditional query vector and conditional key vector. These attention weights are then converted into a probability distribution form using a normalized exponential function, the expression of which is: , where z i The attention weight is the i-th attention weight, i.e., the original attention weight before normalization. This attention weight is obtained by the dot product of the conditional query vector and the conditional key vector; z j Let j be the j-th attention weight, where j is the traversal index for the summation operation in the denominator, used to traverse all attention weights. This attention weight is used to perform a weighted summation on the value vector to obtain the fused feature. The macroscopic feature sequence carries long-cycle heart rate variability and respiratory rhythm information, while the microscopic feature sequence carries local cardiac waveform details. A cross-modal attention mechanism, using macroscopic features as query vectors and microscopic features as key and value vectors, enables long-cycle rhythm states to actively retrieve and weightedly aggregate associated local detail features, thereby generating a fused feature that simultaneously contains global physiological rhythm and local waveform information. Based on this fused feature, a fully connected layer and a normalized exponential function are used to generate the probability distribution of each sleep stage.
[0044] The first processing flow is a Transformer encoder with sleep posture conditionalization, for example, containing four multi-head self-attention layers, each with eight attention heads, and a hidden layer dimension of 256. The sleep posture condition vector is mapped to the scale modulation parameters of each attention head through a fully connected layer. These scale modulation parameters differentially scale the dot product of the condition query vector and the condition key vector according to the sleep posture type. When the user is supine, the coupling between the heart and the mattress is stable and the baseline drift of the cardiac impaction signal is small. The system expands the attention perception range of low-frequency components by reducing the scale modulation parameter value of the low-frequency components, thereby fully capturing the diastolic and systolic details in the periodic structure of the cardiac impaction. When the user is lateral, uneven body pressure distribution leads to an increase in high-frequency noise components in the cardiac impaction signal. The system increases the scale modulation parameter value of the high-frequency noise sensitive area to compress the proportion of this area in the attention weight distribution, thereby suppressing the interference of baseline drift caused by uneven body pressure on sleep stage discrimination.
[0045] The mapped sleeping posture condition vector is subjected to a Hadamard product operation with the hidden layer output of the feedforward network to form a sleeping posture adaptive gating. The hidden layer of the feedforward network uses rectified linear units as nonlinear activation functions, with the expression f(x)=max(0,x). This Hadamard product operation broadcasts the sleeping posture condition vector to the same dimension as the hidden layer output of the feedforward network and then multiplies them element-wise, so that the outputs of neurons in the feedforward network whose activation values deviate from the normal range under different sleeping postures are adaptively suppressed or enhanced.
[0046] The second processing stream is a one-dimensional convolutional neural network with sleeping posture conditionalization, for example, containing three one-dimensional convolutional layers with kernel sizes of 7, 5, and 3, and channel numbers of 64, 128, and 256, respectively. The sleeping posture conditional vector is broadcast-expanded and then concatenated along the channel dimension with the input feature maps of each convolutional layer. This concatenation operation explicitly encodes the semantic information of sleeping posture into the input feature space of the convolutional layers. The response bias of the convolutional kernels is dynamically adjusted according to the sleeping posture type. The system generates a bias correction vector corresponding to the number of output channels of each convolutional layer based on the sleeping posture conditional vector, and this bias correction vector is added to the output feature map of the convolution operation.
[0047] When a user is in a prone position, pressure on the chest and abdomen causes high-frequency micro-vibration details in the cardiac impactogram signal to be obscured by body pressure. The system recovers the micro-vibration features of the cardiac impactogram obscured by body pressure by enhancing the gain coefficient of the convolutional channels to improve the high-frequency attenuation details. This gain coefficient is achieved by generating a channel scaling vector from the sleeping posture condition vector through a fully connected mapping. The channel scaling vector is multiplied channel-by-channel with the output feature map of the convolutional layer, and a rectified linear unit is also used after the convolutional layer to introduce non-linear expressive power. Simultaneously, in the cross-layer feature transfer path of the residual connection, the system performs channel-by-channel weighting on the sleeping posture condition vector and the shortcut output. This weighting operation is achieved by mapping the sleeping posture condition vector to a weight vector with the same number of shortcut output channels and then multiplying them channel-by-channel, thereby suppressing abrupt changes in micro-features caused by body movement.
[0048] The sequence optimization and control module decodes the probability distribution based on a directed graph of sleep state transitions to achieve the globally optimal path. The node set of this directed graph includes the wakefulness stage, N1 light sleep stage, N2 light sleep stage, N3 deep sleep stage, and REM sleep stage. The directed edges between nodes represent the physiological feasibility of sleep state transitions. The system updates the edge weights of the directed graph of sleep state transitions online based on the user's historical sleep stage sequence, using the following update formula: In the formula W old For the edge weights before the update, W obs The observation edge weights are statistically obtained by backtracking a preset number of sleep stage sequences from the current moment, where α is a smoothing coefficient and 0 < α < 1. The preset number is determined based on the physiological rule that the sleep cycle of a normal adult is about ninety minutes long. For example, 180 sleep stage cycles are backtracked, so that the updated edge weights retain the statistical prior of the user's long-term sleep rhythm and adapt to the dynamic changes in recent sleep structure.
[0049] The globally optimal path decoding employs the Viterbi algorithm, combining the probability distribution of each sleep stage with updated edge weights for path searching, and incorporating minimum dwell time constraints and taboo transition penalties. The minimum dwell time constraint is set according to sleep medicine standards: a minimum dwell time of five minutes for N3 deep sleep, a minimum dwell time of ten minutes for REM sleep, and a minimum dwell time of thirty seconds for N1 light sleep. The taboo transition penalty is designed for direct state transitions with extremely low physiological probability. When such taboo transitions occur during path searching, the system adds a penalty coefficient to the logarithmic probability of the transition to reduce the cumulative score of that path.
[0050] The sequence optimization and control module generates bed control commands based on the sleep stage sequence and a preset control mapping table. When N3 deep sleep is detected, the system adjusts the head / foot angle of the bed to a preset stable angle range, or maintains the current angle, and suspends unnecessary adjustments. Unnecessary adjustments refer to bed angle adjustments not actively triggered by the user and not required to maintain the natural curvature of the spine. This stable angle range is exemplarily set to maintain both the head / foot angle between 0 and 5 degrees. Since users are least sensitive to changes in body position during deep sleep, maintaining a stable angle avoids micro-awakening caused by mechanical adjustments, thereby protecting the continuity of deep sleep.
[0051] When REM sleep is detected, the system prohibits any angular adjustments. Because REM sleep is accompanied by a significant decrease in muscle tone and active dreaming, any bed movement may trigger an arousal response through vestibular stimulation; prohibiting adjustments protects the integrity of the REM sleep period.
[0052] When the system detects wakefulness or N1 light sleep, it allows for fine-tuning of the angle at a rate lower than a preset adjustment rate, triggering environmental audio intervention. This preset adjustment rate is set at 0.3 degrees per second, ensuring the angle change is slow enough to not trigger a wakefulness response. The environmental audio intervention uses pink noise or natural sounds with a volume range of 30 to 50 decibels, such as 40 decibels of pink noise. By masking sudden environmental noise and reducing sympathetic nerve excitability, it assists the user in a smooth transition from wakefulness or light sleep.
[0053] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A deep sleep monitoring bed control system based on artificial intelligence, characterized in that, include: The data acquisition module is used to acquire the user's cardiac impaction signal and body pressure distribution signal through a piezoelectric thin film sensor array embedded in the mattress, acquire respiratory audio signal through an audio acquisition unit arranged at the head of the bed, acquire electrooculogram signal through a non-contact electrode embedded in the pillow, and synchronize the cardiac impaction signal, respiratory audio signal and electrooculogram signal in time to generate a multi-channel synchronous data stream. The sleeping posture processing module receives a multi-channel synchronous data stream, identifies the user's current sleeping posture type based on the body pressure distribution signal in the multi-channel synchronous data stream, selects the corresponding effective sensing sub-region from the piezoelectric thin film sensor array based on the current sleeping posture type, and outputs an effective signal identifier containing the effective sensing sub-region. The feature processing module extracts the effective cardiac impact map signal corresponding to the effective sensing sub-region from the multi-channel synchronous data stream based on the effective signal identifier, performs multi-scale feature extraction on the effective cardiac impact map signal, generates macro-feature set and micro-feature set, and calls the preset feature mapping matrix corresponding to the current sleeping position type as a condition, performs sleeping position dependency correction on the micro-feature set, and outputs the corrected micro-feature set. The sleep staging module inputs the macroscopic feature set and the corrected microscopic feature set into the first processing stream based on the Transformer architecture and the second processing stream based on the convolutional neural network, respectively, for feature fusion, and generates the probability distribution of each sleep stage based on the fusion result; The sequence optimization and control module performs global optimal path decoding on the probability distribution based on the directed graph of sleep state transition, outputs the sleep stage sequence, and generates bed control commands based on the sleep stage sequence.
2. The artificial intelligence-based deep sleep monitoring bed control system according to claim 1, characterized in that: The data acquisition module includes: using the sampling clock of the piezoelectric thin film sensor array as a reference clock, resampling or interpolating and aligning the respiratory audio signal and the electrooculogram signal, and setting a synchronization error tolerance threshold; wherein the sampling rate of the cardiac impaction signal is 200-1000Hz, the sampling rate of the respiratory audio signal is 8-48kHz, and the sampling rate of the electrooculogram signal is 100-500Hz; for signals with a sampling rate higher than the reference sampling rate, anti-aliasing filtering is performed first, followed by downsampling; for signals with a sampling rate lower than the reference sampling rate, upsampling is performed through interpolation.
3. The artificial intelligence-based deep sleep monitoring bed control system according to claim 1, characterized in that: The non-contact electrode is a capacitively coupled electrode, including a flexible dielectric layer and a shielding layer. The electrode maintains a non-contact distance from the skin, and the distance meets the signal-to-noise ratio requirements for capacitively coupled signal acquisition. The data acquisition module is also used to separate the electrooculogram signal from the head micro-motion signal through adaptive filtering, and to use the separated head micro-motion signal to remove motion artifacts from the cardiac impact map signal.
4. The artificial intelligence-based deep sleep monitoring bed control system according to claim 1, characterized in that: The sleeping posture processing module is used to: initially determine candidate sub-regions based on the anatomical projection area corresponding to the current sleeping posture type; and calculate the signal-to-noise ratio and signal energy concentration of the internal impact map signal of each candidate sub-region. The sub-region with the highest signal-to-noise ratio exceeding a preset threshold and the highest signal energy concentration is selected as the effective sensing sub-region. When multiple effective sensing sub-regions exist, the corresponding cardiac impaction signals are weighted and fused according to the signal-to-noise ratio weight of each sub-region, where the weighting coefficient w of the i-th effective sensing sub-region is... i Calculate using the following formula: In the formula, The signal-to-noise ratio of the cardiac impact map signal in the i-th effective sensing sub-region is given by M, where M is the number of effective sensing sub-regions; the fused effective cardiac impact map signal... Calculate using the following formula: In the formula, S i The cardiac impact map signal corresponds to the i-th effective sensing sub-region.
5. The artificial intelligence-based deep sleep monitoring bed control system according to claim 4, characterized in that: The feature processing module includes: pre-collecting calibrated cardiac impaction signals under different sleeping positions, extracting microscopic features to form a training sample set; and solving the mapping matrix W through least squares regression. posture and bias vector b posture This minimizes the distribution differences of the mapped micro-features across different sleeping positions; wherein, the operation of the sleeping position dependency correction is expressed as: In the formula, F micro For the set of microscopic features before correction, F corrected This is the corrected set of microscopic features.
6. The artificial intelligence-based deep sleep monitoring bed control system according to claim 5, characterized in that: The macroscopic feature set is input into a first processing stream to obtain a macroscopic feature sequence; the corrected microscopic feature set is input into a second processing stream to obtain a microscopic feature sequence; a sleeping posture condition vector corresponding to the current sleeping posture type is obtained, which is obtained by mapping the current sleeping posture type through a fully connected layer after one-hot encoding; attention weights are calculated using the macroscopic feature sequence as a query vector and the microscopic feature sequence as a key vector and a value vector; wherein, when calculating attention weights, the sleeping posture condition vector and the query vector are concatenated and then subjected to a first linear transformation to obtain a condition query vector, the sleeping posture condition vector and the key vector are concatenated and then subjected to a second linear transformation to obtain a condition key vector, and attention weights are obtained based on the dot product of the condition query vector and the condition key vector; the value vector is weighted and summed using the attention weights to obtain a fusion feature; and the probability distribution of each sleep stage is generated based on the fusion feature.
7. The artificial intelligence-based deep sleep monitoring bed control system according to claim 6, characterized in that: The first processing stream is a sleep posture-conditional Transformer encoder. The sleep posture condition vector is mapped to the scale modulation parameters of each attention head through a fully connected layer. The dot product of the condition query vector and the condition key vector is differentially scaled according to the sleep posture type. When supine, the attention perception range of low-frequency components is expanded to fully capture the periodic structure of the cardiac impact map. When lying on the side, the weight distribution of high-frequency noise-sensitive areas is compressed to suppress baseline drift caused by uneven body pressure. The mapped condition vector is then subjected to a Hadamard product operation with the hidden layer output of the feedforward network to form a sleep posture adaptive gating. The second processing stream is a sleep posture-conditional one-dimensional convolutional neural network. The sleep posture condition vector is broadcast expanded and then concatenated with the input feature maps of each level of convolutional layer along the channel dimension. The response bias of the convolutional kernel is dynamically adjusted according to the sleep posture type. When prone, the gain coefficient of the convolutional channel for high-frequency attenuation details is enhanced to recover the cardiac impact micro-vibration features obscured by body pressure. At the same time, the sleep posture condition vector and the shortcut output are weighted channel by channel in the cross-layer feature transfer path of the residual connection to suppress micro-feature mutations caused by body movement.
8. The artificial intelligence-based deep sleep monitoring bed control system according to claim 1, characterized in that: The sequence optimization and control module includes: updating the edge weights of the directed graph of sleep state transitions online based on the user's historical sleep stage sequence, using the following update formula: In the formula, W old For the edge weights before the update, W obs The observation edge weights are statistically obtained from the sleep stage sequences within a preset number of sleep stage cycles traced back from the current time. α is a smoothing coefficient, and 0 < α < 1. The global optimal path decoding uses the Viterbi algorithm, combining the probability distribution of each sleep stage with the updated edge weights to perform path search, and incorporating minimum dwell time constraints and taboo transition penalties. The sleep stage sequences include wakefulness, N1 light sleep, N2 light sleep, N3 deep sleep, and REM rapid eye movement (REM) sleep.
9. The artificial intelligence-based deep sleep monitoring bed control system according to claim 8, characterized in that: The sequence optimization and control module further includes: generating bed control commands based on the sleep stage sequence and a preset control mapping table; the control mapping table is defined as follows: when N3 deep sleep is detected, the head / foot angle of the bed is adjusted to a preset stable angle range or the current angle is maintained, and unnecessary adjustments are suspended; when REM sleep is detected, any angle adjustment is prohibited; when awakening or N1 light sleep is detected, angle fine-tuning is allowed at a rate lower than the preset adjustment rate, and environmental audio intervention is triggered.
