Personalized epilepsy electroencephalogram abnormal signal automatic identification method and system

By constructing a personalized abnormal signal recognition model based on EEG signals, and using an isolated forest model with unsupervised clustering, the problem of poor generalization ability of epilepsy abnormal signal recognition in the existing technology is solved, and higher recognition accuracy and individualized detection effect are achieved.

CN119679433AActive Publication Date: 2025-03-25INST OF MODERN PHYSICS CHINESE ACADEMY OF SCI +1

Patent Information

Application Number
CN202411950784.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Existing automatic recognition algorithms have poor generalization ability when testing epilepsy abnormal signal abnormality signals, and cannot effectively deal with individual differences, resulting in a decrease in recognition accuracy.

Method used

By obtaining the EEG signal data of the target epilepsy patients, extracting time-domain features and frequency-domain features, and training using an isolated forest model with unsupervised clustering, a personalized anomaly signal recognition model is constructed.

Benefits of technology

Individualized signal abnormality detection is realized, the accuracy of epilepsy abnormality signal recognition is improved, the dependence of traditional supervised learning methods on data distribution and labeling is overcome, and manual intervention is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119679433A_ABST
    Figure CN119679433A_ABST
Patent Text Reader

Abstract

The invention provides a personalized epilepsy electroencephalogram abnormal signal automatic identification method and system, and relates to the technical field of medical artificial intelligence and biomedical signal processing. The method comprises the following steps: taking EEG signal data of a clinical target epileptic as a training data set, and constructing an abnormal signal identification model of the target epileptic by combining feature engineering and an unsupervised learning technology; then, the model is used for identifying abnormal signals in subsequent EEG signal data of the target epileptic, individualized signal anomaly detection is achieved, and the problem that an existing automatic identification algorithm is poor in generalization ability is solved; moreover, by analyzing EEG sample signal data of a plurality of sample epileptics, screening out an isolated forest model for unsupervised clustering, and training the isolated forest model, an abnormal signal recognition model of the target epileptics is obtained, so that the dependence of a traditional supervised learning method on annotation data is broken through, and the recognition accuracy of the abnormal signal of the target epileptics is improved. And the recognition efficiency of the epilepsy abnormal signal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of medical artificial intelligence and biomedical signal processing technology, and in particular to a method and system for automatic identification of personalized abnormal EEG signals of epilepsy. Background Art

[0002] Epilepsy is a common neurological disease that affects more than 50 million people of all ages worldwide and has become a major international public health issue. It is characterized by abnormal electrical activity in the brain, which is often characterized by sudden, transient brain dysfunction, manifested as irregular seizures, recurrent epileptic seizures or severe convulsions, which may lead to worsening physical condition, impaired intellectual development, and even life-threatening.

[0003] EEG (Electroencephalogram, electrical recording of the brain, also known as electroencephalogram) is a non-invasive technology that records brain electrical activity through multi-channel sensors and is widely used in epilepsy monitoring. By analyzing abnormal waveforms in EEG signals, clinicians can identify and locate epileptic lesions and evaluate the progression of the disease and the effectiveness of treatment. However, due to the uncertainty of epileptic seizures, long-term detection of patients' EEG data is required, which often generates massive amounts of EEG data, which increases the workload of medical staff, and long-term visual detection may miss certain abnormal signals, and the detection results are highly subjective. In addition, there may be significant differences in the EEG manifestations of different patients, which increases the difficulty of identifying epileptic seizures. Therefore, it is of great clinical significance to develop an automated method for identifying epileptic abnormalities based on EEG signals.

