Brain-controlled massage chair system based on wavelet transform, phase-space reconstruction and deep learning
By using single -channel brain electrical signal acquisition, adjustable Q factor wave transformation and phase space reconstruction, and attention -based multi -scale hybrid convolutional neural network, multi -channel device The problem of inconvenience and the complexity of signal processing realizes high -precision user needs recognition and personalized massage services.
Patent Information
- Application Number
- CN202411439515.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-15
AI Technical Summary
In the prior art, multi-channel EEG acquisition equipment is inconvenient to wear, which increases the complexity and redundancy of signal processing, and processing only certain bands will reduce the classification accuracy. The traditional method has cumbersome calculations and incomplete characteristics, resulting in Poor classification performance.
Adopt a brain control chair system based on small wave transformation, phase space reconstruction and deep learning, collect EEG signals through single -channel brain electrical signal collection modules. The signal processing module includes pre -processing, decomposition and reconstruction, and deep learning classification units. The adjustable Q factor small wave transformation and phase space reconstruction of the signal analysis of the signal is analyzed, combined with the attention based on a multi -scale hybrid convolutional neural network for feature extraction and classification.
Achieve more portable equipment design, reduce the redundancy and computing complexity of the signal, improve the response speed of the massage chair to the user's control instructions, enhance the accuracy and model performance of the classification, provide highly personalized and intelligentization Health service.
Smart Images

