Epilepsy signal processing method based on TSCL technology

Through TSCL technology, the temporal and spatial domain characteristics are fused, combined with LASSO and CatBoost classifiers, the problem of high feature dimensions and nonlinear features in epilepsy signal processing is solved, and more accurate epilepsy seizure time and intermittent detection is achieved, which improves diagnosis and treatment assistance capabilities.

CN120458603APending Publication Date: 2025-08-12DALIAN NEUSOFT UNIV OF INFORMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510567446.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art has problems in epilepsy signal processing with excessive feature dimensions, low training efficiency, insufficient model recognition ability of key features, and difficulty in digging out nonlinear features, resulting in inaccurate classification of epilepsy signals and ineffective auxiliary diagnosis and treatment.

Method used

Using a method based on TSCL technology, time domain and airspace features are obtained through statistical feature extraction and co-spatial mode methods, feature fusion and screening are performed, and sparse selection is used for the LASSO method, and finally the CatBoost classifier is used to classify epilepsy features.

Benefits of technology

Generate more comprehensive and more discriminant feature representations, automatically select the most representative features, reduce prediction complexity, improve the accuracy of epilepsy time and interval period, and assist doctors in diagnosis and treatment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120458603A_ABST
    Figure CN120458603A_ABST
Patent Text Reader

Abstract

The invention discloses an epilepsy signal processing method based on a TSCL technology, and the method comprises the steps: S1, obtaining an EEG signal, and carrying out the preprocessing of the EEG signal, and obtaining a processed EEG signal; s2, respectively adopting a statistical feature extraction method and a common spatial pattern method to carry out time domain feature extraction operation and spatial domain feature extraction operation on the basis of the processed EEG signals so as to obtain time domain features and spatial domain features; s3, performing feature fusion to obtain space-time fusion features, and screening the space-time fusion features; and S4, inputting the screened space-time fusion features into a classifier to obtain an epileptic feature classification processing result, and obtaining epileptic seizure time and epileptic seizure intermission based on the epileptic feature classification processing result. According to the method, the features of the time domain and the space domain are fused, so that more comprehensive feature representation with higher discrimination capability can be generated, meanwhile, the most representative features are automatically screened out, redundant and irrelevant features are eliminated, the prediction complexity is reduced, and the generalization capability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of biomedical signal processing, and in particular to an epilepsy signal processing method based on TSCL technology. Background Art

[0002] Epileptic seizures are characterized by sudden and recurring attacks, which may lead to falls, suffocation, and even death in severe cases. Therefore, epileptic seizure detection is crucial for subsequent auxiliary epilepsy warning and treatment. Epileptic seizure detection is mainly based on electroencephalogram (EEG) signals. Traditional methods mainly extract corresponding features from EEG signals based on feature engineering technology, and gradually develop from modeling of a single signal dimension to multimodal and multidimensional feature fusion, and complete detection based on the extracted features. However, the existing technology for processing epileptic signals still has the following problems, resulting in inaccurate classification results of epileptic signals and inability to accurately provide effective reference for subsequent diagnosis and treatment processes, including: First, some methods do not fully consider the redundancy of spatiotemporal features during fusion, resulting in excessively high feature dimensions and low training efficiency; second, in terms of feature selection, most methods do not combine statistical sparsity constraints, resulting in insufficient model recognition of key features, affecting detection performance; third, the classifiers used are generally traditional models such as SVM and KNN, which are difficult to fully explore the nonlinear features in epileptic seizure signals. Summary of the Invention

[0003] The present invention provides an epilepsy signal processing method based on TSCL technology to overcome the technical problem that the existing technology is inaccurate in classifying epilepsy signals and cannot accurately provide an effective reference for subsequent diagnosis and treatment processes.

[0004] In order to achieve the above object, the technical solution of the present invention is:

[0005] An epilepsy signal processing method based on TSCL technology, specifically comprising the following steps:

[0006] S1: Acquire an EEG signal and pre-process the EEG signal to obtain a processed EEG signal;

