Epilepsy time-frequency joint feature extraction and detection method based on covariance decomposition
Through the time-frequency joint feature extraction method based on covariance decomposition, the time-frequency multi-scale feature information is fused, and the problem of failure to effectively extract and fuse multi-scale features in the prior art is solved, and more efficient epilepsy detection and labeling efficiency is achieved.
Patent Information
- Application Number
- CN202411761119.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Existing epilepsy detection methods usually only extract feature information at a single scale, and fail to effectively integrate feature information in time-frequency multi-scale space, limiting the improvement of epilepsy detection performance.
The time-frequency joint feature extraction method based on covariance decomposition is adopted to extract and fuse time-frequency multi-scale feature information through data preprocessing, time-domain feature extraction, frequency-domain feature extraction, feature fusion and classification recognition steps.
It effectively shortens the time for manual data labeling for medical workers, improves the efficiency of labeling epilepsy events, and provides new ways and new methods for the clinical application of epilepsy detection.
Smart Images

Figure CN119856904A_ABST
Abstract
Description
Background Art
[0002] Epilepsy is a chronic non-communicable disease caused by abnormal paroxysmal hypersynchronous electrical activity of brain neurons. It is one of the most common neurological diseases in the world. Accurate detection of epileptic seizures is a prerequisite for providing diagnosis and treatment for patients. The gold standard for traditional epilepsy detection is to manually annotate the EEG data collected from long-term epilepsy patients based on the experience of medical workers. However, due to the randomness of epileptic seizure time and the uncertainty of seizure duration, traditional detection methods require a lot of time and energy from medical workers. In order to overcome the limitations of traditional diagnostic methods and improve diagnostic efficiency, the use of machine learning or deep learning methods to study epilepsy detection methods has become one of the research hotspots.
[0003] Epilepsy detection includes epilepsy onset detection (SOD) and epilepsy event detection (SED). Among them, SOD refers to marking the start time of epilepsy with the shortest possible delay and describing the duration during continuous EEG monitoring, which can provide clinical reference for locating epileptogenic focus. SED refers to identifying epilepsy seizure signals as accurately as possible from multiple EEG signals. It can be used in clinical scenarios such as EEG data annotation to reduce the burden on medical workers and has important theoretical significance and practical application value. For SED, researchers extract epilepsy features from four aspects: time domain, frequency domain, time-frequency domain, and nonlinear methods. Many feature extraction methods have been developed, such as amplitude, zero-crossing rate, sample entropy, etc., which expand epilepsy detection methods. However, existing research methods usually extract feature information of a single dimension (such as time domain), but do not extract and fuse feature information contained in different scale spaces, which limits the further improvement of epilepsy detection performance.
[0004] Therefore, one or more methods are needed to solve the above problems.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a method, device, electronic device and computer-readable storage medium for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition, thereby overcoming one or more problems caused by the limitations and defects of related technologies at least to a certain extent.
[0007] According to one aspect of the present disclosure, a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is provided, comprising:
[0008] A data preprocessing step is to perform data preprocessing on the collected EEG data to generate EEG data of multiple data segments;
[0009] In the time domain feature extraction step, the EEG data of multiple data segments that have undergone data preprocessing are decentralized and then the covariance matrix, eigenvalue decomposition, feature extraction and stretching processing are calculated to generate a time domain feature vector;
[0010] The frequency domain feature extraction step is to extract the spectrum feature and the frequency domain covariance feature of the EEG data of the multiple data segments after data preprocessing, and generate the spectrum feature vector and the frequency domain covariance feature vector respectively;
[0011] A feature fusion step, based on a preset feature fusion strategy, fuses the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain to generate a time-frequency joint feature;
[0012] The classification and recognition step classifies and recognizes the time-frequency joint features based on a preset binary classification recognition method to complete epilepsy prediction.
[0013] In an exemplary embodiment of the present disclosure, the data preprocessing step of the method further includes:
[0014] The collected EEG data is preprocessed by filtering, downsampling, data segmentation, baseline correction, and artifact removal to generate EEG data with multiple data segments.
[0015] In an exemplary embodiment of the present disclosure, the time domain feature extraction step of the method further includes:
[0016] The EEG data of multiple data segments that have undergone data preprocessing are decentralized and the covariance matrix is calculated;
[0017] Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector;
[0018] Performing feature concatenation on the feature vectors to generate a feature concatenation matrix;
[0019] The feature concatenation matrix is stretched in one dimension to obtain a time domain feature vector.
[0020] In an exemplary embodiment of the present disclosure, the method further includes:
[0021] Sorting the eigenvectors in descending order based on the eigenvalues corresponding to the eigenvectors;
[0022] multiplying the eigenvector by the eigenvalue corresponding to the eigenvector;
[0023] The multiplied eigenvectors are concatenated to generate a feature concatenation matrix.
[0024] In an exemplary embodiment of the present disclosure, the frequency domain feature extraction step of the method further includes:
[0025] Fast Fourier transform of each segment and each lead of the EEG data of multiple data segments that have been preprocessed respectively to generate a spectrum response amplitude;
[0026] Performing logarithmic operation on the spectrum response amplitude;
[0027] The spectrum response amplitude subjected to logarithmic operation is characteristically stretched to generate a spectrum feature vector.
[0028] In an exemplary embodiment of the present disclosure, the method further includes:
[0029] The spectrum response amplitudes subjected to logarithmic operation are subjected to covariance calculation, covariance decomposition, feature concatenation and feature stretching processing respectively to generate covariance feature vectors in the frequency domain.
[0030] In an exemplary embodiment of the present disclosure, the classification and identification step of the method further includes:
[0031] According to a preset binary classification recognition method and based on a preset threshold, the time-frequency joint features are classified and recognized to complete epilepsy prediction.
[0032] In one aspect of the present disclosure, a device for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is provided, comprising:
[0033] A data preprocessing module is used to perform data preprocessing on the collected EEG data to generate EEG data of multiple data segments;
[0034] The time domain feature extraction module is used to decentralize the EEG data of multiple data segments after data preprocessing, calculate the covariance matrix, eigenvalue decomposition, feature extraction and stretching, and generate the time domain feature vector;
[0035] The frequency domain feature extraction module is used to extract spectrum features and frequency domain covariance features of the EEG data of multiple data segments that have undergone data preprocessing, and generate spectrum feature vectors and frequency domain covariance feature vectors respectively;
[0036] A feature fusion module, used to fuse the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain based on a preset feature fusion strategy to generate a time-frequency joint feature;
[0037] The classification and recognition module classifies and recognizes the time-frequency joint features based on a preset binary classification recognition method to complete epilepsy prediction.
[0038] In one aspect of the present disclosure, there is provided an electronic device, comprising:
[0039] Processor; and
[0040] A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of the above items.
[0041] In one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the above items is implemented.
[0042] In an exemplary embodiment of the present disclosure, a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is disclosed, wherein the method includes: performing data preprocessing on the collected EEG data to generate EEG data of multiple data segments; performing decentralization on the EEG data of multiple data segments that have undergone data preprocessing, respectively, and then calculating the covariance matrix, eigenvalue decomposition, feature extraction and stretching processing to generate time domain feature vectors; performing spectrum feature extraction and frequency domain covariance feature extraction on the EEG data of multiple data segments that have undergone data preprocessing, respectively, to generate spectrum feature vectors and covariance feature vectors of the frequency domain; based on a preset feature fusion strategy, the time domain feature vector, the spectrum feature vector, and the covariance feature vector of the frequency domain are fused to generate time-frequency joint features; based on a preset binary classification recognition method, the time-frequency joint features are classified and recognized to complete epilepsy prediction. The present disclosure can effectively shorten the manual data annotation time of medical workers and improve the annotation efficiency of epileptic seizure events by extracting and fusing time-frequency multi-scale feature information, thereby providing a new approach and method for the clinical application of epilepsy detection.
[0043] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The above and other features and advantages of the present disclosure will become more apparent by describing in detail example embodiments thereof with reference to the attached drawings.
[0045] Figure 1 A flowchart of a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition according to an exemplary embodiment of the present disclosure is shown;
[0046] Figure 2 A block diagram of a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition according to an exemplary embodiment of the present disclosure is shown;
[0047] Figure 3A structural block diagram of a device for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition according to an exemplary embodiment of the present disclosure is shown;
[0048] Figure 4 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;
[0049] Figure 5 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0050] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0051] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, materials, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0052] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0053] In this exemplary embodiment, a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is first provided; Figure 1 As shown in , the epilepsy time-frequency joint feature extraction and detection method based on covariance decomposition may include the following steps:
[0054] Data preprocessing step S110, performing data preprocessing on the collected EEG data to generate EEG data of multiple data segments;
[0055] In a time domain feature extraction step S120, the EEG data of the multiple data segments that have undergone data preprocessing are decentralized and then the covariance matrix, eigenvalue decomposition, feature extraction and stretching are calculated to generate a time domain feature vector;
[0056] The frequency domain feature extraction step S130 is to extract the spectrum feature and the frequency domain covariance feature of the EEG data of the multiple data segments after data preprocessing, and generate the spectrum feature vector and the frequency domain covariance feature vector respectively;
[0057] The feature fusion step S140 is to fuse the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain based on a preset feature fusion strategy to generate a time-frequency joint feature;
[0058] In the classification and identification step S150, based on a preset binary classification identification method, the time-frequency joint feature is classified and identified to complete epilepsy prediction.
[0059] In an exemplary embodiment of the present disclosure, a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is disclosed, wherein the method includes: performing data preprocessing on the collected EEG data to generate EEG data of multiple data segments; performing decentralization on the EEG data of multiple data segments that have undergone data preprocessing, respectively, and then calculating the covariance matrix, eigenvalue decomposition, feature extraction and stretching processing to generate time domain feature vectors; performing spectrum feature extraction and frequency domain covariance feature extraction on the EEG data of multiple data segments that have undergone data preprocessing, respectively, to generate spectrum feature vectors and covariance feature vectors of the frequency domain; based on a preset feature fusion strategy, the time domain feature vector, the spectrum feature vector, and the covariance feature vector of the frequency domain are fused to generate time-frequency joint features; based on a preset binary classification recognition method, the time-frequency joint features are classified and recognized to complete epilepsy prediction. The present disclosure can effectively shorten the manual data annotation time of medical workers and improve the annotation efficiency of epileptic seizure events by extracting and fusing time-frequency multi-scale feature information, thereby providing a new approach and method for the clinical application of epilepsy detection.
[0060] Next, a method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition in this exemplary embodiment will be further described.
[0061] Embodiment 1:
[0062] In this exemplary embodiment,
[0063] In the data preprocessing step S110, the collected EEG data may be preprocessed to generate EEG data of multiple data segments.
[0064] In the embodiment of this example, the data preprocessing step of the method further includes:
[0065] The collected EEG data is preprocessed by filtering, downsampling, data segmentation, baseline correction, and artifact removal to generate EEG data with multiple data segments.
[0066] In the time domain feature extraction step S120, the EEG data of multiple data segments that have undergone data preprocessing may be decentralized and then subjected to calculation of covariance matrix, eigenvalue decomposition, feature extraction and stretching processing to generate a time domain feature vector.
[0067] In the embodiment of this example, the time domain feature extraction step of the method further includes:
[0068] The EEG data of multiple data segments that have undergone data preprocessing are decentralized and the covariance matrix is calculated;
[0069] Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector;
[0070] Performing feature concatenation on the feature vectors to generate a feature concatenation matrix;
[0071] The feature concatenation matrix is stretched in one dimension to obtain a time domain feature vector.
[0072] In the embodiment of this example, the method further includes:
[0073] Sorting the eigenvectors in descending order based on the eigenvalues corresponding to the eigenvectors;
[0074] multiplying the eigenvector by the eigenvalue corresponding to the eigenvector;
[0075] The multiplied eigenvectors are concatenated to generate a feature concatenation matrix.
[0076] In the frequency domain feature extraction step S130, the EEG data of the multiple data segments that have undergone data preprocessing may be subjected to spectrum feature extraction and frequency domain covariance feature extraction to generate spectrum feature vectors and frequency domain covariance feature vectors, respectively.
[0077] In the embodiment of this example, the frequency domain feature extraction step of the method further includes:
[0078] Fast Fourier transform of each segment and each lead of the EEG data of multiple data segments that have been preprocessed respectively to generate a spectrum response amplitude;
[0079] Performing logarithmic operation on the spectrum response amplitude;
[0080] The spectrum response amplitude subjected to logarithmic operation is characteristically stretched to generate a spectrum feature vector.
[0081] In the embodiment of this example, the method further includes:
[0082] The spectrum response amplitudes subjected to logarithmic operation are subjected to covariance calculation, covariance decomposition, feature concatenation and feature stretching processing respectively to generate covariance feature vectors in the frequency domain.
[0083] In the feature fusion step S140, the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain may be fused based on a preset feature fusion strategy to generate a time-frequency joint feature.
[0084] In the classification and identification step S150, the time-frequency joint features may be classified and identified based on a preset binary classification identification method to complete epilepsy prediction.
[0085] In the embodiment of this example, the classification and identification step of the method further includes:
[0086] According to a preset binary classification recognition method and based on a preset threshold, the time-frequency joint features are classified and recognized to complete epilepsy prediction.
[0087] Embodiment 2:
[0088] In this exemplary embodiment, if Figure 2 As shown, the epilepsy time-frequency joint feature extraction and detection method based on covariance matrix decomposition disclosed in the present invention includes five steps: data preprocessing, time domain feature extraction, frequency domain feature extraction, feature fusion, and classification recognition. Its technical process is to first perform preprocessing operations such as downsampling and filtering on the collected original EEG data (both implantable and non-implantable), and then calculate the time domain covariance matrix and frequency domain covariance matrix respectively based on the correlation between multi-channel epilepsy data, and then perform matrix decomposition to extract the corresponding time domain features and frequency domain features, and then perform time-frequency multi-scale feature fusion at the feature level, and finally use classification recognition methods to realize the classification and recognition of epileptic seizure events. This invention designs a new epilepsy feature extraction method, which extracts and fuses time-frequency multi-scale feature information, can effectively shorten the manual data annotation time of medical workers, improve the annotation efficiency of epileptic seizure events, and provide new ways and methods for the clinical application of epilepsy detection.
[0089] In the embodiment of this example, the data preprocessing step includes:
[0090] The main purpose of preprocessing is to reduce the impact of noise and improve the quality of EEG signals, including filtering, downsampling, data segmentation, baseline correction, artifact removal and other steps. Filtering is to remove data in certain frequency ranges by adopting filters that meet specific requirements, so as to improve the data signal-to-noise ratio in the frequency band of interest. According to the different frequencies to be filtered and retained, it can be divided into low-pass, high-pass, band-pass and notch filters. Downsampling is to reduce the data sampling rate, which has the effect of reducing the amount of calculation and improving the operation speed. Generally, before data downsampling, the data will be input into a low-pass filter (also called an anti-aliasing filter) to suppress the high-frequency components in the signal to prevent aliasing. Data segmentation refers to intercepting continuous EEG data according to the time of the stimulus event, and then dividing it into several segments of equal length for subsequent feature analysis. Baseline correction is to subtract the baseline value of the data segment from each segmented data point. Generally, the mean value of the data within a period of time before the start of stimulation (such as 200 milliseconds (ms)) is used as the baseline value. Artifact removal is to remove specific artifacts using corresponding methods. For other types of physiological artifacts, they can be distinguished and eliminated based on biological data of other modalities. For example, artifacts related to blinking and eye movement can be identified based on electrooculogram data; artifacts caused by head movement can be identified based on accelerometer data. In addition, independent component analysis (ICA) or regression analysis can be used to eliminate electrooculogram signals. Non-physiological artifacts usually come from interference from the external environment, so the first choice is to eliminate them by changing the environmental settings, such as ensuring good contact when wearing electrodes and avoiding excessive limb movements during the experiment. Secondly, corresponding data processing methods can be used, for example, setting a 50Hz notch filter to filter out power frequency interference, etc. In addition, there are methods such as re-referencing and eliminating bad conductors or bad segments.
[0091] The specific preprocessing method can be selected according to the research purpose, the quality of the collected epilepsy data, and the subsequent analysis to be carried out. Taking the typical epilepsy EEG database CHB-MIT as an example, the database collects scalp EEG data with a sampling rate of 256 Hz. According to the characteristics of epilepsy and the characteristics of the database, the main preprocessing method adopted is data filtering, instead of other preprocessing methods such as downsampling or upsampling, artifact removal, etc. The main process is as follows: a bandpass filter with a passband of [1Hz, 47Hz] is designed to filter the original data and remove high-frequency components and low-frequency slow wave components in the data. Then, the filtered data is divided into several data segments to complete the preprocessing operation. For example, for multi-lead data with a length of 30 seconds (s), N c is the number of leads, N p is the number of data points. If the desired data segment length is 0.5s, it can be divided into 60 data segments.
[0092] In the embodiment of this example, the time domain feature extraction method steps include:
[0093] The time domain feature is the most basic feature of epilepsy EEG data, which contains important characteristic information of epilepsy. The time domain feature extraction method of the present invention is as follows: Assuming that the multi-lead EEG data is preprocessed as described above, the EEG data of multiple data segments is obtained. Where N t is the number of data segments (also called the number of trials). Follow these four steps:
[0094] ① Decentralize it according to the lead dimension to obtain The covariance matrix is calculated as follows:
[0095]
[0096] ② Perform eigenvalue decomposition on the obtained covariance matrix according to the following formula:
[0097]
[0098] Among them, λ j is the eigenvalue of the covariance matrix, ξ j is the corresponding eigenvector, and the value range of j is [1,N c ].
[0099] ③ Sort the obtained eigenvectors in descending order according to their eigenvalues, multiply the eigenvalues by the corresponding eigenvectors, and finally perform feature concatenation on the obtained vectors to obtain a matrix, as shown in the following formula:
[0100]
[0101] ④Finally, the concatenated matrix is stretched according to the last dimension to obtain vector f1, which completes the time domain feature extraction of epilepsy. It should be noted that in formula (3), the corresponding number of eigenvalues and eigenvectors can be selected according to the actual application effect and calculation cost requirements, such as selecting the first three largest eigenvalues, without selecting all eigenvalues for operation.
[0102] In the embodiment of this example, the frequency domain feature extraction method steps include:
[0103] Frequency domain feature extraction mainly includes two aspects, namely spectrum feature extraction and frequency domain covariance feature extraction.
[0104] For spectral feature extraction, the EEG data X epoch The i-th data segment X i, calculate the Fast Fourier Transformation (FFT) of each lead, calculate the amplitude of the transformed spectrum response and perform logarithmic operations to obtain Where N fp is the number of corresponding frequency points. Finally, P i Perform feature stretching operation to obtain the spectrum feature vector f2, which is used as the spectrum feature.
[0105] For frequency domain covariance feature extraction, take the P obtained in the spectrum feature extraction process i According to the above-mentioned “time domain feature extraction method”, P i The covariance eigenvector f3 in the frequency domain can be obtained by performing four steps of calculation, namely, covariance calculation, covariance decomposition, feature concatenation and feature stretching.
[0106] In the embodiment of this example, the feature fusion strategy steps include:
[0107] The time domain and frequency domain features calculated in the above steps are fused at the feature layer by feature splicing, as shown in the following formula:
[0108] f all =[f1,f2,f3] (4)
[0109] At this point, the extraction, processing and fusion of time-frequency joint features are completed.
[0110] In the embodiment of this example, the classification and identification method steps include:
[0111] In terms of classification and recognition methods, according to the classification task, the corresponding binary classification recognition method can be used, such as support vector machine (SVM), linear discriminant analysis (LDA), etc. The following only takes LDA as an example to introduce the classification method and explain how to use this method.
[0112] LDA is a classic supervised dimensionality reduction algorithm. The main idea is to find an optimal projection direction so that the data of the same category are as close as possible after projection, and the class centers of data of different categories are as far away as possible, that is, the intra-class variance is minimized and the inter-class variance is maximized. The implementation process is as follows, assuming that D = {(x1, y1), (x2, y2), …, (x m ,y m )} represents a data set containing m samples, where any sample x i is an n-dimensional vector, that is, the dimension of the feature vector is n, is the label of the sample, is the set of all tags. Define N c (c=0,1) is the number of samples in the cth category, X c (c=0,1) is the set of samples of the cth class, then the mean vector μ of the samples of the cth class is c ∈R n×1 (also called class center) is:
[0113]
[0114] The covariance matrix S of the c-th sample c ∈r n×n for:
[0115]
[0116] In the above formula, the operation of subtracting the mean vector of the class from the sample is called decentralization. Next, we define the intra-class scatter matrix and the inter-class scatter matrix, denoted as S w ∈R n×n With S b ∈R n×n :
[0117]
[0118] S b =(μ0-μ1)(μ0-μ1) T (8)
[0119] Assuming the projection vector we are looking for is w, then any sample x i After projection in this direction, it is w T x i , the corresponding two class centers are projected and transformed into: w T μ0 and w T μ1. For the optimization goal, the class center distance of different categories of data is as large as possible, which is converted to where ||a|| F represents the Frobenius norm; at the same time, the sample projection points in the same category are as close as possible, that is, the covariance w of the sample projection points of the same category T S0w and w T S1w should be as small as possible, which translates to minimizing w T S0w+w T S1w. In summary, the optimization objective function is converted to:
[0120]
[0121] From the above formula, we can see that the solution of J(w) is related to the direction of w, but not to its length. We can let w T S w w=1, the objective function is equivalent to:
[0122]
[0123] s T S w w=1 (11)
[0124] The equation is constructed by Lagrange multiplier method:
[0125] c(w,λ)=-w T S b w+λ(w T S w w-1) (12)
[0126] Among them, λ is the Lagrange multiplier. After taking the partial derivative of the vector w, we can get:
[0127]
[0128] The above formula is equivalent to:
[0129] S b w=λ(μ0-μ1) (14)
[0130] Therefore, the analytical solution of the objective function is In addition, the decision threshold y is calculated t For prediction of subsequent test samples:
[0131]
[0132] For the test sample x test ∈r n×1 , after projection, the decision value dv = w T x test , and finally make category prediction according to the following formula:
[0133]
[0134] In the embodiment of this example, the existing epilepsy detection method usually extracts epilepsy features at a single scale (such as time domain or nonlinear), but does not extract and fuse feature information contained in different scale spaces, which limits the improvement of epilepsy detection performance. The present invention discloses a time-frequency joint feature extraction and detection method based on covariance matrix decomposition. According to the correlation of multi-channel epilepsy data, the covariance matrix decomposition idea is adopted to extract feature information covering time domain and frequency domain multi-scale space, and a feature fusion strategy is designed to fuse multi-scale features, so as to achieve accurate detection of epileptic seizure events, shorten the manual data annotation time of medical workers, and provide a new method for the clinical application of epilepsy detection.
[0135] In the embodiment of this example, the novel epilepsy time-frequency joint feature extraction and detection method disclosed in the present invention can effectively extract epilepsy feature information covering multiple scales such as time and frequency domains, and realize accurate identification of epileptic seizure events. Compared with the traditional method of manual annotation of epileptic seizures by doctors, this method can automatically extract features that characterize epileptic seizures and identify them, which can shorten the data annotation time, save doctors' time and energy, and has broad application prospects in epilepsy detection.
[0136] It should be noted that, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0137] In addition, in this exemplary embodiment, a device for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition is also provided. Figure 3 As shown, the epilepsy time-frequency joint feature extraction and detection device 300 based on covariance decomposition may include: a data preprocessing module 310, a time domain feature extraction module 320, a frequency domain feature extraction module 330, a feature fusion module 340 and a classification and recognition module 350. Among them:
[0138] The data preprocessing module 310 is used to perform data preprocessing on the collected EEG data to generate EEG data of multiple data segments;
[0139] The time domain feature extraction module 320 is used to perform decentralization on the EEG data of multiple data segments that have undergone data preprocessing, calculate the covariance matrix, perform eigenvalue decomposition, feature extraction and stretching processing, and generate a time domain feature vector;
[0140] The frequency domain feature extraction module 330 is used to extract spectrum features and frequency domain covariance features from the EEG data of multiple data segments that have undergone data preprocessing, and generate spectrum feature vectors and frequency domain covariance feature vectors respectively;
[0141] A feature fusion module 340 is used to fuse the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain based on a preset feature fusion strategy to generate a time-frequency joint feature;
[0142] The classification and recognition module 350 classifies and recognizes the time-frequency joint features based on a preset binary classification recognition method to complete epilepsy prediction.
[0143] The specific details of each of the above modules of the device for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition have been described in detail in the corresponding method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition, so they will not be repeated here.
[0144] It should be noted that although several modules or units of a device 300 for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition are mentioned in the above detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units for embodiment.
[0145] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0146] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as systems, methods or program products. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0147] Refer to the following Figure 4 An electronic device 400 according to such an embodiment of the present invention is described. Figure 4 The electronic device 400 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0148] like Figure 4As shown, the electronic device 400 is in the form of a general computing device. The components of the electronic device 400 may include, but are not limited to: the at least one processing unit 410, the at least one storage unit 420, a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410), and a display unit 440.
[0149] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 performs the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification. For example, the processing unit 410 can perform the following steps: Figure 1 Steps S110 to S150 shown in FIG.
[0150] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 4201 and / or a cache storage unit 4202 , and may further include a read-only storage unit (ROM) 4203 .
[0151] The storage unit 420 may also include a program / utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0152] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0153] The electronic device 400 may also communicate with one or more external devices 470 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. In addition, the electronic device 400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0154] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0155] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0156] refer to Figure 5 As shown, a program product 500 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0157] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0158] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0159] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0160] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0161] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition, characterized in that: The method comprises: A data preprocessing step is to perform data preprocessing on the collected EEG data to generate EEG data of multiple data segments; In the time domain feature extraction step, the EEG data of multiple data segments that have undergone data preprocessing are decentralized and then the covariance matrix, eigenvalue decomposition, feature extraction and stretching processing are calculated to generate a time domain feature vector; The frequency domain feature extraction step is to extract the spectrum feature and the frequency domain covariance feature of the EEG data of the multiple data segments after data preprocessing, and generate the spectrum feature vector and the frequency domain covariance feature vector respectively; A feature fusion step, based on a preset feature fusion strategy, fuses the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain to generate a time-frequency joint feature; The classification and recognition step classifies and recognizes the time-frequency joint features based on a preset binary classification recognition method to complete epilepsy prediction.
2. The method according to claim 1, characterized in that The data preprocessing step of the method further comprises: The collected EEG data is preprocessed by filtering, downsampling, data segmentation, baseline correction, and artifact removal to generate EEG data with multiple data segments.
3. The method according to claim 1, characterized in that The time domain feature extraction step of the method further includes: The EEG data of multiple data segments that have undergone data preprocessing are decentralized and the covariance matrix is calculated; Performing eigenvalue decomposition on the covariance matrix to obtain an eigenvector; Performing feature concatenation on the feature vectors to generate a feature concatenation matrix; The feature concatenation matrix is stretched in one dimension to obtain a time domain feature vector.
4. The method according to claim 3, characterized in that The method further comprises: Sorting the eigenvectors in descending order based on the eigenvalues corresponding to the eigenvectors; multiplying the eigenvector by the eigenvalue corresponding to the eigenvector; The multiplied eigenvectors are concatenated to generate a feature concatenation matrix.
5. The method according to claim 1, characterized in that The frequency domain feature extraction step of the method further includes: Fast Fourier transform of each segment and each lead of the EEG data of multiple data segments that have been preprocessed respectively to generate a spectrum response amplitude; Performing logarithmic operation on the spectrum response amplitude; The spectrum response amplitude subjected to logarithmic operation is characteristically stretched to generate a spectrum feature vector.
6. The method according to claim 5, characterized in that The method further comprises: The spectrum response amplitudes subjected to logarithmic operation are subjected to covariance calculation, covariance decomposition, feature concatenation and feature stretching processing respectively to generate covariance feature vectors in the frequency domain.
7. The method according to claim 1, characterized in that The classification and identification step of the method further includes: According to a preset binary classification recognition method and based on a preset threshold, the time-frequency joint features are classified and recognized to complete epilepsy prediction.
8. A device for extracting and detecting epilepsy time-frequency joint features based on covariance decomposition, characterized in that: The device comprises: A data preprocessing module is used to perform data preprocessing on the collected EEG data to generate EEG data of multiple data segments; The time domain feature extraction module is used to decentralize the EEG data of multiple data segments after data preprocessing, calculate the covariance matrix, eigenvalue decomposition, feature extraction and stretching, and generate the time domain feature vector; The frequency domain feature extraction module is used to extract spectrum features and frequency domain covariance features of the EEG data of multiple data segments that have undergone data preprocessing, and generate spectrum feature vectors and frequency domain covariance feature vectors respectively; A feature fusion module, used to fuse the time domain feature vector, the spectrum feature vector, and the covariance feature vector in the frequency domain based on a preset feature fusion strategy to generate a time-frequency joint feature; The classification and recognition module classifies and recognizes the time-frequency joint features based on a preset binary classification recognition method to complete epilepsy prediction.
9. An electronic device, characterized in that: include Processor; and A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Frequency domain laser speckle imaging based blood flow velocity measuring method
CN104173038A
Three-class classification method for schizophrenia based on EEG frequency domain data
CN110338760A
Machine-in-loop unilateral limb motor imagery brain-computer cooperative decoding method
CN117520744A
Epilepsy morbidity prediction and diagnosis method based on electroencephalogram signal multi-domain characteristics
CN118680582A
Early seizure detection method
KR1020180086995A
Cited By
Epilepsy auxiliary diagnosis method and equipment based on electroencephalogram signals
CN120114073A
EEG feature extraction method combining ABR and ERP waveforms
CN120918678A