Intelligent sleep control system based on brain-computer wearable interactive device
Through the intelligent sleep control system of brain-computer wearable devices, the use of time-series distribution probability graph topological neural network and entropy frequency self-matching energy resonance network, combined with transcranial microcurrent stimulation and personalized music, solves the problem of inaccurate sleep monitoring in the existing technology. It solves the problem of poor fall asleep effect and achieves accurate monitoring of sleep status and improvement of sleep quality.
Patent Information
- Application Number
- CN202410005721.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-03
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-01-03
AI Technical Summary
Existing sleep assistance products cannot effectively interact with people and the environment, and are difficult to adapt to the needs of complex scenarios. Moreover, traditional EEG signal monitoring methods cannot fully reflect sleep status and ignore the airspace relationship of EEG signals, resulting in inadequate sleep state monitoring. precise.
An intelligent sleep control system based on brain-computer wearable interactive devices is used to monitor EEG signals in real time through the temporal distribution probability graph topology neural network (SDPG-TNNet) and the entropy frequency self-matching energy resonance network (EFS-MERNet), combined with transcranial microscopy. Current stimulation and personalized music help users quickly enter sleep state and improve sleep quality.
It achieves accurate real-time monitoring and improvement of sleep status, assists users to enter deep sleep through micro-current stimulation and personalized music, improves sleep quality, and solves the problems of inaccurate monitoring and poor sleep-assisting effects of traditional methods.
Smart Images

