A sleep environment control system for the elderly with adaptive adjustment of electroencephalogram state
Patent Information
- Application Number
- CN202611117300.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]因此,本发明提供了一种脑电状态自适应调节的智慧养老睡眠环境控制系统解决睡眠阶段识别不精细和多设备环境控制缺乏闭环个性化调节问题
[0024]本发明有益效果为:本发明通过构建睡眠控制任务、采集多通道脑电信号并进行质量检查和特征提取,能够较准确地获得老年使用者的睡眠阶段判定结果,为环境控制提供可靠依据,通过结合睡眠阶段-环境参数基础映射表、个性化修正表、环境参数限幅和变化速率限制,能够避免温度、光照、声音等环境参数突变,通过多设备协同控制和冲突消解,提高了温控、照明、声学、湿度和空气质量调节的一致性,通过执行反馈和睡眠质量反馈更新个性化修正表,实现了适配老年人睡眠状态变化的闭环调节。
Smart Images

Figure CN122998562A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent environmental control technology, and in particular to a smart elderly care sleep environment control system that adaptively adjusts brain electrical state. Background Technology
[0002] With the development of smart elderly care, wearable sensors, and smart home control technologies, elderly care bedrooms have gradually transformed from traditional artificial care spaces into perceptible, interconnected, and adjustable sleep-assisted environments. Existing elderly care sleep assistance systems typically monitor sleep states and regulate the environment through mattress pressure sensors, body motion sensors, heart rate wristbands, indoor temperature and humidity sensors, smart air conditioners, smart lighting, smart speakers, and fresh air systems. In recent years, the miniaturization of EEG acquisition devices and the development of dry electrode technology have made it possible to collect multi-channel EEG signals during sleep in non-medical settings. Compared to indirect indicators such as body motion and heart rate, EEG signals can more directly reflect changes in sleep stages such as wakefulness, light sleep, deep sleep, and REM sleep, providing a more reliable physiological basis for sleep environment control. Therefore, combining EEG state recognition, environmental parameter perception, and multi-device automatic control has become an important development direction for smart elderly care sleep intervention technology.
[0003] However, existing smart elderly care sleep environment control technologies still have significant shortcomings. First, existing systems mostly rely on body movement, heart rate, or fixed schedules to determine sleep states, only roughly distinguishing between sleep and wakefulness, and struggling to identify light sleep, deep sleep, and REM sleep stages, resulting in a lack of accurate state-based basis for environmental regulation. Second, the sleep structure and EEG performance of the elderly differ from those of ordinary adults. Directly applying a universal sleep staging method can easily lead to unstable identification or stage jumps, causing mis-adjustments to temperature, light, or sound. Third, existing smart air conditioners, lights, acoustic devices, fresh air systems, and humidifiers mostly operate on a single-device logic, lacking unified control target generation, rate-of-change limitation, conflict resolution, and execution feedback mechanisms, potentially causing rapid changes in environmental parameters or interference between device actions. Fourth, existing systems typically lack the ability to continuously adjust based on overall sleep quality, device execution records, and user feedback, making it difficult to develop personalized environmental control strategies for different elderly individuals' sleep preferences and health conditions. Therefore, existing smart elderly care sleep environment control technologies mainly suffer from imprecise sleep stage identification and a lack of closed-loop personalized adjustment in multi-device environmental control. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a smart elderly care sleep environment control system with adaptive adjustment of EEG state to solve the problems of imprecise sleep stage recognition and lack of closed-loop personalized adjustment in multi-device environment control.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] This invention provides a smart elderly care sleep environment control system with adaptive regulation of brain electrical state, comprising:
[0008] The EEG signal acquisition module is configured as a non-invasive dry electrode EEG acquisition device to acquire the user's multi-channel raw EEG signals.
[0009] The signal preprocessing module is used to preprocess multi-channel EEG signals and extract sleep stage features to obtain EEG feature vectors.
[0010] The sleep state recognition module is used to input EEG feature vectors into the sleep staging model for the elderly population to obtain the sleep stage determination results of the user.
[0011] The environmental parameter sensing module is used to collect measured values of bedroom environmental parameters and generate environmental status data.
[0012] The central control module is used to generate stage environmental control targets based on the sleep stage determination results, smooth the stage environmental control targets to obtain the actual control targets, calculate the environmental parameter control deviation based on the actual control targets and environmental state data, and generate a set of multi-device collaborative control instructions.
[0013] The multimodal environment collaborative control module is used to execute a set of collaborative control instructions for multiple devices and return device execution records and environmental status data after control execution to the central control module.
[0014] The personalized learning module is used to update the personalized correction table based on the results of the sleep stage assessment throughout the night, environmental status data, actual control objectives, equipment execution records, and user feedback data.
[0015] As a preferred embodiment of the intelligent elderly care sleep environment control system for adaptive adjustment of EEG state described in this invention, the configuration is a non-invasive dry electrode EEG acquisition device. The device acquires the user's multi-channel raw EEG signals, reads and verifies the user, EEG device, environmental sensors, controllable devices, sleep stage, environmental parameters, mapping table, adjustment range, change restrictions, priority, transition matrix, and personalized initialization rules. After verification, it generates the current sleep control task and personalized correction table, and issues the EEG acquisition task to obtain multi-channel raw EEG signals.
[0016] As a preferred embodiment of the intelligent elderly care sleep environment control system for adaptive adjustment of EEG state described in this invention, the preprocessing of multi-channel EEG signals refers to reading the obtained multi-channel raw EEG signals, EEG analysis window configuration and signal quality inspection rules, dividing the EEG analysis window according to time, and performing frequency band preservation, interference suppression, baseline correction and invalid sampling point marking on each channel signal to obtain preprocessed EEG signals, channel effective coefficients and low-quality channel markings.
[0017] As a preferred embodiment of the intelligent elderly care sleep environment control system for adaptive adjustment of EEG state described in this invention, the step of performing sleep stage feature extraction to obtain EEG feature vector refers to reading preprocessed EEG signals, channel effective coefficients and low-quality channel markers, removing low-quality channels, calculating power spectral density, relative power and aggregated frequency band power features, and extracting power ratio, amplitude envelope, zero-crossing rate and complexity features, forming EEG feature vector and low-quality EEG analysis window markers in a preset order.
[0018] As a preferred embodiment of the intelligent elderly care sleep environment control system with adaptive EEG state regulation described in this invention, the step of inputting EEG feature vectors into the sleep staging model of the elderly population to obtain the user's sleep stage determination result refers to reading the EEG feature vectors and low-quality EEG analysis window markers, constructing a sleep stage input feature sequence for the effective analysis window, inputting it into the sleep staging model of the elderly population to obtain stage probabilities, and then smoothing it by combining the sleep stage set and transition probability matrix to obtain the sleep stage determination result.
[0019] As a preferred embodiment of the smart elderly care sleep environment control system for adaptive regulation of EEG state described in this invention, the step of collecting measured values of bedroom environmental parameters to form environmental state data refers to reading environmental sensor information and environmental parameter sets, collecting bedroom environmental temperature, humidity, light, noise and air quality parameters, timestamping the measured values, checking their validity and aligning them with the control cycle, and using the previous valid value when a valid value is missing in the cycle to form environmental state data.
[0020] As a preferred embodiment of the intelligent elderly care sleep environment control system for adaptive adjustment of EEG state described in this invention, the step of generating stage environment control targets based on sleep stage determination results and smoothing the stage environment control targets to obtain actual control targets refers to reading sleep stage determination results and calling the basic mapping table, personalized correction table, environmental parameter allowable adjustment range and change restriction rules to generate stage environment control targets, and obtaining the actual control targets for the current control cycle through amplitude limiting and change rate limiting processing.
[0021] As a preferred embodiment of the intelligent elderly care sleep environment control system with adaptive adjustment of EEG state described in this invention, the step of calculating the environmental parameter control deviation based on the actual control target and environmental state data, and generating a set of multi-device collaborative control instructions refers to reading the environmental state data and the actual control target, calculating the environmental parameter control deviation, determining the adjustment direction and amplitude of candidate control instructions, matching controllable device information and collaborative priority rules, completing conflict resolution, and generating and issuing a set of multi-device collaborative control instructions.
[0022] As a preferred embodiment of the smart elderly care sleep environment control system for adaptive adjustment of EEG state described in this invention, the step of executing a set of multi-device collaborative control instructions and returning device execution records and environmental state data after control execution to the central control module refers to reading and executing the set of multi-device collaborative control instructions, collecting device execution status and execution records, re-collecting environmental parameters after device response, forming environmental state data after control execution, and calculating the control improvement amount based on the actual control target and environmental state data before and after control, and generating a control correction mark.
[0023] As a preferred embodiment of the intelligent elderly care sleep environment control system with adaptive EEG state adjustment described in this invention, the step of updating the personalized correction table based on the whole night's sleep stage determination results, environmental state data, actual control targets, equipment execution records, and user feedback data refers to reading the whole night's sleep stage determination results, environmental state data, actual control targets, control improvement amount, equipment execution records, and control correction markers after sleep ends, calculating the sleep quality feedback value in combination with subjective feedback, screening effective optimization samples, and updating the personalized correction table.
[0024] The beneficial effects of this invention are as follows: By constructing a sleep control task, collecting multi-channel EEG signals, and performing quality checks and feature extraction, this invention can accurately obtain the sleep stage determination results of elderly users, providing a reliable basis for environmental control. By combining a sleep stage-environmental parameter basic mapping table, a personalized correction table, and environmental parameter amplitude and change rate limits, it can avoid sudden changes in environmental parameters such as temperature, light, and sound. Through multi-device collaborative control and conflict resolution, it improves the consistency of temperature control, lighting, acoustics, humidity, and air quality regulation. By updating the personalized correction table through execution feedback and sleep quality feedback, it achieves closed-loop regulation that adapts to changes in the sleep state of the elderly. Attached Figure Description
[0025] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.
[0026] Figure 1 This is a schematic diagram of a smart elderly care sleep environment control system that adaptively adjusts brain electrical state. Detailed Implementation
[0027] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0028] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0029] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0030] Reference Figure 1 As one embodiment of the present invention, this embodiment provides a smart elderly care sleep environment control system with adaptive regulation of brain electrical state, comprising the following steps:
[0031] S1, EEG signal acquisition module, used to configure a non-invasive dry electrode EEG acquisition device to acquire the user's multi-channel raw EEG signals;
[0032] S1.1: Read and verify the user, EEG device, environmental sensors, controllable devices, sleep stage, environmental parameters, mapping table, adjustment range, change restrictions, priority, transition matrix and personalized initialization rules. After verification, generate the current sleep control task and personalized correction table, and issue the EEG acquisition task to obtain multi-channel raw EEG signals.
[0033] Specifically, the central control unit reads user basic information, bedroom identification, EEG acquisition device information, EEG sampling configuration, EEG analysis window configuration, signal quality check rules, environmental sensor information, controllable environmental device information, device execution feedback interface, sleep stage set, environmental parameter set, sleep stage-environmental parameter basic mapping table, allowable adjustment range of environmental parameters, environmental parameter change restriction rules, device coordination priority rules, sleep stage transition probability matrix, and personalized correction table initialization rules; it performs data consistency verification to confirm the correspondence between EEG acquisition devices and EEG acquisition channels, the correspondence between environmental sensors and environmental parameters, and the correspondence between controllable environmental devices and adjustable environmental parameters, and then updates the sleep stage-environmental parameter basic mapping table and environmental parameter set. The adjustable range of numbers, device coordination priority rules, and sleep stage transition probability matrix are written into the current sleep control task. When the consistency check fails, a device or configuration anomaly flag is generated, and the subsequent sleep environment control process is suspended. A personalized correction table corresponding to the user is generated according to the personalized correction table initialization rules. When a user's historical sleep record exists, the historical correction values of the corresponding sleep stage and environmental parameters are read from the historical sleep record. When no user's historical sleep record exists, the corresponding personalized correction value is initialized to zero. An EEG acquisition task is generated according to the EEG acquisition device information, EEG sampling configuration, and EEG acquisition channel correspondence, and the EEG acquisition task is sent to the EEG signal acquisition module. The EEG signal acquisition module acquires the user's multi-channel raw EEG signals according to the EEG acquisition task.
[0034] It should be noted that the multi-channel raw EEG signal includes the sampling time, channel identifier, EEG potential sampling value, sampling frequency, reference electrode information, and acquisition status information corresponding to each EEG acquisition channel; the EEG potential sampling value is the voltage amplitude sequence obtained by the EEG acquisition device at each sampling time; the acquisition status information includes channel connection status, electrode contact status, and data transmission status.
[0035] The sleep stage set is a set of stage categories used for sleep environment control, including at least the wakefulness stage, light sleep stage, deep sleep stage, and REM sleep stage; the environmental parameter set is a set of parameter categories involved in bedroom environment control, including at least ambient temperature, relative humidity, light intensity, noise level, and air quality parameters.
[0036] The Sleep Stage-Environmental Parameter Basic Mapping Table is used to record the basic target environmental parameters corresponding to different sleep stages. The basic target environmental parameters include the target values or target ranges of ambient temperature, relative humidity, light intensity, noise level, and air quality parameters under each sleep stage. When the basic target environmental parameters are recorded in the form of target ranges, the representative value within the target range is taken as the basic target value, and the target range is used as the boundary for subsequent personalized correction and amplitude limiting processing.
[0037] The adjustable range of environmental parameters is used to limit the upper and lower boundaries that each environmental parameter can reach in the elderly sleep scenario, so as to avoid the stage environmental control target obtained after personalized modification from exceeding the range of human comfort or the safe operation range of equipment.
[0038] Environmental parameter change restriction rules are used to limit the maximum range or allowable rate of change of each environmental parameter within adjacent control cycles, so as to avoid the stimulation of elderly users caused by rapid changes in temperature, light, sound or fresh air.
[0039] The device coordination priority rule is used to determine the execution order when there are conflicts between two or more device control commands. Conflicts include two or more devices acting on the same environmental parameter simultaneously, mutual influence between different environmental parameter adjustment actions, and mutually exclusive device operating modes. The default execution order is temperature control, noise control, light control, humidity control, and air quality control. Temperature control is prioritized to avoid discomfort caused by temperature changes for elderly users; noise control is prioritized to avoid sleep interruption; light control is used for sleep aid and gradual wake-up; humidity control and air quality control are executed without causing sudden temperature or noise changes.
[0040] The sleep stage transition probability matrix is used to record the probability relationship between the previous sleep stage and the candidate sleep stage, and to perform temporal smoothing on the model output during the sleep stage identification process.
[0041] The signal quality inspection rules include at least the following: sampling amplitude inspection, sampling continuity inspection, electrode contact status inspection, artifact marking inspection, and frequency band power calculability inspection. Among them, sampling points with sampling amplitudes exceeding the allowable range of the EEG acquisition device, missing or out-of-order sampling timestamps, abnormal electrode contact status, marked as motion artifacts, electrooculogram artifacts, or electromyogram artifacts, and whose sleep analysis frequency band power cannot be calculated are identified as invalid sampling points.
[0042] S2, Signal preprocessing module, is used to preprocess multi-channel EEG signals and extract sleep stage features to obtain EEG feature vectors;
[0043] S2.1: Read the obtained multi-channel raw EEG signals, EEG analysis window configuration and signal quality inspection rules, divide the EEG analysis window according to time, perform frequency band preservation, interference suppression, baseline correction and invalid sampling point marking for each channel signal, and obtain preprocessed EEG signals, channel effective coefficients and low-quality channel markings.
[0044] Specifically, the EEG analysis window configuration is read, and the multi-channel raw EEG signals are divided into continuous EEG analysis windows according to the acquisition time sequence. For each EEG channel within each EEG analysis window, the EEG signals within the sleep analysis frequency band are retained, and interference from non-sleep analysis frequency bands, power line interference, and baseline drift are suppressed or corrected to obtain preliminary processed EEG signals. Then, according to the signal quality inspection rules, abnormal amplitude sampling points, sampling interruption sampling points, motion artifact sampling points, and electrooculography or electromyography artifact sampling points in the preliminary processed EEG signals are marked as invalid sampling points. Sampling points that are not marked and meet the continuous sampling requirements are determined as valid sampling points to obtain preprocessed EEG signals. The channel effectiveness coefficient is calculated, and when a certain EEG channel has no valid sampling points in the current EEG analysis window, or the channel effectiveness coefficient is lower than the preset channel effectiveness coefficient lower limit, the EEG channel is marked as a low-quality channel.
[0045] The formula for calculating the channel effectiveness coefficient is:
[0046]
[0047] In the formula, It is the channel efficiency coefficient. It is the number of valid sampling points checked through signal quality inspection. This corresponds to the total number of sampling points within the EEG analysis window.
[0048] It should be noted that the lower limit of the preset channel effective coefficient is set according to the proportion of effective sampling points within the EEG analysis window, with a typical value range of [0.6~0.9] and a preferred value of 0.8.
[0049] S2.2: Read the preprocessed EEG signal, channel effective coefficients and low-quality channel labels, remove low-quality channels, calculate power spectral density, relative power and aggregated band power features, and extract power ratio, amplitude envelope, zero-crossing rate and complexity features, and form EEG feature vectors and low-quality EEG analysis window labels in a preset order.
[0050] Specifically, the preprocessed EEG signals, channel effectiveness coefficients, and low-quality channel markers are read. Low-quality channels that do not participate in the feature extraction of the current EEG analysis window are removed to determine the effective channel set. The power spectral density of the preprocessed EEG signals of each channel in the effective channel set is calculated using the Fast Fourier Transform (FFT) power spectral estimation method. According to a preset set of sleep-related frequency bands, the frequency band power of each effective channel in each sleep-related frequency band is calculated, and the relative power of the target frequency band is calculated. The relative power of each effective channel is aggregated using the channel effectiveness coefficients to obtain the aggregated frequency band power characteristics. Based on the aggregated frequency band power characteristics... The system calculates the sleep depth-to-power ratio and sleep-wake ratio features, and generates aggregated EEG time-series signals based on preprocessed EEG signals and channel effective coefficients within the effective channel set. It obtains the signal amplitude envelope feature according to the average absolute amplitude of the aggregated EEG time-series signal; obtains the zero-crossing rate feature according to the ratio of the number of sign changes between adjacent sampling points to the number of sampling points; calculates the EEG complexity feature using sample entropy; and concatenates the features according to a preset feature order to form an EEG feature vector. When the effective channel set is empty or the total frequency band power for sleep analysis is unavailable, the corresponding EEG analysis window is marked as a low-quality EEG analysis window.
[0051] The formula for calculating the relative power of the target frequency band is:
[0052]
[0053] In the formula, It is the first The brainwave channel in the first The first EEG analysis window The relative power of each sleep-related frequency band, It is the power spectral density. It is the first Several sleep-related frequency bands It is the total frequency band for sleep analysis.
[0054] The formula for calculating the power characteristics of the aggregated frequency band is:
[0055]
[0056] In the formula, It is the first The first EEG analysis window The aggregated frequency band power characteristics of sleep-related frequency bands, Is participating in the A set of effective channels for feature extraction from EEG analysis windows.
[0057] The formulas for calculating the sleep depth-power ratio and sleep-wake discriminant ratio are as follows:
[0058]
[0059]
[0060] In the formula, It is the first Sleep depth power ratio characteristics of each EEG analysis window It is the first Sleep-wake discriminant ratio characteristics of a single EEG analysis window , , , They are Wave, Wave, Wave, The power characteristics of the aggregation band corresponding to the wave. It is a very small positive number that prevents the denominator from being zero.
[0061] The formula for calculating aggregated EEG timing signals is:
[0062]
[0063] In the formula, It is the first The first EEG analysis window Aggregated EEG temporal signals from each sampling point It is the first The brainwave channel in the first The first EEG analysis window Preprocessed EEG signals from each sampling point.
[0064] The formulas for calculating the signal amplitude envelope characteristic and zero-crossing rate characteristic are as follows:
[0065]
[0066]
[0067] In the formula, It is the signal amplitude envelope characteristic. It is a zero-crossing rate characteristic. It is the first The number of sampling points within each EEG analysis window It is an indicator function that takes the value 1 when the condition inside the parentheses is true, and 0 otherwise.
[0068] The EEG feature vector is:
[0069]
[0070] In the formula, It is an EEG feature vector. yes The power characteristics of the aggregation band corresponding to the wave. It is a characteristic of EEG complexity.
[0071] It should be noted that the sleep-related frequency band set is used to define the frequency band range required for EEG feature extraction, and includes at least the following: Wave, Wave, Wave, wave and Wave corresponding frequency band;
[0072] Preset feature order according to Wave aggregation band power characteristics Wave aggregation band power characteristics Wave aggregation band power characteristics Wave aggregation band power characteristics The signal is formed by sequentially splicing together the power characteristics of the converged frequency band, the power ratio of sleep depth, the sleep-wake discrimination ratio, the signal amplitude envelope, the zero-crossing rate, and the EEG complexity characteristics.
[0073] S3, Sleep State Recognition Module, is used to input EEG feature vectors into the sleep staging model for the elderly population to obtain the sleep stage determination results of the user.
[0074] S3.1: Read the EEG feature vector and low-quality EEG analysis window markers, construct the sleep stage input feature sequence for the effective analysis window, input it into the sleep stage model of the elderly population to obtain the stage probability, and then combine it with the sleep stage set and transition probability matrix for smoothing to obtain the sleep stage determination result.
[0075] Specifically, the system reads EEG feature vectors and low-quality EEG analysis window labels. For EEG analysis windows not labeled as low-quality, it reads the EEG feature vectors corresponding to the current EEG analysis window and the preceding adjacent valid EEG analysis windows in chronological order to form a sleep staging input feature sequence. This sleep staging input feature sequence is then input into the elderly population sleep staging model, outputting the stage probability of the current EEG analysis window belonging to each candidate sleep stage. The system also reads the sleep stage set, sleep stage transition probability matrix, and the sleep stage determination result of the previous valid EEG analysis window, performing temporal smoothing on the stage probabilities to obtain the sleep stage determination result of the current EEG analysis window. When the current EEG analysis window is labeled as a low-quality EEG analysis window, the current model output result is not used, and the sleep stage determination result of the previous valid EEG analysis window is adopted. When there is no previous valid EEG analysis window, the current sleep stage determination result is set to the initial sleep stage or an unknown state, and a basic comfort environment maintenance strategy is executed.
[0076] The formula for calculating the stage probability is:
[0077]
[0078] In the formula, It is the first Each EEG analysis window belongs to a candidate sleep stage. The stage probability, This is the first output of the sleep staging model for the elderly population. Each EEG analysis window corresponds to a candidate sleep stage. Category score, It is a collection of sleep stages. It is any candidate sleep stage in the set of sleep stages.
[0079] The sleep stage determination results are as follows:
[0080]
[0081] In the formula, It is the first Sleep stage determination results from one EEG analysis window. It is a collection of sleep stages. This is the sleep stage determination result from the previous effective EEG analysis window. It is the probability matrix of sleep stage transitions from the previous sleep stage to the candidate sleep stage. The probability of.
[0082] It should be noted that the sleep staging model for the elderly population is a sleep stage classification model trained based on labeled sleep EEG data of the elderly population. As one implementation method, the sleep staging model for the elderly population adopts a time-frequency dual-stream attention network, including a time-stream branch for extracting EEG temporal waveform features, a frequency-stream branch for extracting frequency band power distribution features, an attention fusion layer for fusing temporal and frequency domain features, a temporal context modeling layer for characterizing the stage transition relationship between adjacent EEG analysis windows, and a classification output layer. The classification output layer outputs the classification score corresponding to each candidate sleep stage, and obtains the stage probability through normalization processing.
[0083] The basic comfort environment maintenance strategy refers to the central control unit not implementing environmental adjustments that switch with the sleep stage when it cannot obtain effective sleep stage determination results, but only maintaining the environmental temperature, relative humidity, light, noise and air quality parameters according to the basic comfort goals in the elderly sleep scenario.
[0084] S4, Environmental Parameter Sensing Module, is used to collect measured values of bedroom environmental parameters and form environmental status data;
[0085] S4.1: Read environmental sensor information and environmental parameter set, collect bedroom environmental temperature, humidity, light, noise and air quality parameters, timestamp the measured values, check their validity and align them with the control cycle. When a valid value is missing in the cycle, the previous valid value is used to form environmental status data.
[0086] Specifically, the system reads environmental sensor information and environmental parameter sets, and collects measured values of ambient temperature, relative humidity, light intensity, noise level, and air quality parameters in the bedroom according to the correspondence between environmental sensors and environmental parameters. The collected measured values are timestamped and sensor validity is checked, and invalid measured values of environmental parameters with offline sensors, missing sampling, or abnormal sampling are discarded. Based on the start and end times of the current control cycle, the measured values of environmental parameters falling within the current control cycle are aggregated. When there are more than two valid measured values for the same environmental parameter within the current control cycle, the representative value within that cycle is used as the measured value for the current control cycle. When there are no valid measured values within the current control cycle, the measured values of the environmental parameters from the previous valid control cycle are used, and an environmental parameter reuse flag is generated. Based on the measured values, collection times, sensor identifiers, and validity flags corresponding to each environmental parameter, environmental status data is formed.
[0087] S5, the central control module, is used to generate stage environmental control targets based on the sleep stage determination results, smooth the stage environmental control targets to obtain the actual control targets, calculate the environmental parameter control deviation based on the actual control targets and environmental state data, and generate a set of multi-device collaborative control instructions.
[0088] S5.1: Read the sleep stage determination result, call the basic mapping table, personalized correction table, environmental parameter adjustment range and change restriction rules, generate the stage environmental control target, and obtain the actual control target of the current control cycle through amplitude and change rate restriction processing.
[0089] Specifically, the process involves reading the sleep stage determination result, calling the sleep stage-environmental parameter basic mapping table to determine the basic target environmental parameters corresponding to the current sleep stage. When the basic target environmental parameters are recorded in the form of target ranges, a representative value within the target range is selected as the basic target value. The process also involves reading the personalized correction table to obtain the user's personalized correction values for the corresponding environmental parameters under the current sleep stage. If no corresponding personalized correction value exists in the personalized correction table, the corresponding personalized correction value is set to zero. The basic target environmental parameters and personalized correction values are then combined to generate the stage environmental control target. The allowable adjustment range of the environmental parameters is read, and the stage environmental control target is limited. When the stage environmental control target exceeds the allowable adjustment range, it is corrected to the corresponding allowable adjustment range. Finally, the environmental parameter change restriction rules are read, and the rate of change of the limited stage environmental control target is restricted to obtain the actual control target.
[0090] The formula for calculating the phased environmental control target is:
[0091]
[0092] In the formula, It is the first Within the first control cycle, the first Phase-specific environmental control objectives for environmental parameters. It is the sleep stage Next The basic target value of the class environment parameter, User During sleep Next Personalized correction values for class environment parameters.
[0093] The formula for calculating the actual control target is:
[0094]
[0095]
[0096] In the formula, It is the first Within the first control cycle, the first The actual control objective of environmental parameters is... It is the variable after amplitude limiting. It is the first in the previous control cycle The actual control objective of environmental parameters is... It is the first The allowable rate of change of environmental parameters. It controls the duration of the cycle. It is Limited to to between, and They are the first The lower and upper limits of adjustable environment parameters.
[0097] It should be noted that, Based on the reporting frequency of environmental sensors, the response time of environmental devices, and the sensitivity of elderly users to environmental changes, the typical value range is 30s to 5min, with a preferred value of 1min.
[0098] and The settings are based on the comfort requirements of elderly care bedrooms, the adjustable range of equipment, and the user's health records.
[0099] S5.2: Read environmental status data and actual control objectives, calculate environmental parameter control deviations, determine the adjustment direction and magnitude of candidate control commands, match controllable device information and collaborative priority rules, complete conflict resolution, and generate and issue a set of multi-device collaborative control commands.
[0100] Specifically, the system reads environmental status data and actual control targets, compares the measured values of current environmental parameters with the corresponding actual control targets item by item, and calculates the environmental parameter control deviation. Based on the environmental parameter control deviation, it determines the adjustment direction and magnitude of candidate control commands. For target-approaching environmental parameters such as temperature, humidity, and light intensity, when the environmental parameter control deviation indicates that the environmental parameter is less than the actual control target, a candidate control command to increase the corresponding environmental parameter is generated; when the environmental parameter control deviation indicates that the environmental parameter is greater than the actual control target, a candidate control command to decrease the corresponding environmental parameter is generated; when the environmental parameter control deviation is within the allowable control deviation range of the corresponding environmental parameter, a candidate control command to maintain the equipment status is generated. For noise levels, ... For environmental parameters with upper limit constraints, such as concentration and TVOC concentration, when the environmental parameter control deviation indicates that the measured value of the environmental parameter exceeds the actual control target, a candidate control command to reduce the corresponding environmental parameter is generated; when the environmental parameter control deviation indicates that the measured value of the environmental parameter does not exceed the actual control target, a candidate control command to maintain the equipment status is generated. The adjustment range of the candidate control command is determined according to the absolute value of the environmental parameter control deviation; the larger the absolute value of the environmental parameter control deviation, the larger the adjustment range of the corresponding candidate control command. When the absolute value of the environmental parameter control deviation is within the allowable control deviation range, the intensity of equipment action is not increased. The controllable environmental equipment information is read, the candidate control command is matched to the corresponding controllable environmental equipment, and the equipment action command is generated according to the equipment capability status, adjustable range, and execution feedback interface. The equipment coordination priority rules are further read, and conflict detection is performed on the candidate equipment action commands. When there are two or more equipment action commands acting on the same environmental parameter, different environmental parameter adjustment actions affecting each other, or equipment operation modes mutually exclusive, conflict resolution is performed according to the equipment coordination priority rules, generating a set of multi-equipment coordinated control commands and issuing them.
[0101] The formula for calculating the environmental parameter control deviation is:
[0102]
[0103] In the formula, It is the first Within the first control cycle, the first Control deviation of environmental parameters It is the actual control target. These are measured values of environmental parameters.
[0104] S6, Multimodal Environment Collaborative Control Module, is used to execute a set of collaborative control instructions for multiple devices and return device execution records and environmental status data after control execution to the central control module;
[0105] S6.1: Read and execute the set of multi-device collaborative control instructions, collect the device execution status and execution records, re-collect environmental parameters after the device responds, form environmental status data after control execution, and calculate the control improvement amount based on the actual control target and the environmental status data before and after control, and generate control correction markers.
[0106] Specifically, after the device action reaches the device response time, or at the end of the current control cycle, the measured values of bedroom environmental parameters are collected again to form environmental state data after control execution. The actual control target, environmental state data before control execution, and environmental state data after control execution are read to calculate the control improvement amount. Based on the control improvement amount and the device execution status, a closed-loop correction result is generated. When the control improvement amount indicates a reduction in control deviation, the current device action direction is recorded as the effective control direction. When the control improvement amount indicates no reduction in control deviation, or the device execution status indicates control failure, execution timeout, or device unavailability, the central control unit generates a control correction flag for the next control cycle and reduces the intensity of the corresponding device action, switches to alternative devices, or enters the basic comfort environment maintenance strategy.
[0107] The formula for calculating the control improvement amount is:
[0108]
[0109] In the formula, It is the first Within the first control cycle, the first The amount of improvement in the control of environmental parameters, It is the actual control target. These are the measured values of environmental parameters before control execution. These are the measured values of environmental parameters after the control is executed.
[0110] It should be noted that, regarding noise levels, For environmental parameters such as concentration and TVOC concentration, which are mainly controlled above the upper limit, the improvement amount can also be calculated by the difference between the excess amount before and after control.
[0111] S7, Personalized Learning Module, is used to update the personalized correction table based on the results of the sleep stage assessment throughout the night, environmental status data, actual control objectives, device execution records, and user feedback data.
[0112] S7.1: After sleep ends, read the sleep stage judgment results, environmental status data, actual control targets, control improvement amount, equipment execution records and control correction marks for the whole night, calculate the sleep quality feedback value in combination with subjective feedback, screen effective optimization samples, and update the personalized correction table.
[0113] Specifically, after sleep ends, the system reads the sleep stage assessment results, environmental status data, actual control targets, control improvement amounts, equipment execution records, and control correction markers for the entire night. It also reads the user's subjective feedback score to generate sleep quality feedback data. Based on the sleep stage assessment results, it calculates the total bed rest time, total sleep duration, number of post-sleep wakefulness analysis windows, total number of sleep period analysis windows, and total deep sleep duration. It also calculates sleep efficiency, post-sleep wakefulness percentage, and the original deep sleep achievement coefficient. When normalizing the original deep sleep achievement coefficient, it limits the value to the range of 0 to 1 to obtain the deep sleep achievement coefficient, and then calculates... Sleep quality feedback values; according to sleep stages and environmental parameters, historical sleep quality feedback values, actual control targets, environmental status data, control improvement amounts, and equipment execution records are collected, and the sleep quality feedback value of the current sleep cycle is compared with the recent sleep quality benchmark value of the same user; when the sleep quality feedback value of the current sleep cycle is higher than the recent sleep quality benchmark value, and no abnormal awakening is triggered and the equipment execution is stable, the corresponding sleep cycle is determined as a valid optimization sample; based on the valid optimization sample, personalized target environmental parameters for each environmental parameter under the corresponding sleep stage are determined, and the personalized correction table is updated.
[0114] The formulas for calculating sleep efficiency, the percentage of awakenings after falling asleep, and the original coefficient for achieving deep sleep are as follows:
[0115]
[0116]
[0117]
[0118] In the formula, It is the first Nighttime sleep efficiency It is the first Total nighttime sleep duration It is the first Total bed rest time at night It is the first The percentage of people who wake up after going to bed late It is the first The number of windows for analysis after staying up late. It is the first Total number of late sleep analysis windows It is the first Deep sleep at night achieves the original coefficient. It is the first Total duration of late-night sleep User The corresponding reference duration for deep sleep.
[0119] The formula for calculating sleep quality feedback value is:
[0120]
[0121] In the formula, It is the first Nighttime sleep quality feedback score It is the deep sleep achievement coefficient. It is a normalized subjective feedback score, obtained by the ratio of the user's subjective feedback score to the maximum score.
[0122] The personalized correction table has been updated as follows:
[0123]
[0124] In the formula, It is the updated user During sleep Next Personalized correction values for class environment parameters, These are the personalized target environment parameters obtained through screening. These are the basic target environmental parameters.
[0125] In summary, this invention enables the system to generate environmental control targets based on the actual sleep state of elderly users by performing quality checks, feature extraction, and sleep stage identification on multi-channel EEG signals. This avoids misadjustments caused by relying solely on timed or motion detection. By limiting the amplitude and rate of change of environmental targets and resolving conflicts between multiple devices, the system achieves more stable and coordinated regulation of temperature, light, noise, humidity, and air quality. Furthermore, by continuously updating the personalized correction table through execution feedback and sleep quality feedback, the sleep environment control can gradually adapt to the sleep preferences and state changes of different elderly individuals.
[0126] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A smart elderly care sleep environment control system with adaptive regulation of brain electrical state, characterized in that, include: The EEG signal acquisition module is configured as a non-invasive dry electrode EEG acquisition device to acquire the user's multi-channel raw EEG signals. The signal preprocessing module is used to preprocess multi-channel EEG signals and extract sleep stage features to obtain EEG feature vectors. The sleep state recognition module is used to input EEG feature vectors into the sleep staging model for the elderly population to obtain the sleep stage determination results of the user. The environmental parameter sensing module is used to collect measured values of bedroom environmental parameters and generate environmental status data. The central control module is used to generate stage environmental control targets based on the sleep stage determination results, smooth the stage environmental control targets to obtain the actual control targets, calculate the environmental parameter control deviation based on the actual control targets and environmental state data, and generate a set of multi-device collaborative control instructions. The multimodal environment collaborative control module is used to execute a set of collaborative control instructions for multiple devices and return device execution records and environmental status data after control execution to the central control module. The personalized learning module is used to update the personalized correction table based on the results of the sleep stage assessment throughout the night, environmental status data, actual control objectives, equipment execution records, and user feedback data.
2. The intelligent elderly care sleep environment control system with adaptive adjustment of EEG state as described in claim 1, characterized in that, The configuration is a non-invasive dry electrode EEG acquisition device. It acquires the user's multi-channel raw EEG signals by reading and verifying the user, EEG device, environmental sensors, controllable devices, sleep stage, environmental parameters, mapping table, adjustment range, change restrictions, priority, transition matrix and personalized initialization rules. After the verification is passed, the current sleep control task and personalized correction table are generated, and the EEG acquisition task is issued to obtain multi-channel raw EEG signals.
3. The intelligent elderly care sleep environment control system with adaptive adjustment of EEG state as described in claim 2, characterized in that, The preprocessing of multi-channel EEG signals refers to reading the obtained multi-channel raw EEG signals, EEG analysis window configuration and signal quality inspection rules, dividing the EEG analysis window according to time, and performing frequency band preservation, interference suppression, baseline correction and invalid sampling point marking on each channel signal to obtain preprocessed EEG signals, channel effective coefficients and low-quality channel markings.
4. The intelligent elderly care sleep environment control system with adaptive adjustment of EEG state as described in claim 3, characterized in that, The process of extracting sleep stage features involves reading preprocessed EEG signals, channel effective coefficients, and low-quality channel markers. After removing low-quality channels, the power spectral density, relative power, and aggregated frequency band power features are calculated. Power ratio, amplitude envelope, zero-crossing rate, and complexity features are extracted and formed into EEG feature vectors and low-quality EEG analysis window markers in a preset order.
5. A smart elderly care sleep environment control system with adaptive adjustment of brainwave state as described in claim 4, characterized in that, The step of inputting EEG feature vectors into the sleep staging model for the elderly population to obtain the sleep stage determination result of the user refers to reading the EEG feature vectors and low-quality EEG analysis window markers, constructing a sleep staging input feature sequence for the effective analysis window, inputting it into the sleep staging model for the elderly population to obtain the stage probability, and then smoothing it by combining the sleep stage set and transition probability matrix to obtain the sleep stage determination result.
6. The intelligent elderly care sleep environment control system with adaptive adjustment of EEG state as described in claim 5, characterized in that, The process of collecting measured values of bedroom environmental parameters to form environmental status data involves reading environmental sensor information and environmental parameter sets, collecting bedroom environmental temperature, humidity, light, noise, and air quality parameters, timestamping the measured values, checking their validity, and aligning them with control cycles. When a valid value is missing within a cycle, the previous valid value is used to form environmental status data.
7. A smart elderly care sleep environment control system with adaptive adjustment of brainwave state as described in claim 6, characterized in that, The process involves generating stage environmental control targets based on sleep stage determination results, smoothing these targets, and obtaining the actual control target. This process reads the sleep stage determination results and calls the basic mapping table, personalized correction table, environmental parameter adjustment range, and change restriction rules to generate stage environmental control targets. The actual control target for the current control cycle is then obtained through amplitude and rate-of-change restriction processing.
8. A smart elderly care sleep environment control system with adaptive adjustment of brain electrical state as described in claim 7, characterized in that, The step of calculating the environmental parameter control deviation based on the actual control target and environmental status data, and generating a set of multi-device collaborative control instructions, refers to reading the environmental status data and actual control target, calculating the environmental parameter control deviation, determining the adjustment direction and magnitude of candidate control instructions, matching controllable device information and collaborative priority rules, completing conflict resolution, and generating and issuing a set of multi-device collaborative control instructions.
9. A smart elderly care sleep environment control system with adaptive adjustment of brainwave state as described in claim 8, characterized in that, The process of executing a set of multi-device collaborative control instructions and returning device execution records and environmental status data after control execution to the central control module refers to reading and executing the set of multi-device collaborative control instructions, collecting device execution status and execution records, re-collecting environmental parameters after device response, forming environmental status data after control execution, and calculating the control improvement amount based on the actual control target and environmental status data before and after control, and generating control correction markers.
10. A smart elderly care sleep environment control system with adaptive adjustment of brainwave state as described in claim 9, characterized in that, The process of updating the personalized correction table based on the results of the entire night's sleep stage assessment, environmental status data, actual control targets, equipment execution records, and user feedback data refers to reading the results of the entire night's sleep stage assessment, environmental status data, actual control targets, control improvement amount, equipment execution records, and control correction markers after the sleep period ends, calculating the sleep quality feedback value in conjunction with subjective feedback, screening effective optimization samples, and updating the personalized correction table.