[0007] S2: Based on the processed EEG signal, the statistical feature extraction method and the common spatial pattern method are used to extract time domain features and spatial domain features respectively to obtain time domain features and spatial domain features;

[0008] S3: performing feature fusion based on the temporal and spatial features to obtain spatiotemporal fusion features, and filtering the spatiotemporal fusion features to obtain filtered spatiotemporal fusion features;

[0009] S4: Inputting the filtered spatiotemporal fusion features into a classifier to obtain an epilepsy feature classification processing result, and obtaining the epilepsy onset time and epilepsy onset interval based on the epilepsy feature classification processing result.

[0010] Furthermore, in S2, a time domain feature extraction operation is performed based on the processed EEG signal using a statistical feature extraction method to obtain the time domain features. The specific steps include:

[0011] S21: Calculate the mean absolute value MAV of the processed EEG signal. The calculation formula of MAV is:

[0012]

[0013] Where x i represents the value of the i-th data sampling point of the EEG signal, and N represents the number of sampling points in a certain time period;

[0014] S22: Calculate the root mean square value (RMS) of the EEG signal. The calculation formula for RMS is:

[0015]

[0016] S23: Calculate the standard deviation SD of the EEG signal. The calculation formula of SD is:

[0017]

[0018] Where, is the mean of the EEG signal;

[0019] S24: Calculate the skewness of the EEG signal. The calculation formula for skewness is:

[0020]

[0021] Where σ is the standard deviation of the EEG signal;

[0022] S25: Calculate the kurtosis of the EEG signal. The calculation formula of Kurtosis is:

[0023]

[0024] Furthermore, in S2, a spatial feature extraction operation is performed based on the processed EEG signal using a common spatial pattern method. The specific steps of obtaining the spatial features include:

[0025] Calculate the covariance matrix of the epileptic seizure and non-seizure EEG signals in the processed EEG signals respectively, and calculate the average value of the covariance matrix of the epileptic seizure and non-seizure EEG signals to obtain the average covariance matrix corresponding to the epileptic seizure and non-seizure EEG signals and

[0026] The average covariance matrix corresponding to epileptic seizure and non-seizure EEG signals and Add together to get the mixed covariance matrix R;

[0027] Perform eigenvalue decomposition on the mixed covariance matrix R to obtain the eigenvector matrix U and the eigenvalue matrix λ. The whitening matrix is constructed based on the eigenvector matrix U and the eigenvalue matrix λ, which is expressed as:

[0028]

[0029] The whitening matrix is used to calculate the average covariance matrix corresponding to the epileptic seizure and non-seizure EEG signals and Perform the transformations respectively to obtain the transformed matrices S1 and S2, which are expressed as:

[0030]

[0031] Perform eigendecomposition on the transformed matrices S1 and S2 respectively to obtain the eigenvalue matrix and eigenvector matrix of S1 and S2, which are expressed as:

[0032]

[0033] Among them, B1 and B2 are eigenvector matrices, Λ1 and Λ2 are eigenvalue diagonal matrices;

[0034] Combine the eigenvalue matrix and eigenvector matrix of S1 and S2 to form matrix B;

[0035] The processed EEG signal is spatially projected through the matrix B to obtain the spatial filter, which is expressed as:

[0036] W=B T P (8)

[0037] Based on the spatial filter, the processed EEG signal is subjected to channel weighted transformation to extract the required spatial features f csp .

[0038] Furthermore, in S3, feature fusion is performed based on the temporal and spatial features to obtain spatiotemporal fusion features, and the spatiotemporal fusion features are screened to obtain the screened spatiotemporal fusion features. The specific steps include:

[0039] Based on the time domain features and spatial domain features, feature fusion is performed to obtain the fusion feature set X fusion ,

[0040] X fusion ∈R n×d , n is the number of fusion feature samples, d is the feature dimension after fusion, X fusion Expressed as:

[0041] X fusion =[MAV, RMS, SD, Skewness, Kurtosis, f csp ] (9)

[0042] The LASSO method is used to perform sparse selection of spatiotemporal fusion features. The objective function of LASSO is defined as follows:

[0043]

