Epilepsy EEG signal early warning method and device based on anchored convolutional network

Through the anchored convolutional network and multi-layer sliding window prediction algorithm, combined with sample entropy feature extraction, the problem of insufficient distinction between epileptic interictal and preictal data in the existing technology is solved, and high sensitivity and long-term early warning of epilepsy are achieved. EEG signal early warning, suitable for real-time rapid warning.

CN117122288BActive Publication Date: 2024-10-18TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311158706.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-08
Publication Date
2024-10-18
Estimated Expiration
2043-09-08

AI Technical Summary

Technical Problem

Existing technology is difficult to distinguish the data characteristics between epileptic seizures and pre-ictal periods, resulting in low prediction sensitivity or short prediction time, making it impossible to effectively warn of epileptic seizures.

Method used

A method based on anchored convolutional networks (ACN) is used to build a model through dilated causal convolutional networks, parameter rewriting normalization, activation functions, random deactivation and residual connections, combined with sample entropy feature extraction and multi-layer sliding windows. Prediction algorithm to improve prediction accuracy and sensitivity.

Benefits of technology

It significantly improves the prediction sensitivity of epileptic interictal and pre-ictal periods, achieves long-term early warning, and reduces the false alarm rate. The model takes up less resources and runs fast, making it suitable for real-time early warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117122288B_ABST
    Figure CN117122288B_ABST
Patent Text Reader

Abstract

The present invention provides an epilepsy EEG signal early warning method and device based on an anchored convolutional network, belonging to the technical field of signal processing; it solves the problem that the prediction sensitivity is not high or the prediction time is not long due to the difficulty in distinguishing the characteristics of interictal and pre-ictal data; it comprises the following steps: epilepsy EEG signal acquisition; preprocessing the acquired epilepsy EEG signals, and data selection of the preprocessed EEG signals, and constructing an anchored convolutional network (ACN) model, specifically as follows: putting the data input into the ACN model into an expanded causal convolutional network; then rewriting and normalizing the parameters; then using an activation function to accelerate model training; then performing random inactivation; finally performing a residual connection on the whole; repeating the above operation three times is called an anchor block, and connecting multiple anchor blocks to form an anchored convolutional network (ACN); training and testing the anchored convolutional network (ACN) model; epilepsy EEG signal early warning; the present invention is applied to the early prediction of epileptic seizures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention provides an epilepsy electroencephalogram (EEG) signal early warning method and device based on an anchored convolutional network, belonging to the technical field of EEG signal processing. Background Art

[0002] Epilepsy is one of the most common neurological diseases in the world. Nowadays, EEG signals are an important basis for the diagnosis and treatment of epilepsy, and the diagnosis is mainly based on the doctor's naked eye. Most studies are to determine whether an epileptic patient has epilepsy, that is, to classify the EEG signals between the interictal period and the ictal period. Epilepsy seizure detection helps doctors make accurate diagnoses, but it cannot predict whether an epileptic seizure will occur in the future and how long it will take for the seizure to occur. It is difficult for patients to take timely protective measures when they have an epileptic seizure, and epileptic patients cannot be protected from the consequences of epileptic seizures.

[0003] Predicting an impending epileptic seizure is crucial to saving the lives of epilepsy patients. A few technologies have begun to predict epilepsy by classifying the patient's interictal and preictal EEG signals. However, since the data features of the interictal and preictal periods are not very different and have strong similarities, especially the longer the preictal period, the more similar the preictal and interictal periods are. Therefore, existing technologies generally have problems such as low prediction sensitivity or short prediction time, and the actual application value is not high. Therefore, an epilepsy EEG signal warning technology that can grasp the difference between the interictal period and the preictal period to achieve high prediction sensitivity and long prediction time is very important. Timely warning before the patient's seizure can enable patients, guardians and medical staff to take adequate protective measures and effectively protect the lives of epilepsy patients.

[0004] With the widespread application of deep learning, it has also shown great prospects in the classification and prediction of epileptic seizures. However, most deep learning models require a large amount of data for training. The long time it takes to collect epileptic seizure data and the uncertainty of the seizure time result in a small amount of available epileptic seizure data. In addition, deep learning models generally take a long time to train and occupy a lot of resources. However, for real-time early warning of epileptic seizures, models that occupy less resources and have a shorter running time are needed for practical use. Summary of the invention

[0005] In order to solve the problem that the prior art is difficult to distinguish the characteristics of interictal and preictal data, resulting in generally low prediction sensitivity or short prediction time, the present invention proposes an epilepsy EEG signal early warning method and device based on an anchored convolutional network.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: an epilepsy EEG signal early warning method based on an anchored convolutional network, comprising the following steps:

[0007] Step 1: Epilepsy EEG signal collection;

[0008] Step 2: preprocessing the collected epileptic EEG signals, and selecting data from the preprocessed EEG signals to obtain a training data set;

[0009] Step 3: Construct the anchored convolutional network ACN model, as follows:

[0010] (1) The data input into the ACN model is put into the dilated causal convolutional network to better and more effectively learn the information of the previous input data;

[0011] (2) Then the parameters are rewritten and normalized;

[0012] (3) Then use the activation function to accelerate model training;

[0013] (4) Then random dropout is performed;

[0014] (5) Finally, a residual connection is performed on the whole;

[0015] (6) Steps (1)-(5) are repeated three times and are called anchor blocks. Multiple anchor blocks are connected to form an anchor convolutional network (ACN).

[0016] Step 4: Train and test the anchored convolutional network ACN model. Use the EEG signal processed in step 2 to train the ACN model. Input part of the training data and the test data into the trained ACN model, and output the prediction label array of the interictal and preictal period of the test data.

[0017] Step 5: Epilepsy EEG signal warning: A multi-layer sliding window prediction algorithm is used to obtain the warning result for the predicted label array output by the ACN model. When the warning result is greater than the multi-layer sliding window prediction threshold, it is considered to be an early warning of epileptic seizure. If the seizure prediction range point is within the set time before the seizure, it is considered to be a correct warning, otherwise it is a wrong warning.

[0018] The steps of preprocessing the collected epileptic EEG signals in step 2 are as follows:

[0019] First, the EEG signal is processed by 4-32Hz low-pass filtering to remove high-frequency noise in the EEG signal;

[0020] Secondly, the EEG signal is processed by 60Hz notch filtering to remove the power frequency interference in the EEG signal;

[0021] Finally, the sample entropy feature extraction of the filtered EEG signal is performed through a sliding window method.

[0022] The process of data selection of the processed EEG signal in step 2 is as follows:

[0023] After feature extraction, the interictal and preictal data of the EEG signal are uniformly intercepted into data segments of set duration. Each patient is required to have 2 or more preictal data segments and 2 or more interictal data segments in the intercepted data segments. The number of epileptic seizures and the total time of the EEG signal that conforms to the above data segment division are counted to obtain preictal data samples and interictal data samples.

[0024] The interception rules for preictal data are as follows: intercept the data 2 hours before the epileptic seizure and require each patient to have 2 or more preictal data of 2 hours;

[0025] The interception rule of interictal data is: intercept 2 hours of data from the epileptic seizure period that is 4 hours or more apart, and each patient is required to have 2 or more interictal data of 2 hours in length.

[0026] The dilated causal convolutional network includes an input layer, three hidden layers and an output layer, and introduces a dilation factor, through which input data is separated and taken.

[0027] The process of training the anchored convolutional network ACN model in step 4 is as follows:

[0028] After data processing of the EEG signals of each patient, each patient has n interictal periods and n preictal periods. Each time, one interictal period and one preictal period data segment are randomly selected as the test set, and the remaining interictal period and preictal period data segments are used as the training set. The training set is brought into the anchored convolutional network, where the training is carried out in the manner of interictal data first and preictal data later. The cross entropy is used as the loss function, and the error between the predicted output and the label of the ACN model is calculated. The parameters of each layer in the network are updated through the back propagation of the error and the stochastic gradient descent algorithm.

[0029] The process of predicting the test data in step 4 is as follows:

[0030] During the testing phase, part of the training data is first input into the ACN model, and then the data that actually needs to be tested is put in. In the test data, the training data is put in front to assist in prediction. The experiment is repeated many times, and finally the average result on the actual test data is taken as the final result.

[0031] An epilepsy EEG signal early warning device based on an anchored convolutional network, comprising:

[0032] An acquisition device for acquiring raw data of electroencephalogram signals of epileptic patients;

[0033] A processor, the processor is connected to the acquisition device through a wire, and the processor includes a data processing module, a model analysis module, and a model early warning module;

[0034] The data processing module is used to pre-process the raw EEG signal data collected by the collection device by low-pass filtering and notch filtering, and then extract the features of sample entropy through a sliding window;

[0035] The model analysis module internally stores an anchored convolutional network (ACN) model, which is used to put the data extracted from the feature processing module into the ACN model for training and testing, and finally output the predicted label array of the test data;

[0036] The model warning module is used to put the prediction label array of the model analysis module into a multi-layer sliding window, and issue an alarm message when it is considered to be pre-seizure data;

[0037] The alarm device is used to receive the alarm information in the model early warning module, and emits sound and vibration when receiving the alarm information.

[0038] The anchored convolutional network (ACN) model includes multiple connected anchor blocks, each of which has three connected processing networks, each of which includes a connected dilated causal convolutional network, a parameter normalization layer, an activation function, random inactivation, and an overall residual connection.

[0039] The beneficial effects of the present invention compared with the prior art are as follows:

[0040] 1. The present invention combines the sample entropy method, which can well screen out effective information features, so that the ACN model can better grasp its characteristics, improve the prediction sensitivity of the interictal and preictal periods of epilepsy, and the sample entropy can handle the situation where some data is missing, thereby avoiding data deviation when calculating the sample entropy.

[0041] 2. The anchored convolutional network (ACN) proposed in the present invention is a new deep learning model, which depends on a certain data form. When the training data form is consistent with the test data form, it has a good prediction effect. When the test data depends on certain training data, the prediction effect of the test data is better. The experimental results show that in the prediction of the early stage of epileptic seizures, the performance of the ACN model is better than the most advanced existing methods, and the ACN model requires a small amount of data, so its model occupies less resources and runs faster, which can better realize the real-time rapid warning of epilepsy, and provide a new method for wearable devices for real-time prediction of epileptic seizures.

[0042] 3. The multi-layer sliding window prediction algorithm of the present invention can better improve the sensitivity of epilepsy prediction and reduce the false alarm rate of epilepsy by overlapping the two-layer sliding windows, and finally derive the prediction range of epilepsy onset. The experimental results show that the prediction range of onset that can be warned is better than the longest prediction range of onset in the same data set. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The present invention will be further described below in conjunction with the accompanying drawings:

[0044] Figure 1 is a flow chart of the method of the present invention;

[0045] Figure 2 It is a structural schematic diagram of the device of the present invention;

[0046] Figure 3 This is a schematic diagram of the structure of the anchored convolutional network proposed in the present invention;

[0047] Figure 4 This is a schematic diagram of the structure of the dilated causal convolutional network proposed in the present invention;

[0048] Figure 5 Schematic diagram of training and testing of the anchored convolutional network model proposed in the present invention. DETAILED DESCRIPTION

[0049] like Figures 1 to 5 As shown, the present invention provides an epilepsy EEG signal warning method based on an anchored convolutional network, which obtains the EEG signal (EEG) of an epileptic patient through an acquisition device and performs preliminary filtering preprocessing, then uses sample entropy to extract features, and brings the data of the interictal period and the pre-ictal period into the anchored convolutional network (ACN), and finally predicts the time when the epileptic patient will have an epileptic seizure through a multi-layer sliding window prediction algorithm, and the processor transmits the warning result to the alarm device, and the alarm device sends an alarm to realize the epilepsy warning for the patient. The specific implementation steps are as follows.

[0050] Step 1: EEG signal data collection:

[0051] The EEG signal data in the embodiment of the present invention adopts the public CHB-MIT data set collected by monitoring at Boston Children's Hospital, with a sampling frequency of 256 Hz and a resolution of 16 bits. These records use the EEG electrode positions and naming of the international 10-20 system.

[0052] Step 2: EEG signal data processing, including:

[0053] (1) Low-pass filtering: The EEG signal is processed by a 4-32 Hz low-pass filter to remove high-frequency noise in the EEG signal.

