IED event detection methods and devices, signal reconstruction methods and systems
By detecting peaks and troughs in MEG data, generating IED templates, and combining this with a search algorithm, the problem of accurate localization of the epileptogenic zone in epilepsy is solved, improving the accuracy of IED event detection and signal reconstruction.
Patent Information
- Application Number
- CN202311161270.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2022-09-10
- Filing Date
- 2023-09-08
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-09-08
AI Technical Summary
In existing technologies, accurate localization of the epileptogenic zone is difficult, and errors exist in IED detection and signal reconstruction, making it impossible to provide accurate data support.
By acquiring peak and trough points in MEG data, calculating feature values, generating IED templates using hierarchical clustering methods, and combining coarse and fine search, the source spatial signal is reconstructed.
It improves the detection accuracy of IED events and the estimation efficiency of source space discharge direction, reduces signal reconstruction error, and improves the accuracy of HFO source tracing and localization.
Smart Images

Figure CN117679043B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal reconstruction. Background Technology
[0002] Epilepsy is a chronic disease caused by sudden abnormal electrical discharges in the brain, leading to temporary brain dysfunction. Currently, there are still many unresolved issues in epilepsy research, one significant obstacle being the technical difficulty of accurately locating the epileptogenic zone.
[0003] High-frequency oscillations (HFOs) in the brains of epilepsy patients can serve as a reliable biomarker for locating the epileptogenic zone. Magnetoencephalography (MEG) can non-invasively record HFOs in the brains of epilepsy patients, and the source of HFOs associated with interictal epileptiform discharges (IEDs) can be traced and located. The intracranial discharge location can be calculated by deducing the source spatial location from the extracranial recorded signals. The obtained source spatial location shows good consistency with the epileptogenic zone and is superior to commonly used IEDs. This detection and reconstruction can provide data support for subsequent medical research. However, related technologies, such as IED detection techniques and techniques used for IED source spatial signal reconstruction, such as synthetic aperture magnetic field measurement (SAM), still have certain errors and cannot provide accurate data for subsequent research.
[0004] Patent document CN102429657A discloses a device and method for classifying and detecting epileptic EEG signals, including a module for performing wavelet analysis on normal and epileptic EEG signals, a module for calculating approximate entropy of each level of detail signal obtained after wavelet decomposition from the wavelet analysis device, and a module for further classification and detection using the Neyman-Pearson criterion. However, the aforementioned problems still exist in this technology. Summary of the Invention
[0005] The present invention aims to solve the problems in related technologies where IED events cannot be accurately detected and the direction of source space discharge cannot be accurately determined by signal reconstruction.
[0006] To address the aforementioned limitations, this invention proposes an IED event detection method, comprising:
[0007] S101: Obtain peak points: Obtain the peak points and trough points in MEG data, and combine the peak points and trough points into peak points in chronological order;
[0008] S102: Obtain candidate peak points for IED: Calculate the feature value of the peak point; select the peak point whose feature value is greater than a preset threshold as candidate peak points for IED;
[0009] S103: Obtain IED template: Using the IED candidate peak point as the center, extract signal segments of a preset length, and use hierarchical clustering method to cluster all the signal segments into IED template;
[0010] S104: Obtain IED peak points: For each IED candidate peak point, calculate the similarity feature P of the IED candidate peak point. Sim , will P Sim IED candidate peak points that exceed a preset threshold are taken as IED peak points;
[0011] S105: Obtain IED event: Obtain IED sampling point based on the IED peak point, and obtain the IED event and the IED main peak corresponding to the IED event based on the IED sampling point.
[0012] Furthermore, methods for obtaining peaks and troughs in a signal include:
[0013] S201: Filters the data using a bandpass filter from 3Hz to 80Hz and a notch filter from 50Hz; smooths the data using a 20ms smoothing kernel;
[0014] S202: Sampling points with signal amplitudes greater than those of the adjacent signals on both sides are designated as candidate peak points; sampling points with signal amplitudes less than those of the adjacent signals on both sides are designated as candidate trough points.
[0015] S203: The sampling point corresponding to the minimum unsmoothed signal amplitude between two adjacent candidate peaks is taken as the valley point; the sampling point corresponding to the maximum unsmoothed signal amplitude between two adjacent candidate valleys is taken as the peak point.
[0016] Furthermore: the method for obtaining candidate peak points of IED includes:
[0017] S301: Calculate duration P Dur Amplitude P Amp and slope P Slope The calculation formula is as follows:
[0018] P Dur =T n+1 -T n-1
[0019]
[0020]
[0021] In the formula, ΔV n equals V n -V n-1 ;ΔT n equal to Tn -T n-1 ;T n V is the time of the peak point. n The peak point signal amplitude is n; n is the peak point index.
[0022] S302: Calculate the amplitude P of each peak point. Amp and slope P Slope Perform z-value conversion in the channel dimension;
[0023] S303: Amplitude P Amp Greater than 0.8 times the maximum amplitude and slope P Slope Peak points with a slope greater than 0.6 times the maximum value are considered as candidate peak points for IED.
[0024] The maximum amplitude is the amplitude P of all peak points. Amp The maximum value of the slope; the maximum slope value is the slope P of all peak points. Slope The maximum value.
[0025] Further: In step S103, the preset length is ±50ms; the hierarchical clustering method includes:
[0026] S401: Preprocessing: Normalize the signal segment to between 0 and 1 to obtain a normalized signal segment;
[0027] S402: Calculate the correlation coefficient: For the normalized signal segment S i and S j Calculate the Pearson correlation coefficient Corr(S) i S j If Corr(S) i S j If the result of ) is less than 0, then let S j =1-S j And recalculate the Pearson correlation coefficient Corr(S) i S j );
[0028] S403 calculates similarity:
[0029] For the normalized signal segment S i and S j The similarity calculation formula is as follows:
[0030]
[0031]
[0032] In the formula, n is the number of signal sampling points;
[0033] S404: Select the normalized signal segment with the highest similarity to all normalized signal segments as the cluster center of the current category for clustering. Normalized signal segments with a similarity greater than 0.85 to the cluster center are assigned to the current category, and normalized signal segments assigned to the current category are removed from the normalized signal segments to be clustered.
[0034] S405: Repeat the above steps until all normalized signal segments are assigned to different categories;
[0035] S406: Average the normalized signal segments within all categories to obtain the IED template.
[0036] Furthermore: the similarity feature P Sim The method of obtaining it is:
[0037] For each candidate peak point of an IED, a signal segment of ±50ms is extracted from the candidate peak point. The similarity between the signal segment and each IED template is calculated. The maximum similarity between the signal segment and all IED templates is taken as the similarity feature P of the candidate peak point. Sim ;
[0038] The method for obtaining IED sampling points is as follows:
[0039] For each IED peak point, a signal segment from -50ms to 50ms is extracted on both sides of the IED peak point, and all MEG signals in the signal segment are defined as IED sampling points;
[0040] The method for obtaining the IED event is as follows:
[0041] If an IED sampling point is detected simultaneously in at least 5 MEG sensors at a given time point, it is defined as an IED event.
[0042] Merge IED events with a time interval of less than 10ms into a single IED event;
[0043] For each IED event, the time point corresponding to the maximum global field energy is used as the IED peak, where the global field energy is the sum of squares of the signals recorded by all MEG sensors at each time point.
[0044] A signal reconstruction method, based on the aforementioned IED event detection method, includes:
[0045] S501: Signal segmentation: For each IED event, obtain the segment of interest and the corresponding baseline signal based on the IED main peak;
[0046] S502: Coarse search: The coarse search component divides the spherical coordinate system into multiple coarse search directions, and for each coarse search direction, obtains the optimal direction θ of the coarse search;
[0047] S503: Fine search: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ; for each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
[0048] Furthermore: the signal reconstruction is an HFO signal reconstruction;
[0049] In the signal segmentation
[0050] For each IED event, a signal segment of ±150ms from the main peak of the IED is acquired and bandpass filtered from 80Hz to 200Hz.
[0051] The signal segment is segmented using a sliding time window with a length of 100ms and an overlap of 50% to obtain the signal segment of interest;
[0052] For each signal segment of interest, a signal segment of ±1000ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest;
[0053] In the coarse search,
[0054] In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions;
[0055] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal. The source space signal is calculated using the following formula, where Let be the transmission matrix. Let be the covariance matrix of the MEG sensor signal, [·] -1 For the inverse operation of a matrix, [·] T This is the transpose of the matrix.
[0056]
[0057] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0058] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0059] The mean of the source space signal envelope of the segment of interest after z-value conversion is used as the objective function of the HFO signal amplitude, and the direction that maximizes the objective function is used as the optimal direction θ for coarse search.
[0060] In the refined search,
[0061] For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions;
[0062] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0063] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0064] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0065] The mean value of the source space signal envelope of the segment of interest after z-value conversion is used as the objective function of the HFO signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated according to Formula 1.1.
[0066] Furthermore: the signal reconstruction is an IED signal reconstruction;
[0067] In the signal segmentation
[0068] For each IED event, a signal segment of ±100ms from the main peak of the IED is acquired as the signal segment of interest, and bandpass filtering from 3Hz to 80Hz and notch filtering from 50Hz are applied.
[0069] For each signal segment of interest, a signal segment of ±1000ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest;
[0070] In the coarse search,
[0071] In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions;
[0072] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0073] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0074] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0075] The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude, and the direction that maximizes the objective function is taken as the optimal direction θ for coarse search.
[0076] In the refined search,
[0077] For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions;
[0078] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0079] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0080] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0081] The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated.
[0082] An 1ED event detection device, using the method described above, the device comprising:
[0083] Peak point acquisition module: Acquires the peak points and trough points in the signal, and combines the peak points and trough points into peak points in chronological order;
[0084] Feature value calculation module: calculates the feature value of the peak point; and selects the peak points whose feature values are greater than a preset threshold as 1ED candidate peak points;
[0085] Hierarchical clustering module: Taking the candidate peak point of the 1ED as the center, extract signal segments of a preset length, and use the hierarchical clustering method to cluster all the signal segments into 1ED templates;
[0086] IED Peak Point Acquisition Module: For each IED candidate peak point, a signal segment of preset length is extracted to obtain the similarity feature P of the IED candidate peak point. Sim , will P Sim IED candidate peak points that exceed a preset threshold are taken as IED peak points;
[0087] IED event acquisition module: acquires IED sampling points based on the IED peak points, and acquires the IED event and the corresponding IED main peak based on the IED sampling points.
[0088] A signal reconstruction system using the method described above, the system comprising:
[0089] IED event detection device: The device is the one described above;
[0090] Signal segmentation component: For each 1ED event, obtain the segment of interest and the corresponding baseline signal based on the 1ED main peak;
[0091] Coarse search component: The coarse search component divides the spherical coordinate system into multiple coarse search directions, and for each coarse search direction, obtains the optimal direction θ of the coarse search;
[0092] Fine search component: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ; for each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
[0093] Compared with related technologies, the present invention has the following advantages:
[0094] The present invention provides an IED event detection method that obtains IED templates by reasonably selecting candidate IED peak points and using hierarchical clustering, thereby obtaining IED events and enabling more accurate detection of IED events.
[0095] The IED event detection device of one invention point of the present invention also has the advantages of the above-mentioned IED event detection method.
[0096] The present invention provides a signal reconstruction method based on the above-mentioned IED event detection method. It uses signal segmentation, coarse search, and fine search to accurately estimate the discharge direction of the source space. At the same time, the combination of coarse search and fine search can improve efficiency.
[0097] The signal reconstruction system of one invention point of this invention also has the advantages of the above-mentioned signal reconstruction method. Attached Figure Description
[0098] Figure 1This is a flowchart of an IED event detection method according to an embodiment of the present invention;
[0099] Figure 2 This is a flowchart illustrating the acquisition of peak and trough points in a signal in an IED event detection method according to an embodiment of the present invention.
[0100] Figure 3 This is a flowchart of a method for obtaining candidate peak points of an IED in an IED event detection method according to an embodiment of the present invention;
[0101] Figure 4 This is a flowchart of the hierarchical clustering method in an IED event detection method according to an embodiment of the present invention;
[0102] Figure 5 This is a flowchart of a signal reconstruction method according to an embodiment of the present invention;
[0103] Figure 6 This is a structural block diagram of an IED event detection device according to an embodiment of the present invention;
[0104] Figure 7 This is a structural block diagram of a signal reconstruction system according to an embodiment of the present invention;
[0105] Figure 8 This is a schematic diagram of an IED template obtained by hierarchical clustering in an IED event detection method according to an embodiment of the present invention;
[0106] Figure 9 This is a schematic diagram of the amplitudes of the IED and HFO signals obtained in a signal reconstruction method according to an embodiment of the present invention;
[0107] Figure 10 Comparison diagrams of HFO and IED source spatial signals reconstructed by the method of the present invention and related technical methods; (A) Two examples of IED and HFO source spatial signals reconstructed using the two methods; (B) Box plots of IED signal amplitude reconstructed by the two methods; (C) Box plots of HFO signal amplitude reconstructed by the two methods.
[0108] Figure 11 A comparison diagram of the number of HFOs detected accompanying IED in the source space signal reconstructed by the method of this invention and related technical methods;
[0109] Figure 12 This is a comparison diagram of the spatial overlap between the HFO source tracing and localization results obtained by the method of this invention and related technical methods and the clinical localization area. Detailed Implementation
[0110] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below. However, it should be understood that the description herein is merely illustrative and not intended to limit the scope of the invention.
[0111] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. All characterization techniques mentioned herein can be found in relevant descriptions in the prior art, and will not be repeated here.
[0112] To further understand the present invention, the present invention will be further described in detail below with reference to the preferred embodiments.
[0113] Example 1
[0114] like Figure 1-8 As shown, an IED event detection method includes:
[0115] S101: Get peak points: Get the peak points and trough points in the data, and combine the peak points and trough points into peak points in chronological order;
[0116] S102: Obtain candidate peak points for IED: Calculate the feature value of the peak point; select the peak point whose feature value is greater than a preset threshold as candidate peak points for IED;
[0117] S103: Obtain IED template: Using the IED candidate peak point as the center, extract signal segments of a preset length, and use hierarchical clustering method to cluster all the signal segments into IED template;
[0118] S104: Obtain IED peak points: For each IED candidate peak point, calculate the similarity feature P of the IED candidate peak point. Sim , will P Sim IED candidate peak points that exceed a preset threshold are taken as IED peak points;
[0119] S105: Obtain IED event: Obtain IED sampling point based on the IED peak point, and obtain the IED event and the IED main peak corresponding to the IED event based on the IED sampling point.
[0120] The data referred to is MEG data, which, unless otherwise specified, refers to the channel data recorded by each MEG sensor.
[0121] Example 2
[0122] Furthermore, methods for obtaining peaks and troughs in a signal include:
[0123] S201: Filters the data using a bandpass filter from 3Hz to 80Hz and a notch filter from 50Hz; smooths the data using a 20ms smoothing kernel;
[0124] S202: Sampling points with signal amplitudes greater than those of the adjacent signals on both sides are designated as candidate peak points; sampling points with signal amplitudes less than those of the adjacent signals on both sides are designated as candidate trough points.
[0125] S203: The sampling point corresponding to the minimum unsmoothed signal amplitude between two adjacent candidate peaks is taken as the valley point; the sampling point corresponding to the maximum unsmoothed signal amplitude between two adjacent candidate valleys is taken as the peak point.
[0126] The reason for choosing the unsmoothed signal amplitude value is that smoothing operations would cause the peak points to shift in the time dimension. Using the above method, signal alignment between IED segments is achieved on a peak-to-trough basis.
[0127] Further: The method for obtaining candidate peak points of IED includes:
[0128] S301: Calculate duration P Dur Amplitude P Amp and slope P Slope The calculation formula is as follows:
[0129] P Dur =T n+1 -T n-1 (1)
[0130]
[0131]
[0132] In the formula, ΔV n equals V n -V n-1 ;ΔT n equal to T n -T n-1 ;T n V is the time of the peak point. n The peak point signal amplitude is n; n is the peak point index.
[0133] S302: Calculate the amplitude P of each peak point. Amp and slope P Slope Z-values are performed at the sensor dimension. The z-value calculation formula is: Feature z-score =(Feature-Feature) mean ) / Feature stdFeature refers to amplitude or slope. mean and Feature std The mean and variance of the amplitude or slope in the sensor dimension;
[0134] S303: Amplitude P Amp Greater than 0.8 times the maximum amplitude and slope P Slope Peak points with a slope greater than 0.6 times the maximum value are considered as candidate peak points for 1ED.
[0135] The maximum amplitude is the amplitude P of all peak points. Amp The maximum value of the slope; the maximum slope value is the slope P of all peak points. Slope The maximum value.
[0136] Further: In step S103, the preset length is ±50ms; the hierarchical clustering method includes:
[0137] S401: Preprocessing: Normalize the signal segment to between 0 and 1 to obtain a normalized signal segment;
[0138] S402: Calculate the correlation coefficient: For the normalized signal segment S i and S j Calculate the Pearson correlation coefficient Corr(S) i S j If Corr(S) i S j If the result of ) is less than 0, then let S j =1-S j And recalculate the Pearson correlation coefficient Corr(S) i S j );
[0139] S403 calculates similarity:
[0140] For the normalized signal segment S i and S j The similarity calculation formula is as follows:
[0141]
[0142]
[0143] In the formula, n is the number of signal sampling points; t is the sampling point number;
[0144] S404: Select the normalized signal segment with the highest similarity to all normalized signal segments as the cluster center of the current category for clustering. Normalized signal segments with a similarity greater than 0.85 to the cluster center are assigned to the current category, and normalized signal segments assigned to the current category are removed from the normalized signal segments to be clustered.
[0145] S405: Repeat the above steps until all normalized signal segments are assigned to different categories;
[0146] S406: Average the normalized signal segments within all categories to obtain the IED template.
[0147] The Pearson correlation coefficient is a commonly used calculation method, which will not be elaborated here.
[0148] To ensure the representativeness of the IED template, categories with fewer than 5 signal segments within a category are removed. For example... Figure 8 The diagram shows an IED template obtained using hierarchical clustering. The red curve represents each IED template, and the gray curve represents the IED signal segments within the current template. The number after “Cls” represents the template number; the number after “Num” represents the number of IED signal segments within the current template.
[0149] Furthermore: the similarity feature P Sim The method for obtaining it is as follows:
[0150] For each candidate peak point of an IED, a signal segment of ±50ms is extracted from the candidate peak point. The similarity between the signal segment and each IED template is calculated. The maximum similarity between the signal segment and all IED templates is taken as the similarity feature P of the candidate peak point. Sim The similarity is calculated using formula (4).
[0151] The method for obtaining IED sampling points is as follows:
[0152] For each IED peak point, a signal segment from -50ms to 50ms is extracted on both sides of the IED peak point, and the signal is...
[0153] All MEG signals in the segment are defined as IED sampling points;
[0154] The method for obtaining the IED event is as follows:
[0155] If an IED sampling point is detected simultaneously in at least 5 MEG sensors at a given time point, it is defined as an IED event.
[0156] Merge IED events with a time interval of less than 10ms into a single IED event;
[0157] For each IED event, the time point corresponding to the maximum global field energy is used as the IED peak. The global field energy is the sum of squares of the signals recorded by all MEG sensors at each time point.
[0158] Example 3
[0159] Based on Example 1 or 2, such as Figure 1-6 As shown, a signal reconstruction method, based on the aforementioned IED event detection method, includes:
[0160] S501: Signal segmentation: For each IED event, obtain the segment of interest and the corresponding baseline signal based on the IED main peak;
[0161] S502: Coarse search: The coarse search component divides the spherical coordinate system into multiple coarse search directions, and for each coarse search direction, obtains the optimal direction θ of the coarse search;
[0162] S503: Fine search: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ; for each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
[0163] Example 4
[0164] Based on Embodiment 3, further: the signal reconstruction is HFO signal reconstruction;
[0165] In the aforementioned signal segmentation method
[0166] For each IED event, a signal segment of ±150ms from the main peak of the IED is acquired and bandpass filtered from 80Hz to 200Hz.
[0167] The signal segment is segmented using a sliding time window with a length of 100ms and an overlap of 50% to obtain the signal segment of interest;
[0168] For each signal segment of interest, a signal segment of ±1000ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest;
[0169] In the coarse search method described above
[0170] In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions;
[0171] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0172] The source space signal is calculated using the following formula, where Let be the transmission matrix. Let be the covariance matrix of the MEG sensor signal, [·] -1 For the inverse operation of a matrix, [·] T This is the transpose of the matrix.
[0173]
[0174] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0175] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0176] The mean of the source space signal envelope of the segment of interest after z-value conversion is used as the objective function of the HFO signal amplitude, and the direction that maximizes the objective function is used as the optimal direction θ for coarse search.
[0177] In the refined search method described above
[0178] For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions;
[0179] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0180] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0181] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0182] The mean value of the source space signal envelope of the segment of interest after z-value conversion is used as the objective function of the HFO signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated according to Formula 1.1.
[0183] The use of a sliding time window of 100ms with 50% overlap is due to the fact that the duration of HFO is generally less than 100ms. Acquiring the baseline signal of the segment of interest is to perform z-value conversion on the segment of interest, thereby obtaining more accurate results.
[0184] In the coarse search, when determining the search direction in the spherical space, since source space signals with opposite directions have the same amplitude, only directions distributed in the hemispherical space are considered for searching, thus saving computational resources. For example... Figure 9 This diagram illustrates the amplitudes of the IED and HFO signals, with the IED signal amplitude on the left and the HFO signal amplitude on the right.
[0185] The Hilbert transform is a common processing method in the field of signal processing, and will not be elaborated on here.
[0186] Furthermore: the signal reconstruction is an IED signal reconstruction;
[0187] In the aforementioned signal segmentation method
[0188] For each 1ED event, a signal segment of ±100ms from the main peak of the 1ED is acquired as the signal segment of interest, and bandpass filtering from 3Hz to 80Hz and notch filtering from 50Hz are applied.
[0189] For each signal segment of interest, a signal segment of ±1000ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest;
[0190] In the coarse search method described above
[0191] In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions;
[0192] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0193] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0194] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0195] The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude, and the direction that maximizes the objective function is taken as the optimal direction θ for coarse search.
[0196] In the refined search method described above
[0197] For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions;
[0198] For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal;
[0199] The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform.
[0200] Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal;
[0201] The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated.
[0202] By using the above method, the signal is divided into time segments equivalent to IED and HFO segments, and a two-stage search algorithm of coarse and fine search is used to reconstruct the discharge direction for each IED and HFO segment.
[0203] Figure 10 (A)-(C) show that, in 11 patients with epilepsy, the IED event detection method and signal reconstruction method of the present invention can improve the signal-to-noise ratio of the reconstructed signal compared to existing methods. Figure 10 (A) illustrates two examples where the present invention can simultaneously reconstruct significant IED and HFO waveforms, while existing methods can only reconstruct significant IED or HFO waveforms. Figure 10 (B) and (C) show that the reconstructed IED and HFO signal in this invention are significantly higher than those of existing methods. Each orange or blue dot represents the source spatial signal amplitude for each patient, and * indicates a p-value of less than 0.05 for the statistical results.
[0204] like Figure 11 As shown, this invention can increase the number of automatically detected HFO and IED fragments. The bar chart represents the average number of HFOs associated with IED detected per patient, where the gray area represents the number of HFO events detected in both reconstructed source space signals, and the white area represents the number of HFO events detected individually. Each orange or blue dot represents the number of HFOs detected per patient. * in the figure indicates a p-value less than 0.05 for the statistical results. The higher gray area indicates that this invention essentially does not miss HFO events detected by existing methods.
[0205] Figure 12The spatial overlap between the HFO localization results obtained using the present invention and related comparative techniques and the actual localization area is compared. The results show that the present invention can significantly improve the predictive ability of HFO localization for epileptic foci in patients with IED. Each orange or blue dot represents the spatial overlap between the HFO localization result and the actual localization area in each patient. * in the figure indicates that the p-value of the statistical result is less than 0.05.
[0206] Example 5
[0207] Based on Examples 1-4, such as Figure 1-6 As shown, an IED event detection device uses the method described above, the device comprising:
[0208] Peak point acquisition module: Acquires the peak points and trough points in the signal, and combines the peak points and trough points into peak points in chronological order;
[0209] Feature value calculation module: calculates the feature value of the peak point; and selects the peak points whose feature values are greater than a preset threshold as 1ED candidate peak points;
[0210] Hierarchical clustering module: Taking the candidate peak point of the IED as the center, the module extracts a signal segment of a preset length and uses a hierarchical clustering method to cluster all the signal segments into an IED template.
[0211] IED Peak Point Acquisition Module: For each IED candidate peak point, a signal segment of preset length is extracted to obtain the similarity feature P of the IED candidate peak point. Sim , will P Sim IED candidate peak points that exceed a preset threshold are taken as IED peak points;
[0212] IED event acquisition module: acquires IED sampling points based on the IED peak points, and acquires the IED event and the corresponding IED main peak based on the IED sampling points.
[0213] Example 6
[0214] Based on Examples 1-4, such as Figure 1-7 As shown, a signal reconstruction system uses the method described above, the system comprising:
[0215] IED event detection device: The device is the one described above;
[0216] Signal segmentation component: For each 1ED event, obtain the segment of interest and the corresponding baseline signal based on the 1ED main peak;
[0217] Coarse search component: The coarse search component divides the spherical coordinate system into multiple coarse search directions, and for each coarse search direction, obtains the optimal direction θ of the coarse search;
[0218] Fine search component: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ; for each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
[0219] Example 7
[0220] The template-matching-based automatic IED detection method mainly consists of five steps:
[0221] a) Detecting peaks and troughs in MEG data. We filter the data using a bandpass filter from 3Hz to 80Hz and a 50Hz notch filter. For each channel, we smooth the data using a 20ms smoothing kernel to reduce the impact of noise on peak detection. For the smoothed signal, we consider sampling points with signal amplitudes greater than their adjacent amplitudes (the amplitudes of the preceding and following sampling points) as candidate peaks; and sampling points with amplitudes less than their adjacent amplitudes as candidate troughs. Considering that the smoothing operation will cause a shift of peaks in the time dimension, we take the sampling point corresponding to the minimum unsmoothed signal amplitude between two adjacent candidate peaks as the trough; and the sampling point corresponding to the maximum unsmoothed signal amplitude between two adjacent candidate troughs as the peak. Then, we combine the peaks and troughs in time order to form the peak point. The peak point time and the corresponding signal amplitude are denoted as T. n and V n .
[0222] b) Calculate the eigenvalues of the peak points. For each detected peak point, we calculate its duration (P). Dur ), amplitude (P) Amp ) and slope (P Slope Three eigenvalues:
[0223] P Dur =T n+1 -T n-1 #(1)
[0224]
[0225]
[0226] In the formula ΔV n equals V n -V n-1 ;ΔT n equal to T n -T n-1The amplitude and slope values corresponding to each peak point are z-valued along the channel dimension. Finally, we will... Amp and P Slope Peak points that are all greater than the corresponding threshold are used as candidate peak points for IED.
[0227] c) Generate the IED template. First, we select P Amp Greater than 0.8 times the maximum value and P Slope IED candidate peak points with a value greater than 0.6 times the maximum value were selected, and signal segments 50ms before and after these peak points were extracted for IED template clustering. A hierarchical clustering method was used to cluster signal segments with similar waveforms into IED templates: First, for all signal segments used for clustering, the similarity matrix Y between signals was calculated using the Pearson correlation coefficient and Euclidean distance. For segment S... i and S j The similarity calculation formula is as follows:
[0228]
[0229]
[0230] In the formula S i and S j The signal segment is normalized to a value between 0 and 1; n is the number of sampling points in the signal; Corr(S i S j ) is S i and S j The Pearson correlation coefficient of the signal segment. In calculating Dist(S)... i S j Before, if Corr(S) i S j If the result of ) is less than 0, then S j Updated to 1-S j Then, based on the similarity matrix Y, the segment with the highest similarity to all signal segments is selected as the cluster center of the new category. Signal segments with a similarity greater than 0.85 to the cluster center are assigned to the new category, and these signals are removed from the similarity matrix Y. This process is repeated until all signal segments are assigned to different categories. The intra-category signals are then averaged to obtain the IED template. To ensure the representativeness of the IED template, categories with fewer than 5 intra-category signal segments are removed.
[0231] d) Obtain IED peak points using template matching. For each IED candidate peak point, extract 50ms of signal segments before and after it, and calculate the similarity between the signal segments and each IED template using Formula 4. The maximum similarity between each signal segment and all IED templates is taken as the similarity feature P of the corresponding IED candidate peak point. Sim Finally, P Sim Candidate peak points of IEDs that exceed the threshold are taken as the final detected peak points of IEDs.
[0232] e) Obtain IED events based on IED peak points. We define all sampling points in the 100ms signal segment corresponding to each IED peak point as IED sampling points. For a given time point, if IED sampling points are detected simultaneously in at least 5 channels, it is defined as an IED time point. Then, consecutive IED time points are combined into an IED event. If the time interval between adjacent IED events is less than 10ms, they are merged into one IED event. Finally, for each IED event, the time point corresponding to the maximum global field energy is used as the IED main peak.
[0233] Example 8
[0234] The HFO source spatial information reconstruction method based on direction search consists of three steps:
[0235] a) Signal Segmentation. For each IED event, a 150ms to 150ms MEG signal segment around its main peak is acquired and bandpass filtered from 80Hz to 200Hz. Considering that the duration of the HFO is generally less than 100ms, a 100ms sliding time window with 50% overlap is used to segment the 300ms signal segment, resulting in 5 segments of interest (SOIs). For each SOI, 1000ms of data before and after the segment are extracted as the baseline signal for that segment.
[0236] b) Coarse search of source space directions. For any source space location, all possible discharge directions are distributed within a unit spherical space. Since source space signals with opposite directions have the same amplitude, we only need to search for directions distributed in the hemispherical space. In the spherical coordinate system, the polar angle and azimuth angle are sampled from 0° to 180° in 10° steps, resulting in 324 unit directions. For each direction, the conduction matrix is projected onto that direction, and the source space signals of the SOI signal and the corresponding baseline signal from step a) are reconstructed. The envelope of the source space signal is calculated using the Hilbert transform, and the variance and mean of the baseline source space signal envelope are used to z-value the SOI envelope signal to obtain the relative intensity of the SOI signal relative to the baseline signal. The mean of the z-valued SOI envelope signal is used as the objective function representing the amplitude of the HFO signal. The direction that maximizes the objective function is taken as the optimal direction θ for the coarse search.
[0237] c) Fine-grained search for the source space direction. For the optimal direction θ obtained from the coarse search, we perform fine-grained sampling of its surrounding directions: sampling in a step size of 1° within the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, resulting in 121 unit directions. The search paradigm in step 2 is repeated for these 121 directions, and the optimal direction is obtained as the final HFO source space discharge direction. The corresponding source space signal is then calculated using Equation 1.1.
[0238] The direction-search-based IED source space signal reconstruction method is similar to HFO: For an IED event, the raw MEG data is first bandpass filtered from 3Hz to 80Hz and notch filtered at 50Hz. Considering that the main peak position of the IED has already been marked in the MEG data, during signal segmentation, only the signal within a 100ms time window around the main peak is taken as the signal of interest (SOI), and the signal within -1000ms to 1000ms around it is taken as the baseline signal. Then, the objective function for IED discharge direction search is defined as follows: For any direction, reconstruct the source space signals of the SOI and the baseline, and use the baseline source space signal to z-value the SOI signal. The peak-to-peak value within the z-valued SOI signal is used as the objective function representing the amplitude of the IED signal. Based on the objective function, a two-stage search algorithm of coarse search and fine search is used to estimate the optimal IED discharge direction and reconstruct the corresponding IED source space signal. The peak-to-peak value refers to the difference between the highest and lowest values of the signal within one period, which is the range between the maximum and minimum. It describes the magnitude of the range of signal value variation.
[0239] In embodiments of the present invention, the methods, apparatus, and devices of the present invention can be used to process MEG data. It is understood that the methods, apparatus, and devices are not limited to the above applications; for example, they can also be used in methods for processing data such as EEG. The methods, apparatus, and devices of the present invention can rapidly process relevant data, thereby quickly providing a basis for related research.
[0240] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting IED events, characterized in that: include: S101: Obtain peak points: Obtain the peak points and trough points in the signal, and combine the peak points and trough points into peak points in time order; S102: Obtain candidate peak points for IED: Calculate the feature values of the peak points; Peak points whose feature values are greater than a preset threshold are selected as candidate peak points for IED; S103: Obtain IED template: Using the IED candidate peak point as the center, extract signal segments of a preset length, and use hierarchical clustering method to cluster all the signal segments into IED template; S104: Obtain IED peak points: For each IED candidate peak point, calculate the similarity feature of the IED candidate peak point. ,Will Candidate peak points of IEDs exceeding a preset threshold are used as IED peak points; the similarity feature The acquisition method is as follows: For each IED candidate peak point, a signal segment of ±50 ms is extracted from the IED candidate peak point, the similarity between the signal segment and each IED template is calculated, and the maximum similarity between the signal segment and all IED templates is taken as the similarity feature of the IED candidate peak point. ; S105: Obtain IED event: Obtain IED sampling point based on the IED peak point, and obtain the IED event and the IED main peak corresponding to the IED event based on the IED sampling point; The methods for obtaining the peaks and troughs in a signal include: S201: Filters the data using a bandpass filter from 3 Hz to 80 Hz and a 50 Hz notch filter; smooths the data using a 20 ms smoothing kernel; S202: Sampling points with signal amplitudes greater than those of the adjacent signals on both sides are designated as candidate peak points; sampling points with signal amplitudes less than those of the adjacent signals on both sides are designated as candidate trough points. S203: The sampling point corresponding to the minimum unsmoothed signal amplitude between two adjacent candidate peaks is taken as the valley point; the sampling point corresponding to the maximum unsmoothed signal amplitude between two adjacent candidate valleys is taken as the peak point.
2. The method as described in claim 1, characterized in that: The methods for obtaining candidate peak points of IED include: S301: Calculate duration Amplitude and slope The calculation formula is as follows: In the formula, equal ; equal ; The time of the peak point, The peak point signal amplitude is n; n is the peak point index. S302: Calculate the amplitude of each peak point. and slope Perform z-value conversion in the channel dimension; S303: Amplitude Greater than 0.8 times the maximum amplitude and slope Peak points with a slope greater than 0.6 times the maximum value are considered as candidate peak points for IED. The maximum amplitude is the amplitude of all peak points. The maximum value of the slope; the maximum slope is the slope of all peak points. The maximum value.
3. The method as described in claim 1, characterized in that: In step S103, the preset length is ±50 ms; the hierarchical clustering method includes: S401: Preprocessing: Normalize the signal segment to between 0 and 1 to obtain a normalized signal segment; S402: Calculate the correlation coefficient: For the normalized signal segment and Calculate the Pearson correlation coefficient. ,if If the result is less than 0, then let = And recalculate the Pearson correlation coefficient. ; S403: Calculate similarity: For normalized signal segments and The similarity calculation formula is as follows: , , In the formula, It is the number of sampling points for the signal; S404: Select the normalized signal segment with the highest similarity to all normalized signal segments as the cluster center of the current category for clustering. Normalized signal segments with a similarity greater than 0.85 to the cluster center are assigned to the current category, and normalized signal segments assigned to the current category are removed from the normalized signal segments to be clustered. S405: Repeat the above steps until all normalized signal segments are assigned to different categories; S406: Average the normalized signal segments within all categories to obtain the IED template.
4. The method as described in claim 1, characterized in that: The method for obtaining IED sampling points is as follows: For each IED peak point, a signal segment from -50ms to 50ms is extracted on both sides of the IED peak point, and all MEG signals in the signal segment are defined as IED sampling points; The method for obtaining the IED event is as follows: If an IED sampling point is detected simultaneously in at least 5 MEG sensors at a given time point, it is defined as an IED event. IED events with a time interval of less than 10 ms will be merged into one IED event; For each IED event, the time point corresponding to the maximum global field energy is used as the IED peak.
5. A method for signal reconstruction, characterized in that: The IED event detection method according to any one of claims 1-4 includes: S501: Signal segmentation: For each IED event, obtain the segment of interest and the corresponding baseline signal based on the IED main peak; S502: Coarse Search: The coarse search component divides the spherical coordinate system into multiple coarse search directions. For each coarse search direction, it obtains the optimal direction θ for the coarse search. S503: Fine Search: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ. For each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
6. The method as described in claim 5, characterized in that: The signal reconstruction is an HFO signal reconstruction; In the signal segmentation For each IED event, a signal segment of ±150 ms from the main peak of the IED is acquired and bandpass filtered from 80 Hz to 200 Hz. The signal segment is segmented using a sliding time window with a length of 100 ms and an overlap of 50% to obtain the signal segment of interest; For each signal segment of interest, a signal segment of ±1000 ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest; In the coarse search, In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions; For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal; The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform. Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal; The mean of the source space signal envelope of the segment of interest after z-value conversion is used as the objective function of the HFO signal amplitude, and the direction that maximizes the objective function is used as the optimal direction θ for coarse search. In the refined search, For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions; For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal; The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform. Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal; The mean value of the source space signal envelope of the segment of interest after z-value transformation is used as the objective function of the HFO signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated.
7. The method as described in claim 5, characterized in that: The signal reconstruction is an IED signal reconstruction; In the aforementioned signal segmentation method For each IED event, a signal segment of ±100 ms from the main peak of the IED is acquired as the signal segment of interest, and bandpass filtering from 3 Hz to 80 Hz and notch filtering from 50 Hz are applied. For each signal segment of interest, a signal segment of ±1000 ms is extracted from the signal segment of interest as the baseline signal of the signal segment of interest; In the coarse search method described above In spherical coordinates, the polar angle and azimuth angle are sampled from 0° to 180° in 10° increments to obtain 324 unit directions; For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal; The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform. Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal; The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude, and the direction that maximizes the objective function is taken as the optimal direction θ for coarse search. In the refined search method, For the optimal direction θ of the coarse search, sampling is performed in the interval of -5° to 5° around the polar angle and azimuth angle corresponding to θ, with a step size of 1°, to obtain 121 unit directions; For each direction, the transmission matrix is projected onto that direction to obtain the source space signal of the segment of interest and the source space signal of the baseline signal; The source space signal envelope of the segment of interest and the source space signal envelope of the baseline signal are calculated using the Hilbert transform. Then, the source spatial signal envelope of the segment of interest is z-valued using the variance and mean of the source spatial signal envelope of the baseline signal; The peak-to-peak value of the source space signal envelope of the z-valued segment of interest is used as the objective function of the IED signal amplitude. The direction that maximizes the objective function is taken as the source space discharge direction θ', and the corresponding source space signal is calculated.
8. An IED event detection device, characterized in that: Using the method as described in any one of claims 1-4, the apparatus comprises: Peak point acquisition module: Acquires the peak points and trough points in the signal, and combines the peak points and trough points into peak points in chronological order; Feature value calculation module: calculates the feature value of the peak point; and selects the peak points whose feature values are greater than a preset threshold as candidate peak points for IED. Hierarchical clustering module: Taking the candidate peak point of the IED as the center, the module extracts a signal segment of a preset length and uses a hierarchical clustering method to cluster all the signal segments into an IED template. IED Peak Point Acquisition Module: For each IED candidate peak point, a signal segment of preset length is extracted to obtain the similarity features of the IED candidate peak points. ,Will IED candidate peak points that exceed a preset threshold are used as IED peak points; IED event acquisition module: acquires IED sampling points based on the IED peak points, and acquires the IED event and the corresponding IED main peak based on the IED sampling points; The methods for obtaining peak and trough points in a signal through the peak point acquisition module include: The data was filtered using a bandpass filter from 3 Hz to 80 Hz and a notch filter from 50 Hz; the data was smoothed using a smoothing kernel of 20 ms. Sampling points with signal amplitudes greater than those of the adjacent signals on both sides are designated as candidate peak points; sampling points with signal amplitudes less than those of the adjacent signals on both sides are designated as candidate trough points. The sampling point corresponding to the minimum unsmoothed signal amplitude between two adjacent candidate peaks is taken as the valley point; the sampling point corresponding to the maximum unsmoothed signal amplitude between two adjacent candidate valleys is taken as the peak point.
9. A signal reconstruction system, characterized in that: Using the method as described in any one of claims 1-7, the system comprises: IED event detection device: The device is the device as described in claim 8; Signal segmentation component: For each IED event, obtain the segment of interest and the corresponding baseline signal based on the IED main peak; Coarse search component: The coarse search component divides the spherical coordinate system into multiple coarse search directions, and for each coarse search direction, obtains the optimal direction θ of the coarse search; Fine search component: The fine search component divides the coarse search into multiple fine search directions based on the optimal direction θ; for each fine search direction, it obtains the source space discharge direction θ' and calculates the corresponding source space signal.
Citation Information
Patent Citations
Epilepsia electroencephalogram signal classified detection device and method
CN102429657A
Automatic detection method for epilepsy electroencephalography (EEG) / magnetoencephalography (MEG) abnormal waves and positioning system
CN112220485A