[0044] Among them, y i is the label corresponding to the i-th sample, X ij Is based on X fusion The value of the jth feature in the i-th sample, β j is the regression coefficient of the jth feature, and λ is the regularization coefficient;

[0045] After selecting based on the LASSO method, several spatiotemporal fusion features are obtained to determine β j ≠0, the spatiotemporal fusion features are retained, and β j The spatiotemporal fusion features ≠ 0 are used as the filtered spatiotemporal fusion features X selected , X selected ∈R n×p' , where p'<d.

[0046] Furthermore, in S4, the filtered spatiotemporal fusion features are input into a classifier to obtain an epilepsy feature classification processing result, and the specific steps of obtaining the epilepsy onset time and the epilepsy onset interval based on the epilepsy feature classification processing result include:

[0047] Input the filtered spatiotemporal fusion features into the CatBoost classifier;

[0048] Among them, the prediction calculation formula of the CatBoost classifier is:

[0049]

[0050] In the formula, T represents the total number of decision trees, Indicates the final output result; h t(x) is the predicted value of the tth weak classification tree, γ t is the learning rate of each decision tree;

[0051] The CatBoost classifier uses the logarithmic loss function LogLoss as the optimization target, which is expressed as:

[0052]

[0053] Where S is the number of training samples; The probability of predicting an epileptic seizure for the i-th sample; y i is the actual label; N represents the number of sampling points in a certain time period;

[0054] The CatBoost classifier is used to output the classification result of whether each EEG signal segment belongs to the "epileptic seizure" state or the "non-seizure" state;

[0055] By determining the time period of continuous "epileptic seizure" or "non-epileptic seizure" states, the time of epileptic seizures and the interval between seizures can be located.

[0056] Beneficial effects: The present invention uses a statistical feature extraction method and a common spatial pattern method to extract time domain features and spatial domain features from the processed EEG signal, respectively, to obtain time domain features and spatial domain features; performs feature fusion based on the time domain features and spatial domain features to obtain time-space fusion features, and screens the time-space fusion features to obtain screened time-space fusion features; and inputs the screened time-space fusion features into a classifier to obtain epilepsy feature classification processing results. The present invention can generate a more comprehensive and more discriminative feature representation by fusing the features of the time domain and the space domain. At the same time, it integrates feature selection technology and classification technology to automatically screen out the most representative features, eliminate redundant and irrelevant features, reduce the complexity of prediction and improve generalization ability, so as to further obtain more accurate epileptic seizure time and epileptic seizure interval, thereby effectively assisting doctors and other medical personnel in subsequent diagnosis and treatment. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0058] Figure 1 This is a first flow chart of an epilepsy signal processing method based on TSCL technology in the present invention;

[0059] Figure 2is a second flow chart of an epilepsy signal processing method based on TSCL technology in the present invention;

[0060] Figure 3 This is a comparison chart of the effects of different feature selection algorithms in the embodiments of the present invention;

[0061] Figure 4 2 is a comparison chart of the effects of different feature extraction methods in the embodiments of the present invention. DETAILED DESCRIPTION

[0062] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0063] This embodiment provides an epilepsy signal processing method based on TSCL (Spatio-Temporal with Catboost-Lasso) technology, which integrates temporal features, spatial features and channel-level EEG signals, and has stronger pattern recognition capabilities and discrimination robustness. Figure 1 and 2 As shown, the specific steps include:

[0064] S1: Acquire an EEG signal and pre-process the EEG signal to obtain a processed EEG signal;

[0065] Specifically, EEG signals are potential change signals collected from the surface of the scalp through electrodes. Each sampling point records the potential value at a specific moment, which reflects the intensity and pattern of brain neuron activity at that moment.

[0066] In a specific embodiment, the process of preprocessing the EEG signal includes:

[0067] Process missing values in EEG signals and replace NaN (Not a Number) with 0;

[0068] The EEG signal with missing values is filtered by a bandpass filter. The bandpass filter used in this embodiment is a 4th-order Butterworth bandpass filter, which adopts a forward-backward bidirectional filtering method to ensure that the EEG signal has no phase distortion. The filtering range is set to 0.5Hz to 40Hz to remove low-frequency drift and high-frequency electromyographic interference.

[0069] S2: Based on the processed EEG signal, the statistical feature extraction method and the common spatial pattern method are used to extract time domain features and spatial domain features respectively to obtain time domain features and spatial domain features;

[0070] Specifically, in terms of time domain feature extraction, this embodiment adopts a statistical feature extraction method to calculate the statistical quantities such as the mean absolute value, root mean square, standard deviation, skewness and kurtosis of each EEG channel signal respectively; in terms of spatial domain feature extraction, the common spatial pattern (CSP) algorithm is adopted to perform spatial filtering transformation on multi-channel signals to extract spatial domain features with the greatest category discrimination ability.

[0071] In a specific embodiment, in S2, the time domain feature extraction operation is performed based on the processed EEG signal using a statistical feature extraction method to obtain the time domain features. The specific steps include:

[0072] S21: Calculate the mean absolute value MAV of the processed EEG signal. MAV is the average of the absolute values of the signal. It can reflect the average energy level of the EEG signal and is usually used to describe the strength of the signal. The calculation formula of MAV is:

[0073]

[0074] Where x i represents the value of the i-th data sampling point of the EEG signal. N represents the number of sampling points in a certain time period, that is, the total number of times the EEG signal is sampled in this time period. It determines the data range considered when calculating MAV. The more sampling points there are, the more the calculation result can reflect the overall characteristics of the EEG signal in this time period.

[0075] S22: Calculate the root mean square (RMS) value of the EEG signal. RMS is the square root of the signal's variance and is often used to measure the signal's amplitude. It helps capture signal fluctuations, especially in EEG signal analysis. The formula for calculating RMS is:

[0076]

[0077] S23: Calculate the standard deviation (SD) of the EEG signal. SD is used to measure the degree of dispersion or specificity of the data. In EEG signals, the standard deviation can indicate the volatility or instability of the signal and is an important indicator for measuring the range of signal variation. The calculation formula for SD is:

[0078]

[0079] Where, is the mean of the EEG signal.

[0080] S24: Calculate the skewness of the EEG signal. Skewness is a measure of the asymmetry of the data distribution. If the skewness is positive, it means that the signal distribution is right-skewed; if the skewness is negative, it means that the signal distribution is left-skewed. Skewness can reveal the asymmetric characteristics of the signal waveform. The calculation formula for skewness is:

[0081]

[0082] Where σ is the standard deviation of the EEG signal;

[0083] S25: Calculate the kurtosis of the EEG signal. Kurtosis measures the steepness of the signal distribution. A higher kurtosis indicates that the signal distribution is concentrated near the mean and has large fluctuations, while a lower kurtosis indicates that the signal fluctuations are relatively smooth. Kurtosis can reflect the suddenness or sharpness of the signal. The calculation formula for Kurtosis is:

[0084]

[0085] Specifically, the statistical feature extraction method mainly performs statistical calculations on the time series data of each channel to describe the changing characteristics of the EEG signal in the time domain, so as to extract the basic statistical information of the signal, thereby providing a basis for subsequent feature fusion and classification.

[0086] In a specific embodiment, in S2, the spatial feature extraction operation is performed based on the processed EEG signal using a common spatial pattern method to obtain the spatial features. The specific steps include:

[0087] Specifically, spatial feature extraction plays a vital role in EEG signal analysis, which reveals the interactions and network connections between different brain regions by analyzing signals recorded by multiple electrodes.

[0088] Calculate the covariance matrix of the epileptic seizure and non-seizure EEG signals in the processed EEG signals respectively, and calculate the average value of the covariance matrix of the epileptic seizure and non-seizure EEG signals to obtain the average covariance matrix corresponding to the epileptic seizure and non-seizure EEG signals and

[0089] Specifically, the processed EEG signal is multi-channel data with the dimension: [time point × number of channels × number of samples].

[0090] The average covariance matrix corresponding to epileptic seizure and non-seizure EEG signals and Add together to get the mixed covariance matrix R;

[0091] Perform eigenvalue decomposition on the mixed covariance matrix R to obtain the eigenvector matrix U and the eigenvalue matrix λ. The whitening matrix is constructed based on the eigenvector matrix U and the eigenvalue matrix λ, which is expressed as:

[0092]

[0093] The average covariance matrix corresponding to epileptic seizure and non-seizure EEG signals is obtained by whitening the matrix and Perform the transformations respectively to obtain the transformed matrices S1 and S2, which are expressed as:

[0094]

[0095] Perform eigendecomposition on the transformed matrices S1 and S2 respectively to obtain the eigenvalue diagonal matrix and eigenvector matrix of S1 and S2 respectively, so as to highlight the data features, enhance the difference of the signal, and improve the performance of the classifier, which can be expressed as:

[0096]

[0097]

[0098] Among them, B1 and B2 are eigenvector matrices, Λ1 and Λ2 are eigenvalue diagonal matrices;

[0099] According to CSP theory, S1 and S2 satisfy the complementary relationship, and the eigenvalue matrix and eigenvector matrix of S1 and S2 are combined to form matrix B;

[0100] The processed EEG signal is spatially projected through the matrix B to obtain the spatial filter, which is expressed as:

[0101] W=B T P (8)

[0102] Based on the spatial filter, the processed EEG signal is subjected to channel weighted transformation to extract the required spatial features f csp , that is, spatial features with significant distinguishing ability for subsequent classification tasks.

[0103] Specifically, Common Spatial Patterns (CSP) is a two-category spatial feature extraction technology commonly used in BCI and biomedical signal processing. It performs linear transformation based on the spatial distribution of the entire EEG signal (different leads / channels) and can extract the spatial pattern that can best distinguish epileptic seizure / non-seizure states.

[0104] S3: performing feature fusion based on the temporal and spatial features to obtain spatiotemporal fusion features, and filtering the spatiotemporal fusion features to obtain filtered spatiotemporal fusion features;

[0105] In a specific embodiment, in S3, the steps of performing feature fusion based on the temporal and spatial features to obtain spatiotemporal fusion features, and filtering the spatiotemporal fusion features to obtain the filtered spatiotemporal fusion features include:

[0106] Based on the time domain features and spatial domain features, feature fusion is performed to obtain the fusion feature set X fusion ,

[0107] X fusion ∈R n×d , n is the number of fusion feature samples, d is the feature dimension after fusion, X fusion Expressed as:

[0108] X fusion =[MAV, RMS, SD, Skewness, Kurtosis, f csp ] (9)

[0109] In this embodiment, in order to screen the spatiotemporal fusion features and eliminate redundant features, thereby retaining the key information with the most discriminative ability for epileptic states, the LASSO (Least Absolute Shrinkage and Selection Operator) method is used to perform sparse selection on the spatiotemporal fusion features, shrinking the coefficients corresponding to non-critical features (such as non-epileptic seizure interval features) to 0, thereby achieving the effects of feature screening and dimensionality compression. The objective function of LASSO is defined as follows:

[0110]

[0111] Among them, y i is the label corresponding to the i-th sample (epileptic seizure / non-seizure), X ij Is based on X fusion The value of the jth feature in the i-th sample, β j is the regression coefficient of the jth feature, and λ is the regularization coefficient used to control the sparsity strength.

[0112] After the LASSO solution is completed, several spatiotemporal fusion features are obtained. In this embodiment, only the corresponding β j ≠0 of the spatiotemporal fusion features, and β j The spatiotemporal fusion features ≠ 0 are used as the filtered spatiotemporal fusion features X selected , for subsequent input to the classifier, X selected ∈R n×p', where p'<d.

[0113] Specifically, LASSO is a feature selection method commonly used in high-dimensional data analysis. Its core concept is to use an L1 regularized sparse feature screening strategy to reduce the coefficients of some features to zero, thereby effectively eliminating redundant information while retaining key epileptic signal characteristics, achieving the purpose of feature selection. LASSO improves the accuracy and interpretability of predictions by combining the advantages of ridge regression and subset selection. If a group of predictors are highly correlated, LASSO will only select one of them and reduce the others to zero. By reducing some coefficients to zero, it reduces the variability of the estimated values, thereby producing an easily interpretable signal processing model.

