CN115530754A - Epilepsy early warning method and device based on deep learning - Google Patents

Epilepsy early warning method and device based on deep learning Download PDF

Info

Publication number
CN115530754A
CN115530754A CN202210823611.0A CN202210823611A CN115530754A CN 115530754 A CN115530754 A CN 115530754A CN 202210823611 A CN202210823611 A CN 202210823611A CN 115530754 A CN115530754 A CN 115530754A
Authority
CN
China
Prior art keywords
electroencephalogram
deep learning
layer
early warning
signals
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210823611.0A
Other languages
Chinese (zh)
Inventor
金湛皓
方浩然
马辰煜
许宸瑞
徐欣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN202210823611.0A priority Critical patent/CN115530754A/en
Publication of CN115530754A publication Critical patent/CN115530754A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/40Detecting, measuring or recording for evaluating the nervous system
    • A61B5/4076Diagnosing or monitoring particular conditions of the nervous system
    • A61B5/4094Diagnosing or monitoring seizure diseases, e.g. epilepsy
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7271Specific aspects of physiological measurement analysis
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7271Specific aspects of physiological measurement analysis
    • A61B5/7275Determining trends in physiological measurement data; Predicting development of a medical condition based on physiological measurements, e.g. determining a risk factor
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/74Details of notification to user or communication with user or patient ; user input means
    • A61B5/746Alarms related to a physiological condition, e.g. details of setting alarm thresholds or avoiding false alarms

