EEG signal analysis method and device, electronic equipment and storage medium

By acquiring multiple channels of the EEG signal, calculating the power spectral density and constructing a magnitude map, and using the graph convolutional neural network model, the problem of insufficient sample proportion, insufficient consideration of differences and resolution problems in the EEG signal analysis method in the existing technology is solved. , improving the accuracy and model generalization of dementia status risk assessment.

CN118614937APending Publication Date: 2024-09-10BEIJING UNIV OF TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410694133.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing EEG signal analysis methods have problems such as insufficient sample proportion, insufficient consideration of differences, low spatial resolution, high temporal resolution but poor airspace feature quality in dementia risk assessment, resulting in poor classification performance and failure to be effective. Utilize information exchange between brain regions across multiple channels.

Method used

By acquiring multiple EEG signal channels, calculate the power spectral density (PSD) of each channel, determine the channel weight coefficient, construct a magnitude map, and use the graph convolutional neural network model to analyze the magnitude map, combining the frequency domain and time domain Domain features improve the generalization and accuracy of the model.

Benefits of technology

It improves the accuracy of EEG signal analysis and model generalization, can more effectively detect differences between collected data, improves the identification accuracy of early diagnosis of Alzheimer's disease, and improves patients' quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118614937A
    Figure CN118614937A
Patent Text Reader

Abstract

The invention discloses an EEG signal analysis method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring EEG signals under a plurality of channels; obtaining the PSD of each channel according to the EEG signal under each channel; determining a weight coefficient of each channel according to the PSD of each channel; constructing a magnitude graph according to the weight coefficient of each channel; and performing EEG signal analysis on the magnitude graph by using a graph convolutional neural network model. According to the technical scheme of the invention, not only can more representative channels be found, but also differences among the collected data can be found, an effective data set can be obtained, the channel weight and the frequency domain features and the time domain features of the EEG signals are simultaneously used as reference input into the convolutional neural network model for training, and the generalization and the accuracy of the model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence research, and more specifically, to a method, device, electronic device and storage medium for analyzing EEG signals. Background Art

[0002] As the population ages, the incidence of dementia increases year by year. Early detection of dementia is crucial for physicians to establish effective treatment methods and improve the quality of life of patients. Alzheimer's disease (AD) is currently the most common type of dementia. At present, the classification criteria for risk assessment of AD status based on electroencephalogram (EEG) signals are mainly: healthy control (HC), mild cognitive impairment (MCI) and AD. Compared with traditional scale cognitive tests, the use of EEG signals can more objectively analyze changes in people's cognitive levels and better track the progression of patients' diseases.

[0003] However, the existing EEG signal analysis methods still have some shortcomings. First, the proportion of MCI samples is relatively small, resulting in low analysis accuracy; second, the differences between different populations such as age distribution and regional distribution are less considered, resulting in less consideration of the differences between the collected signals; third, the spatial resolution of EEG signals is low, resulting in poor classification performance at low channels; fourth, the temporal resolution of EEG signals is high but the spatial resolution is low, which makes the time domain feature quality after EEG signal feature extraction good but the spatial domain feature quality poor, resulting in the current use of only the optimal EEG signal channel, ignoring the brain area information exchange between the overall EEG channels; fifth, when the existing EEG signal analysis methods associate AD brain structure changes with EEG, they only consider the information in one time domain or frequency domain, or when considering two domains, the time domain information will be lost in large quantities.

[0004] Therefore, how to effectively utilize the collected signals in multiple channels to form an effective data set and improve the generalization of the neural network model has become a technical problem that needs to be solved in this field. Summary of the invention

[0005] In view of this, the present application proposes an EEG signal analysis method, device, electronic device and storage medium. In a first aspect, the present application proposes an EEG signal analysis method, comprising:

[0006] Acquire EEG signals under multiple channels;

[0007] The PSD of each channel is obtained according to the EEG signals under each channel;

[0008] Determine the weight coefficient of each channel according to the PSD of each channel;

[0009] Constructing a magnitude map according to the weight coefficient of each channel;

[0010] The value graph is parsed using a graph convolutional neural network model.

[0011] Preferably, the method further comprises:

[0012] Preprocessing the EEG signal of each channel; the preprocessing includes:

[0013] Determine the band-stop frequency range and the band-pass frequency range;

[0014] Determine the filter order and the cutoff frequency according to the band-stop frequency range and the band-pass frequency range;

[0015] Filtering the EEG signal according to the filter order and the cutoff frequency to obtain a filtered EEG signal;

[0016] Independent component analysis was performed on the filtered EEG signals.

[0017] Preferably, the PSD of each channel obtained according to the EEG signal of each channel is specifically:

[0018] Segmenting the EEG signal to obtain EEG signal data of multiple sub-segments;

[0019] The EEG signal data of each sub-segment is windowed using a window function;

[0020] The EEG signal data of each sub-segment after windowing is subjected to discrete Fourier transform, and the discrete Fourier transform formula is:

[0021]

[0022] Where u is an integer, X u (f) is the DFT result of the uth segment, x u (i) is the windowed sub-segment, x u (i) represents the signal value of the i-th sampling point in the time domain, h represents the length of the window segment, f is the frequency, U is the number of sub-segments, e is the base of the natural logarithm, j is the imaginary unit, and π is the circumference of a circle;

