Transcutaneous acupoint electrical stimulation insomnia closed-loop intervention system and control method
Patent Information
- Application Number
- CN202611013585.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-08
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]现有技术较少将脑电节律、昼夜模式、穴位通道选择、电刺激参数和刺激终止条件组合为同一闭环控制链路,导致干预缺乏个性化、实时性和安全边界
本申请实现了一种能够根据日间疲劳状态和夜间高唤醒状态分别执行差异化刺激的闭环控制系统,实现了“昼夜状态识别—脑电特征计算—穴位通道选择—刺激参数映射—闭环终止”的控制策略,有效解决现有技术中固定参数刺激、昼夜策略不分、刺激过量或无效刺激的问题。
Smart Images

Figure CN122998561A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of neuromodulation, electroencephalogram (EEG) signal processing, transcutaneous acupoint electrical stimulation, sleep intervention, and wearable medical devices, and particularly to a closed-loop intervention system and control method for transcutaneous acupoint electrical stimulation insomnia. Background Technology
[0002] Existing transcutaneous electrical stimulation (TES) devices mostly use a fixed-site stimulation method, typically only preset the frequency, intensity, and duration, and cannot recognize the differences in brain function states of users during different periods, such as daytime drowsiness, nighttime high arousal, and the sleep transition period. Insomnia patients often experience difficulties falling asleep at night as well as daytime fatigue and decreased attention. If the goal is only to "aid sleep," continuing to use sedative stimulation during the day may further reduce alertness; if stimulant stimulation is mistakenly used at night, it may prolong sleep latency.
[0003] Existing technologies rarely combine EEG rhythms, day-night patterns, acupoint selection, electrical stimulation parameters, and stimulation termination conditions into a single closed-loop control chain, resulting in a lack of personalization, real-time capability, and safety boundaries in interventions.
[0004] Therefore, a closed-loop control system is needed that can perform differentiated stimulation based on daytime fatigue and nighttime high arousal levels to address the problems of fixed-parameter stimulation, lack of distinction between day and night strategies, and excessive or ineffective stimulation for insomnia patients. Summary of the Invention
[0005] In order to at least partially address the aforementioned technical problems, this application provides a closed-loop intervention system and control method for insomnia via transcutaneous acupoint electrical stimulation.
[0006] In a first aspect, this application provides a transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia, the transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia comprising: The signal perception and feature calculation module is used to collect the user's multi-channel EEG signals and determine the user's current state label based on the multi-channel EEG signals; the multi-channel EEG signals include EEG signals from the central region, frontal region, and occipital region. The day / night closed-loop decision and control logic module is used to set stimulation parameter packages and map acupoint channel identifiers to each stimulation channel based on the user's current status label, and output channel instructions carrying stimulation parameter packages and acupoint channel identifiers, as well as configuration termination conditions; and The differentiated stimulation execution and safety protection module is used to receive channel instructions, activate the target stimulation channel according to the current day / night mode and acupoint channel identifier, map stimulation parameters to the target stimulation channel according to the stimulation parameter package, and output electrical stimulation in the target stimulation channel according to the mapped stimulation parameters if the termination condition is not reached.
[0007] Secondly, this application provides a control method for the transcutaneous acupoint electrical stimulation insomnia closed-loop intervention system as described above, the control method comprising: The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia collects multichannel electroencephalogram (EEG) signals from users. Determine the user's current status label based on multichannel EEG signals; When the user's current state is labeled as daytime low alertness, control the output of electrical stimulation through the arousal channel. When the user's current status is labeled as a high-awake state at night, control the output of electrical stimulation through the sedation channel.
[0008] The technical solution provided in this application has the following advantages compared with the prior art: This application realizes a closed-loop control system that can perform differentiated stimulation according to daytime fatigue state and nighttime high arousal state. It realizes the control strategy of "day and night state recognition - EEG feature calculation - acupoint channel selection - stimulation parameter mapping - closed-loop termination", which effectively solves the problems of fixed parameter stimulation, lack of distinction between day and night strategies, and excessive or ineffective stimulation in the prior art. Attached Figure Description
[0009] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a block diagram of the transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to various embodiments of this application; Figure 2 These are schematic diagrams of the signal sensing and feature calculation modules in various embodiments of this application; Figure 3 These are schematic diagrams of the day-night closed-loop decision and control logic modules in various embodiments of this application; Figure 4 This is a schematic diagram of the differentiated stimulus execution and security protection module in various embodiments of this application. Specific Implementation It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0013] In the following description, suffixes such as "module," "component," or "unit" used to denote elements are used only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "component," or "unit" can be used interchangeably. The terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. The terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0014] This invention provides a transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia, such as... Figure 1 As shown, this transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia includes: The signal perception and feature calculation module 10 is used to collect the user's multi-channel EEG signals and determine the user's current state label based on the multi-channel EEG signals. The multi-channel EEG signals (which can also be described as multi-channel EEG signals) include EEG signals from the central region, frontal region, and occipital region. The state labels include low daytime alertness, high nighttime arousal, and normal state.
[0015] The day / night closed-loop decision and control logic module 20 is used to set stimulation parameter packages and map acupoint channel identifiers to each stimulation channel according to the user's current status label, and output channel instructions carrying stimulation parameter packages and acupoint channel identifiers, as well as configuration termination conditions; and The differentiated stimulation execution and safety protection module 30 is used to receive channel instructions, activate the target stimulation channel according to the current day / night mode and acupoint channel identifier, map stimulation parameters to the target stimulation channel according to the stimulation parameter package, and output electrical stimulation in the target stimulation channel according to the mapped stimulation parameters if the termination condition is not reached.
[0016] Current stimulation methods for insomnia patients rarely combine brainwave rhythms, day-night patterns, acupoint selection, electrical stimulation parameters, and stimulation termination conditions into a single closed-loop control chain, resulting in a lack of individualization, real-time updates, and safety boundaries in interventions.
[0017] This invention employs a signal sensing and feature calculation module to collect multichannel EEG signals from the user and determine the user's current state label based on the multichannel EEG signals. A day-night closed-loop decision-making and control logic module can set stimulation parameter packages and map acupoint channel identifiers to each stimulation channel according to the user's current state label, and output channel instructions carrying the stimulation parameter packages and acupoint channel identifiers, along with configured termination conditions. A differentiated stimulation execution and safety protection module can receive channel instructions, activate target stimulation channels according to the current day-night mode and acupoint channel identifiers, map stimulation parameters to the target stimulation channels according to the stimulation parameter packages, and output electrical stimulation to the target stimulation channels according to the mapped stimulation parameters if termination conditions are not met. This achieves a closed-loop control system capable of executing differentiated stimulation based on daytime fatigue and nighttime high arousal states, effectively solving the problems of fixed parameter stimulation, lack of distinction between day and night strategies, and excessive or ineffective stimulation.
[0018] The following describes various optional implementations of each module in the system of this invention.
[0019] I. Signal Sensing and Feature Calculation Module Signal sensing and feature calculation modules, such as Figure 2 As shown, this module is used to synchronously acquire, cache, preprocess, extract features, learn feature representations, generate exponents, and preliminarily determine the state of the user / user's multichannel EEG signals, auxiliary physiological signals, time information, individual information, and historical baseline information, providing a basis for state recognition for the day-night closed-loop decision-making and control logic module. This module includes an input acquisition layer / multichannel computer acquisition unit, a signal preprocessing unit, a feature extraction and representation learning unit, an auxiliary feature extraction unit, a feature calculation and exponent generation unit, a threshold comparison and state determination unit, and an output layer.
[0020] The input acquisition layer collects multi-channel EEG signals from the frontal, central, and occipital regions, and simultaneously acquires auxiliary physiological signals such as ECG / heart rate variability, body movement / accelerometer, eye movement, skin conductance, and ambient light intensity. It also obtains system time, day / night cycle, user's sleep schedule, historical baseline, and individual threshold information. The signal preprocessing unit sequentially performs 0.5–45 Hz bandpass filtering, 50 / 60 Hz power frequency suppression, artifact removal, rereference, and 15-minute sliding window segmentation on the EEG signals. The feature extraction and representation learning unit obtains fused feature representations from the preprocessed EEG signals through a spatiotemporal convolutional coding network, autoencoder reconstruction constraints, a temporal modeling network, attention mechanisms, and domain adversarial training. The auxiliary feature extraction unit extracts features from heart rate variability, body movement, eye movement, skin conductance, and ambient light signals, and fuses these features with the EEG features.
[0021] The feature calculation and index generation unit generates the daytime drowsiness index (CDI) and the nighttime high arousal index (HAI) based on frequency band power, spatial features, temporal features, and auxiliary physiological features. The daytime drowsiness index may include the central region θ / β ratio, while the nighttime high arousal index may include the frontal region β / occipital region α ratio. After index generation, the system performs moving average and Kalman filtering on the CDI and HAI, and generates corresponding thresholds based on a personalized baseline. The threshold comparison and state determination unit compares the current index with the individual threshold to determine whether the user is in a state of low daytime alertness, high nighttime arousal, or normal. The output layer outputs timestamps, core indicators, threshold comparison results, auxiliary features, time window information, state labels, and confidence levels in structured data format.
[0022] (a) Input Acquisition Layer 1. Multichannel EEG acquisition unit The input acquisition layer is used to acquire multi-source signals related to the user's diurnal brain function state. These multi-source signals include multichannel EEG signals (also described as multi-channel EEG signals), auxiliary physiological signals, time and individual information, and are written into the raw data buffer. The multichannel EEG acquisition unit (also described as a multi-channel EEG acquisition unit) is used to acquire the user's multichannel EEG signals through preset EEG electrodes. The EEG electrodes are positioned in the frontal, central, and occipital regions to reflect the prefrontal cortex arousal level, central fatigue-related rhythms, and occipital alpha rhythm changes, respectively. Figure 2 The EEG leads shown include Fp1, Fp2, Fz, C3, C4, Pz, O1, and O2. The frontal leads are primarily used to capture beta activity associated with high arousal, anxiety, cognitive load, and difficulty falling asleep; the central leads are primarily used to capture theta and beta activity associated with drowsiness, fatigue, and decreased alertness; and the occipital leads are primarily used to capture alpha activity associated with eye-closing relaxation, visual cortical inhibition, and pre-sleep relaxation.
[0023] Let the first c Each brainwave channel at all times t The original signal is: ; in, C This indicates the number of brainwave channels. Multichannel brainwave signals can be represented as: ; In length T Within the analysis window, the EEG data is displayed as follows: ; The preferred EEG sampling rate is no less than 250 Hz to ensure effective acquisition of the δ, θ, α, β, and low γ frequency bands. Acquisition electrodes can be dry, wet, semi-dry, flexible, or fabric electrodes; the device can be a headband, goggles, cap, or a separate wearable structure.
[0024] 2. Auxiliary physiological signal acquisition unit The auxiliary physiological signal acquisition unit is used to acquire auxiliary physiological signals other than EEG. Figure 2 The auxiliary physiological signals shown include electrocardiogram (ECG) or heart rate variability (HRV) signals, body movement or acceleration signals, eye movement (EOG) signals, electrical skin conductance (EDG) signals, and ambient light intensity. ECG or pulse signals are used to calculate heart rate and HRV to help determine the level of autonomic arousal. Nocturnal hyperarousal is often accompanied by increased heart rate, decreased RMSSD, or increased sympathetic activity; therefore, HRV can serve as auxiliary evidence of nocturnal hyperarousal. Body movement or acceleration signals are used to determine whether the user is at rest, turning over, moving limbs, or in a transitional state to sleep, and can also be used to identify motion artifacts. When a sudden increase in high-frequency energy in EEG is accompanied by a sudden change in acceleration signals, the system can identify this EEG segment as a motion artifact rather than misinterpreting it as cortical hyperarousal. Eye movement signals are used to help identify closed eyes, blinking, slow eye movements, or rapid eye movements (REMs), thereby reducing the risk of misinterpreting relaxed eyelids as drowsiness or eye movement artifacts as frontal EEG activity. Electrical skin conductance signals are used to reflect the level of sympathetic nerve excitation. Elevated skin conductance levels at night, accompanied by enhanced β activity in the frontal lobe, can improve the confidence level of nighttime high arousal detection. Ambient light intensity is used to assist in determining diurnal and pre-sleep environmental states. For example, when the system time is nighttime and the ambient light intensity is below the nighttime threshold, the system can preferentially enter nighttime mode; when the ambient light intensity is high and the time is daytime, the system can preferentially enter daytime mode. Auxiliary physiological signals can be uniformly represented as: ; in, M Indicates the type of auxiliary signal.
[0025] 3. Time and Individual Information Collection Unit The time and individual information collection unit is used to acquire system time, user work and rest patterns, historical baselines, and individual thresholds. Figure 2This section includes system time, day / night mode, user sleep schedule, historical baseline, and individual thresholds. System time is used to determine whether the user is currently in a daytime, nighttime, or sleep-wake transition phase. The user sleep schedule corrects for errors caused by relying solely on a clock, such as for night shift users, nap users, or users with delayed sleep schedules. The historical baseline stores the user's EEG and accessory physiological characteristics in different states, such as daytime wakefulness baseline, daytime fatigue baseline, sleep-wake relaxation baseline, and nighttime sleeplessness baseline. Individual thresholds are used for subsequent state index determination, allowing the system to adapt to the differences in EEG among different users rather than relying on fixed population thresholds. Let the current mode be: ; in, Indicates daytime mode. Indicates night mode. This indicates a transition mode. The system can determine the mode according to the following rules: ; in, This indicates the user's preferred wake-up time. This indicates the user's preferred bedtime. This indicates the duration of the bedtime transition. This rule can be further refined by incorporating ambient light intensity, user-selected parameters, and historical sleep records.
[0026] 4. Raw data caching unit The raw data buffer unit is used to store EEG signals, auxiliary physiological signals, environmental signals, time information, and individual information. Figure 2 This unit corresponds to the Raw Buffer. All acquired data is appended with a uniform timestamp to ensure time alignment of multi-source signals in subsequent processing.
[0027] The system uses a sliding window approach for caching and computation. Let the first... k The sliding windows are: ; in, W This is the window length. Figure 2 The preferred approach is a 15-minute sliding window, used to comprehensively evaluate state trends over a period of time. To ensure real-time performance, this 15-minute window can be further divided into multiple 30-second or 60-second segments for spectrum estimation, artifact removal, and state continuity assessment.
[0028] (ii) Signal preprocessing unit The signal preprocessing unit performs quality control processing on the raw EEG signals obtained from the input acquisition layer to reduce the impact of low-frequency drift, power line interference, eye movement artifacts, electromyography artifacts, motion artifacts, and reference electrode deviation on subsequent feature calculation results. This unit is designed according to... Figure 2The process shown is executed sequentially, including bandpass filtering, power frequency suppression, artifact removal, rereference, and segmentation. After processing by this unit, the system outputs preprocessed multichannel EEG segments and corresponding data quality scores.
[0029] Suppose the input acquisition layer obtains the first c The original EEG signals of each EEG channel are .
[0030] in, , C Indicates the total number of brainwave channels; , n Indicates the discrete sampling point number; N This indicates the total number of sampling points within the current analysis window. If the sampling rate is... Window length is T seconds, then: ,in, This indicates the EEG sampling rate, measured in Hz. T Indicates the window duration in seconds.
[0031] Bandpass filtering is used to remove low-frequency baseline drift and high-frequency noise from EEG signals. Low-frequency baseline drift typically originates from electrode polarization, changes in skin impedance, or slow body movement; high-frequency noise typically originates from electromyographic activity, electronic noise, or external environmental interference. In order to preserve the main EEG rhythms associated with sleep, drowsiness, alertness, and high arousal, the bandpass filtering range is fixed at 0.5–45 Hz in this embodiment.
[0032] The bandpass filtering employs a fourth-order Butterworth zero-phase bandpass filter. Butterworth filters are characterized by a flat passband, making them suitable for EEG signal preprocessing. To avoid phase delay caused by filtering, the system uses a forward-backward filtering method to achieve zero-phase filtering. For the... c The raw EEG signals from each channel, after bandpass filtering, are denoted as: ; in, Indicates the first c The first channel in the n Bandpass filtered signal at each sampling point; This represents a fourth-order Butterworth zero-phase bandpass filter operation from 0.5 to 45 Hz. The amplitude-frequency response of the Butterworth filter can be expressed as: ; in, Indicates the filter at frequency f The square of the magnitude response at that point; fIndicates frequency, measured in Hz; Indicates the cutoff frequency; p This indicates the filter order. In this embodiment... p =4. For a bandpass filter, the system sets the low cutoff frequency to . The high cutoff frequency is .
[0033] in, Used to remove slow-drift signals below 0.5Hz. Used to suppress high-frequency noise above 45Hz.
[0034] Zero-phase bandpass filtering is achieved by performing one forward filter and one reverse filter on the signal. Let the output of the forward filter be: ; in, This represents the intermediate signal after forward filtering; This indicates a 0.5–45Hz bandpass Butterworth filter. Then... Reverse the arrangement, filter again, and then reverse the recovery to obtain: ; in, This indicates that the time series is arranged in reverse order. Through this process, the phase delay introduced by the filter is canceled out, ensuring that the filtered EEG rhythms do not shift in time position.
[0035] Power frequency suppression is used to remove periodic interference caused by the power line to the EEG signal. In this embodiment, power frequency interference is fixed at 50Hz, and a second-order IIR notch filter is used to remove narrowband interference near 50Hz. Since the high cutoff frequency of the bandpass filter in the previous step of this system is 45Hz, the 50Hz component has theoretically been suppressed. However, in actual wearable acquisition environments, filter transition bands, electrode contact instability, and hardware coupling may still cause residual interference near 50Hz. Therefore, this embodiment further incorporates a 50Hz notch filter step after the bandpass filter to enhance the power frequency suppression capability.
[0036] The transfer function of a second-order IIR notch filter is defined as: ; in, This represents the transfer function of the notch filter in the z-domain. Indicates unit sampling delay; This represents the digital angular frequency corresponding to the power frequency to be suppressed. r This represents the pole radius of the notch filter, used to control the notch bandwidth.
[0037] The digital angular frequency is determined by the following formula: ; in, This represents the power frequency, which is fixed at 50Hz in this embodiment; f s This indicates the EEG sampling rate, measured in Hz. (Parameter) r The value range is 0-1; in this embodiment, r is fixed at 0.98. in, r The closer to 1, the narrower the notch band, and the less impact it has on EEG components beyond 50 Hz; r The smaller the value, the wider the notch band. This implementation selects... r =0.98, used to suppress 50 Hz interference while minimizing the impact on the effective EEG frequency band below 45 Hz.
[0038] The signal after bandpass filtering Inputting a notch filter yields the power frequency suppressed signal: ; in, Indicates the first c The first channel in the n The EEG signal after power frequency suppression at each sampling point represents the above-mentioned second-order IIR 50 Hz notch filter operation.
[0039] The corresponding difference equation is: , in, These represent the bandpass filtered signals at the current sampling point, the previous sampling point, and the two previous sampling points, respectively. These represent the notch-filtered signals at the current sampling point, the previous sampling point, and the two previous sampling points, respectively.
[0040] Artifact removal is used to identify and remove non-brain-derived interference components from EEG signals to ensure the reliability of subsequent calculations of frequency band power, spatial features, and temporal features. These non-brain-derived interferences include eye movement artifacts, blinking artifacts, electromyography artifacts, poor electrode contact, and transient amplitude interference. If these artifacts are not removed, they may distort the calculation of the theta, alpha, and beta frequency band powers, thereby affecting the generation of daytime drowsiness indices and nighttime high arousal indices.
[0041] Let the signal of the u-th EEG channel after power frequency suppression be denoted as . Here, u = 1, 2, ..., U represents the EEG channel number, k = 0, 1, ..., K-1 represents the discrete sampling point index, and k represents the EEG signal value of the u-th channel at the k-th sampling point. First, an amplitude anomaly detection is performed on a single sampling point: ; in, Indicates the absolute value of the signal amplitude; This represents the amplitude threshold; when this condition is met, the sampling point is defined as an outlier. An outlier labeling function is introduced: ; in, This indicates an anomaly marker; 1 represents an anomaly point, and 0 represents a normal point; in the time dimension, the signal is divided into several consecutive time periods. Let the first... j The set of sampling points for each time period is: ; in, Indicates the first j A set of sampling points for a given time period. Indicates the starting sampling point for this time period; This indicates the number of sampling points within that time period, the first... j The total number of abnormal sampling points within the time period is: ; in This represents the total number of outliers across all channels within this time period. The total number of sampling points for this time period is: ; in This represents the total number of sampling points during this time period, and the anomaly ratio is defined as: ; in Indicates the first j The proportion of abnormalities within a specific time period. When the condition is met... If the data is not identified as a false trace segment, then that time period is determined to be a false trace segment. For data not identified as false trace segments, their signals are retained for subsequent processing and denoted as... , represents the signal of the u-th channel after artifact removal; Re-reference is used to eliminate reference electrode deviation and common-mode components in multi-channel signals, enabling comparison of signals from each channel under a unified reference standard. Based on this, common averaging reference processing is performed. First, the average value of all channels at the same sampling point is calculated: ; Then perform a rereference for each channel: ; , representing the EEG signal of the u-th channel after rereference; Sliding window segmentation is used to divide continuous EEG signals into data segments of fixed duration for subsequent feature calculation and state determination. Let the duration of the sliding window be... Sampling rate Then the number of sampling points contained in each window is: Let the first The starting sampling point for each window is Then the data in this window is: ; Multichannel windows are represented as follows: Window in fixed increments slide: This ultimately forms a continuous window sequence: Each window serves as the basic input unit for subsequent feature extraction and state calculation.
[0042] (III) Feature Extraction and Representation Learning Unit In this embodiment, the feature extraction and representation learning unit performs feature extraction and fusion representation learning on the multichannel EEG signal and auxiliary physiological signal after quality control processing, respectively, to obtain daytime and nighttime EEG fusion features and auxiliary fusion features. Independent end-to-end high-level feature extraction and fusion representation learning are performed on the EEG signal and auxiliary physiological signal output by the signal preprocessing unit to generate daytime and nighttime EEG fusion features. The EEG signal serves as the main signal, providing core state information; the auxiliary physiological signal serves as supplementary information to improve the accuracy of exponential generation. The two signals are processed independently throughout the unit. Both signals undergo a complete process: preprocessed sliding window segmentation, spatiotemporal convolutional coding network (3D convolution + SE attention), bidirectional long short-term memory network (BiLSTM) temporal modeling, autoencoder reconstruction constraints, QKV attention-weighted fusion, and domain adversarial training.
[0043] Let the EEG signal of the m-th sliding window be: ; Where U represents the total number of brainwave channels, W m,u This represents the EEG sequence of the u-th channel after preprocessing, artifact removal, and rereference. The EEG signal is first input into a spatiotemporal convolutional coding network, which simultaneously extracts spatial, temporal dynamics, and frequency band features of brain regions through three-dimensional convolution, and then weights the channel importance using the SE attention mechanism. ; in, This represents a 3D convolutional encoding operation. These are the trainable parameters of the network. This is a channel attention weighting function. 3D convolution can extract joint patterns across brain regions, such as increased theta waves in the central brain accompanied by enhanced beta waves in the frontal brain, thus reflecting daytime drowsiness or nighttime hyperarousal states.
[0044] The weighted spatiotemporal convolutional features are input into a bidirectional LSTM (BiLSTM) temporal modeling network to extract temporal dynamic features of continuous windows. The BiLSTM network can simultaneously capture forward and backward information of the sequence, thus fully utilizing the temporal context of the EEG signal. Let x be the convolutional feature at the i-th time step. i The hidden state of the forward LSTM is A. i The hidden state of the backward LSTM is A i The current time step output is y. i The computation process of BiLSTM is as follows: ; in, and These represent the cell states of the forward and backward LSTM, respectively. i It involves concatenating bidirectional hidden states, integrating information from the past and future. The gating calculations within BiLSTM are as follows: ; ; ; ; ; ; in, The convolutional feature input corresponding to the current time step, h t In hidden state, c t In cellular state, It is the Sigmoid activation function. This indicates element-wise multiplication. This structure can preserve long sequence dependencies and capture persistent changes in EEG signals across multiple windows.
[0045] The temporal feature sequence output by BiLSTM is then input into an autoencoder for reconstruction constraints: ; The reconstruction loss is: Autoencoder constraints ensure the stability of timing characteristics and reduce noise interference.
[0046] Potential characteristics Enter the QKV attention-weighted fusion module: ; This module can highlight key time steps and feature channels to generate fused feature representations.
[0047] Ultimately, fusion features After domain adversarial training, it has been adapted for both daytime and nighttime domains: ; Output daytime and nighttime EEG fusion features: ; Auxiliary physiological signals Similarly, through a complete process of 3D convolution + SE attention, BiLSTM temporal modeling, autoencoder, QKV attention, and domain adversarial analysis, daytime and nighttime domain-assisted fusion features are obtained: ; The auxiliary fusion features are only used to supplement the EEG fusion features, help determine the user's CDI and HAI, and improve the accuracy of index generation.
[0048] This unit ultimately outputs EEG fusion features and auxiliary fusion features, which are used as inputs for subsequent feature calculation and index generation units to generate daytime drowsiness index and nighttime high arousal index.
[0049] (iv) Feature calculation and index generation, threshold comparison and state determination, output layer In this embodiment, the feature calculation and index generation unit is used to generate the user's daytime drowsiness index (CDI) and nighttime high arousal index (HAI) from the EEG fusion features of the daytime and nighttime domains, respectively. It performs in-depth analysis of the EEG fusion features and auxiliary fusion features to generate the daytime drowsiness index (CDI) and nighttime high arousal index (HAI). The EEG fusion features for each sliding window... Perform bandwidth power calculation, spatial feature calculation, and time series feature calculation; simultaneously, perform auxiliary fusion feature calculation. Calculate auxiliary features such as heart rate variability, body movement, eye movement, skin conductance, and ambient light.
[0050] The frequency band power was calculated using the Welch method for the δ (0.5-4 Hz), θ (4-8 Hz), α (8-13 Hz), β (13-30 Hz), and γ (30-45 Hz) bands. The formula is as follows: ; Among them, X k ( f ) represents the Fourier transform of the k-th sub-segment. N w This represents the number of sampling points within the window. KThis represents the total number of sub-segments. The power of each frequency band in an EEG reflects different brainwave rhythm states; for example, an increased proportion of theta waves may correspond to drowsiness. Increased theta power and decreased beta power in the central region indicate increased drowsiness, fatigue, and decreased alertness. Increased beta power in the frontal region suggests cognitive load, anxiety, high arousal, or difficulty falling asleep; decreased alpha power in the occipital region suggests insufficient pre-sleep relaxation. Spatial feature calculation: Calculated using channel power ratio, relative power, and brain region coherence (PLV). Example formula: ; in, P A , P B For different brain regions, , To measure the synchronicity between brain regions, corresponding to the instantaneous phase of brain regions. Theta activity in the central region is more prominent than in the frontal and occipital regions, or the power ratio and PLV of the central region compared with other brain regions show a drowsiness-related pattern. Beta activity in the frontal region is dominant compared to alpha activity in the occipital region, forming a spatial pattern of "high arousal in the frontal region and insufficient relaxation in the occipital region".
[0051] EEG temporal characteristics calculation includes power change rate Δ P / Δ t Features such as sample entropy and nonlinear complexity, for example: ; Where Δ P It reflects the rate of change of power over time. SampEn For sample entropy, A , B These represent the number of matching template pairs, used to describe signal complexity and regularity. The θ / β ratio does not increase instantaneously, but rather increases continuously over multiple windows; the power change rate, sample entropy, and complexity change are used to determine whether this trend is stable. The frontal β / occipital α ratio remains consistently high within a continuous window, rather than fluctuating randomly.
[0052] Dual index calculation: The user's CDI is determined by the power of the central area θ band and the power of the central area β band, and the user's HAI is determined by the power of the front area β band and the power of the pillow area α band.
[0053] The original daytime drowsiness index (CDI) is primarily based on the central zone θ / β ratio, and its calculation formula is as follows: ; The original nocturnal high arousal index (HAI) is mainly based on the frontal β / occipital α ratio, calculated using the following formula: ; After generating the original CDI and HAI, the state is not determined directly using a single window result. Instead, the original CDI and HAI are smoothed by moving average and Kalman filtering to reduce noise and short-term fluctuations and improve the robustness of dynamic determination.
[0054] in, The power of the central region in the theta band refers to the power of the central region EEG channel within the theta band (4-8Hz). Central zone beta power refers to the power of the central EEG channels within the beta band (13-30Hz). The central zone can correspond to C3, C4, or include central leads such as Cz, C3, and C4. The document also explains that central leads are primarily used to capture theta and beta activity associated with drowsiness, fatigue, and decreased alertness. Therefore, CDI means: the higher the theta power and the lower the beta power in the central zone, the larger the theta / beta ratio, and the stronger the daytime drowsiness.
[0055] This refers to the power of the frontal region β band, which is the power of the frontal region EEG channel within the β band (13-30Hz). HAI refers to the power of the alpha band in the occipital region, which is the power of the EEG channel in the occipital region within the alpha band (8-13Hz). Therefore, the meaning of HAI is: the higher the β in the frontal region and the lower the α in the occipital region, the larger the β / α ratio and the stronger the nocturnal high arousal level.
[0056] Frequency band power calculation is used to obtain the power of each brain region in frequency bands such as θ, α, and β; spatial feature calculation is used to form brain region ratio features based on the power of the above frequency bands, where the daytime sleepiness index CDI takes the central region θ / β ratio as the core, and the nighttime high arousal index HAI takes the frontal region β / occipital region α ratio as the core; temporal feature calculation is used to describe the changing trend of the above power or index in a continuous sliding window, and the stability of index determination is improved by moving average and Kalman filtering.
[0057] Threshold comparison and status determination compare the calculated CDI and HAI with individual thresholds, which are dynamically updated based on the resting baseline (5 minutes of rest) and historical data. The determination rules are as follows: Daytime mode: If CDI ≥ CDI_{threshold} and duration ≥ T1, it is determined as "daytime low alertness"; Night mode: If HAI ≥ HAI_{threshold} and duration ≥ T2, it is determined as "nighttime high wake-up"; If the index is below the threshold, it is considered to be in a "normal state".
[0058] Output layer (JSON structure): Outputs the state determination results, index values, and time information in structured JSON format. Ultimately, the module outputs the index and state determination results of a continuous sliding window, providing a reliable data foundation and state assessment for closed-loop circadian rhythm intervention.
[0059] II. Day and Night Closed-Loop Decision and Control Logic Module Day and night closed-loop decision and control logic module, such as Figure 3 As shown, this module receives the Daytime Drowsiness Index (CDI), Nighttime High Arousal Index (HAI), state labels, state embedding vectors, and auxiliary physiological features output by the signal perception and feature calculation module. Combined with system time, ambient light intensity, and user sleep-wake information, it makes decisions regarding the user's current day-night state, optimizes parameters, and implements closed-loop termination control, providing precise stimulation strategy instructions for the subsequent differentiated stimulation execution module. This module includes a day-night mode determination and individual threshold update unit, a dual-mode finite state machine and parameter optimization unit, and a closed-loop termination detection and output unit.
[0060] The input signals for this module include the daytime drowsiness index from Module 1. Nighttime high wake-up index Status labels and state embedding vector And HRV time-domain features SDNN (standard deviation of RR intervals, in ms), RMSSD (root mean square of the difference between adjacent RR intervals, in ms), HRV frequency-domain features (Low-frequency / high-frequency power ratio) and body movement characteristics (Number of physical movements per unit time) (Amplitude of body movement). The above auxiliary physiological characteristics can be uniformly expressed as: ; The system synchronously obtains the system clock. Ambient light intensity (unit: lux), user's habitual wake-up time 2. Bedtime The time before sleep is used to determine and correct the day / night mode. All input signals are updated synchronously at the end of each time window and a uniform timestamp is added to ensure alignment of multi-source signals.
[0061] (I) Day / Night Pattern Determination and Individual Threshold Update Unit The day / night mode determination and individual threshold update unit is used to determine the current day / night mode and update the individual thresholds in the individual threshold database.
[0062] 1. Day / Night Mode Determination Subunit The day / night mode determination subunit integrates the system clock, ambient light intensity, and user activity information to map the current time period to one of three operating modes: Day mode, Night mode, or Trans mode. The determination result is recorded as follows. : ; in, The system uses a day / night light intensity threshold for detection. When the system enters transition mode, it only allows the output of low-intensity soothing stimuli. In real-world scenarios, to adapt to special situations such as night shifts, naps, or irregular schedules, the system employs a multi-source fusion correction strategy: when the user actively sets the mode through the interactive interface, the user's command has the highest priority; if the system clock determines it is daytime but the ambient light intensity is below a certain threshold... If the historical data shows that the user's actual sleep time is consistently later than [previous time], then the mode will be changed to transition mode; The system automatically postpones the start time of night mode. Update at the end of each time window and broadcast to all downstream units of this module.
[0063] 2. Individual threshold initialization subunit For first-time users, the user's CDI and HAI quantiles are selected from the pre-stored population CDI and HAI distributions; the user's CDI and HAI in the resting state are collected, and the user's CDI and HAI quantiles are corrected using the resting state CDI and HAI to obtain the user's initial individual threshold: ; in, and These are the quantile functions for CDI and HAI in the population, respectively. , The selected quantiles. After initialization, the system requires the user to complete a 5-minute (preset collection time) resting baseline data collection to obtain the individual's daytime sleepiness index at rest. and high nighttime wakefulness index And based on this, the initial threshold is corrected.
[0064] 3. Threshold Online Update Subunit After each stimulus goal is achieved, the individual thresholds in the individual threshold database are updated using an exponentially weighted moving average method, based on the user's average daytime drowsiness index and average nighttime high arousal index. A dynamic threshold is maintained for each user; at the end of each session (i.e., after achieving a stimulus goal), the average daytime drowsiness index under normal conditions during that session is used as the threshold. and the average nighttime high arousal index Incorporate into the update calculation. The daytime drowsiness index threshold and the nighttime high arousal index threshold are updated using an exponentially weighted moving average method: ; in, The learning rate controls the weighting ratio between new and historical data. The system scores the signal quality of each session. right Perform adaptive adjustments: ; When the signal quality is poor, the system reduces To reduce the impact of this update on the threshold, low-quality data is avoided from contaminating individual threshold baselines. All users' historical threshold records are stored in an individual threshold database. Each record includes a timestamp, the updated threshold, signal quality score, and pattern marker. Physicians (or administrators) can view historical threshold curves through a remote monitoring interface and manually correct them when necessary.
[0065] (II) Dual-mode finite state machine and parameter optimization unit The dual-mode finite state machine and parameter optimization unit are used to configure state transition conditions between various control states, constrain the legal domain of parameters for each stimulation channel, set stimulation parameter packages for the user's current state label based on the legal domain of parameters, and map acupoint channel identifiers for each stimulation channel.
[0066] 1. Control State Definition The dual-mode finite state machine comprises a complete closed-loop control state space with five discrete states. The standby state (IDLE) is the default state after system startup or stimulus termination; the system continuously monitors the index but does not output any stimuli. The daytime low-alertness state (DAY_ALERT) is activated when the daytime drowsiness index consistently exceeds the daytime threshold and the current mode is Day. The nighttime high-arousal state (NIGHT_AROUSAL) is activated when the nighttime high-arousal index consistently exceeds the nighttime threshold and the current state is Night (night mode). The stimulus-activated state (STIM_ACTIVE) transitions from DAY_ALERT or NIGHT_AROUSAL, executes the corresponding stimulus strategy, and continuously monitors the closed-loop termination condition. The transition state (TRANS_BUFFER) is activated when the current state is Trans, allowing only low-intensity soothing stimuli to be output.
[0067] 2. State transition conditions The system evaluates the state transition conditions at the end of each time window. The transition from the standby state (IDLE) to the daytime low-alert state (DAY_ALERT) requires the following conditions to be met: ; When HRV frequency domain characteristics When the (low-frequency / high-frequency power ratio) increases and the RMSSD decreases, the system increases the confidence level for nighttime high wake-up determination, which can shorten the duration required for triggering to [missing information]. To accelerate nighttime response, a state-locking mechanism is introduced after the state transition: once the system enters the stimulus-activated state (STIM_ACTIVE), it will not respond to conditions that would return to the standby state (IDLE) within the minimum lock duration, except for safety-limited triggers. In nighttime mode, the system uses software logic locks to refuse to execute stimulus commands with excessive frequencies, preventing accidental triggering of wakefulness-inducing stimuli at night.
[0068] 3. Rule-guided reinforcement learning parameter optimization The parameter optimization layer employs a two-layer nested structure of rule-guided reinforcement learning (RRL) to adaptively optimize the stimulus channel parameters online. The rule layer is responsible for defining the hard constraint parameter boundaries for each state. The legal domain for arousal parameters in the daytime low-alertness state is... , The stimulation intensity does not exceed the motor threshold; the legal range of sedation parameters in a state of high arousal at night is [insert range here]. , The intensity is limited to near the comfort threshold. The rule layer outputs the action vector from the RL layer. Perform a truncation operation: ; in, and The lower and upper bound vectors of the parameters corresponding to the current mode are truncated, and the safety parameters are passed to module three after being double-verified by the software.
[0069] RL layers embed vectors into states As input to the policy network, the Proximal Policy Optimization (PPO) algorithm is used to search for the optimal stimulus parameters within the valid parameter domain. The immediate reward function is defined as: ; in, The change in the target index in the desired direction (in daytime mode) Decrease in night mode (Decrease amount); is an indicator function for user discomfort feedback; For parameter changes in adjacent time steps Norms are used to constrain the adjustment range of parameters; , , The weighting factor is [value]. The objective function for updating the PPO strategy is: ; in, This represents the probability ratio between the old and new strategies. For the estimation of the advantage function, This represents the pruning factor. The optimal parameter combination output by the RL layer, after being truncated by the rule layer, is further converted into specific acupoint channel numbers and waveform control commands by the parameter dynamic mapping subunit. The mapping rule is as follows: ; (III) Closed-loop termination detection and output layer The closed-loop termination detection and output layer is used to output channel instructions carrying acupoint channel identifiers and stimulation parameter packages, as well as configuration termination conditions.
[0070] 1. Terminate detection logic The closed-loop termination detection subunit operates continuously during the STIM_ACTIVE state, monitoring EEG characteristics, auxiliary physiological characteristics, and safety constraints in real time. Termination conditions are divided into goal achievement termination and three-layer safety protection conditions. The three-layer safety protection conditions include preset hardware protection termination conditions, preset software protection termination conditions, and preset user protection termination conditions; safety restriction termination has the highest priority and can be triggered in any mode.
[0071] The main termination condition for the arousal pathway corresponding to a state of low daytime alertness is an exponential decline: ; in, This is the intraday decline coefficient. To ensure a sustained confirmation period for the pullback, both parameters work together to prevent premature termination due to a brief dip in the index. Auxiliary termination conditions include the user's subjective alertness score reaching a target value, and the cumulative duration of a single stimulus reaching the maximum daily stimulus duration. .
[0072] The sedation channel for the high arousal state at night has two main termination conditions. The first is sleep EEG feature detection: the system scans the EEG spectrum in real time within the current time window, detecting the frequency of brief bursts of oscillations (sleep spindles, lasting 0.5-3 seconds) in the 12-15 Hz frequency band. When the number of spindles detected per unit time exceeds a threshold... At this point, it is determined that the user has entered a light sleep stage and termination is triggered. Secondly, the index declines:
[0073] Auxiliary termination conditions include The duration of continuous power increase in the rhythm (4-8Hz) is not less than Body movement counting Duration not less than and HRV frequency domain characteristics It drops below the low wake-up threshold.
[0074] Transition Channel Termination Conditions To switch to Night mode, the user actively stops the session, or the accumulated time reaches [a certain threshold]. Safety-limited termination conditions include skin resistance exceeding the stop threshold. Electrode detachment (impedance change rate) ) and the interval between two consecutive stimuli did not reach the minimum interval. .
[0075] 2. Output layer The output layer integrates the decision results of each unit in this module into a structured instruction package, which is then transmitted in JSON format to the Differentiated Stimulation Execution and Safety Protection Module (Module 3) and the personalized database. The output content includes four categories: stimulation strategy instructions (acupoint channel numbers). ); Stimulus parameter package (safe parameters truncated by the rule layer) (Among them, frequency) Pulse width Amplitude and duty cycle Termination conditions (including trigger type and timestamp); and threshold update instructions (including...) , and signal quality score This is used to trigger write operations to the individual threshold database. One record is output for each time window, and the system continuously generates a sliding window output sequence, providing a real-time and reliable control data flow for the differentiated stimulation execution module, and a complete data archive for treatment effect evaluation and long-term personalized optimization.
[0076] III. Differentiated Stimulus Execution and Safety Protection Module Differentiated stimulus execution and safety protection modules, such as Figure 4 As shown, this module receives stimulation strategy instructions and stimulation parameter packages from the day-night closed-loop decision and control logic module, converts them into physical electrical stimulation outputs targeting the user's acupoints, and implements full-process safety monitoring and protection for the stimulation process. This module includes a stimulation channel configuration and switching unit, a differentiated electrical stimulation output unit, a three-layer safety protection unit, and a user interaction and data recording unit.
[0077] The stimulation channel configuration and switching unit is responsible for independently configuring and rapidly switching between the awakening, sedation, and transition channels based on the day / night mode indicator and acupoint channel number instructions. The differentiated electrical stimulation output unit outputs awakening or sedation transcutaneous electrical stimulation to the corresponding acupoint combinations according to the frequency, pulse width, intensity, and waveform type in the stimulation parameter package, and supports real-time fine-tuning of parameters during stimulation. A three-layer safety protection unit provides comprehensive protection for the stimulation process from hardware, software, and user perspectives, preventing risks such as current overload, parameter exceeding limits, false triggering, and continuous stimulation timeout. The user interaction and data recording unit provides subjective rating storage, discomfort feedback response, and parameter history tracking functions, and writes treatment logs in a structured format to a personalized database for reinforcement learning reward correction and threshold updates.
[0078] (a) Stimulation channel configuration and switching unit 1. Channel structure and independent drive The stimulation channel configuration and switching unit receives channel commands, determines the target stimulation channel based on the current day / night mode and acupoint channel identifier, and activates the target stimulation channel according to preset hardware protection termination conditions. It can manage multiple independent stimulation channels in the system and complete the activation, parameter writing, and switching operations of the corresponding channel based on the acupoint channel number command output by the day / night closed-loop decision and control logic module. The system has at least three independent stimulation channels: an awakening channel (Ch-Day), a sedation channel (Ch-Night), and a transition channel (Ch-Trans). Each of the three channels is driven by its own independent digital-to-analog converter (DAC) and constant current source to ensure no electrical crosstalk between channels and that parameter adjustments in any channel do not affect the output state of the other channels.
[0079] Let the first The output current of each stimulation channel is The constant current source driving this channel satisfies: ; in The maximum output current of the system is hard-limited and is protected by both a hardware fuse and a current-limiting circuit.
[0080] 2. Channel selection logic Channel selection is indicated by day / night mode. The channel selection is determined jointly by the channel number output by the stimulus decision module. Let the channel selection function be:
[0081] At any given time, the system allows only one set of primary stimulation channels to be activated to avoid cross-stimulation effects between acupoint combinations. Upon receiving a switching command, the system must... Complete channel switching within the time period, with the output reset to zero during the switching process.
[0082] 3. Electrode Contact Detection and Channel Enable Before each channel is activated, the system performs a preliminary detection on the skin impedance of the corresponding electrode. Let the detected skin impedance value of the nth channel be , when , the channel is allowed to output; when , the system enters an alarm state and automatically reduces the output power; when , the system refuses to activate the channel and sends an abnormal electrode contact prompt to the user.
[0083] (II) Differentiated Electrical Stimulation Output Unit 1. Arousal-promoting Channel Output The arousal-promoting channel is used to apply arousal-promoting transcutaneous electrical acupoint stimulation to the user under low daytime alertness conditions. The target acupoint combination includes Baihui (GV20), Yintang (GV29), and Neiguan (PC6), which can be extended to Hegu (LI4) or acupoints in the auricular concha region according to implementation requirements. The arousal-promoting channel outputs a continuous square wave or a lightly modulated wave, with a stimulation frequency range of (medium and high frequency band), and a pulse width range of , where the output intensity is set above the sensory threshold and below the motor threshold, so as to produce a distinct sensation without causing muscle contraction.
[0084] The stimulation waveform of the arousal-promoting channel can be expressed as: ; where is the stimulation intensity, is the rectangular function, is the current frequency, is the pulse width. The stimulation intensity is dynamically adjusted within the rule boundaries by the reinforcement learning parameter fine-tuning layer according to the electroencephalogram feedback result during the stimulation process. The stimulation intensity can also be described as the stimulation amplitude.
[0085] 2. Sedation Channel Output The sedation channel is used to apply sedative transcutaneous electrical acupoint stimulation to the user under high nighttime arousal conditions. The target acupoint combination includes Shenmen (HT7), Neiguan (PC6), Sanyinjiao (SP6), and Zhaohai (KI6), which can be extended to the Anmian acupoint or auricular Shenmen acupoint according to implementation requirements. The sedation channel supports two output forms: low-frequency continuous wave and sparse-dense wave, with a stimulation frequency range of (low frequency band), and a pulse width range of , where the output intensity is set near the user's comfortable sensory threshold, aiming to produce a mild and relaxing sensation.
[0086] The sparse-dense wave output adopts a dual-frequency alternating mode, where the main frequency is set to The secondary frequency is The waveform of the rarefaction wave is as follows: ; in This represents the amplitude of the sedative stimulus. The sedation channel uses an intermittent output method, with a rest interval set after each continuous output to avoid decreased adaptation caused by continuous stimulation.
[0087] 3. Transition channel output The transition channel is used to provide low-intensity, soothing stimulation to the user during the pre-sleep transition period. The target acupoint combination primarily focuses on Shenmen (HT7) and Neiguan (PC6), strictly avoiding activation of acupoints related to wakefulness. The transition mode employs low-frequency, low-intensity, and low-duty-cycle output, with a stimulation frequency range of [missing information]. The pulse width range is This is to achieve a smooth transition from a conscious state to a calm state at night.
[0088] 4. Real-time parameter fine-tuning mechanism During the stimulation process, this unit receives real-time parameter update instructions from the closed-loop decision module, adjusting the frequency... Pulse width Amplitude and duty cycle Perform dynamic fine-tuning. Let the parameter vector after the k-th fine-tuning be: ; All parameters undergo a rule-based valid field truncation check before being updated, and are only written to the DAC register after satisfying the constraints. The parameter update frequency is synchronized with the EEG index calculation cycle to ensure that the stimulus output and changes in EEG state maintain a real-time correspondence.
[0089] (III) Three-layer security protection unit First layer: Hardware layer protection Hardware-layer protection provides unbypassable physical safety constraints for the system, operating independently of software logic. It limits output current, adjusts or stops the output power of selected stimulation channels based on monitored skin impedance, and cuts off selected stimulation channels in case of electrode detachment based on monitored impedance abrupt change rate. Hardware-layer protection includes the following mechanisms: (1) Output current hard limit: The system is equipped with a hardware fuse and current limiting circuit at the output end of each stimulation channel to ensure that the output current meets the requirements. The hardware current limiting mechanism does not rely on software instructions and remains effective in the event of any software failure or parameter out-of-bounds error.
[0090] (2) Real-time skin impedance detection: The system detects skin impedance at sampling intervals during stimulation. Continuous monitoring of skin impedance .when When this happens, the system automatically reduces the output power proportionally; when When this occurs, the system immediately stops the output of that channel and triggers an alarm. Impedance detection uses a low-intensity detection signal superposition method; the amplitude of the detection signal is much lower than the amplitude of the stimulus signal, so it has no perceptible impact on the user.
[0091] (3) Electrode detachment detection: The system monitors the impedance change rate. .when If this occurs, it is determined to be an electrode detachment event, and the corresponding channel output is immediately cut off.
[0092] Second layer: Software layer protection Software-layer protection uses logic locks, parameter boundary constraints, and duration limits to block the execution of illegal stimulus commands at the software level.
[0093] (1) Nighttime high-frequency disabled logic lock: When At that time, the system refused to execute the frequency. All stimulation commands are controlled to prevent accidental triggering of high-frequency wake-up stimuli at night. The logic lock takes effect simultaneously during mode switching, and the output is reset to zero during the switching period.
[0094] (2) Single stimulation duration limit: The maximum duration of a single stimulus for each mode is as follows: (Daytime Mode) (Night Mode) and (Transition mode) After the timeout, the system will automatically stop outputting and return to the monitoring status.
[0095] (3) Minimum stimulus interval constraint: There must be at least one interval between two consecutive stimuli. A rest interval is necessary to prevent high-density repetitive stimulation from causing skin irritation or excessive intervention.
[0096] (4) Double check for out-of-bounds errors: Before the parameter instructions output by the reinforcement learning layer are written to the DAC register, they are truncated by the rule layer and then the software module performs a valid field check again to ensure that the parameters written in the end are valid. satisfy: ; Subscript Indicates the current operating mode.
[0097] Third layer: User layer protection User-layer protection provides users with an active intervention interface to receive user intervention commands, enabling users to subjectively intervene in the stimulus process at any time.
[0098] (1) Discomfort Feedback Button: The user can trigger the discomfort feedback button at any time. Upon response, the system will immediately reduce the current stimulus intensity proportionally, or completely stop output if the user continues to press the button. The discomfort feedback event is recorded in the treatment log and used as a penalty term in the reward function of the reinforcement learning layer to update the parameter search strategy for subsequent sessions. ; (2) Intensity level adjustment interface: Users can manually adjust the stimulation intensity within the preset intensity level range through the interactive interface. The adjustment results take effect in real time and are written into the personalized parameter history database.
[0099] (3) Remote monitoring interface (optional): In embodiments with network connectivity, physicians can access treatment logs, parameter history and subjective score records through the authorized interface, and manually correct personalized baseline thresholds when necessary.
[0100] (iv) User interaction and data recording unit 1. Subjective rating collection and database entry The user interaction and data recording unit is used to collect the user's subjective state score after each stimulation session and write it, along with the objective EEG index, stimulation parameters, and termination reason for that session, into a personalized database. The subjective score includes daytime alertness score. and nighttime sleep quality score The rating uses a numerical scale, which is filled out by the user through an interactive interface.
[0101] Subjective ratings and changes in objective indices together form the basis for correcting the reward function of the reinforcement learning layer. Let the total reward after this session be: ; in This represents the net change in the target EEG index during this session. To normalize subjective ratings, This represents the total number of times uncomfortable feedback was triggered during this session. This is a weighting factor.
[0102] 2. Structured output of treatment logs After each session, this unit will write the following information to a structured therapy log (JSON format): session timestamp, day / night mode, activation channel number, historical sequence of stimulation parameters (frequency, pulse width, intensity, waveform type), and EEG index time series (…). or The termination reason type (goal achieved / safety limit / timeout / user-initiated stop), subjective score, and safety event records (number of skin resistance alarms, number of electrode detachment events, number of discomfort feedback triggers).
[0103] The following is an example of a structured output format for treatment logs: { "session_id": " <uuid>", "timestamp_start": " <iso8601>", "timestamp_end": " <iso8601>", "mode": "Night", "channel": "Ch-Night", "stim_params_history": [ {"t": 0.0, "f": <f_n>, "tau": <tau_n>, "A": <A_n>, "waveform": "burst"}, ... ], "eeg_index_history": [ {"t": 0.0, "HAI": <value>}, ... ], "termination_reason": "target_reached", "subjective_score":<S_night> , "safety_events": { "impedance_warnings": 0, "electrode_detach": 0, "discomfort_feedback": 0 } } 3. Personalized database update This unit triggers an update operation on the personalized database after each session, using the subjective score and objective index of the current session to update the Bayesian individual threshold: ; in This represents the average of the target indices during this session. The learning rate is an exponentially weighted moving average, adaptively adjusted based on the signal quality score. The updated results are written back to the individual threshold database for use in threshold comparison and state determination in the next session.
[0104] 4. Parameter history tracking and visualization interface This unit maintains long-term parameter history tracking records for each user, including the average stimulation parameters for each session, EEG index trends, subjective rating trends, and safety event statistics. This historical data can be presented through a visual interface on the device or accompanying application, allowing users and physicians to understand the long-term patterns of intervention effects and providing a basis for decision-making regarding manual adjustments to system parameters.
[0105] Based on the intervention system provided above, in some embodiments, a control method applying the intervention system is also provided, including: The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia collects multichannel electroencephalogram (EEG) signals from users. Determine the user's current status label based on multichannel EEG signals; When the user's current state is labeled as daytime low alertness, control the output of electrical stimulation through the arousal channel. When the user's current status is labeled as a high-awake state at night, control the output of electrical stimulation through the sedation channel.
[0106] The arousal channel uses a 15–50 Hz continuous wave, while the sedation channel uses a 2 Hz low-frequency wave or a 2 / 15 Hz sparse-dense wave.
[0107] The specific control process is shown in the table below.
[0108] Daytime wakefulness mode (wakefulness channel) An elevated drowsiness index; a theta / β ratio exceeding the individual threshold and persisting for a certain period of time. Baihui (GV20), Yintang (GV24), Neiguan (PC6), Hegu (LI4) or the auricle area can be selected. Continuous wave or slightly modulated wave 15–50 Hz; pulse width 150–250 μs; intensity above the sensory threshold and below the motor threshold The drowsiness index decreased; the subjective alertness score increased; and the maximum stimulation duration was reached. Nighttime Sedation Mode (Sedation Channel) An elevated high arousal index; a β / α ratio exceeding a threshold, which may be combined with a decrease in HRV. Shenmen, Neiguan, Sanyinjiao, Zhaohai, and Anmian acupoints can be selected, and Ershenmen can also be chosen. Low-frequency waves or sparse / dense waves; intermittent output 2 Hz, 2 / 15 Hz, or 2 / 100 Hz; pulse width 0.5–1 ms; near the comfort threshold. Characteristics of sleep onset transition, sleep spindles, or a stable low-arousal state may be observed. Transition Protection Mode (Transitional Path) It's close to bedtime but I haven't fallen asleep yet; my brainwave is showing a slightly hyperarousal state. Focus on Shenmen and Neiguan points, avoiding channels that promote awakening. Low-intensity soothing stimulation Low frequency, low intensity, low duty cycle Users can enter night mode or manually stop it.
[0109] Application Example 1: The user wears a headband or separate device integrating EEG electrodes and acupoint stimulation electrodes. The system first records a 5-minute resting baseline to generate an individualized threshold for the user. During daytime work, if the theta / β ratio in the central region continuously exceeds the individual threshold, the system activates the Baihui, Yintang, and Neiguan acupoints to provide arousal stimulation with continuous waves at a medium frequency, and stops after the EEG recovers.
[0110] Application Example 2: The user enters night mode before sleep. The system detects increased beta activity in the frontal region and insufficient alpha rhythm in the occipital region. Combined with a decrease in HRV, it determines a high arousal state and activates acupoints such as Shenmen, Sanyinjiao, Zhaohai, or Anmian, using low-frequency or intermittent sparse-dense wave stimulation. When the system detects a stable increase in sleep spindle waves, theta rhythm, or a decrease in the high arousal index, it automatically stops stimulation to avoid continuous sleep disturbance.
[0111] Application Example 3: System Safety Protection Strategy. When electrode detachment, abnormal skin impedance, stimulation intensity exceeding the set upper limit, accidental triggering of wakefulness parameters at night, or single stimulation exceeding the maximum duration are detected, the stimulation intensity is immediately reduced or the output is stopped.
[0112] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0113] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0114] Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0115] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.< / value> < / uuid>
Claims
1. A closed-loop intervention system for insomnia via transcutaneous acupoint electrical stimulation, characterized in that, The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia includes: The signal perception and feature calculation module is used to collect the user's multi-channel EEG signals and determine the user's current state label based on the multi-channel EEG signals; the multi-channel EEG signals include EEG signals from the central region, frontal region, and occipital region. The day / night closed-loop decision and control logic module is used to set stimulation parameter packages and map acupoint channel identifiers to each stimulation channel based on the user's current status label, and output channel instructions carrying stimulation parameter packages and acupoint channel identifiers, as well as configuration termination conditions; and The differentiated stimulation execution and safety protection module is used to receive channel instructions, activate the target stimulation channel according to the current day / night mode and acupoint channel identifier, map stimulation parameters to the target stimulation channel according to the stimulation parameter package, and output electrical stimulation in the target stimulation channel according to the mapped stimulation parameters if the termination condition is not reached.
2. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 1, characterized in that, The signal sensing and feature calculation module includes: A multi-channel computer acquisition unit is used to acquire the user's multi-channel EEG signals through preset EEG electrodes; A feature extraction and representation learning unit is used to generate daytime and nighttime EEG fusion features based on multichannel EEG signals; The feature calculation and index generation unit is used to generate the user's daytime drowsiness index (CDI) and nighttime high arousal index (HAI) from the EEG fusion features of the daytime and nighttime domains, respectively. The user's CDI is determined by the power of the central theta band and the power of the central beta band, and the user's HAI is determined by the power of the frontal beta band and the power of the occipital alpha band. The threshold comparison and status determination unit is used to determine the user's current status label based on the user's CDI, HAI, and individual thresholds in the individual threshold database; individual thresholds include daytime drowsiness index threshold and nighttime high wakefulness index threshold.
3. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 2, characterized in that, The signal sensing and feature calculation module also includes: An auxiliary physiological signal acquisition unit is used to acquire auxiliary physiological signals; The signal preprocessing unit is used to perform quality control processing on multichannel EEG signals; the quality control processing includes bandpass filtering, power frequency suppression, artifact removal, rereference, and segmentation processing. The feature extraction and representation learning unit is specifically used to perform feature extraction and fusion representation learning on the multichannel EEG signals and auxiliary physiological signals after quality control processing, respectively, to obtain daytime and nighttime EEG fusion features and auxiliary fusion features; the auxiliary fusion features are used to help determine the user's CDI and HAI; the feature extraction and fusion representation learning includes the following processes: spatiotemporal convolutional coding network, bidirectional long short-term memory network temporal modeling, autoencoder reconstruction constraints, QKV attention-weighted fusion, and domain adversarial training.
4. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 1, characterized in that, The day-night closed-loop decision-making and control logic module includes: The day / night mode determination and individual threshold update unit is used to determine the current day / night mode and update the individual thresholds in the individual threshold database. A dual-mode finite state machine and parameter optimization unit are used to configure state transition conditions between various control states, constrain the legal domain of parameters for each stimulation channel, set stimulation parameter packages for the user's current state label based on the legal domain of parameters, and map acupoint channel identifiers for each stimulation channel. The closed-loop termination detection and output layer is used to output channel instructions carrying acupoint channel identifiers and stimulation parameter packages, as well as configuration termination conditions.
5. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 4, characterized in that, The day / night pattern determination and individual threshold update unit includes: The day / night mode determination subunit is used to mark each day / night mode and determine the current day / night mode based on clock information, ambient light intensity, and user activity information; the day / night mode is divided into day mode, night mode, and transition mode; The individual threshold initialization subunit is used to select the user's CDI and HAI quantiles from the pre-stored population CDI and HAI distributions; collect the user's CDI and HAI in the resting state; and correct the user's CDI and HAI quantiles using the resting state CDI and HAI to obtain the user's initial individual threshold; and The threshold online update subunit is used to update the individual threshold in the individual threshold database after each stimulation target is achieved, based on the user's average daytime drowsiness index and average nighttime high arousal index, using an exponentially weighted moving average method. The dual-mode finite state machine and parameter optimization unit include: A dual-mode finite state machine is used to configure state transition conditions between various control states; control states are divided into standby state, stimulus activation state, and user state; user states include daytime low alertness state, nighttime high arousal state, and transition state. The parameter optimization subunit is used to employ a rule-guided reinforcement learning two-layer nested structure to constrain the legal domain of parameters for each stimulus channel through the two-layer nested structure, and to perform action vector truncation operation based on the legal domain of parameters to obtain the stimulus parameter package in front of the user; and is used to map acupoint channel identifiers and day / night modes to each stimulus channel.
6. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 5, characterized in that, The preset termination conditions include preset target achievement termination conditions and three-layer security protection conditions, namely preset hardware protection termination conditions, preset software protection termination conditions, and preset user protection termination conditions. Preset hardware protection termination conditions include skin impedance exceeding the stop threshold, electrode detachment, and output current exceeding the current threshold; Preset software protection termination conditions include disabling logic locks at night, single duration exceeding the duration threshold of each control state, interval between two stimuli being less than the preset interval threshold, and stimuli parameters exceeding the parameter legal domain. Preset user protection termination conditions include user discomfort feedback signals, user adjustment intensity level signals, and user stop signals; The termination conditions for achieving the target include termination conditions for daytime low-alertness state, termination conditions for nighttime high-arousal state, auxiliary termination conditions, and transitional state termination conditions; among which... Based on the preset daytime drowsiness coefficient, the monitored daytime drowsiness index, and the first duration, the conditions for terminating the daytime low alertness state are set. The termination conditions for the nighttime hyperarousal state are set according to the preset sleep EEG characteristic detection and / or according to the preset nighttime fallback coefficient, the monitored nighttime hyperarousal index and the duration of the second continuous stimulation. The auxiliary termination conditions include the duration of body movement counting not being less than a preset body movement duration threshold and the power ratio of low frequency to high frequency in the HRV frequency domain characteristics decreasing to a preset low wake-up threshold. The transition state is terminated when switching to a nighttime high-wake-up state, when the user actively stops the process, or when the cumulative duration reaches a certain threshold.
7. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 1, characterized in that, The differentiated stimulus execution and safety protection module includes: The stimulation channel configuration and switching unit is used to receive channel instructions, determine the target stimulation channel according to the current day / night mode and acupoint channel identifier, and activate the target stimulation channel according to the preset hardware protection termination conditions. A differentiated electrical stimulation output unit is used to map stimulation parameters to a target stimulation channel according to a stimulation parameter package; and to perform electrical stimulation output on the target stimulation channel and the target acupoint corresponding to the target stimulation channel according to the mapped stimulation parameters before termination is reached; the stimulation parameter package includes stimulation frequency, pulse width, stimulation intensity and waveform type; The safety protection unit is used to determine whether the preset termination conditions are met.
8. The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia according to claim 7, characterized in that, The target stimulation channel is one of three independent arousal channels, sedation channels, and transitional channels; The arousal channel is used to deliver electrical stimulation during low alertness during the day. The target acupoints for the arousal channel include Baihui, Yintang, and Neiguan. The waveform output of the touch-awakening channel is a continuous square wave or a modulated wave, which is generated by stimulation intensity, rectangular function, frequency, and pulse width. The sedation channel is used to deliver electrical stimulation during a high arousal state at night. The target acupoints for the sedation channel include Shenmen, Neiguan, Sanyinjiao, and Zhaohai. The waveform type of the output of the sedation channel is low-frequency continuous wave or sparse-dense wave, and the sparse-dense wave output adopts a dual-frequency alternation mode. The transition channel is used to deliver electrical stimulation during the transitional state before sleep. The target acupoints corresponding to the transition channel include Shenmen and Neiguan.
9. A control method for a closed-loop intervention system for transcutaneous acupoint electrical stimulation of insomnia as described in any one of claims 1-8, characterized in that, The control method includes: The transcutaneous acupoint electrical stimulation closed-loop intervention system for insomnia collects multichannel electroencephalogram (EEG) signals from users. Determine the user's current status label based on multichannel EEG signals; When the user's current state is labeled as daytime low alertness, control the output of electrical stimulation through the arousal channel. When the user's current status is labeled as a high-awake state at night, control the output of electrical stimulation through the sedation channel.
10. The control method according to claim 9, characterized in that, The arousal channel uses a 15–50 Hz continuous wave, while the sedation channel uses a 2 Hz low-frequency wave or a 2 / 15 Hz sparse-dense wave.
