High-density electroencephalogram signal processing method, device and equipment
By quantifying channel bias and correlation in multiple dimensions, noise channels in high-density EEG signals are identified and eliminated, solving the noise problem in high-density EEG signal processing, improving signal quality, and facilitating subsequent analysis.
Patent Information
- Application Number
- CN202411322620.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing technologies struggle to effectively process noise information in high-density EEG signals, leading to significant challenges in signal decoding. Furthermore, existing methods are difficult to apply to high-density, high-frequency EEG signals.
By quantifying the channel deviation variables, correlations, and power spectral densities from multiple dimensions in the time and frequency domains, abnormal channels are identified and eliminated. This includes calculating the channel deviation variables, the correlation between adjacent channels, and the frequency domain power spectral density, and classifying or eliminating noise information.
It preserves useful information to the greatest extent, improves the quality of high-density EEG signals, facilitates subsequent analysis and processing, and reduces the difficulty of signal decoding.
Smart Images

Figure CN119184621B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electroencephalogram (EEG) signal processing technology, and in particular to a high-density EEG signal processing method, apparatus, and device. Background Technology
[0002] Electroencephalogram (EEG) signals contain a wealth of physiological and pathological information. Currently, non-invasive, semi-invasive, and invasive brain-computer interfaces (BCIs) are used to acquire EEG signals. Non-invasive BCIs, because they do not directly contact the cerebral cortex, acquire signals with lower accuracy and resolution. In contrast, invasive BCI electrodes are implanted directly into the gray matter of the brain, allowing the reception of stronger, quieter neural signals. They can collect a large amount of intrinsic signals and offer advantages such as high accuracy, high resolution, and high signal-to-noise ratio. High-density implantable BCIs can capture more neuronal activity information and provide more refined EEG signals; therefore, high-density implantable BCIs represent a new area of in-depth research.
[0003] High-density brain-computer interfaces (BCIs) acquire high-quality signals and a wealth of valuable information. However, due to the large number of channels and high sampling frequency, high-density BCIs generate a very large amount of data in experiments, and signal crossover can occur due to the close proximity of adjacent channels. Current processing methods for non-high-density, low-frequency EEG signals acquired through EEG and ECOG are difficult to apply to high-density, high-frequency EEG signals. Summary of the Invention
[0004] The main objective of this invention is to provide a high-density electroencephalogram (EEG) signal processing method, apparatus, and device, which aims to solve at least one of the above-mentioned problems.
[0005] To achieve the above objectives, the present invention provides a high-density electroencephalogram (EEG) signal processing method, comprising:
[0006] Acquire raw data of high-density electroencephalogram (EEG) signals;
[0007] Based on the original data, the inter-channel deviation variable is calculated from the time domain dimension to obtain the first abnormal channel;
[0008] Based on the original data, the correlation between adjacent channels is quantified in the time domain to obtain the second abnormal channel;
[0009] Based on the original data, the power spectral density and correlation are quantized from the frequency domain dimension to obtain the third anomaly channel;
[0010] Based on the first, second, and third abnormal channels, channels are classified or eliminated to obtain optimized high-density EEG signals.
[0011] In some embodiments, calculating the inter-channel deviation variable from the time domain dimension based on the original data to obtain the first abnormal channel includes:
[0012] The original data is converted into a data matrix; wherein the data matrix includes multiple channels;
[0013] Calculate the volatility quantification index value for each of the channels;
[0014] Calculate the median value of the volatility quantification index;
[0015] The first abnormal channel is determined based on the comparison result between the fluctuation quantification index value of the channel and the preset threshold parameter and the median value.
[0016] In some embodiments, determining the first abnormal channel based on a comparison between the channel's fluctuation quantification index value and a preset threshold parameter and the median includes:
[0017] Set the upper threshold multiple and lower threshold multiple according to the preset threshold parameters;
[0018] The first threshold is set based on the product of the lower threshold multiple and the median;
[0019] A second threshold is set based on the product of the upper threshold multiple and the median;
[0020] The fluctuation quantification index value of the channel is compared with the first threshold and the second threshold;
[0021] When the fluctuation quantification index value of the channel is less than the first threshold or greater than the second threshold, a first abnormal channel is identified.
[0022] In some embodiments, the step of quantifying the correlation between adjacent channels in the time domain based on the original data to obtain the second anomalous channel includes:
[0023] The original data is converted into a data matrix; wherein the data matrix includes multiple channels;
[0024] A circular region is constructed with the center point of the channel as the center and a preset signal range as the radius.
[0025] The channel whose center point is located within the circular area is considered as an adjacent channel;
[0026] Multiple starting positions are randomly selected, and data of a preset length is extracted based on the starting positions to obtain multiple data segments;
[0027] For each channel, the data segments are spliced together to obtain the data block corresponding to that channel;
[0028] The correlation between adjacent channels is quantified based on each data block to obtain the second abnormal channel.
[0029] In some embodiments, quantifying the correlation of adjacent channels based on each data block to obtain a second anomalous channel includes:
[0030] Calculate a quantitative index of the correlation between the channel of each data block and its corresponding adjacent channel;
[0031] Construct a sequence based on the aforementioned quantitative indicators;
[0032] Calculate the median of the sequence to obtain the standard correlation of each channel;
[0033] Set an adjacent threshold;
[0034] When the standard correlation of a channel is less than the adjacent threshold, a second abnormal channel is identified.
[0035] In some embodiments, the step of quantizing the power spectral density and correlation from the frequency domain dimension based on the original data to obtain the third anomalous channel includes:
[0036] The original data is converted into a data matrix; wherein the data matrix includes multiple channels;
[0037] Multiple starting positions are randomly selected, and data of a preset length is extracted based on the starting positions to obtain multiple data blocks;
[0038] The channel positions are sorted according to their location information to obtain a sorting result; wherein, the sorting result includes the channel number and the index number;
[0039] The data blocks are sorted according to their channel numbers to obtain the data order result;
[0040] Based on the data sequence results, the power spectral density is quantized from the frequency domain dimension to obtain the noise channel;
[0041] Based on the data order results, the correlation is quantified from the frequency domain dimension to obtain the abnormal channels;
[0042] Labels are set for the channels of each data block according to the noise channel and the abnormal channel to obtain a label sequence;
[0043] The mode of the label sequence is taken to obtain the third abnormal channel.
[0044] In some embodiments, the step of quantizing the power spectral density from the frequency domain dimension based on the data order results to obtain the noise channel includes:
[0045] Set the window function, number of samples, and sampling frequency;
[0046] Based on the window function, the number of samples, and the sampling frequency, the power spectral density of the data sequence results is calculated on a channel-by-channel basis to obtain the frequency axis of each channel and the power spectral density estimate of the corresponding frequency.
[0047] The high-frequency power quantization index for each channel is calculated based on the Naquist frequency threshold and the power spectral density estimates of the frequency axis and the corresponding frequency.
[0048] Set the power spectral density threshold;
[0049] A noise channel is identified when the high-frequency power quantization index of the channel is greater than the power spectral density threshold.
[0050] In some embodiments, the step of quantizing the correlation from the frequency domain dimension based on the data order results to obtain the abnormal channels includes:
[0051] The median of the ordered data results is calculated based on the data sequence dimension;
[0052] The correlation is calculated based on the median and the data order results to obtain the first correlation result;
[0053] The first correlation result is smoothed to obtain the second correlation result;
[0054] The correlation difference result for each channel is obtained based on the difference between the first correlation result and the second correlation result;
[0055] Set a correlation threshold;
[0056] When the correlation difference of a channel is greater than the correlation threshold, an abnormal channel is identified.
[0057] Furthermore, to achieve the above objectives, the present invention also proposes a high-density electroencephalogram (EEG) signal processing device, comprising:
[0058] The data acquisition module is used to acquire raw data of high-density electroencephalogram (EEG) signals.
[0059] The time-domain analysis module is used to calculate the inter-channel deviation variable from the time-domain dimension based on the raw data to obtain the first abnormal channel;
[0060] The time-domain analysis module is also used to quantify the correlation between adjacent channels from the time-domain dimension based on the original data to obtain the second abnormal channel;
[0061] The frequency domain analysis module is used to quantify the power spectral density and correlation from the frequency domain dimension based on the original data to obtain the third anomaly channel;
[0062] The signal processing module is used to classify or eliminate channels based on the first abnormal channel, the second abnormal channel, and the third abnormal channel to obtain optimized high-density EEG signals.
[0063] Furthermore, to achieve the above objectives, the present invention also proposes an electronic device comprising: a memory, a processor, and a high-density EEG signal processing program stored in the memory and executable on the processor, the high-density EEG signal processing program being configured to implement the high-density EEG signal processing method as described above.
[0064] This invention provides a high-density EEG signal processing method, comprising: acquiring raw data of a high-density EEG signal; calculating inter-channel deviation variables from the time domain based on the raw data to obtain a first abnormal channel; quantifying the correlation of adjacent channels from the time domain based on the raw data to obtain a second abnormal channel; quantifying power spectral density and correlation from the frequency domain based on the raw data to obtain a third abnormal channel; and classifying or eliminating channels based on the first, second, and third abnormal channels to obtain an optimized high-density EEG signal. In this invention, high-density EEG signal noise information processing is performed from multiple dimensions. Calculating inter-channel deviation variables from the time domain can identify abnormal channels with large deviations relative to other channels; quantifying the correlation of adjacent channels from the time domain, identifying abnormal channels by utilizing the crossover characteristics of adjacent channel signals; and defining channel abnormalities from multiple dimensions using power spectral density and correlation indicators from the frequency domain and correlation dimensions, thereby classifying or eliminating noise information, preserving useful information to the greatest extent, and obtaining a high-quality high-density EEG signal for subsequent analysis and processing. Attached Figure Description
[0065] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention;
[0066] Figure 2 This is a flowchart illustrating an embodiment of the high-density EEG signal processing method of the present invention;
[0067] Figure 3 This is a schematic diagram illustrating the calculation process of inter-channel deviation variables in the time domain dimension involved in the embodiments of the present invention;
[0068] Figure 4 This is a schematic diagram of the calculation process for quantifying the correlation between adjacent channels in the time domain dimension in the embodiment of the present invention.
[0069] Figure 5 This is a schematic diagram of the time-domain nearest neighbor calculation involved in the embodiment of the present invention;
[0070] Figure 6 This is a schematic diagram illustrating the calculation process of frequency domain dimension quantization power spectral density and correlation involved in the embodiments of the present invention;
[0071] Figure 7 This is a structural block diagram of an embodiment of the high-density EEG signal processing device of the present invention.
[0072] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0073] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0074] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0075] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention.
[0076] Reference Figure 1 , Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention.
[0077] like Figure 1As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.
[0078] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0079] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a high-density EEG signal processing program.
[0080] exist Figure 1 In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device, and the electronic device calls the high-density EEG signal processing program stored in the memory 1005 through the processor 1001 and executes the high-density EEG signal processing method provided in the embodiment of the present invention.
[0081] This invention proposes a method, apparatus, and device for high-density electroencephalogram (EEG) signal processing.
[0082] This invention provides a high-density electroencephalogram (EEG) signal processing method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the high-density EEG signal processing method of the present invention.
[0083] like Figure 2 As shown, the high-density EEG signal processing method includes:
[0084] Step S100: Acquire raw data of high-density EEG signals;
[0085] Step S200: Calculate the inter-channel deviation variable from the time domain dimension based on the original data to obtain the first abnormal channel;
[0086] Step S300: Quantify the correlation between adjacent channels in the time domain based on the original data to obtain the second abnormal channel;
[0087] Step S400: Quantize the power spectral density and correlation in the frequency domain based on the original data to obtain the third anomalous channel;
[0088] Step S500: Classify or remove channels based on the first abnormal channel, the second abnormal channel, and the third abnormal channel to obtain optimized high-density EEG signals.
[0089] It should be noted that the execution subject in this embodiment can be an electronic device, which can be a computer device with data processing function, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment, a computer device is used as an example for explanation.
[0090] Understandably, high-density brain-computer interfaces (BCIs) acquire high-quality signals containing a wealth of valuable information. However, due to the large number of channels, high sampling frequency, and massive amounts of data collected in experiments, coupled with signal crossover caused by the close proximity of adjacent channels, it is extremely difficult to extract useful information from this massive dataset for signal decoding. This embodiment uses the preprocessing of massive amounts of raw high-density EEG signal data to remove noise and retain as much useful information as possible as the input for subsequent signal decoding as an example. This embodiment describes high-density EEG signal processing from multiple perspectives.
[0091] For example, this embodiment analyzes noise information from both the time and frequency domains. First, it identifies bad channels. Bad channels refer to channels that, during recording, have poor signal quality or are completely unusable due to hardware failure, electrode or lead damage, signal loss, or other reasons. The data collected from these channels will differ significantly from the data collected from other channels. Bad channels can be considered noise channels and excluded from subsequent analysis to avoid interference with the results.
[0092] In one embodiment, calculating the inter-channel deviation variable from the time domain dimension based on the original data to obtain the first abnormal channel includes: converting the original data into a data matrix; wherein the data matrix includes multiple channels; calculating the fluctuation quantization index value of each channel; calculating the median of the fluctuation quantization index values; and determining the first abnormal channel based on the comparison result of the fluctuation quantization index value of the channel with a preset threshold parameter and the median value.
[0093] In one embodiment, determining a first abnormal channel based on a comparison between the channel's fluctuation quantization index value and a preset threshold parameter and the median includes: setting an upper threshold multiple and a lower threshold multiple according to the preset threshold parameter; setting a first threshold based on the product of the lower threshold multiple and the median; setting a second threshold based on the product of the upper threshold multiple and the median; comparing the channel's fluctuation quantization index value with the first threshold and the second threshold; and determining a first abnormal channel when the channel's fluctuation quantization index value is less than the first threshold or greater than the second threshold.
[0094] Specifically, bad channels are calculated from the time domain dimension (first method): the deviation variable of each channel is calculated, and the channel noise is quantified by the deviation variable. When the fluctuation of a signal channel exceeds a certain multiple of the overall fluctuation, the channel will be marked as noisy, that is, a channel affected by interference or other problems (first abnormal channel), which can be removed as needed later.
[0095] For example, such as Figure 3 As shown, the calculation process for the inter-channel deviation variable from the time domain dimension is as follows:
[0096] 1) Let the high-density EEG signal be a data matrix:
[0097]
[0098] Each data matrix has m channels, and the data length of each channel is t.
[0099] 2) Calculate the MAD value (volatility quantification indicator) for each channel of DensitySignal:
[0100] MAD n =median(|DensitySignal) n -median(DensitySignal n ))|)
[0101] Here, the MAD of each channel is used as a quantitative indicator of channel fluctuation.
[0102] 3) Calculate the median value of MAD for all channels:
[0103] MAD med =median([MAD1, MAD2, MAD3,..., MAD n ])
[0104] 4) Set the upper threshold multiplier up_threshold and the lower threshold multiplier down_threshold. If MAD n <down_threshold*MAD med or MAD n >up_threshold*MAD med If n is a channel (e.g., marked as the first abnormal channel), it can be removed as needed later.
[0105] In this embodiment, the MAD value can be used to quantify the deviation of each channel, and channels with larger deviations relative to other channels can be eliminated. For example, the lower threshold multiple (down_threshold) and upper threshold multiple (up_threshold) in the preset threshold parameters can be preset according to actual conditions. For instance, the default settings are down_threshold 0.5 and up_threshold 3, but this embodiment does not impose any limitations on this.
[0106] In one embodiment, quantifying the correlation between adjacent channels in the time domain based on the original data to obtain a second abnormal channel includes: converting the original data into a data matrix; wherein the data matrix includes multiple channels; constructing a circular region with the center point of the channel as the center and a preset signal range as the radius; designating channels whose center point is located within the circular region as adjacent channels; randomly selecting multiple starting positions and extracting data of a preset length based on the starting positions to obtain multiple data segments; splicing the data segments for each channel to obtain a data block corresponding to the channel; and quantifying the correlation between adjacent channels based on each data block to obtain a second abnormal channel.
[0107] In one embodiment, obtaining a second abnormal channel by quantifying the correlation of adjacent channels based on each data block includes: calculating a quantification index of the correlation between the channel of each data block and the corresponding adjacent channel; constructing a sequence based on the quantification index; calculating the median of the sequence to obtain the standard correlation of each channel; setting an adjacent threshold; and determining a second abnormal channel when the standard correlation of a channel is less than the adjacent threshold.
[0108] Specifically, bad channels are calculated from the time domain dimension (second method): the characteristic that neighboring channels of high-density EEG signals will produce signal crossover is utilized, and the existing noise channels are identified based on the correlation of neighboring channels. Channels that are different from neighboring channels (second abnormal channels) can be subsequently eliminated.
[0109] For example, such as Figure 4 As shown, the calculation process for quantifying the correlation between adjacent channels in the time domain is as follows:
[0110] 1) Neighbor channel (adjacent channel) label calculation: such as Figure 5 As shown, with a certain channel (e.g.) Figure 5 Using the center point of channel 8) as the center, draw a circular area with radius radius 1. Channels whose center falls within this circular area are the neighboring channels. For example, Figure 5 The diagram shows a circular area with a radius of 100mm, centered on the center point of channel 8. Figure 5 The table on the right shows the center distances of channels 7, 8, and 9 to other channels, and the results of determining whether they are neighboring channels. The comparison between the center distance and a 100mm radius (True or False) determines whether a channel is a neighboring channel. For example, ... Figure 5 As shown, the distance between the center of channel 5 and the center of channel 8 is 90mm. This distance is less than the radius of 100mm, and the comparison result is True. Therefore, channel 5 falls within the circular area of channel 8, and channel 5 is a neighboring channel (adjacent channel) of channel 8.
[0111] It should be noted that since the range of neuron signal propagation is region I [0, 50mm], region II [50mm, 140mm], and region III [140mm, +∞], a radius of approximately 140mm is suitable. If the preset signal range (radius) is set too large, the neuron signal cannot propagate that far, and the neighbor channels will lose their authenticity. If the preset signal range (radius) is set too small, some real neighbor channels will not be recognized. The neighbor matrix (adjacent channel matrix) for each channel can be obtained through calculation:
[0112] neighbors = channels * n
[0113] 2) Data Selection: Randomly select num_chunks starting positions, and extract data (segments) with a length of duration_s (preset length) starting from num_chunks. That is, the length of each data segment is chunks_s = duration_s * frequency, where duration_s is the time length and frequency is the sampling frequency. Finally, concatenate the data segments to obtain a data block. The data block is as follows:
[0114] n_chunks=num_chunks*(duration_s*frequency)*channels
[0115] 3) Calculation:
[0116] For each chunk (data block):
[0117] ① Calculate the square root of the mean after subtracting the median from each channel of the chunk, which is the result of calculating the dispersion of the dataset.
[0118] one_chunk=sqrt{mean{square[chunk-median(chunk)]}}
[0119] (Size: 1 * channel, calculated per channel)
[0120] ② Calculate the square root of the mean after taking the square of the median of the chunk's neighbors, i.e.:
[0121] two_chunk=sqrt{mean{square[chunk[neighbors]-median(chunk[neighbors])]}}
[0122] (Size: 1 * channel, calculated per channel)
[0123] ③ Calculate the mean of each channel's neighboring channels:
[0124] neighbmeans=median(chunk[neighbors])
[0125] ④ Calculate the correlation between channels:
[0126] correlations=(chunk*neighbmeans) / (one_chunk*two_chunk)
[0127] (Size: 1 * channel)
[0128] Through the above calculations, we can obtain a quantitative index of the correlation between each channel of each chunk (data block) and its neighboring channels, forming a sequence correlations_s = [correlations1, correlations2, ..., correlations_num_chunks] (size: num_chunks * channel).
[0129] The standard correlation of each channel is obtained by finding the midpoint of the sequence:
[0130] standard_channels=median(correlations_s)
[0131] Based on the dimension of num_chunks, the size of standard is 1*channel, meaning that the correlation between a channel and its neighboring channels is calculated for multiple data blocks. Finally, the median value of the correlation calculated for each data block represents the correlation between this channel and its neighboring channels (adjacent channels).
[0132] 4) Output of result labels:
[0133] Set a threshold `neighborhood_threshold`. If the standard correlation of channel i, `standard_channels[i]`, is less than `neighborhood_threshold`, then channel i is an abnormal channel (the second abnormal channel).
[0134] In one embodiment, obtaining a third anomalous channel by quantizing power spectral density and correlation in the frequency domain based on the original data includes: converting the original data into a data matrix; wherein the data matrix includes multiple channels; randomly selecting multiple starting positions and extracting data of a preset length based on the starting positions to obtain multiple data blocks; sorting the channels according to their position information to obtain a sorting result; wherein the sorting result includes a channel number and an index number; sorting the channel order of each data block according to the channel number to obtain a data order result; quantizing power spectral density in the frequency domain based on the data order result to obtain a noise channel; quantizing correlation in the frequency domain based on the data order result to obtain an anomalous channel; labeling the channels of each data block according to the noise channel and the anomalous channel to obtain a label sequence; and taking the mode of the label sequence to obtain the third anomalous channel.
[0135] In one embodiment, the power spectral density is quantized from the frequency domain dimension based on the data sequence results to obtain a noise channel, including: setting a window function, a number of samples, and a sampling frequency; calculating the power spectral density of the data sequence results on a channel-by-channel basis according to the window function, the number of samples, and the sampling frequency to obtain the frequency axis and the power spectral density estimate of the corresponding frequency for each channel; calculating the high-frequency power quantization index of each channel based on the Naquist frequency threshold and the power spectral density estimate of the frequency axis and the corresponding frequency; setting a power spectral density threshold; and determining a noise channel when the high-frequency power quantization index of a channel is greater than the power spectral density threshold.
[0136] In one embodiment, quantifying the correlation from the frequency domain dimension based on the data order results to obtain abnormal channels includes: calculating the median of the data order results based on the data sequence dimension; calculating the correlation based on the median and the data order results to obtain a first correlation result; smoothing the first correlation result to obtain a second correlation result; obtaining the correlation difference result of each channel based on the difference between the first correlation result and the second correlation result; setting a correlation threshold; and identifying an abnormal channel when the correlation difference result of a channel is greater than the correlation threshold.
[0137] It should be noted that bad channels are calculated from the frequency domain dimension: coherence and power spectral density. In this embodiment, coherence and power spectral density (PSD) are used to analyze the characteristics and properties of the signal. The coherence function is a tool for analyzing the relationship between two signals. It measures the correlation between them by calculating the phase difference and amplitude difference at different frequencies. High coherence indicates that the two signals have similar phase and amplitude at a certain frequency, meaning they are correlated at that frequency. Coherence can be used to study the interference and correlation between signals. Power spectral density (PSD) is a tool for analyzing the change of signal power with frequency. It represents the power intensity of the signal at different frequencies and can be obtained by performing a Fourier transform on the signal. PSD can be used to study the spectral distribution and power characteristics of a signal, and can be used to analyze the power distribution and frequency domain characteristics of a signal.
[0138] Specifically, such as Figure 6 As shown, the bad channel is calculated from the frequency domain dimension, and the abnormality of the channel is judged by comparing two dimensions. The calculation process is as follows:
[0139] 1) Data Selection: Randomly select num_chunks starting positions, and extract data (segments) with a length of duration_s (preset length) starting from num_chunks. That is, the length of each data segment is chunks_s = duration_s * frequency, where duration_s is the time length and frequency is the sampling frequency. Finally, concatenate the data segments to obtain a data block. The data block is as follows:
[0140] n_chunks=num_chunks*(duration_s*frequency)*channels
[0141] 2) Channel Position Sorting: Based on the channel position information ["x", "y", "z"], sort the channels along a certain dimension, such as ["y"], to obtain the sorting result. For example, sorting by the channel ["y"] value yields the sorting result, including the channel number order_f and the order_r index number.
[0142] 3) Calculation:
[0143] For each chunk (data block): Sort the chunk channels according to the sorting results above (channel number order_f and order_r index number), and get chunk_sorted (data order result), which is the data order sorted from smallest to largest according to a certain dimension.
[0144] Specifically, power PSD calculation (quantizing the power spectral density from the frequency domain to obtain the noise channel):
[0145] ① Setting parameters: window: the window function for segmented signals, for example, the default is the Hanning window "hann"; nperseg: the number of samples in each segment, indicating how many segments the signal will be divided into before the Fourier transform; fs: the sampling frequency, indicating the number of times the signal is sampled per second;
[0146] ② Calculation: Using the parameters set above, perform channel-by-channel calculations on the chunk_sorted (data order results), for example, using functions from the Python scipy package:
[0147] fscale,psd = scipy.signal.welch(chunk_sorted,fs = fs,axis = 0,window = "hann",nperseg = nperseg) yields the following for each channel: fscale: frequency axis, i.e., frequency segmentation; psd: power spectral density estimate for the corresponding frequency.
[0148] ③ Calculate the quantitative indicators of power magnitude:
[0149] Because high-density EEG signal analysis focuses more on high-frequency information, the calculated PSD also prioritizes the energy of the high-frequency components. Parameter: nyquist_threshold, Nyquist frequency threshold.
[0150] Calculation method:
[0151] psd_hf=mean(psd[fscale>(fs / 2*nyquist_threshold),:], axis=0)
[0152] psd_hf is a quantization index of the power of each channel in the high-frequency range.
[0153] ④ Result judgment:
[0154] Parameter: psd_threshold
[0155] If psd_hf > psd_threshold, then the corresponding channel is the noise channel.
[0156] Specifically, the coherence calculation (quantifying the correlation from the frequency domain dimension to obtain anomalous channels):
[0157] ① Calculate the median for chunk_sorted by the data sequence dimension:
[0158] chunk median =median(chunk) sorted (axis=1)
[0159] ②'Calculate the correlation:
[0160] xcorr=sum(chunk_sorted*chunk median ,axis=0) / sum(chunk_sorted**2)
[0161] ③ Calculate the correlation difference for each channel:
[0162] Smoothing xcorr can be used to remove noise from a signal, and can also quantify the general correlation between adjacent channels, such as using Python's scipy functions to calculate it:
[0163] xf=scipy.signal.medfilt(xcorr)
[0164] The correlation difference between channels (correlation difference results): xcorr_neighbors = xcorr - xf
[0165] ④ Result judgment:
[0166] Parameter: corr_thr, threshold (correlation threshold)
[0167] If xcorr_neighbors > corr_thr, then the corresponding channel is an abnormal channel.
[0168] 4) Output of result labels:
[0169] Based on power PSD calculations and correlation Coherence calculations, four labels are assigned to each channel:
[0170] Noise channel only: 1;
[0171] Abnormal channels only: 2;
[0172] Even if the noise channel is also an abnormal channel: 3;
[0173] Other: 0;
[0174] For each channel of each chunk (data block), a label is calculated. After calculating the label for all n_chunks of a single channel, each channel has a label sequence of 1*num_chunks. Taking the mode, this is the abnormal label for that channel. The abnormal label is used to determine whether the channel is the third abnormal channel.
[0175] It should be noted that this embodiment provides multiple methods for quantifying channel differences. Calculating the inter-channel deviation variable in the time domain can identify abnormal channels with significant deviations relative to other channels. Quantifying the correlation between adjacent channels in the time domain utilizes the crossover characteristics of neighboring channel signals to identify abnormal channels. From the frequency domain and correlation dimensions, correlation coherence and power spectral density (PSD) are used to quantify channel differences, defining channel anomalousness from multiple dimensions. This method ultimately outputs bad channels, namely the first, second, and third abnormal channels. In practical applications, channels can be classified or eliminated according to subsequent analysis needs to obtain optimized, high-quality, high-density EEG signals for further in-depth analysis.
[0176] This embodiment provides a high-density EEG signal processing method, including: acquiring raw data of high-density EEG signals; calculating inter-channel deviation variables from the time domain based on the raw data to obtain a first abnormal channel; quantifying the correlation of adjacent channels from the time domain based on the raw data to obtain a second abnormal channel; quantifying power spectral density and correlation from the frequency domain based on the raw data to obtain a third abnormal channel; and classifying or eliminating channels based on the first, second, and third abnormal channels to obtain an optimized high-density EEG signal. In this embodiment, high-density EEG signal noise information processing is performed from multiple dimensions. Calculating inter-channel deviation variables from the time domain can identify abnormal channels with large deviations relative to other channels; quantifying the correlation of adjacent channels from the time domain, identifying abnormal channels by utilizing the crossover characteristics of adjacent channel signals; and using power spectral density and correlation to quantify channel differences from the frequency domain and correlation dimensions, defining channel abnormalities from multiple dimensions, thereby classifying or eliminating noise information, preserving useful information to the greatest extent, and obtaining high-quality high-density EEG signals for subsequent analysis and processing.
[0177] Furthermore, this embodiment of the invention also proposes a storage medium storing a high-density EEG signal processing program, which, when executed by a processor, implements the steps of the high-density EEG signal processing method described above.
[0178] Reference Figure 7 , Figure 7 This is a structural block diagram of an embodiment of the high-density EEG signal processing device of the present invention.
[0179] like Figure 7 As shown, the high-density EEG signal processing device includes:
[0180] The data acquisition module 10 is used to acquire raw data of high-density electroencephalogram (EEG) signals;
[0181] The time-domain analysis module 20 is used to calculate the inter-channel deviation variable from the time-domain dimension based on the original data to obtain the first abnormal channel;
[0182] The time-domain analysis module 20 is also used to quantify the correlation between adjacent channels from the time-domain dimension based on the original data to obtain the second abnormal channel;
[0183] Frequency domain analysis module 30 is used to quantify the power spectral density and correlation from the frequency domain dimension based on the original data to obtain the third abnormal channel;
[0184] The signal processing module 40 is used to classify or remove channels based on the first abnormal channel, the second abnormal channel and the third abnormal channel to obtain optimized high-density EEG signals.
[0185] This embodiment provides a high-density EEG signal processing device, offering multiple methods for quantifying channel differences. The time-domain analysis module 20 calculates inter-channel deviation variables in the time domain to identify abnormal channels with significant deviations relative to other channels. The time-domain analysis module 20 can also quantify the correlation between adjacent channels in the time domain, utilizing the crossover characteristics of neighboring channel signals to identify abnormal channels. The frequency-domain analysis module 30 quantifies channel differences using correlation coherence and power spectral density (PSD) in the frequency domain and correlation dimensions, defining channel abnormalities from multiple dimensions. This device outputs bad channels, namely the first abnormal channel, the second abnormal channel, and the third abnormal channel. In practical applications, channels can be classified or eliminated according to subsequent analysis needs to obtain optimized, high-quality, high-density EEG signals for further in-depth analysis.
[0186] In this embodiment, high-density EEG signal noise information processing is performed from multiple dimensions. In the time domain dimension, the inter-channel deviation variable is calculated to identify abnormal channels with large deviations relative to other channels. In the time domain dimension, the correlation between adjacent channels is quantified, and abnormal channels are identified by utilizing the crossover characteristics of adjacent channel signals. In the frequency domain and correlation dimensions, power spectral density and correlation are used to quantify the differences between channels. The abnormality of channels is defined from multiple dimensions, thereby classifying or eliminating noise information, retaining useful information to the greatest extent, and obtaining high-quality high-density EEG signals for subsequent analysis and processing.
[0187] It should be noted that technical details not described in detail in this embodiment of the high-density EEG signal processing device can be found in any embodiment of the present invention applied to the high-density EEG signal processing method described above, and will not be repeated here.
[0188] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.
[0189] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0190] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0191] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0192] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0193] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A high-density electroencephalogram (EEG) signal processing method, characterized in that, include: Acquire raw data of high-density electroencephalogram (EEG) signals; Based on the original data, the inter-channel deviation variable is calculated from the time domain dimension to obtain the first abnormal channel; Based on the original data, the correlation between adjacent channels is quantified in the time domain to obtain the second abnormal channel; Based on the original data, the power spectral density and correlation are quantized from the frequency domain dimension to obtain the third anomaly channel; Based on the first abnormal channel, the second abnormal channel, and the third abnormal channel, the channels are classified or eliminated to obtain optimized high-density EEG signals. The process of quantizing power spectral density and correlation in the frequency domain based on the original data to obtain a third anomalous channel includes: converting the original data into a data matrix, wherein the data matrix includes multiple channels; randomly selecting multiple starting positions and extracting data of a preset length based on the starting positions to obtain multiple data blocks; sorting the data according to the position information of the channels to obtain a sorting result, wherein the sorting result includes a channel number and an index number; sorting the channel order of each data block according to the channel number to obtain a data order result; quantizing the power spectral density in the frequency domain based on the data order result to obtain a noise channel; quantizing the correlation in the frequency domain based on the data order result to obtain an anomalous channel; labeling the channels of each data block according to the noise channel and the anomalous channel to obtain a label sequence; and taking the mode of the label sequence to obtain the third anomalous channel.
2. The method as described in claim 1, characterized in that, The step of calculating the inter-channel deviation variable from the time domain dimension based on the original data to obtain the first abnormal channel includes: The original data is converted into a data matrix; wherein the data matrix includes multiple channels; Calculate the volatility quantification index value for each of the channels; Calculate the median value of the volatility quantification index; The first abnormal channel is determined based on the comparison result between the fluctuation quantification index value of the channel and the preset threshold parameter and the median value.
3. The method as described in claim 2, characterized in that, The step of determining the first abnormal channel based on the comparison result of the fluctuation quantification index value of the channel with the preset threshold parameter and the median value includes: Set the upper threshold multiple and lower threshold multiple according to the preset threshold parameters; The first threshold is set based on the product of the lower threshold multiple and the median; A second threshold is set based on the product of the upper threshold multiple and the median; The fluctuation quantification index value of the channel is compared with the first threshold and the second threshold; When the fluctuation quantification index value of the channel is less than the first threshold or greater than the second threshold, a first abnormal channel is identified.
4. The method as described in claim 1, characterized in that, The step of quantifying the correlation between adjacent channels in the time domain based on the original data to obtain the second abnormal channel includes: The original data is converted into a data matrix; wherein the data matrix includes multiple channels; A circular region is constructed with the center point of the channel as the center and a preset signal range as the radius. The channel whose center point is located within the circular area is considered as an adjacent channel; Multiple starting positions are randomly selected, and data of a preset length is extracted based on the starting positions to obtain multiple data segments; For each channel, the data segments are spliced together to obtain the data block corresponding to that channel; The correlation between adjacent channels is quantified based on each data block to obtain the second abnormal channel.
5. The method as described in claim 4, characterized in that, The step of quantifying the correlation between adjacent channels based on each data block to obtain the second abnormal channel includes: Calculate a quantitative index of the correlation between the channel of each data block and its corresponding adjacent channel; Construct a sequence based on the aforementioned quantitative indicators; Calculate the median of the sequence to obtain the standard correlation of each channel; Set an adjacent threshold; When the standard correlation of a channel is less than the adjacent threshold, a second abnormal channel is identified.
6. The method as described in claim 1, characterized in that, The step of quantizing the power spectral density from the frequency domain dimension based on the data order results to obtain the noise channel includes: Set the window function, number of samples, and sampling frequency; Based on the window function, the number of samples, and the sampling frequency, the power spectral density of the data sequence results is calculated on a channel-by-channel basis to obtain the frequency axis of each channel and the power spectral density estimate of the corresponding frequency. The high-frequency power quantization index for each channel is calculated based on the Naquist frequency threshold and the power spectral density estimates of the frequency axis and the corresponding frequency. Set the power spectral density threshold; A noise channel is identified when the high-frequency power quantization index of the channel is greater than the power spectral density threshold.
7. The method as described in claim 1, characterized in that, The step of quantifying the correlation from the frequency domain dimension based on the data order results to obtain the abnormal channels includes: The median of the ordered data results is calculated based on the data sequence dimension; The correlation is calculated based on the median and the data order results to obtain the first correlation result; The first correlation result is smoothed to obtain the second correlation result; The correlation difference result for each channel is obtained based on the difference between the first correlation result and the second correlation result; Set a correlation threshold; When the correlation difference of a channel is greater than the correlation threshold, an abnormal channel is identified.
8. A high-density electroencephalogram (EEG) signal processing device, characterized in that, include: The data acquisition module is used to acquire raw data of high-density electroencephalogram (EEG) signals. The time-domain analysis module is used to calculate the inter-channel deviation variable from the time-domain dimension based on the raw data to obtain the first abnormal channel; The time-domain analysis module is also used to quantify the correlation between adjacent channels from the time-domain dimension based on the original data to obtain the second abnormal channel; The frequency domain analysis module is used to quantify the power spectral density and correlation from the frequency domain dimension based on the original data to obtain the third anomaly channel; The signal processing module is used to classify or remove channels based on the first abnormal channel, the second abnormal channel and the third abnormal channel to obtain optimized high-density EEG signals. The process of quantizing power spectral density and correlation in the frequency domain based on the original data to obtain a third anomalous channel includes: converting the original data into a data matrix, wherein the data matrix includes multiple channels; randomly selecting multiple starting positions and extracting data of a preset length based on the starting positions to obtain multiple data blocks; sorting the data according to the position information of the channels to obtain a sorting result, wherein the sorting result includes a channel number and an index number; sorting the channel order of each data block according to the channel number to obtain a data order result; quantizing the power spectral density in the frequency domain based on the data order result to obtain a noise channel; quantizing the correlation in the frequency domain based on the data order result to obtain an anomalous channel; labeling the channels of each data block according to the noise channel and the anomalous channel to obtain a label sequence; and taking the mode of the label sequence to obtain the third anomalous channel.
9. An electronic device, characterized in that, The electronic device includes: a memory, a processor, and a high-density EEG signal denoising program stored in the memory and executable on the processor, the high-density EEG signal denoising program being configured to implement the high-density EEG signal processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Multi-channel OPM-MEG bad track automatic identification method and system based on time domain and frequency domain
CN116150657A
Event-related potential original electroencephalogram data quality calculation method based on test level
CN118094150A