Electroencephalogram-based automatic seizure detection method, system, device and medium

By combining synchronous learning networks with multi-scale convolution and self-attention modules, the problem of insufficient information utilization in existing epileptic seizure detection methods is solved, achieving more accurate epileptic seizure localization and improved model generalization ability.

CN120531409BActive Publication Date: 2026-01-02SOUTH CHINA UNIV OF TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510621109.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2026-01-02
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

Existing methods for detecting epileptic seizures rely on manual observation of EEG signals, which is time-consuming and highly subjective. Furthermore, existing machine learning methods fail to fully utilize intra- and inter-sample information, resulting in poor model generalization and inaccurate localization results.

Method used

We employ a synchronous learning network-based approach that combines a multi-scale convolutional module, a batch self-attention module, and a curriculum learning strategy. The multi-scale convolutional module extracts multi-scale features of EEG signals, the batch self-attention module captures relationships between samples, and the curriculum learning assists the classifier to improve the model's generalization ability.

Benefits of technology

It improves the accuracy of epileptic seizure detection and the model's generalization ability, effectively mining sample information without introducing additional data, reducing the impact of noise, and enhancing the model's adaptability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120531409B_ABST
    Figure CN120531409B_ABST
Patent Text Reader

Abstract

The application discloses an electroencephalogram-based automatic seizure detection method, system, device and medium. The method comprises the following steps: preprocessing a one-dimensional electroencephalogram signal to be detected of a user to obtain a plurality of electroencephalogram signal sequences, inputting the electroencephalogram signal sequences into a pre-trained synchronous learning network to obtain a classification result, and mapping the classification result back to the one-dimensional electroencephalogram signal to be detected of the user to obtain a time positioning result of a seizure. The synchronous learning network comprises a multi-scale convolution module, a feature extractor, a batch self-attention module and a classification module. The multi-scale convolution module and the batch self-attention module in the synchronous learning network fully utilize the intra-sample and inter-sample information, improve the discriminability of the extracted features without any additional data, have strong generalization, and the positioning result is accurate.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of intelligent medical treatment, and particularly relates to an electroencephalogram-based automatic seizure detection method, system, device and medium. BACKGROUND

[0002] Existing seizure detection is usually based on the experience and knowledge of doctors or relevant experimenters to determine the start and end time of a seizure and understand the characteristics and frequency of seizures of a patient with epilepsy by observing the frequency and amplitude changes of electroencephalogram signals with the naked eye. This method of naked-eye observation is time-consuming and subjective. Therefore, an automatic seizure detection system that can objectively and accurately locate seizures is particularly necessary.

[0003] Many scholars have proposed using machine learning methods to complete the seizure detection task. They divide electroencephalogram signals into several shorter time segments using a sliding window and use methods such as random forest, support vector machine, convolutional neural network and Transformer to classify seizure signals and interictal signals, thereby locating the seizure time. However, many studies ignore the use of rich implicit information in samples to extract comprehensive feature representations. Insufficient information utilization can lead to difficulty in extracting discriminative features of seizures, limited model performance, weak model generalization, and inaccurate positioning results.

[0004] For example, Zhang Cheng et al. disclosed in Chinese Invention Patent CN115359909A a seizure detection system based on an attention mechanism. This scheme focuses on the relationship between channels within a signal sample, but does not fully exploit the information changes of different time scales and fine-grained information within the sample. The extraction of relationships between channels is rough, and because different individuals have different ways of implanting electrodes, the signal amplitude differs, so the features between channels are inherently specific to individuals. Therefore, the extracted features are difficult to have universality and cannot meet the use requirements. SUMMARY

[0005] To at least solve one of the problems existing in the prior art, the present application provides an electroencephalogram-based automatic seizure detection system that accepts the input of electroencephalogram data, uses electroencephalogram signals as the basis for seizure time positioning, and outputs the corresponding time positioning results. To effectively utilize the information in samples, the multi-scale convolution module and batch self-attention module in the synchronous learning network are used to fully utilize the intra-sample and inter-sample information, and to improve the discriminability of the extracted features without any additional data. In addition, an auxiliary classifier based on a curriculum learning strategy is introduced during training to further improve the generalization ability of the model.