[0114] S4: Inputting the filtered spatiotemporal fusion features into a classifier to obtain an epilepsy feature classification processing result, and obtaining the epilepsy onset time and epilepsy onset interval based on the epilepsy feature classification processing result.

[0115] In a specific embodiment, in S4, the filtered spatiotemporal fusion features are input into a classifier to obtain an epilepsy feature classification processing result, and the specific steps of obtaining the epilepsy onset time and the epilepsy onset interval based on the epilepsy feature classification processing result include:

[0116] Input the filtered spatiotemporal fusion features into the CatBoost classifier;

[0117] The CatBoost classifier is used to output the classification result of whether each EEG signal segment belongs to the "epileptic seizure" state (1) or the "non-seizure" state (0);

[0118] By determining the time period of continuous "epileptic seizure" state (1) or "non-epileptic seizure" state (0), the time period of epileptic seizure and the interval between seizures can be located.

[0119] Specifically, in this embodiment, the CatBoost classifier's ability to model complex nonlinear relationships is utilized to improve the accuracy, sensitivity, and specificity of epileptic signal classification, addressing the low recognition rate and poor anti-interference ability of traditional methods. The screened spatiotemporal fusion features are input into a CatBoost classifier to train the CatBoost classifier, and a trained CatBoost classifier is obtained. The trained CatBoost classifier is then used to classify EEG signals into epileptic seizure / non-seizure states. To reduce the randomness of the classification results, the screened spatiotemporal fusion features are randomly divided into a training set and a test set, where 80% of the samples are used as the training set for model training and 20% of the samples are used as the test set for model testing. The entire process is repeated 30 times, and the average values of the classification accuracy, sensitivity, and specificity are calculated as performance evaluation indicators of this method.

[0120] Specifically, the CatBoost classifier can improve the accuracy and stability of EEG signal classification, especially when processing category features and spatiotemporal fusion features. The CatBoost classifier has obvious advantages. Its prediction model is constructed by iteratively accumulating the prediction values of multiple decision trees. The iterative update formula is as follows:

[0121]

[0122] Among them, F t (x) is the cumulative prediction result of the current round t, F t-1 (x) is the predicted value of the previous iteration, h t (x) is the predicted value of the t-th decision tree, γ t is the learning rate of each decision tree, which is used to control the contribution of the new tree.

[0123] The prediction calculation formula of CatBoost classifier is:

[0124]

[0125] Where T represents the total number of decision trees. It represents the final output result, which is used to determine whether each EEG segment is in a seizure state and calculate the classification performance indicators including accuracy, sensitivity, and specificity based on the actual labels.

[0126] To minimize the prediction error, the CatBoost classifier uses the logarithmic loss function LogLoss as the optimization objective, which is expressed as:

[0127]

[0128] Where S is the number of training samples; The probability of predicting an epileptic seizure for the i-th sample; y i is the actual label, i.e. 1 or 0.

[0129] This embodiment forms an epilepsy signal processing method with "TSCL" as the core through the structural combination and sequential coupling of temporal feature statistical analysis, common spatial pattern CSP, LASSO feature selection and CatBoost classifier. Compared with traditional methods that only rely on temporal or spatial features, the method proposed in this embodiment fully integrates the multi-dimensional spatiotemporal characteristics of EEG signals in the feature extraction stage; adopts LASSO constraints in the feature selection stage to ensure feature sparsity and discrimination ability; introduces CatBoost classifier in the classification stage to enhance nonlinear modeling and generalization performance. Through this structural integration method, the method proposed in this embodiment is not only significantly superior to the combination of each single module in terms of accuracy, sensitivity and specificity indicators, but also has a clear hierarchy in data processing logic, and improves the stability and anti-interference ability of epilepsy signal classification, and has good portability and interpretability in actual engineering implementation.