[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. Automatic recognition algorithms greatly improve the efficiency and accuracy of epilepsy diagnosis by performing real-time analysis of large-scale EEG data. In particular, for data monitored for a long time, the automated recognition system can capture abnormal epileptic signals at the first time, helping doctors make decisions quickly and reducing the risk of seizures in patients. In recent years, machine learning methods based on supervised learning have been widely used in EEG automatic epileptic seizure detection, including models based on convolutional neural networks (CNN), long short-term memory networks (LSTM), autoencoders (AE), support vector machines (SVM), and other models. However, the inventors found through research that the seizure patterns of epilepsy have individual differences, and there are significant differences in EEG signal characteristics between different ages and different patients, which do not obey the independent and identically distributed assumption, resulting in poor generalization ability of existing machine learning algorithms when conducting cross-patient tests.

[0005] In summary, the development of an automatic recognition algorithm for abnormal EEG signals in epilepsy has important clinical significance, but traditional supervised learning methods have certain limitations in this task. Due to individual differences between different patients, the independent and identically distributed assumption is not obeyed, and traditional supervised learning methods require that the training and test data of the model have similar distributions so that the model can be generalized to unseen data, which limits the application and promotion of machine learning algorithms in this field. Therefore, this technical problem needs to be solved urgently. Summary of the invention

[0006] In view of the above problems, this application is proposed to provide a method and system for automatic identification of abnormal EEG signals for personalization, a computing device, a storage medium and a computer program product that overcome the above problems or at least partially solve the above problems. The technical solution is as follows: In a first aspect, a method for automatically identifying abnormal EEG signals for epilepsy is provided, which is implemented by a computing device and includes: Obtain EEG signal data of clinical target epilepsy patients as a training data set; The EEG signal data in the training data set is read according to the set channel order, and the read EEG signal data is cut according to the set window length to divide the read EEG signal data into EEG signal segments of equal length; According to preset time domain features and preset frequency domain features, time domain feature data and frequency domain feature data are extracted from EEG signal segments, the extracted time domain feature data and frequency domain feature data are input into a pre-screened isolation forest model for unsupervised clustering, the isolation forest model is trained, and an abnormal signal recognition model for a target epilepsy patient is obtained; wherein, the isolation forest model for unsupervised clustering is screened out in advance by analyzing EEG sample signal data of multiple sample epilepsy patients; Continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified; The data to be identified are read according to the set channel order, and the read data to be identified are cut according to the set window length, so as to divide the read data to be identified into EEG signal segments to be identified with equal length; According to the preset time domain features and the preset frequency domain features, time domain feature data and frequency domain feature data are extracted from the EEG signal segment to be identified, and the extracted time domain feature data and frequency domain feature data are input into the abnormal signal recognition model of the target epilepsy patient, and the recognition result of whether the EEG signal segment to be identified is an abnormal signal is output.

[0007] In a possible implementation, the EEG sample signal data of multiple sample epilepsy patients are analyzed in advance to screen out an isolation forest model for unsupervised clustering, including: Obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy onset and no epilepsy onset, wherein the EEG signal during epilepsy onset is marked as an abnormal signal, and the EEG signal during no epilepsy onset is marked as a normal signal; Performing principal component analysis on EEG sample signal data of multiple sample epilepsy patients to obtain EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of an epileptic seizure and the EEG signal of a non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component; According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is screened out from multiple preset machine learning models.

[0008] In a possible implementation, based on the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, and the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is selected from multiple preset machine learning models, including: According to the fact that the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component does not satisfy the independent and identically distributed assumption, it is determined to construct respective abnormal signal recognition models for multiple sample epilepsy patients; According to the principal component analysis results of each sample epilepsy patient, the proportion of the duration of epileptic seizures in the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component to the total duration of the EEG signal is less than the preset threshold, which meets the standard of abnormal detection; secondly, from the comparison between the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures based on the first principal component and the second principal component of each sample epilepsy patient, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals; According to the characteristics of the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component and the task characteristics of abnormal epilepsy signal recognition, the isolation forest model for unsupervised clustering was selected from multiple preset machine learning models.

[0009] In a possible implementation, the preset time domain features include the signal strength of each channel in the EEG signal segment and the standard deviation of the signal strength.

[0010] In one possible implementation, the preset frequency domain features include the energy corresponding to a preset frequency band extracted after Fourier transforming the signal of each channel in the EEG signal segment, and the preset frequency bands include frequency interval [0.5Hz, 4Hz), frequency interval [4Hz, 8Hz), frequency interval [8Hz, 13Hz), frequency interval [13Hz, 20Hz), frequency interval [20Hz, 30Hz), and frequency interval [30Hz, 50Hz).

[0011] In a second aspect, a personalized automatic recognition system for abnormal EEG signals of epilepsy is provided, which is implemented by a computing device and includes: A first acquisition unit is used to acquire EEG signal data of a clinical target epilepsy patient as a training data set; A first preprocessing unit is used to read the EEG signal data in the training data set according to a set channel order, and cut the read EEG signal data according to a set window length to divide the read EEG signal data into EEG signal segments of equal length; A 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, input the extracted time domain feature data and frequency domain feature data into a pre-screened isolation forest model for unsupervised clustering, train the isolation forest model, and obtain an abnormal signal recognition model for a target epilepsy patient; wherein the isolation forest model for unsupervised clustering is screened out in advance by analyzing EEG sample signal data of multiple sample epilepsy patients; The second acquisition unit is used to continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified; A second preprocessing unit is used to read the data to be identified according to a set channel sequence, and to cut the read data to be identified according to a set window length, so as to divide the read data to be identified into EEG signal segments to be identified of equal length; The abnormal signal identification 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 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.

[0012] In a possible implementation, the system further includes a model screening unit, which is used to: Obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy onset and no epilepsy onset, wherein the EEG signal during epilepsy onset is marked as an abnormal signal, and the EEG signal during no epilepsy onset is marked as a normal signal; Performing principal component analysis on EEG sample signal data of multiple sample epilepsy patients to obtain EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of an epileptic seizure and the EEG signal of a non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component; According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is screened out from multiple preset machine learning models.

[0013] In a third aspect, 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 execute any one of the above-described methods for automatic identification of personalized abnormal epileptic EEG signals.

[0014] In a fourth aspect, a storage medium is provided, wherein the storage medium stores a computer program, wherein the computer program is configured to execute any of the above-mentioned methods for automatic identification of personalized abnormal epileptic EEG signals when running.

[0015] In a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program is configured to execute any one of the above-mentioned methods for automatically identifying abnormal epileptic EEG signals suitable for personalization when running.

[0016] By means of the above-mentioned technical scheme, the embodiments of the present application provide a method and system for automatic identification of personalized abnormal EEG signals of epilepsy, a computing device, a storage medium and a computer program product. The method can be based on the EEG signal data of the target epilepsy patient in the clinic as a training data set, and by combining feature engineering and unsupervised learning technology, an abnormal signal recognition model of the target epilepsy patient itself is constructed, and then the abnormal signal recognition model of the target epilepsy patient itself is used to identify the subsequent EEG signal data of the target epilepsy patient, thereby realizing individualized signal anomaly detection, solving the problem of poor generalization ability of the existing automatic recognition algorithm, and improving the accuracy of abnormal signal recognition of epilepsy; and, by analyzing the EEG sample signal data of multiple sample epilepsy patients in advance, an isolation forest model for unsupervised clustering is screened out, and by training the isolation forest model, an abnormal signal recognition model for the target epilepsy patient is obtained, thereby overcoming the problem that the traditional supervised learning method requires that the training and test data of the model have similar distributions, and breaking through the dependence of the traditional supervised learning method on labeled data, significantly reducing manual intervention, and improving the recognition efficiency of abnormal signals of epilepsy. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0018] Figure 1 A flowchart of a personalized automatic identification method for abnormal EEG signals of epilepsy provided in an embodiment of the present application is shown; Figure 2a and Figure 2b The principal component analysis results of EEG sample signal data of epilepsy patients of different age groups provided in the embodiment of the present application are shown; Figure 3a and Figure 3b The principal component analysis results of EEG sample signal data of epilepsy patients of the same age group provided in the embodiment of the present application are shown; Figure 4This is the EEG signal change process of each of the 18 channels of a sample epilepsy patient before and after the epilepsy attack. The black solid line represents the marked position of the onset of epilepsy. Preprocessing was performed here, and time 0 was taken as the onset time, the time before time 0 was taken as the time before the epilepsy attack, and the time after time 0 was taken as the time after the epilepsy attack. Figure 5 The results of Fourier transform of 18 channels of a sample epileptic patient when the patient is not having an epileptic seizure; the left side is the original EEG signal, and the right side is the power spectrum density at different frequencies after Fourier transform; the dotted lines correspond to = 0.5 Hz, =4 Hz, = 8 Hz, = 13 Hz, = 20 Hz and = 30 Hz; Figure 6 The results of Fourier transform of 18 channels when a certain epileptic patient has an epileptic seizure; the left side is the original EEG signal, and the right side is the power spectrum density at different frequencies after Fourier transform; the dotted lines correspond to = 0.5 Hz, = 4Hz, = 8 Hz, = 13 Hz, = 20 Hz and = 30 Hz; Figure 7 Evaluation results of the isolation forest model and random forest model on the CHB-MIT dataset; Figure 8 This is an epilepsy EEG dataset labeled by a central hospital. The figure shows the EEG signal changes of 16 channels of a sample epilepsy patient before and after an epileptic seizure, where the black solid line represents the marked seizure time; preprocessing is performed here, with time 0 as the seizure time, time before 0 as before the epileptic seizure, and time after 0 as after the epileptic seizure; Fig. 9 This is the evaluation result of the isolation forest model on a central hospital dataset; Fig.10 The structure diagram of the system for automatically identifying abnormal EEG signals for personalization is shown in the embodiment of the present application. DETAILED DESCRIPTION

[0019] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings 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 is interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".

[0021] In order to solve the above technical problems, the embodiment of the present application provides a personalized method for automatically identifying abnormal EEG signals of epilepsy, which is implemented by a computing device, and the computing device here can be a computer, a server, a computing center, a smart phone, a wearable device, etc., and this embodiment does not limit this. Figure 1 As shown, the method for automatically identifying abnormal EEG signals suitable for individualized epilepsy may include the following steps S101 to S106: Step S101, obtaining EEG signal data of a clinical target epilepsy patient as a training data set.

[0022] EEG is a non-invasive technology that records brain electrical activity through multi-channel sensors. In practice, EEG measures and records the electrical signals of brain neurons by placing a series of electrodes on the scalp. These electrodes correspond to different areas of the brain. Each electrode is a unipolar lead channel, which records the potential difference between the electrode and the global reference point; a bipolar lead channel is constructed by two electrodes, and the bipolar lead channel records the potential difference between the two electrodes; the potential difference is also voltage, and the unit is volt. The EEG signal data here can include the potential difference between the two electrodes recorded by each bipolar lead channel in multiple bipolar lead channels.

[0023] For example, EEG places 19 electrodes on the scalp, which correspond to different areas of the brain. These 19 electrodes correspond to 19 unipolar 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 unipolar lead channels, 16 bipolar lead channels are constructed, namely Fp1-F 7. 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, each bipolar lead channel records the potential difference between 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 given here are only for illustration and do not limit this embodiment.

[0024] In a specific application scenario, when a target epilepsy patient comes to the hospital, an electroencephalogram acquisition device can be used to collect the potential difference data of multiple unipolar lead channels corresponding to multiple electrodes placed on the scalp of the target epilepsy patient, and the potential difference data of multiple bipolar lead channels can be obtained based on the potential difference data of multiple unipolar lead channels. For example, the potential difference data of each bipolar lead channel in 16 bipolar lead channels can be obtained based on the potential difference data of 19 unipolar lead channels, thereby obtaining the EEG signal data of the target epilepsy patient as a training data set.

[0025] The sampling frequency of the EEG acquisition device here is F, where F is a positive integer. For example, the sampling frequency F is 256 Hz, which means 256 samples are taken in 1 second, that is, multiple unipolar lead channels are sampled 256 times in 1 second synchronously; for example, 19 unipolar lead channels are sampled 256 times in 1 second synchronously. It should be noted that the examples here are only for illustration and do not limit the present embodiment.

[0026] Step S102, reading the EEG signal data in the training data set according to the set channel order, and cutting the read EEG signal data according to the set window length, dividing the read EEG signal data into EEG signal segments of equal length.

[0027] In this step, the set channel order may be the set order of the bipolar lead channels. Taking the previous example, the order of the bipolar lead channels may be pre-set according to the previous 16 bipolar lead channels as the set order of the bipolar lead channels.

[0028] In addition, the set window length can be set according to actual needs, such as setting the window length to 5 seconds or 3 seconds, etc., which is not limited in this embodiment.

[0029] Step S103, extracting time domain feature data and frequency domain feature data from the EEG signal segments according to preset time domain features and preset frequency domain features, inputting the extracted time domain feature data and frequency domain feature data into a pre-screened isolation forest model for unsupervised clustering, training the isolation forest model, and obtaining an abnormal signal recognition model for the target epilepsy patient; wherein, the isolation forest model for unsupervised clustering is screened out in advance by analyzing the EEG sample signal data of multiple sample epilepsy patients.

[0030] In this step, the preset time domain features may include the signal strength of each channel in the EEG signal segment and the standard deviation of the signal strength, etc., which is not limited in this embodiment.

[0031] The preset frequency domain features may include the energy corresponding to a preset frequency band extracted after Fourier transforming the signal of each channel in the EEG signal segment, where the preset frequency band may include frequency interval [0.5Hz, 4Hz), frequency interval [4Hz, 8Hz), frequency interval [8Hz, 13Hz), frequency interval [13Hz, 20Hz), frequency interval [20Hz, 30Hz), and frequency interval [30Hz, 50Hz).

[0032] During an epileptic seizure, the activity of brain neurons is enhanced, and the signal usually has a significant difference in amplitude. This increase may be manifested as a spike wave, a sharp wave rhythm or a spike wave, which are typical characteristics of epileptic activity and are significantly different from normal brain activity patterns. The amplitude of EEG signals between different patients may vary greatly, depending on factors such as the type of epilepsy, the severity of the seizure, the age and gender of the patient. At the same time, there are significant differences in the EEG spectrum when epilepsy occurs and when it does not occur. For example, during an attack, an increase in the power of delta waves [0.5Hz, 4Hz) and theta waves [4Hz, 8Hz) may be observed, especially beta0 waves [13Hz, 20Hz), beta1 waves [20Hz, 30Hz), and gamma waves [30Hz, 50Hz) will appear in the attack area. Therefore, in this embodiment, according to the preset time domain features and the preset frequency domain features, time domain feature data and frequency domain feature data are extracted from the EEG signal fragments as the input of the machine learning model. The time domain features are used to characterize the signal amplitude changes of different EEG signal patterns (i.e., epileptic seizures and non-epilepsy attacks), and the frequency domain features are used to characterize the frequency component changes of different EEG signal patterns.

[0033] Step S104, continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified.

[0034] Step S105 , reading the data to be recognized according to the set channel sequence, and cutting the read data to be recognized according to the set window length, so as to divide the read data to be recognized into EEG signal segments to be recognized of equal length.

[0035] In this step, the set channel sequence and the set window length can refer to the introduction in the previous step S102, which will not be repeated here.

[0036] Step S106, according to the preset time domain features and the preset frequency domain features, time domain feature data and frequency domain feature data are extracted from the EEG signal segment to be identified, and the extracted time domain feature data and frequency domain feature data are input into the abnormal signal recognition model of the target epilepsy patient, and the recognition result of whether the EEG signal segment to be identified is an abnormal signal is output.

[0037] This embodiment can use the EEG signal data of the target epilepsy patient as a training data set, and by combining feature engineering and unsupervised learning technology, construct an abnormal signal recognition model of the target epilepsy patient itself, and then use the abnormal signal recognition model of the target epilepsy patient itself to identify the subsequent EEG signal data of the target epilepsy patient, thereby realizing individualized signal anomaly detection, solving the problem of poor generalization ability of existing automatic recognition algorithms, and improving the accuracy of abnormal epilepsy signal recognition; and, by analyzing the EEG sample signal data of multiple sample epilepsy patients in advance, an isolation forest model for unsupervised clustering is screened out, and by training the isolation forest model, an abnormal signal recognition model for the target epilepsy patient is obtained, thereby overcoming the problem that traditional supervised learning methods require that the training and test data of the model have similar distributions, and breaking through the dependence of traditional supervised learning methods on labeled data, significantly reducing manual intervention, and improving the recognition efficiency of abnormal epilepsy signals.

[0038] In the above step S103, it is mentioned that the EEG sample signal data of multiple sample epilepsy patients are analyzed in advance to select an isolation forest model for unsupervised clustering, which may specifically include the following steps A1 to A3: Step A1, obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy attack and no epilepsy attack, wherein the EEG signal during epilepsy attack is marked as an abnormal signal, and the EEG signal during no epilepsy attack is marked as a normal signal.

[0039] Step A2, performing principal component analysis on the EEG sample signal data of multiple sample epilepsy patients, obtaining the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of the epileptic seizure and the EEG signal of the non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component.

[0040] Step A3, based on the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component, and the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, select an isolation forest model for unsupervised clustering from multiple preset machine learning models.

[0041] This embodiment does not directly use the data set to train multiple preset machine learning models, test the trained multiple machine learning models, and then screen the models according to the test results; instead, it preliminarily performs principal component analysis on the EEG sample signal data of multiple sample epilepsy patients to explore the distribution of the EEG sample signal data of multiple sample epilepsy patients, and then screens out the isolation forest model for unsupervised clustering from the preset multiple machine learning models. This can improve the efficiency of model screening and save the computing and storage resources required for model training and testing.

[0042] In an optional embodiment, the above step A3 selects an isolation forest model for unsupervised clustering from a plurality of preset machine learning models based on the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, and the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures of each sample epilepsy patient based on the first principal component and the second principal component. Specifically, the following steps A31 to A33 may be included: Step A31, according to the fact that the EEG signal distribution of the multiple sample epilepsy patients based on the first principal component and the second principal component does not satisfy the independent and identically distributed assumption, it is determined to construct respective abnormal signal recognition models for the multiple sample epilepsy patients.

[0043] Step A32, according to the principal component analysis results of each sample epilepsy patient, the proportion of the duration of epileptic seizures in the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component to the total duration of the EEG signals is less than a preset threshold, which meets the standard for abnormal detection; secondly, from the comparison of the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures based on the first principal component and the second principal component of each sample epilepsy patient, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals.

[0044] The preset threshold here can be set according to actual needs, and this embodiment does not limit this.

[0045] Step A33, based on the characteristics of the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component and the task characteristics of abnormal epilepsy signal recognition, an isolation forest model for unsupervised clustering is selected from multiple preset machine learning models.

[0046] According to the fact that the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component does not satisfy the independent and identically distributed assumption, this embodiment creatively proposes to independently construct an abnormal signal recognition model in the EEG signal data of each sample epilepsy patient. This model does not rely on a pre-learned global model and can effectively cope with individual differences between different sample epilepsy patients, avoiding the problem of decreased detection accuracy due to insufficient generalization ability of the model, and ensuring consistency of detection performance among different sample epilepsy patients, thereby demonstrating higher practicality and adaptability in diverse clinical environments.

[0047] In addition, this embodiment uses an isolation forest model of unsupervised clustering to distinguish normal and abnormal patterns in the EEG signal of the same epilepsy patient. The isolation forest model is based on a tree structure and identifies anomalies by separating abnormal points from normal points. It is suitable for detecting abnormal signal fragments, especially in the case of uneven data distribution or unlabeled data. The core idea of ​​the isolation forest model is that abnormal points are more easily isolated because they are different 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 in all trees and calculates the abnormal score based on this path length. The higher the score, the more likely the data point is an abnormal point. The inventor found through analysis that epileptic seizures are random. In the long-term monitored epileptic EEG signal data, the duration of epileptic seizures accounts for a very small proportion of the total duration, so the proportion of abnormal data is very small, which makes the isolation forest model an ideal choice for processing high-dimensional EEG signal data that may contain rare abnormal events.

[0048] The following describes in detail a process of analyzing EEG sample signal data of multiple sample epilepsy patients and selecting an isolation forest model for unsupervised clustering through a specific embodiment.

[0049] In this specific embodiment, a widely used public EEG dataset CHB-MIT is used. The dataset was jointly created by Children's Hospital Boston (CHB) and Massachusetts Institute of Technology (MIT) to provide researchers with a high-quality EEG database for developing and verifying epileptic seizure prediction, detection, and related machine learning and signal processing algorithms. The CHB-MIT dataset contains scalp EEG recording data from 24 epilepsy patients (from 1.5 to 22 years old), which were collected during the clinical monitoring of patients. The data of each patient contains several EEG records, each of which lasts from a few hours to a few days, and a total of approximately 500 hours of EEG data, including 198 clinically annotated epileptic seizures. The EEG data in the dataset is stored in the EDF (European Data Format) file format, and each file contains the potential difference data of bipolar lead channels (usually 18 to 23), and the data sampling frequency is 256Hz, that is, 256 samples per second. The CHB-MIT dataset provides detailed epileptic seizure annotations (also called labels), including the start and end times of the seizures. These annotations are manually labeled by clinicians based on video and EEG data, and can be used to evaluate the performance of automatic recognition algorithms for epileptic EEG abnormal signals.

[0050] (1) Reading EEG sample signal data EEG data contains multiple bipolar lead channels, each of which corresponds to the electrical activity signals of different brain regions. In the CHB-MIT dataset, 18 bipolar lead channels common to all patients were first selected, including 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, P8-O2. Subsequently, the potential difference data corresponding to the above 18 bipolar lead channels were read from the EDF file of each patient as the EEG sample signal data of the sample epilepsy patients.

[0051] (2) Analysis of EEG sample signal data Principal component analysis is performed on the EEG sample signal data of multiple sample epilepsy patients to obtain the EEG signal distribution of the multiple sample epilepsy patients based on the first principal component and the second principal component, and to obtain the distance between the EEG signal of the epileptic seizure and the EEG signal of the non-epileptic seizure for each sample epilepsy patient based on the first principal component and the second principal component.

[0052] Afterwards, according to the fact that the EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component do not satisfy the independent and identically distributed assumption, it is determined to construct respective abnormal signal recognition models for the multiple sample epilepsy patients.

[0053] Figure 2a and Figure 2b The principal component analysis results of the EEG sample signal data of sample epilepsy patients of different age groups provided by the embodiment of the present application are shown. The horizontal axis is the first principal component and the vertical axis is the second principal component. The ages of the sample epilepsy patients chb12, chb23, chb01, and chb19 are 2 years old, 6 years old, 11 years old, and 19 years old, respectively. Figure 2a and Figure 2b Different shapes are used to represent different sample epilepsy patients. The solid circle represents the sample epilepsy patient chb12, the solid rectangle represents the sample epilepsy patient chb23, the hollow diamond represents the sample epilepsy patient chb01, and the solid triangle represents the sample epilepsy patient chb19. Figure 2b The black and gray colors represent the EEG signals during and after epileptic seizures, respectively.

[0054] Figure 3a and Figure 3b The principal component analysis results of the EEG sample signal data of the sample epilepsy patients of the same age group provided by the embodiment of the present application are shown. The horizontal axis is the first principal component and the vertical axis is the second principal component. The ages of the sample epilepsy patients chb01, chb02, chb09, and chb22 are 11 years old, 11 years old, 10 years old, and 9 years old, respectively. Figure 3a and Figure 3b Different shapes are used to represent different sample epilepsy patients. The solid circle represents the sample epilepsy patient chb01, the solid rectangle represents the sample epilepsy patient chb02, the hollow diamond represents the sample epilepsy patient chb09, and the solid triangle represents the sample epilepsy patient chb22. Figure 3b The black and gray colors represent the EEG signals during and after epileptic seizures, respectively.

[0055] exist Figure 2a In the data, the EEG signal shows a significant clustering structure, that is, there are multiple separate clusters, and the data points are unevenly distributed, with some areas dense and other areas sparse, which indicates that the data comes from multiple different distributions and cannot meet the same distribution assumption. Even for the sample epilepsy patients of the same age, due to individual differences, their principal component analysis results, such as Figure 3a As shown in the figure, there is still an obvious clustering phenomenon, which leads to the poor generalization ability of traditional machine learning-based classification models when tested across patients, limiting its effectiveness in clinical applications.

[0056] It is worth noting that see Figure 2b and Figure 3b For each sample epilepsy patient, there is a clear boundary and distance between the EEG signal of epilepsy attack (i.e. abnormal signal, represented by black) and the EEG signal of no epilepsy attack (i.e. normal signal, represented by gray). Based on this boundary and distance, an abnormality recognition model can be independently constructed in the EEG data of each patient, realizing individualized signal abnormality detection. That is, observing the principal component analysis results of each sample epilepsy patient, the proportion of the duration of epileptic seizures in their EEG signals to the total duration of the entire EEG signal is extremely small (such as less than a preset threshold, the preset threshold here can be set according to actual needs, and this embodiment does not limit this), which meets the standard for abnormal detection; secondly, from the comparison of the distance between the EEG signals of epileptic seizures based on the first principal component and the second principal component of each sample epilepsy patient and the EEG signals of non-epilepsy seizures, it can be seen that traditional density clustering models (such as DBSCAN, K-means) cannot identify abnormal signals from normal signals; DBSCAN (Density-Based Spatial Clustering of Applications with Noise) here is a density-based clustering algorithm, which defines a cluster as the largest set of density-connected points, can divide areas with sufficient density into clusters, and can find clusters of any shape in a noisy spatial database. K-means (K-means clustering algorithm) is a classic clustering algorithm used to divide data points into K clusters. Its basic idea is to divide the samples in the data set into K clusters according to the similarity of features, so that the samples within the cluster are as similar as possible, while the samples between clusters are as different as possible.

[0057] According to the characteristics of the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component and the task characteristics of abnormal epilepsy signal recognition, the isolation forest model for unsupervised clustering was selected from multiple preset machine learning models.

[0058] In this embodiment, according to the principal component analysis results of EEG signals of multiple sample epilepsy patients, it is found that there are individual differences in their EEG signals and the same distribution assumption cannot be satisfied. This patent determines to construct respective abnormal signal recognition models for multiple sample epilepsy patients and use unsupervised training instead of supervised training.

[0059] Among many unsupervised models, this patent uses the isolation forest algorithm based on the following: 1) Since epileptic seizures are random, in the long-term monitored epilepsy EEG data, the duration of epileptic seizures accounts for a very small proportion of the total duration, so the proportion of abnormal data is extremely small, which is more in line with the standard of abnormal detection.

[0060] 2) From the results of principal component analysis, it can be seen that the EEG signals of epilepsy patients in each sample are irregularly distributed. Even if they are all normal EEG signals, some samples have multiple high-density clusters, such as Figure 3b Samples from epilepsy patient Chb09; some samples do not have a clear cluster structure, such as Figure 3b The sample epilepsy patient Chb02 in the dataset is extremely challenging for traditional density clustering models (such as DBSCAN and K-means), while the isolation forest model has significant advantages in processing such irregular data.

[0061] 3) Traditional density clustering models (such as DBSCAN and K-means) rely on pre-set parameters, such as the number of clusters, density threshold, minimum number of samples, etc. In the absence of labels, the selection of these parameters is usually very difficult and can easily affect the clustering results. The advantage of the isolation forest model is that it does not require the pre-set number of clusters or any density parameters, and can automatically determine whether a data point is an abnormal point, which is particularly important for the task of detecting abnormalities in epileptic EEG signals that lack prior information.

[0062] To summarize the above analysis, this embodiment preliminarily performs principal component analysis on the EEG sample signal data of multiple sample epilepsy patients to explore the distribution of the EEG sample signal data of multiple sample epilepsy patients, and then screens out the isolation forest model for unsupervised clustering from the preset multiple machine learning models, and independently constructs an abnormal signal recognition model in the EEG sample signal data of each sample epilepsy patient, so that the model can focus on distinguishing normal and abnormal patterns in the EEG sample signal of the same sample epilepsy patient, thereby realizing individualized signal abnormality recognition and improving the recognition accuracy and efficiency.

[0063] The following will describe in detail the process of evaluating the selected isolation forest model for unsupervised clustering on the data set through two specific embodiments.

[0064] In a specific embodiment, the aforementioned public EEG dataset CHB-MIT is used, and the specific model evaluation process is as follows.

[0065] 1. Reading and analyzing EEG sample signal data EEG data contains multiple bipolar lead channels, each of which corresponds to the electrical activity signals of different brain regions. In the CHB-MIT dataset, 18 bipolar lead channels common to all patients were first selected, including 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, P8-O2. Subsequently, the potential difference data corresponding to the above 18 bipolar lead channels were read from the EDF file of each patient as the EEG sample signal data of the sample epilepsy patients. Figure 4 This is a sample of epilepsy patients, showing the EEG signal changes of 18 channels before and after an epileptic seizure. The black solid line represents the marked position of the onset of epilepsy. Preprocessing was performed here, with time 0 as the onset of the seizure, the time before time 0 as before the epileptic seizure, and the time after time 0 as after the epileptic seizure.

[0066] The data labels in the CHB-MIT dataset are stored separately in a .txt text file, which lists in detail the number of epileptic seizures in each EDF file and their start and end times. First, according to these labels, the data of each channel read is cut into epileptic seizure segments and non-seizure segments. Secondly, the above segments are cut again using a 5-second sliding window to cut the EEG sample signal data into segments of equal length. For the epileptic seizure segment, it is marked as 1 after cutting; for the non-seizure segment, it is marked as 0.

[0067] After the above steps, two data sets can be obtained for each sample epilepsy patient: [n_samples, 18, 256*5], one of which is a positive sample data set of epilepsy onset, and the other is a negative sample data set of epilepsy non-onset. n_samples represents the number of samples generated after cutting, 18 represents the number of bipolar lead channels, and 256*5 represents the data points of each channel.

[0068] The above process was performed on all 24 sample epilepsy patients in the CHB-MIT dataset to ensure the consistency of the data and the accuracy of the analysis.

[0069] 2. Feature extraction and normalization Based on the EEG sample signal segment obtained in step 1 above: [n_samples, 18, 256*5], extract the time domain features and frequency domain features of each channel. Here, each EEG sample signal segment has 18 bipolar lead channels, and each EEG sample signal segment has 256*5 data points on each bipolar lead channel.

[0070] The time domain characteristics of each bipolar lead channel consist of signal strength and standard deviation, which are calculated as follows:

[0071]

[0072] in, represents the number of observations, It's in time The signal value at is the mean of all observations, is the signal strength, is the standard deviation.

[0073] The frequency domain characteristics of each bipolar lead channel are characterized by the power spectral density after Fourier transform. The Fourier transform is performed on the signal of each bipolar lead channel, and the energy corresponding to each frequency band is extracted. The calculation formula is as follows:

[0074] in, represents the power spectral density after Fourier transformation, and Represents the lower and upper frequency limits of the frequency band. The specific frequency band distribution is as follows: Wave: = 0.5 Hz, = 4 Hz; Wave: = 4 Hz, = 8 Hz; Wave: = 8 Hz, = 13 Hz; Wave: = 13 Hz, = 20 Hz; Wave: = 20 Hz, = 30 Hz; Wave: = 30 Hz, = 50 Hz.

[0075] The β0 and β1 bands of this embodiment provide a more detailed frequency division, which helps to distinguish different neural activity states and improve the signal differentiation. This subdivision not only helps to deeply understand the different neural activities of the brain, but also improves the accuracy of EEG analysis, especially when identifying epileptic abnormalities. By subdividing the β0 and β1 bands, features can be extracted more accurately, improving the accuracy of signal processing and machine learning models, so as to better capture and analyze the dynamic changes of the brain.

[0076] In summary, each bipolar lead channel contains 2 time domain features ( ) and 6 frequency domain features ( ).

[0077] Figure 5 The results of Fourier transform of 18 channels of a sample epileptic patient when the patient is not having an epileptic seizure; the left side is the original EEG signal, and the right side is the power spectrum density at different frequencies after Fourier transform; the dotted lines correspond to = 0.5 Hz, =4 Hz, = 8 Hz, = 13 Hz, = 20 Hz and = 30 Hz.

[0078] Figure 6 The results of Fourier transform of 18 channels when a certain epileptic patient has an epileptic seizure; the left side is the original EEG signal, and the right side is the power spectrum density at different frequencies after Fourier transform; the dotted lines correspond to = 0.5 Hz, = 4Hz, = 8 Hz, = 13 Hz, = 20 Hz and = 30 Hz.

[0079] and Figure 5 Compared with the power spectral density of normal EEG signals, during epileptic seizures, the power of delta waves [0.5Hz, 4Hz) and theta waves [4Hz, 8Hz) increased, and beta0 waves [13Hz, 20Hz) and beta1 waves [20Hz, 30Hz) appeared in multiple bipolar lead channels.

[0080] 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 the model training more stable. It is worth noting that the normalization is performed in the direction of the channel, and different types of features are standardized separately and then spliced.

[0081]

[0082]

[0083] in and are the mean and variance of the time domain features, and are the mean and variance of the frequency domain features.

[0084] 3. Model Performance Evaluation As an anomaly detection method for unsupervised clustering learning, the isolation forest model uses labels only in the performance evaluation phase to verify the model's ability to detect abnormal samples. The isolation forest model has several important hyperparameters, including: the number of trees (n_estimators), the maximum number of samples used when building each tree (max_samples), the ratio of the number of features to be considered when building a tree (max_features), and the proportion of outliers in the data set (contamination). In this example, the hyperparameters are set to n_estimators = 100, max_features = 1, max_samples = 128, and contamination = auto (that is, the model will automatically estimate the proportion of outliers based on the feature distribution of the data).

[0085] By using the above hyperparameter settings, the performance of the model was evaluated on the CHB-MIT dataset. The prediction results of the isolation forest model are -1 (abnormal) and 1 (normal), and its prediction results are converted into binary classification of 1 and 0, where 1 represents abnormality and 0 represents normality, and the area under the ROC (Receiver Operating Characteristic) curve (AUC) and recall are used as evaluation indicators of the model.

[0086] The results of the isolation forest model evaluation on each sample epilepsy patient are as follows Figure 7As shown in the figure, the average AUC = 0.901, Recall = 0.909. In addition, Random Forest is used as the benchmark model for supervised learning, and the hyperparameter settings are consistent with those of the Isolation Forest model. The generalization performance of the Random Forest model is cross-validated using the leave-one-out method. The evaluation results of the Random Forest model are shown in the figure below. Figure 7 As shown, its average AUC = 0.718, Recall = 0.509.

[0087] It can be seen that the AUC and Recall of the isolation forest model are significantly higher than those of the random forest, which shows that it is more sensitive in capturing abnormal patterns of epilepsy and can more accurately identify abnormal EEG activity. However, due to the influence of individual differences, the generalization ability of the random forest in the leave-one-out test is poor. In summary, the isolation forest model proposed in this embodiment has achieved excellent performance in the task of detecting abnormal EEG signals of epilepsy.

[0088] In another specific embodiment, an epilepsy EEG dataset provided by a central hospital is used. These data are collected using Natus EMU40EX (a video EEG acquisition device) during the clinical monitoring of patients. A total of 13 patients are included, and the age distribution of the patients is 3-60 years old. The data of each patient includes several hours of EEG recording, and a total of about 400 hours of EEG data, including 284 clinically annotated epileptic seizures and abnormal waveforms (spike waves lasting about 1 second). The EEG data in the dataset is stored in EDF file format, and each file contains a total of 46 unipolar lead channels, including EEG signals and bioelectric signal monitoring (such as eye movements, leg movements, ECG, blood oxygen, etc.). The sampling rate of the data is 256Hz, that is, 256 samples per second. Consistent with the annotation method of the CHB-MIT dataset, the experts of the central hospital provided detailed tags for the dataset, marking the number of epileptic seizures in each EDF file and the corresponding start and end times.

[0089] 1. Reading and analyzing EEG sample signal data In this dataset, 19 single-level lead channels were selected. The bipolar leads in the CHB-MIT dataset record the potential difference between adjacent electrodes, while in this dataset, each electrode acts as an independent signal source and records the signal relative to the global reference point. First, 19 single-level 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.

[0090] Table 1 Construction basis of bipolar lead channels

[0091] Through the design of these channels, it is possible to capture the electrical activity between different brain regions from multiple dimensions and analyze the functional interaction and information transmission patterns of brain regions. At the same time, by selecting a combination of bipolar lead channels with physiological significance, the signal differentiation can be improved, especially for abnormal electrical activity related to epileptic seizures, while reducing redundant information, ensuring that signal extraction is more efficient and provides valuable features.