[0054] (2) Removing power frequency interference: The EEG signal is processed with a 60 Hz notch filter to remove the power frequency interference in the EEG signal, which makes the EEG signal purer and has a better prediction effect on epileptic seizures.

[0055] (3) Sample entropy feature extraction: In order to further predict epilepsy, the sample entropy method is used to extract features from EEG signals. Sample entropy is a powerful method for measuring the amount of information, which can well screen out effective information features, thereby improving the accuracy of epilepsy prediction. Sample entropy can also handle the situation where some data is missing, thereby avoiding data deviation when calculating sample entropy.

[0056] For the feature extraction of sample entropy, a sliding window is used. The sliding window size is a 5-second data segment, and the sliding window step is a 1-second data segment. Assuming that there are N data, the time series X=[x(n),n=1,2,…,N], the sample entropy expression is:

[0057]

[0058] In the above formula: m is the embedding dimension, r represents the similarity tolerance, C m (r) represents the probability of two sequences matching m points under similar tolerance, C m+1 (r) represents the probability that two sequences match m+1 points under similar tolerance.

[0059] (4) Data selection: Select pre-ictal data (2 hours before the onset) and require each patient to have 2 or more pre-ictal data. Select interictal data (4 hours or more between the onset and the onset) and require each patient to have 2 or more interictal data.

[0060] Specifically, the interictal and preictal data after feature extraction can be uniformly intercepted into 2-hour data segments, that is, 2 hours of preictal data and 2 hours of interictal data, with a total of 44 epileptic seizure records and a total time of 176 hours. The EEG signal processing of 13 epilepsy patients was completed, and 317,592 preictal scalp EEG signal data samples and 317,592 interictal scalp EEG signal data samples were obtained. Each data sample is 1 data segment, that is, 1 second of scalp EEG signal data.

[0061] Step 3: Constructing an anchored convolutional network (ACN): The structure of the ACN in the present invention is as follows Figure 3 As shown, the details are as follows:

[0062] (1) Dilated Causal Convolutional Network

[0063] The convolution function in the anchor block is implemented by the dilated causal convolutional network. The dilated causal convolutional network introduces a dilation factor, which separates the input data and increases the network receptive field. When the number of anchor blocks increases, longer historical data information can be learned.

[0064] The dilated causal convolutional network has a larger receptive field and can better and more effectively learn the information of the previous input data. Because the dilated causal convolution has fewer parameters, it reduces the complexity and computational cost of the model. At the same time, because it is also a causal convolution, it will not see future data, so there will be no information leakage problem.

[0065] Assume the input sequence X∈R N , filter f:{0,...,k-1}→R, then the dilated causal convolutional network F is defined as:

[0066]

[0067] in* d It is represented as the dilated causal convolution operator, d is the dilation factor, k is the filter size, s is the length of the input sequence, f(i) represents the i-th filter, and the dilated causal convolution network is Figure 4 In the display.

[0068] (2) Parameter rewriting normalization (Weight Norm, WN)

[0069] When the gradient is returned, the gradient can be made self-stabilized, and its WN formula is:

[0070]

[0071] Where g is a scalar whose magnitude is equal to the modulus of WN. represents a unit vector in the same direction as WN, v represents a vector, and ||v|| represents the Euclidean norm of the v vector.

[0072] (3) Activation function (ReLu)

[0073] The nonlinear ability of the model is enhanced, so that the model can better fit the nonlinear function, while accelerating the model training speed and reducing the model parameters. It is defined as:

[0074]

[0075] In the above formula: x represents the input data after parameter rewriting and normalization.

[0076] (4) Dropout

[0077] It can effectively alleviate the occurrence of overfitting, achieve the effect of regularization to a certain extent, and enhance the generalization ability of the model.

[0078] (5) Residual Connection

[0079] An anchor block contains a residual, which transmits gradient information through cross-layer connections, thereby solving the gradient vanishing and gradient exploding problems in deep neural networks, promoting model training and optimization, and because the parameters of the previous layer can be directly added to the parameters of the current layer during network optimization, the convergence speed of the model is accelerated, the training time and resource consumption are reduced, the network's representation ability is improved, and the risk of overfitting is reduced. The formula is:

[0080] y=F(x)+x(5);