[0130] In order to verify the effectiveness of this method, in this embodiment, LASSO is compared with other feature selection algorithms: the experimental feature of this embodiment selects the spatiotemporal fusion feature of the fusion of time domain and space domain to compare the performance of the three feature selection methods of LASSO, mRMR and PCA in classification average accuracy, average sensitivity and average specificity. The epilepsy feature data is divided into 80% and 20% training sets and test sets, and the classifier is selected as CatBoost classifier. The experimental results are shown in Figure 2. Figure 3 As shown. Figure 3 It can be clearly seen that the LASSO method performs best in all indicators, with the classification accuracy, sensitivity, and specificity reaching 0.9779, 0.9853, and 0.9732, respectively.

[0131] The method proposed in this embodiment is compared with the traditional algorithm: the experimental features of this embodiment respectively select the spatiotemporal fusion feature of the fusion of time domain and space domain, time domain feature and space domain feature, to compare the performance of the three feature extraction methods proposed in this embodiment, TSCL, temporal feature extraction method Temporal and spatial feature extraction method Spatial in terms of average accuracy, average sensitivity and average specificity, divide the epilepsy feature data into 80% and 20% training set and test set, and take the average value of 30 experimental results as the final experimental result. The experimental results are as follows Figure 4 As shown by Figure 4It can be clearly seen that the TSCL method proposed in this example performs best across all indicators, with classification accuracy, sensitivity, and specificity reaching 0.9845, 0.9891, and 0.9707, respectively. The time-domain feature extraction method performed poorly across all indicators, with average accuracy, sensitivity, and specificity of 0.9069, 0.8981, and 0.9252, respectively. Compared with TSCL, the accuracy decreased by 0.0776, the sensitivity decreased by 0.091, and the specificity decreased by 0.0455. This shows that while relying solely on temporal information can capture the dynamic changes of the signal, the lack of description of the spatial distribution limits detection performance. The accuracy, sensitivity, and specificity of the spatial domain feature extraction method were 0.9540, 0.9581, and 0.9572, respectively. Compared with TSCL, the classification accuracy, sensitivity, and specificity decreased by 0.0305, 0.031, and 0.0135, respectively. This indicates that spatial domain feature extraction methods can effectively reflect the regional distribution characteristics of EEG signals, but they are insufficient in capturing the dynamic changes of the signals. In contrast, TSCL performed the best, indicating that by fusing temporal and spatial features, TSCL effectively combines the dynamic changes and regional distribution characteristics of the signal, comprehensively improving the performance of epilepsy signal classification.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An epilepsy signal processing method based on TSCL technology, characterized in that: The specific steps include: S1: Acquire an EEG signal and pre-process the EEG signal to obtain a processed EEG signal; S2: Based on the processed EEG signal, the statistical feature extraction method and the common spatial pattern method are used to extract time domain features and spatial domain features respectively to obtain time domain features and spatial domain features; S3: performing feature fusion based on the temporal and spatial features to obtain spatiotemporal fusion features, and filtering the spatiotemporal fusion features to obtain filtered spatiotemporal fusion features; S4: Inputting the filtered spatiotemporal fusion features into a classifier to obtain an epilepsy feature classification processing result, and obtaining the epilepsy onset time and epilepsy onset interval based on the epilepsy feature classification processing result.

2. The epilepsy signal processing method based on TSCL technology according to claim 1, characterized in that: In S2, a time domain feature extraction operation is performed based on the processed EEG signal using a statistical feature extraction method. The specific steps for obtaining the time domain features include: S21: Calculate the mean absolute value MAV of the processed EEG signal. The calculation formula of MAV is: Where x i represents the value of the i-th data sampling point of the EEG signal, and N represents the number of sampling points in a certain time period; S22: Calculate the root mean square value (RMS) of the EEG signal. The calculation formula for RMS is: S23: Calculate the standard deviation SD of the EEG signal. The calculation formula of SD is: Where, is the mean of the EEG signal; S24: Calculate the skewness of the EEG signal. The calculation formula for skewness is: Where σ is the standard deviation of the EEG signal; S25: Calculate the kurtosis of the EEG signal. The calculation formula of Kurtosis is:

3. The epilepsy signal processing method based on TSCL technology according to claim 2, characterized in that: In S2, the spatial feature extraction operation is performed based on the processed EEG signal using the common spatial pattern method. The specific steps for obtaining the spatial features include: Calculate the covariance matrix of the epileptic seizure and non-seizure EEG signals in the processed EEG signals respectively, and calculate the average value of the covariance matrix of the epileptic seizure and non-seizure EEG signals to obtain the average covariance matrix corresponding to the epileptic seizure and non-seizure EEG signals and The average covariance matrix corresponding to epileptic seizure and non-seizure EEG signals and Add together to get the mixed covariance matrix R; Perform eigenvalue decomposition on the mixed covariance matrix R to obtain the eigenvector matrix U and the eigenvalue matrix λ. The whitening matrix is constructed based on the eigenvector matrix U and the eigenvalue matrix λ, which is expressed as: The whitening matrix is used to calculate the average covariance matrix corresponding to the epileptic seizure and non-seizure EEG signals and Perform the transformations respectively to obtain the transformed matrices S1 and S2, which are expressed as: Perform eigendecomposition on the transformed matrices S1 and S2 respectively to obtain the eigenvalue matrix and eigenvector matrix of S1 and S2, which are expressed as: Among them, B1 and B2 are eigenvector matrices, Λ1 and Λ2 are eigenvalue diagonal matrices; Combine the eigenvalue matrix and eigenvector matrix of S1 and S2 to form matrix B; The processed EEG signal is spatially projected through the matrix B to obtain the spatial filter, which is expressed as: W=B T P (8) Based on the spatial filter, the processed EEG signal is subjected to channel weighted transformation to extract the required spatial features f csp .

4. The epilepsy signal processing method based on TSCL technology according to claim 3, characterized in that: In S3, feature fusion is performed based on the temporal and spatial features to obtain spatiotemporal fusion features, and the spatiotemporal fusion features are filtered. The specific steps of obtaining the filtered spatiotemporal fusion features include: Based on the time domain features and spatial domain features, feature fusion is performed to obtain the fusion feature set X fusion , X fusion ∈R n×d , n is the number of fusion feature samples, d is the feature dimension after fusion, X fusion Expressed as: X fusion =[MAV,RMS,SD,Skewness,Kurtosis,f csp ] (9) The LASSO method is used to perform sparse selection of spatiotemporal fusion features. The objective function of LASSO is defined as follows: Among them, y i is the label corresponding to the i-th sample, X ij Is based on X fusion The value of the jth feature in the i-th sample, β j is the regression coefficient of the jth feature, and λ is the regularization coefficient; After selecting based on the LASSO method, several spatiotemporal fusion features are obtained to determine β j ≠0, the spatiotemporal fusion features are retained, and β j The spatiotemporal fusion features ≠ 0 are used as the filtered spatiotemporal fusion features X selected , X selected ∈R n×p' , where p'<d.

5. The epilepsy signal processing method based on TSCL technology according to claim 4, characterized in that: In S4, the filtered spatiotemporal fusion features are input into a classifier to obtain an epilepsy feature classification processing result, and the specific steps of obtaining the epilepsy onset time and the epilepsy onset interval based on the epilepsy feature classification processing result include: Input the filtered spatiotemporal fusion features into the CatBoost classifier; Among them, the prediction calculation formula of the CatBoost classifier is: In the formula, T represents the total number of decision trees, Indicates the final output result; h t (x) is the predicted value of the tth weak classification tree, γ t is the learning rate of each decision tree; The CatBoost classifier uses the logarithmic loss function LogLoss as the optimization target, which is expressed as: Where S is the number of training samples; The probability of predicting an epileptic seizure for the i-th sample; y i is the actual label; N represents the number of sampling points in a certain time period; The CatBoost classifier is used to output the classification result of whether each EEG signal segment belongs to the "epileptic seizure" state or the "non-seizure" state; By determining the time period of continuous "epileptic seizure" or "non-epileptic seizure" states, the time of epileptic seizures and the interval between seizures can be located.