[0092] Subsequently, the potential difference data corresponding to the above 16 bipolar lead channels are read from the EDF file of each patient as the EEG sample signal data of the sample epilepsy patient. Figure 8 This is an epilepsy EEG dataset labeled for a central hospital. The figure shows the EEG signal changes of 16 channels of a sample epilepsy patient before and after an epileptic seizure, where the black solid line represents the marked seizure time. Preprocessing was performed here, with time 0 as the seizure time, time before 0 as before the epileptic seizure, and time after 0 as after the epileptic seizure.

[0093] Then, the read bipolar lead channel data is cut into epileptic seizure segments and non-seizure segments according to the annotations. Finally, the above segments are cut again using a 3-second sliding window (with a step size of 1 second), the EEG signal is cut into segments of equal length, and abnormal waveforms with a duration of less than 3 seconds are filtered out. Through the above steps, two data sets can be obtained for each sample epilepsy patient: [n_samples, 16, 256*3], one of which is a positive sample data set of epileptic seizures, and the other is a negative sample data set of non-epilepsy seizures.

[0094] 2. Feature extraction and normalization Based on the EEG signal segments extracted in step 1, two time domain features are extracted for each sample ( ) and 6 frequency domain features ( ), the calculation method is consistent with the above model evaluation embodiment. Then, the original features are normalized by Z-score in the channel direction to scale the features of each channel to a uniform range.

[0095] III. Performance Evaluation of Isolation Forest Model The hyperparameter settings and evaluation parameters of the isolation forest model are consistent with those in the above model evaluation embodiment. The evaluation results of the isolation forest model proposed in this embodiment on the epilepsy EEG dataset provided by a central hospital are as follows: Fig. 9 As shown, the average AUC = 0.887, Recall = 0.948.

[0096] In the process of identifying abnormal EEG signals of epilepsy, the focus is on whether the model can correctly detect all seizure fragments, that is, the sensitivity of the model to seizure fragments. This embodiment uses the area under the ROC curve (AUC) and recall rate (Recall) as performance evaluation indicators of the model to measure the performance of the model. The isolation forest model proposed in this embodiment has achieved excellent performance in the task of abnormal EEG signal detection of epilepsy.

[0097] It should be noted that the size of the sequence number of each step in the above embodiment does not mean 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 embodiment of the present application. In practical applications, all the above possible implementation methods can be combined in any way to form possible embodiments of the present application, which will not be described one by one here.

[0098] Based on the personalized automatic identification method for abnormal EEG signals of epilepsy provided in the above embodiments, and based on the same inventive concept, the embodiments of the present application also provide a personalized automatic identification system for abnormal EEG signals of epilepsy.

[0099] Fig.10 1 is a structural diagram of a personalized automatic recognition system for abnormal EEG signals of epilepsy provided in an embodiment of the present application. Fig.10 As shown, the automatic recognition system for personalized epileptic EEG abnormal signals is implemented by a computing device, and specifically may 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.

[0100] A first acquisition unit 1010 is used to acquire EEG signal data of a clinical target epilepsy patient as a training data set; A first preprocessing unit 1020 is used to read the EEG signal data in the training data set according to a set channel order, and cut the read EEG signal data according to a set window length to divide the read EEG signal data into EEG signal segments of equal length; The model training unit 1030 is used to extract time domain feature data and frequency domain feature data from the EEG signal segment according to the preset time domain features and the preset frequency domain features, input the extracted time domain feature data and frequency domain feature data into a pre-screened isolation forest model for unsupervised clustering, train the isolation forest model, and obtain an abnormal signal recognition model for the target epilepsy patient; wherein the isolation forest model for unsupervised clustering is screened out in advance by analyzing the EEG sample signal data of multiple sample epilepsy patients; The second acquisition unit 1040 is used to continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified; The second preprocessing unit 1050 is used to read the data to be identified according to the set channel sequence, and cut the read data to be identified according to the set window length, so as to divide the read data to be identified into EEG signal segments to be identified with equal length; The abnormal signal identification 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 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.

[0101] A possible implementation method is provided in the embodiment of the present application. Fig.10 The system shown may also include a model screening unit (not shown in the drawings) for: Obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy onset and no epilepsy onset, wherein the EEG signal during epilepsy onset is marked as an abnormal signal, and the EEG signal during no epilepsy onset is marked as a normal signal; Performing principal component analysis on EEG sample signal data of multiple sample epilepsy patients to obtain EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of an epileptic seizure and the EEG signal of a non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component; According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is screened out from multiple preset machine learning models.

[0102] A possible implementation method is provided in an embodiment of the present application, wherein the model screening unit is further used to: According to the fact that the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component does not satisfy the independent and identically distributed assumption, it is determined to construct respective abnormal signal recognition models for multiple sample epilepsy patients; According to the principal component analysis results of each sample epilepsy patient, the proportion of the duration of epileptic seizures in the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component to the total duration of the EEG signal is less than the preset threshold, which meets the standard of abnormal detection; secondly, from the comparison between the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures based on the first principal component and the second principal component of each sample epilepsy patient, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals; According to the characteristics of the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component and the task characteristics of abnormal epilepsy signal recognition, the isolation forest model for unsupervised clustering was selected from multiple preset machine learning models.

[0103] A possible implementation method is provided in an embodiment of the present application, wherein the preset time domain features include the signal strength of each channel in the EEG signal segment and the standard deviation of the signal strength.

[0104] A possible implementation method is provided in an embodiment of the present application, wherein the preset frequency domain features include the energy corresponding to a preset frequency band extracted after Fourier transform of the signal of each channel in the EEG signal segment, and the preset frequency band includes frequency interval [0.5Hz, 4Hz), frequency interval [4Hz, 8Hz), frequency interval [8Hz, 13Hz), frequency interval [13Hz, 20Hz), frequency interval [20Hz, 30Hz), and frequency interval [30Hz, 50Hz).

[0105] Based on the same inventive concept, an embodiment of the present 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 of abnormal epileptic EEG signals of any of the above embodiments.

[0106] Based on the same inventive concept, an embodiment of the present application further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the personalized automatic identification method of abnormal epileptic EEG signals of any of the above embodiments when running.

[0107] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, including a computer program, wherein the computer program is configured to execute the personalized automatic identification method of abnormal epileptic EEG signals of any of the above embodiments when running.

[0108] Those skilled in the art can clearly understand that the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the aforementioned method embodiments, and for the sake of brevity, they are not further described here.

[0109] Those skilled in the art can understand that the technical solution of the present application can be essentially or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, which includes a number of program instructions, so that an electronic device (such as a personal computer, a server, or a network device, etc.) executes all or part of the steps of the method described in each embodiment of the present application when running the program instructions. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.

[0110] Alternatively, all or part of the steps of implementing the aforementioned method embodiments may be accomplished by hardware associated with program instructions (such as electronic devices such as personal computers, servers, or network devices), and the program instructions may be stored in a computer-readable storage medium. When the program instructions are executed by a processor of an electronic device, the electronic device executes all or part of the steps of the methods described in the embodiments of the present application.

[0111] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that within the spirit and principles of the present application, they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate from the protection scope of the present application.

Claims

1. A personalized method for automatically identifying abnormal EEG signals of epilepsy, characterized in that: Implementation by a computing device includes: Obtain EEG signal data of clinical target epilepsy patients as a training data set; The EEG signal data in the training data set is read according to the set channel order, and the read EEG signal data is cut according to the set window length to divide the read EEG signal data into EEG signal segments of equal length; According to preset time domain features and preset frequency domain features, time domain feature data and frequency domain feature data are extracted from EEG signal segments, the extracted time domain feature data and frequency domain feature data are input into a pre-screened isolation forest model for unsupervised clustering, the isolation forest model is trained, and an abnormal signal recognition model for a target epilepsy patient is obtained; wherein, the isolation forest model for unsupervised clustering is screened out in advance by analyzing EEG sample signal data of multiple sample epilepsy patients; Continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified; The data to be identified are read according to the set channel order, and the read data to be identified are cut according to the set window length, so as to divide the read data to be identified into EEG signal segments to be identified with equal length; According to the preset time domain features and the preset frequency domain features, time domain feature data and frequency domain feature data are extracted from the EEG signal segment to be identified, and the extracted time domain feature data and frequency domain feature data are input into the abnormal signal recognition model of the target epilepsy patient, and the recognition result of whether the EEG signal segment to be identified is an abnormal signal is output.

2. The method according to claim 1, characterized in that By analyzing the EEG sample signal data of multiple epilepsy patients in advance, the isolation forest model for unsupervised clustering is screened out, including: Obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy onset and no epilepsy onset, wherein the EEG signal during epilepsy onset is marked as an abnormal signal, and the EEG signal during no epilepsy onset is marked as a normal signal; Performing principal component analysis on EEG sample signal data of multiple sample epilepsy patients to obtain EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of an epileptic seizure and the EEG signal of a non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component; According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is screened out from multiple preset machine learning models.

3. The method according to claim 2, characterized in that According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, and the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is selected from multiple preset machine learning models, including: According to the fact that the EEG signal distribution of multiple sample epilepsy patients based on the first principal component and the second principal component does not satisfy the independent and identically distributed assumption, it is determined to construct respective abnormal signal recognition models for multiple sample epilepsy patients; According to the principal component analysis results of each sample epilepsy patient, the proportion of the duration of epileptic seizures in the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component to the total duration of the EEG signal is less than the preset threshold, which meets the standard of abnormal detection; secondly, from the comparison between the distance between the EEG signals of epileptic seizures and the EEG signals of non-epilepsy seizures based on the first principal component and the second principal component of each sample epilepsy patient, it can be seen that the traditional density clustering model cannot identify abnormal signals from normal signals; According to the characteristics of the EEG signals of each sample epilepsy patient based on the first principal component and the second principal component and the task characteristics of abnormal epilepsy signal recognition, the isolation forest model for unsupervised clustering was selected from multiple preset machine learning models.

4. The method according to claim 1, characterized in that: The preset time domain features include the signal strength of each channel in the EEG signal segment and the standard deviation of the signal strength.

5. The method according to claim 1, characterized in that The preset frequency domain features include the energy corresponding to the preset frequency band extracted after Fourier transform of the signal of each channel in the EEG signal segment, and the preset frequency band includes frequency interval [0.5Hz, 4Hz), frequency interval [4Hz, 8Hz), frequency interval [8Hz, 13Hz), frequency interval [13Hz, 20Hz), frequency interval [20Hz, 30Hz), and frequency interval [30Hz, 50Hz).

6. A personalized automatic recognition system for abnormal EEG signals of epilepsy, characterized in that: Implemented by a computing device, the system includes: A first acquisition unit is used to acquire EEG signal data of a clinical target epilepsy patient as a training data set; A first preprocessing unit is used to read the EEG signal data in the training data set according to a set channel order, and cut the read EEG signal data according to a set window length to divide the read EEG signal data into EEG signal segments of equal length; A 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, input the extracted time domain feature data and frequency domain feature data into a pre-screened isolation forest model for unsupervised clustering, train the isolation forest model, and obtain an abnormal signal recognition model for a target epilepsy patient; wherein the isolation forest model for unsupervised clustering is screened out in advance by analyzing EEG sample signal data of multiple sample epilepsy patients; The second acquisition unit is used to continue to acquire EEG signal data of the target epilepsy patient, which is called data to be identified; A second preprocessing unit is used to read the data to be identified according to a set channel sequence, and to cut the read data to be identified according to a set window length, so as to divide the read data to be identified into EEG signal segments to be identified of equal length; The abnormal signal identification 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 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.

7. The system according to claim 6, characterized in that The system further comprises a model screening unit, which is used to: Obtaining EEG sample signal data and annotations of multiple sample epilepsy patients; the annotations include epilepsy onset and no epilepsy onset, wherein the EEG signal during epilepsy onset is marked as an abnormal signal, and the EEG signal during no epilepsy onset is marked as a normal signal; Performing principal component analysis on EEG sample signal data of multiple sample epilepsy patients to obtain EEG signal distributions of multiple sample epilepsy patients based on the first principal component and the second principal component, and obtaining the distance between the EEG signal of an epileptic seizure and the EEG signal of a non-epilepsy seizure for each sample epilepsy patient based on the first principal component and the second principal component; According to the distribution of EEG signals of multiple sample epilepsy patients based on the first principal component and the second principal component, as well as the distance between the EEG signals of epileptic seizures and the EEG signals of non-epileptic seizures of each sample epilepsy patient based on the first principal component and the second principal component, an isolation forest model for unsupervised clustering is screened out from multiple preset machine learning models.

8. A computing device, characterized in that The method comprises 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 method for automatically identifying abnormal EEG signals of epilepsy suitable for personalization as claimed in any one of claims 1 to 5.

9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method for automatically identifying abnormal EEG signals suitable for individualized epilepsy according to any one of claims 1 to 5 when running.

10. A computer program product, comprising a computer program, characterized in that The computer program is configured to execute the method for automatically identifying abnormal epileptic EEG signals suitable for personalization according to any one of claims 1 to 5 when running.

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

  • Epilepsy signal detection method based on channel selection time convolution network

    CN116584893A

  • Epilepsy positioning method, terminal device and storage medium

    CN118750007A

  • Coating composition emitting far infrared radiation

    KR102512561B1

Cited By

  • Electroencephalogram abnormal signal detection method based on step-by-step identification and multi-agent decision

    CN120694664A