WO2023098303A1 - Real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy - Google Patents
Real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy Download PDFInfo
- Publication number
- WO2023098303A1 WO2023098303A1 PCT/CN2022/124694 CN2022124694W WO2023098303A1 WO 2023098303 A1 WO2023098303 A1 WO 2023098303A1 CN 2022124694 W CN2022124694 W CN 2022124694W WO 2023098303 A1 WO2023098303 A1 WO 2023098303A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- layer
- epilepsy
- seizure
- model
- eeg
- Prior art date
Links
- 206010010904 Convulsion Diseases 0.000 title claims abstract description 118
- 206010015037 epilepsy Diseases 0.000 title claims abstract description 98
- 208000028329 epileptic seizure Diseases 0.000 title claims abstract description 52
- 238000012544 monitoring process Methods 0.000 title claims abstract description 41
- 238000001514 detection method Methods 0.000 claims abstract description 38
- 238000000034 method Methods 0.000 claims abstract description 19
- 230000008569 process Effects 0.000 claims abstract description 17
- 230000002452 interceptive effect Effects 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 13
- 238000012549 training Methods 0.000 claims abstract description 13
- 230000003993 interaction Effects 0.000 claims abstract description 6
- 238000000354 decomposition reaction Methods 0.000 claims description 22
- 238000011897 real-time detection Methods 0.000 claims description 15
- 238000002372 labelling Methods 0.000 claims description 13
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000009499 grossing Methods 0.000 claims description 7
- 238000011176 pooling Methods 0.000 claims description 7
- 230000002109 interictal effect Effects 0.000 claims description 5
- 238000003745 diagnosis Methods 0.000 claims description 4
- 238000004070 electrodeposition Methods 0.000 claims description 4
- 238000012552 review Methods 0.000 claims description 2
- 238000007689 inspection Methods 0.000 claims 3
- 230000001186 cumulative effect Effects 0.000 claims 1
- 230000006870 function Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 4
- 210000004556 brain Anatomy 0.000 description 3
- 238000010276 construction Methods 0.000 description 3
- 238000013527 convolutional neural network Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000001037 epileptic effect Effects 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000011179 visual inspection Methods 0.000 description 2
- 208000012902 Nervous system disease Diseases 0.000 description 1
- 208000025966 Neurological disease Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007177 brain activity Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013145 classification model Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000036039 immunity Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 210000004761 scalp Anatomy 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 208000024891 symptom Diseases 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/40—Detecting, measuring or recording for evaluating the nervous system
- A61B5/4076—Diagnosing or monitoring particular conditions of the nervous system
- A61B5/4094—Diagnosing or monitoring seizure diseases, e.g. epilepsy
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/24—Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
- A61B5/316—Modalities, i.e. specific diagnostic methods
- A61B5/369—Electroencephalography [EEG]
- A61B5/372—Analysis of electroencephalograms
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/72—Signal processing specially adapted for physiological signals or for diagnostic purposes
- A61B5/7235—Details of waveform analysis
- A61B5/7264—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
- A61B5/7267—Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/74—Details of notification to user or communication with user or patient ; user input means
- A61B5/746—Alarms related to a physiological condition, e.g. details of setting alarm thresholds or avoiding false alarms
Definitions
- the invention relates to the field of medical care information, in particular to a real-time detection and monitoring system for epileptic seizures oriented to epilepsy video electroencephalogram examination.
- Epilepsy one of the most common neurological disorders, is characterized by frequent sudden surges of abnormal electrical activity in parts or entire brain regions.
- An EEG is an electrical recording of brain activity and is an important basis for the diagnosis and analysis of epilepsy.
- Video EEG combines scalp EEG and high-definition video to simultaneously record brain electrical activity and patient behavior. It has the characteristics of high temporal resolution and non-invasiveness, and is currently the most commonly used epilepsy detection method.
- the video EEG examination lasts for a long time and usually needs to include the wake-sleep-wake process, usually more than 4 hours, and can be as long as 24 hours.
- Existing technology does not fully integrate and utilize the resources of accompanying personnel, systems and medical personnel.
- the channels of the EEG are arranged in a simple one-dimensional order, and part of the position information is not fully utilized, and the relative spatial relationship between the channels is not reflected, resulting in insufficient performance of the seizure detection model.
- Epilepsy has a wide range of diseases, individual differences are large, and there are many forms of EEG. Because there are various types of epilepsy and individual differences among patients, the existing technology relies on the training model of individual historical EEG signal data to achieve the detection effect (96% recall rate). Low (about 75%); Judging from the results of technical solutions for epilepsy detection in published journals, the current technical solutions need to be based on patient-specific models to achieve better results, and the generalization performance of the models is weak.
- the purpose of the present invention is to address the deficiencies in the prior art, and propose a real-time detection and monitoring system for seizures oriented to epileptic video EEG examination, which is used to solve the problem of real-time detection of epileptic seizures during the video EEG examination process of epileptic patients. And the problem of alarming and recording the moment of the patient's seizure after detecting the patient's seizure.
- a real-time detection and monitoring system for epileptic seizures oriented to epilepsy video electroencephalogram examination comprising:
- Data processing module used to input the patient's EEG signal data, divide the EEG signal data into several fixed-length data segments according to time, and perform wavelet decomposition on each channel of the segmented EEG signal data, according to the EEG electrode position , get 18 EEG signal channels, and arrange the 18 EEG signal channels according to the two-dimensional structure of 4 rows and 5 columns, and the missing 2 channels in the middle column are calculated according to the relative distance relationship between the channel positions; the output is two The decomposed data of the signal arranged in the dimensional structure;
- Model selection module build a model with z+3 layer structure, where the first z layer corresponds to the number of layers of wavelet decomposition in the data processing module, the input of the first layer of the model is the output of the last layer of wavelet decomposition; The input of the second layer is the output of the first layer of the model and the high frequency part decomposed by the penultimate layer of wavelet decomposition; the input of the third layer of the model is the output of the second layer of the model and the high frequency part of the penultimate layer of wavelet decomposition part; and so on, the input of the zth layer of the model is the output of the z-1st layer of the model and the high-frequency part decomposed by the first layer of wavelet decomposition; the z+1 layer, z+2 layer and z+3 layer are the volume Multilayer, maximum pooling layer and fully connected layer, the output is the probability of no epilepsy and the probability of seizure at the current moment; according to the data of the patient database in the hospital
- Epilepsy alarm module used to obtain the probability of epileptic seizures output by the epileptic seizure detection model in the model selection module in real time, smooth the seizure probability within a period of time, judge whether to alarm the accompanying staff according to the set threshold, and report to the alarm Stop working until the escort confirms that the epilepsy has stopped or resumes work after the set time has passed;
- Interactive collaborative labeling module used for the interaction between the epileptic seizure alarm module, the escort and the monitoring room; the escort judges the false positives and false negatives of the epileptic seizure alarm module, and reviews it through the monitoring room. If it is confirmed, the epileptic seizure alarm module is judged If there are false positives and false negatives, adjust the alarm threshold.
- the patient's EEG signal data input by the data processing module includes data used for model training from the patient database and multi-channel EEG signal data of real-time video EEG examination.
- 18 EEG signal channels are obtained as [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3-C3, C3-P3, P3-O1, Fz-Cz, Cz-Pz, Fp2-F4, F4-C4, C4-P4, P4-O2, Fp2-F8, F8-T4, T4-T6, T6-O2]; arrange 18 channels in 4 rows of 5
- the two-dimensional structure of the column the first column is [Fp1-F7,F7-T3,T3-T5,T5-O1]
- the second column is [Fp1-F3,F3-C3,C3-P3,P3-O1]
- the third column is [Fz-Cz,Cz-Pz]
- the fourth column is [Fp2-F4,F4-C4, C4-P4,P4-O2]
- the fifth column is [Fp2-F8,F8-T4,T4 -T
- N1 and N2 are the same as The calculation formula of N1 and N2 is as follows:
- the convolution kernel of the z+1th convolutional layer in the model constructed by the model selection module is set according to the data form of the two-dimensional structure arrangement output by the data processing module, since the two-dimensional structure arrangement is 4*5 form, so the structure of the convolution kernel of the z+1th layer convolutional layer and the relevant part of the EEG signal channel is set to 2*2, and the pooling kernel of the z+2th layer maximum pooling layer neutralizes the EEG signal channel The structure of the relevant part is set to 3*2.
- the data of the patient database in the hospital calculate the variance of the signal data of each frequency band of the 18-channel EEG signal data of each patient in the interictal period, where each frequency band corresponds to the frequency band of the wavelet decomposition input by the front z layer of the model , get a matrix representing the characteristics of EEG signals, and use the diagnosed epilepsy type as a label; when the current patient starts to undergo video EEG examination, calculate the signal data of each frequency band of the 18 channels of EEG signal data during the interictal period Variance, to obtain a matrix representing the characteristics of the EEG signal of the current patient, use the k-nearest neighbor algorithm to determine the closest epilepsy type, and select the corresponding seizure detection model.
- the calculation formula of the distance between the current patient and the patient in the patient bank in the hospital is as follows:
- d i represents the distance corresponding to the i-th channel.
- the epileptic seizure alarm module smoothes the ⁇ seizure probability values within a period of time, and sets the threshold to 0.9, and if it exceeds the threshold, an alarm is sent to the accompanying personnel; the specific implementation process is:
- P(t) represents the smoothing result of the seizure alarm module at time t
- p(t-j) represents the probability of seizures output by the seizure detection model at time t-j
- t represents the current moment
- j represents the time interval
- the interactive collaborative labeling module raises the alarm threshold when the epileptic seizure alarm module makes a false alarm, and the specific implementation process is:
- the specific implementation process is:
- r' represents the adjusted alarm threshold
- min() represents the function of taking the minimum value
- r represents the alarm threshold before adjustment
- P(t) represents the smoothing result of the seizure alarm module at time t
- t represents the current time.
- the interactive collaborative labeling module confirms that the total number of false positives or false positives of the seizure alarm module exceeds 3 times, the current seizure detection model is abandoned, and the process is performed again according to the EEG signal data of the patient's interictal period in the most recent period of time. Model selection.
- the EEG type of the patient is divided into several categories, and the models are trained separately.
- the model with the closest category of EEG signals is used as the epileptic seizure detection model to improve epilepsy.
- the accuracy of seizure detection improves the experience of doctors and accompanying staff.
- Fig. 1 is the flow chart of the real-time detection and monitoring system facing epilepsy video EEG examination
- Figure 2 is a schematic diagram of the electrode position of the international 10-20 system
- Fig. 3 is the schematic diagram of wavelet decomposition process
- Figure 4 is a schematic diagram of the first five layers of the model structure
- Fig. 5 is the working flow chart of the interactive collaborative labeling module after the automatic alarm of the epileptic seizure alarm module
- Fig. 6 is a workflow diagram of the interactive collaborative labeling module after the accompanying staff actively alarms.
- the system includes: a data processing module, a model selection module, an epileptic seizure alarm module and an interactive collaborative labeling module; details as follows:
- the data processing module is used to divide the data into 1s length segments, decompose the data by discrete wavelet transform and Arrange the EEG signal channels according to the two-dimensional structure; specifically:
- the present invention adopts the EEG electrode placement standard stipulated by the international 10-20 system, including Fp1, F7, T3, T5, O1, F3, C3, P3, Fz, Cz, Pz, Fp2, F4, C4, P4, O2, F8 , T4, T6 have a total of 19 electrode positions, as shown in Figure 2, using the potential difference signals of adjacent double electrodes, we can get [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3- C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2] 18 channel information.
- the wavelet function and scale function of the discrete wavelet transform are used to decompose the signal, and the input EEG signal is decomposed into two parts: high-frequency details and low-frequency approximation, and continuously
- the low-frequency approximation part is repeatedly operated, subdivided into the fifth layer, and the length of the EEG signal data obtained by each decomposition is half of the original. For example, the length of the EEG signal data is changed from 256 to 128 in the first decomposition.
- the initial EEG signal of each channel is decomposed to obtain D1, A1, D2, A2, D3, A3, D4, A4, D5, A5, respectively representing 64-128Hz, 0-64Hz, 32-64Hz, 0-32Hz, 16-32Hz, 0-16Hz, 8-16Hz, 0-8Hz, 4-8Hz, 0-4Hz a group of signals (x, D1, A1, D2, A2, D3, A3, D4, A4, D5, A5), the data lengths are (256, 128, 128, 64, 64, 32, 32, 16, 16, 8, 8) respectively.
- the channels of the EEG are arranged one-dimensionally in a simple order to form 18 signal channels, namely [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3 -C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2 ].
- the channel position is not processed, but recorded in a fixed order.
- the present invention arranges 18 channels into a two-dimensional structure of 4 rows and 5 columns according to the form of Table 1, and the first column is [Fp1-F7, F7-T3, T3-T5, T5 -O1], the second column is [Fp1-F3,F3-C3,C3-P3,P3-O1], the third column is [Fz-Cz,Cz-Pz], the fourth column is [Fp2-F4,F4 -C4,C4-P4,P4-O2], the fifth column is [Fp2-F8,F8-T4,T4-T6,T6-O2], because there are only 2 channels in the middle column, add a channel before and after, use N1 and N2, that is, the third column is [N1, Fz-Cz, Cz-Pz, N2], N1 and N2 are calculated according to the adjacent electrodes respectively, as the filling value of the vacancy, the calculation formula of N1 and N2 is as
- the present invention adopts the two-dimensional arrangement of EEG signal channels, which can make full use of the relative positional relationship between the channels, combined with the convolutional neural network, can reduce model training parameters, improve the speed of model training, and effectively solve the problem of the present invention based on different Seizure types train the seizure detection model, the corresponding seizure training samples are reduced, and it is necessary to train multiple models in reality.
- Model selection module design a model structure suitable for a series of data after wavelet decomposition, train the seizure detection model for the patients with the highest frequency of epileptic seizures to form a seizure detection model set, and according to the EEG signal of the patient Signal characteristics, using the k-nearest neighbor algorithm to select a seizure detection model suitable for the current patient from the model set;
- the model construction is based on the EEG signal data processed by wavelet decomposition and channel two-dimensional arrangement.
- the construction process is shown in Figure 4, specifically:
- the input of the model is based on the output of the data processing module, with the high-frequency details D1, D2, D3, D4, D5 of each order wavelet and the low-frequency approximation A5 of the last order wavelet as the input of the model;
- the input of the first layer of the model is D5, A5, the data length is 8, and the signal channel is a two-dimensional structure of 4*5, so the structure of the input data of the first layer is (2*8)*4*5, volume
- the product parameter matrix is (2*2)*1*1@4, where @ indicates that the subsequent number is the number of features extracted by this layer, the step size is (1, 2, 1, 1), and the structure of the calculation result is ( 1*4)*4*5*4, keep the channel structure unchanged, adjust the signal structure, as the output C5 of the first layer, and also part of the input of the next layer, its structure is (1*16)*4 *5;
- the input of the second layer of the model is the input C5 and D4 of the first layer, the data length is 16, and the signal channel is still a two-dimensional structure of 4*5, so the structure of the input data of the second layer is (2*16) *4*5, the convolution parameter matrix is (2*2)*4*5@4, the step size is (1, 2, 1, 1), and the structure of the calculation result is (1*8)*4*5* 4.
- the structure of the third to fifth layers of the model can be analogized according to the second layer above, and the output of the third output C3, the fourth output C2, and the fifth output C1 are respectively (1*64)*4*5 , (1*128)*4*5, (1*256)*4*5;
- the input of the sixth layer of the model is the output C1 of the fifth layer, (1*256)*4*5, and the dimension with a length of 1 is removed, which is 256*4*5, and the convolution parameter matrix is 8*2* 2@4, the step size is set to (8,1,1), and the output structure is 16*3*4*4;
- the seventh layer of the model is the maximum pooling layer of (1,3,2,1), whose input is the output of the sixth layer, and the structure of the calculation result is (16*1*2*4), which is further converted to A one-dimensional vector with a length of 128, input to the last layer;
- the last layer of the model is a fully connected layer, the input is the output of the previous layer, and the output is a vector with a length of 2, which is normalized by the softmax function, which respectively represent the probability of no epilepsy and the probability of seizure at the current moment;
- This model uses the modified linear unit function ReLU as the activation function, and the last layer uses the softmax function to normalize the output.
- the training process uses cross-entropy as the loss function, as shown in the following formula.
- L represents the loss function
- M represents the number of samples for each training
- i represents the i-th sample
- y i represents the true category of the i-th sample
- the epilepsy types that have exceeded the threshold number of times in the statistical diagnosis results are trained separately according to the patient's EEG signal data corresponding to the epilepsy type
- x[i] represents the value of the i-th sampling point of the EEG signal data of each frequency band of each channel
- n represents the length of each frequency band EEG signal data x of each channel
- avr represents the value of each channel
- var represents the variance of the EEG signal data of each frequency band of each channel.
- the matrix of electrical signal features uses the k-nearest neighbor algorithm (the k value of the present invention is set to 8) to determine which EEG data of the current patient is closer to the EEG data of the patient with epilepsy type, and corresponds to the closest class , as a seizure detection model for the current patient.
- the formula for calculating the distance between two patients in the k-nearest neighbor algorithm is:
- d i represents the distance corresponding to the i-th channel
- var1 represents the variance of the 0-4Hz frequency band of the current patient
- var2 represents the variance of the 4-8Hz frequency band of the current patient
- var6 represents the variance of the 64-128Hz frequency band of the current patient.
- var1' to var6' represent the variance of the corresponding frequency bands of the patients in the patient database used for comparison.
- distance is the distance used for k-nearest neighbor algorithm comparison.
- Epilepsy alarm module used for the current patient's epileptic seizure, the system of the present invention promptly alarms the monitoring room and the accompanying personnel, and can also be initiated by the accompanying personnel to send an alarm to the monitoring room;
- the epileptic seizure detection model outputs in real time the possibility that the current second is judged to be an epileptic seizure according to the patient's EEG.
- the present invention comprehensively considers the sensitivity of epileptic seizure detection, the false alarm rate and real-time performance, and smoothes the probability value output for 3 consecutive seconds.
- the threshold is set to 0.9. If the threshold is exceeded, the system will alarm the accompanying personnel and the monitoring room. After the alarm is issued, the alarm module will enter a 3-minute immunity time, and the alarm will not be repeated during this period.
- P(t) represents the smoothing result of the epileptic seizure alarm module at time t, which is the possibility of epileptic seizure events.
- the interactive collaborative labeling module is used for the human-computer interaction between the epileptic seizure alarm module, the accompanying personnel and the monitoring room in the system of the present invention, involving the coordination of the system's automatic alarm and manual confirmation, and the feedback of manual active marking to system detection adjust;
- the interactive collaborative labeling module is mainly the human-computer interaction between the escort and the monitoring room and the seizure alarm module.
- the main body is the interaction between the escort and the seizure alarm module, and the monitoring room plays the role of confirmation and security.
- the epileptic seizure alarm module when the epileptic seizure alarm module detects an epileptic seizure, it will automatically send an alarm to the accompanying personnel and the duty room, prompting the accompanying personnel to keep attention within the next 3 minutes, and at the same time, among all the monitoring objects in the monitoring room, Prompt that the patient is in an epileptic state, keep attention. If there is indeed an epileptic seizure, record the symptoms of the patient's epileptic seizure; if no epileptic seizure is observed, a false alarm message will be sent to the monitoring room, and the monitoring room will record and confirm the situation 3 minutes before checking. Then through the interactive collaborative labeling module, the alarm threshold of the epileptic seizure alarm module is raised, and this false alarm is recorded.
- the specific implementation process of raising the alarm threshold is as follows:
- r' represents the adjusted alarm threshold
- min() represents the function of taking the minimum value
- r represents the alarm threshold before adjustment
- P(t) represents the smoothing result of the seizure alarm module at time t
- t represents the current time.
- the seizure time will be recorded. If the monitoring room cannot confirm it, it will be temporarily marked as suspicious, pending the judgment of the doctor. If the epileptic seizure lasts longer or is more serious, the accompanying staff can ask for help from the monitoring room through the system, and the monitoring room can see the situation at the scene through the video at the first time and provide guidance and help.
- the escort can manually call the police and send the missing report information to the monitoring room. Analyze and form a preliminary judgment. If the monitoring room confirms that the escort's alarm is a false alarm caused by non-specific actions, it will feed back to the accompanying staff; if the monitoring room cannot confirm the alarm, it will be marked as suspicious and will be analyzed when the doctor visually reads the picture; If the monitoring room confirms an epileptic seizure, it will feed back to the epileptic seizure alarm module, lower the threshold, and record a missed report by the epileptic seizure alarm module.
- the specific implementation process of lowering the alarm threshold is as follows:
- r' represents the adjusted alarm threshold
- min() represents the function of taking the maximum value
- r represents the alarm threshold before adjustment
- P(t) represents the smoothing result of the seizure alarm module at time t
- t represents the current time.
- the automatic detection system has more than 3 false positives or false negatives in 1 hour, the current model will be abandoned, and the signal variance of each channel will be recalculated according to the interval EEG within 1 hour, and the model selection module will be returned to the model selection again .
Landscapes
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Pathology (AREA)
- Veterinary Medicine (AREA)
- Biomedical Technology (AREA)
- Heart & Thoracic Surgery (AREA)
- Medical Informatics (AREA)
- Public Health (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Physiology (AREA)
- Artificial Intelligence (AREA)
- Neurology (AREA)
- Psychiatry (AREA)
- Neurosurgery (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Signal Processing (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Psychology (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
Abstract
A real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy, comprising a data processing module, a model selection module, an epileptic seizure alarm module, and an interactive collaborative annotation module. The data processing module is configured to process input electroencephalogram signal data into a data form required by an epileptic seizure detection model; the model selection module is configured to construct and select an epileptic seizure detection model for the current patient; the epileptic seizure alarm module is configured to detect epileptic seizure and give an alarm; and the interactive collaborative annotation module is used for interaction among the epileptic seizure alarm module, accompanying persons, and a monitoring room. According to the real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy, for practical problems in clinical video electroencephalogram examination, functional modules are designed such that the feature learning ability and training speed of the epileptic seizure detection model and the accuracy of real-time epileptic seizure detection are improved, and the experience of accompanying persons and doctors is greatly improved.
Description
本发明涉及医疗保健信息领域,尤其涉及一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统。The invention relates to the field of medical care information, in particular to a real-time detection and monitoring system for epileptic seizures oriented to epilepsy video electroencephalogram examination.
癫痫是最常见的神经疾病之一,其主要症状是频繁出现部分或整个大脑区域异常电活动的突然激增。脑电图是大脑活动的电记录,是癫痫诊断和分析的重要根据。视频脑电图结合头皮脑电图和高清视频,同时记录大脑电活动和患者行为动作,具有高时间分辨率、非侵入性等特点,是目前最常用的癫痫检测手段。视频脑电图检查持续时间长,通常需要包含清醒-睡眠-清醒的过程,一般在4小时以上,也可以长达24小时。现有技术没有充分融合利用陪护人员,系统和医护人员的资源。面对长时间的视频脑电图数据,医生需要花费大量的时间去目视检查,一般要求陪护人员在患者癫痫发作时,做下标记以便目视检查时能够快速定位癫痫发作时刻,但是长时间的陪护,给陪护人员带来很大负担,同时受限于陪护人员的鉴别能力,现实中会出现很多漏标和误标以及时间延迟较大等问题。并且目前由机器通过算法进行的预标注,报警次数过多,对医生的帮助有限。Epilepsy, one of the most common neurological disorders, is characterized by frequent sudden surges of abnormal electrical activity in parts or entire brain regions. An EEG is an electrical recording of brain activity and is an important basis for the diagnosis and analysis of epilepsy. Video EEG combines scalp EEG and high-definition video to simultaneously record brain electrical activity and patient behavior. It has the characteristics of high temporal resolution and non-invasiveness, and is currently the most commonly used epilepsy detection method. The video EEG examination lasts for a long time and usually needs to include the wake-sleep-wake process, usually more than 4 hours, and can be as long as 24 hours. Existing technology does not fully integrate and utilize the resources of accompanying personnel, systems and medical personnel. Faced with long-term video EEG data, doctors need to spend a lot of time on visual inspection. Generally, escorts are required to mark the patient's epileptic seizures so that they can quickly locate the seizure moment during visual inspection. The accompanying escorts bring a great burden to the accompanying staff, and are limited by the identification ability of the accompanying staff. In reality, there will be many problems such as missing labels, wrong labels, and large time delays. And the current pre-labeling by the machine through the algorithm has too many alarms and is of limited help to doctors.
目前主要有两类技术方案用于癫痫发作的检测,一类是按照传统机器学习方法,利用信号处理方法提取特征,筛选有效特征,通过传统机器学习方法分类,过于依赖人为的特征选择,很难适应不同癫痫类型的患者;另一类使用深度学习,将脑电时间信号经过简单预处理(滤波,去噪声,分割成一定时间长度的片段),即通过深度神经网络(特别是卷积神经网络)训练分类模型,目前的技术方案在利用深度神经网络进行癫痫检测时,直接采用时序的表示形式处理,且未充分考虑按照国际10-20系统电极放置,电极之间固有的空间位置关系,将脑电图的通道按照简单的顺序一维排列,部分位置信息没有得到充分利用,没有将通道之间的相对空间关系体现出来,导致癫痫发作检测模型性能不足。癫痫疾病范围较广,个体差异较大,脑电形态存在多种形式。因为癫痫疾病类型多样,患者个体差异较大,现有技术依赖于患者个体历史脑电信号数据训练模型才能达到检测效果(召回率96%),利用其他患者脑电信号数据训练的模型检测效果较低(75%左右);从发表期刊中,关于癫痫检测的技术方案的结果来看,目前的技术方案需要基于患者特异性的模型才能达到较好的结果,模型泛化性能较弱。At present, there are mainly two types of technical solutions for the detection of epileptic seizures. One is based on traditional machine learning methods, using signal processing methods to extract features, screening effective features, and classifying through traditional machine learning methods. It relies too much on artificial feature selection, which is difficult Adapt to patients with different types of epilepsy; the other uses deep learning to simply preprocess the EEG time signal (filtering, denoising, and dividing it into segments of a certain length of time), that is, through a deep neural network (especially a convolutional neural network) ) to train the classification model. The current technical solution directly adopts the time-series representation when using the deep neural network for epilepsy detection, and does not fully consider the electrode placement according to the international 10-20 system, and the inherent spatial position relationship between the electrodes. The channels of the EEG are arranged in a simple one-dimensional order, and part of the position information is not fully utilized, and the relative spatial relationship between the channels is not reflected, resulting in insufficient performance of the seizure detection model. Epilepsy has a wide range of diseases, individual differences are large, and there are many forms of EEG. Because there are various types of epilepsy and individual differences among patients, the existing technology relies on the training model of individual historical EEG signal data to achieve the detection effect (96% recall rate). Low (about 75%); Judging from the results of technical solutions for epilepsy detection in published journals, the current technical solutions need to be based on patient-specific models to achieve better results, and the generalization performance of the models is weak.
发明内容Contents of the invention
本发明目的在于针对现有技术的不足,提出一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,用于解决癫痫患者视频脑电检查过程中,对患者的癫痫发作进行实时检测,以及在检测到患者癫痫发作后进行报警并记录患者癫痫发作时刻的问题。The purpose of the present invention is to address the deficiencies in the prior art, and propose a real-time detection and monitoring system for seizures oriented to epileptic video EEG examination, which is used to solve the problem of real-time detection of epileptic seizures during the video EEG examination process of epileptic patients. And the problem of alarming and recording the moment of the patient's seizure after detecting the patient's seizure.
本发明的目的是通过以下技术方案来实现的:一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,该系统包括:The purpose of the present invention is achieved through the following technical solutions: a real-time detection and monitoring system for epileptic seizures oriented to epilepsy video electroencephalogram examination, the system comprising:
数据处理模块:用于输入患者脑电信号数据,将脑电信号数据按照时间分割成若干固定长度的数据片段,对分割后的脑电信号数据的每个通道进行小波分解,根据脑电电极位置,得到18个脑电信号通道,并将18个脑电信号通道按照4行5列的二维结构排布,中间一列缺少的2个通道分别根据通道位置的相对距离关系计算得到;输出为二维结构排布的信号分解后的数据;Data processing module: used to input the patient's EEG signal data, divide the EEG signal data into several fixed-length data segments according to time, and perform wavelet decomposition on each channel of the segmented EEG signal data, according to the EEG electrode position , get 18 EEG signal channels, and arrange the 18 EEG signal channels according to the two-dimensional structure of 4 rows and 5 columns, and the missing 2 channels in the middle column are calculated according to the relative distance relationship between the channel positions; the output is two The decomposed data of the signal arranged in the dimensional structure;
模型选择模块:构建z+3层结构的模型,其中前z层与数据处理模块中的小波分解的层数相对应,模型第一层的输入为小波分解最后一层分解后的输出;模型第二层的输入为模型第一层的输出和小波分解倒数第二层分解后的高频部分;模型第三层的输入为模型第二层的输出和小波分解倒数第三层分解后的高频部分;依次类推,模型第z层的输入为模型第z-1层的输出和小波分解第一层分解后的高频部分;z+1层、z+2层和z+3层依次为卷积层、最大池化层和全连接层,输出为当前时刻癫痫未发作的概率和发作的概率;根据医院内患者库的数据,统计诊断结果中出现超过阈值次数的癫痫类型,以癫痫类型对应的患者脑电信号数据分别训练相应的癫痫发作检测模型,根据当前患者的视频脑电图检查的脑电信号数据最接近的癫痫类型,选择对应的癫痫发作检测模型来进行检测。Model selection module: build a model with z+3 layer structure, where the first z layer corresponds to the number of layers of wavelet decomposition in the data processing module, the input of the first layer of the model is the output of the last layer of wavelet decomposition; The input of the second layer is the output of the first layer of the model and the high frequency part decomposed by the penultimate layer of wavelet decomposition; the input of the third layer of the model is the output of the second layer of the model and the high frequency part of the penultimate layer of wavelet decomposition part; and so on, the input of the zth layer of the model is the output of the z-1st layer of the model and the high-frequency part decomposed by the first layer of wavelet decomposition; the z+1 layer, z+2 layer and z+3 layer are the volume Multilayer, maximum pooling layer and fully connected layer, the output is the probability of no epilepsy and the probability of seizure at the current moment; according to the data of the patient database in the hospital, the epilepsy types that have exceeded the threshold number of times in the diagnosis results are counted, and the epilepsy types are corresponding According to the EEG signal data of the current patient's video EEG examination, the corresponding epilepsy type is closest to the epilepsy type, and the corresponding seizure detection model is selected for detection.
癫痫发作报警模块:用于实时获取模型选择模块中癫痫发作检测模型输出的癫痫发作的概率,将一段时间内的癫痫发作概率进行平滑处理,根据设置的阈值判断是否向陪护人员报警,并在报警后停止工作,直到陪护人员确认癫痫停止发作或者超过设定时间后恢复工作;Epilepsy alarm module: used to obtain the probability of epileptic seizures output by the epileptic seizure detection model in the model selection module in real time, smooth the seizure probability within a period of time, judge whether to alarm the accompanying staff according to the set threshold, and report to the alarm Stop working until the escort confirms that the epilepsy has stopped or resumes work after the set time has passed;
交互式协同标注模块:用于癫痫发作报警模块、陪护人员和监控室之间的交互;陪护人员判断癫痫发作报警模块误报和漏报,并通过监控室进行复核,若确认判断癫痫发作报警模块误报和漏报,则调整报警阈值。Interactive collaborative labeling module: used for the interaction between the epileptic seizure alarm module, the escort and the monitoring room; the escort judges the false positives and false negatives of the epileptic seizure alarm module, and reviews it through the monitoring room. If it is confirmed, the epileptic seizure alarm module is judged If there are false positives and false negatives, adjust the alarm threshold.
进一步地,所述数据处理模块输入的患者脑电信号数据包括来自患者数据库的用于模型训练的数据以及实时视频脑电图检查的多通道脑电信号数据。Further, the patient's EEG signal data input by the data processing module includes data used for model training from the patient database and multi-channel EEG signal data of real-time video EEG examination.
进一步地,根据脑电电极位置,得到18个脑电信号通道为[Fp1-F7,F7-T3,T3-T5,T5-O1,Fp1-F3,F3-C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2];将18个通道排成4行5列的二维结构,第一列为[Fp1-F7,F7-T3,T3-T5,T5-O1],第二列为[Fp1-F3,F3-C3,C3-P3,P3-O1],第三列为[Fz-Cz,Cz-Pz],第四列为[Fp2-F4,F4-C4, C4-P4,P4-O2],第五列为[Fp2-F8,F8-T4,T4-T6,T6-O2],中间一列由于只有2个通道,前后分别添加一个通道,用N1和N2表示,即第三列为[N1,Fz-Cz,Cz-Pz,N2],N1和N2根据电极之间的相对距离关系确定。Further, according to the position of the EEG electrodes, 18 EEG signal channels are obtained as [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3-C3, C3-P3, P3-O1, Fz-Cz, Cz-Pz, Fp2-F4, F4-C4, C4-P4, P4-O2, Fp2-F8, F8-T4, T4-T6, T6-O2]; arrange 18 channels in 4 rows of 5 The two-dimensional structure of the column, the first column is [Fp1-F7,F7-T3,T3-T5,T5-O1], the second column is [Fp1-F3,F3-C3,C3-P3,P3-O1], The third column is [Fz-Cz,Cz-Pz], the fourth column is [Fp2-F4,F4-C4, C4-P4,P4-O2], and the fifth column is [Fp2-F8,F8-T4,T4 -T6,T6-O2], since there are only 2 channels in the middle column, add a channel before and after, denoted by N1 and N2, that is, the third column is [N1,Fz-Cz,Cz-Pz,N2], N1 and N2 It is determined according to the relative distance relationship between electrodes.
进一步地,Fp1-F3,Fp2-F4与Fp1-F7,Fp2-F8到N1的距离估计为1:2,考虑信号传播的指数衰减,故计算N1时两者系数比为4:1,N2同理;N1和N2的计算公式如下:Further, the distance between Fp1-F3, Fp2-F4 and Fp1-F7, Fp2-F8 to N1 is estimated to be 1:2, considering the exponential attenuation of signal propagation, so the ratio of the two coefficients when calculating N1 is 4:1, and N2 is the same as The calculation formula of N1 and N2 is as follows:
进一步地,模型选择模块构建的模型中第z+1层卷积层的卷积核根据数据处理模块输出的二维结构排布的数据形式进行设置,由于二维结构排布为4*5的形式,因此第z+1层卷积层的卷积核中和脑电信号通道相关部分的结构设置为2*2,第z+2层最大池化层的池化核中和脑电信号通道相关部分的结构设置为3*2。Further, the convolution kernel of the z+1th convolutional layer in the model constructed by the model selection module is set according to the data form of the two-dimensional structure arrangement output by the data processing module, since the two-dimensional structure arrangement is 4*5 form, so the structure of the convolution kernel of the z+1th layer convolutional layer and the relevant part of the EEG signal channel is set to 2*2, and the pooling kernel of the z+2th layer maximum pooling layer neutralizes the EEG signal channel The structure of the relevant part is set to 3*2.
进一步地,根据医院内患者库的数据,计算中每个患者发作间期18个通道脑电信号数据的各个频段信号数据的方差,其中各个频段与模型前z层输入的小波分解的频段相对应,得到一个表示脑电信号特征的矩阵,并且以诊断的癫痫类型作为标签;在当前患者开始进行视频脑电图检查时,计算其发作间期18个通道脑电信号数据的各个频段信号数据的方差,得到一个表示当前患者脑电信号特征的矩阵,通过k近邻算法判断最接近的癫痫类型,选择对应的癫痫发作检测模型。Further, according to the data of the patient database in the hospital, calculate the variance of the signal data of each frequency band of the 18-channel EEG signal data of each patient in the interictal period, where each frequency band corresponds to the frequency band of the wavelet decomposition input by the front z layer of the model , get a matrix representing the characteristics of EEG signals, and use the diagnosed epilepsy type as a label; when the current patient starts to undergo video EEG examination, calculate the signal data of each frequency band of the 18 channels of EEG signal data during the interictal period Variance, to obtain a matrix representing the characteristics of the EEG signal of the current patient, use the k-nearest neighbor algorithm to determine the closest epilepsy type, and select the corresponding seizure detection model.
进一步地,所述k近邻算法中表示当前患者与医院内患者库内患者的距离distance计算公式如下:Further, in the k-nearest neighbor algorithm, the calculation formula of the distance between the current patient and the patient in the patient bank in the hospital is as follows:
其中d
i表示第i个通道对应的距离。
where d i represents the distance corresponding to the i-th channel.
进一步地,所述癫痫发作报警模块将一段时间内的τ个癫痫发作概率值进行平滑处理,并将阈值设置为0.9,若超过阈值,则向陪护人员报警;具体实现过程为:Further, the epileptic seizure alarm module smoothes the τ seizure probability values within a period of time, and sets the threshold to 0.9, and if it exceeds the threshold, an alarm is sent to the accompanying personnel; the specific implementation process is:
其中,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,p(t-j)表示t-j时刻癫痫发作检测模型输出的癫痫发作的概率,t表示当前时刻,j表示时间间隔。Among them, P(t) represents the smoothing result of the seizure alarm module at time t, p(t-j) represents the probability of seizures output by the seizure detection model at time t-j, t represents the current moment, and j represents the time interval.
进一步地,所述交互式协同标注模块在癫痫发作报警模块误报时,将报警阈值上调,具 体实现过程为:Further, the interactive collaborative labeling module raises the alarm threshold when the epileptic seizure alarm module makes a false alarm, and the specific implementation process is:
r′=min(0.95,r+5(1-r)(1-e
r-P(t))+0.01)
r'=min(0.95, r+5(1-r)(1-e rP(t) )+0.01)
在癫痫发作报警模块漏报时,将报警阈值下调;具体实现过程为:When the epileptic seizure alarm module fails to report, the alarm threshold is lowered; the specific implementation process is:
r′=max(0.8,r+5(1-r)(1-e
r-P(t))-0.01)
r'=max(0.8, r+5(1-r)(1-e rP(t) )-0.01)
其中,r′表示调整后的报警阈值,min()表示取最小值函数,r表示调整前的报警阈值,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,t表示当前时刻。Among them, r' represents the adjusted alarm threshold, min() represents the function of taking the minimum value, r represents the alarm threshold before adjustment, P(t) represents the smoothing result of the seizure alarm module at time t, and t represents the current time.
进一步地,所述交互式协同标注模块确认癫痫发作报警模块误报或漏报总数超过3次,则放弃当前的癫痫发作检测模型,根据最近一段时间内的患者发作间期脑电信号数据重新进行模型选择。Further, when the interactive collaborative labeling module confirms that the total number of false positives or false positives of the seizure alarm module exceeds 3 times, the current seizure detection model is abandoned, and the process is performed again according to the EEG signal data of the patient's interictal period in the most recent period of time. Model selection.
本发明的有益效果:Beneficial effects of the present invention:
1、将脑电通道按照物理空间中的相对位置关系,排列在二维的平面中,提高训练和测试效率,减少训练和测试过程中的时间,满足实时检测的需求。1. Arrange the EEG channels in a two-dimensional plane according to their relative positions in the physical space, improve the efficiency of training and testing, reduce the time during training and testing, and meet the needs of real-time detection.
2、根据历史数据,将患者的脑电类型分成若干类别,分别训练模型,当有新的患者需要进行癫痫发作实时检测时,以脑电信号最接近类别的模型作为癫痫发作检测模型,提高癫痫发作检测的准确率,提升医生和陪护人员的使用体验。2. According to the historical data, the EEG type of the patient is divided into several categories, and the models are trained separately. When a new patient needs to detect epileptic seizures in real time, the model with the closest category of EEG signals is used as the epileptic seizure detection model to improve epilepsy. The accuracy of seizure detection improves the experience of doctors and accompanying staff.
3、构建基于小波分解的卷积神经网络模型,不同通道之间共享参数,训练过程从小波分解的最后一层向前逐层学习,充分学习脑电信号不同尺度下的特征,提升癫痫发作检测模型性能。3. Construct a convolutional neural network model based on wavelet decomposition, share parameters between different channels, and learn from the last layer of wavelet decomposition in the training process to fully learn the characteristics of different scales of EEG signals and improve seizure detection Model performance.
4、形成陪护人员,检测系统和监控室之间的协同标记,在癫痫发作自动检测报警的基础上,引入陪护人员和监控室进行交互式协同标记,提高癫痫发作标记的质量,能够提升医生的目视读图效率。4. Form a collaborative marking between the escort, the detection system and the monitoring room. On the basis of the automatic detection and alarm of epileptic seizures, introduce the interactive collaborative marking of the accompanying staff and the monitoring room to improve the quality of epileptic seizure marking and improve the doctor's efficiency. Visual reading efficiency.
图1为面向癫痫视频脑电图检查的实时检测监控系统流程图;Fig. 1 is the flow chart of the real-time detection and monitoring system facing epilepsy video EEG examination;
图2为国际10-20系统电极位置示意图;Figure 2 is a schematic diagram of the electrode position of the international 10-20 system;
图3为小波分解过程示意图;Fig. 3 is the schematic diagram of wavelet decomposition process;
图4为模型结构前五层示意图;Figure 4 is a schematic diagram of the first five layers of the model structure;
图5为癫痫发作报警模块自动报警后交互式协同标注模块工作流程图;Fig. 5 is the working flow chart of the interactive collaborative labeling module after the automatic alarm of the epileptic seizure alarm module;
图6为陪护人员主动报警后交互式协同标注模块工作流程图。Fig. 6 is a workflow diagram of the interactive collaborative labeling module after the accompanying staff actively alarms.
以下结合附图对本发明具体实施方式作进一步详细说明。The specific embodiments of the present invention will be described in further detail below in conjunction with the accompanying drawings.
如图1所示,本发明提供的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统, 该系统包括:数据处理模块、模型选择模块、癫痫发作报警模块和交互式协同标注模块;具体如下:As shown in Figure 1, a kind of real-time detection and monitoring system of epileptic seizures oriented to epilepsy video EEG examination provided by the present invention, the system includes: a data processing module, a model selection module, an epileptic seizure alarm module and an interactive collaborative labeling module; details as follows:
1.数据处理模块,原始输入数据来自患者数据库或者实时视频脑电图检查的多通道脑电信号,数据处理模块用于将数据分割成1s长度片段后,对数据进行离散小波变换的信号分解并将脑电信号通道按照二维结构排布;具体为:1. Data processing module, the original input data comes from the patient database or the multi-channel EEG signal of real-time video EEG examination, the data processing module is used to divide the data into 1s length segments, decompose the data by discrete wavelet transform and Arrange the EEG signal channels according to the two-dimensional structure; specifically:
本发明采用国际10-20系统规定的脑电电极放置标准,包括Fp1,F7,T3,T5,O1,F3,C3,P3,Fz,Cz,Pz,Fp2,F4,C4,P4,O2,F8,T4,T6共19个电极位置,如图2所示,利用相邻双电极电位差信号,可以得到[Fp1-F7,F7-T3,T3-T5,T5-O1,Fp1-F3,F3-C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2]的18个通道信息。The present invention adopts the EEG electrode placement standard stipulated by the international 10-20 system, including Fp1, F7, T3, T5, O1, F3, C3, P3, Fz, Cz, Pz, Fp2, F4, C4, P4, O2, F8 , T4, T6 have a total of 19 electrode positions, as shown in Figure 2, using the potential difference signals of adjacent double electrodes, we can get [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3- C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2] 18 channel information.
1.1数据分割1.1 Data Segmentation
以时间长度为1s的移动窗口的分割脑电信号,信号采样频率为256Hz,得到256*18的二维信号片段。Segment the EEG signal with a moving window with a time length of 1s, and the signal sampling frequency is 256Hz to obtain 256*18 two-dimensional signal segments.
1.2信号的小波分解1.2 Wavelet decomposition of signal
针对每个通道的脑电信号x,利用离散小波变换的小波函数和尺度函数对信号进行分解,将输入的脑电信号,分解成高频细节和低频近似两部分,并且用同样的方式不断在低频近似部分重复操作,细分至第五层,每次分解得到的脑电信号数据长度为原来的一半,例如第一次分解时将脑电信号数据长度由256变成128。如图3所示,每个通道的脑电初始信号分解得到D1,A1,D2,A2,D3,A3,D4,A4,D5,A5,分别表示64-128Hz,0-64Hz,32-64Hz,0-32Hz,16-32Hz,0-16Hz,8-16Hz,0-8Hz,4-8Hz,0-4Hz的一组信号(x,D1,A1,D2,A2,D3,A3,D4,A4,D5,A5),其数据长度分别为(256,128,128,64,64,32,32,16,16,8,8)。For the EEG signal x of each channel, the wavelet function and scale function of the discrete wavelet transform are used to decompose the signal, and the input EEG signal is decomposed into two parts: high-frequency details and low-frequency approximation, and continuously The low-frequency approximation part is repeatedly operated, subdivided into the fifth layer, and the length of the EEG signal data obtained by each decomposition is half of the original. For example, the length of the EEG signal data is changed from 256 to 128 in the first decomposition. As shown in Figure 3, the initial EEG signal of each channel is decomposed to obtain D1, A1, D2, A2, D3, A3, D4, A4, D5, A5, respectively representing 64-128Hz, 0-64Hz, 32-64Hz, 0-32Hz, 16-32Hz, 0-16Hz, 8-16Hz, 0-8Hz, 4-8Hz, 0-4Hz a group of signals (x, D1, A1, D2, A2, D3, A3, D4, A4, D5, A5), the data lengths are (256, 128, 128, 64, 64, 32, 32, 16, 16, 8, 8) respectively.
1.3通道二维排布1.3 Two-dimensional arrangement of channels
按目前普通采用的方式,将脑电图的通道按照简单的顺序一维排列,形成18个信号通道,即[Fp1-F7,F7-T3,T3-T5,T5-O1,Fp1-F3,F3-C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2]。在目前的应用中,都没有针对通道位置进行处理,只是按照固定的一种顺序来记录。本发明为了充分体现通道的空间相对位置关系,将18个通道按照表1的形式排成4行5列的二维结构,第一列为[Fp1-F7,F7-T3,T3-T5,T5-O1],第二列为[Fp1-F3,F3-C3,C3-P3,P3-O1],第三列为[Fz-Cz,Cz-Pz],第四列为[Fp2-F4,F4-C4,C4-P4,P4-O2],第五列为[Fp2-F8,F8-T4,T4-T6,T6-O2],中间一列由于只有2个通道,前后分别添加一个通道,用N1和N2表示,即第三列为[N1,Fz-Cz,Cz-Pz,N2],N1和N2分别根据相邻的电极计算得到,作为空缺处的填充值,N1和N2的计算公式如下,将18个线性记录的信号通道,转换为4行5列的二维通道排布结构。According to the currently commonly used method, the channels of the EEG are arranged one-dimensionally in a simple order to form 18 signal channels, namely [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3 -C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2 ]. In the current application, the channel position is not processed, but recorded in a fixed order. In order to fully reflect the spatial relative positional relationship of the channels, the present invention arranges 18 channels into a two-dimensional structure of 4 rows and 5 columns according to the form of Table 1, and the first column is [Fp1-F7, F7-T3, T3-T5, T5 -O1], the second column is [Fp1-F3,F3-C3,C3-P3,P3-O1], the third column is [Fz-Cz,Cz-Pz], the fourth column is [Fp2-F4,F4 -C4,C4-P4,P4-O2], the fifth column is [Fp2-F8,F8-T4,T4-T6,T6-O2], because there are only 2 channels in the middle column, add a channel before and after, use N1 and N2, that is, the third column is [N1, Fz-Cz, Cz-Pz, N2], N1 and N2 are calculated according to the adjacent electrodes respectively, as the filling value of the vacancy, the calculation formula of N1 and N2 is as follows, Convert 18 linearly recorded signal channels into a two-dimensional channel arrangement structure of 4 rows and 5 columns.
如图2所示,考虑到电极之间的相对距离关系,Fp1-F3,Fp2-F4与Fp1-F7,Fp2-F8到中间空缺通道处的距离大约为1∶2,考虑信号传播的指数衰减,故计算N1时两者系数比为4∶1,N2同理。As shown in Figure 2, considering the relative distance relationship between electrodes, the distance between Fp1-F3, Fp2-F4 and Fp1-F7, Fp2-F8 to the middle vacant channel is about 1:2, considering the exponential attenuation of signal propagation , so the ratio of the two coefficients is 4:1 when calculating N1, and the same is true for N2.
本发明采用将脑电信号通道进行二维排布,可以充分利用通道之间的相对位置关系,结合卷积神经网络,可以减少模型训练参数,提高模型训练的速度,有效地解决本发明基于不同癫痫发作类型训练癫痫发作检测模型,对应的癫痫发作训练样本减少,需要训练多个模型的现实情况。The present invention adopts the two-dimensional arrangement of EEG signal channels, which can make full use of the relative positional relationship between the channels, combined with the convolutional neural network, can reduce model training parameters, improve the speed of model training, and effectively solve the problem of the present invention based on different Seizure types train the seizure detection model, the corresponding seizure training samples are reduced, and it is necessary to train multiple models in reality.
表1本发明信号通道空间排布表Table 1 Spatial arrangement table of signal channel of the present invention
Fp1-F7Fp1-F7 | Fp1-F3Fp1-F3 | N1N1 | Fp2-F4Fp2-F4 | Fp2-F8Fp2-F8 |
F7-T3F7-T3 | F3-C3F3-C3 | Fz-CzFz-Cz | F4-C4F4-C4 | F8-T4F8-T4 |
T3-T5T3-T5 | C3-P3C3-P3 | Cz-PzCz-Pz | C4-P4C4-P4 | T4-T6T4-T6 |
T5-O1T5-O1 | P3-O1P3-O1 | N2N2 | P4-O2P4-O2 | T6-O2T6-O2 |
2.模型选择模块,设计适合于小波分解后一系列数据的模型结构,对出现频率最高的癫痫发作类型的患者分别训练癫痫发作检测模型,构成癫痫发作检测模型集,并根据患者脑电信号的信号特征,利用k近邻算法,从模型集中选择适合当前患者使用的癫痫发作检测模型;2. Model selection module, design a model structure suitable for a series of data after wavelet decomposition, train the seizure detection model for the patients with the highest frequency of epileptic seizures to form a seizure detection model set, and according to the EEG signal of the patient Signal characteristics, using the k-nearest neighbor algorithm to select a seizure detection model suitable for the current patient from the model set;
2.1模型构建2.1 Model Construction
模型构建基于小波分解和通道二维排布处理后的脑电信号数据,其构建过程如图4所示,具体为:The model construction is based on the EEG signal data processed by wavelet decomposition and channel two-dimensional arrangement. The construction process is shown in Figure 4, specifically:
1)模型的输入以数据处理模块的输出为基础,以各阶小波的高频细节D1,D2,D3,D4,D5和最后一阶小波的低频近似A5作为模型的输入;1) The input of the model is based on the output of the data processing module, with the high-frequency details D1, D2, D3, D4, D5 of each order wavelet and the low-frequency approximation A5 of the last order wavelet as the input of the model;
2)模型的第一层输入为D5,A5,数据长度均为8,信号通道为4*5的二维结构,故第一层输入数据的结构为(2*8)*4*5,卷积参数矩阵为(2*2)*1*1@4,其中@表示其后的数字为该层提取的特征数,步长为(1,2,1,1),计算结果的结构为(1*4)*4*5*4,保持通道结构不变,对信号结构进行调整,作为第一层的输出C5,同时也是下一层输入的一部分,其结构为(1*16)*4*5;2) The input of the first layer of the model is D5, A5, the data length is 8, and the signal channel is a two-dimensional structure of 4*5, so the structure of the input data of the first layer is (2*8)*4*5, volume The product parameter matrix is (2*2)*1*1@4, where @ indicates that the subsequent number is the number of features extracted by this layer, the step size is (1, 2, 1, 1), and the structure of the calculation result is ( 1*4)*4*5*4, keep the channel structure unchanged, adjust the signal structure, as the output C5 of the first layer, and also part of the input of the next layer, its structure is (1*16)*4 *5;
3)模型的第二层的输入为第一层的输入C5和D4,数据长度为16,信号通道仍为4*5的二维结构,故第二层输入数据的结构为(2*16)*4*5,卷积参数矩阵为(2*2)*4*5@4,步长为(1,2,1,1),计算结果的结构为(1*8)*4*5*4,保持通道结构不变,对信号结构进行调整,作为第 二层的输出C4,同时也是下一层输入的一部分,其结构为(1*32)*4*5;3) The input of the second layer of the model is the input C5 and D4 of the first layer, the data length is 16, and the signal channel is still a two-dimensional structure of 4*5, so the structure of the input data of the second layer is (2*16) *4*5, the convolution parameter matrix is (2*2)*4*5@4, the step size is (1, 2, 1, 1), and the structure of the calculation result is (1*8)*4*5* 4. Keep the channel structure unchanged, adjust the signal structure, as the output C4 of the second layer, and also part of the input of the next layer, its structure is (1*32)*4*5;
4)模型的第三至五层的结构可按上述第二层类推,得到输出第三的输出C3,第四的输出C2,第五的输出C1结构分别为(1*64)*4*5,(1*128)*4*5,(1*256)*4*5;4) The structure of the third to fifth layers of the model can be analogized according to the second layer above, and the output of the third output C3, the fourth output C2, and the fifth output C1 are respectively (1*64)*4*5 , (1*128)*4*5, (1*256)*4*5;
5)模型第六层的输入为第五层的输出C1,(1*256)*4*5,去除长度为1的维度,即为256*4*5,卷积参数矩阵为8*2*2@4,步长设置为(8,1,1),其输出的结构为16*3*4*4;5) The input of the sixth layer of the model is the output C1 of the fifth layer, (1*256)*4*5, and the dimension with a length of 1 is removed, which is 256*4*5, and the convolution parameter matrix is 8*2* 2@4, the step size is set to (8,1,1), and the output structure is 16*3*4*4;
6)模型的第七层为(1,3,2,1)的最大池化层,其输入为第六层的输出,计算结果的结构为(16*1*2*4),进一步转换为长度为128的一维向量,输入最后一层;6) The seventh layer of the model is the maximum pooling layer of (1,3,2,1), whose input is the output of the sixth layer, and the structure of the calculation result is (16*1*2*4), which is further converted to A one-dimensional vector with a length of 128, input to the last layer;
7)模型的最后一层为全连接层,输入为上一层输出,输出为长度为2的向量,经过softmax函数的归一化处理,分别表示当前时刻癫痫未发作的概率和发作的概率;7) The last layer of the model is a fully connected layer, the input is the output of the previous layer, and the output is a vector with a length of 2, which is normalized by the softmax function, which respectively represent the probability of no epilepsy and the probability of seizure at the current moment;
8)本模型均采用修正线性单元函数ReLU最为激活函数,最后一层采用softmax函数对输出进行归一化处理,训练过程使用交叉熵作为损失函数,如下式。8) This model uses the modified linear unit function ReLU as the activation function, and the last layer uses the softmax function to normalize the output. The training process uses cross-entropy as the loss function, as shown in the following formula.
其中L表示损失函数,其中M表示每次训练的样本数量,i表示第i个样本,y
i表示第i个样本的真实类别,
表示第i个样本预测为正类的概率。
Where L represents the loss function, where M represents the number of samples for each training, i represents the i-th sample, and y i represents the true category of the i-th sample, Indicates the probability that the i-th sample is predicted to be a positive class.
2.2模型选择2.2 Model selection
根据医院内既有的患者库数据,包含患者既往就诊人员的脑电信号数据和脑电图报告,统计诊断结果中出现超过阈值次数的癫痫类型,根据癫痫类型对应的患者脑电信号数据分别训练相应模型,其中阈值为根据训练得到的模型精度确定,一般取值为15,构成一组模型。计算包含在这组模型中的每个患者发作间期18个通道脑电信号数据的0-4Hz,4-8Hz,8-16Hz,16-32Hz,32-64Hz,64-128Hz共6个频段信号的方差,得到一个18*6的矩阵表示脑电信号特征,并且以脑电图报告中诊断的癫痫类型作为其标签,计算每个通道的每个频段脑电信号数据的均值和方差。According to the existing patient database data in the hospital, including the EEG signal data and EEG report of the patient's previous visits, the epilepsy types that have exceeded the threshold number of times in the statistical diagnosis results are trained separately according to the patient's EEG signal data corresponding to the epilepsy type Corresponding models, where the threshold value is determined according to the model accuracy obtained through training, and generally takes a value of 15 to form a set of models. Calculate 6 frequency band signals of 0-4Hz, 4-8Hz, 8-16Hz, 16-32Hz, 32-64Hz, 64-128Hz of 18 channels of EEG signal data of each patient in this group of models A 18*6 matrix is obtained to represent the EEG signal features, and the epilepsy type diagnosed in the EEG report is used as its label to calculate the mean and variance of the EEG signal data in each frequency band of each channel.
其中x[i]表示每个通道的每个频段的脑电信号数据的第i个采样点的数值,n表示每个通道的每个频段脑电信号数据x的长度,avr表示每个通道的每个频段脑电信号数据的均值,var表示每个通道的每个频段脑电信号数据的方差。Among them, x[i] represents the value of the i-th sampling point of the EEG signal data of each frequency band of each channel, n represents the length of each frequency band EEG signal data x of each channel, and avr represents the value of each channel The mean value of the EEG signal data of each frequency band, and var represents the variance of the EEG signal data of each frequency band of each channel.
当有新患者需要开始进行视频脑电图检查时,在脑电信号开始正常记录后,取癫痫发作间期的5分钟数据,计算其各通道6个频段信号的方差,得到一个表示当前患者脑电信号特征的矩阵,利用k近邻算法(本发明k值设置为8)判断当前患者的脑电信号数据更接近于哪一种癫痫类型患者的脑电信号数据,以最接近的一类所对应的模型,作为当前患者的癫痫发作检测模型。k近邻算法的两个患者之间的距离计算公式为:When a new patient needs to start a video EEG examination, after the normal recording of the EEG signal, take the 5-minute data of the interval between seizures, calculate the variance of the 6 frequency band signals of each channel, and obtain a representation of the current patient's brain. The matrix of electrical signal features uses the k-nearest neighbor algorithm (the k value of the present invention is set to 8) to determine which EEG data of the current patient is closer to the EEG data of the patient with epilepsy type, and corresponds to the closest class , as a seizure detection model for the current patient. The formula for calculating the distance between two patients in the k-nearest neighbor algorithm is:
其中d
i表示第i个通道对应的距离,var1表示当前患者0-4Hz频段的方差,var2表示当前患者4-8Hz频段的方差,var6表示当前患者64-128Hz频段的方差。var1′至var6′则表示用于比较的患者库中患者对应频段的方差。distance为用于k近邻算法比较的距离。
Among them, d i represents the distance corresponding to the i-th channel, var1 represents the variance of the 0-4Hz frequency band of the current patient, var2 represents the variance of the 4-8Hz frequency band of the current patient, and var6 represents the variance of the 64-128Hz frequency band of the current patient. var1' to var6' represent the variance of the corresponding frequency bands of the patients in the patient database used for comparison. distance is the distance used for k-nearest neighbor algorithm comparison.
3.癫痫发作报警模块,用于当前患者癫痫发作时,本发明系统及时地向监控室和陪护人员报警,也可以由陪护人员发起,向监控室发送报警;3. Epilepsy alarm module, used for the current patient's epileptic seizure, the system of the present invention promptly alarms the monitoring room and the accompanying personnel, and can also be initiated by the accompanying personnel to send an alarm to the monitoring room;
癫痫发作检测模型实时输出当前这一秒依据患者脑电判断为癫痫发作的可能性,本发明综合考虑癫痫发作检测的敏感性,错误报警比率和实时性,连续3s输出的概率值进行平滑,将阈值设置为0.9,若超过阈值,则系统向陪护人员和监控室报警,警报发出后,报警模块会进入3分钟的免疫时间,此期间内不再重复发出警报。The epileptic seizure detection model outputs in real time the possibility that the current second is judged to be an epileptic seizure according to the patient's EEG. The present invention comprehensively considers the sensitivity of epileptic seizure detection, the false alarm rate and real-time performance, and smoothes the probability value output for 3 consecutive seconds. The threshold is set to 0.9. If the threshold is exceeded, the system will alarm the accompanying personnel and the monitoring room. After the alarm is issued, the alarm module will enter a 3-minute immunity time, and the alarm will not be repeated during this period.
其中,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,为癫痫发作事件发生的可能性,P(t)越大,癫痫发作事件发生的可能性越大,p(t)表示t时刻癫痫发作检测模型输出的癫痫发作概率。Among them, P(t) represents the smoothing result of the epileptic seizure alarm module at time t, which is the possibility of epileptic seizure events. The larger P(t) is, the greater the possibility of epileptic seizure events is, p(t) represents The seizure probability output by the seizure detection model at time t.
4.交互式协同标注模块,用于本发明系统中癫痫发作报警模块、陪护人员和监控室之间的人机交互,涉及系统自动报警和人工确认的协调,以及人工主动标记对系统检测的反馈调节;4. The interactive collaborative labeling module is used for the human-computer interaction between the epileptic seizure alarm module, the accompanying personnel and the monitoring room in the system of the present invention, involving the coordination of the system's automatic alarm and manual confirmation, and the feedback of manual active marking to system detection adjust;
交互式协同标注模块主要是陪护人员和监护室与癫痫发作报警模块之间的人机交互,其主体是陪护人员和癫痫发作报警模块之间的交互,监控室起到确认和安全保障的作用。The interactive collaborative labeling module is mainly the human-computer interaction between the escort and the monitoring room and the seizure alarm module. The main body is the interaction between the escort and the seizure alarm module, and the monitoring room plays the role of confirmation and security.
如图5所示,当癫痫发作报警模块检测到癫痫发作时,自动向陪护人员和值班室发出警报,提示陪护人员在接下来的3分钟内保持注意,同时在监控室的所有监控对象中,提示该患者正在癫痫发作状态,保持关注。若确有癫痫发作,则记录患者癫痫发作时的症状;若未观察到癫痫发作,则向监控室发送误报信息,监控室查看前3分钟记录确认情况,若确认癫 痫发作报警模块误报,则通过交互式协同标注模块将癫痫发作报警模块的报警阈值上调,并记录这次误报,其报警阈值上调的具体实现过程为:As shown in Figure 5, when the epileptic seizure alarm module detects an epileptic seizure, it will automatically send an alarm to the accompanying personnel and the duty room, prompting the accompanying personnel to keep attention within the next 3 minutes, and at the same time, among all the monitoring objects in the monitoring room, Prompt that the patient is in an epileptic state, keep attention. If there is indeed an epileptic seizure, record the symptoms of the patient's epileptic seizure; if no epileptic seizure is observed, a false alarm message will be sent to the monitoring room, and the monitoring room will record and confirm the situation 3 minutes before checking. Then through the interactive collaborative labeling module, the alarm threshold of the epileptic seizure alarm module is raised, and this false alarm is recorded. The specific implementation process of raising the alarm threshold is as follows:
r′=min(0.95,r+5(1-r)(1-e
r-P(t))+0.01)
r'=min(0.95, r+5(1-r)(1-e rP(t) )+0.01)
其中,r′表示调整后的报警阈值,min()表示取最小值函数,r表示调整前的报警阈值,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,t表示当前时刻。Among them, r' represents the adjusted alarm threshold, min() represents the function of taking the minimum value, r represents the alarm threshold before adjustment, P(t) represents the smoothing result of the seizure alarm module at time t, and t represents the current time.
若监控室确认的确存在癫痫发作,则记录下发作时刻,若监控室无法确认,则暂时标记为可疑,待医生判断。若癫痫发作持续时间较长或者比较严重,陪护人员可以通过系统向监控室求助,监控室可以第一时间通过视频看到现场情况并提供指导和帮助。If the monitoring room confirms that there is indeed an epileptic seizure, the seizure time will be recorded. If the monitoring room cannot confirm it, it will be temporarily marked as suspicious, pending the judgment of the doctor. If the epileptic seizure lasts longer or is more serious, the accompanying staff can ask for help from the monitoring room through the system, and the monitoring room can see the situation at the scene through the video at the first time and provide guidance and help.
如图6所示,当陪护人员在陪护过程中发现患者癫痫发作,而癫痫发作报警模块未报警,则陪护人员可以手动报警,向监控室发送漏报信息,监控室通过视频和脑电的综合分析,形成初步判断。若监控室确认此次陪护人员的报警是由于非特异动作引起的误报,将反馈给陪护人员;若监控室对此次报警无法确认,则标记为可疑,待医生目视读图时分析;若监控室确认癫痫发作,会反馈至癫痫发作报警模块,将阈值下调,并记录一次癫痫发作报警模块漏报,其报警阈值下调的具体实现过程为:As shown in Figure 6, when the escort finds the patient's epileptic seizure during the escorting process, but the seizure alarm module does not alarm, the escort can manually call the police and send the missing report information to the monitoring room. Analyze and form a preliminary judgment. If the monitoring room confirms that the escort's alarm is a false alarm caused by non-specific actions, it will feed back to the accompanying staff; if the monitoring room cannot confirm the alarm, it will be marked as suspicious and will be analyzed when the doctor visually reads the picture; If the monitoring room confirms an epileptic seizure, it will feed back to the epileptic seizure alarm module, lower the threshold, and record a missed report by the epileptic seizure alarm module. The specific implementation process of lowering the alarm threshold is as follows:
r′=max(0.8,r+5(1-r)(1-e
r-P(t))-0.01)
r'=max(0.8, r+5(1-r)(1-e rP(t) )-0.01)
其中,r′表示调整后的报警阈值,min()表示取最大值函数,r表示调整前的报警阈值,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,t表示当前时刻。Among them, r' represents the adjusted alarm threshold, min() represents the function of taking the maximum value, r represents the alarm threshold before adjustment, P(t) represents the smoothing result of the seizure alarm module at time t, and t represents the current time.
若自动检测系统在1小时的误报或漏报总数超过3次,则放弃当前模型,根据这1小时内的间期脑电重新计算各通道信号方差,回到模型选择模块,重新进行模型选择。If the automatic detection system has more than 3 false positives or false negatives in 1 hour, the current model will be abandoned, and the signal variance of each channel will be recalculated according to the interval EEG within 1 hour, and the model selection module will be returned to the model selection again .
上述实施例用来解释说明本发明,而不是对本发明进行限制,在本发明的精神和权利要求的保护范围内,对本发明作出的任何修改和改变,都落入本发明的保护范围。The above-mentioned embodiments are used to illustrate the present invention, rather than to limit the present invention. Within the spirit of the present invention and the protection scope of the claims, any modification and change made to the present invention will fall into the protection scope of the present invention.
Claims (8)
- 一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,该系统包括:A real-time detection and monitoring system for epileptic seizures oriented to epilepsy video electroencephalogram examination, characterized in that the system includes:数据处理模块:用于输入患者脑电信号数据,将脑电信号数据按照时间分割成若干固定长度的数据片段,对分割后的脑电信号数据的每个通道进行小波分解,根据脑电电极位置,得到18个脑电信号通道,并将18个脑电信号通道按照4行5列的二维结构排布,中间一列缺少的2个通道分别根据通道位置的相对距离关系计算得到;输出为二维结构排布的信号分解后的数据;具体排布方式如下:18个脑电信号通道为[Fp1-F7,F7-T3,T3-T5,T5-O1,Fp1-F3,F3-C3,C3-P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2];将18个通道排成4行5列的二维结构,第一列为[Fp1-F7,F7-T3,T3-T5,T5-O1],第二列为[Fp1-F3,F3-C3,C3-P3,P3-O1],第三列为[Fz-Cz,Cz-Pz],第四列为[Fp2-F4,F4-C4,C4-P4,P4-O2],第五列为[Fp2-F8,F8-T4,T4-T6,T6-O2],在第三列[Fz-Cz,Cz-Pz]的前后分别添加一个通道,分别用N1和N2表示,即第三列为[N1,Fz-Cz,Cz-Pz,N2],N1和N2根据通道之间的相对距离关系确定;Fp1-F3,Fp2-F4与Fp1-F7,Fp2-F8到N1的距离估计为1:2,考虑信号传播的指数衰减,故计算N1时两者系数比为4:1,N2同理;N1和N2的计算公式如下:Data processing module: used to input the patient's EEG signal data, divide the EEG signal data into several fixed-length data segments according to time, and perform wavelet decomposition on each channel of the segmented EEG signal data, according to the EEG electrode position , get 18 EEG signal channels, and arrange the 18 EEG signal channels according to the two-dimensional structure of 4 rows and 5 columns, and the missing 2 channels in the middle column are calculated according to the relative distance relationship between the channel positions; the output is two The decomposed data of the signal arranged in three-dimensional structure; the specific arrangement is as follows: 18 EEG signal channels are [Fp1-F7, F7-T3, T3-T5, T5-O1, Fp1-F3, F3-C3, C3 -P3,P3-O1,Fz-Cz,Cz-Pz,Fp2-F4,F4-C4,C4-P4,P4-O2,Fp2-F8,F8-T4,T4-T6,T6-O2]; Channels are arranged in a two-dimensional structure of 4 rows and 5 columns, the first column is [Fp1-F7, F7-T3, T3-T5, T5-O1], and the second column is [Fp1-F3, F3-C3, C3- P3,P3-O1], the third column is [Fz-Cz,Cz-Pz], the fourth column is [Fp2-F4,F4-C4,C4-P4,P4-O2], the fifth column is [Fp2- F8, F8-T4, T4-T6, T6-O2], add a channel before and after the third column [Fz-Cz, Cz-Pz], respectively represented by N1 and N2, that is, the third column is [N1, Fz-Cz, Cz-Pz, N2], N1 and N2 are determined according to the relative distance relationship between the channels; the distance between Fp1-F3, Fp2-F4 and Fp1-F7, Fp2-F8 to N1 is estimated to be 1:2, considering The exponential attenuation of signal propagation, so the coefficient ratio between the two is 4:1 when calculating N1, and the same is true for N2; the calculation formulas of N1 and N2 are as follows:模型选择模块:构建z+3层结构的模型,其中前z层与数据处理模块中的小波分解的层数相对应,模型第一层的输入为小波分解最后一层分解后的输出;模型第二层的输入为模型第一层的输出和小波分解倒数第二层分解后的高频部分;模型第三层的输入为模型第二层的输出和小波分解倒数第三层分解后的高频部分;依次类推,模型第z层的输入为模型第z-1层的输出和小波分解第一层分解后的高频部分;z+1层、z+2层和z+3层依次为卷积层、最大池化层和全连接层,输出为当前时刻癫痫未发作的概率和发作的概率;根据医院内患者库的数据,统计诊断结果中出现超过癫痫发作阈值次数的癫痫类型,以癫痫类型对应的患者脑电信号数据分别训练相应的癫痫发作检测模型,根据当前患者的视频脑电图检查的脑电信号数据最接近的癫痫类型,选择对应的癫痫发作检测模型来进行检测;Model selection module: build a model with z+3 layer structure, where the first z layer corresponds to the number of layers of wavelet decomposition in the data processing module, the input of the first layer of the model is the output of the last layer of wavelet decomposition; The input of the second layer is the output of the first layer of the model and the high frequency part decomposed by the penultimate layer of wavelet decomposition; the input of the third layer of the model is the output of the second layer of the model and the high frequency part of the penultimate layer of wavelet decomposition part; and so on, the input of the zth layer of the model is the output of the z-1st layer of the model and the high-frequency part decomposed by the first layer of wavelet decomposition; the z+1 layer, z+2 layer and z+3 layer are the volume The cumulative layer, the maximum pooling layer and the fully connected layer, the output is the probability of no seizure and the probability of seizure at the current moment; according to the data of the patient database in the hospital, the epilepsy types that exceed the threshold number of seizures in the diagnosis results are counted, and the epilepsy The EEG signal data of patients corresponding to the type respectively trains the corresponding seizure detection model, and selects the corresponding seizure detection model for detection according to the epilepsy type closest to the EEG signal data of the current patient's video EEG examination;癫痫发作报警模块:用于实时获取模型选择模块中癫痫发作检测模型输出的癫痫发作的概率,将一段时间内的癫痫发作概率进行平滑处理,根据设置的报警阈值判断是否向陪护人 员报警,并在报警后停止工作,直到陪护人员确认癫痫停止发作或者超过设定时间后恢复工作;Epilepsy alarm module: used to obtain the probability of epileptic seizure output by the epileptic seizure detection model in the model selection module in real time, smooth the seizure probability within a period of time, judge whether to alarm the accompanying staff according to the set alarm threshold, and Stop working after calling the police, and resume work until the escort confirms that the epilepsy has stopped or the set time has passed;交互式协同标注模块:用于癫痫发作报警模块、陪护人员和监控室之间的交互;陪护人员判断癫痫发作报警模块误报和漏报,并通过监控室进行复核,若确认判断癫痫发作报警模块误报和漏报,则调整报警阈值。Interactive collaborative labeling module: used for the interaction between the epileptic seizure alarm module, the escort and the monitoring room; the escort judges the false positives and false negatives of the epileptic seizure alarm module, and reviews it through the monitoring room. If it is confirmed, the epileptic seizure alarm module is judged If there are false positives and false negatives, adjust the alarm threshold.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,所述数据处理模块输入的患者脑电信号数据包括来自患者数据库的用于模型训练的数据以及实时视频脑电图检查的脑电信号数据。A kind of real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG inspection according to claim 1, characterized in that, the patient's EEG signal data input by the data processing module includes data from the patient database for model training data and real-time video EEG examination EEG signal data.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,模型选择模块构建的模型中第z+1层卷积层的卷积核根据数据处理模块输出的二维结构排布的数据形式进行设置,由于二维结构排布为4*5的形式,因此第z+1层卷积层的卷积核中和脑电信号通道相关部分的结构设置为2*2,第z+2层最大池化层的池化核中和脑电信号通道相关部分的结构设置为3*2。A kind of real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG inspection according to claim 1, wherein the convolution kernel of the z+1th convolutional layer in the model constructed by the model selection module is processed according to the data The data form of the two-dimensional structure arrangement output by the module is set. Since the two-dimensional structure is arranged in the form of 4*5, the structure of the convolution kernel of the z+1th convolutional layer and the relevant part of the EEG signal channel It is set to 2*2, and the structure of the pooling kernel and the part of the EEG signal channel in the maximum pooling layer of the z+2 layer is set to 3*2.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,根据医院内患者库的数据,计算每个患者发作间期18个通道脑电信号数据的各个频段信号数据的方差,其中各个频段与模型前z层输入的小波分解的频段相对应,得到一个表示脑电信号特征的矩阵,并且以诊断的癫痫类型作为标签;在当前患者开始进行视频脑电图检查时,计算其发作间期18个通道脑电信号数据的各个频段信号数据的方差,得到一个表示当前患者脑电信号特征的矩阵,通过k近邻算法判断最接近的癫痫类型,选择对应的癫痫发作检测模型。A real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG examination according to claim 1, characterized in that, according to the data of the patient database in the hospital, 18 channels of EEG signal data are calculated for each patient between seizures The variance of the signal data of each frequency band, where each frequency band corresponds to the frequency band of the wavelet decomposition input in the front z layer of the model, and a matrix representing the characteristics of the EEG signal is obtained, and the diagnosed epilepsy type is used as the label; the current patient starts to perform video During the EEG examination, calculate the variance of the signal data of each frequency band of the 18 channels of EEG signal data during the interictal period, and obtain a matrix representing the characteristics of the current patient's EEG signal, and use the k-nearest neighbor algorithm to determine the closest epilepsy type, select Corresponding seizure detection model.
- 根据权利要求4所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,所述k近邻算法中表示当前患者与医院内患者库内患者的距离distance计算公式如下:A kind of real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG examination according to claim 4, wherein the calculation formula of the distance distance between the current patient and the patients in the patient bank in the hospital in the k-nearest neighbor algorithm is as follows :其中d i表示第i个通道对应的距离。 where d i represents the distance corresponding to the i-th channel.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,所述癫痫发作报警模块将一段时间内的τ个癫痫发作概率值进行平滑处理,并将报警阈值设置为0.9,若超过报警阈值,则向陪护人员报警;具体实现过程为:A kind of epileptic seizure real-time detection and monitoring system oriented to epilepsy video electroencephalogram examination according to claim 1, characterized in that, the epileptic seizure alarm module smoothes the τ seizure probability values within a period of time, and Set the alarm threshold to 0.9, and if it exceeds the alarm threshold, an alarm will be sent to the escort; the specific implementation process is as follows:其中,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,p(t-j)表示t-j时刻癫痫发作检测模型输出的癫痫发作的概率,t表示当前时刻,j表示时间间隔。Among them, P(t) represents the smoothing result of the seizure alarm module at time t, p(t-j) represents the probability of seizures output by the seizure detection model at time t-j, t represents the current moment, and j represents the time interval.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,所述交互式协同标注模块在癫痫发作报警模块误报时,将报警阈值上调,具体实现过程为:A real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG inspection according to claim 1, wherein the interactive collaborative labeling module raises the alarm threshold when the epileptic seizure alarm module makes a false alarm, specifically implementing The process is:r′=min(0.95,r+5(1-r)(1-e r-P(t))+0.01) r'=min(0.95, r+5(1-r)(1-e rP(t) )+0.01)在癫痫发作报警模块漏报时,将报警阈值下调;具体实现过程为:When the epileptic seizure alarm module fails to report, the alarm threshold is lowered; the specific implementation process is:r′=max(0.8,r+5(1-r)(1-e r-P(t))-0.01) r'=max(0.8, r+5(1-r)(1-e rP(t) )-0.01)其中,r′表示调整后的报警阈值,min()表示取最小值函数,r表示调整前的报警阈值,P(t)表示t时刻癫痫发作报警模块平滑处理后的结果,t表示当前时刻。Among them, r' represents the adjusted alarm threshold, min() represents the function of taking the minimum value, r represents the alarm threshold before adjustment, P(t) represents the smoothing result of the seizure alarm module at time t, and t represents the current time.
- 根据权利要求1所述的一种面向癫痫视频脑电图检查的癫痫发作实时检测监控系统,其特征在于,所述交互式协同标注模块确认癫痫发作报警模块误报或漏报总数超过3次,则放弃当前的癫痫发作检测模型,根据最近一段时间内的患者发作间期脑电信号数据重新进行模型选择。A real-time detection and monitoring system for epileptic seizures oriented to epilepsy video EEG examination according to claim 1, wherein the interactive collaborative labeling module confirms that the total number of false positives or false negatives of the seizure alarm module exceeds 3 times, Then the current epileptic seizure detection model is abandoned, and the model selection is re-selected according to the EEG signal data of the patient's interictal period in the most recent period.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111455241.1A CN113842118B (en) | 2021-12-01 | 2021-12-01 | Epileptic seizure real-time detection monitoring system for epileptic video electroencephalogram examination |
CN202111455241.1 | 2021-12-01 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023098303A1 true WO2023098303A1 (en) | 2023-06-08 |
Family
ID=78982622
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/124694 WO2023098303A1 (en) | 2021-12-01 | 2022-10-11 | Real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113842118B (en) |
WO (1) | WO2023098303A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033988A (en) * | 2023-09-27 | 2023-11-10 | 之江实验室 | Epileptiform spike processing method and device based on nerve electric signal |
CN117251807A (en) * | 2023-11-17 | 2023-12-19 | 中国医学科学院生物医学工程研究所 | Motor imagery electroencephalogram signal classification method of neural network |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113842118B (en) * | 2021-12-01 | 2022-03-25 | 浙江大学 | Epileptic seizure real-time detection monitoring system for epileptic video electroencephalogram examination |
CN114145755B (en) * | 2021-12-21 | 2023-09-01 | 上海理工大学 | Household epileptic seizure interactive intelligent monitoring system and method |
CN115227504B (en) * | 2022-07-18 | 2023-05-26 | 浙江师范大学 | Automatic lifting sickbed system based on electroencephalogram-eye electric signals |
CN115778330A (en) * | 2023-02-07 | 2023-03-14 | 之江实验室 | Automatic epileptic seizure detection system and device based on video electroencephalogram |
CN116452924B (en) * | 2023-03-21 | 2023-10-13 | 长扬科技(北京)股份有限公司 | Model threshold adjustment method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101259016A (en) * | 2007-03-06 | 2008-09-10 | 李小俚 | Method for real time automatically detecting epileptic character wave |
US20090124923A1 (en) * | 2007-10-23 | 2009-05-14 | Optima Neuroscience, Inc. | System for seizure monitoring and detection |
CN102488518A (en) * | 2011-12-14 | 2012-06-13 | 山东大学 | Electroencephalogram detection method and device by utilizing fluctuation index and training for promotion |
CN103110418A (en) * | 2013-01-24 | 2013-05-22 | 天津大学 | Electroencephalogram signal characteristic extracting method |
CN104887224A (en) * | 2015-05-29 | 2015-09-09 | 北京航空航天大学 | Epileptic feature extraction and automatic identification method based on electroencephalogram signal |
US20210307673A1 (en) * | 2020-03-30 | 2021-10-07 | University Of Louisiana At Lafayette | System and method for early and efficient prediction of epilectic seizures |
CN113842118A (en) * | 2021-12-01 | 2021-12-28 | 浙江大学 | Epileptic seizure real-time detection monitoring system for epileptic video electroencephalogram examination |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140121554A1 (en) * | 2012-10-29 | 2014-05-01 | The Johns Hopkins University | Seizure detection device and systems |
WO2016019526A1 (en) * | 2014-08-06 | 2016-02-11 | 中国科学院自动化研究所 | Method and system for detecting cerebration |
US20210282700A1 (en) * | 2017-03-10 | 2021-09-16 | Koninklijke Philips N.V. | Seizure characterization with magnetic resonance imaging (mri) fused with an electroencephalography (eeg) model |
CN111436929B (en) * | 2019-01-17 | 2021-06-01 | 复旦大学 | Method for generating and identifying neurophysiological signals |
CN109924990A (en) * | 2019-03-27 | 2019-06-25 | 兰州大学 | A kind of EEG signals depression identifying system based on EMD algorithm |
CN111657935B (en) * | 2020-05-11 | 2021-10-01 | 浙江大学 | Epilepsia electroencephalogram recognition system based on hierarchical graph convolutional neural network, terminal and storage medium |
US12016634B2 (en) * | 2020-05-11 | 2024-06-25 | Carnegie Mellon University | Methods and apparatus for electromagnetic source imaging using deep neural networks |
CN113288050B (en) * | 2021-04-23 | 2022-10-04 | 山东师范大学 | Multidimensional enhanced epileptic seizure prediction system based on graph convolution network |
-
2021
- 2021-12-01 CN CN202111455241.1A patent/CN113842118B/en active Active
-
2022
- 2022-10-11 WO PCT/CN2022/124694 patent/WO2023098303A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101259016A (en) * | 2007-03-06 | 2008-09-10 | 李小俚 | Method for real time automatically detecting epileptic character wave |
US20090124923A1 (en) * | 2007-10-23 | 2009-05-14 | Optima Neuroscience, Inc. | System for seizure monitoring and detection |
CN102488518A (en) * | 2011-12-14 | 2012-06-13 | 山东大学 | Electroencephalogram detection method and device by utilizing fluctuation index and training for promotion |
CN103110418A (en) * | 2013-01-24 | 2013-05-22 | 天津大学 | Electroencephalogram signal characteristic extracting method |
CN104887224A (en) * | 2015-05-29 | 2015-09-09 | 北京航空航天大学 | Epileptic feature extraction and automatic identification method based on electroencephalogram signal |
US20210307673A1 (en) * | 2020-03-30 | 2021-10-07 | University Of Louisiana At Lafayette | System and method for early and efficient prediction of epilectic seizures |
CN113842118A (en) * | 2021-12-01 | 2021-12-28 | 浙江大学 | Epileptic seizure real-time detection monitoring system for epileptic video electroencephalogram examination |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117033988A (en) * | 2023-09-27 | 2023-11-10 | 之江实验室 | Epileptiform spike processing method and device based on nerve electric signal |
CN117033988B (en) * | 2023-09-27 | 2024-03-12 | 之江实验室 | Epileptiform spike processing method and device based on nerve electric signal |
CN117251807A (en) * | 2023-11-17 | 2023-12-19 | 中国医学科学院生物医学工程研究所 | Motor imagery electroencephalogram signal classification method of neural network |
CN117251807B (en) * | 2023-11-17 | 2024-02-13 | 中国医学科学院生物医学工程研究所 | Motor imagery electroencephalogram signal classification method of neural network |
Also Published As
Publication number | Publication date |
---|---|
CN113842118A (en) | 2021-12-28 |
CN113842118B (en) | 2022-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023098303A1 (en) | Real-time epileptic seizure detecting and monitoring system for video electroencephalogram examination of epilepsy | |
US20210358611A1 (en) | Method for Detecting Epileptic Spike, Method for Training Network Model, and Computer Device | |
Minasyan et al. | Patient-specific early seizure detection from scalp electroencephalogram | |
WO2019161607A1 (en) | Electrocardiogram information dynamic monitoring method and dynamic monitoring system | |
Choi et al. | A novel multi-scale 3D CNN with deep neural network for epileptic seizure detection | |
CN109009102B (en) | Electroencephalogram deep learning-based auxiliary diagnosis method and system | |
CN111297349A (en) | Machine learning-based heart rhythm classification system | |
Lee et al. | Fetal QRS detection based on convolutional neural networks in noninvasive fetal electrocardiogram | |
CN104970789A (en) | Electrocardiogram classification method and system | |
Abbasi et al. | EEG-based neonatal sleep stage classification using ensemble learning | |
CN112220485A (en) | Epilepsia electroencephalogram/magnetoencephalogram abnormal wave automatic detection method and positioning system | |
CN111248859A (en) | Automatic sleep apnea detection method based on convolutional neural network | |
CN102499651A (en) | Alarm method for monitoring system | |
CN113576401A (en) | Sleep apnea syndrome rapid diagnosis device based on convolutional neural network | |
CN116340735B (en) | Spike detection method and system based on long-field-of-view feature fusion | |
Abbasi et al. | A convolutional neural network-based decision support system for neonatal quiet sleep detection | |
Yadav et al. | Variational mode decomposition-based seizure classification using Bayesian regularized shallow neural network | |
CN116019461A (en) | Epileptic type detection method combining eye movement and electroencephalogram | |
CN115530754A (en) | Epilepsy early warning method and device based on deep learning | |
CN113951868B (en) | Method and device for detecting man-machine asynchronism of mechanical ventilation patient | |
CN114677826A (en) | Mental patient violence early warning system based on individual behaviors and physiological characteristics | |
CN117612710A (en) | Medical diagnosis auxiliary system based on electroencephalogram signals and artificial intelligence classification | |
Krishnan et al. | Drowsiness detection using band power and log energy entropy features based on EEG signals | |
CN116058849A (en) | Atrial fibrillation detection method, device and equipment | |
Wei et al. | Epileptic seizure prediction from multivariate EEG data using Multidimensional convolution network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22900109 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |