A device for detecting BECT spikes by fusing weighted background features and morphological features
By integrating weighted background features and morphological features into a BECT spike detection device, the problem of ignoring background signal features in existing technologies has been solved, enabling efficient detection of spikes in BECT patients, reducing false positive rates, and improving detection performance.
Patent Information
- Application Number
- CN202310705214.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-14
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-06-14
AI Technical Summary
Most existing spike detection algorithms focus on spike morphology features while ignoring background signal features, resulting in reduced detection performance and failing to meet clinical needs.
A BECT spike detection device that integrates weighted background and morphological features is adopted. Through signal acquisition, preprocessing, spike-like extraction, filtering, feature extraction and random forest classifier, combined with the HHO algorithm, the background signal is weighted and optimized to eliminate false positive spikes and improve detection performance.
This method enables real-time detection of spike waves in BECT patients, reduces the false positive rate, and improves the performance and integrity of the detection algorithm, showing broad application prospects.
Smart Images

Figure CN117272220B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of feature extraction detection, and relates to a BECT spike detection device fusing weighted background features and morphological features. BACKGROUND
[0002] Benign Childhood Epilepsy with Centro-temporal Spikes (BECT) is part of idiopathic, focal childhood epilepsy, which is transient, hereditary, age-dependent, non-structural focal epilepsy abnormality, and is one of the most common epilepsy syndromes, with an incidence of 15-20% in children under 15 years of age.
[0003] Electroencephalogram (EEG) is a physiological monitoring tool for recording the electrical activity of extracranial scalp or intracranial neurons using electrodes, which contains rich brain electrophysiological information and is of great significance to the clinical diagnosis, case analysis and prognosis of epilepsy. In the diagnosis and effect evaluation of BECT, the collected EEG is mainly observed to see whether there is epileptiform discharge in the Rolandic region. Epileptiform discharge is a paroxysmal abnormal waveform existing in the EEG signal of patients with epilepsy, mainly including spike wave, sharp wave, sharp slow wave, etc. The location, frequency, density and duration of epileptiform discharge in EEG are one of the most important bases for neurologists to analyze the degree of BECT patients and provide diagnosis and treatment schemes.
[0004] Spike wave is formed by excitatory postsynaptic potential and is caused by rapid super-synchronous depolarization of a group of neurons, reflecting the abnormal increase of excitability of neurons. At present, medical staff often need to understand the medical history of patients during diagnosis and treatment, which requires a lot of time to inquire about the patient's condition and find the historical EEG signal record of the seizure, so as to make a definite diagnosis of the patient. Therefore, automatic detection of spike wave in long-term EEG signal of BECT patients can improve the diagnosis efficiency of doctors and reduce the burden of patients, and has broad development prospects in the fields of clinical application and theoretical research.
[0005] So far, many researchers have proposed different spike automatic detection algorithms, including morphological filtering, clustering, time-frequency analysis, wavelet transform, etc. However, most of the current spike detection algorithms focus on the features of spike morphology and ignore the features of spike standing out from the background signal, or simply divide the whole EEG signal into spike segment and non-spike segment, without relating spike to background signal, introducing a lot of interference and reducing the performance of spike detection. SUMMARY
[0006] In view of the problems in the prior art, the present application provides a BECT spike detection device fusing weighted background features and morphological features to improve the recognition rate of BECT spikes. The technical scheme of the present application comprises a signal collector, a preprocessor, a spike-like wave extractor, a filter, a spike detector, a feature extractor, a feature fuser and a random forest classifier connected in sequence, wherein,
[0007] The signal collector collects EEG brain electrical signals;
[0008] The preprocessor performs IIR band-pass filtering on the collected original EEG data to obtain standard EEG signals;
[0009] The spike-like wave extractor comprises an optimal template matching unit and a spike wave clustering unit. The optimal template matching unit matches the standard EEG signals transmitted by the preprocessor and sends the results to the spike wave clustering unit for K-means clustering. The centroid of each cluster is input into the optimal template matching unit again as a new template for input template matching.
[0010] The filter retains the spike-like waves that meet the preset filtering conditions and filters out the spike-like waves that do not meet the preset filtering conditions.
[0011] The spike detector traverses all candidate spikes, calculates the similarity of two spikes whose distance from the next spike is less than 3 times the current spike width, and retains the first appearing spike for the continuously appearing spikes with a similarity higher than a preset value.
[0012] The feature extractor comprises a background feature extraction unit and an HHO weighted optimization unit. The background feature extraction unit extracts N segments of background signals in sequence according to the width of the current spike, and extracts the related background features of the N segments of background signals. Then the HHO weighted optimization unit is used to weight the front background signals.
[0013] The feature fuser comprises a weighted background feature unit and a spike morphological feature extraction unit. The weighted background feature unit obtains the background signal weight transmitted by the HHO weighted optimization unit, weights the features of the front background signals to obtain weighted background features, and sends them to the spike morphological feature extraction unit to extract spike morphological features using the spike start point, the spike end point and the spike peak point. After the spike morphological features are extracted, the weighted background features are fused to form fused features.
[0014] The random forest classifier inputs the fused features transmitted by the feature fuser as a feature vector into a random forest model, and the random forest model performs binary classification to complete the BECT spike detection.
[0015] Preferably, the IIR band-pass filter of 1-70 Hz in the preprocessor is used to remove baseline drift and high-frequency interference.
[0016] Preferably, in the spike detector, the two vectors are aligned by downsampling before calculating the similarity, and the cosine similarity is used to represent the similarity of the two spikes in morphology.
[0017] Preferably, in the background feature extraction unit, the background signal is extracted forward N times the spike width, the background features of the N background signals are extracted, the background features reflect the characteristics of the spike protruding background signal, and the extracted front background features are the ratio between the spike features and the background signal features, including the coefficient of variation ratio, the energy ratio, the area ratio, and the permutation entropy ratio.
[0018] Preferably, in the HHO weighted optimization unit, after the front background signal features are extracted, the weights of the multiple background signals are used as the Harris hawk position parameters, and the HHO algorithm is used to perform weighted optimization on the front background signal.
[0019] Preferably, in the HHO weighted optimization unit, the initialization of the background signal weight and the HHO parameters are included, including the Harris hawk population size, the solution dimension, and the weight upper and lower limits; the fitness of the Harris hawk individual is calculated, and the prey position is updated; the prey escape energy ES and the escape state λ are calculated, the search state of the HHO algorithm is judged based on ES and λ, and the background signal weight update strategy is adopted; it is judged whether the updated background signal weight exceeds the set weight upper and lower limits, if it exceeds the range, a weight value is randomly generated within the weight upper and lower limits; the foregoing calculation is repeated until the maximum iteration number is reached, the background signal weight of the last iteration is the optimal weight, and the optimal background signal weight is output.
[0020] Preferably, in the feature fusion unit, when extracting the spike morphology features, the curvature threshold is used in combination with the multi-channel data to determine the start and end points of the spike, and after the start and end points of the spike are extracted, the spike is split into left and right half waves for spike morphology feature extraction.
[0021] Compared with the prior art, the present application has the following technical effects:
[0022] (1) The present application can collect EEG signals in real time, can detect spikes of BECT patients, has simple processing, low cost, and is easy to popularize, and has a wide application prospect;
[0023] (2) Spike similarity detection is used to eliminate false positive spikes caused by muscle interference, the cosine similarity of adjacent spikes is calculated, and false positive spikes with high similarity are eliminated;
[0024] (3) The background features are introduced, which fills the gap that the current spike detection algorithm cannot represent the characteristics of the spike protruding background signal.
[0025] (4) The HHO algorithm is used to optimize the weight of the background signal, and the optimal background signal weight is obtained.
[0026] (5) The weighted background feature and the spike waveform feature are fused to obtain the fusion feature, so that the performance of the spike detection algorithm is greatly improved, and the integrity of the spike feature is improved. BRIEF DESCRIPTION OF DRAWINGS
[0027] Figure 1 It is a structure schematic view of the BECT spike detection device of the embodiment of the application, which fuses the weighted background feature and the morphological feature.
[0028] Figure 2 It is a brain electrode distribution diagram of the BECT spike detection device of the embodiment of the application, which fuses the weighted background feature and the morphological feature.
[0029] Figure 3 It is a front background signal extraction mode diagram of the BECT spike detection device of the embodiment of the application, which fuses the weighted background feature and the morphological feature.
[0030] Figure 4 It is a flowchart of obtaining the background signal weight by using the HHO algorithm in the BECT spike detection device of the embodiment of the application, which fuses the weighted background feature and the morphological feature.
[0031] Figure 5 It is a spike waveform feature extraction mode diagram of the BECT spike detection device of the embodiment of the application, which fuses the weighted background feature and the morphological feature. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0033] On the contrary, the present application covers any substitution, modification, equivalent method and scheme defined by the claims on the essence and scope of the present application. Further, in order to make the public have a better understanding of the present application, some specific details are described in detail in the following detailed description of the present application. The present application can also be completely understood without the description of these details by those skilled in the art.
[0034] Electroencephalogram is the most important tool in the process of diagnosis, differential diagnosis and treatment effect evaluation of epilepsy, and its main role is to identify and record abnormal discharge of epilepsy during the process, including spike wave, sharp wave, spike slow wave and other waveforms. Spike wave is the typical waveform of BECT. In order to better analyze epilepsy, spike wave automatic detection needs to be carried out on the EEG signal. Since the current spike wave detection algorithm mostly focuses on the features of spike wave form and ignores the features of spike wave protruding from the background signal, or simply divides the whole EEG signal into spike wave segment and non-spike wave segment, without connecting spike wave with background signal, a large amount of interference is introduced, which reduces the performance of spike wave detection and cannot meet the clinical requirements. In view of this, see Figure 1 , which is a structure schematic diagram of a BECT spike wave detection device fusing weighted background features and morphological features according to an embodiment of the application, comprising a signal collector 10, a preprocessor 20, a spike-like wave extractor 30, a filter 40, a spike wave detector 50, a feature extractor 60, a feature fusioner 70 and a random forest classifier 80 connected in sequence, wherein,
[0035] The signal collector 10 collects EEG brain electrical signals, specifically uses the international 10-20 standard to wear EEG collection multi-channel AV lead EEG data on BECT patients, and establishes an experimental database;
[0036] The preprocessor 20 carries out IIR band-pass filtering on the collected original EEG data to obtain standard EEG signals, and removes baseline drift and high-frequency noise;
[0037] The spike-like wave extractor 30 includes an optimal template matching unit and a spike wave clustering unit. The optimal template matching unit matches the standard EEG signal transmitted by the preprocessor 20 and sends the result to the spike wave clustering unit for K-means clustering, and then inputs the centroid of each cluster as a new template into the optimal template matching unit for input template matching;
[0038] The filter 40 retains the spike-like wave that meets the preset filtering condition and filters out the spike-like wave that does not meet the preset filtering condition. Specifically, in a certain time period near the time when the spike wave appears in the AV channel, spike waves also appear in two related BP channels, and one is a negative phase spike wave and the other is a positive phase spike wave. All spike-like waves that meet this rule are retained, and the rest are considered as false positive spike waves and eliminated;
[0039] The spike detector 50 traverses all candidate spikes, calculates the similarity of two spikes with the distance less than 3 times the current spike width to the next spike, and retains the first appearing spike for the continuously appearing spikes with the similarity higher than a preset value. Since the EEG signal is easily interfered by the electromyogram signal, the EEG signal appears high-frequency dense needle-shaped waves which are very similar to the spike characteristics and are easily misrecognized as spikes, so that the false positive rate of the spike detection algorithm is increased, and thus the spike detector 50 is needed.
[0040] The feature extractor 60 includes a background feature extraction unit and an HHO weighted optimization unit. The background feature extraction unit extracts N segments of background signals in a continuous equal-width non-overlapping manner according to the width of the current spike, and extracts related background features of the N segments of background signals. Then, the HHO weighted optimization unit is used to weight the front background signals.
[0041] The feature extractor 70 includes a weighted background feature unit and a spike morphology feature extraction unit. After the background signal weight transmitted by the HHO weighted optimization unit is obtained, the weighted background feature unit weights the features of the front background signals to obtain weighted background features. The spike morphology feature extraction unit uses the spike start point, the spike end point and the spike peak point to extract spike morphology features. After the spike morphology features are extracted, the weighted background features are fused to form fusion features.
[0042] The random forest classifier 80 inputs the fusion features transmitted by the feature extractor 70 as a feature vector into a random forest model, and the random forest model performs binary classification to complete the BECT spike detection.
[0043] In the specific embodiment, when the spike similarity detection is used in the spike detector 50 to eliminate part of the false positive spikes, the cosine similarity is calculated to represent the similarity degree of two spikes in the morphology. All candidate spikes are traversed, and the cosine similarity of two spikes with the distance less than 3 times the current spike width to the next spike is calculated. For two spikes satisfying the condition, the vectors represented by the two spikes are as follows:
[0044]
[0045]
[0046] Wherein L1 and L2 are respectively the sampling point numbers of the first spike and the second spike satisfying the condition extracted according to the spike width. When calculating the similarity, the two vectors are aligned by downsampling. After alignment, the sampling point numbers of the two vectors are L, as follows:
[0047] L = min{L1, L2} (3)
[0048] After aligning the vectors, the cosine similarity of the two vectors is calculated to measure the similarity between the two spikes, which is calculated as follows:
[0049]
[0050] For the continuously appearing spikes with high similarity, only the first appearing spike is retained:
[0051] In the feature extractor 60, when extracting the pre-background features, the current spike is represented as X0, and N segments of background signals are extracted in the same width and non-overlapping manner from X0 according to the width W of X0, which are represented as X1, X2, …, XN-1. N The weight value corresponding to each segment of the background signal is represented as ω1, ω2, …, ωN-1. N Then, the relevant background features of the N segments of background signals are extracted. The pre-background features are all the ratios between the spike features and the background signal features, including the coefficient of variation ratio, energy ratio, area ratio, and permutation entropy ratio. The detailed calculation methods of these features are as follows:
[0052] 1) The coefficient of variation ratio is the ratio of the spike coefficient of variation to the background signal coefficient of variation. The calculation method of the coefficient of variation ratio of the nth segment of background signal is as follows:
[0053]
[0054] wherein represents the spike coefficient of variation, represents the coefficient of variation of the nth segment of background signal. The calculation method of the coefficient of variation is as follows:
[0055]
[0056] wherein and are the standard deviation and mean value of X n , respectively. When n is 0, it represents the spike.
[0057] 2) The energy ratio is the ratio of the spike energy to the background signal energy. The calculation method of the energy ratio of the nth segment of background signal is as follows:
[0058]
[0059] wherein represents the spike energy, represents the energy of the nth segment of background signal. The calculation method of the signal energy is the sum of the squares of the signal amplitudes. For a signal X s with a sampling point number of N n , the energy calculation method is as follows:
[0060]
[0061] When n is 0, it represents a spike signal.
[0062] 3) The area ratio is the ratio of the spike area to the background signal area. The area ratio of the nth background signal is calculated as follows:
[0063]
[0064] in Let the area of the spike wave be . Let W be the area of the nth background signal segment. The spike area is approximated by dividing it into multiple small rectangles. If the spike width is W and the number of sampling points is N... W If the x-axis coordinate of the first sampling point of the spike wave is x0, then the x-axis coordinate of the last sampling point is xN. W-1 The area of the spike wave is calculated as follows:
[0065]
[0066] Where S LT This represents the area of the lower triangle formed by the start and end points of the spike. For the nth segment of the background signal, if the first sampling point is... Since each background signal segment and the spike signal have the same width, the last sampling point is... The method for calculating the area of the background signal in the nth segment is as follows:
[0067]
[0068] 4) The permutation entropy ratio is the ratio of the permutation entropy of the spike signal to the permutation entropy of the background signal. For a sampling number of N points... a signal By selecting an embedding dimension m and a time delay τ, the time series is mapped to m dimensions for phase space reconstruction. The reconstructed phase space yields C subsequences, where C = N. a -(m-1)τ, then convert each sequence into a permutation of size relationships, and calculate the probability of each permutation occurring. In X n The j-th permutation π j probability of occurrence for:
[0069]
[0070] Where n(π) j ) represents X n The arrangement is π j The number of [probabilities]. Finally, the information entropy of these probabilities is calculated to obtain the permutation entropy. X in m dimensions... n The permutation entropy is calculated as follows:
[0071]
[0072] When n is 0, it represents a spike wave. The embedding dimension m in this paper is set to 3, and the time delay τ is set to 1. The permutation entropy ratio of the nth background signal is:
[0073]
[0074] When the HHO algorithm is adopted in the HHO weighted optimization unit to obtain the background signal weight, it includes:
[0075] Initialize the background signal weight and HHO parameters, including the Harris eagle population size K, the solution dimension D, and the upper and lower limits of the weight ub and lb. Wherein K is set to 30, and D is set to 3. In order to maintain:
[0076]
[0077] The strategy adopted is to control the upper and lower limits of the weight of the first N-1 background signals, and the weight of the Nth background signal is directly calculated. The lower limit lb of the weight of the first to N-1 background signals is 0, and the upper limit ub is as follows:
[0078]
[0079] The weight of the first to N-1 background signals is randomly initialized within the upper and lower limits, and the weight of the Nth background signal is directly calculated, and the calculation method is as follows:
[0080]
[0081] Calculate the Harris eagle individual fitness f(ω), and update the prey position. Based on the background signal weight ω, the extracted background features are weighted, the AUC area surrounded by the ROC curve and the coordinate axis on the validation set is taken as the fitness function f(ω), and the prey position is set to the position where the Harris eagle with the optimal fitness is located. The prey position at the tth iteration is represented as
[0082] Calculate the prey escape energy ES and escape state λ, and judge the search state and the background signal weight update strategy of the HHO algorithm based on ES and λ. The key to the accurate operation of the swarm intelligence optimization algorithm is to balance the global exploration stage and the local exploitation stage. The HHO algorithm adjusts the mode based on the prey escape energy ES. The specific calculation method of ES is as follows:
[0083]
[0084] Where t represents the current iteration number, T represents the set maximum iteration number, and ESO represents the initial energy of the prey, and its calculation expression is:
[0085] ES0= 2rand - 1 (19)
[0086] where rand is a random number in the range of (0, 1). HHO algorithm is in global exploration phase when |ES|≥1, and in local exploitation phase when |ES|<1.
[0087] In global exploration phase, Harris Hawks appear randomly in the search space, and two background signal weight updating strategies are implemented according to random probability q. In the t+1 iteration, the background signal weight updating formula for Harris Hawks in global exploration phase is:
[0088]
[0089] where r1, r2, r3, r4 and q are random numbers in the range of (0, 1), represents the position of a Harris Hawk randomly selected from the population in the t iteration, represents the average position of the Harris Hawk population in the t iteration, which is calculated as:
[0090]
[0091] where represents the position of the i Harris Hawk in the t iteration.
[0092] In local exploitation phase, HHO algorithm adjusts the hunting method according to escape energy ES and escape state λ. When |ES|≥0.5, it means that the prey has enough energy to escape the pursuit of Harris Hawks, and when |ES|<0.5, it means that the prey does not have enough energy to escape the pursuit. λ is a random number in the range of (0, 1), which is used to simulate the escape state of the prey. When λ<0.5, it means that the prey successfully escapes the pursuit, and when λ≥0.5, it means that the prey fails to escape. The attack strategies under different states are as follows:
[0093] Strategy 1: When λ≥0.5 and |ES|≥0.5, soft siege strategy is executed, which means that the prey still has enough energy to escape but has not escaped the siege circle. At this time, Harris Hawks will not pursue the prey with full force, but will consume the prey's energy. This strategy can be represented by the following formula:
[0094]
[0095] where Δω t represents the position difference between the Harris Hawk and the prey in the t iteration, which is shown as follows
[0096]
[0097] J will change at each iteration to simulate the random jump of the prey during the escape process, which is calculated as follows:
[0098] J = 2(1 - r5) (24)
[0099] where r5is a random number in the range of (0, 1).
[0100] Strategy 2: When λ≥0.5 and |ES|<0.5, the hard siege strategy is executed, at this time the prey has been exhausted, and a surprise attack can be launched to capture the prey. At this time, the background signal weight update strategy is:
[0101]
[0102] Strategy 3: When λ<0.5 and |ES|≥0.5, the gradual soft siege strategy is executed, at this time the prey escape energy is still sufficient, but has escaped the capture range, the Harris hawk will first perform a soft siege to consume the prey escape energy, and then choose a surprise attack at a suitable position. The HHO algorithm introduces Lexy flight to simulate the irregular motion mode of the prey and the Harris hawk. At this time, the background signal weight update formula is:
[0103]
[0104] where f(·) represents the fitness function, S is a random vector in the range of (0, 1) with 1×D dimensions, and LF represents the Lexy flight function in D dimensions, which is calculated as:
[0105]
[0106] where u and υ are random numbers in the range of (0, 1), β is set to 1.5, and δ is calculated as follows:
[0107]
[0108] where Г(·) represents the gamma function.
[0109] Strategy 4: When λ<0.5 and |ES|<0.5, the gradual hard siege strategy is executed, at this time the prey has been exhausted, and the Harris hawk will combine hard siege before launching a surprise attack to capture the prey. At this time, the background signal weight update strategy is:
[0110]
[0111] Determine whether the updated background signal weight exceeds the set weight upper and lower limits. If it exceeds the range, a weight value is randomly generated within the weight upper and lower limits.
[0112] Output the optimal background signal weight, and repeat the aforementioned calculation until the maximum number of iterations is reached. The background signal weight of the last iteration is the optimal weight.
[0113] The features of the pre-background signal are weighted to obtain weighted background features in the feature fusioner 70 after the background signal weight is obtained by using the HHO algorithm comprises and The calculation method is as follows:
[0114]
[0115] wherein is the i-th extracted background signal feature, which respectively includes and Then, the spiky wave is split into left and right half waves by using the spiky wave starting point, the spiky wave ending point and the spiky wave peak point to extract the spiky wave morphological feature, which is linearly analyzed from the width, amplitude and slope. After the spiky wave morphological feature is extracted, the weighted background feature is fused to form the fusion feature.
[0116] The BECT spiky wave intelligent detection device for fusing the weighted background feature and the morphological feature proposed in the embodiment is described in detail below. Figures 2 to 5
[0117] In the BECT spiky wave intelligent detection device for fusing the weighted background feature and the morphological feature provided in the embodiment, the signal collector 10 collects long-term electroencephalogram signals of a patient by using a multi-channel electroencephalograph, the sampling frequency is 1000 Hz, the electrode distribution adopts the international 10-20 standard, and 19 channels of electroencephalogram data are collected. The electrode distribution is shown in Figure 2 In specific embodiments, a professional electroencephalograph can mark the spiky waveforms in each channel of the electroencephalogram signal.
[0118] The preprocessor 20 performs a pre-processing operation on the electroencephalogram, and an IIR band-pass filter 40 is used to filter out frequency components above 70 Hz and below 1 Hz, thereby reducing the interference of high-frequency noise and baseline drift.
[0119] The spiky wave extractor 30 extracts spiky waves from the EEG signal processed by the preprocessor 20, which includes an optimal template matching unit and a spiky wave clustering unit. After the spiky wave extraction, all spiky waves can be extracted.
[0120] The filter 40 performs a point-by-point analysis on all spiky waves after extracting all spiky waves, and eliminates all false positive spiky waves that do not meet the rules.
[0121] In the spiky wave detector 50, spiky wave similarity detection is performed. Due to the interference of the electromyogram, high-frequency dense needle-shaped waves may appear in the electroencephalogram. The cosine similarity of adjacent spiky waves is calculated, false positive spiky waves with high similarity appearing adjacent to each other are eliminated, and the first appearing spiky wave is retained.
[0122] The feature extractor 60 extracts the weighted background feature of the remaining spike, and the pre-background signal is extracted by continuously extracting N non-overlapping background signals with equal width from the current spike as the reference. The pre-background signal extraction method is shown in Figure 3 After obtaining the pre-background signal, the relevant background features are extracted, and then the HHO algorithm is used to weight the pre-background signal. The method of obtaining the background signal weight using the HHO algorithm will be described in detail below in combination with Figure 4 and specific examples.
[0123] The background signal weight and the HHO parameters are initialized, including the Harris eagle population size, the solution dimension, and the upper and lower limits of the weight, and the background signal weight constitutes the Harris eagle position parameter;
[0124] The fitness of the Harris eagle individual is calculated, and the prey position is updated;
[0125] The escape energy ES and the escape state λ of the prey are calculated, and based on ES and λ, the search state of the HHO algorithm and the background signal weight update strategy are determined;
[0126] It is judged whether the updated background signal weight exceeds the set weight upper and lower limits. If it exceeds the range, a weight value is randomly generated within the weight upper and lower limits;
[0127] The optimal background signal weight is output, and steps S622-S624 are repeated until the maximum iteration number is reached. The pre-background signal weight of the last iteration is the optimal weight;
[0128] In the feature fusioner 70, the background features are weighted to obtain the weighted background features after the background features and the background signal weight are extracted. Then the morphological features of the spike are extracted. The spike morphological feature extraction method will be described in detail below in combination with Figure 5 and specific examples.
[0129] The spike is divided into left and right half waves using the start and end points of the spike, and the spike morphological features are extracted from the width, amplitude, and slope. The width features include W left , W right and W spike , which represent the left half wave width, the right half wave width, and the spike width, respectively, corresponding to Figure 5 , and , and
[0130] The amplitude features include H left , H right and H spike , which represent the left half wave amplitude, the right half wave amplitude, and the spike amplitude, respectively, corresponding to Figure 5 , and , and
[0131] Slope features include S left , S right and S spike representing left half-wave slope, right half-wave slope and spike sharpness, respectively, corresponding to Figure 5 and S left -S right .
[0132] After extracting the spike morphology features, the weighted background features are fused to form the fused features.
[0133] The random forest classifier 80 will use a random forest model to perform the classification, taking the obtained fused features as the feature vector to input into the random forest model, and then the model outputs a binary classification result to complete the BECT spike detection.
[0134] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A BECT spike detection apparatus that fuses weighted background features and morphological features, characterized by, The device comprises a signal collector, a preprocessor, a spike-like wave extractor, a filter, a spike detector, a feature extractor, a feature fusioner and a random forest classifier connected in sequence, wherein, The signal collector collects EEG signals. The preprocessor performs IIR band-pass filtering on the collected raw EEG data to obtain standard EEG signals. The spike-like wave extractor comprises an optimal template matching unit and a spike clustering unit. The optimal template matching unit matches the standard EEG signals transmitted by the preprocessor and sends the results to the spike clustering unit for K-means clustering. The centroid of each cluster is input into the optimal template matching unit again for input template matching. The filter retains spike-like waves that meet the preset filtering conditions and filters out spike-like waves that do not meet the preset filtering conditions. The spike detector traverses all candidate spikes, calculates the similarity of two spikes with a distance less than 3 times the width of the current spike, and retains the first spike that appears when the similarity of consecutive spikes is higher than a preset value. The feature extractor comprises a background feature extraction unit and an HHO weighted optimization unit. The background feature extraction unit extracts N segments of background signals with equal width and without overlap from the current spike, and extracts the relevant background features of the N segments of background signals. The HHO weighted optimization unit is used to weight the front background signals. The feature fusioner comprises a weighted background feature unit and a spike morphology feature extraction unit. The weighted background feature unit obtains the background signal weight transmitted by the HHO weighted optimization unit, weights the features of the front background signals to obtain weighted background features, and sends the weighted background features to the spike morphology feature extraction unit to extract spike morphology features using the spike start point, the spike end point and the spike peak point. After the spike morphology features are extracted, the weighted background features are fused to form fusion features. The random forest classifier inputs the fusion features transmitted by the feature fusioner into a random forest model as a feature vector, and the random forest model performs binary classification to complete the BECT spike detection.
2. The apparatus of claim 1, wherein, The IIR band-pass filter in the preprocessor removes baseline drift and high-frequency interference.
3. The apparatus of claim 1, wherein, In the spike detector, the two vectors are aligned by downsampling before calculating the similarity, and the cosine similarity is used to represent the similarity of the two spikes in morphology.
4. The apparatus of claim 1, wherein, In the background feature extraction unit, the background signals are extracted N times the width of the spike, and the background features of the N segments of background signals are extracted. The background features reflect the characteristics of the spike highlighted background signals. The extracted front background features are the ratio of the spike features to the background signal features, including the coefficient of variation ratio, the energy ratio, the area ratio and the permutation entropy ratio.
5. The apparatus of claim 1, wherein, In the HHO weighted optimization unit, the weights of the multiple background signals are used as Harris hawk position parameters to weight and optimize the front background signals using the HHO algorithm.
6. The apparatus of claim 1, wherein, The HHO weighted optimization unit includes initialization of background signal weight and HHO parameters, including Harris eagle population size, solution dimension and weight upper and lower limit; the fitness of Harris eagle individual is calculated, and the prey position is updated; the escape energy ES and escape state λ of the prey are calculated, the search state of the HHO algorithm and the background signal weight update strategy are judged based on ES and λ; whether the updated background signal weight exceeds the set weight upper and lower limit is judged, if it exceeds the range, a weight value is randomly generated within the weight upper and lower limit; the foregoing calculation is repeated until the maximum iteration number is reached, the background signal weight of the last iteration is the optimal weight value, and the optimal background signal weight is output.
7. The apparatus of claim 1, wherein, In the feature fusioner, when the sharp wave morphological features are extracted, the curvature threshold is combined with the multi-channel data to determine the start and end points of the sharp wave, and after the start and end points of the sharp wave are extracted, the sharp wave is split into left half wave and right half wave for sharp wave morphological feature extraction.