EEG cap removal detection method based on EEG signals

Through the neural network model based on EEG signals, real-time detection of EEG cap off is realized, which solves the problem of failure to directly detect fall off in the existing technology, improves the quality and accuracy of EEG signal acquisition, and reduces costs.

CN118356200BActive Publication Date: 2025-03-18JILI INNOVATION (SHANGHAI) INTELLIGENT TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410443048.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2025-03-18
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

The existing EEG detection technology cannot detect whether the EEG cap falls off in real time, resulting in poor quality and high cost of EEG signal acquisition.

Method used

The EEG cap shed detection method based on EEG signal is adopted, and the detection classification model is obtained by collecting historical EEG signal data, generating a training set, and using neural network models for learning and training. The model includes a first classification model and a second classification model for determining whether the EEG cap is shed and whether the lead is connected.

Benefits of technology

It can detect the connection between the electrodes of the EEG cap in real time without external devices, improve the quality and accuracy of EEG acquisition and reduce costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118356200B_ABST
    Figure CN118356200B_ABST
Patent Text Reader

Abstract

The present invention provides an EEG cap falling-off detection method based on EEG signals, comprising: collecting historical EEG signal data and preprocessing the data to generate a training set; inputting the training set into a model built based on a neural network structure for learning and training, and after the training is completed, obtaining a detection classification model, the detection classification model at least including a first classification model and a second classification model; acquiring a subject's EEG signal and preprocessing the data to generate a test set; inputting the test set into the first classification model to determine whether the number of detections has been reached, and outputting detection data of whether the EEG cap has fallen off; inputting the detection data into the second classification model to output EEG cap connectivity data; according to an interval period, cyclically acquiring the subject's EEG signal, inputting the signal into the first classification model and the second classification model to perform the above-mentioned processing, and ending after N iterations; calculating the average value of the EEG cap connectivity data during the N iterations, and taking the average value as the final EEG cap falling-off detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electroencephalogram (EEG) detection, and in particular to an EEG cap falling-off detection method based on EEG signals. Background Art

[0002] In the prior art, EEG detection technology is often measured by having the user wear an EEG cap. A large number of detection electrodes are distributed on the EEG cap. The electrodes are close to the scalp to collect EEG signals at the scalp. However, in the brain-computer interface system, the electrodes of the EEG cap are easy to fall off, which in turn affects the quality of the collected EEG signals. In addition, some EEG collection systems use external devices to detect the connectivity of the electrodes, which incurs additional high costs.

[0003] CN201811545905.1 discloses an EEG cap, which prevents the unstable contact of individual EEG electrodes caused by the inconsistent head sizes of each person by automatically bringing each EEG electrode into contact with the patient's head. The fixing strap can be automatically retracted to prevent the instability of the EEG cap caused by deformation of the fixing strap. However, it cannot avoid the electrode from falling off, and it is still necessary to detect the electrode connectivity through an external device, but it is impossible to directly detect whether the EEG cap has fallen off, which affects the quality of EEG signal acquisition and increases additional economic and time costs. Summary of the invention

[0004] The present invention provides an EEG cap falling-off detection method based on EEG signals, which solves the problem that the existing EEG detection technology cannot directly detect whether the EEG cap has fallen off in real time, resulting in poor quality and high cost of EEG signal acquisition.

[0005] According to a first aspect of the present invention, there is provided a method for detecting the removal of an electroencephalogram cap based on an EEG signal, comprising:

[0006] Collect historical EEG signal data and preprocess it to generate a training set;

[0007] The training set is input into a model built based on a neural network structure for learning and training. After the training is completed, a detection classification model is obtained, and the detection classification model at least includes a first classification model and a second classification model;

[0008] Obtain the subject's EEG signal and preprocess it to generate a test set;

[0009] Input the test set into the first classification model, determine whether the number of detections has been reached, and output detection data of whether the EEG cap has fallen off;

[0010] Inputting the detection data into the second classification model and outputting EEG cap connectivity data;

[0011] According to the interval period, the EEG signal of the subject is cyclically acquired, and input into the first classification model and the second classification model for the above processing, and the process ends after N iterations;

[0012] The average value of the EEG cap connectivity data during the N iterations is calculated and used as the final EEG cap fall-off detection result for auxiliary reference by the staff.

[0013] Furthermore, the preprocessing is performed by means of a sliding time window, including:

[0014] For the acquired historical EEG signal data, skip the previous time t0, set the time interval and window length respectively, and divide the historical EEG signal data into a number of time windows;

[0015] Each time window is a training sample, and the dimension of the training sample is at least lead×time.

[0016] Further, the plurality of training samples are divided into first-class training samples and second-class training samples according to categories, wherein the categories at least include normal EEG signals and abnormal EEG signals;

[0017] The normal EEG signals are defined as the first type of training samples, the abnormal EEG signals are defined as the second type of training samples, and the first type of training samples and the second type of training samples belong to the same set to form a training set.

[0018] Furthermore, task labels are set for the first type of training samples and the second type of training samples respectively, the task label of the first type of training samples is 0, and the task label of the second type of training samples is 1.

[0019] Furthermore, the model built based on the neural network structure includes an input layer, a convolutional layer, a pooling layer, a dimension adjustment layer, a linear layer and a classification output layer.

[0020] Furthermore, the constructed model is trained, including:

[0021] Inputting the first-class training samples and the second-class training samples in the training set through the input layer in the constructed model, and processing them through the convolution layer, the pooling layer, the dimension adjustment layer, and the linear layer;

[0022] After iterating M times, the optimal values ​​of the parameters of the first type of training samples and the second type of training samples are found respectively;

[0023] After adjusting the optimal value to the optimal parameter for model operation, the model structure is saved, and the number of saved model structures is at least 2 and the structures are the same.

[0024] Furthermore, the model structure is set according to different numbers of leads to form a first classification model and a second classification model respectively;

[0025] The first classification model and the second classification model have the same structure but different numbers of leads.

[0026] Furthermore, the first classification model is used to detect whether the EEG cap falls off:

[0027] If the output classification detection data is 1, the EEG cap falls off as a whole;

[0028] If the output classification detection data is 0, the EEG cap has not fallen off.

[0029] Furthermore, the second classification model is used to detect whether the lead is connected:

[0030] If the output classification detection data is 0, the lead contact is good;

[0031] If the output classification detection data is 1, the lead contact is poor.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] 1. No external equipment is required, no additional costs are incurred, and it is compatible with existing EEG acquisition equipment.

[0034] 2. Real-time detection of the connectivity of the electrodes of the EEG cap to improve the quality and accuracy of EEG acquisition.

[0035] 3. Effectively detect the wearing status of the EEG cap to overcome the problem of electrode detachment affecting the quality of EEG collection and improve the performance of brain-computer interface devices.

[0036] It should be understood that all combinations of the aforementioned concepts and the additional concepts described in more detail below can be considered as part of the inventive subject matter of the present disclosure as long as such concepts are not mutually inconsistent. In addition, all combinations of the claimed subject matter are considered as part of the inventive subject matter of the present disclosure.

[0037] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are not intended to be drawn to scale. In the accompanying drawings, each identical or nearly identical component shown in each figure may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings.

[0039] Figure 1 It is a flow chart of the method for detecting the removal of an EEG cap based on EEG signals shown in the present invention;

[0040] Figure 2 It is a schematic diagram of the online detection process of the EEG cap falling-off detection method based on EEG signals shown in the present invention. DETAILED DESCRIPTION

[0041] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.

[0042] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.

[0043] According to an embodiment of the present invention, Figure 1 , Figure 2 The flowchart shown in the figure shows a method for detecting the removal of an EEG cap based on EEG signals, comprising the following steps:

[0044] S1: Collect historical EEG signal data and preprocess it to generate a training set;

[0045] S2: input the training set into the model built based on the neural network structure for learning and training. After the training, a detection classification model is obtained. The detection classification model at least includes a first classification model and a second classification model.

[0046] S3: Obtain the EEG signals of the subjects and preprocess them to generate a test set;

[0047] S4: Input the test set into the first classification model, determine whether the detection times are reached, and output the detection data of whether the EEG cap falls off;

[0048] S5: input the detection data into the second classification model and output the EEG cap connectivity data;

[0049] S6: According to the interval period, the EEG signal of the subject is obtained cyclically, and input into the first classification model and the second classification model for the above processing, and the process ends after N iterations;