[0081] In the above formula: x is the input data of the dilated causal convolutional network, F(x) is the output data after the dilated causal convolutional network, parameter rewriting normalization, activation function, and random inactivation processing, and y is the output data after residual connection.

[0082] (6) Anchor Block

[0083] Steps (1)-(5) are repeated three times and are called an anchor block. Multiple such anchor blocks are called an anchored convolutional network (ACN).

[0084] Set the number of anchor blocks to n, the number of layers of the ACN model is equal to the number of anchor blocks, and the expansion factor of the kth layer is 2 k In this way, more forward data information can be learned more reasonably. After continuous experimental parameter adjustment, the number of anchor blocks of the ACN model is determined to be 4.

[0085] Step 4: Anchored Convolutional Network Model Training and Testing

[0086] After data processing of the EEG signals of each patient, each patient has n interictal periods and n preictal periods. Each time, one interictal period and one preictal period data segment are randomly selected as the test set, and the remaining interictal period and preictal period data segments are used as the training set. The training set is brought into the anchored convolutional network, where the training is carried out in the manner of interictal data first and preictal data later. Cross Entropy (CE) is used as the loss function to calculate the error between the predicted output of the model and the label, and the parameters of each layer in the network are updated through the back propagation of the error and the stochastic gradient descent algorithm.

[0087] This invention proposes the idea of ​​anchoring convolutional networks for the first time. The prediction of current data can learn the characteristics of previous data to further assist prediction. That is, in the test phase, part of the training data is put in first, and then the data that really needs to be tested is put in. Therefore, in the test data, the training data will be put in front to assist prediction. The experiments are repeated many times, and the average result on the real test data is taken as the final result.

[0088] The anchor block is set to 4, the number of training rounds is set to 14 times, the filter size is 18, the number of filters is 80, the random inactivation factor is 0.02, the learning rate is 0.001, and the learning rate is multiplied by 0.1 every 8 rounds. Each patient has n interictal and n preictal 2-hour data segments. Each time, 1 interictal and 1 preictal data segment is randomly selected as the test set. For the data prediction of the test set, some training data are in the front, and the sliding window method is used. The sliding window size is set to 40min data segment, and the sliding step size is 13min data segment. In this way, the test data is put in the back, and each unit data segment has 3 prediction results. The result with the most predictions is counted and taken as the final prediction result. The experiment is repeated 3 times, and the average result on the test data is finally taken as the final result. The final output result is the ACN model predicts the label array of the interictal and preictal periods of the real test data. The training and testing diagram of the ACN model is in Figure 5 In the display.

[0089] Step 5: EEG signal data warning

[0090] The trained anchored convolutional network (ACN) was tested on the test set, and the multi-layer sliding window prediction algorithm was used on the output prediction label array to obtain the warning result. When the warning result is greater than the multi-layer sliding window prediction threshold, it is considered to be an early warning of epileptic seizure. If the seizure prediction range point is within 2 hours before the seizure, it is considered to be a correct warning, otherwise it is a wrong warning.

[0091] Specifically: the 120-second data of the ACN model prediction label is taken as a small segment. When there are more than or equal to 90 seconds of data segments in the 120-second data segment that are judged as pre-ictal prediction labels, then the 120-second data segment is considered to be pre-ictal data; when there are five segments of this continuous 120-second data segment as a small segment, and more than or equal to four data segments are judged as pre-ictal prediction labels, then this large segment is considered to be pre-ictal data, and the system will issue an alarm. If the seizure prediction range point is within 2 hours before the onset, it is considered to be a correct warning, otherwise it is a wrong warning. Epilepsy prediction uses sensitivity (SEN), false alarm rate per hour (FPR / h), and seizure prediction range (SPH) to evaluate the effect of the ACN model on epilepsy prediction.

[0092] The sensitivity (SEN) is the percentage of correct warning times to the total number of attacks. The sensitivity is defined as:

[0093]

[0094] In the above formula: n is the number of correct warnings, and N is the total number of attacks.

[0095] False alarm rate (FPR), the hourly false alarm rate is the number of false alarms of the epilepsy warning algorithm per unit time, the unit is times / h. The definition of hourly false alarm rate is:

[0096]

[0097] In the above formula, t is the number of false alarms, and T is the total duration of the EEG signal (unit / h).

[0098] Seizure prediction horizon (SPH), SPH is defined as the time interval between the onset of warning and epileptic seizure.

[0099] The above data is used to warn patients about epilepsy. The experimental results show that the average sensitivity of epilepsy prediction (SEN) is 92.31%, the false alarm rate per hour (FPR / h) is 0.15, and the seizure prediction range (SPH) is 103.36 minutes. It can be seen from the warning results of EEG signals of 13 epilepsy patients that the ACN model proposed in the present invention has high warning sensitivity, low false alarm rate and long seizure prediction range.

[0100] The method of the present invention is compared with the most advanced methods at home and abroad, and the comparison results are shown in Table 1. As can be seen from Table 1, compared with other methods, the epilepsy EEG signal early warning method based on anchored convolutional network (ACN) proposed in the present invention has the advantages of high early warning sensitivity and long seizure prediction range.

[0101]

[0102] Table 1 Comparison of epilepsy warning results of different methods on CHB-MIT dataset.

[0103] The present invention also proposes an epilepsy EEG signal early warning device based on an anchored convolutional network (ACN), the device comprising:

[0104] An acquisition device for acquiring raw data of electroencephalogram signals of epileptic patients;

[0105] A processor, the processor is connected to the acquisition device through a wire, and the processor includes a data processing module, a model analysis module, and a model early warning module;

[0106] The data processing module is used to pre-process the raw EEG signal data collected by the acquisition device by low-pass filtering and notch filtering, and then extract the features of sample entropy through a sliding window;

[0107] The model analysis module is used to put the data extracted from the data processing module into the ACN model for training and testing, and finally output the early warning prediction results of the test data;

[0108] The model warning module is used to put the warning prediction results of the model analysis module into the multi-layer sliding window warning, and when it is considered to be pre-onset data, an alarm message is issued;

[0109] The alarm device is used to receive the alarm information in the model early warning module, and when the alarm information is received, it will make a sound and vibrate.

[0110] The epilepsy EEG signal warning method and device based on anchored convolutional network (ACN) proposed in the present invention filters the collected EEG signals of epilepsy patients, then uses sample entropy to extract features and screens out effective information features so that the subsequent model can better grasp its features, and then uses the ACN model to predict the epileptic seizure interval and pre-seizure period. Due to the effective combination of sample entropy and the ACN model, the prediction effect is good and the sensitivity of the warning is significantly improved. Finally, a good seizure prediction range and a low false alarm rate are obtained through a multi-layer sliding window algorithm.

[0111] In an embodiment of the present invention, the EEG signal data of 13 epilepsy patients on the public CHB-MIT data set is used, with a total of 44 epileptic seizure records, a total data collection time of 176 hours, including 317,592 pre-seizure data samples and 317,592 inter-seizure data samples. The method of the present invention is tested on the epilepsy EEG signal data set, and the average sensitivity (SEN) of epilepsy prediction is 92.31%, the false alarm rate per hour (FPR / h) is 0.15, and the seizure prediction range (SPH) is 103.36 minutes. It is superior to the existing epilepsy warning method in terms of epilepsy seizure prediction, and realizes accurate and rapid warning of epilepsy seizures and has a long seizure prediction range, which enables patients, guardians and medical staff to take adequate protective measures and effectively protect the life safety of epilepsy patients.

[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An epilepsy EEG signal early warning method based on anchored convolutional network, characterized by: The steps include: Step 1: Epilepsy EEG signal collection; Step 2: preprocessing the collected epileptic EEG signals, and selecting data from the preprocessed EEG signals to obtain a training data set; Step 3: Construct the anchored convolutional network ACN model, as follows: (1) Put the data input into the ACN model into the dilated causal convolutional network to better and more effectively learn the information of the previous input data; (2) Then the parameter weights are normalized; (3) Then use the activation function to accelerate model training; (4) Then perform random dropout; (5) Finally, a residual connection is performed on the whole; (6) Steps (1)-(5) are repeated three times and are called anchor blocks. Multiple anchor blocks are connected to form an anchor convolutional network (ACN). Step 4: Train and test the anchored convolutional network ACN model. Use the EEG signal processed in step 2 to train the ACN model. Input part of the training data and the test data into the trained ACN model, and output the prediction label array of the interictal and preictal period of the test data. Step 5: Epilepsy EEG signal warning: A multi-layer sliding window prediction algorithm is used to obtain the warning result for the prediction label array output by the ACN model. When the warning result is greater than the multi-layer sliding window prediction threshold, it is considered to be a warning before an epileptic seizure. If the seizure prediction range point is within the set time before the seizure, it is considered to be a correct warning, otherwise it is a wrong warning.

2. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 1, characterized in that: The steps of preprocessing the collected epileptic EEG signals in step 2 are as follows: First, the EEG signal is processed by 4-32Hz low-pass filtering to remove high-frequency noise in the EEG signal; Secondly, the EEG signal is processed by 60Hz notch filtering to remove the power frequency interference in the EEG signal; Finally, the sample entropy feature extraction of the filtered EEG signal is performed through a sliding window method.

3. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 2, characterized in that: The process of data selection of the processed EEG signal in step 2 is as follows: After feature extraction, the interictal and preictal data of the EEG signal are uniformly intercepted into data segments of set duration. Each patient is required to have 2 or more preictal data segments and 2 or more interictal data segments in the intercepted data segments. The number of epileptic seizures and the total time of the EEG signal that conforms to the above data segment division are counted to obtain preictal data samples and interictal data samples.

4. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 3, characterized in that: The interception rules for preictal data are as follows: intercept the data 2 hours before the epileptic seizure and require each patient to have 2 or more preictal data of at least 2 hours in length; The interception rule of interictal data is: intercept 2 hours of data from the epileptic seizure period that is 4 hours or more apart, and require each patient to have 2 or more interictal data of at least 2 hours in length.

5. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 4, characterized in that: The dilated causal convolutional network includes an input layer, three hidden layers and an output layer, and introduces a dilation factor, through which input data is separated and taken.

6. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 4, characterized in that: The process of training the anchored convolutional network ACN model in step 4 is as follows: After data processing of the EEG signals of each patient, each patient has n interictal periods and n preictal periods. Each time, one interictal period and one preictal period data segment are randomly selected as the test set, and the remaining interictal period and preictal period data segments are used as the training set. The training set is brought into the anchored convolutional network, where the training is carried out in the manner of interictal data first and preictal data later. The cross entropy is used as the loss function, and the error between the predicted output and the label of the ACN model is calculated. The parameters of each layer in the network are updated through the back propagation of the error and the stochastic gradient descent algorithm.

7. The epilepsy EEG signal early warning method based on anchored convolutional network according to claim 6, characterized in that: The process of predicting the test data in step 4 is as follows: During the testing phase, part of the training data is first input into the ACN model, and then the data that actually needs to be tested is put in. In the test data, the training data is put in front to assist in prediction. The experiment is repeated many times, and finally the average result on the actual test data is taken as the final result.

8. An early warning device for implementing the epilepsy EEG signal early warning method based on an anchored convolutional network as described in any one of claims 1 to 7, characterized in that: include: An acquisition device for acquiring raw data of electroencephalogram signals of epileptic patients; A processor, the processor is connected to the acquisition device through a wire, and the processor includes a data processing module, a model analysis module, and a model early warning module; The data processing module is used to pre-process the raw EEG signal data collected by the collection device by low-pass filtering and notch filtering, and then extract the features of sample entropy through a sliding window; The model analysis module internally stores an anchored convolutional network (ACN) model, which is used to put the data extracted from the feature processing module into the ACN model for training and testing, and finally output the predicted label array of the test data; The model warning module is used to put the prediction label array of the model analysis module into a multi-layer sliding window, and issue an alarm message when it is considered to be pre-seizure data; The alarm device is used to receive the alarm information in the model early warning module, and emits sound and vibration when receiving the alarm information.

9. The early warning device according to claim 8, characterized in that: The anchored convolutional network (ACN) model includes multiple connected anchor blocks, each of which has three connected processing networks, each of which includes a connected dilated causal convolutional network, a weight normalization layer, an activation function, random inactivation, and an overall residual connection.

Citation Information

Patent Citations

  • Situation assessment method based on deep learning parameter anchoring

    CN114118361A

  • Method and apparatus for diagnosing epilepsy based on deep learning

    KR1020230040630A