Landscapes

  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Public Health (AREA)
  • Surgery (AREA)
  • Veterinary Medicine (AREA)
  • General Health & Medical Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Biophysics (AREA)
  • Pathology (AREA)
  • Biomedical Technology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Psychiatry (AREA)
  • Physiology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Neurology (AREA)
  • Neurosurgery (AREA)
  • Psychology (AREA)
  • Evolutionary Computation (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention provides an epilepsy early warning method and device based on deep learning, wherein the method comprises the steps of acquiring electroencephalogram data, dividing the electroencephalogram data into a seizure occurrence period and a normal period, and setting the time length of the electroencephalogram signal in the seizure occurrence period, wherein the seizure occurrence period comprises the occurrence period and the occurrence interval in a set range before the occurrence period; dividing the electroencephalogram signal data into signal data segments according to a set time as preprocessed electroencephalogram data, and dividing the preprocessed electroencephalogram data into a training set and a test set; training the deep learning neural network by using a training set to obtain a deep learning prediction model; verifying the deep learning prediction model by using a test set; and (3) collecting real-time electroencephalogram signals of the patient, and inputting the signals into a deep learning prediction model for prediction. The invention can realize early warning for a long time in advance, has high accuracy and can effectively early warn a patient in advance.

Description

Epilepsy early warning method and device based on deep learning
Technical Field
The invention relates to an epilepsy early warning method and device based on deep learning.
Background
At present, epilepsy becomes the second most common disease next to headache in neurologic diseases in China, the morbidity and the incidence rate of epilepsy are on an increasing trend every year, epilepsy is a chronic nervous system disease which is caused by transient cerebral dysfunction due to sudden abnormal discharge of cerebral neurons, and once epilepsy is suffered, the epilepsy can affect patients and the life process of the patients for the whole life.
Because of the incurable characteristic, the traditional Chinese medicine composition not only brings unnecessary troubles to the daily life of a patient, brings serious illness and pubic sensation to the patient, but also influences the whole family of the patient and brings various problems in economy, psychology and physiology. However, most of the existing methods are used for detecting the occurrence of the epileptic disease, the accuracy of epilepsy prediction is low, the early warning time is short, and effective early warning for patients is difficult to achieve.
The above problems are problems that should be considered and solved in the epilepsy early warning process.
Disclosure of Invention
The invention aims to provide an epilepsy early warning method and device based on deep learning, and solves the problems that the existing epilepsy early warning method in the prior art is low in accuracy, short in early warning time and difficult to effectively early warn a patient.
The technical solution of the invention is as follows:
an epilepsy early warning method based on deep learning comprises the following steps,
s1, acquiring electroencephalogram data, dividing the electroencephalogram data into an episode occurrence period and a normal period, and setting the time length of the electroencephalogram of the episode occurrence period, wherein the episode occurrence period comprises an occurrence period and an occurrence interval in a set range before the occurrence period; segmenting the electroencephalogram signal data into signal data segments in a set time to serve as preprocessed electroencephalogram data, and dividing the preprocessed electroencephalogram data into a training set and a test set;
s2, training the CNN-GRU-based deep learning neural network by using a training set to obtain a deep learning prediction model;
s3, verifying the deep learning prediction model obtained in the step S2 by using a test set;
and S4, acquiring the electroencephalogram signal of the patient in real time through electroencephalogram acquisition equipment, filtering to remove artifact signals, dividing the real-time electroencephalogram signal into to-be-detected data segments according to set time, and inputting the to-be-detected data segments into a deep learning prediction model for prediction.
Further, in step S2, the CNN-GRU based deep learning neural network includes an input layer, a convolution layer one, a pooling layer one, a convolution layer two, a pooling layer two, a convolution layer three, a pooling layer three, a convolution layer four, a pooling layer four, a full connection layer, a GRU gated-loop unit, and an output layer, which are sequentially arranged and an output of a previous layer is an input of a next layer.
Further, in step S2, in the CNN-GRU based deep learning neural network, the input layer is used to input preprocessed electroencephalogram data, the convolution layer one, the convolution layer two, the convolution layer three, and the convolution layer four are used to extract features, the pooling layer one, the pooling layer two, the pooling layer three, and the pooling layer four are used to perform dimensionality reduction, data processed by convolution operation and pooling operation are mapped to a hidden layer feature space, a full connection layer is constructed to perform conversion output, a feature vector with epileptic signal time-frequency domain features is obtained, then the feature vector output by the full connection layer is input to a GRU gated cyclic unit to be trained, the features are learned, and a memory function for long and short time sequence signals is realized; and the output layer classifies the characteristics output by the GRU gating cycle unit through a softmax classifier and outputs a classification result.
Furthermore, the recurrent neural network realizes the degree that the state information at the previous moment is successfully brought into the current state by updating the gate, and realizes the memory function of the long and short time sequence signal by resetting the gate to ignore the degree of the state information at the previous moment;
GRU update gate: z is a radical of t =σ(W z x t +U z h t-1 +b z )
The GRU resets the gate: r is t =σ(W r x t +Urh t-1 +b r )
Wherein z is t To refresh the door, r t For reset gates, σ is a sigmoid function, W z 、W r 、U z、 Ur is weight, b z 、b r As a bias term, x t As output of the convolutional neural network, h t-1 The information passed for the last state.
Further, in step S4, the electroencephalogram signal of the patient is acquired in real time through the electroencephalogram acquisition device, specifically,
s41, placing the silver/silver chloride collecting electrode on the brain of a person to be collected to obtain a collected electroencephalogram signal;
s42, subtracting and filtering the acquired electroencephalogram signals by using a subtraction filter, amplifying the signals, adding direct current offset, outputting the signals, filtering out high-frequency components, converting the electroencephalogram analog signals into digital signals by using an A/D converter, and transmitting the digital signals to a single chip microcomputer;
s43, the single chip microcomputer divides the digital signals into to-be-detected data segments within the same set time as that in the step S1;
s44, inputting the data to be detected obtained in the step S43 into a deep learning prediction model in a segmented mode to obtain a prediction result of whether the data is a disease occurrence or not, and performing early warning when the number of the disease occurrences in the prediction result is larger than a set threshold value; otherwise, it is normal.
Further, in step S41, the silver/silver chloride collecting electrode is placed on the brain of the subject at the positions of C3-P3, T8-P8, T7-P7 and P3-O1.
A device for realizing the deep learning-based epilepsy early warning method comprises electroencephalogram acquisition equipment and an upper computer, wherein the electroencephalogram acquisition equipment acquires real-time electroencephalogram signals and then sends the real-time electroencephalogram signals to the upper computer, and the upper computer acquires a prediction result by using the deep learning-based epilepsy early warning method.
Furthermore, the electroencephalogram acquisition equipment comprises a plurality of electroencephalogram acquisition electrodes, a subtraction filter, an instrument amplifier, a direct current bias circuit, a passive filter circuit, an A/D converter, a single chip microcomputer, a wireless communication module and a power supply, wherein the power supply supplies power to the electroencephalogram acquisition equipment, the electroencephalogram acquisition electrodes adopt silver/silver chloride acquisition electrodes, the electroencephalogram acquisition electrodes acquire acquired electroencephalogram signals, the acquired electroencephalogram signals are subjected to subtraction filtering by the subtraction filter and amplified by the instrument amplifier, then subjected to direct current bias by the direct current bias circuit, output and subjected to high-frequency component filtering by the passive filter circuit, then converted into digital signals by the A/D converter and transmitted to the single chip microcomputer, and the single chip microcomputer is communicated with an upper computer through the wireless communication module.
The invention has the beneficial effects that:
1. according to the epilepsy early warning method and device based on deep learning, the occurrence period of the seizures is set, the deep learning model is obtained after deep learning neural network training, and after the model prediction process, the time length of electroencephalogram signals of a seizure generator can be used as the maximum early warning time, so that early warning can be realized for a long time in advance, the accuracy is high, and effective early warning can be realized for a patient.
2. According to the epilepsy early warning method and device based on deep learning, through acquiring electroencephalogram signals, human body states are detected and compared with life characteristics of a patient in an early stage of epilepsy, so that the possibility of the patient in the next certain time period is predicted, and early warning is achieved in time. Based on the deep learning neural network, a deep learning prediction model is obtained, in the training process, network parameters are optimized through accuracy, and prediction accuracy can be improved, so that accurate prediction of epileptic seizure is achieved, early warning effect on patients can be achieved, doctors can appoint diagnosis and treatment plans in advance, and important practical and commercial values are achieved in a plurality of life scenes such as physical examination and medical diagnosis.
Drawings
Fig. 1 is a schematic flow chart of an epilepsy early warning method based on deep learning according to an embodiment of the present invention;
FIG. 2 is an explanatory diagram of the division of electroencephalogram signal data into signal data segments in the embodiment;
FIG. 3 is an illustrative schematic diagram of a CNN-GRU based deep learning neural network in an embodiment;
FIG. 4 is an explanatory diagram of lead positions selected among the international 10/20 lead positions in the example;
fig. 5 is an explanatory diagram of the epilepsy early warning apparatus based on deep learning according to the embodiment.
Detailed Description
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Examples
An epilepsy early warning method based on deep learning, as shown in figure 1, comprises the following steps,
s1, acquiring electroencephalogram data, dividing the electroencephalogram data into an episode occurrence period and a normal period, and setting the time length of the electroencephalogram of the episode occurrence period, wherein the episode occurrence period comprises an occurrence period and an occurrence interval in a set range before the occurrence period; dividing the electroencephalogram signal data into signal data segments for 5min, and taking the signal data segments as preprocessed electroencephalogram data, as shown in fig. 2, dividing the preprocessed electroencephalogram data into a training set and a test set;
s2, training the CNN-GRU-based deep learning neural network by using a training set, calculating the accuracy, and optimizing the deep learning neural network when the accuracy is lower than a set threshold until the accuracy reaches the set threshold to obtain a deep learning prediction model;
as shown in fig. 3, in step S2, the CNN-GRU based deep learning neural network includes an input layer, a convolution layer one, a pooling layer one, a convolution layer two, a pooling layer two, a convolution layer three, a pooling layer three, a convolution layer four, a pooling layer four, a full connection layer, a GRU gating cycle unit, and an output layer, which are sequentially arranged and an output of a previous layer is an input of a next layer.
As shown in fig. 3, in step S2, in the CNN-GRU based deep learning neural network, the input layer is used to input preprocessed electroencephalogram data, the convolution layer one, the convolution layer two, the convolution layer three, and the convolution layer four are used to extract features, the pooling layer one, the pooling layer two, the pooling layer three, and the pooling layer four are used to perform dimensionality reduction, data processed by convolution operation and pooling operation are mapped to a hidden layer feature space, a full connection layer is constructed to perform conversion output, a feature vector with epileptic signal time-frequency domain features is obtained, then the feature vector output by the full connection layer is input to a GRU gating cycle unit to be trained, the features are learned, and a memory function for long and short time sequence signals is realized; and the output layer classifies the characteristics output by the GRU gating cycle unit through a softmax classifier and outputs a classification result.
The GRU gating circulating unit realizes the degree that the state information at the previous moment is successfully brought into the current state by updating the gate, and realizes the memory function of the long and short time sequence signal by the degree that the reset gate ignores the state information at the previous moment;
GRU update gate: z is a radical of formula t =σ(W z x t +U z h t-1 +b z )
The GRU resets the gate: r is t =σ(W r x t +Urh t-1 +b r )
Wherein z is t To refresh the door, r t For reset gates, σ is a sigmoid function, W z 、W r 、U z、 Ur is weight, b z 、b r Is a bias term, x t As the output of the convolutional neural network, h t-1 The information passed for the last state.
The updating gate and the resetting gate determine the contribution degree of the historical node information to the current node information; after the last state information passes through the reset gate, the last state information and the current input are subjected to aggregation updating through the weight and the bias term to form a current time state: the candidate hidden state at the current moment t is obtained; and finally, calculating the hidden state of the current moment.
S3, verifying the deep learning prediction model obtained in the step S2 by using a test set;
and step S3, verifying the deep learning prediction model obtained in the step S2 by using a test set, specifically, performing k-fold cross verification in the extracted CNN-GRU network by using the verification set, iteratively setting the times in each cross verification, and calculating the accuracy rate, the recall rate and the auc of the model.
And S4, acquiring real-time electroencephalogram signals of the patient through electroencephalogram acquisition equipment, filtering to remove artifact signals, dividing the real-time electroencephalogram signals into to-be-detected data segments according to set time, and inputting the to-be-detected data segments into a deep learning network prediction model for prediction.
S41, placing the silver/silver chloride collecting electrode on the brain of the person to be collected to obtain the collected electroencephalogram signal;
the silver/silver chloride collecting electrode is placed on the brain of the person to be collected, and the positions are respectively C3-P3, T8-P8, T7-P7 and P3-O1, and four positions with circles are shown in figure 4.
S42, subtracting and filtering the acquired electroencephalogram signals by using a subtraction filter, amplifying the electroencephalogram signals, adding direct current offset, filtering high-frequency components after outputting the electroencephalogram signals, converting the electroencephalogram analog signals into digital signals through an A/D converter, and transmitting the digital signals to a single chip microcomputer;
s43, the single chip microcomputer divides the digital signals into to-be-detected data segments within the same set time as that in the step S1;
s44, inputting the data to be detected obtained in the step S43 into a deep learning prediction model in a segmented mode to obtain a prediction result of whether the data is a disease occurrence or not, and performing early warning when the number of the disease occurrences in the prediction result is larger than a set threshold value; otherwise, it is normal.
According to the epilepsy early warning method based on deep learning, electroencephalogram signals are obtained, human body states are detected, and the human body states are compared with the vital signs of the epilepsy at the early stage, so that the possibility of the occurrence of the epilepsy of a patient in the next certain time period is predicted, and timely early warning is achieved. The deep learning prediction model is obtained based on the deep learning neural network, network parameters are optimized through accuracy in the training process, and prediction accuracy can be improved, so that accurate prediction of epileptic seizure is achieved, the early warning effect on patients can be achieved, doctors can appoint diagnosis and treatment plans in advance, and important practical and commercial values are achieved in a plurality of life scenes such as physical examination and medical diagnosis.
As shown in fig. 5, an embodiment further provides a device for implementing the deep learning-based epilepsy early warning method, which includes an electroencephalogram acquisition device and an upper computer, wherein the electroencephalogram acquisition device acquires real-time electroencephalogram signals and then sends the real-time electroencephalogram signals to the upper computer, and the upper computer acquires a prediction result by using the deep learning-based epilepsy early warning method.
As shown in fig. 5, the electroencephalogram acquisition device comprises a plurality of electroencephalogram acquisition electrodes, a subtraction filter, an instrument amplifier, a direct current bias circuit, a passive filter circuit, an a/D converter, a single chip microcomputer, a wireless communication module and a power supply, wherein the power supply supplies power to the electroencephalogram acquisition device, the electroencephalogram acquisition electrodes adopt silver/silver chloride acquisition electrodes, the electroencephalogram acquisition electrodes acquire acquired electroencephalogram signals, the acquired electroencephalogram signals are subjected to subtraction filtering by the subtraction filter, amplified by the instrument amplifier, subjected to direct current bias by the direct current bias circuit, output, subjected to high-frequency component filtering by the passive filter circuit, converted into digital signals by the a/D converter, and transmitted to the single chip microcomputer, and the single chip microcomputer is communicated with an upper computer through the wireless communication module.
The epilepsy early warning device based on deep learning is portable monitoring equipment for high-precision electroencephalogram acquisition, a power supply comprises 18650 lithium batteries and a DC-DC power supply chip, a multichannel high-precision low-power-consumption pre-amplification-adjustable subtraction filter comprises 4 low-power-consumption low-noise instrument amplifiers, the input end of a low-power-consumption low-noise operational amplifier is connected with a silver/silver chloride acquisition electrode, and the output end of the low-power-consumption low-noise operational amplifier is connected with a 24-bit low-noise A/D converter; the 24-bit low-noise A/D converter adopts an ADS1299IPAGR chip and is respectively connected with a multi-channel high-precision low-power consumption pre-positioned subtraction filter with adjustable amplification factor and a singlechip; the single chip microcomputer adopts an stm32f103rct6 chip.
According to the epilepsy early warning method and device based on deep learning, the occurrence period of the seizures is set, the deep learning model is obtained after deep learning neural network training, and after the model prediction process, the time length of electroencephalogram signals of a seizure generator can be used as the maximum early warning time, so that early warning can be realized for a long time in advance, the accuracy is high, and effective early warning can be realized for a patient.
One specific example of an embodiment is illustrated below:
s1, electroencephalogram experimental data of an embodiment adopt electroencephalogram signals of 23 epileptic patients collected in the United states Boston child hospital, the sampling frequency is 256Hz, and each patient has 9.6-55 hours of continuous electroencephalogram recording and at least 3 times of recording epilepsy. And (3) taking out and writing the files of the epileptic seizure period into a sei.
Since the whole period from beginning to end of a epileptic seizure of an epileptic patient is called the epileptic seizure period (ictal phase), the period between epileptic seizures of the patient is called the epileptic inter-seizure period, and the inter-seizure period is used as a period which can reach 99% of the life of the epileptic patient, so that the method has very important reference value for the analysis of the electroencephalogram signal. However, the uncertainty of the onset of the disease and the long and uncertain inter-attack period are not completely used as the basis for dividing time series. To address this problem, the examples define 30 minutes, which encompasses the entire seizure period, as a new period, called the seizure onset period.
Selecting complete 1-hour electroencephalogram signals, dividing the complete 1-hour electroencephalogram signals into signal data segments of 5 minutes according to a sampling rate of 256Hz, taking the signal data segments as preprocessed electroencephalogram data, dividing the data into 28 parts by using a time window in data preprocessing, and obtaining 7168 x 4 original data which is used as input and enters a neural network for training; dividing the preprocessed electroencephalogram data into a training set and a testing set;
the pretreatment of 23 patients, containing 175 epileptic seizure electroencephalograms, used signals for a total length of 177 hours, with a total epileptic seizure signal length of 2.8 hours, a total number of samples of 4754, a total non-epileptic seizure signal length of 174.2 hours, and a number of samples of 313105. Dividing the processed data into a training set and a test set according to the proportion of 8.
S2, training the CNN-GRU-based deep learning neural network by using a training set, calculating the accuracy, and optimizing the deep learning neural network when the accuracy is lower than a set threshold until the accuracy reaches the set threshold to obtain a deep learning prediction model;
the CNN-GRU-based deep learning neural network comprises an input layer, a convolution layer I, a pooling layer I, a convolution layer II, a pooling layer II, a convolution layer III, a pooling layer III, a convolution layer IV, a pooling layer IV, a full connection layer, a GRU gate control circulation unit and an output layer, wherein the output of the upper layer is used as the input of the lower layer, and the input of the network is 4-channel 7168 × 4 two-dimensional electroencephalogram data. The number of convolution kernels of the 4 convolutional layers is 64,128, respectively, the size of the convolution kernels is 5 x 5,3 x 3,2 x 2, respectively, the step size of the four convolutional layers is 2,1, respectively, and the size of each of the four pooling layers is 2 x 2. The input of the first pooling layer is 3582 × 64 two-dimensional electroencephalogram data, the input of the second pooling layer is 1791 × 64 two-dimensional electroencephalogram data, the input of the second pooling layer is 895 × 64 two-dimensional electroencephalogram data, the input of the third pooling layer is 447 × 64 two-dimensional electroencephalogram data, the input of the third pooling layer is 445 × 64 two-dimensional electroencephalogram data, the input of the fourth pooling layer is 222 × 64 two-dimensional electroencephalogram data, the input of the fourth pooling layer is 221 × 128 two-dimensional electroencephalogram data, the original data processed through convolution operation and pooling operation are mapped to a hidden layer feature space, a frequency domain full connection layer is built for conversion and output, feature vectors with epileptic signal time-domain features are obtained, then the feature vectors output by the full connection layer are input into a GRU gated circulation unit for training, and the extracted features are learned. The GRU gating circulation unit is provided with 128 neurons, the influence degree of hidden layer output of a previous moment in the neurons on a current hidden layer is controlled through the design of an update gate and a reset gate, selective training is carried out, and information on the time dimension of a space-time feature fusion vector, namely the time domain change feature of a signal, is extracted. And the output layer classifies the characteristics output by the GRU gating cycle unit through a softmax classifier and outputs a classification result.
And S3, verifying the deep learning prediction model obtained in the step S2 by using a test set. The method comprises the steps of obtaining network weight parameters after deep learning neural network training, carrying out k-fold cross validation on the extracted CNN-GRU network by using a validation set, iterating 50 times in each cross validation, calculating the accuracy, the recall rate and the auc of a model, and obtaining the accuracy of the model of 0.95 after training, so that the model well learns epileptic seizure intervals, particularly the change characteristics of electroencephalogram of a patient within 30 minutes of seizure occurrence period, and can accurately predict state change during or before the epileptic seizure based on EEG.
And S4, acquiring real-time electroencephalogram signals of the patient through electroencephalogram acquisition equipment, filtering to remove artifact signals, dividing the real-time electroencephalogram signals into to-be-detected data segments according to set time, and inputting the to-be-detected data segments into a deep learning prediction model for prediction. Electroencephalogram signals are collected at the time interval of 1 minute and enter a model, and data of the previous minute are deleted at intervals of one minute to prevent overload of the memory. And if the number of the data segments to be detected is x, the data of more than 80% x shows that the disease is generated, outputting the result that the disease is about to be generated in about 0-30 minutes, and otherwise, outputting the result that the disease is normal.
The epilepsy early warning method and device based on deep learning can early warn epilepsy through electroencephalogram characteristic signals through non-invasive portable design, can achieve about 20-minute prediction on the premise, is high in accuracy and long in early warning time, can play an effective early warning for a patient, and has good practical and reference values in the aspects of medical treatment, civil life and the like.
The above embodiments are merely illustrative of the technical idea of the present invention, and the technical idea of the present invention is not limited thereto, and any modifications made on the technical scheme according to the technical idea of the present invention fall within the scope of the present invention.

Claims (8)

1. An epilepsy early warning method based on deep learning is characterized in that: comprises the following steps of (a) carrying out,
s1, acquiring electroencephalogram data, dividing the electroencephalogram data into an attack occurrence period and a normal period, and setting the time length of the electroencephalogram of the attack occurrence period, wherein the attack occurrence period comprises the occurrence period and an occurrence interval of a set range before the occurrence period; dividing the electroencephalogram signal data into signal data segments according to a set time as preprocessed electroencephalogram data, and dividing the preprocessed electroencephalogram data into a training set and a test set;
s2, training the CNN-GRU-based deep learning neural network by using a training set, calculating the accuracy, and optimizing the deep learning neural network when the accuracy is lower than a set threshold until the accuracy reaches the set threshold to obtain a deep learning prediction model;
s3, verifying the deep learning prediction model obtained in the step S2 by using a test set;
and S4, acquiring real-time electroencephalogram signals of the patient through electroencephalogram acquisition equipment, filtering to remove artifact signals, dividing the real-time electroencephalogram signals into to-be-detected data segments according to set time, and inputting the to-be-detected data segments into a deep learning prediction model for prediction.
2. The deep learning-based epilepsy early warning method according to claim 1, wherein: in step S2, the CNN-GRU-based deep learning neural network comprises an input layer, a convolution layer I, a pooling layer I, a convolution layer II, a pooling layer II, a convolution layer III, a pooling layer III, a convolution layer IV, a pooling layer IV, a full connection layer, a GRU gate control circulation unit and an output layer which are sequentially arranged, wherein the output of the upper layer is the input of the lower layer.
3. The deep learning based epilepsy early warning method according to claim 2, wherein: in the step S2, in the CNN-GRU-based deep learning neural network, an input layer is used for inputting preprocessed electroencephalogram data, a convolution layer I, a convolution layer II, a convolution layer III and a convolution layer IV are used for extracting features, a pooling layer I, a pooling layer II, a pooling layer III and a pooling layer IV are used for dimensionality reduction, data processed through convolution operation and pooling operation are mapped to a hidden layer feature space, a full connection layer is built for conversion and output, a feature vector with epileptic signal time-frequency domain features is obtained, then the feature vector output by the full connection layer is input to a GRU gating and extraction circulation unit for training, the features are learned, and the memory function of long and short time sequence signals is achieved; and the output layer classifies the characteristics output by the GRU gating cycle unit through a softmax classifier and outputs a classification result.
4. The deep learning-based epilepsy early warning method according to claim 2, wherein: the GRU gating circulating unit realizes the degree that the state information at the previous moment is successfully brought into the current state by updating the gate, and realizes the memory function of the long and short time sequence signal by the degree that the reset gate ignores the state information at the previous moment;
GRU update gate: z is a radical of formula t =σ(W z x t +U z h t-1 +b z )
GRU reset gate: r is t =σ(W r x t +Urh t-1 +b r )
Wherein z is t To refresh the door, r t To reset the gate, σ is the sigmoid function, W z 、W r 、U z、 Ur is weight, b z 、b r As a bias term, x t As the output of the convolutional neural network, h t-1 The information passed for the last state.
5. The deep learning based epilepsy early warning method according to any one of claims 1 to 4, wherein: in step S4, the electroencephalogram signal of the patient is collected in real time through the electroencephalogram collecting equipment, specifically,
s41, placing the silver/silver chloride collecting electrode on the brain of the person to be collected to obtain the collected electroencephalogram signal;
s42, subtracting and filtering the acquired electroencephalogram signals by using a subtraction filter, amplifying the electroencephalogram signals, adding direct current offset, filtering high-frequency components after outputting the electroencephalogram signals, converting the electroencephalogram analog signals into digital signals through an A/D converter, and transmitting the digital signals to a single chip microcomputer;
s43, the single chip microcomputer divides the digital signal into to-be-detected data segments within the same set time as that in the step S1;
s44, inputting the data to be detected obtained in the step S43 into the deep learning prediction model in a segmented mode to obtain a prediction result of whether the data is a disease occurrence result, and performing early warning when the number of the diseases in the prediction result is larger than a set threshold value; otherwise, it is normal.
6. The deep learning based epilepsy early warning method according to claim 5, wherein: in step S41, the silver/silver chloride collecting electrode is placed on the brain of the person to be collected, and the positions are respectively C3-P3, T8-P8, T7-P7 and P3-O1.
7. An apparatus for implementing the deep learning based epilepsy early warning method according to any one of claims 1 to 6, wherein: the epilepsy early warning method based on deep learning comprises electroencephalogram acquisition equipment and an upper computer, wherein the electroencephalogram acquisition equipment acquires real-time electroencephalogram signals and then sends the real-time electroencephalogram signals to the upper computer, and the upper computer obtains a prediction result by using the epilepsy early warning method based on deep learning according to any one of claims 1-6.
8. The deep learning based epilepsy early warning method according to claim 7, wherein: the electroencephalogram acquisition device comprises a plurality of electroencephalogram acquisition electrodes of the electroencephalogram acquisition device, a subtraction filter, an instrument amplifier, a direct current bias circuit, a passive filter circuit, an A/D converter, a single chip microcomputer, a wireless communication module and a power supply, wherein the power supply supplies power to the electroencephalogram acquisition device, the electroencephalogram acquisition electrodes adopt silver/silver chloride acquisition electrodes, the electroencephalogram acquisition electrodes acquire acquired electroencephalogram signals, the acquired electroencephalogram signals are subjected to subtraction filtering by the subtraction filter, amplified by the instrument amplifier, subjected to direct current bias by the direct current bias circuit, output and then filtered by the passive filter circuit to remove high-frequency components, converted into digital signals by the A/D converter and transmitted to the single chip microcomputer, and the single chip microcomputer is communicated with an upper computer through the wireless communication module.
CN202210823611.0A 2022-07-14 2022-07-14 Epilepsy early warning method and device based on deep learning Pending CN115530754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210823611.0A CN115530754A (en) 2022-07-14 2022-07-14 Epilepsy early warning method and device based on deep learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210823611.0A CN115530754A (en) 2022-07-14 2022-07-14 Epilepsy early warning method and device based on deep learning

Publications (1)

Publication Number Publication Date
CN115530754A true CN115530754A (en) 2022-12-30

Family

ID=84724212

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210823611.0A Pending CN115530754A (en) 2022-07-14 2022-07-14 Epilepsy early warning method and device based on deep learning

Country Status (1)

Country Link
CN (1) CN115530754A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118072947A (en) * 2024-04-18 2024-05-24 长春理工大学 Epileptic prediction method and system combining space-time characteristics

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118072947A (en) * 2024-04-18 2024-05-24 长春理工大学 Epileptic prediction method and system combining space-time characteristics

Similar Documents

Publication Publication Date Title
CN108304917B (en) P300 signal detection method based on LSTM network
Sun et al. Unsupervised EEG feature extraction based on echo state network
CN107495962A (en) A kind of automatic method by stages of sleep of single lead brain electricity
CN110969108B (en) Limb action recognition method based on autonomic motor imagery electroencephalogram
Zhao et al. Graph attention network with focal loss for seizure detection on electroencephalography signals
CN111297349A (en) Machine learning-based heart rhythm classification system
CN109009102B (en) Electroencephalogram deep learning-based auxiliary diagnosis method and system
CN113303814B (en) Single-channel ear electroencephalogram automatic sleep staging method based on deep transfer learning
Chen et al. Epilepsy classification for mining deeper relationships between EEG channels based on GCN
Yu et al. Epileptic seizure prediction using deep neural networks via transfer learning and multi-feature fusion
CN110974219A (en) Human brain idea recognition system based on invasive BCI
Li et al. Patient-specific seizure prediction from electroencephalogram signal via multichannel feedback capsule network
Sharma et al. SzHNN: a novel and scalable deep convolution hybrid neural network framework for schizophrenia detection using multichannel EEG
CN116058800A (en) Automatic sleep stage system based on deep neural network and brain-computer interface
CN113576401A (en) Sleep apnea syndrome rapid diagnosis device based on convolutional neural network
Wan et al. Automatic detection of HFOs based on singular value decomposition and improved fuzzy c-means clustering for localization of seizure onset zones
CN115530754A (en) Epilepsy early warning method and device based on deep learning
Ma et al. An improved Bi-LSTM EEG emotion recognition algorithm
CN113974655A (en) Epileptic seizure prediction method based on electroencephalogram signals
Siuly et al. Exploring Rhythms and Channels-Based EEG Biomarkers for Early Detection of Alzheimer's Disease
CN116269436A (en) Knowledge distillation-based cross-patient unsupervised SEEG epilepsy early warning method
CN115414054A (en) Epilepsia electroencephalogram detection system based on feedforward pulse neural network
Wei et al. Epileptic seizure prediction from multivariate EEG data using Multidimensional convolution network
Wang et al. A patient specific seizure prediction in long term EEG based on adaptive channel selection and preictal period selection
Saadi et al. Low-cost ecg monitoring system with classification using deep learning

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination