Ripple and rapid ripple detection method based on stack type sparse self-coding model

文档序号:1278155 发布日期:2020-08-28 浏览:8次 中文

阅读说明:本技术 一种基于栈式稀疏自编码模型的涟波和快速涟波检测方法 (Ripple and rapid ripple detection method based on stack type sparse self-coding model ) 是由 吴敏 覃宏振 万雄波 陈略峰 杜玉晓 于 2020-04-27 设计创作,主要内容包括:本发明提供了一种基于栈式稀疏自编码模型的涟波和快速涟波检测方法,包括采用两个切比雪夫Ⅰ型数字带通滤波器分别获取原始脑电信号80Hz-250Hz和250Hz-500Hz频率范围的信号分量,并利用移动窗技术将滤波后的脑电信号截成多个持续时间为100ms的小段信号,得到80Hz-250Hz和250Hz-500Hz两类脑电信号段;利用得到的两类脑电信号段分别训练两个栈式稀疏自编码器;利用训练后的栈式稀疏自编码器编码部分和softmax分类器的参数重构网络,形成两个栈式稀疏自编码模型;利用得到的两个栈式稀疏自编码模型分别检测80Hz-250Hz脑电信号段中的涟波和250Hz-500Hz脑电信号段中的快速涟波。本发明的有益效果是:实现癫痫脑电信号中涟波和快速涟波的快速和自动检测,协助医生诊断和治疗癫痫。(The invention provides a ripple and rapid ripple detection method based on a stack-type sparse self-coding model, which comprises the steps of adopting two Chebyshev I-type digital band-pass filters to respectively obtain signal components of original electroencephalogram signals in frequency ranges of 80Hz-250Hz and 250Hz-500Hz, and utilizing a moving window technology to cut the filtered electroencephalogram signals into a plurality of small segments of signals with the duration of 100ms to obtain two electroencephalogram signal segments of 80Hz-250Hz and 250Hz-500 Hz; respectively training two stacked sparse self-encoders by using the obtained two types of electroencephalogram signal segments; reconstructing a network by using the trained parameters of the coding part of the stacked sparse self-coding device and the softmax classifier to form two stacked sparse self-coding models; and respectively detecting ripples in 80Hz-250Hz electroencephalogram signal segments and quick ripples in 250Hz-500Hz electroencephalogram signal segments by using the obtained two stacked sparse self-coding models. The invention has the beneficial effects that: the method realizes the rapid and automatic detection of ripple and rapid ripple in the electroencephalogram signals of the epilepsy, and assists doctors in diagnosing and treating the epilepsy.)

1. A ripple and rapid ripple detection method based on a stack type sparse self-coding model is characterized in that: the method comprises the following steps:

s101: acquiring an electroencephalogram signal with a frequency range of 80Hz-250Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 80Hz-250 Hz; acquiring an electroencephalogram signal with a frequency range of 250Hz-500Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 250Hz-500 Hz;

s102: respectively cutting the EEG signal in the frequency range of 80Hz-250Hz and the EEG signal in the frequency range of 250Hz-500Hz into a plurality of small segments of signals by adopting a moving window technology to obtain an 80Hz-250Hz EEG signal segment and a 250Hz-500Hz EEG signal segment;

s103: the stack-type sparse self-coding model is designed aiming at the ripples and the rapid ripples respectively and is used for detecting the ripples in 80Hz-250Hz electroencephalogram signal segments and the rapid ripples in 250Hz-500Hz electroencephalogram signal segments respectively.

2. The ripple and fast ripple detection method based on the stacked sparse self-encoding model according to claim 1, wherein: in the step S101, an electroencephalogram signal recording instrument is adopted to collect original electroencephalogram signals; wherein, an electroencephalogram recorder is provided with a plurality of leads, and each lead is contacted with the brain and records an electroencephalogram signal generated by the contact point.

3. The ripple and fast ripple detection method based on the stacked sparse self-encoding model according to claim 1, wherein: in step S101, the transfer function of the chebyshev type i digital band-pass filter is as follows:

in the above formula, max (M, N) is the order of the Chebyshev type I digital band-pass filter; m is the order of a transfer function numerator polynomial of the Chebyshev type I digital band-pass filter; n is the order of the transfer function denominator polynomial of the Chebyshev type I digital band-pass filter; bmIs the coefficient of the mth order of the molecule; a isnIs the coefficient of the nth order of the denominator; z is the signal to be filtered, i.e. the original brain electrical signal.

4. The ripple and fast ripple detection method based on the stacked sparse self-encoding model according to claim 1, wherein: in the step S102, on the basis of obtaining an electroencephalogram signal with a frequency range of 80Hz-250Hz and an electroencephalogram signal with a frequency range of 250Hz-500Hz, a moving window technology is adopted to cut the long-segment electroencephalogram signal recorded by each lead into a plurality of small-segment signals with the duration of 100ms, and two types of electroencephalogram signal segments of 80Hz-250Hz and 250Hz-500Hz, namely an 80Hz-250Hz electroencephalogram signal segment and a 250Hz-500Hz electroencephalogram signal segment, are obtained; wherein, the r-th segment of electroencephalogram signal xrAs shown in the following formula:

in the above formula, the first and second carbon atoms are,is the rL-th in the filtered long-range electroencephalogram signalwAmplitude of individual sequences, i.e. rL of time sequence of brain electrical signalswA value; l iswIs the window length of the moving window.

5. The ripple and fast ripple detection method based on the stacked sparse self-encoding model according to claim 1, wherein: in the step S103, a stack-type sparse self-coding model is respectively designed for ripple and rapid ripple, and is respectively used for detecting the ripple in 80Hz-250Hz electroencephalogram signal segments and the rapid ripple in 250Hz-500Hz electroencephalogram signal segments; the method specifically comprises the following steps:

s201: respectively selecting 5 candidate model structures for a first stacked sparse self-coding model designed for ripple and a second stacked sparse self-coding model designed for rapid ripple;

s202: the method comprises the steps of forming a first data set by utilizing ripples of clinical marks and normal activity signal segments, forming a second data set by utilizing rapid ripples of clinical marks and normal activity signal segments, wherein the signal segment lengths of the first data set and the second data set are LwRespectively training and testing 5 candidate models of the first stacked sparse self-coding model and 5 candidate models of the second stacked sparse self-coding model by adopting a first data set and a second data set to obtain the specificity and sensitivity respectively corresponding to the 5 candidate models of the first stacked sparse self-coding model and the specificity and sensitivity respectively corresponding to the 5 candidate models of the second stacked sparse self-coding model;

s203: selecting a model with highest specificity and sensitivity from 5 candidate models of the first stacked sparse self-coding model as a first optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a final first optimal stacked sparse self-coding model;

selecting a model with highest specificity and sensitivity from 5 candidate models of the second stacked sparse self-coding model as a second optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a second optimal stacked sparse self-coding model;

s204: and adopting a first optimal stacked sparse self-coding model to detect the ripple in the 80Hz-250Hz electroencephalogram signal segment, and adopting a second optimal stacked sparse self-coding model to detect the rapid ripple in the 250Hz-500Hz electroencephalogram signal segment.

6. The method for ripple and fast ripple detection based on a stacked sparse self-encoding model of claim 5, wherein: in step S201, the first stacked sparse self-coding model is used to detect ripples in 80Hz-250Hz electroencephalogram signal segments, and the number m of hidden layer nodes of 5 candidate model structures thereof1-m2Respectively 150-120, 120-90, 90-60, 60-30 and 30-10; the second stacked sparse self-coding model is used for detecting the rapid ripples in the 250Hz-500Hz electroencephalogram signal segment, and the number m of hidden layer nodes of 5 candidate model structures is1-m2Respectively 200-150, 150-120, 120-90, 90-60 and 60-30; m is1-m2The number of nodes representing the first hidden layer of the stacked sparse self-coding model is m1The number of nodes of the second hidden layer is m2

7. The method of ripple and fast ripple detection based on a stacked sparse self-encoding model of claim 6, wherein: in step S202, the first data set comprises a plurality of labeled ripple signal segments and a plurality of labeled normal activity signal segments, and the second data set comprises a plurality of labeled fast ripple signal segments and a plurality of labeled normal activity signal segments;

respectively training and testing a certain candidate model of the 5 candidate models of the first stacked sparse self-coding model and a certain candidate model of the 5 candidate models of the second stacked sparse self-coding model by using a first data set and a second data set, specifically comprising:

s301: randomly selecting 80% of signal segments from the first data set as a first training data set to train the first stacked sparse self-coding model, and using the remaining 20% of signal segments as a first test data set to test the performance of the first stacked sparse self-coding model;

randomly selecting 80% of signal segments from the second data set as a second training data set for training a second stacked sparse self-coding model, and using the remaining 20% of signal segments as a second test data set for testing the performance of the second stacked sparse self-coding model;

s302: taking the first training data set as training data of the first stacked sparse self-coding model, and training the first stacked sparse self-coding model by adopting a layer-by-layer greedy method to obtain a trained first stacked sparse self-coding model;

taking the second training data set as training data of the second stacked sparse self-coding model, and training the second stacked sparse self-coding model by adopting a layer-by-layer greedy method to obtain a trained second stacked sparse self-coding model;

s303: testing the trained first stacked sparse self-coding model by adopting a first test data set, and testing the trained second stacked sparse self-coding model by adopting a second test data set; and calculating two indexes of specificity and sensitivity obtained by testing the first stacked sparse self-coding model and the second stacked sparse self-coding model respectively.

8. The method for ripple and fast ripple detection based on a stacked sparse self-encoding model of claim 7, wherein: in step S303, the definition of SEN and SPE is as follows:

in the above formula, SEN is the sensitivity, and represents the ratio of the number of correctly detected high-frequency oscillation rhythms to the total number of high-frequency oscillation rhythms; SPE is specificity and represents the proportion of the number of correctly detected normal brain electrical activity to the total number of normal brain electrical activity; TP represents the number of correctly detected high-frequency oscillation rhythms, TN represents the number of correctly detected normal brain electrical activity, FP represents the number of incorrectly detected normal brain electrical activity as high-frequency oscillation rhythms, and FN represents the number of incorrectly detected high-frequency oscillation rhythms as normal brain electrical activity.

Technical Field

The invention relates to the field of epilepsia electroencephalogram signal processing, in particular to a ripple and rapid ripple detection method based on a stack type sparse self-coding model.

Background

Diagnosis and treatment of epilepsy often relies on accurate detection of abnormal discharges in a patient's clinical seizure or inter-seizure electroencephalogram. The high frequency oscillatory rhythm is the electroencephalographic activity recorded by the electroencephalogram that reflects the synchronous transients of the neurons. The high frequency oscillation rhythm can be generally divided into ripple (80-200 Hz), fast ripple (250-500 Hz) and UHF oscillation rhythm (1000-2500 Hz) according to the frequency range. The emphasis of research is the ripple and rapid ripple at 80-500Hz, due to the high frequency of the uhf oscillation rhythm, which is difficult to record by conventional electrodes. In the last 20 years, a great deal of research shows that the high-frequency oscillation rhythm is a remarkable biomarker of the epileptic seizure onset region, has higher average incidence rate in the epileptic seizure onset region and obvious specificity, and can be used for determining the epileptic seizure onset region and assisting doctors in diagnosing and treating epilepsy.

Visual inspection within the ripple and fast ripple frequency band after band-pass filtering of the brain electrical signal is a conventional method for detecting high frequency oscillatory rhythms. However, the transient state of the electroencephalogram signal has short duration, low amplitude and non-stationarity, and the visual inspection of the high-frequency oscillation rhythm in the long-term electroencephalogram recording is a time-consuming and labor-consuming work. Therefore, it is highly desirable to find a method for rapidly and automatically detecting a high frequency oscillating rhythm. Meanwhile, considering that the action mechanisms and the electrophysiological characteristics of the ripple and the rapid ripple are different, the electroencephalogram signals of the ripple and the rapid ripple frequency band are respectively processed, which is beneficial to improving the detection precision of the high-frequency oscillation rhythm (the ripple and the rapid ripple).

Currently, most of the methods for detecting a high-frequency oscillation rhythm obtain the characteristics of a signal through observation or statistical analysis, and then detect the high-frequency oscillation rhythm based on the characteristics. These features include fuzzy entropy, short-time energy, power ratio, and line length, among others. However, due to the complexity of clinical environments, such as low signal-to-noise ratio, environmental noise interference in epileptic operating rooms, etc., high frequency oscillation rhythm detectors designed according to these methods have not been clinically applied. In recent years, deep learning techniques are widely used for automatic extraction of large data abstract features. The stack type sparse self-encoder is one of the most advanced deep learning algorithms at present, has great advantages in model performance compared with the traditional algorithm, and achieves better effect in histopathology image analysis. Therefore, the method is expected to utilize the characteristics of the stacked sparse self-encoder to extract the high-frequency oscillation rhythm, realize the rapid and automatic detection of the high-frequency oscillation rhythm and further promote the clinical application of the high-frequency oscillation rhythm.

Disclosure of Invention

In order to solve the problems, the invention provides a ripple and rapid ripple detection method based on a stack-type sparse self-coding model, which adopts two Chebyshev I-type digital band-pass filters to respectively obtain signal components of original electroencephalogram signals in frequency ranges of 80Hz-250Hz and 250Hz-500Hz, and cuts the filtered electroencephalogram signals into a plurality of small segments of signals with the duration of 100ms by utilizing a moving window technology to obtain two types of electroencephalogram signal segments of 80Hz-250Hz and 250Hz-500 Hz; respectively training two stacked sparse self-encoders by using the obtained two types of electroencephalogram signal segments; reconstructing a network by using the trained parameters of the coding part of the stacked sparse self-coding device and the softmax classifier to form two stacked sparse self-coding models; and respectively detecting ripples in 80Hz-250Hz electroencephalogram signal segments and quick ripples in 250Hz-500Hz electroencephalogram signal segments by using the obtained two stacked sparse self-coding models.

The method specifically comprises the following steps:

s101: acquiring an electroencephalogram signal with a frequency range of 80Hz-250Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 80Hz-250 Hz; acquiring an electroencephalogram signal with a frequency range of 250Hz-500Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 250Hz-500 Hz;

s102: respectively cutting the EEG signal in the frequency range of 80Hz-250Hz and the EEG signal in the frequency range of 250Hz-500Hz into a plurality of small segments of signals by adopting a moving window technology to obtain an 80Hz-250Hz EEG signal segment and a 250Hz-500Hz EEG signal segment;

s103: the stack-type sparse self-coding model is designed aiming at the ripples and the rapid ripples respectively and is used for detecting the ripples in 80Hz-250Hz electroencephalogram signal segments and the rapid ripples in 250Hz-500Hz electroencephalogram signal segments respectively.

Further, in step S101, an electroencephalogram signal recording instrument is used to collect an original electroencephalogram signal; wherein, an electroencephalogram recorder is provided with a plurality of leads, and each lead is contacted with the brain and records an electroencephalogram signal generated by the contact point.

Further, in step S101, the transfer function of the chebyshev type i digital band-pass filter is as follows:

in the above formula, max (M, N) is the order of the Chebyshev type I digital band-pass filter; m is the order of a transfer function numerator polynomial of the Chebyshev type I digital band-pass filter; n is the order of the transfer function denominator polynomial of the Chebyshev type I digital band-pass filter; bmIs the coefficient of the mth order of the molecule; a isnIs the coefficient of the nth order of the denominator; z is the signal to be filtered, i.e. the original brain electrical signal.

Further, in step S102, on the basis of obtaining an electroencephalogram signal with a frequency range of 80Hz-250Hz and an electroencephalogram signal with a frequency range of 250Hz-500Hz, a moving window technology is adopted to cut the long-segment electroencephalogram signal recorded by each lead into a plurality of small-segment signals with the duration of 100ms, and two types of electroencephalogram signal segments of 80Hz-250Hz and 250Hz-500Hz, namely an 80Hz-250Hz electroencephalogram signal segment and a 250Hz-500Hz electroencephalogram signal segment, are obtained; wherein, the r-th segment of electroencephalogram signal xrAs shown in the following formula:

in the above formula, the first and second carbon atoms are,is the rL-th in the filtered long-range electroencephalogram signalwAmplitude of individual sequences (rL of time sequence of electroencephalogram signalswA value); l iswIs the window length of the moving window.

Further, in step S103, a stack-type sparse self-coding model is respectively designed for the ripple and the fast ripple, and is respectively used for detecting the ripple in the 80Hz-250Hz electroencephalogram signal segment and the fast ripple in the 250Hz-500Hz electroencephalogram signal segment; the method specifically comprises the following steps:

s201: respectively selecting 5 candidate model structures for a first stacked sparse self-coding model designed for ripple and a second stacked sparse self-coding model designed for rapid ripple;

s202: the method comprises the steps of forming a first data set by utilizing ripples of clinical marks and normal activity signal segments, forming a second data set by utilizing rapid ripples of clinical marks and normal activity signal segments, wherein the signal segment lengths of the first data set and the second data set are LwRespectively training and testing 5 candidate models of the first stacked sparse self-coding model and 5 candidate models of the second stacked sparse self-coding model by adopting a first data set and a second data set to obtain the specificity and sensitivity respectively corresponding to the 5 candidate models of the first stacked sparse self-coding model and the specificity and sensitivity respectively corresponding to the 5 candidate models of the second stacked sparse self-coding model;

s203: selecting a model with highest specificity and sensitivity from 5 candidate models of the first stacked sparse self-coding model as a first optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a final first optimal stacked sparse self-coding model;

selecting a model with highest specificity and sensitivity from 5 candidate models of the second stacked sparse self-coding model as a second optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a second optimal stacked sparse self-coding model;

s204: and adopting a first optimal stacked sparse self-coding model to detect the ripple in the 80Hz-250Hz electroencephalogram signal segment, and adopting a second optimal stacked sparse self-coding model to detect the rapid ripple in the 250Hz-500Hz electroencephalogram signal segment.

Further, in step S201, the first stacked sparse self-coding model is used to detect ripples in 80Hz-250Hz electroencephalogram signal segments, and the number m of hidden layer nodes of 5 candidate model structures thereof1-m2Respectively 150-120, 120-90, 90-60, 60-30 and 30-10; the second stacked sparse self-coding model is used for detecting the rapid ripples in the 250Hz-500Hz electroencephalogram signal segment, and the number m of hidden layer nodes of 5 candidate model structures is1-m2Respectively 200-150, 150-120, 120-90, 90-60 and 60-30; m is1-m2The number of nodes representing the first hidden layer of the stacked sparse self-coding model is m1The number of nodes of the second hidden layer is m2

Further, in step S202, the first data set comprises a plurality of labeled ripple signal segments and a plurality of labeled normal activity signal segments, and the second data set comprises a plurality of labeled fast ripple signal segments and a plurality of labeled normal activity signal segments;

respectively training and testing a certain candidate model of the 5 candidate models of the first stacked sparse self-coding model and a certain candidate model of the 5 candidate models of the second stacked sparse self-coding model by using a first data set and a second data set, specifically comprising:

s301: randomly selecting 80% of signal segments from the first data set as a first training data set to train the first stacked sparse self-coding model, and using the remaining 20% of signal segments as a first test data set to test the performance of the first stacked sparse self-coding model;

randomly selecting 80% of signal segments from the second data set as a second training data set for training a second stacked sparse self-coding model, and using the remaining 20% of signal segments as a second test data set for testing the performance of the second stacked sparse self-coding model;

s302: taking the first training data set as training data of the first stacked sparse self-coding model, and training the first stacked sparse self-coding model by adopting a layer-by-layer greedy method to obtain a trained first stacked sparse self-coding model;

taking the second training data set as training data of the second stacked sparse self-coding model, and training the second stacked sparse self-coding model by adopting a layer-by-layer greedy method to obtain a trained second stacked sparse self-coding model;

s303: testing the trained first stacked sparse self-coding model by adopting a first test data set, and testing the trained second stacked sparse self-coding model by adopting a second test data set; and calculating two indexes of specificity and sensitivity obtained by testing the first stacked sparse self-coding model and the second stacked sparse self-coding model respectively.

Further, in step S303, the definition of SEN and SPE is as follows:

in the above formula, SEN is the sensitivity, and represents the ratio of the number of correctly detected high-frequency oscillation rhythms to the total number of high-frequency oscillation rhythms; SPE is specificity and represents the proportion of the number of correctly detected normal brain electrical activity to the total number of normal brain electrical activity; TP represents the number of correctly detected high-frequency oscillation rhythms, TN represents the number of correctly detected normal brain electrical activity, FP represents the number of incorrectly detected normal brain electrical activity as high-frequency oscillation rhythms, and FN represents the number of incorrectly detected high-frequency oscillation rhythms as normal brain electrical activity.

The technical scheme provided by the invention has the beneficial effects that: the method realizes the rapid and automatic detection of ripple and rapid ripple in the electroencephalogram signals of the epilepsy, and assists doctors in diagnosing and treating the epilepsy.

Drawings

The invention will be further described with reference to the accompanying drawings and examples, in which:

fig. 1 is a flowchart of a ripple and fast ripple detection method based on a stacked sparse self-coding model according to an embodiment of the present invention;

FIG. 2 is the 80Hz-250Hz Chebyshev bandpass filtering results for patient 1 lead 1 in an embodiment of the present invention;

FIG. 3 is a 250Hz-500Hz Chebyshev bandpass filtering of patient 1 lead 1 in an embodiment of the present invention;

FIG. 4 is a partial electroencephalogram signal segment obtained by using a moving window technique in the embodiment of the present invention;

FIG. 5 is a schematic structural diagram of an auto-encoder according to an embodiment of the present invention;

FIG. 6 is a diagram illustrating a stacked sparse self-encoding architecture according to an embodiment of the present invention;

FIG. 7 is a stacked sparse self-coding model in an embodiment of the present invention.

Detailed Description

For a more clear understanding of the technical features, objects and effects of the present invention, embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

The embodiment of the invention provides a ripple and rapid ripple detection method based on a stack type sparse self-coding model;

referring to fig. 1, fig. 1 is a flowchart of a ripple and fast ripple detection method based on a stacked sparse self-coding model in an embodiment of the present invention, which specifically includes the following steps:

s101: acquiring an electroencephalogram signal with a frequency range of 80Hz-250Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 80Hz-250 Hz; acquiring an electroencephalogram signal with a frequency range of 250Hz-500Hz in an original electroencephalogram signal by adopting a Chebyshev I-type digital band-pass filter with a band-pass frequency of 250Hz-500 Hz;

s102: respectively cutting the EEG signal in the frequency range of 80Hz-250Hz and the EEG signal in the frequency range of 250Hz-500Hz into a plurality of small segments of signals by adopting a moving window technology to obtain an 80Hz-250Hz EEG signal segment and a 250Hz-500Hz EEG signal segment;

s103: the stack-type sparse self-coding model is designed aiming at the ripples and the rapid ripples respectively and is used for detecting the ripples in 80Hz-250Hz electroencephalogram signal segments and the rapid ripples in 250Hz-500Hz electroencephalogram signal segments respectively.

In the step S101, (because the ripple and the rapid ripple have different action mechanisms and electrophysiological characteristics, the ripple and the rapid ripple frequency band electroencephalogram signals are respectively processed, which is beneficial to improving the detection accuracy of the ripple and the rapid ripple) an electroencephalogram signal recording instrument is adopted to collect original electroencephalogram signals; one of the electroencephalograph recorders has a plurality of (several to dozens of different) leads, each of which is in contact with the brain and records an electroencephalogram signal generated by the contact point.

In step S101, the transfer function of the chebyshev type i digital band-pass filter is as follows:

in the above formula, max (M, N) is the order of the Chebyshev type I digital band-pass filter; m is the order of a transfer function numerator polynomial of the Chebyshev type I digital band-pass filter; n is the order of the transfer function denominator polynomial of the Chebyshev type I digital band-pass filter; bmIs the coefficient of the mth order of the molecule; a isnIs the coefficient of the nth order of the denominator; z is the signal to be filtered, i.e. the original brain electrical signal.

In the embodiment of the invention, the specific electroencephalogram signals acquired are shown in the attached figures 2 and 3.

FIG. 2(a) is the original EEG signal collected from lead 1 of patient 1, FIG. 2(b) is the EEG time domain diagram obtained by 80Hz-250Hz band-pass filtering, and FIG. 2(c) is the EEG amplitude spectrum obtained by 80Hz-250Hz band-pass filtering. As can be seen from FIG. 2, after the 80Hz-250Hz band-pass filtering, the frequency of the obtained electroencephalogram signal is limited within the range of 80Hz-250 Hz.

FIG. 3(a) is the original EEG signal collected from lead 1 of patient 1, FIG. 3(b) is the EEG time domain diagram obtained by band-pass filtering at 250Hz-500Hz, and FIG. 3(c) is the EEG amplitude spectrum obtained by band-pass filtering at 250Hz-500 Hz. As can be seen from FIG. 3, after the band-pass filtering is performed at 250Hz-500Hz, the frequency of the obtained electroencephalogram signal is limited within the range of 250Hz-500 Hz.

The following conclusions can be drawn from the attached figures 2 and 3: after passing through two Chebyshev I-type digital band-pass filters, electroencephalogram signals with frequency ranges of 80Hz-250Hz and 250Hz-500Hz are respectively obtained. Therefore, the two types of electroencephalogram data can be processed respectively, ripples are detected in the electroencephalogram signals of 80Hz to 250Hz, and rapid ripples are detected in the electroencephalogram signals of 250Hz to 500 Hz.

In the step S102, on the basis of obtaining an electroencephalogram signal with a frequency range of 80Hz-250Hz and an electroencephalogram signal with a frequency range of 250Hz-500Hz, a moving window technology is adopted to cut long-segment electroencephalogram signals recorded by each lead (the long-segment electroencephalogram signal time sequence recorded by each lead is processed one by one) into a plurality of small-segment signals with the duration of 100ms, and two types of electroencephalogram signal segments of 80Hz-250Hz and 250Hz-500Hz, namely 80Hz-250Hz electroencephalogram signal segments and 250Hz-500Hz electroencephalogram signal segments are obtained; partial results of the moving window technique segmentation are shown in FIG. 4; wherein, the r-th segment of electroencephalogram signal xrAs shown in the following formula:

in the above formula, the first and second carbon atoms are,is the rL-th in the filtered long-range electroencephalogram signalwAmplitude of individual sequences (rL of time sequence of electroencephalogram signalswA value); l iswIs the window length of the moving window.

In step S103, the design method of the stacked sparse self-coding model specifically includes:

(3-1): an auto-encoder: the auto-encoder is an unsupervised neural network model that includes an input layer, a hidden layer, and an output layer, as shown in fig. 5. The self-encoder comprises the following specific steps:

step 1: and (3) encoding: if given an unlabeled input data vector x ═ x1,x2,L,xn]TThen, the activation value (characteristic of the input data) h ═ h of the hidden layer is obtained through encoding1,h2,L,hm]TAnd n and m are the number of input nodes and hidden layer nodes, respectively. The calculation formula is as follows:

h=f(W(1)x+b(1)),

in the formula, W(1)∈Rm×nIs a weight matrix from the input layer to the hidden layer, b(1)∈RmIs the bias vector of the hidden layer, f (z) is the activation function;

step 2: and (3) decoding: decoding the features obtained by encoding, reconstructing the input data to obtain a reconstructed vector of the input dataThe calculation formula is as follows:

in the formula, W(2)∈Rn×mIs a weight matrix from hidden layer to output layer, b(2)∈RmIs the offset vector of the output layer;

step 3: minimizing the cost function: assume an input data set of { x }(1),x(2),L,x(k)}, the cost function from the encoder is as follows:

in the formula, JweightIs L2Term of regularization, λ being L2Weight attenuation coefficient of regularization term, L is the number of hidden layers, slIs the number of nodes at layer l.

(3-2): sparse self-encoder: the sparse autoencoder is implemented by adding a sparsity constraint on hidden layer nodes of the autoencoder. The specific steps for implementing the sparse autoencoder are as follows:

step 1: notice that h isj(x) Represents the activation value of the input vector x for the hidden layer node j, so the average activation value of all input vectors for the hidden layer node j is:

step 2: by making the average activation value of all hidden layer nodesClose to a real number p small enough to achieve sparsity. For this reason, introducing KL divergence describes the proximity between them, the cost function J of the sparse autoencoderSAEcostCan be expressed in the following form:

JSAEcost=Jcost+Jsparsity

in the formula, JsparsityIs a sparse penalty term, and β is a weight coefficient controlling the sparse penalty term.

(3-3): stacked sparse autoencoder: by increasing the number of hidden layers of the sparse self-encoder, higher-order abstract features of input data can be extracted. Therefore, two sparse self-encoders are stacked together to form a stacked sparse self-encoder with two hidden layers, as shown in fig. 6. In FIG. 6, the first sparse autoencoder extracts feature h(1)As input to the second sparse autoencoder, the second sparse autoencoder extracts higher order abstract features h(2)

(3-4): softmax classifier: and on the basis of designing a stack-type sparse self-encoder, a softmax classifier is added to classify the ripples and the rapid ripples in the electroencephalogram signal segments obtained in the step two. The softmax classifier is a supervised multi-label classification model. Given a tape signature (ripple,Fast ripple, normal activity) data set { (z)(1),y(1)),(z(2),y(2)),L,(z(k),y(k))},z(k)∈RcIs the feature vector h extracted by the second sparse self-encoder(2),y(k)∈[1,2]Is a reaction of(k)And (4) a corresponding label. If y(k)1 represents the radical of(k)The corresponding segment of the electroencephalogram signal is a high-frequency oscillatory rhythmic (ripple or fast ripple) activity; if y(k)When 2, then represents(k)The corresponding electroencephalogram signal segment is normal electroencephalogram activity. The label of the electroencephalogram signal segment is estimated by minimizing the cost function of the softmax classifier, so that the purpose of automatically detecting the ripple and the rapid ripple in the electroencephalogram signal segment is achieved. The cost function of the softmax classifier is as follows:

where θ is the parameter of the softmax classifier, λ is the weight attenuation coefficient, 1{ y }(i)J is an illustrative function when y(i)When j is equal, it is 1; otherwise, its value is 0.

(3-5): the stack type sparse self-coding model comprises the following steps: on the basis of the designed stack-type sparse self-encoder, in order to reduce the training complexity and avoid the problem of gradient dispersion in the training process, a layer-by-layer greedy method is adopted to train the model. And extracting the coding parts of the trained first and second sparse self-encoders and the parameters of the softmax classifier, reconstructing a network, and forming a stacked sparse self-coding model. The method comprises the following specific steps:

step 1: taking the electroencephalogram data segment obtained in the step two as input, training a first sparse self-encoder to obtain a characteristic h(1)

Step 2: will be characterized by h(1)As input, train a second sparse autoencoder to get the feature h(2)

Step 3: connecting the coding parts of the trained first and second sparse self-encoders and the softmax classifier together to obtain a labeled data set{(z(1),y(1)),(z(2),y(2)),…,(z(k),y(k))}(z(k)Is the k training sample, y(k)Is the label of the kth training sample) as input, each layer of parameters of the network are finely adjusted (the coding weight W of the first sparse self-encoder is adjusted by a random gradient descent method(1)And bias b(1)Coding weight W of the second sparse autoencoder(2)And bias b(2)And the parameter θ of the softmax classifier);

step 4: after Step 3 fine tuning, extracting the coding parts of the first and second sparse self-encoders and the parameters of the softmax classifier, and reconstructing a network to form a stacked sparse self-coding model, as shown in fig. 7.

Step 5: aiming at the 80Hz-250Hz and 250Hz-500Hz electroencephalogram signal segments, two stacked sparse self-coding models are designed according to the steps from 1 to 4, and are respectively used for detecting ripples in the 80Hz-250Hz electroencephalogram signal segments and rapid ripples in the 250Hz-500Hz electroencephalogram signal segments.

In the step S103, a stack-type sparse self-coding model is respectively designed for ripple and rapid ripple, and is respectively used for detecting the ripple in 80Hz-250Hz electroencephalogram signal segments and the rapid ripple in 250Hz-500Hz electroencephalogram signal segments; the method specifically comprises the following steps:

in the stacked sparse self-coding model, the number of hidden layers and the number of nodes of the hidden layers may affect the detection result, and the number of hidden layers and the number of nodes of the stacked sparse self-coding model are usually set according to experience.

Therefore, the stacked sparse self-coding model is designed for ripple and fast ripple respectively, and the specific details are as follows:

s201: according to experience, the embodiment selects 5 candidate model structures for each of the first stacked sparse self-coding model for ripple design and the second stacked sparse self-coding model for fast ripple design;

s202: the method includes forming a first data set using clinically labeled ripples and normal activity signal segments, forming a second data set using clinically labeled rapid ripples and normal activity signal segments, the first data set and the first data setThe signal segment lengths of the two data sets are LwRespectively training and testing 5 candidate models of the first stacked sparse self-coding model and 5 candidate models of the second stacked sparse self-coding model by adopting a first data set and a second data set to obtain the specificity and sensitivity respectively corresponding to the 5 candidate models of the first stacked sparse self-coding model and the specificity and sensitivity respectively corresponding to the 5 candidate models of the second stacked sparse self-coding model;

s203: selecting a model with highest specificity and sensitivity from 5 candidate models of the first stacked sparse self-coding model as a first optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a final first optimal stacked sparse self-coding model;

selecting a model with highest specificity and sensitivity from 5 candidate models of the second stacked sparse self-coding model as a second optimal stacked sparse self-coding model; if the specificity and the sensitivity are not simultaneously highest, selecting a model with the highest sensitivity as a second optimal stacked sparse self-coding model;

s204: and adopting a first optimal stacked sparse self-coding model to detect the ripple in the 80Hz-250Hz electroencephalogram signal segment, and adopting a second optimal stacked sparse self-coding model to detect the rapid ripple in the 250Hz-500Hz electroencephalogram signal segment.

In step S201, the first stacked sparse self-coding model is used to detect ripples in 80Hz-250Hz electroencephalogram signal segments, and the number m of hidden layer nodes of 5 candidate model structures thereof1-m2Respectively 150-120, 120-90, 90-60, 60-30 and 30-10; the second stacked sparse self-coding model is used for detecting the rapid ripples in the 250Hz-500Hz electroencephalogram signal segment, and the number m of hidden layer nodes of 5 candidate model structures is1-m2Respectively 200-150, 150-120, 120-90, 90-60 and 60-30; m is1-m2The number of nodes representing the first hidden layer of the stacked sparse self-coding model is m1The number of nodes of the second hidden layer is m2

Furthermore, L is set2The parameter λ of the regularization term is 0.001, the sparsity parameter ρ is 0.05, and the sparsity parameter penalty factor β is 1.

In step S202, the first data set and the second data set each include a plurality of labeled ripple signal segments (or fast ripple signal segments) and a plurality of labeled normal electroencephalogram activity signal segments (in this embodiment, the first data set includes 121056 ripple signal segments and 121056 normal electroencephalogram activity signal segments, and the second data set includes 30242 fast ripple signal segments and 30242 normal electroencephalogram activity signal segments);

respectively training and testing a certain candidate model of the 5 candidate models of the first stacked sparse self-coding model and a certain candidate model of the 5 candidate models of the second stacked sparse self-coding model by using a first data set and a second data set, specifically comprising:

s301: randomly selecting 80% signal segments (namely 193689 signal segments, ripple signal segments and normal activity signal segments 1:1) from the first data set as a first training data set for training the first stacked sparse self-coding model, and using the remaining 20% signal segments (namely 48423 signal segments, ripple signal segments and normal activity signal segments 1:1) as a first test data set for testing the performance of the first stacked sparse self-coding model;

randomly selecting 80% signal segments (namely 48387 signal segments, fast ripple signal segments and normal activity signal segments 1:1) from the second data set as a second training data set for training the second stacked sparse self-coding model, and using the remaining 20% signal segments (namely 12097 signal segments, fast ripple signal segments and normal activity signal segments 1:1) as a second test data set for testing the performance of the second stacked sparse self-coding model;

s302: taking the first training data set as training data of the first stacked sparse self-coding model, and training the first stacked sparse self-coding model by adopting a layer-by-layer greedy method (the layer-by-layer greedy method training is a method of training only one hidden layer at a time until all hidden layers are trained, and adjusting the weight and bias of a self-coder network by adopting a random gradient descent method during training of each hidden layer to obtain a trained first stacked sparse self-coding model;

taking the second training data set as training data of the second stacked sparse self-coding model, and training the second stacked sparse self-coding model by adopting a layer-by-layer greedy method to obtain a trained second stacked sparse self-coding model (training a first stacked sparse self-encoder and a second stacked sparse self-encoder respectively, and obtaining two stacked sparse self-coding models after fine tuning);

s303: testing the trained first stacked sparse self-coding model by adopting a first test data set, and testing the trained second stacked sparse self-coding model by adopting a second test data set; and calculating two indexes of Sensitivity (SEN) and Specificity (SPE) obtained by testing the first stacked sparse self-coding model and the second stacked sparse self-coding model respectively.

In step S303, the definition of SEN and SPE is as follows:

in the above formula, SEN is a sensitivity indicating a ratio of the number of high frequency oscillation rhythms (ripples or fast ripples) to be correctly detected to the total number of high frequency oscillation rhythms (ripples or fast ripples); SPE is specificity and represents the proportion of the number of correctly detected normal brain electrical activity to the total number of normal brain electrical activity; TP represents the number of correctly detected high-frequency oscillatory rhythms (ripple or fast ripple), TN represents the number of correctly detected normal brain electrical activity, FP represents the number of erroneously detected normal brain electrical activity as high-frequency oscillatory rhythms (ripple or fast ripple), and FN represents the number of erroneously detected high-frequency oscillatory rhythms (ripple or fast ripple) as normal brain electrical activity;

the larger the SEN and SPE values are, the closer the prediction result of the stacked sparse self-coding model is to the clinical examination result is, and the better the model performance is.

In the examples of the present invention, the test results obtained are shown in tables 1 and 2.

TABLE 1 results of ripple detection for the first stacked sparse self-encoding model

Table 1 shows the ripple detection results of the first stacked sparse self-coding model. It can be seen that 5 candidate structures of this model yield more than 87% SEN and SPE. But the SEN and SPE obtained by the model structure with the hidden layer node number of 90-60 are the highest, so that the model with the structure is selected as a stack type sparse self-coding model for detecting ripples.

TABLE 2 fast ripple detection results for the second stacked sparse self-encoding model

Table 2 shows the fast ripple detection results of the second stacked sparse self-encoding model. It can be seen that the 5 candidate structures of the model result in a large difference between SEN and SPE, where SEN is up to 83.2% (hidden layer node 152-120) and SEP is up to 91.9% (hidden layer nodes 60-30). Different model structures can be selected according to different application criteria of the models. Under the condition of ensuring good SPE, in order to improve SEN, the embodiment selects the model with hidden layer node number of 150 and 120 as the stacked sparse self-coding model for detecting fast ripple.

The invention has the beneficial effects based on the technical scheme that:

(1) the invention relates to a ripple and rapid ripple detection method based on a stack type sparse self-coding model, which comprises the steps of firstly designing two Chebyshev I-type digital band-pass filters for respectively obtaining electroencephalogram signals with frequency bands of 80Hz-250Hz and 250Hz-500 Hz. Then, a moving window technology is adopted, the long-segment electroencephalogram signals are cut into a plurality of signal segments with the duration of 100ms, and a related calculation formula is given, so that a foundation is laid for realizing automatic ripple detection and rapid ripple;

(2) according to the ripple and rapid ripple detection method based on the stacked sparse self-coding model, high-order abstract characteristics of 80Hz-250Hz and 250Hz-500Hz electroencephalogram signal segments are respectively and automatically extracted through the two stacked sparse self-coding models, and the ripple and rapid ripple are automatically detected by utilizing the extracted characteristics, so that the ripple and rapid ripple detection method based on the stacked sparse self-coding model has higher detection precision compared with other similar machine learning models;

(3) the ripple and rapid ripple detection method based on the stack type sparse self-coding model disclosed by the invention is used for respectively processing the ripple and the rapid ripple and carrying out simulation experiments based on clinical data, so that the rapid and automatic detection of the ripple and the rapid ripple in the electroencephalogram signals of the epilepsy is realized, and the application of a high-frequency oscillation rhythm in clinic is facilitated, so that doctors are assisted in diagnosing and treating the epilepsy.

The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

18页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于肌电信号和角度信号的下肢步态信息提取设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!