An individualized epilepsy electroencephalogram anomaly signal automatic identification system
By using an isolated forest model based on unsupervised clustering to extract features from EEG signals of epilepsy patients and perform principal component analysis, a personalized abnormal signal recognition model is constructed. This solves the problem of individual differences in the recognition of abnormal EEG signals in epilepsy in existing technologies, and improves the accuracy and efficiency of recognition.
Patent Information
- Application Number
- CN202411950784.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-27
AI Technical Summary
Existing machine learning algorithms suffer from individual variability issues in identifying abnormal EEG signals in epilepsy, do not conform to the independent and identically distributed hypothesis, resulting in poor generalization ability and difficulty in effectively identifying epileptic seizures in different patients.
An isolated forest model based on unsupervised clustering was adopted. By extracting features and performing principal component analysis on the EEG signal data of target epilepsy patients, a personalized abnormal signal recognition model was constructed. The isolated forest model was then used for training and recognition, overcoming the dependence of traditional supervised learning methods on data distribution.
It enables personalized detection of abnormal signals, improves the accuracy and efficiency of epilepsy abnormal signal identification, reduces manual intervention, breaks through the limitations of traditional methods, and adapts to the individual differences of different patients.
Smart Images

Figure CN119679433B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of medical artificial intelligence and biomedical signal processing technology, and in particular to a method and system for automatic identification of abnormal EEG signals in epilepsy that is suitable for personalized applications. Background Technology
[0002] Epilepsy is a common neurological disorder affecting more than 50 million people worldwide, spanning all age groups, and has become a major international public health issue. It is characterized by abnormal electrical activity in the brain, often manifesting as sudden, transient brain dysfunction, including irregular seizures, recurrent epileptic seizures, or severe convulsions. These seizures can lead to deterioration of physical condition, impaired intellectual development, and even death.
[0003] EEG (Electroencephalogram, also known as electroencephalography) is a non-invasive technique that records brain electrical activity using multi-channel sensors and is widely used for epilepsy monitoring. By analyzing abnormal waveforms in EEG signals, clinicians can identify and locate epileptic foci, assess disease progression, and evaluate treatment effectiveness. However, due to the unpredictable nature of epileptic seizures, long-term monitoring of patients' EEG data is necessary, often resulting in massive amounts of data. This increases the workload for medical staff, and prolonged visual monitoring may miss some abnormal signals, leading to highly subjective results. Furthermore, significant differences in EEG manifestations can exist among different patients, further complicating the identification of epileptic seizures. Therefore, developing an automated, EEG-based method for epilepsy anomaly identification is of significant clinical importance.
[0004] With the rapid development of data processing and machine learning technologies, the use of automated methods to identify epileptic seizures has become a research hotspot. Automated identification algorithms significantly improve the efficiency and accuracy of epilepsy diagnosis by analyzing large-scale EEG data in real time. Especially for data collected over long periods, automated identification systems can capture abnormal epileptic signals immediately, helping doctors make quick decisions and reducing the risk of seizures in patients. In recent years, supervised learning-based machine learning methods have been widely applied to automated EEG seizure detection, including models based on Convolutional Neural Networks (CNNs), Long Short-Term Memory (LSTMs), Autoencoders (AEs), and Support Vector Machines (SVMs). However, the inventors have found that seizure patterns in epilepsy exhibit individual differences; EEG signal characteristics differ significantly between different ages and patients, and do not conform to the independent and identically distributed hypothesis, resulting in poor generalization ability of existing machine learning algorithms when conducting cross-patient tests.
[0005] In summary, developing an automatic algorithm for recognizing abnormal EEG signals in epilepsy has significant clinical implications. However, traditional supervised learning methods have certain limitations in this task. Due to individual differences among patients, the model does not conform to the independent and identically distributed (ICD) assumption. Traditional supervised learning methods require similar distributions in the training and testing data so that the model can generalize to unseen data. This limits the application and widespread adoption of machine learning algorithms in this field. Therefore, it is urgent to solve this technical problem. Summary of the Invention
[0006] In view of the above problems, this application is made to provide a method and system, computing device, storage medium, and computer program product for automatic identification of personalized epilepsy EEG abnormalities that overcomes or at least partially solves the above problems. The technical solution is as follows:
[0007] In a first aspect, a method for automatic identification of abnormal EEG signals in personalized epilepsy is provided, implemented by a computing device, the method comprising:
[0008] EEG signal data from target epilepsy patients in clinical settings were obtained as a training dataset.
[0009] The EEG signal data in the training dataset is read according to the set channel order, and the read EEG signal data is cut according to the set window length, dividing the read EEG signal data into EEG signal segments of equal length.
[0010] Based on preset time-domain and frequency-domain features, time-domain and frequency-domain feature data are extracted from EEG signal segments. The extracted time-domain and frequency-domain feature data are then input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. Specifically, the isolated forest model for unsupervised clustering is selected in advance by analyzing EEG sample signal data from multiple epilepsy patients.
[0011] Continue to acquire EEG signal data from the target epilepsy patient, referred to as the data to be identified;
[0012] The data to be identified is read according to the set channel order, and the read data to be identified is cut according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified;
[0013] Based on preset time-domain and frequency-domain features, time-domain feature data and frequency-domain feature data are extracted from the EEG signal segment to be identified. The extracted time-domain feature data and frequency-domain feature data are then input into the abnormal signal identification model of the target epilepsy patient, and the identification result of whether the EEG signal segment to be identified is an abnormal signal is output.
[0014] In one possible implementation, an isolated forest model for unsupervised clustering is pre-selected by analyzing EEG signal data from multiple epilepsy patients, including:
[0015] EEG signal data and their annotations were obtained from multiple epilepsy patients. The annotations included epileptic seizures and non-seizures. EEG signals during epileptic seizures were marked as abnormal signals, while EEG signals during non-seizures were marked as normal signals.
[0016] Principal component analysis was performed on EEG signal data from multiple epilepsy patients to obtain the EEG signal distribution based on the first and second principal components, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizures in each epilepsy patient based on the first and second principal components.
[0017] Based on the EEG signal distribution of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of epileptic seizures and the EEG signals of epilepsy non-seizures in each epilepsy patient using the first and second principal components, an Isolation Forest model for unsupervised clustering is selected from multiple pre-set machine learning models.
[0018] In one possible implementation, based on the EEG signal distributions of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizure patients using the first and second principal components, an isolated forest model for unsupervised clustering is selected from a set of machine learning models, including:
[0019] Based on the fact that the EEG signal distributions of multiple epilepsy patients based on the first and second principal components do not satisfy the independent and identically distributed hypothesis, we determined to construct separate abnormal signal recognition models for multiple epilepsy patients.
[0020] Based on the principal component analysis results of each sample of epilepsy patients, the proportion of epileptic seizure duration to the total duration of the entire EEG signal in the EEG signals based on the first and second principal components of each sample of epilepsy patients is less than the preset threshold, which meets the standard for abnormal detection. Secondly, by comparing the distance between the EEG signals of epileptic seizures based on the first and second principal components of each sample of epilepsy patients and the EEG signals of non-epileptic seizures, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals.
[0021] Based on the characteristics of the EEG signals of each epilepsy patient sample using the first and second principal components and the task characteristics of abnormal epilepsy signal identification, an isolated forest model for unsupervised clustering was selected from multiple pre-set machine learning models.
[0022] In one possible implementation, the preset time-domain characteristics include the signal strength and standard deviation of each channel in the EEG signal segment.
[0023] In one possible implementation, the preset frequency domain features include the energy corresponding to a preset frequency band extracted after performing a Fourier transform on the signal of each channel in the EEG signal segment. The preset frequency band includes frequency ranges [0.5Hz, 4Hz), [4Hz, 8Hz), [8Hz, 13Hz), [13Hz, 20Hz), [20Hz, 30Hz), and [30Hz, 50Hz].
[0024] Secondly, a personalized automatic identification system for abnormal EEG signals in epilepsy is provided, implemented by a computing device, the system comprising:
[0025] The first acquisition unit is used to acquire EEG signal data from clinical target epilepsy patients as a training dataset.
[0026] The first preprocessing unit is used to read the EEG signal data in the training dataset according to the set channel order, and to cut the read EEG signal data into equal-length EEG signal segments according to the set window length.
[0027] The model training unit is used to extract time-domain feature data and frequency-domain feature data from EEG signal segments according to preset time-domain features and preset frequency-domain features. The extracted time-domain feature data and frequency-domain feature data are input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. In this process, the isolated forest model for unsupervised clustering is selected in advance by analyzing the EEG sample signal data of multiple epilepsy patients.
[0028] The second acquisition unit is used to continue acquiring EEG signal data of the target epilepsy patient, referred to as the data to be identified.
[0029] The second preprocessing unit is used to read the data to be identified according to the set channel order, and to cut the read data to be identified according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified.
[0030] The abnormal signal recognition unit is used to extract time-domain feature data and frequency-domain feature data from the EEG signal segment to be identified according to preset time-domain features and preset frequency-domain features, and input the extracted time-domain feature data and frequency-domain feature data into the abnormal signal recognition model of the target epilepsy patient, and output the recognition result of whether the EEG signal segment to be identified is an abnormal signal.
[0031] In one possible implementation, the system further includes a model filtering unit for:
[0032] EEG signal data and their annotations were obtained from multiple epilepsy patients. The annotations included epileptic seizures and non-seizures. EEG signals during epileptic seizures were marked as abnormal signals, while EEG signals during non-seizures were marked as normal signals.
[0033] Principal component analysis was performed on EEG signal data from multiple epilepsy patients to obtain the EEG signal distribution based on the first and second principal components, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizures in each epilepsy patient based on the first and second principal components.
[0034] Based on the EEG signal distribution of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of epileptic seizures and the EEG signals of epilepsy non-seizures in each epilepsy patient using the first and second principal components, an Isolation Forest model for unsupervised clustering is selected from multiple pre-set machine learning models.
[0035] Thirdly, a computing device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the method for automatic identification of personalized epileptic EEG abnormalities as described in any of the preceding claims.
[0036] Fourthly, a storage medium is provided that stores a computer program, wherein the computer program is configured to execute, at runtime, any of the above-described methods for the automatic identification of personalized epilepsy EEG abnormalities.
[0037] Fifthly, a computer program product is provided, including a computer program configured to execute, at runtime, any of the above-described methods for the automatic identification of personalized epilepsy EEG abnormalities.
[0038] By employing the above technical solutions, the embodiments of this application provide a personalized method and system for automatic identification of abnormal EEG signals in epilepsy, as well as computing devices, storage media, and computer program products. This method uses EEG signal data from clinical target epilepsy patients as a training dataset. By combining feature engineering and unsupervised learning techniques, it constructs an abnormal signal identification model for the target epilepsy patient. This model is then used to identify subsequent EEG signal data from the target epilepsy patient, achieving individualized signal abnormality detection. This solves the problem of poor generalization ability in existing automatic identification algorithms and improves the accuracy of epilepsy abnormal signal identification. Furthermore, by analyzing EEG sample signal data from multiple epilepsy patients beforehand, an isolated forest model for unsupervised clustering is selected. Training this isolated forest model yields the abnormal signal identification model for the target epilepsy patient. This overcomes the problem of traditional supervised learning methods requiring similar distributions in training and testing data, and breaks through the dependence of traditional supervised learning methods on labeled data, significantly reducing manual intervention and improving the efficiency of epilepsy abnormal signal identification. Attached Figure Description
[0039] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0040] Figure 1A flowchart is shown below illustrating an embodiment of the present application of an automatic method for identifying epileptic EEG abnormalities.
[0041] Figure 2a and Figure 2b The principal component analysis results of EEG sample signal data from epilepsy patients of different age groups provided in the embodiments of this application are shown.
[0042] Figure 3a and Figure 3b The principal component analysis results of EEG sample signal data from epilepsy patients of the same age group provided in this application embodiment are shown.
[0043] Figure 4 This is a sample of epilepsy patients, showing the changes in EEG signals in 18 channels before and after a seizure. The solid black lines represent the marked locations where the seizure began. Preprocessing was performed, with time 0 being taken as the seizure start time, time before 0 as the pre-seizure time, and time after 0 as the post-seizure time.
[0044] Figure 5 This image shows the Fourier transform results of 18 channels from a sample of epilepsy patients when they were not experiencing seizures. The left side represents the original EEG signal, and the right side represents the power spectral density at different frequencies after the Fourier transform. The dashed lines correspond to... = 0.5 Hz =4 Hz = 8 Hz = 13 Hz = 20 Hz and = 30 Hz;
[0045] Figure 6 This image shows the Fourier transform results of 18 channels during a seizure in a sample of epilepsy patients; the left side represents the original EEG signal, and the right side represents the power spectral density at different frequencies after the Fourier transform; the dashed lines correspond to... = 0.5 Hz = 4Hz = 8 Hz = 13 Hz = 20 Hz and = 30 Hz;
[0046] Figure 7 The evaluation results of the isolated forest model and the random forest model on the CHB-MIT dataset are shown.
[0047] Figure 8This is a dataset of epilepsy EEG signals labeled for a central hospital. The figure shows the EEG signal changes of 16 channels in a sample of epilepsy patients before and after an epileptic seizure. The black solid lines represent the marked seizure times. Preprocessing was performed here, with time 0 as the seizure time, before time 0 as the pre-seizure time, and after time 0 as the post-seizure time.
[0048] Figure 9 The evaluation results of the isolated forest model on a dataset from a central hospital;
[0049] Figure 10 A structural diagram of an automatic recognition system for personalized epilepsy EEG abnormalities provided in an embodiment of this application is shown. Detailed Implementation
[0050] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.
[0051] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the term "comprising" and its variations should be interpreted as open-ended terms meaning "including but not limited to."
[0052] To address the aforementioned technical problems, this application provides a method for automatic identification of abnormal EEG signals in personalized epilepsy, implemented by a computing device. This computing device can be a computer, server, computing center, smartphone, wearable device, etc., and this embodiment does not impose any limitations on this. Figure 1 As shown, the method for automatic identification of abnormal EEG signals in personalized epilepsy may include the following steps S101 to S106:
[0053] Step S101: Obtain EEG signal data from the target epilepsy patients in the clinical setting as a training dataset.
[0054] EEG is a non-invasive technique that records the electrical activity of the brain using multi-channel sensors. In practice, EEG measures and records the electrical signals of neurons in the brain by placing a series of electrodes on the scalp. These electrodes correspond to different regions of the brain, and each electrode is a monopolar lead channel that records the potential difference between that electrode and a global reference point. Bipolar leads are constructed using two electrodes, and these bipolar leads record the potential difference between the two electrodes. The potential difference is also known as voltage, measured in volts. The EEG signal data can include the potential difference between the two electrodes recorded by each of the multiple bipolar leads.
[0055] For example, an EEG places 19 electrodes on the scalp, each corresponding to a different region of the brain. These 19 electrodes correspond to 19 monopolar lead channels, including Cz, Fp1, Fz, C3, P3, F7, T5, T3, O2, Fpz, T6, P4, C4, F4, T4, O1, Fp2, F8, and Pz. Based on these 19 monopolar lead channels, 16 bipolar lead channels are constructed, namely Fp1-Fp2. 7. Each bipolar lead channel (Fp2-F8, F8-F4, F4-C4, C3-P3, C4-P4, C3-C4, P3-O1, P4-O2), T3-T5, T4-T6, Fpz-Fz, Fz-Cz, Cz-Pz, Pz-O1, Pz-O2) records the potential difference between the two electrodes. Taking the Fp1-F7 bipolar lead channel as an example, it records the potential difference between Fp1 and F7. In this example, the EEG signal data of the target epilepsy patient may include the potential difference between the two electrodes recorded by each of the 16 bipolar lead channels. It should be noted that the examples here are merely illustrative and do not limit this embodiment.
[0056] In a specific application scenario, when a target epilepsy patient comes to the hospital, an electroencephalogram (EEG) machine can be used to collect the potential difference data of multiple monopolar leads corresponding to multiple electrodes placed on the patient's scalp. Based on the potential difference data of multiple monopolar leads, the potential difference data of multiple bipolar leads can be obtained. For example, based on the potential difference data of 19 monopolar leads, the potential difference data of each of the 16 bipolar leads can be obtained, thereby acquiring the EEG signal data of the target epilepsy patient as a training dataset.
[0057] The sampling frequency of the EEG acquisition device here is F, where F is a positive integer. For example, a sampling frequency F of 256Hz means 256 samples per second, or 256 samples per second simultaneously on multiple unipolar lead channels; for example, 256 samples per second simultaneously on 19 unipolar lead channels. It should be noted that this example is merely illustrative and does not limit the scope of this embodiment.
[0058] Step S102: Read the EEG signal data in the training dataset according to the set channel order, and cut the read EEG signal data into equal-length EEG signal segments according to the set window length.
[0059] In this step, the channel order can be the order of the bipolar lead channels. Taking the previous example, the order of the bipolar lead channels can be preset based on the previous 16 bipolar lead channels as the set bipolar lead channel order.
[0060] In addition, the window length can be set according to actual needs, such as setting the window length to 5 seconds or 3 seconds, etc. This embodiment does not limit this.
[0061] Step S103: According to preset time-domain features and preset frequency-domain features, extract time-domain feature data and frequency-domain feature data from EEG signal segments, input the extracted time-domain feature data and frequency-domain feature data into a pre-selected isolated forest model for unsupervised clustering, train the isolated forest model, and obtain an abnormal signal recognition model for the target epilepsy patient; wherein, the isolated forest model for unsupervised clustering is pre-selected by analyzing the EEG sample signal data of multiple epilepsy patients.
[0062] In this step, the preset time-domain characteristics may include the signal strength and standard deviation of each channel in the EEG signal segment, etc., but this embodiment does not limit this.
[0063] The preset frequency domain features may include the energy corresponding to the preset frequency band extracted after performing Fourier transform on the signal of each channel in the EEG signal segment. The preset frequency band may include frequency range [0.5Hz, 4Hz), frequency range [4Hz, 8Hz), frequency range [8Hz, 13Hz), frequency range [13Hz, 20Hz), frequency range [20Hz, 30Hz), and frequency range [30Hz, 50Hz].
[0064] During an epileptic seizure, neuronal activity in the brain increases, and the signal amplitude typically varies significantly. This increase may manifest as spikes, sharp wave rhythms, or spike waves, all of which are typical characteristics of epileptic activity and clearly distinguish them from normal brain activity patterns. The amplitude of EEG signals can vary considerably between patients, depending on factors such as the type of epilepsy, the severity of the seizure, the patient's age, and sex. Simultaneously, there are significant differences in the EEG spectrum between seizure-prone and seizure-free states. For example, during a seizure, an increase in the power of delta waves (0.5Hz, 4Hz) and theta waves (4Hz, 8Hz) may be observed, particularly in the β0 wave (13Hz, 20Hz), β1 wave (20Hz, 30Hz), and gamma wave (30Hz, 50Hz) appearing in the seizure area. Therefore, this embodiment extracts time-domain and frequency-domain feature data from EEG signal segments according to preset time-domain and frequency-domain features, which are used as input to a machine learning model. The time-domain features characterize the amplitude changes of different EEG signal patterns (i.e., seizures and seizure-free states), while the frequency-domain features characterize the frequency component changes of different EEG signal patterns.
[0065] Step S104: Continue to acquire EEG signal data of the target epilepsy patient, referred to as the data to be identified.
[0066] Step S105: Read the data to be identified according to the set channel order, and cut the read data to be identified into equal-length EEG signal segments according to the set window length.
[0067] The channel order and window length set in this step can be found in the previous step S102, and will not be repeated here.
[0068] Step S106: According to the preset time-domain features and preset frequency-domain features, extract time-domain feature data and frequency-domain feature data from the EEG signal segment to be identified, and input the extracted time-domain feature data and frequency-domain feature data into the abnormal signal identification model of the target epilepsy patient, and output the identification result of whether the EEG signal segment to be identified is an abnormal signal.
[0069] This embodiment uses EEG signal data from target epilepsy patients as a training dataset. By combining feature engineering and unsupervised learning techniques, it constructs an abnormal signal recognition model for the target epilepsy patients themselves. This model is then used to identify subsequent EEG signal data from the target epilepsy patients, achieving individualized signal anomaly detection. This solves the problem of poor generalization ability in existing automatic recognition algorithms and improves the accuracy of epilepsy abnormal signal recognition. Furthermore, by analyzing EEG sample signal data from multiple epilepsy patients beforehand, an isolated forest model for unsupervised clustering is selected. Training this isolated forest model yields the abnormal signal recognition model for the target epilepsy patients. This overcomes the problem of traditional supervised learning methods requiring similar distributions in training and testing data, and breaks through the dependence on labeled data in traditional supervised learning methods, significantly reducing manual intervention and improving the efficiency of epilepsy abnormal signal recognition.
[0070] Step S103 above mentions pre-analyzing EEG signal data from multiple epilepsy patients to select an isolated forest model for unsupervised clustering. Specifically, this may include the following steps A1 to A3:
[0071] Step A1: Obtain EEG signal data and their annotations from multiple epilepsy patients; the annotations include epileptic seizures and epileptic non-seizures, where EEG signals during epileptic seizures are marked as abnormal signals, while EEG signals during epileptic non-seizures are marked as normal signals.
[0072] Step A2: Perform principal component analysis on the EEG signal data of multiple epilepsy patients to obtain the EEG signal distribution of multiple epilepsy patients based on the first principal component and the second principal component, and obtain the distance between the EEG signal of epileptic seizures and the EEG signal of epilepsy non-seizures of each epilepsy patient based on the first principal component and the second principal component.
[0073] Step A3: Based on the EEG signal distribution of multiple epilepsy patients using the first principal component and the second principal component, and the distance between the EEG signals of epileptic seizures and the EEG signals of epileptic non-seizures in each epilepsy patient using the first principal component and the second principal component, select the Isolation Forest model for unsupervised clustering from among multiple preset machine learning models.
[0074] This embodiment does not directly use the dataset to train multiple pre-set machine learning models, test the trained machine learning models, and then select models based on the test results. Instead, it pre-analyzes the EEG sample signal data of multiple epilepsy patients to explore the distribution of the EEG sample signal data of multiple epilepsy patients, and then selects the Isolation Forest model for unsupervised clustering from the multiple pre-set machine learning models. This can improve the efficiency of model selection and save the computing and storage resources required for model training and testing.
[0075] In an optional embodiment, step A3 above, based on the EEG signal distribution of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of each epilepsy patient during seizures and the EEG signals of each epilepsy patient during non-seizures using the first and second principal components, selects an isolated forest model for unsupervised clustering from a set of machine learning models. This can specifically include the following steps A31 to A33:
[0076] Step A31: Based on the fact that the EEG signal distributions of multiple epilepsy patients based on the first principal component and the second principal component do not satisfy the independent and identically distributed hypothesis, determine the construction of abnormal signal recognition models for each of the multiple epilepsy patients.
[0077] Step A32: Based on the principal component analysis results of each sample of epilepsy patients, the proportion of epileptic seizure duration to the total duration of the entire EEG signal in the EEG signals based on the first and second principal components of each sample of epilepsy patients is less than the preset threshold, which meets the standard for abnormal detection; secondly, by comparing the distance between the EEG signals of epileptic seizures based on the first and second principal components of each sample of epilepsy patients and the EEG signals of epilepsy without seizures, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals.
[0078] The preset threshold here can be set according to actual needs, and this embodiment does not impose any restrictions on it.
[0079] Step A33: Based on the characteristics of the EEG signals of each epilepsy patient sample based on the first principal component and the second principal component, and the task characteristics of abnormal epilepsy signal identification, select the Isolation Forest model for unsupervised clustering from among the preset multiple machine learning models.
[0080] This embodiment creatively proposes to independently construct an abnormal signal recognition model in the EEG signal data of each epilepsy patient sample, based on the assumption that the distribution of EEG signals from the first and second principal components of multiple epilepsy patients does not satisfy the independent and identically distributed hypothesis. This model does not rely on a pre-learned global model and can effectively address individual differences among different epilepsy patients, avoiding the problem of decreased detection accuracy due to insufficient model generalization ability. It ensures the consistency of detection performance among different epilepsy patients, thus demonstrating higher practicality and adaptability in diverse clinical environments.
[0081] Furthermore, this embodiment employs an unsupervised clustering model, the Isolation Forest model, to distinguish normal and abnormal patterns in the EEG signals of the same epilepsy patient. This Isolation Forest model, based on a tree structure, identifies anomalies by separating abnormal points from normal points, making it suitable for detecting abnormal signal segments, especially in cases of uneven data distribution or unlabeled data. The core idea of the Isolation Forest model is that anomalies are easier to isolate because they differ from most data points, while normal points are relatively difficult to isolate. The Isolation Forest model calculates the average path length of each data point across all trees and uses this path length to calculate an anomaly score; the higher the score, the more likely the data point is to be an anomaly. The inventors discovered through analysis that epileptic seizures are random, and in long-term monitored epilepsy EEG signal data, the duration of epileptic seizures accounts for a very small proportion of the total duration, thus the proportion of abnormal data is extremely small. This makes the Isolation Forest model an ideal choice for processing high-dimensional data such as EEG signal data that may contain rare abnormal events.
[0082] The following specific example illustrates in detail the process of analyzing EEG signal data from multiple epilepsy patients to select an isolated forest model for unsupervised clustering.
[0083] In this specific embodiment, a widely used public EEG dataset, CHB-MIT, is used. This dataset, jointly created by Children's Hospital Boston (CHB) and the Massachusetts Institute of Technology (MIT), aims to provide researchers with a high-quality EEG database for developing and validating algorithms for predicting and detecting epileptic seizures, as well as related machine learning and signal processing algorithms. The CHB-MIT dataset contains scalp EEG recordings from 24 epilepsy patients (aged 1.5 to 22 years), collected during clinical monitoring. Each patient's data includes several EEG segments, each ranging in length from several hours to several days, totaling approximately 500 hours of EEG data, including 198 clinically labeled epileptic seizures. The EEG data in the dataset is stored in EDF (European Data Format) file format, with each file containing potential difference data from bipolar lead channels (typically 18 to 23), and the data is sampled at a frequency of 256 Hz, or 256 samples per second. The CHB-MIT dataset provides detailed epileptic seizure annotations (also known as labels), including the start and end times of seizures. These annotations are manually marked by clinicians based on video and EEG data and can be used to evaluate the performance of algorithms for automatically identifying abnormal EEG signals in epilepsy.
[0084] (1) Reading of EEG sample signal data
[0085] EEG data contains multiple bipolar lead channels, each corresponding to electrical activity signals in different brain regions. In the CHB-MIT dataset, 18 bipolar lead channels common to all patients were first selected: FP1-F7, F7-T7, T7-P7, P7-O1, FP1-F3, F3-C3, C3-P3, P3-O1, FZ-CZ, CZ-PZ, FP2-F4, F4-C4, C4-P4, P4-O2, FP2-F8, F8-T8, T8-P8, and P8-O2. Subsequently, the potential difference data corresponding to these 18 bipolar lead channels were read from each patient's EDF file, serving as the EEG sample signal data for the epilepsy patients.
[0086] (2) Analysis of EEG sample signal data
[0087] Principal component analysis was performed on EEG signal data from multiple epilepsy patients to obtain the EEG signal distribution based on the first and second principal components, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizures in each epilepsy patient based on the first and second principal components.
[0088] Subsequently, based on the fact that the EEG signal distributions of multiple epilepsy patients according to the first and second principal components do not satisfy the independent and identically distributed hypothesis, it was determined to construct separate abnormal signal recognition models for multiple epilepsy patients.
[0089] Figure 2a and Figure 2b The illustration shows the principal component analysis results of EEG sample signal data from epilepsy patients of different age groups provided in this application embodiment. The horizontal axis represents the first principal component, and the vertical axis represents the second principal component. The ages of the epilepsy patients in the sample (chb12, chb23, chb01, chb19) are 2 years, 6 years, 11 years, and 19 years, respectively. Figure 2a and Figure 2b Different shapes are used to represent different epilepsy patients: solid circle represents epilepsy patient chb12, solid rectangle represents epilepsy patient chb23, hollow rhombus represents epilepsy patient chb01, and solid triangle represents epilepsy patient chb19. Figure 2b The black and gray areas represent EEG signals during and outside of an epileptic seizure, respectively.
[0090] Figure 3a and Figure 3b The diagram illustrates the principal component analysis results of EEG sample signal data from epilepsy patients of the same age group provided in this embodiment of the application. The horizontal axis represents the first principal component, and the vertical axis represents the second principal component. The ages of the epilepsy patients chb01, chb02, chb09, and chb22 are 11, 11, 10, and 9 years old, respectively. Figure 3a and Figure 3b Different shapes are used to represent different epilepsy patients: solid circle represents epilepsy patient chb01, solid rectangle represents epilepsy patient chb02, hollow rhombus represents epilepsy patient chb09, and solid triangle represents epilepsy patient chb22. Figure 3b The black and gray areas represent EEG signals during and outside of an epileptic seizure, respectively.
[0091] exist Figure 2aIn the EEG data, significant clustering structures were observed, indicating the presence of multiple separate clusters with uneven data point distribution, showing dense clusters in some areas and sparse clusters in others. This suggests that the data originated from multiple different distributions, failing to satisfy the identical distribution hypothesis. Even among epilepsy patients of the same age group, due to individual differences, the principal component analysis results, such as... Figure 3a As shown, there is still a significant clustering phenomenon, which leads to poor generalization ability of traditional machine learning-based classification models when tested across patients, thus limiting their effectiveness in clinical applications.
[0092] It is worth noting that, see Figure 2b and Figure 3b In each sample of epilepsy patients, a clear boundary and distance exist between the EEG signals during seizures (i.e., abnormal signals, represented in black) and the EEG signals during non-seizure periods (i.e., normal signals, represented in gray). Based on this boundary and distance, an abnormality identification model can be independently constructed from each patient's EEG data, achieving individualized signal abnormality detection. In other words, observing the principal component analysis results of various epilepsy patients, the proportion of epileptic seizure duration in their EEG signals to the total duration of the entire EEG signal is extremely small (e.g., less than a preset threshold, which can be set according to actual needs; this embodiment does not impose any restrictions on this), meeting the standard for abnormal detection. Secondly, comparing the distance between the EEG signals of epileptic seizures based on the first and second principal components and the EEG signals of non-epileptic seizures in various epilepsy patients, it can be seen that traditional density clustering models (such as DBSCAN and K-means) cannot identify abnormal signals from normal signals. DBSCAN (Density-Based Spatial Clustering of Applications with Noise) is a density-based clustering algorithm that defines a cluster as the largest set of density-connected points, capable of dividing regions with sufficient density into clusters, and can discover clusters of arbitrary shapes in noisy spatial databases. K-means clustering is a classic clustering algorithm used to divide data points into K clusters. Its basic idea is to divide the samples in the dataset into K clusters according to the similarity of features, so that the samples within a cluster are as similar as possible, while the samples between clusters are as different as possible.
[0093] Based on the characteristics of the EEG signals of each epilepsy patient sample using the first and second principal components and the task characteristics of abnormal epilepsy signal identification, an isolated forest model for unsupervised clustering was selected from multiple pre-set machine learning models.
[0094] In this embodiment, based on the principal component analysis results of EEG signals from multiple epilepsy patients, it was found that their EEG signals showed individual differences and could not meet the same distribution hypothesis. Therefore, this patent determines to construct an abnormal signal recognition model for each of the multiple epilepsy patients and uses unsupervised training instead of supervised training.
[0095] Among numerous unsupervised models, this patent selects the Isolation Forest algorithm for the following reasons:
[0096] 1) Because epileptic seizures are random, the duration of epileptic seizures accounts for a very small proportion of the total duration in long-term monitored epilepsy EEG data. Therefore, the proportion of abnormal data is very small, which is more in line with the standard for abnormal detection.
[0097] 2) Principal component analysis results show that the EEG signal distribution of the epilepsy patients in each sample is irregular. Even among samples with normal EEG signals, some samples exhibit multiple high-density clusters, such as... Figure 3b The samples included epilepsy patients (Chb09); some samples did not have a clear cluster structure, such as... Figure 3b The sample of epilepsy patients, Chb02, poses a significant challenge to traditional density clustering models (such as DBSCAN and K-means), while the isolated forest model has a significant advantage in handling this type of irregular data.
[0098] 3) Traditional density clustering models (such as DBSCAN and K-means) rely on pre-set parameter settings, such as the number of clusters, density threshold, and minimum number of samples. Without labels, selecting these parameters is often very difficult and can easily affect the clustering results. The advantage of the Isolation Forest model is that it does not require pre-setting the number of clusters or any density parameters and can automatically determine whether data points are outliers. This is particularly important for tasks such as detecting abnormal EEG signals in epilepsy when prior information is lacking.
[0099] In summary, this embodiment pre-analyzes the EEG signal data of multiple epilepsy patients by performing principal component analysis to explore the distribution of the EEG signal data of multiple epilepsy patients. Then, among a number of preset machine learning models, an isolated forest model for unsupervised clustering is selected. An abnormal signal recognition model is independently constructed for the EEG signal data of each epilepsy patient, enabling the model to focus on distinguishing normal and abnormal patterns in the EEG signal of the same epilepsy patient, thereby achieving individualized signal abnormality recognition and improving the accuracy and efficiency of recognition.
[0100] The following two specific examples will detail the process of evaluating the selected isolated forest models for unsupervised clustering on the dataset.
[0101] In one specific embodiment, the aforementioned public EEG dataset CHB-MIT is used, and the specific model evaluation process is as follows.
[0102] I. Reading and Analysis of EEG Sample Signal Data
[0103] EEG data contains multiple bipolar lead channels, each corresponding to electrical activity signals in different brain regions. In the CHB-MIT dataset, 18 bipolar lead channels common to all patients were first selected: FP1-F7, F7-T7, T7-P7, P7-O1, FP1-F3, F3-C3, C3-P3, P3-O1, FZ-CZ, CZ-PZ, FP2-F4, F4-C4, C4-P4, P4-O2, FP2-F8, F8-T8, T8-P8, and P8-O2. Subsequently, the potential difference data corresponding to these 18 bipolar lead channels were read from each patient's EDF file, serving as the EEG sample signal data for the epilepsy patients. Figure 4 This is a sample of epilepsy patients, showing the changes in EEG signals across 18 channels before and after a seizure. The solid black lines represent the marked locations where the seizure began. Preprocessing was performed, with time 0 considered the start of the seizure, time before 0 considered pre-seizure, and time after 0 considered post-seizure.
[0104] In the CHB-MIT dataset, data labels are stored separately in a .txt text file, detailing the number of seizures and their start and end times within each EDF file. First, based on these labels, the read data from each channel is segmented into seizure-prone and seizure-free segments. Second, these segments are further segmented using a 5-second sliding window, dividing the EEG sample signal data into equal-length segments. Seizure-prone segments are marked as 1 after segmentation; seizure-free segments are marked as 0.
[0105] After processing through the above steps, two datasets can be obtained for each epilepsy patient sample: [n_samples, 18, 256*5]. One dataset is a positive sample dataset of epileptic seizures, and the other is a negative sample dataset of epileptic non-seizures. n_samples represents the number of samples generated after segmentation, 18 represents the number of bipolar lead channels, and 256*5 represents the data points for each channel.
[0106] The above procedure was performed on all 24 epilepsy patients in the CHB-MIT dataset to ensure data consistency and accuracy of analysis.
[0107] II. Feature Extraction and Normalization
[0108] Based on the EEG sample signal segments obtained in step one above: [n_samples, 18, 256*5], the time-domain and frequency-domain features of each channel are extracted. Here, each EEG sample signal segment has 18 bipolar lead channels, and each EEG sample signal segment has 256*5 data points in each bipolar lead channel.
[0109] The time-domain characteristics of each bipolar lead channel consist of signal strength and standard deviation, calculated as follows:
[0110]
[0111]
[0112] in, Represents the number of observations. It is in time The signal value at that location, It is the average of all observations. It's the signal strength. It is the standard deviation.
[0113] The frequency domain characteristics of each bipolar lead channel are characterized by the power spectral density after Fourier transform. The calculation formula is as follows: Fourier transform is performed on the signal of each bipolar lead channel, and the energy corresponding to each frequency band is extracted.
[0114]
[0115] in, This represents the power spectral density after Fourier transform. and These represent the lower and upper bounds of the frequency band. The specific frequency band distribution is as follows:
[0116] Wave: = 0.5 Hz, = 4 Hz;
[0117] Wave: = 4 Hz, = 8 Hz;
[0118] Wave: = 8 Hz, = 13 Hz;
[0119] Wave: = 13 Hz, = 20 Hz;
[0120] Wave: = 20 Hz, = 30 Hz;
[0121] Wave: = 30 Hz, = 50 Hz.
[0122] This embodiment provides a more granular division of the β0 and β1 bands, which helps distinguish different states of neural activity and improves signal discrimination. This subdivision not only helps to gain a deeper understanding of different neural activities in the brain but also improves the accuracy of EEG analysis, especially in identifying epileptic abnormalities. By subdividing the β0 and β1 bands, features can be extracted more precisely, improving the accuracy of signal processing and machine learning models, thereby better capturing and analyzing the dynamic changes in the brain.
[0123] In summary, each bipolar lead channel contains two time-domain features ( ) and 6 frequency domain features ( ).
[0124] Figure 5 This image shows the Fourier transform results of 18 channels from a sample of epilepsy patients when they were not experiencing seizures. The left side represents the original EEG signal, and the right side represents the power spectral density at different frequencies after the Fourier transform. The dashed lines correspond to... = 0.5 Hz =4 Hz = 8 Hz = 13 Hz = 20 Hz and = 30 Hz.
[0125] Figure 6 This image shows the Fourier transform results of 18 channels during a seizure in a sample of epilepsy patients; the left side represents the original EEG signal, and the right side represents the power spectral density at different frequencies after the Fourier transform; the dashed lines correspond to... = 0.5 Hz = 4Hz = 8 Hz = 13 Hz = 20 Hz and = 30 Hz.
[0126] and Figure 5Compared to the power spectral density of normal EEG signals, during epileptic seizures, the power of delta waves (0.5Hz, 4Hz) and theta waves (4Hz, 8Hz) increases, and β0 waves (13Hz, 20Hz) and β1 waves (20Hz, 30Hz) appear in multiple bipolar lead channels.
[0127] Through the above steps, the feature representation of each EEG sample signal segment can be obtained: [n_samples, 18, 2+6]. Subsequently, Z-score (standard score) normalization is used to scale the features of each bipolar lead channel to a uniform range, making model training more stable. It is worth noting that normalization is performed along the channel direction, and different types of features are normalized separately before being concatenated.
[0128]
[0129]
[0130] in and Let be the mean and variance of the time-domain features. and The mean and variance of the frequency domain features are given.
[0131] III. Model Performance Evaluation
[0132] Isolation Forest, as an unsupervised clustering learning-based anomaly detection method, uses labels only during performance evaluation to verify the model's ability to detect outliers. Several important hyperparameters of the Isolation Forest model include: the number of trees (n_estimators), the maximum number of samples used to build each tree (max_samples), the proportion of features considered when building the trees (max_features), and the proportion of outliers in the dataset (contamination). In this embodiment, the hyperparameters are set to n_estimators = 100, max_features = 1, max_samples = 128, and contamination = auto (meaning the model will automatically estimate the proportion of outliers based on the feature distribution of the data).
[0133] The model's performance was evaluated on the CHB-MIT dataset using the hyperparameter settings described above. The Isolation Forest model's predictions were -1 (abnormal) and 1 (normal). These predictions were then converted to binary classifications of 1 and 0, where 1 represents abnormality and 0 represents normality. The area under the ROC (Receiver Operating Characteristic) curve (AUC) and recall were used as the model's evaluation metrics.
[0134] The isolated forest model was evaluated on each sample of epilepsy patients as follows: Figure 7 As shown, the average AUC = 0.901 and Recall = 0.909. Furthermore, a Random Forest was used as the baseline model for supervised learning, and the hyperparameter settings were kept consistent with those of the Isolation Forest model. Leave-one-out cross-validation was used to assess the generalization performance of the Random Forest model. The evaluation results of the Random Forest model are shown below. Figure 7 As shown, its average AUC is 0.718 and Recall is 0.509.
[0135] As can be seen, the AUC and Recall of the Isolation Forest model are significantly higher than those of the Random Forest model, indicating that it is more sensitive in capturing abnormal patterns of epilepsy and can more accurately identify abnormal EEG activity. In contrast, the Random Forest model, due to individual differences, exhibits poor generalization ability in the leave-one-out test. In summary, the Isolation Forest model proposed in this embodiment achieves superior performance in the epilepsy EEG signal abnormality detection task.
[0136] In another specific embodiment, an epilepsy EEG dataset provided by a central hospital was used. This data was collected during clinical monitoring of patients using a Natus EMU40EX (a video EEG acquisition device). The dataset included 13 patients, aged 3-60 years. Each patient's data contained several hours of EEG recordings, totaling approximately 400 hours of EEG data, including 284 clinically labeled epileptic seizures and abnormal waveforms (peak waves lasting approximately 1 second). The EEG data in the dataset was stored in EDF file format, with each file containing 46 unipolar lead channels, including EEG signals and bioelectrical signal monitoring (e.g., eye movements, leg movements, ECG, blood oxygenation, etc.). The sampling rate was 256 Hz, or 256 samples per second. Consistent with the annotation method of the CHB-MIT dataset, experts at the central hospital provided fine-grained annotations for this dataset, indicating the number of epileptic seizures and their corresponding start and end times in each EDF file.
[0137] I. Reading and Analysis of EEG Sample Signal Data
[0138] In this dataset, 19 monopolar lead channels were selected. While the bipolar leads in the CHB-MIT dataset record the potential difference between adjacent electrodes, in this dataset, each electrode is treated as an independent signal source, recording the signal relative to a global reference point. First, 19 monopolar lead channels common to all patients were selected, including Cz, Fp1, Fz, C3, P3, F7, T5, T3, O2, Fpz, T6, P4, C4, F4, T4, O1, Fp2, F8, and Pz. Based on these 19 unipolar lead channels, 16 bipolar lead channels were constructed, namely Fp1-F7, Fp2-F8, F8-F4, F4-C4, C3-P3, C4-P4, C3-C4, P3-O1, P4-O2, T3-T5, T4-T6, Fpz-Fz, Fz-Cz, Cz-Pz, Pz-O1, and Pz-O2, as shown in Table 1 below.
[0139] Table 1. Construction basis of bipolar lead channels
[0140]
[0141] By designing these channels, it is possible to simultaneously capture electrical activity between different brain regions from multiple dimensions, analyzing brain region functional interactions and information transmission patterns. Furthermore, by selecting physiologically significant combinations of bipolar lead channels, signal discrimination can be improved, particularly for abnormal electrical activity associated with epileptic seizures, while reducing redundant information, ensuring more efficient signal extraction and providing valuable features.
[0142] Subsequently, the potential difference data corresponding to the above 16 bipolar lead channels were read from the EDF file of each patient as EEG sample signal data of the epilepsy patients. Figure 8 This is a dataset of epilepsy EEG signals labeled for a central hospital. The figure shows the EEG signal changes of 16 channels in a sample of epilepsy patients before and after an epileptic seizure. The black solid lines represent the marked seizure times. Preprocessing was performed here, with time 0 as the seizure time, before time 0 as the pre-seizure time, and after time 0 as the post-seizure time.
[0143] Then, based on the annotations, the data from each bipolar lead channel is segmented into seizure-related segments and non-seizure-related segments. Finally, a 3-second sliding window (1-second step) is used to further segment these segments, cutting the EEG signal into equal-length segments and filtering out abnormal waveforms lasting less than 3 seconds. Through these steps, two datasets can be obtained for each epilepsy patient sample: [n_samples, 16, 256*3], one being a positive sample dataset of seizures and the other a negative sample dataset of non-seizures.
[0144] II. Feature Extraction and Normalization
[0145] Based on the EEG signal fragments extracted in step one, two time-domain features are extracted for each sample. ) and 6 frequency domain features ( The calculation method is consistent with the example of model evaluation above. Subsequently, Z-score normalization is applied to the original features in the channel direction to scale the features of each channel to a uniform range.
[0146] III. Performance Evaluation of the Isolated Forest Model
[0147] The hyperparameter settings and evaluation parameters of the isolated forest model are consistent with those in the model evaluation example above. The evaluation results of the isolated forest model proposed in this example on an epilepsy EEG dataset provided by a central hospital are as follows: Figure 9 As shown, the average AUC is 0.887 and Recall is 0.948.
[0148] In the process of identifying abnormal EEG signals in epilepsy, the focus is on the model's ability to correctly detect all seizure segments, i.e., the model's sensitivity to seizure segments. This embodiment uses the area under the ROC curve (AUC) and recall as performance evaluation metrics to measure model performance. The isolated forest model proposed in this embodiment achieved excellent performance in the epilepsy EEG signal abnormality detection task.
[0149] It should be noted that the sequence numbers of the steps in the above embodiments do not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. In practical applications, all the above possible implementation methods can be arbitrarily combined in a combined manner to form possible embodiments of this application, which will not be described in detail here.
[0150] Based on the above embodiments of the automatic identification method for personalized epilepsy EEG abnormal signals, this application also provides an automatic identification system for personalized epilepsy EEG abnormal signals based on the same inventive concept.
[0151] Figure 10 This is a structural diagram of a personalized automatic recognition system for abnormal EEG signals in epilepsy, provided in an embodiment of this application. Figure 10 As shown, the personalized epilepsy EEG abnormal signal automatic recognition system is implemented by a computing device and may specifically include a first acquisition unit 1010, a first preprocessing unit 1020, a model training unit 1030, a second acquisition unit 1040, a second preprocessing unit 1050, and an abnormal signal recognition unit 1060.
[0152] The first acquisition unit 1010 is used to acquire EEG signal data of clinical target epilepsy patients as a training dataset.
[0153] The first preprocessing unit 1020 is used to read EEG signal data in the training dataset according to a set channel order, and to cut the read EEG signal data into equal-length EEG signal segments according to a set window length.
[0154] The model training unit 1030 is used to extract time-domain feature data and frequency-domain feature data from EEG signal segments according to preset time-domain features and preset frequency-domain features. The extracted time-domain feature data and frequency-domain feature data are input into a pre-selected isolated forest model for unsupervised clustering to train the isolated forest model and obtain an abnormal signal recognition model for the target epilepsy patient. In this process, the isolated forest model for unsupervised clustering is selected in advance by analyzing the EEG sample signal data of multiple epilepsy patients.
[0155] The second acquisition unit 1040 is used to continue acquiring EEG signal data of the target epilepsy patient, referred to as data to be identified.
[0156] The second preprocessing unit 1050 is used to read the data to be identified according to the set channel order, and to cut the read data to be identified according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified.
[0157] The abnormal signal recognition unit 1060 is used to extract time-domain feature data and frequency-domain feature data from the EEG signal segment to be identified according to preset time-domain features and preset frequency-domain features, and input the extracted time-domain feature data and frequency-domain feature data into the abnormal signal recognition model of the target epilepsy patient, and output the recognition result of whether the EEG signal segment to be identified is an abnormal signal.
[0158] This application provides one possible implementation method, as described above. Figure 10 The system shown may also include a model filtering unit (not shown in the attached diagram) for:
[0159] EEG signal data and their annotations were obtained from multiple epilepsy patients. The annotations included epileptic seizures and non-seizures. EEG signals during epileptic seizures were marked as abnormal signals, while EEG signals during non-seizures were marked as normal signals.
[0160] Principal component analysis was performed on EEG signal data from multiple epilepsy patients to obtain the EEG signal distribution based on the first and second principal components, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizures in each epilepsy patient based on the first and second principal components.
[0161] Based on the EEG signal distribution of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of epileptic seizures and the EEG signals of epilepsy non-seizures in each epilepsy patient using the first and second principal components, an Isolation Forest model for unsupervised clustering is selected from multiple pre-set machine learning models.
[0162] This application embodiment provides a possible implementation, wherein the model filtering unit is further configured to:
[0163] Based on the fact that the EEG signal distributions of multiple epilepsy patients based on the first and second principal components do not satisfy the independent and identically distributed hypothesis, we determined to construct separate abnormal signal recognition models for multiple epilepsy patients.
[0164] Based on the principal component analysis results of each sample of epilepsy patients, the proportion of epileptic seizure duration to the total duration of the entire EEG signal in the EEG signals based on the first and second principal components of each sample of epilepsy patients is less than the preset threshold, which meets the standard for abnormal detection. Secondly, by comparing the distance between the EEG signals of epileptic seizures based on the first and second principal components of each sample of epilepsy patients and the EEG signals of non-epileptic seizures, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals.
[0165] Based on the characteristics of the EEG signals of each epilepsy patient sample using the first and second principal components and the task characteristics of abnormal epilepsy signal identification, an isolated forest model for unsupervised clustering was selected from multiple pre-set machine learning models.
[0166] This application provides a possible implementation method in which the preset time-domain features include the signal strength and standard deviation of each channel in the EEG signal segment.
[0167] This application provides a possible implementation method, wherein the preset frequency domain features include the energy corresponding to the preset frequency band extracted after performing Fourier transform on the signal of each channel in the EEG signal segment. The preset frequency band includes frequency ranges [0.5Hz, 4Hz), [4Hz, 8Hz), [8Hz, 13Hz), [13Hz, 20Hz), [20Hz, 30Hz], and [30Hz, 50Hz].
[0168] Based on the same inventive concept, this application also provides a computing device, including a processor and a memory, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the personalized automatic identification method for epileptic EEG abnormal signals of any of the above embodiments.
[0169] Based on the same inventive concept, this application also provides a storage medium storing a computer program, wherein the computer program is configured to execute the personalized automatic identification method for epileptic EEG abnormalities of any of the above embodiments when running.
[0170] Based on the same inventive concept, this application also provides a computer program product, including a computer program configured to execute the personalized automatic identification method for epileptic EEG abnormal signals of any of the above embodiments when running.
[0171] Those skilled in the art will clearly understand that the specific working process of the systems, devices, and modules described above can be referred to the corresponding process in the foregoing method embodiments. For the sake of brevity, it will not be repeated here.
[0172] Those skilled in the art will understand that the technical solution of this application, or all or part of it, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several program instructions to cause an electronic device (e.g., a personal computer, server, or network device) to execute all or part of the steps of the methods described in the embodiments of this application when running the program instructions. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0173] Alternatively, all or part of the steps of the foregoing method embodiments can be implemented by hardware (such as electronic devices like personal computers, servers, or network devices) associated with program instructions. The program instructions can be stored in a computer-readable storage medium. When the program instructions are executed by the processor of the electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of this application.
[0174] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that within the spirit and principles of this application, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the corresponding technical solutions to leave the protection scope of this application.
Claims
1. An automatic identification system for personalized epilepsy EEG abnormalities, characterized in that, Implemented by a computing device, the system includes: The first acquisition unit is used to acquire EEG signal data from clinical target epilepsy patients as a training dataset. The first preprocessing unit is used to read the EEG signal data in the training dataset according to the set channel order, and to cut the read EEG signal data into equal-length EEG signal segments according to the set window length. The model training unit is used to extract time-domain feature data and frequency-domain feature data from EEG signal segments according to preset time-domain features and preset frequency-domain features. The extracted time-domain feature data and frequency-domain feature data are input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. In this process, the isolated forest model for unsupervised clustering is selected in advance by analyzing the EEG sample signal data of multiple epilepsy patients. The second acquisition unit is used to continue acquiring EEG signal data of the target epilepsy patient, referred to as the data to be identified. The second preprocessing unit is used to read the data to be identified according to the set channel order, and to cut the read data to be identified according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified. The abnormal signal recognition unit is used to extract time-domain feature data and frequency-domain feature data from the EEG signal segment to be identified according to preset time-domain features and preset frequency-domain features, and input the extracted time-domain feature data and frequency-domain feature data into the abnormal signal recognition model of the target epilepsy patient, and output the recognition result of whether the EEG signal segment to be identified is an abnormal signal.
2. The system according to claim 1, characterized in that, The system also includes a model filtering unit for: EEG signal data and their annotations were obtained from multiple epilepsy patients. The annotations included epileptic seizures and non-seizures. EEG signals during epileptic seizures were marked as abnormal signals, while EEG signals during non-seizures were marked as normal signals. Principal component analysis was performed on EEG signal data from multiple epilepsy patients to obtain the EEG signal distribution based on the first and second principal components, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-seizures in each epilepsy patient based on the first and second principal components. Based on the EEG signal distribution of multiple epilepsy patients using the first and second principal components, and the distance between the EEG signals of epileptic seizures and the EEG signals of epilepsy non-seizures in each epilepsy patient using the first and second principal components, an Isolation Forest model for unsupervised clustering is selected from multiple pre-set machine learning models.
3. A computing device, characterized in that, Includes a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the following steps applicable to a personalized automatic identification method for epileptic EEG abnormalities: EEG signal data from target epilepsy patients in clinical settings were obtained as a training dataset. The EEG signal data in the training dataset is read according to the set channel order, and the read EEG signal data is cut according to the set window length, dividing the read EEG signal data into EEG signal segments of equal length. Based on preset time-domain and frequency-domain features, time-domain and frequency-domain feature data are extracted from EEG signal segments. The extracted time-domain and frequency-domain feature data are then input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. Specifically, the isolated forest model for unsupervised clustering is selected in advance by analyzing EEG sample signal data from multiple epilepsy patients. Continue to acquire EEG signal data from the target epilepsy patient, referred to as the data to be identified; The data to be identified is read according to the set channel order, and the read data to be identified is cut according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified; Based on preset time-domain and frequency-domain features, time-domain feature data and frequency-domain feature data are extracted from the EEG signal segment to be identified. The extracted time-domain feature data and frequency-domain feature data are then input into the abnormal signal identification model of the target epilepsy patient, and the identification result of whether the EEG signal segment to be identified is an abnormal signal is output.
4. A storage medium, characterized in that, The storage medium stores a computer program configured to execute the following steps applicable to a personalized automatic identification method for epileptic EEG abnormalities: EEG signal data from target epilepsy patients in clinical settings were obtained as a training dataset. The EEG signal data in the training dataset is read according to the set channel order, and the read EEG signal data is cut according to the set window length, dividing the read EEG signal data into EEG signal segments of equal length. Based on preset time-domain and frequency-domain features, time-domain and frequency-domain feature data are extracted from EEG signal segments. The extracted time-domain and frequency-domain feature data are then input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. Specifically, the isolated forest model for unsupervised clustering is selected in advance by analyzing EEG sample signal data from multiple epilepsy patients. Continue to acquire EEG signal data from the target epilepsy patient, referred to as the data to be identified; The data to be identified is read according to the set channel order, and the read data to be identified is cut according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified; Based on preset time-domain and frequency-domain features, time-domain feature data and frequency-domain feature data are extracted from the EEG signal segment to be identified. The extracted time-domain feature data and frequency-domain feature data are then input into the abnormal signal identification model of the target epilepsy patient, and the identification result of whether the EEG signal segment to be identified is an abnormal signal is output.
5. A computer program product, comprising a computer program, characterized in that, The computer program is configured to execute the following steps at runtime, applicable to a personalized method for automatic identification of epilepsy EEG abnormalities: EEG signal data from target epilepsy patients in clinical settings were obtained as a training dataset. The EEG signal data in the training dataset is read according to the set channel order, and the read EEG signal data is cut according to the set window length, dividing the read EEG signal data into EEG signal segments of equal length. Based on preset time-domain and frequency-domain features, time-domain and frequency-domain feature data are extracted from EEG signal segments. The extracted time-domain and frequency-domain feature data are then input into a pre-selected isolated forest model for unsupervised clustering. The isolated forest model is trained to obtain an abnormal signal recognition model for the target epilepsy patient. Specifically, the isolated forest model for unsupervised clustering is selected in advance by analyzing EEG sample signal data from multiple epilepsy patients. Continue to acquire EEG signal data from the target epilepsy patient, referred to as the data to be identified; The data to be identified is read according to the set channel order, and the read data to be identified is cut according to the set window length, dividing the read data to be identified into equal-length EEG signal segments to be identified; Based on preset time-domain and frequency-domain features, time-domain feature data and frequency-domain feature data are extracted from the EEG signal segment to be identified. The extracted time-domain feature data and frequency-domain feature data are then input into the abnormal signal identification model of the target epilepsy patient, and the identification result of whether the EEG signal segment to be identified is an abnormal signal is output.
Citation Information
Patent Citations
Intelligent epileptic spike wave detection method based on fusion of self-adaptive template matching and machine learning algorithm
CN110811609A
Method and device for detecting epileptic discharge
CN114869301A