[0006] In order to achieve the object of the present application, the present application provides an electroencephalogram-based automatic seizure detection method, which pre-processes a one-dimensional electroencephalogram signal to be detected by a user to obtain a plurality of electroencephalogram signal sequences, inputs the electroencephalogram signal sequences into a pre-trained synchronous learning network to obtain a classification result, and maps the classification result back to the one-dimensional electroencephalogram signal to be detected by the user to obtain a time positioning result of a seizure.

[0007] The synchronous learning network comprises a multi-scale convolution module, a feature extractor, a batch self-attention module and a classification module, the multi-scale convolution module is used for feature extraction of the electroencephalogram signal sequences in multiple time scales and for splicing and fusion of the extracted multi-scale features to obtain fused features, the feature extractor is used for further feature extraction of the fused features, the batch self-attention module comprises a transformer encoder and a splicing layer, the transformer encoder is used for learning the correlation between each sample in each batch based on the output of the feature extractor, capturing common features between different samples, capturing the relationship between samples through a self-attention mechanism, and dynamically adjusting the attention to different samples, and the splicing layer is used for splicing the output features of the feature extractor and the transformer encoder to obtain the output features of the batch self-attention module, and the classification module is used for classifying the output features of the batch self-attention module to obtain a classification result, which is an epileptic signal or a non-epileptic signal.

[0008] Further, the pre-processing comprises: down-sampling the one-dimensional electroencephalogram signal, and then cutting the electroencephalogram signal after the down-sampling to obtain a plurality of electroencephalogram signal sequences.

[0009] Further, the multi-scale convolution module captures the features of the electroencephalogram signal sequences in different time scales through different sizes of convolution kernels.

[0010] Further, the classification module comprises a main classifier, which is used for classifying the output features of the batch self-attention module to obtain a classification result.

[0011] Further, when the synchronous learning network is trained, the classification module further comprises a curriculum learning auxiliary classifier for assisting the training, and a total loss function L of the synchronous learning network training is supervised by an expression of:

[0012] L=L cross-entropy +λL curri

[0013] Wherein, L cross-entropy represents a loss for the main classifier, L curri is a loss of the curriculum learning auxiliary classifier, and λ is a parameter for balancing the two loss terms.

[0014] The expression of the loss of the course learning auxiliary classifier is:

[0015]

[0016] Wherein, k i Indicates the class of the i-th sample, N indicates the batch size, C indicates the number of classes, Indicates the angle between the embedding feature of the i-th sample belonging to the k-th class and the positive class embedding, Indicates the angle between the feature of sample i and the negative class embedding j (j≠k), and r is a scaling parameter for controlling the radius of the embedding feature hypersphere, and m is an angle interval parameter.

[0017] Further, a visualizing step is further included, the original one-dimensional electroencephalogram signal is visualized in the form of a two-dimensional electroencephalogram signal image, and the time positioning result of the epileptic seizure is visualized.

[0018] The application provides an electroencephalogram-based automatic seizure detection system, comprising the following modules:

[0019] A signal preprocessing module is configured to preprocess the original one-dimensional electroencephalogram signal to obtain a plurality of electroencephalogram signal sequences.

[0020] A synchronous learning network module is configured to process the electroencephalogram signal sequences through a synchronous learning network to obtain classification results of the electroencephalogram signal sequences, wherein the synchronous learning network comprises a multi-scale convolution module, a feature extractor, a batch self-attention module and a classification module. The multi-scale convolution module is configured to extract features at multiple time scales from the electroencephalogram signal sequences and splice and fuse the extracted multi-scale features to obtain fused features. The feature extractor is configured to further extract features from the fused features. The batch self-attention module comprises a transformer encoder and a splicing layer. The transformer encoder is configured to learn the correlation between each sample in each batch based on the output of the feature extractor, capture common features between different samples, capture the relationship between the samples through a self-attention mechanism, and dynamically adjust the attention to different samples. The splicing layer is configured to splice the output features of the feature extractor and the transformer encoder to obtain output features of the batch self-attention module. The classification module is configured to classify the output features of the batch self-attention module to obtain classification results, which are either epileptic signals or non-epileptic signals.

[0021] A post-processing module is configured to map the classification results back to the start time and end time of the original one-dimensional electroencephalogram signal to obtain time positioning results of the epileptic seizure.

[0022] Further, the system further comprises a signal acquisition module configured to acquire the original one-dimensional electroencephalogram signal.

[0023] Further, the system further comprises a signal visualization module.

[0024] The application also provides a computer device.

[0025] The application also provides a computer readable storage medium.

[0026] Compared with the prior art, the application can at least achieve the following beneficial effects:

[0027] 1. The multi-scale convolution module is used to fuse the electroencephalogram signal information in each sample at different scales, effectively mine the inherent details, and learn the inherent characteristics of the epilepsy seizure signal or non-epilepsy seizure signal under different time scales, thereby enhancing the model generalization.

[0028] 2. The batch self-attention module is used to extract the relationship between samples in the batch, and the self-attention mechanism is used to capture the relationship between samples, dynamically adjust the attention to different samples, enhance the adaptability and utilization of the synchronous learning network to the information in reliable data, reduce the influence of noise samples such as sudden increase or decrease of signal amplitude caused by unstable electrode connection on the performance of the model, make the model pay more attention to samples with stronger reliability, i.e. signal samples with more universal characteristics, thereby enhancing the model generalization.

[0029] 3. The adopted classifier can make the synchronous learning network gradually learn more and more complex samples by combining the curriculum learning strategy, thereby enhancing the overall generalization ability of the model.

[0030] 4. The user can upload the sample to be detected and view the detection result through the user interaction interface. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 FIG. 1 is a schematic diagram of the module composition of an electroencephalogram-based automatic epilepsy seizure detection system according to an embodiment of the application.

[0032] Figure 2 FIG. 2 is a structural schematic diagram of a synchronous learning network according to an embodiment of the application.

[0033] Figure 3 FIG. 3 is a schematic diagram of an initial interface of a visualization interface according to an embodiment of the application.

[0034] FIG. 4(a) is a schematic diagram of the display of an original electroencephalogram signal in the visualization interface according to an embodiment of the application.

[0035] FIG. 4(b) is a schematic diagram of the display of epilepsy seizure positioning results in the visualization interface according to an embodiment of the application. DETAILED DESCRIPTION

[0036] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work are within the protection scope of the present application.

[0037] Referring to Figure 1 The epilepsy seizure automatic detection method based on electroencephalogram signals provided by the embodiments of the present application comprises the following steps:

[0038] Step 1: Obtain the original one-dimensional electroencephalogram signal.

[0039] Step 2: Preprocess the original one-dimensional electroencephalogram signal information to obtain a plurality of electroencephalogram signal sequences.

[0040] In one of the embodiments of the present application, the preprocessing comprises:

[0041] Step 2.1: Downsample the original one-dimensional electroencephalogram signal to meet the input requirements of the synchronous learning network.

[0042] Step 2.2: Cut the electroencephalogram signal after down sampling into shorter time segments to obtain a plurality of electroencephalogram signal sequences.

[0043] The one-dimensional electroencephalogram signal is cut into a plurality of electroencephalogram signal sequences by moving a sliding window from the initial position of the one-dimensional electroencephalogram signal to the time increasing direction. In one of the embodiments of the present application, the specific way of signal cutting is as follows: a sliding window with a window size of 3 seconds and a step size of 0.5 seconds is used to move from the initial position of the electroencephalogram signal to the time increasing direction. In this way, each electroencephalogram signal is cut into a plurality of electroencephalogram signal sequences with a length of 3 seconds, which are used as the input of the synchronous learning network. During training, each 3-second electroencephalogram signal sequence is classified, and the label information is fed back to supervise the training of the synchronous learning network. During testing, all 3-second electroencephalogram signal sequences of each patient are classified, and the positioning results are displayed on the user interface.

[0044] Step 3: Input the electroencephalogram signal sequence into the synchronous learning network to obtain the classification result of the electroencephalogram signal sequence, which is a seizure signal or a non-seizure signal.