[0023] The PSD of each channel is calculated based on the discrete Fourier transformed data.

[0024] Preferably, the window function is a Hanning window function; the calculation formula of the Hanning window function is:

[0025]

[0026] Where w(i) represents the value of the function at the i-th sampling point, i represents the serial number of the sampling point of the window function, h is the sub-segment length, and π is the circumference of a circle;

[0027] Preferably, the PSD of each channel is calculated based on the data after discrete Fourier transformation as follows:

[0028] The PSD of each sub-segment EEG signal is calculated based on the data after discrete Fourier transformation. The calculation formula is:

[0029]

[0030] Where X u (f) is the discrete Fourier transform result of the u-th segment, |X u (f)|isX u (f) is the amplitude, h is the sub-segment length;

[0031] The PSD of each channel is obtained according to the PSD of each sub-segment EEG signal. The calculation formula is:

[0032]

[0033] Where U is the number of sub-segments.

[0034] Preferably, the weight coefficient of each channel is determined according to the PSD of each channel as follows:

[0035] Performing category ratio calculation on the PSD of each of the channels to obtain the PSD ratio of each channel; the PSD ratio of each of the channels includes corresponding frequency band information;

[0036] Compare the PSD ratio of each channel with the preset threshold, and group the channels according to the comparison results;

[0037] Assigning a first weight coefficient to the channels in the first group, and assigning a second weight coefficient to the channels in the second group;

[0038] The weight coefficient of each channel is calculated according to the first weight coefficient, the second weight coefficient, and corresponding frequency band information.

[0039] Preferably, the method further comprises:

[0040] The frequency bands are screened to determine a target frequency band, so as to calculate a category ratio of the PSD of each of the channels under the target frequency band.

[0041] Preferably, the categories include: HC, MCI and AD.

[0042] Preferably, the step of constructing a magnitude map according to the weight coefficient of each channel is as follows:

[0043] Constructing an initial magnitude map for each channel based on a Markov chain algorithm;

[0044] The initial magnitude map of each channel is weighted according to the weight coefficient of each channel to obtain a weighted magnitude map.

[0045] Preferably, the method further comprises:

[0046] Calculating a weighted adjacency matrix and / or a node feature matrix of the magnitude graph;

[0047] The graph convolutional neural network model is constructed according to the weighted adjacency matrix and / or the node feature matrix of the magnitude graph.

[0048] In a second aspect, an embodiment of the present invention further provides an EEG signal analysis device, comprising:

[0049] An acquisition unit, for acquiring EEG signals under multiple channels;

[0050] The PSD calculation unit obtains the PSD of each channel according to the EEG signals under each channel;

[0051] A weight calculation unit determines the weight coefficient of each channel according to the PSD of each channel;

[0052] A mapping unit, which constructs a magnitude map according to the weight coefficient of each channel;

[0053] A recognition unit is trained to parse the quantity value graph using a graph convolutional neural network model.

[0054] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method disclosed in the first aspect above.

[0055] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the method disclosed in the first aspect above.

[0056] The EEG signal analysis method provided in the present application determines the weight coefficient of each channel based on the PSD of each channel, and then constructs a value graph according to the weight coefficient of each channel, and uses a graph convolutional neural network model to analyze the value graph, which can not only find more representative channels, but also discover the differences between the collected data and obtain a valid data set. The channel weights, frequency domain features and time domain features of the EEG signal are simultaneously used as reference inputs for training in the graph convolutional neural network model, thereby improving the generalization and accuracy of the model.

[0057] Other features and advantages of the present application will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings constituting a part of the present application are used to provide a further understanding of the present application, and the schematic implementation modes and descriptions of the present application are used to explain the present application. In the accompanying drawings:

[0059] Figure 1 A flowchart of an EEG signal analysis method according to a preferred embodiment of the present invention;

[0060] Figure 2 Schematic diagram of the EEG signal channel position of the preferred embodiment of the present application;

[0061] Figure 3 Flow chart of the pretreatment method of the preferred embodiment of the present application;

[0062] Figure 4 PSD algorithm flow chart of the preferred embodiment of the present application;

[0063] Figure 5 A schematic diagram comparing the PSD differences between channels in each frequency band in a preferred embodiment of the present application;

[0064] Figure 6 Flow chart of the method for calculating the weight coefficient of the preferred embodiment of the present application;

[0065] Figure 7 A schematic diagram of the mapping process of the value graph from time sequence to network in the preferred embodiment of the present application;

[0066] Figure 8 A flow chart of a method for constructing a magnitude graph according to a preferred embodiment of the present application;

[0067] Fig. 9 Schematic diagram of the value interval division of the preferred embodiment of the present application;

[0068] Fig.10 Schematic diagram of a value diagram of a preferred embodiment of the present application;

[0069] Fig.11Schematic diagram of a weighted adjacency matrix of a preferred embodiment of the present application;

[0070] Fig.12 Schematic diagram of the accuracy and loss rate curve of the verification results of the preferred embodiment of the present application;

[0071] Fig.13 Schematic diagram of confusion matrix results obtained in the preferred implementation mode of the present application;

[0072] Fig.14 Schematic diagram of an EEG signal analysis device according to a preferred embodiment of the application.

[0073] Fig.15 A schematic diagram of the structure of an electronic device according to a preferred embodiment of the present invention. DETAILED DESCRIPTION

[0074] The technical solution of the present application will be described in detail below with reference to the accompanying drawings and in combination with the implementation modes.

[0075] First of all, the present application proposes a method for analyzing EEG signals, such as Figure 1 Shown includes 110-150.

[0076] Step 110, acquiring EEG signals under multiple channels;

[0077] Specifically, electroencephalogram (EEG), hereinafter referred to as EEG signal, is a signal that reflects brain activity by measuring the potential changes on the user's scalp through a device worn on the user's brain. According to the different settings of the EEG signal electrodes in the brain space, the data set is divided into 19 channels according to the region according to international standards. Figure 2 As shown, the 19 EEG signal channels are: FC1, FC2, F7, F8, F3, F4, Fz, C3, C4, CP1, CP2, T3, T4, P3, P4, PZ, POZ, O1, O2. This application is to perform EEG signal analysis under multiple channels.

[0078] Preferably, the EEG signal is a weak physiological signal, which is easily affected by endogenous noise and exogenous noise during the acquisition process. Therefore, before analyzing the EEG signal, the EEG signal under each channel needs to be preprocessed. In this application, the preprocessing includes filtering and independent component analysis. The preprocessing method is as follows: Figure 3 As shown, steps 310-340 are included.

[0079] Step 310, determining a band-stop frequency range and a band-pass frequency range;

[0080] Specifically, the band-stop frequency range and the band-pass frequency range are determined, and the filter provides maximum attenuation in the band-stop frequency range. Correspondingly, the filter does not provide attenuation or provides minimum attenuation in the band-pass frequency range.

[0081] Step 320, determining the filter order and cutoff frequency according to the band-stop frequency range and the band-pass frequency range;

[0082] Step 330, filtering the EEG signal according to the filter order and the cutoff frequency to obtain a filtered EEG signal;

[0083] Specifically, the standardized pole is found according to the filter order and cutoff frequency, and the standard pole is converted into an actual pole. A pole refers to a point in the filter frequency influence function where the function value tends to infinity, and the position distribution of the pole determines the characteristics of the filter.

[0084] Preferably, the order of the filter is not as high as possible. Increasing the order will increase the steepness of the filter, but will also introduce more phase delay. This application uses a second-order Butterworth filter for filtering, which is a commonly used filter type based on the concept of poles and zeros, and its transfer function is as shown in formula (1):

[0085]

[0086] Where H(s) is the transfer function, describing the filter's response to frequency, s is the complex frequency, i.e., the combination of frequency and damping, ω c is the cutoff frequency and N is the order of the filter.

[0087] Step 340, performing independent component analysis on the filtered EEG signal;

[0088] Specifically, the EEG signal after filtering is a relatively clean signal, but there are still other interferences, such as ECG interference and rapid eye movement interference, which cannot be removed by filtering. Therefore, it is also necessary to perform independent component analysis (ICA) on the filtered EEG signal to separate independent components from the signal, select components related to the EEG signal, discard other noise components, and finally retain signals related to EEG activity, thereby improving the quality and reliability of the signal.

[0089] Step 120, obtaining the PSD of each channel according to the EEG signal of each channel;

[0090] Specifically, power spectral density (PSD) is a concept in signal processing that describes how the power of a signal is distributed with frequency. By calculating the PSD corresponding to each channel in each frequency band, it helps to improve the accuracy of the subsequent neural network model.

[0091] Preferably, the PSD algorithm is as follows Figure 4 As shown, steps 410-440 are included.

[0092] Step 410, segmenting the EEG signal to obtain EEG signal data of multiple sub-segments;

[0093] Specifically, in this application, the overlap length in each data set is set to half the length of the sub-segment. Assuming that the EEG signal is x(t), the total length is L, the length of each sub-segment is h, and a fixed overlap length is set for each sub-segment when segmenting, the original EEG signal can be divided into U sub-segments. The calculation formula of U is as follows (2):

[0094]

[0095] Taking a certain EEG data collected at a certain place as an example, the set sub-segment length is h=256, and the overlap length is D=128, which means that there are 128 data points overlapping between adjacent sub-segments, and the number of data points in each sub-segment is 256.

[0096] The data processed in this way can ensure that each sub-segment contains enough information for spectrum calculation.

[0097] Step 420, using a window function to perform windowing processing on the EEG signal data of each sub-segment;

[0098] Specifically, a window function is applied to the EEG signal data of multiple sub-segments obtained in step 410. The application method can be to directly multiply the window function value by each sub-segment U obtained in the above steps to achieve windowing processing of the signal. This can ensure that before the signal is Fourier transformed, the values ​​at both ends of the signal are close to zero compared to the endpoints, thereby limiting the endpoint effect of the sub-segment, improving the accuracy and reliability of frequency domain analysis, and reducing the spectrum leakage effect.

[0099] Preferably, commonly used window functions include Hanning window and Hamming window. Compared with the Hamming window, the Hanning window has higher frequency domain resolution and lower side lobe amplitude, smaller leakage effect in the frequency domain, and is more conducive to multi-band analysis. Therefore, the window function in the present application is the Hanning window function, so as to reduce the signal interference outside the window at the end of the sub-segment. The calculation formula of the Hanning window function is as shown in formula (3):

[0100]

[0101] Where w(i) represents the value of the function at the i-th sampling point, i represents the serial number of the sampling point of the window function, h is the sub-segment length, and π is the circumference of the circle. The sampling point here refers to the temporal discretization of the EEG signal.

[0102] Step 430, performing discrete Fourier transform on the EEG signal data of each sub-segment after windowing;

[0103] Specifically, the windowed sub-segments obtained in step 420 are subjected to discrete Fourier transform (DFT) to convert them from the time domain to the frequency domain to provide spectrum information of the signal at different frequencies. The discrete Fourier transform algorithm is as shown in formula (4):

[0104]

[0105] Where u is an integer, X u (f) is the DFT result of the uth segment, x u (i) is the windowed sub-segment, x u (i) represents the signal value of the i-th sampling point in the time domain, h represents the length of the window segment, f is the frequency, U is the number of divided subsegments, e is the base of the natural logarithm, j is the imaginary unit, and π is the circumference of a circle.

[0106] Step 440, calculating the PSD of each channel based on the discrete Fourier transformed data;

[0107] Specifically, the PSD of each sub-segment EEG signal is calculated based on the data after discrete Fourier transformation, and the calculation formula is as follows:

[0108]

[0109] Where X u (f) is the DFT result of the uth segment, |X u (f)|isX u (f) is the amplitude, and h is the sub-segment length.

[0110] After obtaining the PSD of each sub-segment EEG signal, the Welch method is used to obtain the PSD of each channel, that is, the calculation formula for the PSD of each channel is obtained according to the PSD of each sub-segment EEG signal as shown in formula (6):

[0111]

[0112] Where U is the number of sub-segments.

[0113] The Welch method is a technique used in statistical analysis, mainly used to estimate the mean of a population, especially when the sample size is small. Its core idea is to reduce bias and improve the accuracy of the estimate by giving different weights to each sample.

[0114] Through the above steps 410-440, the spectrum analysis process of the EEG signal of the present application is formed. Repeating this process with each sub-segment of different data sets to obtain energy distribution estimates of the signal at different frequencies can ensure a more robust and accurate spectrum estimation.

[0115] It can be understood that the originally collected EEG signals of each channel have corresponding frequency bands, and the PSD of the channel obtained after processing the EEG signals also has corresponding frequency band information.

[0116] Step 130, determining a weight coefficient of each channel according to the PSD of each channel;

[0117] Specifically, based on the above steps, the PSD corresponding to each frequency band under different channels in the data set can be obtained, so that the difference between each channel can be obtained.

[0118] In a specific example, Figure 5 This is a comparison of the PSD differences between channels in each frequency band under the three-category EEG data set for Alzheimer's disease, where the three-category data for Alzheimer's disease are HC, MCI, and AD data, respectively. The horizontal axis channel represents 19 channels, and the vertical axis represents the PSD values ​​of the three categories. It can be seen from the figure that overall, there are large differences between the channels of the HC group and the AD group, but the MCI group and the AD group have obvious differences in certain channels of certain frequency bands, such as channel 7 in the theta band. The trend consistency between the MCI group and the AD group verifies that MCI can be used as an early AD for diagnosis, and it also corresponds to the current difficulty in distinguishing between MCI and AD. Therefore, this application will match the corresponding weights for channels in different frequency bands between categories based on the PSD differences between channels, which will help to better parse the EEG signal.

[0119] Preferably, the calculation method of the channel weight coefficient in this step is as follows Figure 6 As shown, steps 610-640 are included.

[0120] Step 610, performing category ratio calculation on the PSD of each of the channels to obtain the PSD ratio of each channel;

[0121] Specifically, the collected data categories include: HC healthy category, MCI mild cognitive impairment category, and AD disease category, which correspond to the three categories of Alzheimer's disease and three populations respectively.

[0122] The PSD category ratio calculation for each channel includes:

[0123] The calculation formula of the PSD ratio of HC class / MCI class is as follows:

[0124]

[0125] The calculation formula of the PSD ratio of MCI class / AD class is as follows:

[0126]

[0127] The calculation formula of the PSD ratio of HC class / AD class is as follows:

[0128]

[0129] Among them, ratio H-M is the PSD ratio of the HC category to the MCI category, ratio M-A is the PSD ratio of the MCI category to the AD category, ratio H-A is the PSD ratio of the HC category to the AD category, R HC (delta, theta, alpha, beta) represents the PSD values ​​of the four frequency bands of the HC group calculated sequentially, R MCI (delta, theta, alpha, beta) represents the PSD values ​​of the four frequency bands of the MCI group calculated sequentially, R AD (delta, theta, alpha, beta) represents the PSD values ​​of the four frequency bands of the AD group calculated sequentially. The ratio of each frequency band between groups is obtained by comparing the PSD values ​​of the corresponding group of each frequency band.

[0130] It can be understood that the PSD of a channel has a corresponding frequency band, and the PSD ratio of each channel obtained after processing the channel also includes the corresponding frequency band information.

[0131] Preferably, since not all three types of PSD data in each frequency band change, when calculating the category ratio of the PSD of each channel, the frequency band needs to be screened first to determine the target frequency band, so as to calculate the category ratio of the PSD of each channel in the target frequency band. In a specific example, the target frequency band includes four frequency bands: delta, theta, alpha, and beta.