Figure CN119377569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram signal processing, and more specifically, to a brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning. Background Art
[0002] At present, people's demand for healthy living is constantly increasing. Massage chairs are very popular as a way to relieve physical fatigue and reduce stress, and their market demand is growing. At present, massage chairs in my country are mainly limited to manual control and voice input control. The traditional manual control method requires users to operate through buttons or remote controls, which may seem cumbersome and interrupt the experience for users who are already in a relaxed state. Although voice input control provides a certain degree of convenience, it is still limited by the accuracy of voice recognition and the interference of environmental noise. These control methods cannot meet the personalized needs and instant adjustment requirements of users.
[0003] In the current environment, the public patent document with application number CN201910004126.9 collects EEG data from 11 electrodes, and analyzes the EEG data under the current massage through the signal processing module, and compares it with the personal database to obtain the comfort level under this massage intensity to achieve control of the massage chair. The public patent document with application number CN202410093155.8 determines the user's fatigue by analyzing the frequency and power of alpha and theta waves in the collected EEG (EEG) signals, and selectively massages and plays audio according to the fatigue.
[0004] Although the control method of the above-mentioned prior art basically meets some of the personalized needs and instant adjustment requirements of the user, it still has the following defects: multi-channel EEG acquisition equipment will cause inconvenience in wearing, and increase the redundancy of the collected EEG signals and the complexity of signal processing, and only processing certain bands in the EEG signals will reduce the accuracy of classification. Since EEG signals are essentially highly random, nonlinear, non-stationary and non-Gaussian signals, the existing EEG signal processing method of the massage chair based on EEG signal control does not fully consider the time and spectrum characteristics of the EEG signal. And because EEG signals are usually corrupted by various eye and muscle artifacts, the traditional method based on manual feature extraction is cumbersome to calculate and the extracted features are not comprehensive, and the classification performance is poor. For this reason, the present invention proposes a brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning. Summary of the invention
[0005] In order to overcome the problems in the prior art that multi-channel EEG acquisition equipment is inconvenient to wear and increases the redundancy of the collected EEG signals and the complexity of signal processing, and that only processing certain bands in the EEG signals will reduce the accuracy of classification, the existing EEG signal processing method of massage chairs based on EEG signal control does not fully consider the time and spectral characteristics of EEG signals, and the traditional method based on manual feature extraction is cumbersome to calculate and the extracted features are incomplete, resulting in poor classification performance. A brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning is provided.
[0006] To achieve the above object, the technical solution of the present invention is as follows:
[0007] The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning includes: a single-channel EEG signal acquisition module, a signal processing module, a control module and a massage module;
[0008] The single-channel EEG signal acquisition module acquires the user's EEG signal;
[0009] The signal processing module receives and processes the EEG signal, and the signal processing module includes a preprocessing denoising unit, a decomposition and reconstruction unit, a deep learning classification unit and a user database storage unit. The preprocessing denoising unit performs preprocessing denoising on the EEG signal, and the decomposition and reconstruction unit performs multi-layer wavelet decomposition on the preprocessed denoised EEG signal through an adjustable Q factor wavelet transform and reconstructs the decomposed signal in phase space to obtain a phase space matrix. The deep learning classification unit includes an attention-based multi-scale hybrid convolutional neural network model, and the attention-based multi-scale hybrid convolutional neural network model uses the phase space matrix as input and uses the classification result of the user's feedback intention as output;
[0010] The user database storage unit stores the classification results and related EEG signal data, and the classification results and related EEG signal data are used to adjust and optimize the parameters of the attention-based multi-scale hybrid convolutional neural network model;
[0011] The control module is used to control the driving circuit, and the massage module is used to perform massage. The control module receives the classification result of the signal processing module and activates the corresponding driving circuit, and dynamically adjusts the mode and massage position of the massage module in real time.
[0012] As a preferred solution, the single-channel EEG signal acquisition module uses a portable single-channel EEG signal acquisition device, which includes a sensor, an electrode for acquiring EEG signals, a reference electrode REF and a ground electrode GND.
[0013] As a preferred solution, the pre-processing denoising includes: using a notch filter to remove the interference of the power line on the EEG signal, and performing a bandpass filter on the EEG signal to remove out-of-band noise, to obtain the EEG signal matrix after pre-processing denoising Where K is the total number of signal data points.
[0014] As a preferred solution, the frequency response of the filter group composed of a low-pass filter and a high-pass filter used in the process of performing multi-layer wavelet decomposition on the pre-processed and denoised EEG signal by adjustable Q factor wavelet transform is:
[0015]
[0016] Where α is the low pass filter frequency response G 0 is the low-pass scaling LPS, β is the high-pass filter frequency response G 1 The high-pass scaling scale HPS, j represents the number of decomposition layers;
[0017] The preprocessed EEG signal is transformed by wavelet with adjustable Q factor to obtain J+1 signal matrices with different time and frequency resolutions:
[0018]
[0019] Where K is the total number of signal data points.
[0020] As a preferred solution, the signal matrix X obtained after the adjustable Q factor wavelet transform is TQWT The expression for is a time series vector:
[0021] v=[v 1 …v K ] T
[0022] The reconstructed phase space is expressed as:
[0023] {Y i =[v i v i+τ …v i+(d-1)τ ] T for i = 1, 2, ..., K - (d - 1) τ}
[0024] Where d is the embedding dimension and τ is the time delay;
[0025] The signal matrix X TQWT Perform phase space reconstruction to obtain the phase space matrix:
[0026]
[0027] As a preferred solution, the attention-based multi-scale hybrid convolutional neural network model uses the phase space matrix as input, and the phase space matrix is dimensionally expanded before being used as input to obtain an input signal matrix:
[0028]
[0029] The input signal matrix serves as the input of the attention-based multi-scale hybrid convolutional neural network model, i.e., the input feature matrix.
[0030] As a preferred solution, the attention-based multi-scale hybrid convolutional neural network model includes a deep convolution module, a feature attention module and a classification module.
[0031] As a preferred solution, the deep convolution module includes two parallel sub-networks: a first sub-network and a second sub-network;
[0032] The first sub-network includes a first convolution calculation unit, a second convolution calculation unit, a first feature fusion unit and a second feature fusion unit which are connected in sequence;
[0033] The first convolution calculation unit includes a first convolution layer, a first batch normalization layer, and a first ELU activation layer connected in sequence, the convolution kernel size of the first convolution layer is (4, 3, 1), wherein 4 is the number of convolution kernels, 3 and 1 are the sizes of the convolution kernel in the spatial direction and the time direction, respectively, the second convolution calculation unit includes a second convolution layer, a second batch normalization layer, and a second ELU activation layer connected in sequence, the convolution kernel size of the second convolution layer is (8, 1, 8), wherein 8 is the number of convolution kernels, 1 and 8 are the sizes of the convolution kernel in the spatial direction and the time direction, respectively;
[0034] The first feature fusion unit includes a third convolutional layer, a third batch normalization layer, a third ELU activation layer and a first two-dimensional average pooling layer connected in sequence, the convolution kernel size of the third convolutional layer is (8, 1, 4), the pooling window size of the first two-dimensional average pooling layer is (1, 8), where 1 is the height of the pooling window and 8 is the width of the pooling window, the second feature fusion unit includes a fourth convolutional layer, a fourth batch normalization layer, a fourth ELU activation layer and a second two-dimensional average pooling layer connected in sequence, the convolution kernel size of the fourth convolutional layer is (8, J+1, 1), the size of the second two-dimensional average pooling layer is (1, 8), where J+1 represents the number of decomposition layers of the adjustable Q factor wavelet transform TQWT;
[0035] The second sub-network includes a third convolution calculation unit, a fourth convolution calculation unit, a third feature fusion unit and a fourth feature fusion unit connected in sequence;
[0036] The third convolution calculation unit includes a fifth convolution layer, a fifth batch normalization layer, and a fifth ELU activation layer connected in sequence, and the convolution kernel size of the fifth convolution layer is (4, 3, 1); the fourth convolution calculation unit includes a sixth convolution layer, a sixth batch normalization layer, and a sixth ELU activation layer connected in sequence, and the convolution kernel size of the sixth convolution layer is (8, 1, 4);
[0037] The third feature fusion unit includes a seventh convolutional layer, a seventh batch normalization layer, a seventh ELU activation layer and a third two-dimensional average pooling layer connected in sequence, the convolution kernel size of the seventh convolutional layer is (8, 1, 4), and the pooling window size of the third two-dimensional average pooling layer is (1, 8). The fourth feature fusion unit includes an eighth convolutional layer, an eighth batch normalization layer, an eighth ELU activation layer and a fourth two-dimensional average pooling layer connected in sequence, the convolution kernel size of the eighth convolutional layer is (8, J+1, 1), and the size of the fourth two-dimensional average pooling layer is (1, 8);
[0038] The output of the first sub-network and the output of the second sub-network are reduced in spatial dimension and merged in time dimension to generate the output feature matrix of the deep convolution module:
[0039]
[0040] Among them, the expression of the ELU activation function of all ELU activation layers is:
[0041]
[0042] The expressions for all 2D average pooling layers are:
[0043]
[0044] Among them, I(i+m,j+n) is the value of the input feature matrix at position (i+m.j+n), O(i,j) is the value of the output feature matrix at position (i,j), and k h and k w are the height and width of the pooling window, respectively.
[0045] As a preferred solution, the feature attention module includes a channel attention unit and a transformer connected in sequence;
[0046] The channel attention unit includes a first one-dimensional global average pooling layer, a ninth convolutional layer and a first sigmoid activation layer connected in sequence, and the output feature matrix X Conv As the input of the feature attention module, the formula for the one-dimensional global average pooling is:
[0047]
[0048] where x Conv (c,t) represents the input matrix X Conv The value at position (c, t), y pool (c,1) represents the value of the output vector at position (c,1);
[0049] The formula for the sigmoid activation function is:
[0050]
[0051] The output y of the first one-dimensional global average pooling layer pool Transpose and use it as the input of the ninth convolutional layer, and combine the channel attention weight vector with X Conv Multiply them to get the channel attention feature matrix, and transpose the channel dimension and time dimension of the channel attention feature matrix to get
[0052] Will As input to the transformer to learn the global correlation in the feature matrix;
[0053] Transformer includes a position embedding unit, a multi-head attention network, a layer normalization unit, a feedforward network, and a first Softmax activation layer. The position embedding formula in the position embedding unit is as follows:
[0054] PE (pos,2i) =sin(pos / 10000 2i / d )
[0055] PE (pos,2i+1) =cos(pos / 10000 2i / d )
[0056] The multi-head attention network will input the feature matrix X CA It is divided into h parts, each of which is The multi-head attention network includes multiple self-attention units, each of which inputs Linear transformation to query Q l , key K l Sum value V l , Q l and K l The dot product can calculate the dependency of the global position, pass the result through the first Softmax activation layer to obtain the weight matrix, that is, the attention score, and then use the dot product of the attention score to value V l Weighting is performed and these global dependencies are added to the features. The process can be expressed as:
[0057] MHA(Q,K,V)=[head 0 ;...;head h-1 ],
[0058]
[0059] Where d represents the matrix K l The length of the channel dimension, Transformer uses residual connections at the locations of the multi-head attention network and the feedforward network to maintain the integrity of the input information and alleviate the gradient vanishing problem and accelerate convergence, and finally generates the output matrix of the feature attention module
[0060]
[0061] As a preferred solution, the classification module includes a first linear layer and a second Softmax activation layer, the number of neurons in the first linear layer is equal to the number of classification categories, and based on the neuron index corresponding to the maximum output value of the second Softmax activation layer, the user's feedback intention corresponding to each EEG signal collected by the user is obtained and output as the classification result.
[0062] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0063] The present invention proposes a massage chair system that realizes highly personalized and intelligent health services by proposing a massage chair system that collects the user's EEG signals in real time and dynamically adjusts the massage position according to the user's immediate needs. A more portable single-channel EEG signal acquisition device is used to reduce signal redundancy and calculation complexity, thereby realizing high-speed execution of the massage chair on the user's control instructions. At the same time, the collected EEG signals are analyzed in the entire frequency band through adjustable Q-factor wavelet transform TQWT and phase space reconstruction, and their time-frequency and nonlinear information are comprehensively considered. The signal is automatically feature extracted and classified through a deep learning method of an attention-based hybrid convolutional neural network, thereby realizing the extraction of effective features and accurate response to the user's immediate needs in a data-driven manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a schematic diagram of the structure and flow of the brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning of the present application;
[0065] Figure 2 It is a structural diagram of the deep learning model of the attention-based hybrid convolutional neural network of the present application;
[0066] Figure 3 It is a structural diagram of the transformer of the feature attention module in the deep learning model of the attention-based hybrid convolutional neural network of the present application. DETAILED DESCRIPTION
[0067] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited to the specific embodiments disclosed below.
[0069] Example 1
[0070] See also Figure 1 , Figure 1 This is a schematic diagram of the structure and flow of the brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning of the present application. This embodiment 1 provides a brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning, including:
[0071] Single-channel EEG signal acquisition module:
[0072] In this embodiment 1, the portable single-channel EEG signal acquisition device used by the single-channel EEG signal acquisition module uses the NeuroSky TGAM1 chip as a sensor to collect single-channel EEG signals. The single-channel EEG signal acquisition device has three metal contact points, namely electrodes, including an electrode located at the TP10 position of the right ear for collecting and acquiring EEG signals, as well as a reference electrode (REF) and a ground electrode (GND). Its sampling rate is 512Hz, and the collected EEG signal is transmitted to the signal processing module.
[0073] Signal processing module:
[0074] The signal processing module includes a preprocessing denoising unit, a decomposition and reconstruction unit, a deep learning classification unit and a user database storage unit.
[0075] 1. Preprocessing denoising unit:
[0076] In this example 1, the pre-processing denoising unit uses a 50Hz notch filter to remove interference from the power line, and uses a bandpass filter to perform a 0-150Hz bandpass filter on the signal to remove out-of-band noise, obtaining the EEG signal matrix after pre-processing denoising Where K is the total number of signal data points.
[0077] 2. Decomposition and reconstruction unit:
[0078] Includes tunable Q-factor wavelet transform (TQWT) and phase space reconstruction.
[0079] (1) Tunable Q-factor wavelet transform (TQWT): Tunable Q-factor wavelet transform (TQWT) performs multi-layer wavelet decomposition on the preprocessed EEG signal. TQWT can effectively analyze complex oscillation signals by selecting appropriate parameters such as Q, r, and J. TQWT performs tree-structured decomposition through a filter bank consisting of high-pass filters and low-pass filters. The decomposition of the next layer is based on the low-pass signal of the previous layer, and this tree structure is repeated until there are J+1 sub-bands. The frequency response of the dual-channel filter bank consisting of high-pass filters and low-pass filters used in the TQWT decomposition process is shown below:
[0080]
[0081] Where α is the low-pass filter frequency response G 0 The low-pass scaling (LPS) of the filter is shown in Figure 2, and β is the high-pass filter frequency response G 1 The high-pass scaling (HPS) of the preprocessed EEG signal is obtained after TQWT with J+1 sub-bands of different time and frequency resolutions, that is, the signal matrix Where K is the total number of signal data points.
[0082] (2) Phase space reconstruction: Based on the EEG signal after preprocessing and denoising, we can know that its one-dimensional signal vector is expressed as a time series vector v = [v 1 …v K ] T , then the phase space used for reconstruction is expressed as:
[0083] {Y i =[v i v i+τ …v i+(d-1)τ ] T for i = 1, 2, ..., K - (d - 1) τ}
[0084] Where d is the embedding dimension and τ is the time delay. The decomposition and reconstruction unit in the signal processing module transforms the signal matrix X obtained after the adjustable Q factor wavelet transform TQWT Constructing the phase space matrix through phase space reconstruction It contains rich nonlinear dynamic characteristics in EEG signals. When the phase space matrix is used as the input of the deep learning classification unit, it needs to be dimensionally expanded first to obtain the input signal matrix:
[0085]
[0086] 3. Deep Learning Classification Unit: See Figure 2 , Figure 2 Schematic diagram of the structure of the deep learning model of the attention-based hybrid convolutional neural network of the present application. This embodiment 1 proposes a deep learning model for classifying EEG signals as a deep learning classification unit. The model is an attention-based multi-scale hybrid convolutional neural network (AMHCNet). The model takes the input signal matrix as input and outputs the feedback intention ψ corresponding to each sample of each user:
[0087] ψ∈{head, back, waist, legs, balance}
[0088] The deep learning unit, namely the attention-based multi-scale hybrid convolutional neural network (AMHCNet), includes a deep convolution module, a feature attention module, and a classification module. The deep convolution module uses the spatiotemporal and frequency features extracted by the four convolutions, and captures the potential nonlinear dynamic characteristics such as chaotic behavior and nonlinear oscillation. The feature attention module first performs channel attention extraction on the feature matrix output by the deep convolution module, obtains the attention weight and multiplies it with the feature matrix to obtain the channel attention feature matrix. Then the transformer captures the global correlation within the channel attention feature matrix, so that the model pays more attention to the most informative part of the input data, thereby improving the recognition ability of key features and the overall model performance. The classification module classifies the above-mentioned feature matrix with adjusted weights and outputs the classification results of the feedback intention ψ corresponding to each sample of each user. The deep learning classification unit includes the following modules:
[0089] (1) Deep convolution module: The deep convolution module includes two parallel subnetworks. The first subnetwork includes a first convolution calculation unit, a second convolution calculation unit, a first feature fusion unit, and a second feature fusion unit connected in sequence. The first convolution calculation unit includes a first convolution layer, a first batch of normalization layers, and a first ELU activation layer connected in sequence. The convolution kernel size of the first convolution layer is (4, 3, 1), where 4 is the number of convolution kernels, and 3 and 1 are the sizes of the convolution kernels in the spatial direction and the temporal direction, respectively. The formula of the ELU activation function is:
[0090]
[0091] The second convolution calculation unit includes a second convolution layer, a second batch normalization layer, and a second ELU activation layer connected in sequence. The convolution kernel size of the second convolution layer is (8, 1, 8). The first feature fusion unit includes a third convolution layer, a third batch normalization layer, a third ELU activation layer, and a first two-dimensional average pooling layer connected in sequence. The convolution kernel size of the third convolution layer is (8, 1, 4), and the pooling window size of the first two-dimensional average pooling layer is (1, 8), where 1 is the height of the window and 8 is the width of the window. The formula for the two-dimensional average pooling layer is:
[0092]
[0093] Among them, I(i+m,j+n) is the value of the input feature matrix at position (i+m.j+n), O(i,j) is the value of the output feature matrix at position (i,j), and k h and k w are the height and width of the pooling window, respectively.
[0094] The second feature fusion unit includes a fourth convolutional layer, a fourth batch normalization layer, a fourth ELU activation layer, and a second two-dimensional average pooling layer connected in sequence. The convolution kernel size of the fourth convolutional layer is (8, J+1, 1), and the size of the second two-dimensional average pooling layer is (1, 8), where J+1 represents the number of decomposition layers of TQWT.
[0095] The second subnetwork includes a third convolution calculation unit, a fourth convolution calculation unit, a third feature fusion unit and a fourth feature fusion unit connected in sequence. The third convolution calculation unit includes a fifth convolution layer, a fifth batch normalization layer and a fifth ELU activation layer connected in sequence, and the convolution kernel size of the fifth convolution layer is (4, 3, 1). The fourth convolution calculation unit includes a sixth convolution layer, a sixth batch normalization layer and a sixth ELU activation layer connected in sequence. The convolution kernel size of the sixth convolution layer is (8, 1, 4). The third feature fusion unit includes a seventh convolution layer, a seventh batch normalization layer, a seventh ELU activation layer and a third two-dimensional average pooling layer connected in sequence. The convolution kernel size of the seventh convolution layer is (8, 1, 4), and the pooling window size of the third two-dimensional average pooling layer is (1, 8). The fourth feature fusion unit includes an eighth convolution layer, an eighth batch normalization layer, an eighth ELU activation layer and a fourth two-dimensional average pooling layer connected in sequence. The convolution kernel size of the eighth convolutional layer is (8, J+1, 1), and the size of the fourth two-dimensional average pooling layer is (1, 8). The outputs of the two parallel sub-networks are reduced in the spatial dimension (the second dimension) and merged in the temporal dimension (the third dimension) to generate the output feature matrix of the deep convolution module.
[0096] (2) Feature attention module: This module includes a channel attention unit and a transformer connected in sequence. The channel attention unit includes the first one-dimensional global average pooling layer, the ninth convolutional layer and the first sigmoid activation layer connected in sequence. The output feature matrix X Conv As the input of the feature attention module, the formula for the one-dimensional global average pooling is:
[0097]
[0098] where x Conv (c,t) represents the input matrix X ConvThe value at position (c, t), y pool (c,1) represents the value of the output vector at position (c,1). The output y of the first one-dimensional global average pooling layer pool Transpose and use it as the input of the ninth convolutional layer. The convolution kernel size of the ninth convolutional layer is (1, 1, 3), and the formula of the sigmoid activation function is:
[0099]
[0100] Transpose the output of the first sigmoid activation layer to get the channel attention weight vector y weight , and the channel attention weight vector is combined with X Conv Multiply them together to get the channel attention feature matrix. Then transpose the channel dimension and time dimension of the feature matrix to get It is used as input to the Transformer to learn the global correlation in the feature matrix.
[0101] See also Figure 3 , Figure 3 This is a schematic diagram of the structure of the transformer of the feature attention module in the deep learning model of the attention-based hybrid convolutional neural network of this application. The transformer Transformer includes a position embedding unit, a multi-head attention network, a layer normalization unit, and a feed forward network. The position embedding unit allows the input features to have a relative position relationship and maintain the correlation of the data. The formula for position embedding is as follows:
[0102] PE (pos,2i) =sin(pos / 10000 2i / d )
[0103] PE (pos,2i+1) =cos(pos / 10000 2i / d )
[0104] The multi-head attention network takes as input the feature matrix X CA It is divided into h parts, each of which is The multi-head attention network consists of multiple self-attention units, each of which takes the input The linear transformation is the query (Q l ), key (K l ) and value (V l ), Q l and K l The dot product of can calculate the dependency of the global position, and pass the result through the first Softmax activation layer to obtain the weight matrix, that is, the attention score. Then the attention score is used to dot product V lWeighting is performed and these global dependencies are added to the features. This process can be expressed as:
[0105] MHA(Q,K,V)=[head 0 ;...;head h-1 ],
[0106]
[0107] Where d represents the matrix K l The length of the channel dimension. Transformer uses residual connections in the multi-head attention network and feedforward network to maintain the integrity of the input information, alleviate the gradient vanishing problem, and accelerate convergence. Finally, the output matrix of the feature attention module is generated
[0108] (3) Classification module: This module includes the first linear layer and the second Softmax activation layer. The number of neurons in the first linear layer is 5, which is the number of classification categories. The formula of the Softmax function is:
[0109]
[0110] The neuron index corresponding to the maximum output of the second Softmax activation layer is taken to obtain the feedback intention ψ corresponding to each EEG signal sample collected by the user.
[0111] 4. User database storage unit: The user database storage unit stores the classification results and related EEG signal data output by the deep learning classification unit. The classification results and related EEG signal data are used to adjust and optimize the parameters of the attention-based multi-scale hybrid convolutional neural network model.
[0112] Control Module:
[0113] The control module includes a control unit composed of the head, back, waist, legs and the overall drive circuit. The classification results obtained in the signal processing module are input into the control module of the massage chair to activate the corresponding massage program. The control module automatically adjusts the various parts of the massage module, such as the head, back, waist and legs, selects the corresponding massage mode, and performs targeted massage on the position of interest according to the user's feedback intention instructions. The control unit converts the processed feedback intention instructions into specific massage actions, and realizes precise control of different parts of the massage chair by controlling various drive circuits, high-precision motors, pressure sensors and position sensors.
[0114] Massage module:
[0115] The massage chair comprises various massage units, which are used to perform massage actions according to the massage mode and key massage positions set by the control module.
[0116] Example 2
[0117] This embodiment 2 is based on an intelligent brain-controlled massage chair system of embodiment 1, and is used to illustrate a method for using the intelligent brain-controlled massage chair system of embodiment 1, including the following steps:
[0118] S1: In this example 2, the single-channel EEG signal acquisition device is an EEG signal acquisition headband. The user sits on the massage chair and wears the EEG signal acquisition headband, and imagines the instructions for the expected massage position and mode. The single-channel EEG signal acquisition module starts to collect the user's current EEG signal and inputs the collected EEG signal into the signal processing module.
[0119] S2: The signal processing module preprocesses the EEG signal through the preprocessing and denoising unit and removes the interference of the power line and out-of-band noise. The decomposition and reconstruction unit uses the adjustable Q factor wavelet transform (TQWT) to perform multi-layer wavelet decomposition on the preprocessed and denoised EEG signal, decomposing the EEG signal into multiple sub-bands with different time and frequency resolutions to extract comprehensive time-frequency information. The signal after TQWT decomposition is reconstructed in phase space to fully capture the dynamic behavior of the EEG signal and the nonlinear dynamic characteristics in the high-dimensional mode. Then the obtained phase space matrix is dimensionally expanded as the input of the deep learning classification unit.
[0120] S3: The deep learning classification unit uses the dimensionally expanded phase space matrix as input through the attention-based multi-scale hybrid convolutional neural network (AMHCNet), outputs the user's feedback intention, and realizes the classification of different user needs.
[0121] S4: The user database storage unit sets up a personalized database for the user of the brain-controlled massage chair. The database stores EEG signal-related data and the classification results of the deep learning classification unit to train the system and adapt to the user's feedback intention instructions for massage position and mode. Through steps S1-S3, the parameters of the deep learning classification unit are continuously optimized and adjusted, which is used as the standard for the classification results output to the control module for the control of the massage chair.
[0122] S5: The control module activates the corresponding massage program according to the classification results output by the deep learning classification unit after parameter optimization. The control module automatically adjusts various parts of the massage module, such as the head, back, waist and legs, selects the corresponding massage mode, and controls the massage unit of the corresponding massage module to perform targeted massage on the position of interest according to the user's feedback intention instruction.
[0123] Example 3
[0124] This Example 3 is based on Example 1 and further illustrates that other implementation methods are adopted to achieve the purpose of the present invention to a certain extent.
[0125] 1. Without using TQWT and phase space reconstruction method, i.e. deleting the decomposition and reconstruction unit of the system in Example 1, the collected EEG signals are directly pre-processed and denoised, and then input into the attention-based hybrid convolutional neural network of the deep learning classification unit in Example 1 for classification;
[0126] 2. Instead of using deep learning models, we extract the entropy features of different frequency bands of EEG signals and use algorithms such as support vector machines or random forests to classify the input signal matrix.
[0127] In summary of the above embodiments, compared with the prior art, the embodiments of the present invention dynamically adjust the massage position and mode according to the user's immediate needs, thereby realizing highly personalized and intelligent health services. In addition, by strictly dividing the user's instructions into five categories: head, back, waist, legs, and balance, the corresponding EEG signals generated during the signal acquisition process are more recognizable; compared with the existing multi-channel EEG signal acquisition unit, the embodiment of the present invention uses a single-channel EEG signal acquisition unit, which can improve the convenience of the device and the comfort of the user, and greatly reduce the complexity and redundancy of signal processing, thereby improving the device's response speed to the user's ideas; compared with the technology that only analyzes and processes certain frequency bands in the EEG signal, the embodiment of the present invention adopts the signal processing method of adjustable Q factor wavelet transform (TQWT) and phase space reconstruction, which can more comprehensively retain and distinguish different categories of EEG signals. , making full use of its different time-frequency resolutions and nonlinear dynamic characteristics, thereby improving the accuracy of model classification; the embodiment of the present invention does not require manual feature extraction and complex feature engineering, but automatically learns and extracts information in EEG signals through a deep learning model, thereby simplifying the process of identifying user intention instructions. At the same time, compared with the prior art that extracts specific and limited features, the attention-based hybrid convolutional neural network proposed in the embodiment of the present invention can fully understand and capture the spatiotemporal information and nonlinear characteristics in EEG signals, and perform feature fusion through the attention mechanism, so that the model pays more attention to the most informative part of the input data, thereby improving the recognition ability of key features and the overall model performance.
[0128] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. A brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning, characterized in that: The system comprises: a single-channel EEG signal acquisition module, a signal processing module, a control module and a massage module; The single-channel EEG signal acquisition module acquires the user's EEG signal; The signal processing module receives and processes the EEG signal, and the signal processing module includes a preprocessing denoising unit, a decomposition and reconstruction unit, a deep learning classification unit and a user database storage unit. The preprocessing denoising unit performs preprocessing denoising on the EEG signal, and the decomposition and reconstruction unit performs multi-layer wavelet decomposition on the preprocessed denoised EEG signal through an adjustable Q factor wavelet transform and reconstructs the decomposed signal in phase space to obtain a phase space matrix. The deep learning classification unit includes an attention-based multi-scale hybrid convolutional neural network model, and the attention-based multi-scale hybrid convolutional neural network model uses the phase space matrix as input and uses the classification result of the user's feedback intention as output; The user database storage unit stores the classification results and related EEG signal data, and the classification results and related EEG signal data are used to adjust and optimize the parameters of the attention-based multi-scale hybrid convolutional neural network model; The control module is used to control the driving circuit, and the massage module is used to perform massage. The control module receives the classification result of the signal processing module and activates the corresponding massage program and driving circuit, and dynamically adjusts the mode and massage position of the massage module in real time.
2. According to claim 1, a brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning is characterized in that: The single-channel EEG signal acquisition module uses a portable single-channel EEG signal acquisition device, which includes a sensor, an electrode for acquiring EEG signals, a reference electrode REF and a ground electrode GND.
3. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 1, characterized in that: The pre-processing denoising includes: using a notch filter to remove the interference of the power line on the EEG signal, and performing bandpass filtering on the EEG signal to remove out-of-band noise, obtaining the pre-processed denoised EEG signal and obtaining a signal matrix Where K is the total number of signal data points.
4. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 3, characterized in that: The frequency response of the filter group composed of a low-pass filter and a high-pass filter used in the process of performing multi-layer wavelet decomposition on the pre-processed and denoised EEG signal through adjustable Q factor wavelet transform is: Where α is the low-pass scaling scale LPS of the low-pass filter frequency response G0, β is the high-pass scaling scale HPS of the high-pass filter frequency response G1, and j represents the number of decomposition levels; The preprocessed EEG signal is transformed by wavelet with adjustable Q factor to obtain J+1 signal matrices with different time and frequency resolutions: Where K is the total number of signal data points.
5. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 3, characterized in that: The expression of the one-dimensional signal vector of the pre-processed and denoised EEG signal is a time series vector: v=[v1…v K ] T The reconstructed phase space is expressed as: {Y i =[v i v i+τ …v i+(d-1)τ ] T fori=1,2,...,K-(d-1)τ} Where d is the embedding dimension and τ is the time delay; The signal matrix X TQWT Perform phase space reconstruction to obtain the phase space matrix:
6. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 5, characterized in that: The attention-based multi-scale hybrid convolutional neural network model takes the phase space matrix as input. When the phase space matrix is used as input, the dimension is first expanded to obtain the input signal matrix: The input signal matrix is then used as the input of the attention-based multi-scale hybrid convolutional neural network model, i.e., the input feature matrix.
7. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 1, characterized in that: The attention-based multi-scale hybrid convolutional neural network model includes a deep convolution module, a feature attention module and a classification module.
8. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 7, characterized in that: The deep convolution module includes two parallel sub-networks: a first sub-network and a second sub-network; The first sub-network includes a first convolution calculation unit, a second convolution calculation unit, a first feature fusion unit and a second feature fusion unit which are connected in sequence; The first convolution calculation unit includes a first convolution layer, a first batch normalization layer, and a first ELU activation layer connected in sequence, the convolution kernel size of the first convolution layer is (4, 3, 1), wherein 4 is the number of convolution kernels, 3 and 1 are the sizes of the convolution kernel in the spatial direction and the time direction, respectively, the second convolution calculation unit includes a second convolution layer, a second batch normalization layer, and a second ELU activation layer connected in sequence, the convolution kernel size of the second convolution layer is (8, 1, 8), wherein 8 is the number of convolution kernels, 1 and 8 are the sizes of the convolution kernel in the spatial direction and the time direction, respectively; The first feature fusion unit includes a third convolutional layer, a third batch normalization layer, a third ELU activation layer and a first two-dimensional average pooling layer connected in sequence, the convolution kernel size of the third convolutional layer is (8, 1, 4), the pooling window size of the first two-dimensional average pooling layer is (1, 8), where 1 is the height of the pooling window and 8 is the width of the pooling window, the second feature fusion unit includes a fourth convolutional layer, a fourth batch normalization layer, a fourth ELU activation layer and a second two-dimensional average pooling layer connected in sequence, the convolution kernel size of the fourth convolutional layer is (8, J+1, 1), the size of the second two-dimensional average pooling layer is (1, 8), where J+1 represents the number of decomposition layers of the adjustable Q factor wavelet transform TQWT; The second sub-network includes a third convolution calculation unit, a fourth convolution calculation unit, a third feature fusion unit and a fourth feature fusion unit connected in sequence; The third convolution calculation unit includes a fifth convolution layer, a fifth batch normalization layer, and a fifth ELU activation layer connected in sequence, and the convolution kernel size of the fifth convolution layer is (4, 3, 1); the fourth convolution calculation unit includes a sixth convolution layer, a sixth batch normalization layer, and a sixth ELU activation layer connected in sequence, and the convolution kernel size of the sixth convolution layer is (8, 1, 4); The third feature fusion unit includes a seventh convolutional layer, a seventh batch normalization layer, a seventh ELU activation layer and a third two-dimensional average pooling layer connected in sequence, the convolution kernel size of the seventh convolutional layer is (8, 1, 4), and the pooling window size of the third two-dimensional average pooling layer is (1, 8). The fourth feature fusion unit includes an eighth convolutional layer, an eighth batch normalization layer, an eighth ELU activation layer and a fourth two-dimensional average pooling layer connected in sequence, the convolution kernel size of the eighth convolutional layer is (8, J+1, 1), and the size of the fourth two-dimensional average pooling layer is (1, 8); The output of the first sub-network and the output of the second sub-network are reduced in spatial dimension and merged in time dimension to generate the output feature matrix of the deep convolution module: Among them, the expression of the ELU activation function of all ELU activation layers is: The expressions for all 2D average pooling layers are: Among them, I(i+m,j+n) is the value of the input feature matrix at position (i+m.j+n), O(i,j) is the value of the output feature matrix at position (i,j), and k h and k w are the height and width of the pooling window, respectively.
9. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 8, characterized in that: The feature attention module includes a channel attention unit and a transformer connected in sequence; The channel attention unit includes a first one-dimensional global average pooling layer, a ninth convolutional layer and a first sigmoid activation layer connected in sequence, and the output feature matrix X Conv As the input of the feature attention module, the formula for the one-dimensional global average pooling is: where x Conv (c,t) represents the input matrix X Conv The value at position (c, t), y pool (c,1) represents the value of the output vector at position (c,1); The formula for the sigmoid activation function is: The output y of the first one-dimensional global average pooling layer pool Transpose and use it as the input of the ninth convolutional layer, and combine the channel attention weight vector with X Conv Multiply them to get the channel attention feature matrix, and transpose the channel dimension and time dimension of the channel attention feature matrix to get Will As input to the transformer to learn the global correlation in the feature matrix; Transformer includes a position embedding unit, a multi-head attention network, a layer normalization unit, a feedforward network, and a first Softmax activation layer. The position embedding formula in the position embedding unit is as follows: ON (pos,2i) =sin(pos / 10000 2i / d ) ON (pos,2i+1) =cos(pos / 10000 2i / d ) The multi-head attention network will input the feature matrix X CA It is divided into h parts, each of which is The multi-head attention network includes multiple self-attention units, each of which inputs Linear transformation to query Q l , key K l Sum value V l , Q l and K l The dot product can calculate the dependency of the global position, pass the result through the first Softmax activation layer to obtain the weight matrix, that is, the attention score, and then use the dot product of the attention score to value V l Weighting is performed and these global dependencies are added to the features. The process can be expressed as: MHA(Q,K,V)=[head0;...;head h-1 ], Where d represents the matrix K l The length of the channel dimension, Transformer uses residual connections at the positions of the multi-head attention network and the feedforward network to maintain the integrity of the input information and alleviate the gradient vanishing problem and accelerate convergence, and finally generates the output matrix of the feature attention module:
10. The brain-controlled massage chair system based on wavelet transform, phase space reconstruction and deep learning according to claim 9, characterized in that: The classification module includes a first linear layer and a second Softmax activation layer. The number of neurons in the first linear layer is equal to the number of classification categories. Based on the neuron index corresponding to the maximum output value of the second Softmax activation layer, the user's feedback intention corresponding to each collected user's EEG signal is obtained and output as a classification result.
Citation Information
Patent Citations
Brain-computer interface-based massage chair comfort level automatic adjusting system and method
CN109871121A
Method for detecting linkage massage chair through brain waves
CN117815031A
Few-channel motor imagery feature extraction method based on improved common space mode
CN116680555A
Online identification method for different motor imagery electroencephalogram signals of single joint
CN118734149A
Methods for improved forewarning of critical events across multiple data channels
US20040059761A1