Epilepsia positioning and seizure prediction method based on deep learning integration model

文档序号:1837436 发布日期:2021-11-16 浏览:15次 中文

阅读说明:本技术 基于深度学习集成模型的癫痫定位与发作预测方法 (Epilepsia positioning and seizure prediction method based on deep learning integration model ) 是由 王江 庄伟林 蔡立辉 伊国胜 邓斌 魏熙乐 王宽川 于 2021-08-20 设计创作,主要内容包括:一种基于深度学习集成模型的癫痫定位与发作预测方法。其包括构建数据集;构建彩色时频图;获得HFO识别模型;确定疑似致痫通道;获得编码模型、解码模型、降维特征向量、特征预测模型和特征发作识别模型;构建发作预测模型;对被测癫痫患者的癫痫发作进行预测等步骤。本发明中HFO识别模型在卷积神经网络基础上增加对输入的小波变换特征提取,通过彩色时频图实现信号各频段特征增强融合,提高卷积神经网络的特征提取效果。HFO识别模型优化人工观察脑电信号寻找HFO信号过程,即定位致痫通道的复杂过程。发作预测模型能简化特征工程工作,利用卷积自编码模型实现自动提取降维特征,不需确定癫痫发作前期和利用先验知识提取信号特征。(An epilepsia positioning and seizure prediction method based on a deep learning integration model. It includes constructing a data set; constructing a color time-frequency diagram; obtaining an HFO identification model; determining a suspected seizure-causing channel; obtaining a coding model, a decoding model, a dimension reduction feature vector, a feature prediction model and a feature attack identification model; constructing an attack prediction model; and predicting the epileptic seizure of the tested epileptic patient. According to the invention, the HFO identification model is additionally used for extracting input wavelet transformation characteristics on the basis of the convolutional neural network, and the characteristic enhancement and fusion of each frequency band of the signal are realized through a color time-frequency graph, so that the characteristic extraction effect of the convolutional neural network is improved. The HFO identification model optimizes the process of artificially observing electroencephalogram signals and searching for the HFO signals, namely the complex process of locating epileptogenic channels. The seizure prediction model can simplify the work of feature engineering, and the convolution self-coding model is utilized to realize the automatic extraction of dimension reduction features without determining the early stage of the seizure and utilizing the prior knowledge to extract the signal features.)

1. A deep learning integration model-based epilepsy localization and seizure prediction method is characterized by comprising the following steps: the method comprises the following steps performed in sequence:

1) collecting multichannel stereotactic electroencephalogram signals of epileptics, processing the signals to obtain segmented signals of each channel, marking the segmented signals, and constructing an S1 stage for identifying an HFO data set;

2) a stage S2 of extracting the characteristic of the continuous wavelet transform of the segmented signals with marks in the HFO data set and constructing a color time-frequency diagram;

3) an S3 stage of constructing an HFO identification model and inputting a color time-frequency diagram for training to obtain the trained HFO identification model;

4) inputting each channel segment signal into the trained HFO recognition model, thereby determining the stage S4 of the suspected seizure-causing channel;

5) a step S5 of constructing a convolutional self-coding model consisting of a coding model and a decoding model, processing the segmented signals of the suspected epilepsy-causing channel to obtain epilepsy-causing fragment signals, inputting the signals into the convolutional self-coding model for training, and obtaining a trained coding model and a decoding model;

6) inputting seizure-causing fragment signals into the coding model trained in the step 5) to obtain an S6 stage of dimension-reducing feature vectors;

7) constructing a feature prediction model and inputting the dimension-reduced feature vector obtained in the step 6) for training to obtain a trained feature prediction model at S7;

8) constructing a characteristic attack recognition model and inputting the dimension-reduced characteristic vector obtained in the step 6) for training to obtain a trained characteristic attack recognition model at S8;

9) an S9 stage of connecting the trained coding model, the feature prediction model and the feature attack recognition model to construct an attack prediction model;

10) and (3) predicting the epileptic seizure of the tested epileptic patient by using the seizure prediction model at the S10 stage.

2. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 1), the method for acquiring multichannel stereotactic electroencephalogram signals of epileptic patients, processing the signals to obtain segmented signals of each channel, marking the segmented signals, and constructing and identifying HFO data sets comprises the following steps:

collecting multichannel stereotactic electroencephalogram signals of a plurality of epileptics by using a deep electrode; then slicing the stereotactic electroencephalogram signal of each channel in a sliding window mode to obtain segmented signals; marking all the segmented signals as two categories of HFO and non-HFO by experts according to experience, wherein the segmented signal with HFO is marked as 1, and the segmented signal without HFO is marked as 0, and obtaining the segmented signals with the marks; an identification HFO data set is constructed from all of the labeled segmented signals and randomly divided into a training set and a test set in an 8:2 ratio.

3. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 2), the specific steps of performing continuous wavelet transform on the segmented signals with marks in the HFO data set to extract features and constructing a color time-frequency diagram are as follows:

(2.1) carrying out continuous wavelet transformation on the segmented signals with marks for identifying each channel in the HFO data set by adopting three groups of resolutions with scales of 1 Hz, 2 Hz and 3Hz respectively to obtain three groups of time-frequency characteristic signals TF respectively1(400*500)、TF2(400*250)、TF3(400 x 167), wherein 400 represents sampling time points, 500, 250 and 167 represent frequency points;

(2.2) dividing the three groups of time frequency characteristic signals into three groups of frequency band signals of three frequency bands of 1-80Hz, 81-240Hz and 241-480Hz, and respectively corresponding to the time frequency characteristic signal TF with the scale of 11Middle and first 80 columns of signals and time-frequency characteristic signal TF with scale of 22The signals of the middle 41 th column to 120 th column and the time-frequency characteristic signal TF with the scale of 33The 81 th to 160 th columns of signals, that is, the three groups of obtained frequency band signals are all time frequency characteristic signals with the size of 400 × 80, and the three groups of frequency band signals are respectively used as three groups of channel signals of a color time frequency diagram;

and (2.3) normalizing the three groups of frequency band signals to 0-255, and fusing to construct a color time-frequency diagram.

4. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1 or 2, wherein: in step 3), the method for constructing the HFO identification model and inputting the color time-frequency diagram for training to obtain the trained HFO identification model comprises:

constructing an HFO identification model, wherein the model consists of two groups of 3 × 3 convolution layers, a ReLU activation layer, a maximum pooling layer and a full connection layer;

inputting the color time-frequency diagram in the training set into an HFO identification model for forward propagation, then calculating the output of the HFO identification model and the cross entropy loss function value with an HFO mark 1 or without an HFO mark 0 in the step 1), updating a reverse weight value by using an Adam optimization algorithm, then testing the accuracy of the HFO identification model by using the color time-frequency diagram in the testing set, and continuously iterating and optimizing the weight value and the bias of the model until the HFO identification model achieves a good classification effect to obtain the trained HFO identification model.

5. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 4), inputting each channel segment signal into the trained HFO recognition model, thereby determining a suspected epilepsy-causing channel by:

inputting the segmented signals of all channels of the epileptic obtained in the step 1) into the trained HFO recognition model, judging whether the segmented signals contain HFO signals according to the output of the model, and screening out channels with a large number as suspected epilepsy causing channels by comparing the number of the HFO signals appearing in each channel, thereby completing the auxiliary positioning of the epilepsy causing channels.

6. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 5), constructing a convolutional self-coding model composed of a coding model and a decoding model, processing the segmented signals of the suspected epilepsy-causing channel to obtain epilepsy-causing segment signals, inputting the epilepsy-causing segment signals into the convolutional self-coding model for training, and specifically, the steps of the obtained trained coding model and decoding model are as follows:

(5.1) constructing a convolution self-coding model consisting of a coding model and a decoding model; the coding model consists of a normalization layer, a plurality of convolution layers, a BN layer, a PReLu active layer and a maximum pooling layer; the formula for normalizing the signal is:

(X-Xmean)/Xstd

wherein X is the signal of each channel, XmeanIs the data average, X, of each channel signalstdThe data standard deviation of each channel signal is obtained;

the decoding model consists of a plurality of groups of deconvolution layers, BN layers and a PReLu active layer;

(5.2) selecting three channels with the largest quantity of HFO signals from the suspected epilepsy-causing channels as epilepsy-causing prediction channels, slicing segmented signals of all the epilepsy-causing prediction channels to obtain a plurality of groups of fragment signals, and manually marking seizure and non-seizure fragment signals as epilepsy-causing fragment signals, wherein the seizure fragment signal is marked as 1, and the non-seizure fragment signal is marked as 0;

(5.3) inputting the seizure-causing segment signals into a coding model to obtain dimension-reducing characteristic vectors, inputting the dimension-reducing characteristic vectors into a decoding model to reconstruct the signals, and performing Sigmoid mapping on the output to obtain reconstructed signals;

(5.4) calculating the mean square error loss function value of the input epileptogenic fragment signal and the reconstruction signal, wherein the formula is as follows:

loss(Xi,Yi)=(Xi-Yi)2

and updating a reverse weight by using an Adam optimization algorithm, and obtaining a trained coding model and a decoding model by iterating the weight and the bias of an optimization model until a convolutional self-coding network model achieves a good convergence effect.

7. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 7), the method for constructing the feature prediction model and inputting the dimension-reduced feature vector obtained in step 6) for training to obtain the trained feature prediction model comprises the following steps:

the characteristic prediction model consists of two layers of ConvLSTM units; the calculation formula of the ConvLSTM unit is as follows:

it=σ(Wiixt+bii+Whih(t-1)+bhi)

ft=σ(Wifxt+bif+Whfh(t-1)+bhf)

gt=tanh(Wigxt+big+Whgh(t-1)+bhg)

ot=σ(Wioxt+bio+Whoh(t-1)+bho)

ct=ftc(t-1)+itgt

ht=ot tanh(ct)

wherein x is an input dimension reduction feature vector, h is a hidden state, c is a cell state, the hidden state h and the cell state c at the initial moment are zero vectors, the output of the hidden state h and the cell state c of the ConvLSTM unit at the previous moment is used as the input of the next moment, sigma is a Sigmoid function, and W is convolution calculation;

inputting the dimensionality reduction feature vectors obtained in the step 6) into a feature prediction model according to a time sequence to carry out staged training; setting a time step length, sequentially inputting a plurality of dimension reduction characteristic vectors obtained in each second in the time step length into a characteristic prediction model in each training stage according to the time sequence, then calculating the mean square error loss function value of the output of the characteristic prediction model and continuous and same number of dimension reduction characteristic vectors obtained by pushing for 1 second backwards, and carrying out reverse update on the weight of the model by adopting a random gradient descent method; the hidden state h and the cell state c output at the end of each training stage are used as the initial state input of the next training stage; and (4) obtaining the trained feature prediction model by iteratively optimizing the weight and the bias of the model until the feature prediction model achieves a good convergence effect.

8. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1 or 5, wherein: in step 8), the method for constructing the feature seizure recognition model and inputting the dimension-reduced feature vector obtained in step 6) for training to obtain the trained feature seizure recognition model comprises the following steps:

the characteristic attack recognition model is a fully connected network;

inputting all the dimensionality-reduced feature vectors obtained in the step 6) into a feature seizure recognition model for training, calculating a cross entropy loss function value of the output of the model and a seizure mark 1 or a non-seizure mark 0, updating a reverse weight by adopting an Adam optimization algorithm, and obtaining a trained feature seizure recognition model with high classification accuracy through iterative fitting.

9. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 9), the method of constructing the seizure prediction model by connecting the trained coding model, the feature prediction model, and the feature seizure recognition model includes:

and (3) integrally connecting the trained coding model obtained in the step 5), the trained feature prediction model obtained in the step 7) and the trained feature attack recognition model obtained in the step 8), namely, taking the output of the coding model as the input of the feature prediction model, and then taking the output of the feature prediction model as the input of the feature attack recognition model, thereby constructing the attack prediction model.

10. The deep learning integration model-based epilepsy localization and seizure prediction method according to claim 1, wherein: in step 10), the specific steps of predicting the epileptic seizure of the tested epileptic patient by using the seizure prediction model are as follows:

(10.1) processing the multichannel stereotactic electroencephalogram signal of the epileptic to be detected according to the method from the step 1) to the step 5) to obtain an epileptogenic fragment signal;

(10.2) respectively inputting the seizure induction fragment signals into a coding model of a seizure prediction model according to the time sequence, and outputting corresponding dimension-reduced feature vectors F by the seizure induction fragment signals at each momentt

(10.3) outputting the reduced-dimension feature vector F of the coding modeltInputting the feature prediction vector F into a feature prediction model, and calculating feature prediction vectors F of the next N moments through the feature prediction model by taking the current moment T as a referenceT+N

(10.4) calculating the feature prediction vector F of N moments behind the current moment by the feature prediction modelT+NInputting the measured data into a characteristic seizure identification model, determining whether the epilepsy of the detected epileptic patient occurs at N moments after the current moment, and obtaining the epileptic seizure prediction result of the detected epileptic patient.

Technical Field

The invention belongs to the technical field of epilepsy localization and seizure prediction, and particularly relates to an epilepsy localization and seizure prediction method based on a deep learning integration model.

Background

Epilepsy is transient cerebral dysfunction caused by abnormal discharge of cerebral neurons, is a very common chronic nervous system disease, and has clinical symptoms of consciousness loss, convulsion, even faint and sometimes repeated attack. Patients are expected to undergo surgical treatment to get rid of the effects of the disease on work and life, however, there is an important problem in surgical removal of epileptogenic foci-how to preserve the corresponding brain functional area without being destroyed. Under the influence of a plurality of limitation factors, a doctor can only perform palliative excision, which can cause the occurrence of the conditions of relapse of diseases or brain function damage and the like, so that accurate positioning of an epileptic focus is very important for a patient. At present, a plurality of preoperative assessment methods which are widely applied are clinically used for positioning epileptogenic focus: detailed interrogation of medical history, long-range video electroencephalographic monitoring, structural and functional Magnetic Resonance (MRI), etc. An intracranial electrode electroencephalogram as a standard for locating epileptogenic focus, such as stereotactic electroencephalogram (SEEG), is an intracranial multi-contact deep electrode implantation and monitoring technique. Clinical experience has found that High Frequency Oscillation (HFOs) signals in the electrode signal are closely related to the onset of epilepsy. The method is characterized in that a clinician positions an epilepsy-causing resection area before an operation, and mainly searches a channel with an HFO signal as a suspicious epilepsy-causing area by observing a channel signal of electroencephalogram acquisition software.

The brain electrical signal is formed by summing the postsynaptic potentials generated synchronously by a large number of neurons, and records the electrical wave changes during brain activities. By means of the time-space characteristics of the electroencephalogram signals, the potential activity characteristics of the electroencephalogram signals can be fully developed. The process of epilepsia seizure can be regarded as the process of pathological neuron state transition, and from the aspect of electroencephalogram signal, the process can be regarded as the process of explosive intermittent abnormal discharge (HFO) to continuous abnormal discharge. Generally, there is a transition period between the inter-and intra-seizure phases of epilepsy, referred to as the pre-seizure phase. The recognition of the early stage of epileptic seizure as a sign for epileptic seizure prediction has become a mainstream research method, and the detection of the early stage of epileptic seizure can be realized by extracting the electroencephalogram characteristics of the early stage of epileptic seizure and means such as machine learning.

Although EEG signals such as SEEG and the like are widely applied to treatment and research of epilepsy, the using method of the EEG signals still has a plurality of defects:

one is as follows: because there is currently no efficient and accurate tool for finding HFOs signals in channel signals, the acquired signals can only be manually screened frame by experienced physicians. As the number of channels of the SEEG acquisition equipment can reach hundreds, and the sampling frequency is higher than 2000Hz, the manual screening is time-consuming and labor-consuming.

The second step is as follows: in the study of predicting epilepsy, the determination of the pre-epileptic seizure is difficult, and the period of advancing the onset time of the seizure cannot be simply taken as the pre-epileptic seizure; in addition, the electroencephalogram signal identification based on common machine learning at present is carried out under the concept of feature engineering, namely, a large amount of priori knowledge is needed to carry out feature extraction on the signal, and then model training and identification are carried out, so that different features generate different identification effects.

Disclosure of Invention

In order to solve the above problems, the present invention provides an epilepsy localization and seizure prediction method based on a deep learning integration model.

In order to achieve the above object, the deep learning integration model-based epilepsy localization and seizure prediction method provided by the present invention comprises the following steps performed in sequence:

1) collecting multichannel stereotactic electroencephalogram signals of epileptics, processing the signals to obtain segmented signals of each channel, marking the segmented signals, and constructing an S1 stage for identifying an HFO data set;

2) a stage S2 of extracting the characteristic of the continuous wavelet transform of the segmented signals with marks in the HFO data set and constructing a color time-frequency diagram;

3) an S3 stage of constructing an HFO identification model and inputting a color time-frequency diagram for training to obtain the trained HFO identification model;

4) inputting each channel segment signal into the trained HFO recognition model, thereby determining the stage S4 of the suspected seizure-causing channel;

5) a step S5 of constructing a convolutional self-coding model consisting of a coding model and a decoding model, processing the segmented signals of the suspected epilepsy-causing channel to obtain epilepsy-causing fragment signals, inputting the signals into the convolutional self-coding model for training, and obtaining a trained coding model and a decoding model;

6) inputting seizure-causing fragment signals into the coding model trained in the step 5) to obtain an S6 stage of dimension-reducing feature vectors;

7) constructing a feature prediction model and inputting the dimension-reduced feature vector obtained in the step 6) for training to obtain a trained feature prediction model at S7;

8) constructing a characteristic attack recognition model and inputting the dimension-reduced characteristic vector obtained in the step 6) for training to obtain a trained characteristic attack recognition model at S8;

9) an S9 stage of connecting the trained coding model, the feature prediction model and the feature attack recognition model to construct an attack prediction model;

10) and (3) predicting the epileptic seizure of the tested epileptic patient by using the seizure prediction model at the S10 stage.

In step 1), the method for acquiring multichannel stereotactic electroencephalogram signals of epileptic patients, processing the signals to obtain segmented signals of each channel, marking the segmented signals, and constructing and identifying HFO data sets comprises the following steps:

collecting multichannel stereotactic electroencephalogram signals of a plurality of epileptics by using a deep electrode; then slicing the stereotactic electroencephalogram signal of each channel in a sliding window mode to obtain segmented signals; marking all the segmented signals as two categories of HFO and non-HFO by experts according to experience, wherein the segmented signal with HFO is marked as 1, and the segmented signal without HFO is marked as 0, and obtaining the segmented signals with the marks; an identification HFO data set is constructed from all of the labeled segmented signals and randomly divided into a training set and a test set in an 8:2 ratio.

In step 2), the specific steps of performing continuous wavelet transform on the segmented signals with marks in the HFO data set to extract features and constructing a color time-frequency diagram are as follows:

(2.1) carrying out continuous wavelet transformation on the segmented signals with marks for identifying each channel in the HFO data set by adopting three groups of resolutions with scales of 1 Hz, 2 Hz and 3Hz respectively to obtain three groups of time-frequency characteristic signals TF respectively1(400*500)、TF2(400*250)、TF3(400 x 167), wherein 400 represents sampling time points, 500, 250 and 167 represent frequency points;

(2.2) dividing the three groups of time frequency characteristic signals into three groups of frequency band signals of three frequency bands of 1-80Hz, 81-240Hz and 241-480Hz, and respectively corresponding to the time frequency characteristic signal TF with the scale of 11Middle and first 80 columns of signals and time-frequency characteristic signal TF with scale of 22The signals of the middle 41 th column to 120 th column and the time-frequency characteristic signal TF with the scale of 33The 81 th to 160 th columns of signals, that is, the three groups of obtained frequency band signals are all time frequency characteristic signals with the size of 400 × 80, and the three groups of frequency band signals are respectively used as three groups of channel signals of a color time frequency diagram;

and (2.3) normalizing the three groups of frequency band signals to 0-255, and fusing to construct a color time-frequency diagram.

In step 3), the method for constructing the HFO identification model and inputting the color time-frequency diagram for training to obtain the trained HFO identification model comprises:

constructing an HFO identification model, wherein the model consists of two groups of 3 × 3 convolution layers, a ReLU activation layer, a maximum pooling layer and a full connection layer;

inputting the color time-frequency diagram in the training set into an HFO identification model for forward propagation, then calculating the output of the HFO identification model and the cross entropy loss function value with an HFO mark 1 or without an HFO mark 0 in the step 1), updating a reverse weight value by using an Adam optimization algorithm, then testing the accuracy of the HFO identification model by using the color time-frequency diagram in the testing set, and continuously iterating and optimizing the weight value and the bias of the model until the HFO identification model achieves a good classification effect to obtain the trained HFO identification model.

In step 4), inputting each channel segment signal into the trained HFO recognition model, thereby determining a suspected epilepsy-causing channel by:

inputting the segmented signals of all channels of the epileptic obtained in the step 1) into the trained HFO recognition model, judging whether the segmented signals contain HFO signals according to the output of the model, and screening out channels with a large number as suspected epilepsy causing channels by comparing the number of the HFO signals appearing in each channel, thereby completing the auxiliary positioning of the epilepsy causing channels.

In step 5), constructing a convolutional self-coding model composed of a coding model and a decoding model, processing the segmented signals of the suspected epilepsy-causing channel to obtain epilepsy-causing segment signals, inputting the epilepsy-causing segment signals into the convolutional self-coding model for training, and specifically, the steps of the obtained trained coding model and decoding model are as follows:

(5.1) constructing a convolution self-coding model consisting of a coding model and a decoding model; the coding model consists of a normalization layer, a plurality of convolution layers, a BN layer, a PReLu active layer and a maximum pooling layer; the formula for normalizing the signal is:

(X-Xmean)/Xstd

wherein X is the signal of each channel, XmeanIs the data average, X, of each channel signalstdThe data standard deviation of each channel signal is obtained;

the decoding model consists of a plurality of groups of deconvolution layers, BN layers and a PReLu active layer;

(5.2) selecting three channels with the largest quantity of HFO signals from the suspected epilepsy-causing channels as epilepsy-causing prediction channels, slicing segmented signals of all the epilepsy-causing prediction channels to obtain a plurality of groups of fragment signals, and manually marking seizure and non-seizure fragment signals as epilepsy-causing fragment signals, wherein the seizure fragment signal is marked as 1, and the non-seizure fragment signal is marked as 0;

(5.3) inputting the seizure-causing segment signals into a coding model to obtain dimension-reducing characteristic vectors, inputting the dimension-reducing characteristic vectors into a decoding model to reconstruct the signals, and performing Sigmoid mapping on the output to obtain reconstructed signals;

(5.4) calculating the mean square error loss function value of the input epileptogenic fragment signal and the reconstruction signal, wherein the formula is as follows:

loss(Xi,Yi)=(Xi-Yi)2

and updating a reverse weight by using an Adam optimization algorithm, and obtaining a trained coding model and a decoding model by iterating the weight and the bias of an optimization model until a convolutional self-coding network model achieves a good convergence effect.

In step 7), the method for constructing the feature prediction model and inputting the dimension-reduced feature vector obtained in step 6) for training to obtain the trained feature prediction model comprises the following steps:

the characteristic prediction model consists of two layers of ConvLSTM units; the calculation formula of the ConvLSTM unit is as follows:

it=σ(Wiixt+bii+Whih(t-1)+bhi)

ft=σ(Wifxt+bif+Whfh(t-1)+bhf)

gt=tanh(Wigxt+big+Whgh(t-1)+bhg)

ot=σ(Wioxt+bio+Whoh(t-1)+bho)

ct=ftc(t-1)+itgt

ht=ottanh(ct)

wherein x is an input dimension reduction feature vector, h is a hidden state, c is a cell state, the hidden state h and the cell state c at the initial moment are zero vectors, the output of the hidden state h and the cell state c of the ConvLSTM unit at the previous moment is used as the input of the next moment, sigma is a Sigmoid function, and W is convolution calculation;

inputting the dimensionality reduction feature vectors obtained in the step 6) into a feature prediction model according to a time sequence to carry out staged training; setting a time step length, sequentially inputting a plurality of dimension reduction characteristic vectors obtained in each second in the time step length into a characteristic prediction model in each training stage according to the time sequence, then calculating the mean square error loss function value of the output of the characteristic prediction model and continuous and same number of dimension reduction characteristic vectors obtained by pushing for 1 second backwards, and carrying out reverse update on the weight of the model by adopting a random gradient descent method; the hidden state h and the cell state c output at the end of each training stage are used as the initial state input of the next training stage; and (4) obtaining the trained feature prediction model by iteratively optimizing the weight and the bias of the model until the feature prediction model achieves a good convergence effect.

In step 8), the method for constructing the feature seizure recognition model and inputting the dimension-reduced feature vector obtained in step 6) for training to obtain the trained feature seizure recognition model comprises the following steps:

the characteristic attack recognition model is a fully connected network;

inputting all the dimensionality-reduced feature vectors obtained in the step 6) into a feature seizure recognition model for training, calculating a cross entropy loss function value of the output of the model and a seizure mark 1 or a non-seizure mark 0, updating a reverse weight by adopting an Adam optimization algorithm, and obtaining a trained feature seizure recognition model with high classification accuracy through iterative fitting.

In step 9), the method of constructing the seizure prediction model by connecting the trained coding model, the feature prediction model, and the feature seizure recognition model includes:

and (3) integrally connecting the trained coding model obtained in the step 5), the trained feature prediction model obtained in the step 7) and the trained feature attack recognition model obtained in the step 8), namely, taking the output of the coding model as the input of the feature prediction model, and then taking the output of the feature prediction model as the input of the feature attack recognition model, thereby constructing the attack prediction model.

In step 10), the specific steps of predicting the epileptic seizure of the tested epileptic patient by using the seizure prediction model are as follows:

(10.1) processing the multichannel stereotactic electroencephalogram signal of the epileptic to be detected according to the method from the step 1) to the step 5) to obtain an epileptogenic fragment signal;

(10.2) respectively inputting the seizure induction fragment signals into a coding model of a seizure prediction model according to the time sequence, and outputting corresponding dimension-reduced feature vectors F by the seizure induction fragment signals at each momentt

(10.3) outputting the reduced-dimension feature vector F of the coding modeltInputting the feature prediction vector F into a feature prediction model, and calculating feature prediction vectors F of the next N moments through the feature prediction model by taking the current moment T as a referenceT+N

(10.4) calculating the feature prediction vector F of N moments behind the current moment by the feature prediction modelT+NInputting the measured data into a characteristic seizure identification model, determining whether the epilepsy of the detected epileptic patient occurs at N moments after the current moment, and obtaining the epileptic seizure prediction result of the detected epileptic patient.

Compared with the prior art, the invention has the following beneficial effects: the HFO identification model is additionally used for extracting input wavelet transformation characteristics on the basis of the convolutional neural network, the characteristics of each frequency band of the signal are enhanced and fused through a color time-frequency graph, and the characteristic extraction effect of the convolutional neural network is improved. The HFO identification model optimizes the current process of manually observing electroencephalogram signals to find the HFO signals, namely the complex process of positioning epileptogenic channels. The seizure prediction model can simplify the work of characteristic engineering, utilizes the convolution self-coding model to realize automatic extraction of dimension reduction characteristics, does not need to determine the early stage of the epileptic seizure and extract signal characteristics by utilizing priori knowledge, and the prediction capability of the model enables a tested epileptic patient to receive an alarm signal of the epileptic seizure in advance.

Drawings

Fig. 1 is a flowchart of an epilepsy localization and seizure prediction method based on a deep learning integration model according to the present invention.

FIG. 2 is a flow chart of an HFO identification process for constructing a color time-frequency diagram based on wavelet transformation according to the present invention.

FIG. 3 is a schematic diagram of an attack prediction model training process according to the present invention;

fig. 4 is a flow chart of the epileptic symptom seizure prediction process in the present invention.

Detailed Description

In order to make the technical solutions of the present invention more clear and definite for those skilled in the art, the present invention will be further described in detail with reference to the accompanying drawings and specific examples, but the embodiments of the present invention are not limited thereto.

As shown in fig. 1, the deep learning integration model-based epilepsy localization and seizure prediction method provided by the present invention comprises the following steps performed in sequence:

1) collecting multichannel stereotactic electroencephalogram signals of epileptics, processing the signals to obtain segmented signals of each channel, marking the segmented signals, and constructing an S1 stage for identifying an HFO data set;

the deep electrode is used for collecting multichannel stereotactic electroencephalogram signals of a plurality of epileptics, the sampling frequency is 2000Hz, and the number of channels is about 100; then slicing the stereotactic electroencephalogram signal of each channel in a sliding window mode to obtain segmented signals, wherein the window length is 0.2 second, the sampling point is 400, and the step length is 0.2 second; marking all the segmented signals as two categories of HFO and non-HFO by experts according to experience, wherein the segmented signal with HFO is marked as 1, and the segmented signal without HFO is marked as 0, and obtaining the segmented signals with the marks; constructing and identifying an HFO data set by all segmented signals with marks, and randomly dividing the HFO data set into a training set and a test set according to the ratio of 8: 2;

2) a stage S2 of extracting the characteristic of the continuous wavelet transform of the segmented signals with marks in the HFO data set and constructing a color time-frequency diagram;

as shown in fig. 2, the specific steps are as follows:

(2.1) Continuous Wavelet Transform (CWT) has the following definition: let Ψ (t) be a wavelet function, which is scaled and translated into:

where a is the scale factor and b is the translation factor,. psia,b(t) is the wavelet basis function, so that the following continuous wavelet transform formula can be obtained:

wherein the wavelet transform coefficient of the function f (t) at a certain scale factor a and shift factor b is characterized by the frequency component size in the corresponding frequency window. After wavelet transformation, a time domain function can be projected on a two-dimensional time-scale phase plane.

Carrying out continuous wavelet transformation on the segmented signals with marks for identifying each channel in the HFO data set by adopting three groups of resolutions with different frequencies (the scales are respectively 1, 2 and 3Hz), and respectively obtaining three groups of time-frequency characteristic signals TF1(400*500)、TF2(400*250)、TF3(400 x 167), wherein 400 represents sampling time points, 500, 250 and 167 represent frequency points;

(2.2) dividing the three groups of time frequency characteristic signals into three groups of frequency band signals of three frequency bands of 1-80Hz, 81-240Hz and 241-480Hz, and respectively corresponding to the time frequency characteristic signal TF with the scale of 11Middle and first 80 columns of signals and time-frequency characteristic signal TF with scale of 22The signals of the middle 41 th column to 120 th column and the time-frequency characteristic signal TF with the scale of 33The 81 th to 160 th columns of signals, that is, the three groups of obtained frequency band signals are all time frequency characteristic signals with the size of 400 × 80, and the three groups of frequency band signals are respectively used as three groups of channel signals of a color time frequency diagram;

(2.3) normalizing the three groups of frequency band signals to 0-255, and then fusing to construct a color time-frequency diagram;

3) an S3 stage of constructing an HFO identification model and inputting a color time-frequency diagram for training to obtain the trained HFO identification model;

an HFO identification model was constructed as shown in fig. 2, consisting of two sets of 3 × 3 convolution layers, a ReLU activation layer, a maximum pooling layer and a full connection layer.

Inputting the color time-frequency diagram in the training set into an HFO identification model for forward propagation, then calculating the output of the HFO identification model and the cross entropy loss function value (cross entropy loss) with an HFO mark 1 or without an HFO mark 0 in the step 1), updating a reverse weight by using an Adam optimization algorithm, then testing the accuracy of the HFO identification model by using the color time-frequency diagram in the testing set, and continuously iterating and optimizing the weight and the offset of the model until the HFO identification model achieves a good classification effect to obtain the trained HFO identification model;

4) inputting each channel segment signal into the trained HFO recognition model, thereby determining the stage S4 of the suspected seizure-causing channel;

inputting the segmented signals of all channels of the epileptic obtained in the step 1) into the trained HFO recognition model, judging whether the segmented signals contain HFO signals according to the output of the model, and screening out channels with a large number as suspected epilepsy causing channels by comparing the number of the HFO signals appearing in each channel, thereby completing the auxiliary positioning of the epilepsy causing channels.

5) A step S5 of constructing a convolutional self-coding model consisting of a coding model and a decoding model, processing the segmented signals of the suspected epilepsy-causing channel to obtain epilepsy-causing fragment signals, inputting the signals into the convolutional self-coding model for training, and obtaining a trained coding model and a decoding model;

the method comprises the following specific steps:

(5.1) constructing a convolution self-coding model consisting of a coding model and a decoding model as shown in FIG. 3; the coding model consists of a normalization layer, a plurality of convolution layers, a BN layer, a PReLu active layer and a maximum pooling layer; the formula for normalizing the signal is:

(X-Xmean)/Xstd (3)

wherein X is each channel informationNumber XmeanIs the data average, X, of each channel signalstdIs the data standard deviation of each channel signal.

The decoding model consists of a plurality of groups of deconvolution layers, BN layers and a PReLu active layer;

(5.2) selecting three channels with the largest quantity of HFO signals from the suspected epilepsy-causing channels as epilepsy-causing prediction channels, slicing segmented signals of all the epilepsy-causing prediction channels, wherein the window length is 1 second, the sampling point is 2000, the step length is 1 second, obtaining a plurality of groups of 3 x 2000 segment signals, manually marking the segment signals with seizures and non-seizures as epilepsy-causing segment signals, wherein the mark of the seizure segment signals is 1, and the mark of the non-seizure segment signals is 0;

(5.3) inputting the seizure-causing segment signals into a coding model to obtain dimension-reducing characteristic vectors, inputting the dimension-reducing characteristic vectors into a decoding model to reconstruct the signals, and performing Sigmoid mapping on the output to obtain reconstructed signals;

(5.4) calculating the mean square error loss function value of the input epileptogenic fragment signal and the reconstruction signal, wherein the formula is as follows:

loss(Xi,Yi)=(Xi-Yi)2 (4)

and updating a reverse weight by using an Adam optimization algorithm, and obtaining a trained coding model and a decoding model by iterating the weight and the bias of an optimization model until a convolutional self-coding network model achieves a good convergence effect.

6) Inputting seizure-causing segment signals into the coding model trained in the step 5) to obtain a dimension-reduced feature vector Ft-1,Ft……Ft+nStage S6;

7) constructing a feature prediction model and inputting the dimension-reduced feature vector obtained in the step 6) for training to obtain a trained feature prediction model at S7;

as shown in fig. 3, the feature prediction model consists of two layers of ConvLSTM units. The calculation formula of the ConvLSTM unit is as follows:

wherein x is an input dimension reduction feature vector, h is a hidden state, c is a cell state, the hidden state h and the cell state c at the initial moment are zero vectors, the output of the hidden state h and the cell state c of the ConvLSTM unit at the previous moment is used as the input of the next moment, sigma is a Sigmoid function, and W is convolution calculation.

Inputting the dimension-reduced feature vectors F obtained in the step 6) according to the time sequencet-1,Ft……Ft+nAnd training in a feature prediction model in stages. In the invention, the set time step is 10 seconds, namely, each training stage is sequentially input with 10 dimension-reducing feature vectors F obtained every second in 10 seconds according to the time sequencet,Ft+1……Ft+9Into a feature prediction model, and then calculating the output P of the feature prediction modelt,Pt+1……Pt+9With 10 successive dimensionality-reduced feature vectors F obtained by pushing back for 1 secondt+1,Ft+2……Ft+10The Loss function value Loss of mean square error and a random gradient descent method (SGD) is adopted to carry out reverse update on the weight of the model; the hidden state h and the cell state c output at the end of each training stage are used as the initial state input of the next training stage; and (4) obtaining the trained feature prediction model by iteratively optimizing the weight and the bias of the model until the feature prediction model achieves a good convergence effect.

8) Constructing a characteristic attack recognition model and inputting the dimension-reduced characteristic vector obtained in the step 6) for training to obtain a trained characteristic attack recognition model at S8;

as shown in fig. 3, the characteristic seizure identification model is a fully connected network;

inputting all the dimension-reduced feature vectors F obtained in the step 6)t-1,Ft……Ft+nTraining in the characteristic attack recognition model, calculating the cross entropy loss function value of the output of the model and the attack mark 1 or the attack mark 0, updating the reverse weight by adopting an Adam optimization algorithm, and obtaining the trained characteristic attack recognition model with higher classification accuracy rate through iterative fittingAnd (4) molding.

9) An S9 stage of connecting the trained coding model, the feature prediction model and the feature attack recognition model to construct an attack prediction model;

and (3) integrally connecting the trained coding model obtained in the step 5), the trained feature prediction model obtained in the step 7) and the trained feature attack recognition model obtained in the step 8), namely, taking the output of the coding model as the input of the feature prediction model, and then taking the output of the feature prediction model as the input of the feature attack recognition model, thereby constructing the attack prediction model.

10) Stage S10 of predicting the epileptic seizure of the tested epileptic patient by using the seizure prediction model;

as shown in fig. 4, the specific steps are as follows:

(10.1) processing the multichannel stereotactic electroencephalogram signal of the epileptic to be detected according to the method from the step 1) to the step 5) to obtain an epileptogenic fragment signal;

(10.2) inputting the seizure induction fragment signals into a coding model of a seizure prediction model respectively according to the time sequence, wherein one seizure induction fragment signal is input for 1 second, and the seizure induction fragment signal at each moment outputs a corresponding dimension-reduced feature vector Ft

(10.3) outputting the reduced-dimension feature vector F of the coding modeltInputting the feature prediction vector F into a feature prediction model, and calculating feature prediction vectors F of the next N moments through the feature prediction model by taking the current moment T as a referenceT+N

(10.4) calculating the feature prediction vector F of N moments behind the current moment by the feature prediction modelT+NInputting the measured data into a characteristic seizure identification model, determining whether the epilepsy of the detected epileptic patient occurs at N moments after the current moment, and obtaining the epileptic seizure prediction result of the detected epileptic patient.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:可穿戴式脑干响应记录设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!