[0050] S7: Calculate the average value of the EEG cap connectivity data during the N iterations, and use the average value as the final EEG cap fall-off detection result for auxiliary reference by the staff.

[0051] In order to better illustrate the specific implementation of the method of the present invention, the embodiments of the present invention are described in detail as follows:

[0052] Furthermore, preprocessing is performed by sliding time windows, including:

[0053] For the acquired historical EEG signal data, the previous time t0 is skipped, and the historical EEG signal data is divided into several time windows with the interval time t1 and the window length t2;

[0054] Each time window is a training sample, and the dimension of the training sample is lead × time.

[0055] In an embodiment of the present invention, a plurality of training samples are divided into first-class training samples and second-class training samples according to categories, and the categories at least include normal EEG signals and abnormal EEG signals;

[0056] Among them, normal EEG signals are defined as a type of training samples, and abnormal EEG signals are defined as a type of training samples. The type of training samples and the type of training samples belong to the same set to form a training set.

[0057] As an example, task labels are set for the first-class training samples and the second-class training samples respectively. The task label of the first-class training samples is 0, and the task label of the second-class training samples is 1.

[0058] As an optional embodiment, the collected EEG signals do not undergo additional filtering processing except for 50 Hz industrial frequency filtering and 0.1 Hz high-pass filtering, so as to reduce the filtering process and thus reduce the amount of calculation without affecting the use and accuracy of the method of the present invention, thereby improving work efficiency.

[0059] In an optional embodiment, the value of t0 is an observed value, which is the time it takes for the EEG signal to go from jitter to stability under specific equipment (such as high-precision special EEG acquisition equipment) and configuration.

[0060] As an example, in the embodiment of the present invention, the value of t0 is set to 5 seconds.

[0061] Taking into account the different parameters of EEG acquisition equipment, the value of t0 is not limited in the embodiment of the present invention and can be optimally set according to actual conditions.

[0062] It should be noted that t1 is the interval time for detecting the output results of the classification model, and t2 is a hyperparameter. Both t1 and t2 can be set through empirical values, and t1 does not need to be optimized. It is only necessary to iteratively optimize t2 to find the optimal value and replace the model parameters.

[0063] As an example, t1 may be set to a fixed value, such as 1 second.

[0064] As an optional embodiment, the input of the first classification model and the second classification model is EEG signal data, and the output is a two-dimensional numerical value of 0 and 1.

[0065] It should be noted that the model built based on the neural network structure includes input layer, convolution layer, pooling layer, dimension adjustment layer, linear layer and classification output layer, among which:

[0066] (1) Input layer, used to input data, with the data dimension set to the number of channels × time window length;

[0067] (2) Temporal convolution layer, which is used to perform convolution in the time dimension for each lead to obtain frequency-related information. The convolution dimension is set to 1×(sampling rate / 2), the number of convolutions is 16, and the output dimension is the number of channels × time window length × 16;

[0068] (3) Spatial convolution layer, used to obtain information related to the leads, with the convolution latitude set to the number of channels × 1, the number of convolutions set to 2, and the output dimension set to the time window length × 16 × 2;

[0069] (4) Average pooling layer, set the dimension reduction to (time window length / 4)×16×2;

[0070] (5) Dimension adjustment layer, used to adjust the output of the previous layer to (time window length / 2)×16;

[0071] (6) Point-wise convolution layer, used to convolve the second dimension of the input features, setting the convolution window size to 1×16, the number to 8, and the output dimension to (time window length / 2)×8;

[0072] (7) Linear layer 1, set the input dimension to time window length × 4;

[0073] (8) Linear layer 2, set the input dimension to the time window length × 2;

[0074] (9) Linear layer 3, set the output dimension to 2;

[0075] (10) Classification output layer, which is used to judge the category of the output of the previous dimension and use the softmax layer (normalized exponential function) to output the probability of each category.

[0076] As an optional embodiment, the number of channels in the above model structure can be set to n0, where 1<n0<total number of leads.

[0077] Furthermore, the constructed model is trained, including:

[0078] The first-class training samples and the second-class training samples in the training set are input through the input layer of the constructed model, and processed by the convolution layer, pooling layer, dimension adjustment layer, and linear layer. The loss function of the training is cross entropy.

[0079] After M iterations, the optimal values ​​of the model parameters are found;

[0080] In an optional embodiment, the optimal value of t2 may be obtained by traversing the global data.

[0081] As an example, the value range of t2 is set to 0.5 to 5 seconds.

[0082] It should be noted that within the value range [0.5,5], the traversal is performed at intervals of 0.5 seconds. Each traversal uses a different t2 to separate the EEG signal data to form a corresponding test set. The test set is used to train the model structure and the corresponding loss function is recorded. After the traversal is completed, the t2 corresponding to the minimum loss function is selected as the optimal value.

[0083] Preferably, two model structures with channel numbers (ie, lead numbers) of n1 and n2 are trained respectively, wherein the model with channel number n1 is defined as a first classification model, and the model with channel number n2 is defined as a second classification model.

[0084] As an example, the first classification model is used to detect whether the EEG cap has fallen off, and n1 is the total number of leads / 2+1.

[0085] As an example, the second classification model is used to detect whether the lead is connected, and n2 is 1.

[0086] It should be noted that in each round of iterative learning and training, n0 channels are randomly extracted from a single training sample for the current round of training, so that the samples in each round of training are random, so as to expand the training samples and improve the generalization ability of the model.

[0087] Preferably, when using the method of the present invention to perform real-time detection of EEG cap removal, it can be performed according to the following examples:

[0088] When the user wears the EEG cap and starts collecting EEG data, detection is performed at the set interval t1 after t0+t2;

[0089] Select the most recent t2 time data, randomly select the data of lead n2 in this segment, send it to the first classification model, and record the classification results;

[0090] Repeat the above process, collect the latest m1 results, m1 is an odd number, and the leads taken for each test are random;

[0091] If more than half of the classification results are 1, the EEG cap is judged to have fallen off as a whole, and the test is terminated;

[0092] If more than half of the classification results are 0, it is determined that the EEG cap has not fallen off, and the connection of a single lead is continued to be detected, and the data of each lead is sent to the second classification model respectively;

[0093] If the output classification result is 1, it means that the lead has poor contact;

[0094] If the output classification result is 0, it means that the lead has good contact;

[0095] After an interval of t1 (such as 1 second), the most recent t2 time data is obtained again, and the above detection process is repeated until the detection is stopped after the cycle period ends.

[0096] Preferably, in order to improve the output sensitivity of the classification detection result, the embodiment of the present invention further provides an adjustment method for adjusting and outputting the classification result of the above-mentioned EEG cap removal real-time detection, comprising:

[0097] Use time interval t1 to perform multiple cycle detections;

[0098] If the number of tests is greater than m2 (an odd number), take the m2 most recent judgment results of each lead (the result is 0 or 1);

[0099] The average value of the judgment results of the first classification model is calculated. If the average value is greater than the threshold v1 (0.5), it means that the EEG cap has fallen off and the judgment is terminated;

[0100] If the average value is less than the threshold value v1, it means that the EEG cap has not fallen off, and the single-lead connectivity test continues;

[0101] Count the average value of the second classification model of a single channel. If the average value is greater than v1, it means that the lead has poor contact.

[0102] If the average value is less than the threshold value v1, it means that the lead has good contact;

[0103] Repeat the above process to determine the connectivity of all leads.

[0104] It should be noted that m2 and v1 are empirical values ​​and can be adjusted according to actual conditions. The larger the m2 value, the higher the equipment reliability and the lower the sensitivity. The higher the v1 value, the lower the equipment sensitivity and the higher the reliability, and vice versa.

[0105] The aforementioned method of training the model can be performed using methods and means in the prior art and will not be described in detail in this example.

[0106] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.

Claims