[0132] Step 620, comparing the PSD ratio of each channel with a preset threshold, and grouping the channels according to the comparison result;

[0133] Specifically, a threshold is set and the PSD ratio of each channel is compared with the threshold. If the PSD ratio of a channel exceeds the threshold, it means that the differences between the various types of data (HC, MCI and AD) of the channel are large, and the channel is divided into the first group; if the PSD ratio of a channel does not exceed the threshold, it means that the differences between the various types of data of the channel are small, and the channel is divided into the second group.

[0134] Step 630, assigning a first weight coefficient to the channels in the first group, and assigning a second weight coefficient to the channels in the second group;

[0135] Specifically, a first weight coefficient is assigned to channels with larger differences in data types in the first group, and a second weight coefficient is assigned to channels with smaller differences in data types in the second group. The first weight coefficient should be greater than the second weight coefficient for subsequent processing based on the weight coefficient.

[0136] It should be noted that the difference between the first weight coefficient and the second weight coefficient should be no less than one order of magnitude to facilitate subsequent processing.

[0137] Step 640, calculating a weight coefficient of each channel according to the first weight coefficient, the second weight coefficient, and corresponding frequency band information;

[0138] Specifically, the first weight coefficient and the second weight coefficient corresponding to all channels in the two groups are extracted, and the corresponding frequency band information is used as the dimension for re-matching to generate the weight of each channel in each frequency band. Then, the weight of each channel in each frequency band is weighted with the channel as the dimension to obtain the weight coefficient of each channel of the corresponding category.

[0139] It can be understood that the final weight coefficient is multi-band, because each frequency band is taken into consideration in its calculation.

[0140] Step 140, constructing a magnitude map according to the weight coefficient of each channel;

[0141] Specifically, the specific method of the Quantile Graph (QG) is to determine Q quantities for a given time series signal X, and assign each quantity to a corresponding node in the network G, and there are edges between the nodes calculated by the Markov model.

[0142] It can be understood that the EEG signal in the present application is a time series signal.

[0143] In a specific example, the mapping process of QG from time series to network is as follows Figure 7 In the forward mapping, the time series signal X is divided into Q values, where Q = 4, corresponding to 4 light and dark color blocks, and each value q a Assigned to the node I in the corresponding topology network G a , the edge weights between two nodes are q a The value to the next node q bThe transfer probability is calculated, and the repeated transfer between the values ​​leads to the large weight edges that appear in the network. In the topological graph, the thickness represents the weight size, and the thicker the edge, the greater the weight. In the inverse mapping, the weighted adjacency matrix A in the network G is normalized. By reordering A, the larger weights are close to the diagonal, so as to obtain the connection between the nodes and the values, and then obtain a more continuous and smooth time series. This also shows that using QG to map the time series signal to the topological network can retain more complete time domain information.

[0144] Preferably, in the present application, the method for constructing the magnitude graph is as follows Figure 8 As shown, steps 810 and 820 are included.

[0145] Step 810, constructing an initial magnitude map of each channel based on a Markov chain algorithm;

[0146] Specifically, a Markov chain (MC) is a random process in probability theory and mathematical statistics that has Markov properties and exists in a discrete exponential set and state space. In a Markov chain, the "transition" between values ​​refers to the process of a system changing from one state to another.

[0147] In the present application, two values ​​x(t) and x(t+k) (t=1, 2, ..., T; k=1, 2, ...) are set in the EEG signal x(t) of each channel, which belong to the divided value q respectively. a and q b , x(t) represents the timing signal, k is the step size, and the two nodes I a and I b With weighted edge w ab Connection. Each value q a and q b Assign to the node I in the corresponding topology network G a and I b , and use the weighted edge w ab Connect to form the initial magnitude map for each channel.

[0148] The QG method is weakly dependent on the selection of Q. In this application, the calculation formula of the quantity Q is as follows:

[0149]

[0150] Wherein, L represents the total signal length of the EEG signal, that is, the number of sampling points.

[0151] In a specific example, taking the collected EEG signal of a certain user as an example, the 20 sampling point data of the EEG signal segment are (-4.6356089, -4.9421668, -3.9671235, -0.50219293, 1.2017944, 2.2668527, 1.6840585, 1.7890969, 2.3903061, 1.6460739, -1.3323966, -5.5392954, -6.1101001, -2.4425177, 0.55489368, 1.8119549, 3.5967615, 5.0524484, 4.324954, 4.1493963) in chronological order.

[0152] First, the number of EEG signal sampling points is 20, then L = 20, which is substituted into formula (11) and rounded to Q = 5. After arranging in ascending order, the 5 value intervals can be defined as:

[0153] [x(0),x(4)), [x(4),x(8)), [x(8),x(12)), [x(12),x(16)) and [x(16),x(20)], that is, [-6.1101001,-3.9671235), [-3.9671235,0.55489368), [0.55489368,1.7890969), [1.7890969,3.5967615) and [3.5967615,5.0524484], and its value interval division is finally as follows Fig. 9 As shown, the horizontal blocks of different shades of color represent five value ranges.