[0045] Step 4: Map the classification result back to the start time and end time of the original one-dimensional electroencephalogram signal to obtain the time positioning result of the seizure.

[0046] In one of the embodiments of the present application, a visualization step is further included, which visualizes the original one-dimensional electroencephalogram signal in the form of a two-dimensional electroencephalogram signal image, and visualizes the time positioning result of the epileptic seizure.

[0047] The embodiment of the present application further provides an automatic detection method of epileptic seizure based on electroencephalogram signals, which comprises the following modules:

[0048] A signal acquisition module is configured to acquire an original one-dimensional electroencephalogram signal.

[0049] A signal preprocessing module is configured to preprocess the original one-dimensional electroencephalogram signal information to obtain a plurality of electroencephalogram signal sequences.

[0050] A synchronous learning network module is configured to process the electroencephalogram signal sequences through a synchronous learning network to obtain classification results of the electroencephalogram signal sequences.

[0051] A post-processing module is configured to map the classification results back to the start time and end time of the original one-dimensional electroencephalogram signal to obtain a time positioning result of the epileptic seizure.

[0052] A signal visualization module comprises a visualization interface, which is configured to perform a visualization operation on the original one-dimensional electroencephalogram signal, and display a two-dimensional electroencephalogram signal image in the visualization interface on the left side of the system, and display the time positioning result of the epileptic seizure in the visualization interface.

[0053] The signal visualization module displays the original one-dimensional electroencephalogram signal in the form of a two-dimensional image in the user interface (visualization interface), and the user can directly input the desired frequency after downsampling in the visualization interface.

[0054] The synchronous learning network comprises a multi-scale convolution module, a feature extractor, a batch self-attention module and a classification module which are stacked.

[0055] The input, i.e., the electroencephalogram signal sequence, enters the multi-scale convolution module, the multi-scale convolution module extracts features at multiple time scales from the electroencephalogram signal sequence and fuses the extracted multi-scale features to obtain fused features.

[0056] The multi-scale convolution module captures features of the electroencephalogram signal sequence at different time scales through convolution kernels of different sizes. Figure 2, the first convolution module includes one 1x1 convolution layer; the second convolution module includes one 1x1 convolution layer and one 1x31 convolution layer; the third convolution module includes one 1x1 convolution layer and one 1x51 convolution layer; and the fourth convolution module includes one 1x31 pooling layer and one 1x1 convolution layer. Different convolution kernel sizes are selected to capture features of the electroencephalogram signal sequence at different time scales, and then the features are spliced and fused to input the downstream feature extractor for further feature extraction. The number of convolution modules is not limited to four, and in other embodiments, the number can be set to other numbers as needed.

[0057] The fused features enter the feature extractor for further feature extraction, and the feature extractor includes a plurality of convolution layers stacked.

[0058] The output features of the feature extractor enter the batch self-attention module for further processing. The batch self-attention module includes a transformer encoder and a splicing layer. Each sample in a batch is input into the transformer encoder as a sequence. The transformer encoder learns the correlation between samples in a batch and captures common features between different samples. The transformer encoder captures the relationship between samples through the self-attention mechanism and dynamically adjusts the attention to different samples, so that the synchronous learning network can pay more attention to the sample features with universality and reliability. For samples belonging to the same category, the transformer encoder captures the common features between different samples, which helps the synchronous learning network to capture the shared features (common features) within the category. For samples of different categories, the captured shared features between different categories can make the synchronous learning network aware of the shared attributes in the data set. This way of capturing commonality within and between categories can help improve the discriminability of the synchronous learning network for different categories. The splicing layer splices the output features of the feature extractor and the transformer encoder to obtain the output features of the batch self-attention module.

[0059] The output features of the batch self-attention module are input into the classification module for classification to obtain a classification result, which is an epilepsy signal or a non-epilepsy signal.

[0060] In one of the embodiments of the present application, the classification module comprises a main classifier, which is a Softmax classifier, and the output features of the batch self-attention module are input into the Softmax classifier to obtain the classification result. In other embodiments, the Softmax classifier can also be replaced by other classifiers, such as a Sigmoid classifier.

[0061] In one of the embodiments of the present application, the classification module further comprises a curriculum learning auxiliary classifier. During training, the classifier comprises the curriculum learning auxiliary classifier and the Softmax classifier, and the classification task is completed by the curriculum learning auxiliary classifier and the Softmax classifier together. The two classifiers respectively predict the output features of the batch self-attention module to obtain the classification result. The Softmax classifier is to make the distribution of the predicted result and the actual result close in the feature space, while the curriculum learning auxiliary classifier is to make the distance interval between different samples large on the hypersphere. The curriculum learning auxiliary classifier participates in the work during the training process of the synchronous learning network to assist the training, and only the Softmax classifier participates in the work during the test stage and the actual detection application stage.

[0062] During training, the Softmax classifier is supervised by the cross-entropy loss. The loss function of the curriculum learning auxiliary classifier is:

[0063]

[0064] wherein L curri is the loss of the curriculum learning auxiliary classifier, k i represents the class of the i-th sample, N represents the batch size, and C represents the number of classes, represents the angle between the embedding feature of the i-th sample belonging to the k-th class and the positive class embedding, represents the angle between the feature of the sample i and its negative class embedding j (j≠k), r is a scaling parameter for controlling the radius of the embedding feature hypersphere, and m is an angle interval parameter for helping the synchronous learning network to learn to reduce the value of When , When ,

[0065] In the weight matrix of the curriculum learning auxiliary classifier, the weight vector that can correctly activate the output label is defined as the positive class embedding, and the remaining vectors are defined as the negative class embedding.

[0066] During the training process, the synchronous learning network first judges whether each sample is a difficult sample, and then assigns different weights to the difficult samples and the simple samples: the weight of the difficult sample is (t+cosθ j), while the weight of simple samples is 1. Specifically, t is an adjustment parameter, whose initial value is 0 and gradually increases with the increase of the number of training iterations:

[0067] t n = a r n + (1 - a) t n-1

[0068] where n represents the current iteration step, t n represents the value of the adjustment parameter t at the nth iteration, a is a hyperparameter (in one embodiment of the present application, a is set to 0.01), and r n represents the average cosine similarity between the sample embedding features in the batch and their positive class embeddings in the nth iteration. In the early stage of training, since the value of t is small, (t + cos θ j ) < 1, so the weight of difficult samples is lower than that of simple samples. As the training proceeds, the discrimination ability of the synchronous learning network is enhanced, r n increases, (t + cos θ j ) also increases and exceeds 1, so that the weight of difficult samples gradually increases, and the synchronous learning network begins to pay more attention to these difficult samples.

[0069] The total loss function L used for training the supervised synchronous learning network is as follows:

[0070] L = L cross-entropy + l L curri

[0071] where L cross-entropy represents the cross-entropy loss for the Softmax classifier, and l is a parameter for balancing the two loss terms.

[0072] In the test phase, i.e. the inference phase of the synchronous learning network, the signal passes through the multi-scale convolution module, the feature extractor, the batch self-attention module, and then passes through the Softmax classifier to predict the final classification result. Finally, the prediction result is returned to the user through the visualization interface.

[0073] If the classification results are to be mapped back to the start time and end time of the whole, the results of all the electroencephalogram sequences also need to be post-processed by the post-processing module. Specifically, each electroencephalogram sequence is judged as an epilepsy signal or a non-epilepsy signal, and the post-processing module traverses according to the start and end time of the electroencephalogram sequence. If there are time-continuous electroencephalogram sequences that are judged as epilepsy signals, the start time of the first identified epilepsy signal is defined as the start time of the epilepsy, and the end time of the last identified epilepsy signal in this segment is the end time of the epilepsy seizure in this segment. If the end time of the previous epilepsy signal and the start time of the next epilepsy do not exceed a preset time (in one embodiment of the present application, the preset time is 2 seconds), the two signals can still be combined, and the time interval without being judged as an epilepsy signal is ignored. If an independent epilepsy signal seizure segment appears (in one embodiment of the present application, if the first 2 seconds and the last 2 seconds of a signal do not exist other epilepsy seizure segments, the segment is judged as an independent epilepsy signal seizure segment), and does not coincide with other epilepsy signals, it is considered that the segment is misjudged by the classification system, and the independent segment is not considered as an epilepsy seizure signal.