1. A method for detecting the removal of an EEG cap based on EEG signals, characterized in that: include: Collect historical EEG signal data and preprocess it to generate a training set; The training set is input into a model built based on a neural network structure for learning and training. After the training is completed, a detection classification model is obtained, and the detection classification model at least includes a first classification model and a second classification model; Among them, the model built based on the neural network structure includes input layer, convolution layer, pooling layer, dimension adjustment layer, linear layer and classification output layer: Input layer, used to input data, setting the data dimension to the number of channels × time window length; The temporal convolution layer is used to perform convolution on the time dimension for each lead to obtain frequency-related information. The convolution dimension is set to 1×(sampling rate / 2), the number of convolutions is 16, and the output dimension is the number of channels × time window length × 16; The spatial convolution layer is used to obtain information related to the leads. The convolution latitude is set to the number of channels × 1, the number of convolutions is 2, and the output dimension is the time window length × 16 × 2; Average pooling layer, set the dimension reduction to (time window length / 4)×16×2; Dimension adjustment layer, used to adjust the output of the previous layer to (time window length / 2)×16; Point-by-point convolution layer, used to convolve the second dimension of the input features, setting the convolution window size to 1×16, the number to 8, and the output dimension to (time window length / 2)×8; Linear layer 1, set the input dimension to time window length × 4; Linear layer 2, set the input dimension to time window length × 2; Linear layer 3, set the output dimension to 2; The classification output layer is used to determine the category of the output of the previous dimension, and the softmax layer normalized exponential function is used to output the probability of each category. The number of channels is set to n0, 1<n0<total number of leads; Input the first-class training samples and the second-class training samples in the training set through the input layer in the constructed model, and process them through the convolution layer, the pooling layer, the dimension adjustment layer, and the linear layer; After M iterations, the optimal parameter values ​​of the first type of training samples and the second type of training samples are found respectively; in each round of iterative learning training, n0 channels are randomly extracted from a single training sample for the current round of training; After adjusting the optimal value to the optimal parameter for model operation, saving the model structure, the number of model structures saved is at least 2, and the structure is the same; Obtain the subject's EEG signal and preprocess it to generate a test set; Input the test set into the first classification model, determine whether the number of detections has been reached, and output detection data of whether the EEG cap has fallen off; if it is determined that the EEG cap has fallen off as a whole, terminate the detection; if it is determined that the EEG cap has not fallen off, continue to detect the connection of a single lead; Inputting the detection data into the second classification model and outputting EEG cap connectivity data; According to the interval period, the EEG signal of the subject is cyclically acquired, and input into the first classification model and the second classification model for the above processing, and the process ends after N iterations; The average value of the EEG cap connectivity data during the N iterations is calculated and used as the final EEG cap fall-off detection result for auxiliary reference by the staff.

2. The method for detecting the removal of an EEG cap based on EEG signals according to claim 1, characterized in that: The preprocessing is performed by means of a sliding time window, including: For the acquired historical EEG signal data, skip the previous time t0, set the time interval and window length respectively, and divide the historical EEG signal data into a number of time windows; Each time window is a training sample, and the dimension of the training sample is at least lead×time.

3. The method for detecting the removal of an EEG cap based on EEG signals according to claim 2, characterized in that: Dividing the plurality of training samples into first-class training samples and second-class training samples according to categories, wherein the categories at least include normal EEG signals and abnormal EEG signals; The normal EEG signals are defined as the first type of training samples, the abnormal EEG signals are defined as the second type of training samples, and the first type of training samples and the second type of training samples belong to the same set to form a training set.

4. The method for detecting the removal of an EEG cap based on EEG signals according to claim 3, characterized in that: Task labels are set for the first type of training samples and the second type of training samples respectively, the task label of the first type of training samples is 0, and the task label of the second type of training samples is 1.

5. The method for detecting the removal of an EEG cap based on EEG signals according to claim 1, characterized in that: The model structure is set according to different lead numbers to form a first classification model and a second classification model respectively; The first classification model and the second classification model have the same structure but different numbers of leads.

6. The method for detecting the removal of an EEG cap based on EEG signals according to claim 5, characterized in that: The first classification model is used to detect whether the EEG cap has fallen off: If the output classification detection data is 1, the EEG cap falls off as a whole; If the output classification detection data is 0, the EEG cap has not fallen off.

7. The method for detecting the removal of an EEG cap based on EEG signals according to claim 5, characterized in that: The second classification model is used to detect whether the lead is connected: If the output classification detection data is 0, the lead contact is good; If the output classification detection data is 1, the lead contact is poor.

Citation Information

Patent Citations

  • Electroencephalography cap

    CN109464143A

  • Electroencephalogram measurement system, electroencephalogram measurement method, and program thereof

    US20120191000A1

  • Detection of chronic electrode leads off

    US20220401003A1