[0154] Then, based on the Markov chain algorithm, the obtained Q values ​​are mapped to a topological network of I nodes, Q = I = 5, each value is assigned to the corresponding node in the network G, and the step size k is set to 1, then the weight (I a , I b , w ab ) is (1,1,2), (1,2,2), (2,1,1), (2,2,1), (2,3,2), (3,2,1), (3,4,3), (4,3,2), (4,4,1), (4,5,1), (5,5,3). The corresponding topological network, that is, the value diagram is as follows Fig.10 As shown. a and q b The more repeated transitions there are between nodes, the a and I b The greater the weight between Fig.10 The thicker the edge, the better.

[0155] For example Fig. 9 Taking the value interval shown in the figure as an example, from bottom to top, they are the first interval to the fifth interval. When the step size is 1, the edge is calculated by transferring the state of the interval where the current sampling point is located to the interval where the next sampling point is located. For example, the first interval where the first sampling point -4.6356089 is located is transferred to the first interval where the next sampling point -4.9421668 is located. At this time, the weight relationship is expressed as (1,1,1), and the first interval where the second sampling point -4.9421668 is located is transferred to the second interval where the next sampling point -3.9671235 is located. At this time, the weight relationship is expressed as (1,2,1). Repeat the above steps to obtain the weight relationship of all nodes, and add the repeated intervals. For example, in the example of 20 sampling points, there are two (1,1,1) relationships, that is, in the weight relationship (I) of the first interval (value) transferred to the first interval (value) as a whole. a , I b , w ab ) is (1,1,2).

[0156] Preferably, based on the test of single-channel EEG signal segments, it can be found that when k=1, w ab The most edges, and w ab The more edges there are, the more complete edge weight information can be retained, so k=1 in this application.

[0157] Step 820, weighting the initial magnitude map of each channel according to the weight coefficient of each channel to obtain a weighted magnitude map;

[0158] Specifically, based on step 820, the initial magnitude graph of a single channel of the EEG signal is obtained, retaining a relatively complete time domain feature of the EEG signal. However, in actual EEG analysis, due to the spatiality of brain activity, a joint study of multiple channels can often provide richer information than a single channel, and Alzheimer's disease is a mental illness with changes in brain structure, and multi-channel EEG analysis will help to better parse EEG signals. Therefore, the present application improves the magnitude graph of a single channel, introduces the weight of each channel, that is, the weight coefficient of each channel obtained in the above step 130, and weights the initial magnitude graph of each channel according to the weight coefficient of each channel, and merges them into a weighted magnitude graph so that it can reflect the characteristics of the multi-channel EEG signal.

[0159] It can be understood that the weight coefficients in the present application are obtained by frequency domain analysis of the EEG signal, and the structure of the magnitude diagram is constructed by the timing characteristics of the EEG signal. Therefore, the weighted total multi-channel magnitude diagram not only combines the EEG time domain and frequency domain characteristics, but also takes into account the importance differences between different channels, providing comprehensive and accurate time-frequency diagram data for subsequent model analysis.

[0160] Step 150, parsing the value graph using a graph convolutional neural network model;

[0161] Specifically, after generating data with a graph structure, an adjacency matrix and / or a node feature matrix is ​​usually used to represent the graph, and these two matrices can be used to train a graph convolutional neural network model.

[0162] The adjacency matrix is ​​a matrix used in graph theory to represent the adjacent relationship between each vertex in a graph. For a graph, its adjacency matrix is ​​a square matrix of |V|×|V| (where |V| represents the number of vertices in the graph), and the elements in the matrix represent the connection relationship between the vertices in the graph.

[0163] The node feature matrix is ​​used to represent the feature information of each node. For example, if the quantity graph has I nodes and each node is represented by d features, then the node feature matrix of the quantity graph should be an I×d matrix, where I is the number of nodes and d is the feature dimension of each node, that is, the row represents the node and the column represents the feature corresponding to the node. In the node feature matrix, the feature vector of each node is represented as a row in the matrix. The value of node I is determined when the graph is determined, but d can be any feature related to the node, such as the node's attributes, labels, topological features, etc.

[0164] Preferably, in the present application, the weighted adjacency matrix and / or node feature matrix of the quantity graph is calculated first, and then the graph convolutional neural network model is constructed according to the weighted adjacency matrix and / or node feature matrix of the quantity graph.

[0165] Calculate the weighted adjacency matrix of the magnitude graph. Obtain the structure of the weighted magnitude graph obtained in the above steps, where the values ​​corresponding to two nodes are changed to specific weight values ​​when there is a connection between the nodes, and the values ​​remain 0 when there is no connection. The nodes here are represented by the above magnitudes. In a specific example, the weighted adjacency matrix is ​​as follows Fig.11 shown.

[0166] Calculate the node feature matrix of the magnitude graph. Preferably, in the present application, the degree, clustering coefficient, betweenness centrality, closeness centrality, and density of each node of the magnitude graph are combined into a node feature vector. By constructing the above indicators as node features, the organizational structure and functional characteristics of the brain network can be better understood.

[0167] The degree of a node refers to the number of edges directly connected to the node, which is one of the most basic topological structure indicators. The higher the degree of a node, the greater its importance in the network. The formula for calculating the degree of a node is as follows:

[0168]

[0169] where e a Represents node Ia A ab is the weight value corresponding to row a and column b in the adjacency matrix, and I is the total number of nodes.

[0170] The clustering coefficient is an indicator used to describe the degree of connection between node sets. The higher the clustering coefficient, the closer the connection between nodes. a , the formula for calculating the clustering coefficient is as follows:

[0171]

[0172] Among them C a It is node I a The clustering coefficient, J a is with node I a The actual number of edges between connected neighbor nodes, e a It is node I a The degree.

[0173] Betweenness centrality refers to the frequency with which a node appears in the shortest path in the network, that is, it measures the degree to which the node acts as an intermediary in the network. The higher the betweenness centrality, the greater the role played by the node in the shortest path connecting other nodes. For a node I a , the formula for calculating betweenness centrality is as follows:

[0174]

[0175] Among them C B (a) represents node I a The betweenness centrality, ρ ab Represents node I a and I b The number of shortest paths between ab (a) represents node I a The number of these shortest paths.

[0176] Closeness centrality is an indicator to measure the distance between a node and other nodes, which is the inverse of the average distance between a node and other nodes. The higher the closeness centrality, the closer the distance between the node and other nodes. For a node i, the formula for calculating closeness centrality is as follows:

[0177]

[0178] Among them C C (a) represents node I a is the closeness centrality of , I is the total number of nodes, and φ is the distance between two nodes.

[0179] Density refers to the ratio of the number of edges that actually exist in a network to the number of edges that may exist. The higher the density, the closer the connection between nodes in the network. For an undirected graph, the formula for calculating density is as follows:

[0180]

[0181] Where density represents the density of the network, J is the number of edges in the network, and I is the total number of nodes.

[0182] Finally, the graph convolutional neural network model is constructed according to the weighted adjacency matrix and / or node feature matrix of the quantity graph, and the quantity graph is analyzed using the constructed graph convolutional neural network model.

[0183] This application uses graph convolution neural networks (Graph Convolution Networks, GCN) to learn characteristic rules from the value graphs of various categories and parse the value graphs to be parsed. The input of GCN is a value graph, and the output is still a value graph after layers of calculation and transformation. Explained from the perspective of convolution, the weighted adjacency matrix and / or the node feature matrix are treated as a convolution kernel, and the convolution kernel is used to perform full-scale convolution on the feature results of each hidden layer. Since the content of the convolution kernel is the normalized edge relationship in the graph, the convolution processing with this convolution kernel can transform the features of the hidden layer according to the distance relationship information between the nodes of the value graph. At this time, the features will contain more information between the same samples, so that the neural network can also train a model with good performance without the training conditions of a large number of samples, solving the problem of model overfitting caused by EEG as a small sample data.

[0184] The accuracy and loss rate curves of the verification results of the EEG signal analysis method described in this application on a specific data set are as follows: Fig.12 As shown, epoch represents the number of updates when all training data are used once in learning, train is the training set, and test is the test set used to evaluate the model results after the training model is completed. It can be seen that the method disclosed in this application has a high accuracy, with the highest accuracy of 96.5%.

[0185] Confusion matrix comparison results of subsequent AD risk assessment using the EEG signal analysis method described in this application and the previous EEG signal analysis method Fig.13As shown. The confusion matrix is ​​an error matrix, which is often used to visually evaluate the performance of supervised learning algorithms. Each row of the matrix represents a true label, and each column represents a predicted label. Each element (i, j) of the matrix represents the number of samples with the true label i predicted to be labeled j. As can be seen from the figure, the method disclosed in the present application can greatly improve the recognition accuracy of the subsequent MCI state, which means that the method can be used to detect early AD earlier in the subsequent recognition process, thereby improving the quality of life of patients.

[0186] The EEG signal analysis method provided in the present application determines the weight coefficient of each channel based on the PSD of each channel, and constructs a value graph according to the weight coefficient of each channel. The value graph is analyzed by a graph convolutional neural network model, which can not only find more representative channels, but also discover the differences between the collected data and obtain a valid data set. The channel weights, frequency domain features and time domain features of the EEG signal are simultaneously used as reference inputs for training in the graph convolutional neural network model, thereby improving the generalization and accuracy of the model.

[0187] Correspondingly, the embodiment of the present invention also provides a device for implementing the above-mentioned EEG signal analysis method, such as Fig.14 As shown, the EEG signal analysis device includes: an acquisition unit 141, a PSD calculation unit 142, a weight calculation unit 143, a composition unit 144 and a training recognition unit 145.

[0188] An acquisition unit 141 is used to acquire EEG signals under multiple channels;

[0189] A PSD calculation unit 142 obtains the PSD of each channel according to the EEG signals of each channel;

[0190] A weight calculation unit 143 determines a weight coefficient of each channel according to the PSD of each channel;

[0191] A mapping unit 144 constructs a magnitude map according to the weight coefficient of each channel;

[0192] The training recognition unit 145 analyzes the quantity value graph using a graph convolutional neural network model.

[0193] The effect of the EEG signal analysis device disclosed in the present application is the same as the above-mentioned EEG signal analysis method, which will not be repeated here.

[0194] Below, reference Fig.15 The electronic device 11 according to an embodiment of the present application is described. Fig.15A block diagram of an electronic device according to an embodiment of the present application is shown.

[0195] like Fig.15 As shown, the electronic device 11 includes one or more processors 111 and a memory 112 .

[0196] The processor 111 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 11 to perform desired functions.

[0197] The memory 112 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 111 may run the program instructions to implement the test methods of the various embodiments of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0198] In one example, the electronic device 11 may further include: an input device 113 and an output device 114 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0199] The input device 113 may include, for example, a keyboard, a mouse, etc.

[0200] The output device 114 can output various information to the outside, including determined distance information, direction information, etc. The output device 114 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0201] Of course, to simplify, Fig.15 Only some of the components related to the present application in the electronic device 11 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 11 may also include any other appropriate components.

[0202] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the testing method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0203] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0204] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the testing method according to various embodiments of the present application described in the above “Exemplary Method” section of this specification.

[0205] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0206] The preferred embodiments of the present application are described in detail above; however, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, a variety of simple modifications can be made to the technical solution of the present application, and these simple modifications all fall within the protection scope of the present application.

[0207] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, this application will not further describe various possible combinations.

[0208] In addition, the various implementation modes of the present application may be arbitrarily combined, and as long as they do not violate the concept of the present application, they should also be regarded as the contents disclosed by the present invention.

Claims

1. A method for analyzing EEG signals, characterized in that: The method comprises: Acquire EEG signals under multiple channels; The PSD of each channel is obtained according to the EEG signals under each channel; Determine the weight coefficient of each channel according to the PSD of each channel; Constructing a magnitude map according to the weight coefficient of each channel; The value graph is parsed using a graph convolutional neural network model.

2. The method according to claim 1, characterized in that The method further comprises: Preprocessing the EEG signal of each channel; the preprocessing includes: Determine the band-stop frequency range and the band-pass frequency range; Determine the filter order and the cutoff frequency according to the band-stop frequency range and the band-pass frequency range; Filtering the EEG signal according to the filter order and the cutoff frequency to obtain a filtered EEG signal; Independent component analysis was performed on the filtered EEG signals.

3. The method according to claim 1, characterized in that: The PSD of each channel obtained according to the EEG signal of each channel is specifically: Segmenting the EEG signal to obtain EEG signal data of multiple sub-segments; The EEG signal data of each sub-segment is windowed using a window function; The EEG signal data of each sub-segment after windowing is subjected to discrete Fourier transform, and the discrete Fourier transform formula is: Where u is an integer, X u (f) is the DFT result of the uth segment, x u (i) is the windowed sub-segment, x u (i) represents the signal value of the i-th sampling point in the time domain, h represents the length of the window segment, f is the frequency, U is the number of divided subsegments, e is the base of the natural logarithm, j is the imaginary unit, and π is the circumference of a circle; The PSD of each channel is calculated based on the discrete Fourier transformed data.

4. The method according to claim 3, characterized in that The window function is a Hanning window function; the calculation formula of the Hanning window function is: Among them, w(i) represents the value of the function at the i-th sampling point, i represents the sequence number of the sampling point of the window function, h is the sub-segment length, and π is pi.

5. The method according to claim 3, characterized in that: The PSD of each channel is calculated based on the data after discrete Fourier transformation as follows: The PSD of each sub-segment EEG signal is calculated based on the data after discrete Fourier transformation. The calculation formula is: Where X u (f) is the DFT result of the uth segment, |X u (f)|isX u (f) is the amplitude, h is the sub-segment length; The PSD of each channel is obtained according to the PSD of each sub-segment EEG signal. The calculation formula is: Where U is the number of sub-segments.

6. The method according to claim 1, characterized in that The weight coefficient of each channel is determined according to the PSD of each channel as follows: Performing category ratio calculation on the PSD of each of the channels to obtain the PSD ratio of each channel; the PSD ratio of each of the channels includes corresponding frequency band information; Compare the PSD ratio of each channel with the preset threshold, and group the channels according to the comparison results; Assigning a first weight coefficient to the channels in the first group, and assigning a second weight coefficient to the channels in the second group; The weight coefficient of each channel is calculated according to the first weight coefficient, the second weight coefficient, and corresponding frequency band information.

7. The method according to claim 6, characterized in that The method further comprises: The frequency bands are screened to determine a target frequency band, so as to calculate a category ratio of the PSD of each of the channels under the target frequency band.

8. The method according to claim 6, characterized in that The categories included: HC, MCI, and AD.

9. The method according to claim 1, characterized in that: The method of constructing a magnitude map according to the weight coefficient of each channel is specifically as follows: Constructing an initial magnitude map for each channel based on a Markov chain algorithm; The initial magnitude map of each channel is weighted according to the weight coefficient of each channel to obtain a weighted magnitude map.

10. The method according to claim 1, characterized in that The method further comprises: Calculating a weighted adjacency matrix and / or a node feature matrix of the magnitude graph; The graph convolutional neural network model is constructed according to the weighted adjacency matrix and / or the node feature matrix of the magnitude graph.

11. An EEG signal analysis device, characterized in that: The device comprises: An acquisition unit, for acquiring EEG signals under multiple channels; The PSD calculation unit obtains the PSD of each channel according to the EEG signals under each channel; A weight calculation unit determines the weight coefficient of each channel according to the PSD of each channel; A mapping unit, which constructs a magnitude map according to the weight coefficient of each channel; A recognition unit is trained to parse the quantity value graph using a graph convolutional neural network model.

12. An electronic device comprising: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1 to 10.

13. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the method according to any one of claims 1 to 10.

Citation Information

Cited By

  • Breakdown tendency identification method and device based on electroencephalogram signals, electronic equipment and storage medium

    CN119441899A