Figure CN118079185B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent wearable devices, and in particular to an intelligent sleep control system based on brain-computer wearable interactive devices. Background Art
[0002] In the fast-paced modern life, with the intensification of social competition, people are under increasing pressure in work and life, which may lead to psychological problems such as anxiety and depression, thus affecting sleep. Many people have difficulty falling asleep at night, or wake up in the morning feeling exhausted, with less sleep time and poor sleep quality. Low-quality sleep not only affects people's daily life and work, but long-term lack of sleep will also have a serious impact on physical and mental health. Life pressure is one of the main reasons for poor sleep quality; in addition, the popularity of electronic products is also an important reason for the poor sleep quality of modern people; using mobile phones, computers and other electronic products at night will emit blue light, which will inhibit the secretion of melatonin and affect sleep; in addition, irregular work and rest time, improper diet, lack of exercise and other living habits will also lead to poor sleep quality. Poor sleep quality will have a serious impact on people's physical health. Long-term low-quality sleep will lead to decreased immunity and susceptibility to infection. In addition, low-quality sleep may also lead to the occurrence of chronic diseases such as cardiovascular disease, diabetes, and obesity. For children, long-term low-quality sleep will affect their growth and development, and may even lead to learning disabilities and behavioral problems. For adults, long-term poor sleep quality will affect their work efficiency and quality of life.
[0003] For people who have difficulty falling asleep and have poor sleep quality, a method to help them fall asleep quickly and improve their sleep quality is undoubtedly very necessary. Most of the existing sleep aids are passive aids, which reduce light intensity and isolate environmental noise to keep the human body in an undisturbed environment as much as possible, and improve sleep quality through sound aids such as white noise. However, passive sleep aids cannot effectively interact with people and the environment, and are difficult to adapt to the needs of complex scenarios.
[0004] Transcranial microcurrent stimulation is a form of neurostimulation that improves various symptoms by placing electrodes on the scalp to deliver weak currents to the brain. The principle of this therapy is to stimulate neurons in the brain and regulate the brain's electrical activity, thereby affecting the release of neurotransmitters, increasing blood flow to the brain, and enhancing the brain's metabolic function, which helps improve poor sleep quality.
[0005] Traditional sleep monitoring methods, such as blood oxygen, heart rate, breathing and other physiological indicators, carry too little information and cannot fully reflect a person's sleep state. As a macroscopic reflection of the electrophysiological activity of brain nerve cells, EEG signals contain a large amount of physiological information, reflecting the activity state and thinking of the human brain, and are increasingly becoming the preferred method for sleep state monitoring. In addition, EEG signals are easy to collect and have a high time resolution, which provides a basis for real-time sleep state monitoring.
[0006] However, EEG signals are nonlinear, complex, and have low signal-to-noise ratio, which makes it extremely difficult to identify EEG signals. There are two main traditional EEG identification methods: one is manual interpretation, which requires experienced experts to interpret; the other is decoding using machine learning algorithms, which requires manual extraction of EEG features for analysis. All of the above methods require manual operation and inspection, which is not conducive to long-term monitoring and may miss important EEG features due to subjective factors. As the most advanced theory of machine learning, deep learning has a strong advantage in processing complex information and massive data, and has been widely used in the study of EEG signals. Deep learning is an end-to-end learning method that can directly extract and learn deeper intrinsic representations from input signals and classify them. At present, many deep learning model structures have been proposed and applied to the analysis and decoding of EEG signals.
[0007] However, existing deep learning models for sleep monitoring based on EEG signals often only focus on the time-frequency domain of EEG signals, while ignoring their inherent spatial domain relationship, which is extremely unfavorable for monitoring sleep status. Therefore, it is necessary to design a deep learning model that can effectively capture and analyze the rich features of sleep EEG signals to realize sleep status monitoring and achieve rapid sleep assistance through transcranial microcurrent stimulation therapy. Summary of the invention
[0008] The technical problem to be solved by the present invention is to provide an intelligent sleep regulation system based on a brain-computer wearable interactive device. By collecting the user's electroencephalogram signal, a time series distribution probability graph topology neural network SDPG-TNNet is proposed to monitor the user's sleep state in real time. Subsequently, an entropy-frequency self-matching energy resonance network EFS-MERNet is proposed. Through transcranial microcurrent stimulation and personalized music matching technology, the user is helped to quickly enter a sleep state and assist the user to enter a deep sleep state, so as to improve the user's sleep quality.
[0009] The technical solution adopted by the present invention is: an intelligent sleep regulation system based on a brain-computer wearable interactive device, including: an EEG signal conditioning and conversion module, a sleep signal decoding module, and a sleep feedback regulation module. The EEG signal conditioning and conversion module conditions and performs analog / digital conversion on the analog EEG signal of the user's head, converts it into an EEG signal and transmits it to the sleep signal decoding module; the sleep signal decoding module proposes a time series distribution probability graph topology neural network SDPG-TNNet, which decodes the sleep state of the EEG signal in real time, thereby monitoring the sleep state of the user; the sleep feedback regulation module proposes an entropy-frequency self-matching energy resonance network EFS-MERNet, which applies micro-current stimulation to the user or plays personalized music according to the user's sleep state, so as to help the user quickly enter a sleep state, and use personalized music to assist the user to enter a deep sleep state, so as to improve the user's sleep quality.
[0010] The EEG signal conditioning and conversion module includes: EEG electrodes, a multi-channel EEG acquisition module for EEG signal conditioning and analog / digital conversion, a microprocessor unit for controlling the multi-channel EEG acquisition module, and a first power supply module respectively connected to the multi-channel EEG acquisition module and the microprocessor unit.
[0011] The EEG electrode is composed of several low-impedance electrodes covered with a thin layer of Ag / AgCl, and has the characteristics of low DC offset voltage and high signal-to-noise ratio. It is divided into a collection electrode, a reference electrode, and an interference removal electrode. The collection electrode is responsible for monitoring the user's FP1, FP2, F7, and F8 four-channel analog EEG signals, and the distribution of the electrodes follows the 10 / 20 international standard lead; the reference electrode is located at the mastoid behind the left ear and serves as the potential reference point of the collection electrode; the interference removal electrode is located at the mastoid behind the right ear and is used to eliminate common-mode interference introduced by the human body and improve the signal-to-noise ratio of the EEG signal.
[0012] The multi-channel EEG acquisition module integrates multiple low-noise programmable gain amplifiers (PGAs) with high common-mode rejection ratio for amplifying analog EEG signals, a high-precision multi-channel analog-to-digital converter (ADC) for converting analog EEG signals into digital signals, and a right leg drive circuit (RLD) for reducing common-mode interference. The RLD uses an operational amplifier to accumulate the differential input signals of each PGA and compare them with the common-mode voltage reference point, and outputs a reverse voltage signal to the human body through a de-interference electrode to offset the common-mode signal.
[0013] The microprocessor unit is composed of a 32-bit low-power system-on-chip (SoC) chip with GPIO, SPI, I2C, and UART interfaces, and transmits EEG signals to the sleep signal decoding module and the sleep feedback control module through the Bluetooth BLE4.2 protocol;
[0014] The first power supply module is composed of a single rechargeable lithium battery, a charging management module and a group of ultra-low voltage drop linear regulators; further, the capacity of the single rechargeable lithium battery is not less than 2000mAh, and the supply voltage is 3.7-4.2V; the charging management module has constant current / constant voltage charging mode, anti-reverse charging, and automatic recharging functions, and the charging voltage is limited to 5V, providing safe charging guarantee for the single rechargeable lithium battery; the ultra-low voltage drop linear regulator converts the voltage provided by the single rechargeable lithium battery to provide a voltage that meets the power supply requirements.
[0015] The sleep signal decoding module proposes a time series distribution probability graph topological neural network SDPG-TNNet, which is designed for EEG signals during sleep. While retaining the ability to extract the time-frequency and spatial domain features of EEG signals, a time series distribution probability graph is established to extract and fuse topological domain information, and then the graph neural network is used to decode the sleep state of EEG signals in real time, and dynamically monitor the sleep state of the user, including the following steps:
[0016] 1) For the collected EEG signals Slice by time dimension, with a slice length of 5s and no overlap, to obtain a sample set Where S represents the number of samples, C represents the number of EEG channels, and Γ represents the number of data points;
[0017] 2) For each sample It is proposed to construct a topological network representation, and a total of S topological network representations are obtained, which can be expressed as
[0018] The proposed construction of topological network representation includes the following steps:
[0019] (2-1) For a certain sample The sample includes C channels, each channel includes T sampling points, and for each channel Using visualization theory to construct a single-layer complex network, Two points in and If any point between the two points All conditions are met Then it is called and Visible; Loop through All two points in the channel are established A single-layer complex network
[0020] (2-2) Execute step (2-1) for all channels to obtain a single-layer complex network set for each channel Furthermore, the degree distribution of the single-layer complex network of each channel is calculated in The dist_n(x) function calculates the probability density distribution of the sequence x;
[0021] (2-3) Calculate the mutual information between the degree distributions of the single-layer complex network between each channel and construct a The time series distribution probability diagram is calculated as follows: Where i and j represent two channels, P(k i ) and P(k j ) are the time series distribution probability graphs corresponding to channel i and channel j, and the node degree is k i and k j The degree distribution of In the above formula, The median values of channel i and channel k satisfy k respectively i and k j The number of nodes;
[0022] (2-4) The network constructed by (2-3) is a fully connected network. The network sparsity threshold ε is set and the network is sparsely processed to obtain The adjacency matrix of The calculation formula is
[0023] (2-5) For a certain sample Calculate the PSD features of each channel as the feature matrix of the sample Where K is the dimension of PSD feature;
[0024] (2-6) For a certain sample The adjacency matrix and the feature matrix are combined into a topological network representation representing the sample, namely Ω s =(A s ,F s ).
[0025] 3) It is proposed to build a topological learning model based on graph neural network, which takes Ω as input and outputs the sleep quality state corresponding to each sample. Among them Ψ s ∈{deep sleep, light sleep, awake}, L=3 is the number of sleep quality states;
[0026] The proposed time series distribution probability graph topology neural network SDPG-TNNet constructs a topology learning model based on graph neural network, including the following connected in sequence:
[0027] (3-1) A first graph convolution layer with 64 neurons, the formula is GeapConv(X,A)=σ(D -1 / 2 AD -1 / 2 XΘ), where A is the adjacency matrix, X is the feature matrix, and D is the degree matrix of A. is the ELU activation function, Θ is the trainable parameter matrix;
[0028] (3-2) A graph pooling layer, retaining K / 2 nodes, where K is the number of nodes in the first graph convolutional layer;
[0029] (3-3) A second graph convolution layer with 256 neurons;
[0030] (3-4) A clustering readout layer that concatenates the node representations of each graph into a one-dimensional vector and outputs it;
[0031] (3-5) A first linear layer with 64 neurons;
[0032] (3-6) A batch normalization layer is used to accelerate network convergence and prevent overfitting;
[0033] (3-7) A first activation function layer, using the ReLU activation function, ReLU(x) = max(0,x);
[0034] (3-8) A second linear layer with L neurons;
[0035] (3-9) A second activation function layer uses Softmax as the activation function, the formula is
[0036] The proposed time series distribution probability graph topology neural network SDPG-TNNet takes the neuron index corresponding to the maximum value of the second activation function layer output to obtain the sleep quality state Ψ corresponding to each sample s ∈{deep sleep, light sleep, awake}.
[0037] The sleep feedback control module includes: a second power supply module, a microcurrent generating module, an output electrode, an intelligent music feedback module, and a communication module.
[0038] The second power supply module is composed of a battery pack, an isolation voltage stabilization module and a step-down power supply chip; further, the battery pack is composed of 4 rechargeable lithium batteries connected in series, providing a power supply voltage of 14.8V to 16.8V; the isolation voltage stabilization module adopts the UWF1205S-1WR3 module with wide voltage input and constant voltage output produced by MoreSun, providing a 5V output voltage; the step-down power supply chip receives the 5V output voltage from the isolation voltage stabilization module, and provides the 3.3V and 1.8V voltages required for normal operation of the intelligent music feedback module and the communication module.
[0039] The microcurrent generating module is composed of a boost module and a pulse modulation unit; further, the boost module adopts the B1524S-1WR3 module produced by K-Cut Company to pump the voltage provided by the battery pack to 24V; the pulse modulation unit takes the 24V voltage as input, and generates a periodic pulse current at both ends of the output electrode by controlling the opening and closing of the transistor.
[0040] The output electrode is connected to the forehead of the user and uses micro-current stimulation to help sleep.
[0041] The intelligent music feedback module proposes an entropy-frequency self-matching energy resonance network EFS-MERNet through a personalized music matching strategy. The network identifies the frequency band closely related to the EEG signal in the current sleep state, and plays sleep-aiding music of the corresponding frequency band, dynamically adjusts the user's sleep depth, and improves the user's sleep quality; the proposed entropy-frequency self-matching energy resonance network EFS-MERNet includes the following connected in sequence:
[0042] (3-4-1) A multi-scale frequency domain feature extraction module, which includes a number of wavelet decomposition layers connected in sequence. Each wavelet decomposition layer uses db4 wavelet to decompose the EEG signal into two parts: high-frequency signal and low-frequency signal. The high-frequency signal and the low-frequency signal are further decomposed. The decomposition level is 3, and a total of 8 sub-band signals are decomposed;
[0043] (3-4-2) A multi-scale pooling layer uses global average pooling and global maximum pooling operations for the above 8 sub-band signals to obtain the global representation of each sub-band signal Where x represents any sub-band signal, GAP(x) and GMP(x) represent global average pooling and global maximum pooling operations on x respectively;
[0044] (3-4-3) A frequency domain attention layer, the formula is Where Ξ1 and Ξ2 represent two fully connected layers, represents the ELU activation function, Represents the Sigmoid activation function;
[0045] (3-4-4) An information fusion layer, the formula is in Represents the dot product operation, argmax p (x) represents the element number p that makes x reach the maximum value, which means that the signal of the p-th sub-frequency band is closely related to the current sleep state. According to the output p of the information fusion layer, the sleep-aiding music of the corresponding frequency band is selected for playing.
[0046] The communication module receives the EEG signal from the EEG signal conditioning and conversion module and the decoding result of the sleep signal decoding module through the Bluetooth BLE4.2 protocol.
[0047] The use of the intelligent sleep regulation system based on the brain-computer wearable interactive device includes the following steps:
[0048] 1) The user wears the device and ensures that the electrodes are in good contact;
[0049] 2) Every 1 minute, the EEG signal conditioning and conversion module collects 20 seconds of EEG signals, and further obtains the decoding results of the sleep signal decoding module;
[0050] 3) If the decoding result is "awake", the micro-current generation module is driven to apply micro-current stimulation to the user to promote the user to enter a sleep state as soon as possible, and the acquisition process of the EEG signal conditioning and conversion module is suspended at the same time;
[0051] 4) If the decoding result is "shallow sleep", the intelligent music feedback module is driven to play sleep-aiding music according to the EEG signal provided by the EEG signal conditioning and conversion module to promote the user to enter a deep sleep state;
[0052] 5) Return to step 2) until the user stops using the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a block diagram of the composition of the intelligent sleep control system based on the brain-computer wearable interactive device of the present invention;
[0054] Figure 2 It is a block diagram of the EEG signal conditioning and conversion module of the present invention;
[0055] Figure 3 It is a flowchart of the steps of proposing a time series distribution probability graph topology neural network SDPG-TNNet of the present invention;
[0056] Figure 4 It is a flowchart of the steps of constructing a topological network representation according to the present invention;
[0057] Figure 5It is a block diagram of the topological learning model based on graph neural network proposed in the present invention;
[0058] Figure 6 It is a block diagram of the sleep feedback control module of the present invention;
[0059] Figure 7 It is a block diagram of the entropy frequency self-matching energy resonance network EFS-MERNet of the present invention;
[0060] Figure 8 It is a schematic diagram of the use of the intelligent sleep regulation system based on the brain-computer wearable interactive device of the present invention;
[0061] Fig. 9 This is a flowchart of the steps for using the intelligent sleep regulation system based on the brain-computer wearable interactive device of the present invention. DETAILED DESCRIPTION
[0062] The intelligent sleep regulation system based on the brain-computer wearable interactive device of the present invention is described in detail below in conjunction with the embodiments and drawings.
[0063] like Figure 1 As shown, the intelligent sleep control system based on the brain-computer wearable interactive device includes: an EEG signal conditioning and conversion module 1, a sleep signal decoding module 2, and a sleep feedback control module 3. The EEG signal conditioning and conversion module 1 conditions and performs analog / digital conversion on the analog EEG signal of the user's head, converts it into an EEG signal and transmits it to the sleep signal decoding module 2; the sleep signal decoding module 2 proposes a time series distribution probability graph topology neural network SDPG-TNNet, which decodes the sleep state of the EEG signal in real time, and then monitors the sleep state of the user; the sleep feedback control module 3 proposes an entropy-frequency self-matching energy resonance network EFS-MERNet, which applies micro-current stimulation to the user or plays personalized music according to the user's sleep state, so as to help the user quickly enter a sleep state, and use personalized music to assist the user to enter a deep sleep state, so as to improve the user's sleep quality.
[0064] like Figure 2 As shown, the EEG signal conditioning and conversion module 1 includes: an EEG electrode 11, a multi-channel EEG acquisition module 12 for EEG signal conditioning and analog / digital conversion, a microprocessor unit 13 for controlling the multi-channel EEG acquisition module 12, and a first power supply module 14 respectively connected to the multi-channel EEG acquisition module 12 and the microprocessor unit 13.
[0065] The EEG electrode 11 is composed of several low-impedance electrodes covered with a thin layer of Ag / AgCl, and has the characteristics of low DC offset voltage and high signal-to-noise ratio. It is divided into a collection electrode, a reference electrode, and an interference removal electrode. The collection electrode is responsible for monitoring the user's four-channel analog EEG signals FP1, FP2, F7, and F8. The distribution of the electrodes follows the 10 / 20 international standard lead; the reference electrode is located at the mastoid behind the left ear as the potential reference point of the collection electrode; the interference removal electrode is located at the mastoid behind the right ear to eliminate common-mode interference introduced by the human body and improve the signal-to-noise ratio of the EEG signal.
[0066] The multi-channel EEG acquisition module 12 integrates a plurality of low-noise programmable gain amplifiers (PGAs) with high common-mode rejection ratio for amplifying analog EEG signals, a high-precision multi-channel analog-to-digital converter (ADC) for converting analog EEG signals into digital signals, and a right leg drive circuit (RLD) for reducing common-mode interference. The RLD uses an operational amplifier to accumulate the differential input signals of each PGA and compare them with the common-mode voltage reference point, and outputs a reverse voltage signal to the human body through the interference removal electrode to offset the common-mode signal.
[0067] The microprocessor unit 13 is composed of a 32-bit low-power system-on-chip (SoC) chip, and has GPIO, SPI, I2C, and UART interfaces. It transmits the EEG signal to the sleep signal decoding module 2 and the sleep feedback control module 3 through the Bluetooth BLE4.2 protocol;
[0068] The first power supply module 14 is composed of a single rechargeable lithium battery 141, a charging management module 142 and a group of ultra-low voltage drop linear regulators 143; further, the capacity of the single rechargeable lithium battery 141 is not less than 2000mAh, and the supply voltage is 3.7~4.2V; the charging management module 142 has a constant current / constant voltage charging mode, anti-reverse charging, and automatic recharging functions, and the charging voltage is limited to 5V, providing safe charging guarantee for the single rechargeable lithium battery 141; the ultra-low voltage drop linear regulator 143 converts the voltage provided by the single rechargeable lithium battery 141 to provide a voltage that meets the power supply requirements.
[0069] like Figure 3 As shown, the sleep signal decoding module 2 proposes a time series distribution probability graph topological neural network SDPG-TNNet, which is designed for EEG signals during sleep. While retaining the ability to extract time-frequency and spatial domain features of EEG signals, a time series distribution probability graph is established to extract and fuse topological domain information, and then the graph neural network is used to decode the sleep state of EEG signals in real time to dynamically monitor the sleep state of the user, including the following steps:
[0070] 1) For the collected EEG signals Slice by time dimension, with a slice length of 5s and no overlap, to obtain a sample set Where S represents the number of samples, C represents the number of EEG channels, and Γ represents the number of data points;
[0071] 2) For each sample It is proposed to construct a topological network representation, and a total of S topological network representations are obtained, which can be expressed as
[0072] like Figure 4 As shown, the proposed construction of topological network representation includes the following steps:
[0073] (2-1) For a certain sample The sample includes C channels, each channel includes T sampling points, and for each channel Using visualization theory to construct a single-layer complex network, Two points in and If any point between the two points All conditions are met Then it is called and Visible; Loop through All two points in the channel are established A single-layer complex network
[0074] (2-2) Execute step (2-1) for all channels to obtain a single-layer complex network set for each channel Furthermore, the degree distribution of the single-layer complex network of each channel is calculated in The dist_n(x) function calculates the probability density distribution of the sequence x;
[0075] (2-3) Calculate the mutual information between the degree distributions of the single-layer complex network between each channel and construct a The time series distribution probability diagram is calculated as follows: Where i and j represent two channels, P(k i ) and P(k j ) are the time series distribution probability graphs corresponding to channel i and channel j, and the node degree is k i and k j The degree distribution of In the above formula, It means that the median values of channel i and channel j satisfy k i and k j The number of nodes;
[0076] (2-4) The network constructed by (2-3) is a fully connected network. The network sparsity threshold ε is set and the network is sparsely processed to obtain The adjacency matrix of The calculation formula is
[0077] (2-5) For a certain sample Calculate the PSD features of each channel as the feature matrix of the sample Where K is the dimension of PSD feature;
[0078] (2-6) For a certain sample The adjacency matrix and the feature matrix are combined into a topological network representation representing the sample, namely Ω s =(A s ,F s ).
[0079] 3) It is proposed to build a deep learning model based on graph neural network, which takes Ω as input and outputs the sleep quality state corresponding to each sample. Among them Ψ s ∈{deep sleep, light sleep, awake}, L=3 is the number of sleep quality states;
[0080] like Figure 5 As shown, the proposed deep learning model based on graph neural network includes the following connected in sequence:
[0081] (3-1) A first graph convolution layer with 64 neurons, the formula is GraphConv(X,A)=σ(D -1 / 2 AD -1 / 2 XΘ), where A is the adjacency matrix, X is the feature matrix, and D is the degree matrix of A. is the ELU activation function, Θ is the trainable parameter matrix;
[0082] (3-2) A graph pooling layer, retaining K / 2 nodes, where K is the number of nodes in the first graph convolutional layer;
[0083] (3-3) A second graph convolution layer with 256 neurons;
[0084] (3-4) A clustering readout layer that concatenates the node representations of each graph into a one-dimensional vector and outputs it;
[0085] (3-5) A first linear layer with 64 neurons;
[0086] (3-6) A batch normalization layer is used to accelerate network convergence and prevent overfitting;
[0087] (3-7) A first activation function layer, using the ReLU activation function, ReLU(x) = max(0,x);
[0088] (3-8) A second linear layer with L neurons;
[0089] (3-9) A second activation function layer uses Softmax as the activation function, the formula is
[0090] The proposed time series distribution probability graph topology neural network SDPG-TNNet takes the neuron index corresponding to the maximum value of the second activation function layer output to obtain the sleep quality state Ψ corresponding to each sample s ∈{deep sleep, light sleep, awake}.
[0091] like Figure 6 As shown, the sleep feedback control module 3 includes: a second power supply module 31 , a microcurrent generating module 32 , an output electrode 33 , an intelligent music feedback module 34 , and a communication module 35 .
[0092] The second power supply module 31 is composed of a battery pack 311, an isolation voltage regulator module 312 and a step-down power supply chip 313; further, the battery pack 311 is composed of 4 rechargeable lithium batteries connected in series, providing a power supply voltage of 14.8V to 16.8V; the isolation voltage regulator module 312 adopts the UWF1205S-1WR3 module with wide voltage input and constant voltage output produced by MoreSun, providing a 5V output voltage; the step-down power supply chip 313 receives the 5V output voltage from the isolation voltage regulator module 312, and provides the 3.3V and 1.8V voltages required for normal operation of the intelligent music feedback module 34 and the communication module 35.
[0093] The microcurrent generating module 32 is composed of a boost module 321 and a pulse modulation unit 322; further, the boost module 321 adopts the B1524S-1WR3 module produced by K-Cut Company to pump the voltage provided by the battery pack 311 to 24V; the pulse modulation unit 322 takes the 24V voltage as input, and generates a periodic pulse current at both ends of the output electrode 33 by controlling the opening and closing of the transistor.
[0094] The output electrode 33 is connected to the forehead of the user and uses micro-current stimulation to help the user sleep.
[0095] The intelligent music feedback module 34 proposes an entropy-frequency self-matching energy resonance network EFS-MERNet through a personalized music matching strategy. The network identifies the frequency bands closely related to the EEG signals in the current sleep state and plays sleep-aiding music in the corresponding frequency bands to dynamically adjust the user's sleep depth and improve the user's sleep quality.
[0096] like Figure 7 As shown, the proposed entropy frequency self-matching energy resonance network EFS-MERNet includes the following connected in sequence:
[0097] (3-4-1) A multi-scale frequency domain feature extraction module, which includes a number of wavelet decomposition layers connected in sequence. Each wavelet decomposition layer uses db4 wavelet to decompose the EEG signal into two parts: high-frequency signal and low-frequency signal. The high-frequency signal and the low-frequency signal are further decomposed. The decomposition level is 3, and a total of 8 sub-band signals are decomposed;
[0098] (3-4-2) A multi-scale pooling layer uses global average pooling and global maximum pooling operations for the above 8 sub-band signals to obtain the global representation of each sub-band signal Where x represents any sub-band signal, GAP(x) and GMP(x) represent global average pooling and global maximum pooling operations on x respectively;
[0099] (3-4-3) A frequency domain attention layer, the formula is Where Ξ1 and Ξ2 represent two fully connected layers, represents the ELU activation function, Represents the Sigmoid activation function;
[0100] (3-4-4) An information fusion layer, the formula is in Represents the dot product operation, argmax p (x) represents the element number p that makes x reach the maximum value, which means that the signal of the p-th sub-frequency band is closely related to the current sleep state. According to the output p of the information fusion layer, the sleep-aiding music of the corresponding frequency band is selected for playing.
[0101] The communication module 35 receives the EEG signal from the EEG signal conditioning and conversion module 1 and the decoding result of the sleep signal decoding module 2 through the Bluetooth BLE4.2 protocol.
[0102] like Figure 8As shown, as a specific embodiment, the EEG signal conditioning and conversion module 1 and the sleep feedback control module 3 are integrated at the forehead of the headband, the sleep signal decoding module 2 is independent of the headband, and communicates with the EEG signal conditioning and conversion module 1 through the Bluetooth BLE4.2 protocol, and the EEG electrodes 11, the output electrodes 33, and the intelligent music feedback module 34 are placed on the inner surface of the headband.
[0103] like Fig. 9 As shown, the use of the intelligent sleep regulation system based on the brain-computer wearable interactive device includes the following steps:
[0104] 1) The user wears the device and ensures that the electrodes are in good contact;
[0105] 2) Every 1 minute, the EEG signal conditioning and conversion module 1 collects 20 seconds of EEG signals, and further obtains the decoding results of the sleep signal decoding module 2;
[0106] 3) If the decoding result is "awake", the micro-current generating module 32 is driven to apply micro-current stimulation to the user to promote the user to enter a sleeping state as soon as possible, and the collection process of the EEG signal conditioning and conversion module 1 is suspended at the same time;
[0107] 4) If the decoding result is "shallow sleep", the intelligent music feedback module 34 is driven to play sleep-aiding music according to the EEG signal provided by the EEG signal conditioning and conversion module 1, so as to promote the user to enter a deep sleep state;
[0108] 5) Return to step 2) until the user stops using the system.
[0109] It is easy for those skilled in the art to understand that the above description is only the best embodiment of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement and improvement within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent sleep control system based on a brain-computer wearable interactive device, comprising: an electroencephalogram signal conditioning and conversion module (1), a sleep signal decoding module (2) and a sleep feedback control module (3), It is characterized in that The EEG signal conditioning and conversion module (1) conditions and performs analog / digital conversion on the analog EEG signal of the user's head, converts it into an EEG signal and transmits it to the sleep signal decoding module (2); the sleep signal decoding module (2) proposes a time series distribution probability graph topology neural network SDPG-TNNet to decode the sleep state of the EEG signal in real time, thereby monitoring the sleep state of the user; the sleep feedback control module (3) proposes an entropy frequency self-matching energy resonance network EFS-MERNet to apply micro-current stimulation to the user or play personalized music according to the user's sleep state, so as to help the user quickly enter a sleep state, and use personalized music to assist the user to enter a deep sleep state, so as to improve the user's sleep quality; The sleep signal decoding module (2) proposes a time series distribution probability graph topological neural network SDPG-TNNet, which is designed for EEG signals during sleep. While retaining the ability to extract the time-frequency and spatial domain features of EEG signals, a time series distribution probability graph is established to extract and fuse topological domain information, and then the graph neural network is used to decode the sleep state of EEG signals in real time, and dynamically monitor the sleep state of the user, including the following steps: 1) For the collected EEG signals , sliced by time dimension, the slice length is 5s, without overlap, and the sample set is obtained ,in, represents the number of samples, represents the number of EEG channels, represents the number of data points; 2) For each sample , construct the topological network representation, and get A topological network representation is expressed as ; 3) A deep learning model based on graph neural network is proposed. As input, output the sleep quality state corresponding to each sample ,in , is the sleep quality state number; The topological network characterization includes the following steps: 1) For a certain sample , the sample includes C channels, each channel includes T sampling points, for each channel , using the visualization theory to construct a single-layer complex network, for Two points in and , if any point between the two points All conditions are met , then it is called and Visual, loop through All two points in the channel are established A single-layer complex network ; 2) Perform step 1) for all channels to obtain a single-layer complex network set for each channel , further, the degree distribution of the single-layer complex network of each channel is calculated ,in , The function calculates the probability density distribution of the sequence x; 3) Calculate the mutual information between the degree distributions of the single-layer complex network between each channel, and construct a The time series distribution probability diagram is calculated as follows: , where i and j represent two channels, and In the time series distribution probability graph corresponding to channel i and channel j, the node degree is and The degree distribution of , in the above formula, The median values of channel i and channel j satisfy and The number of nodes; 4) The network constructed by step 3) is a fully connected network, and the network sparsity threshold is set , sparse the network and obtain The adjacency matrix of , the calculation formula is ; 5) For a certain sample , calculate the PSD features of each channel as the feature matrix of the sample , where K is the dimension of PSD features; 6) For a certain sample , combining the adjacency matrix and the feature matrix into a topological network representation representing the sample, that is, ; The deep learning model based on graph neural network includes the following connected in sequence: 1) A first convolutional layer with 64 neurons, the formula is , where A is the adjacency matrix, X is the feature matrix, and D is the degree matrix of A. is the ELU activation function, is a trainable parameter matrix; 2) A graph pooling layer, retaining nodes, where K is the number of nodes in the first graph convolutional layer; 3) A second graph convolutional layer with 256 neurons; 4) A clustering readout layer that concatenates the node representations of each graph into a one-dimensional vector and outputs it; 5) A first linear layer with 64 neurons; 6) A batch normalization layer to accelerate network convergence and prevent overfitting; 7) A first activation function layer, using the ReLU activation function, ; 8) A second linear layer with L neurons; 9) A second activation function layer, using Softmax as the activation function, the formula is ; The time series distribution probability graph topology neural network SDPG-TNNet takes the neuron index corresponding to the maximum value of the second activation function layer output to obtain the sleep quality state corresponding to each sample ; The sleep feedback control module (3) comprises: a second power supply module (31), a microcurrent generating module (32), an output electrode (33), an intelligent music feedback module (34), and a communication module (35); the intelligent music feedback module (34) dynamically adjusts the user's sleep depth and improves the user's sleep quality through a personalized music matching strategy; Among them, the music personalized matching strategy proposes an entropy-frequency self-matching energy resonance network EFS-MERNet, which identifies the frequency band closely related to the EEG signal in the current sleep state and plays sleep-aiding music in the corresponding frequency band; the proposed entropy-frequency self-matching energy resonance network EFS-MERNet includes the following connected in sequence: 1) A multi-scale frequency domain feature extraction module, which includes several wavelet decomposition layers connected in sequence. Each wavelet decomposition layer uses db4 wavelet to decompose the EEG signal into two parts: high-frequency signal and low-frequency signal. The high-frequency signal and the low-frequency signal are further decomposed at three levels, and a total of 8 sub-band signals are decomposed; 2) A multi-scale pooling layer uses global average pooling and global maximum pooling operations for the above 8 sub-band signals to obtain the global representation of each sub-band signal , where x represents any sub-band signal, and Respectively represent the global average pooling and global maximum pooling operations on x; 3) A frequency domain attention layer, the formula is ,in and represents two fully connected layers, represents the ELU activation function, Represents the Sigmoid activation function; 4) An information fusion layer, the formula is ,in represents the dot product operation, Indicates the element number that makes x reach the maximum value , which means The sub-band signal is closely related to the current sleep state, according to the output of the information fusion layer. , select the sleep-aiding music of the corresponding frequency band to play.
2. The intelligent sleep control system based on the brain-computer wearable interactive device according to claim 1, It is characterized in that The EEG signal conditioning and conversion module (1) comprises: an EEG electrode (11), a multi-channel EEG acquisition module (12) for EEG signal conditioning and analog / digital conversion, a microprocessor unit (13) for controlling the multi-channel EEG acquisition module (12), and a first power supply module (14) respectively connected to the multi-channel EEG acquisition module (12) and the microprocessor unit (13); wherein: The EEG electrode (11) is composed of several low-impedance electrodes covered with a thin layer of Ag / AgCl, and has the characteristics of low DC offset voltage and high signal-to-noise ratio. It is divided into a collection electrode, a reference electrode, and an interference removal electrode. The collection electrode is responsible for monitoring the user's FP1, FP2, F7, F8 four-channel analog EEG signals, and the distribution of the electrodes follows the 10 / 20 international standard lead; the reference electrode is located at the mastoid behind the left ear and serves as the potential reference point of the collection electrode. The interference removal electrode is located at the mastoid behind the right ear and is used to eliminate common-mode interference introduced by the human body and improve the signal-to-noise ratio of the EEG signal; The multi-channel EEG acquisition module (12) integrates a plurality of low-noise programmable gain amplifiers (PGAs) with high common-mode rejection ratio for amplifying analog EEG signals, a high-precision multi-channel analog-to-digital converter (ADC) for converting analog EEG signals into digital signals, and a right leg drive circuit (RLD) for reducing common-mode interference. The RLD uses an operational amplifier to accumulate the differential input signals of each PGA and compare them with a common-mode voltage reference point, and outputs a reverse voltage signal to the human body through a de-interference electrode to offset the common-mode signal. The microprocessor unit (13) is composed of a 32-bit low-power system-on-chip (SoC) chip, has GPIO, SPI, I2C, and UART interfaces, and transmits the EEG signal to the sleep signal decoding module (2) and the sleep feedback control module (3) via the Bluetooth BLE4.2 protocol; The first power supply module (14) is composed of a single rechargeable lithium battery (141), a charging management module (142) and a group of ultra-low voltage drop linear regulators (143); further, the capacity of the single rechargeable lithium battery (141) is not less than 2000mAh, the power supply voltage is 3.7-4.2V, the charging management module (142) has constant current / constant voltage charging mode, anti-reverse charging, and automatic recharging functions, and the charging voltage is limited to 5V, providing safe charging guarantee for the single rechargeable lithium battery (141), and the ultra-low voltage drop linear regulator (143) converts the voltage provided by the single rechargeable lithium battery (141) to provide a voltage that meets the power supply requirements.
3. The intelligent sleep control system based on the brain-computer wearable interactive device according to claim 1, It is characterized in that The second power supply module (31) is composed of a battery pack (311), an isolation voltage stabilization module (312) and a step-down power supply chip (313); further, the battery pack (311) is composed of rechargeable lithium batteries connected in series, the isolation voltage stabilization module (312) converts the voltage of the battery pack (311) into a 5V output voltage, and the step-down power supply chip (313) receives the 5V output voltage from the isolation voltage stabilization module (312) to provide the communication module (35) with 3.3V and 1.8V voltages required for normal operation; The microcurrent generating module (32) is composed of a boost module (321) and a pulse modulation unit (322); further, the boost module (321) pumps the voltage provided by the battery pack (311) to 24V, and the pulse modulation unit (322) takes the 24V voltage as input and generates a periodic pulse current at both ends of the output electrode (33) by controlling the opening and closing of the triode; The output electrode (33) is connected to the forehead of the user and uses micro-current stimulation to help sleep; The communication module (35) receives the electroencephalogram signal from the electroencephalogram signal conditioning and conversion module (1) and the decoding result of the sleep signal decoding module (2).
4. The intelligent sleep control system based on the brain-computer wearable interactive device according to claim 1, It is characterized in that Using the system involves the following steps: 1) The user wears the device and ensures that the electrodes are in good contact; 2) Every 1 minute, the EEG signal conditioning and conversion module (1) collects 20 seconds of EEG signals, and further obtains the decoding results of the sleep signal decoding module (2); 3) If the decoding result is "awake", the microcurrent generating module (32) is driven to apply microcurrent stimulation to the user to promote the user to enter a sleep state as soon as possible, and at the same time, the collection process of the EEG signal conditioning and conversion module (1) is suspended; 4) If the decoding result is "shallow sleep", the intelligent music feedback module (34) is driven to play sleep-aiding music according to the EEG signal provided by the EEG signal conditioning and conversion module (1), so as to help the user enter a deep sleep state; 5) Return to step 2) until the user stops using the system.