[0074] In one embodiment of the present application, the original electroencephalogram signal of the patient (as shown in FIG. 4(a)) is input into the synchronous learning network after preprocessing, and the positioning result obtained is as shown in FIG. 4(b). In the figure, the black curve represents a non-epilepsy signal, and the yellow curve represents an epilepsy signal.

[0075] The original one-dimensional electroencephalogram signal can also be down-sampled according to the sampling frequency input by the user to meet the input requirements of the synchronous learning network. After the signal is subjected to the corresponding preprocessing operation, the signal is input into the synchronous learning network for feature extraction and classification operation. Finally, the system can directly display the start and end time of the epilepsy seizure detection and positioning of the input electroencephalogram signal by the synchronous learning network.

[0076] In one embodiment of the present application, Figure 3For the initial schematic diagram of the visualization interface, when the detection is specifically performed, the "open file" button can be clicked to pop up a dialog box for the user to select a file in the computer, after the signal file storing the original one-dimensional electroencephalogram signal is selected, the file path is displayed in the text box, and the "load signal" is clicked. The corresponding electroencephalogram signal will be displayed in the left area of the interface, the horizontal axis is time, and the vertical axis represents the voltage value of the collected signal. Clicking "clear signal" can clear the display content of the interface. Then the user inputs the sampling frequency of the signal, and clicks the "OK" button, and the system automatically performs the downsampling operation on the signal, which facilitates the subsequent signal processing of the synchronous learning network. If the input is incorrect after clicking "OK", the "reset" button can be clicked, and then the input frequency can be re-input. After the input frequency is determined, "start analysis" is clicked, and the synchronous learning network first displays the signal reading progress in the progress bar after reading the progress. When the progress bar reaches 100%, the analysis progress bar starts to display, and when the analysis progress bar displays 100% completion, the result interface displays the starting and ending time of the positioned epileptic seizure. Clicking the corresponding time display, the left signal interface will jump to the corresponding time interval, displaying the corresponding signal segment. The time segment positioned as epilepsy is marked with a different color. If it is desired to terminate the signal during this process, the "terminate analysis" button is clicked, and the system stops the analysis. Figure 4(a) shows the picture of the visualization interface displaying the original electroencephalogram signal after loading the signal, and figure 4(b) shows the positioning result of the epileptic seizure after the signal passes through the synchronous learning network and the post-processing module. The user clicks on the right lower corner of a positioning result that needs to be observed, and the left signal visualization interface displays the corresponding time electroencephalogram signal, wherein the black line is the non-epilepsy signal, and the yellow line represents the positioned epilepsy signal.

[0077] In one of the embodiments of the present application, a computer device is further provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the foregoing embodiments when executing the computer program.

[0078] In one of the embodiments of the present application, a computer readable storage medium is further provided, which stores a computer program, and the computer program is executable on a processor to implement the method of the foregoing embodiments.

[0079] Compared with the existing technology, the embodiment of the present application has the advantage that without introducing additional data, a stable synchronous learning network classification effect can be obtained by fully mining sample information, such as learning the rich implicit information within and between samples.

[0080] The application provides an electroencephalogram-based seizure automatic detection system, which can fully mine implicit information in samples through a synchronous learning network, and improves the accuracy of seizure automatic detection. The existing seizure automatic detection methods ignore the rich information hidden in samples, and they usually introduce additional sample quantity to increase the richness of the synchronous learning network learning, which will cause the risk of introducing noise or overfitting. The application realizes cross-scale and context electroencephalogram signal synchronous learning through the use of a synchronous learning network. The synchronous learning network can effectively extract discriminant features by utilizing the inherent information of each sample and multiple samples, without additional data.

[0081] The above description of disclosed embodiments enables one of ordinary skill in the art to make or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An automated method for detecting epileptic seizures based on electroencephalography (EEG), characterized in that, The user's one-dimensional EEG signal to be tested is preprocessed to obtain multiple EEG signal sequences. The EEG signal sequences are then input into a pre-trained synchronous learning network to obtain classification results. The classification results are then mapped back to the user's one-dimensional EEG signal to obtain the temporal localization results of the epileptic seizure. The synchronous learning network includes a multi-scale convolutional module, a feature extractor, a batch processing self-attention module, and a classification module. The multi-scale convolutional module extracts features from the EEG signal sequence at multiple time scales and then concatenates and fuses the extracted multi-scale features to obtain fused features. The feature extractor further extracts features from the fused features. The batch processing self-attention module includes a transformer encoder and a concatenation layer. The transformer encoder learns the correlation between samples in each batch based on the output of the feature extractor, captures common features between different samples, captures the relationship between samples through a self-attention mechanism, and dynamically adjusts the attention to different samples. The concatenation layer concatenates the output features of the feature extractor and the output of the transformer encoder to obtain the output features of the batch processing self-attention module. The classification module classifies the output features of the batch processing self-attention module to obtain a classification result, which is either an epileptic signal or a non-epilepsy signal. When training the synchronous learning network, the classification module includes a course learning auxiliary classifier for assisting training, and a total loss function to supervise the training of the synchronous learning network. The expression is: in, This represents the loss used for the main classifier. The loss of the classifier that assists in learning the course. The parameters are used to balance the two loss terms; The expression for the loss of the course learning auxiliary classifier is: in, Indicates the first The categories of each sample, Indicates batch size, Indicates the number of categories. Indicates the first The one belonging to the first The angle between the sample embedding features of the class and the positive class embedding. Indicates sample Features and negative class embeddings The included angle, ≠ , It is a scaling parameter used to control the radius of the embedded feature hypersphere. It is an angular interval parameter.

2. The automatic detection method for epileptic seizures based on electroencephalography according to claim 1, characterized in that, The preprocessing includes: downsampling the one-dimensional EEG signal, and then segmenting the downsampled EEG signal to obtain several EEG signal sequences.

3. The automatic detection method for epileptic seizures based on electroencephalography according to claim 1, characterized in that, The multi-scale convolution module captures features of EEG signal sequences at different time scales using convolution kernels of different sizes.

4. The automatic detection method for epileptic seizures based on electroencephalography according to claim 1, characterized in that, The classification module also includes a master classifier, which is used to classify the output features of the batch self-attention module to obtain the classification result.

5. The automatic detection method for epileptic seizures based on electroencephalography according to any one of claims 1-4, characterized in that, It also includes a visualization step, which visualizes the original one-dimensional EEG signal as a two-dimensional EEG signal image and visualizes the temporal localization results of the epileptic seizure.

6. An automatic seizure detection system based on electroencephalography (EEG), characterized in that, To implement the method of any one of claims 1-5, the system comprises the following modules: a signal preprocessing module, used to preprocess the original one-dimensional EEG signal to obtain several EEG signal sequences; A synchronous learning network module is used to process EEG signal sequences and obtain classification results. The synchronous learning network includes a multi-scale convolution module, a feature extractor, a batch processing self-attention module, and a classification module. The multi-scale convolution module extracts features from the EEG signal sequences at multiple time scales and then concatenates and fuses the extracted multi-scale features to obtain fused features. The feature extractor further extracts features from the fused features. The batch processing self-attention module includes a transformer encoder and a concatenation layer. The transformer encoder learns the correlation between samples in each batch based on the output of the feature extractor, captures common features between different samples, and captures the relationship between samples through a self-attention mechanism, dynamically adjusting the attention to different samples. The concatenation layer concatenates the output features of the feature extractor and the output of the transformer encoder to obtain the output features of the batch processing self-attention module. The classification module classifies the output features of the batch processing self-attention module to obtain a classification result, which is either an epileptic signal or a non-epilepsy signal. The post-processing module is used to map the classification results back to the start and end times of the original one-dimensional EEG signal to obtain the temporal localization results of the epileptic seizure.

7. The automatic detection system for epileptic seizures based on electroencephalography according to claim 6, characterized in that, The system also includes a signal acquisition module for acquiring raw one-dimensional EEG signals.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 5.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Epileptic seizure detection system based on attention mechanism

    CN115359909A

  • Human face identification method

    CN108446689A

  • Speaker identification method

    CN111724794A