Mental state detection method and system based on combination of frequency domain and time domain
Through the method of combining frequency domain time domain, a two-dimensional multi-layer brain functional network is constructed, feature vectors are extracted and classified, which solves the problem of inaccurate mental state detection in the existing technology, improves detection accuracy, and comprehensively analyzes brain activities complex dynamic changes.
Patent Information
- Application Number
- CN202411014326.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-15
AI Technical Summary
In the mental state detection, the prior art only analyzes the brain network from a linear basis, resulting in inaccurate mental state detection results, and fails to fully capture the complex dynamic changes and multi-rhythmic interaction information of brain activity.
By adopting a method based on frequency domain time domain combination, we collect EEG signals, preprocess, acquire micro-state sequences, build a two-dimensional multi-layer brain functional network, extract frequency domain and time domain feature vectors, and input them to the mental state classifier. to obtain more accurate classification results.
The accuracy of mental state detection is improved, and by combining the two dimensions of frequency domain and time domain, a comprehensive analysis of the multi-rhythmic complex dynamic interaction of brain activities is enhanced, and the understanding of the working mechanism under specific states is enhanced.
Smart Images

Figure CN118948278A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of mental state detection, and in particular to a mental state detection method and system based on the combination of frequency domain and time domain. Background Art
[0002] Mental states include attention, fatigue, tension, relaxation, sadness, joy, etc.
[0003] Different changes in mental state have obvious differences in some physiological indicators, and EEG signals are one of them. The nerve cells in the brain communicate with each other through some weak nerve signals, producing some measurable changes, which can be called EEG signals. The essence of EEG signals is the spontaneous discharge behavior of neuronal activity, which is not easily controlled by subjective consciousness. Therefore, mental state can be detected by analyzing EEG signals.
[0004] Brain function networks can be constructed using EEG signals, and the correspondence between brain activity and mental state can be determined through linear analysis to identify mental state. However, brain activity is a complex dynamic process, and only linear analysis of brain networks is one-sided, resulting in inaccurate results for mental state detection. Summary of the invention
[0005] Some embodiments of the present application provide a method and system for mental state detection based on the combination of frequency domain and time domain to solve the problem of inaccurate mental state detection results.
[0006] In a first aspect, some embodiments of the present application provide a method for detecting a mental state based on a combination of frequency domain and time domain, comprising:
[0007] Collect the EEG signals of the tested target in a resting state;
[0008] Preprocessing the EEG signal to obtain a pure EEG signal;
[0009] Acquire a microstate sequence based on the pure EEG signal;
[0010] Constructing a two-dimensional multi-layer brain functional network combining frequency domain and time domain according to the microstate sequence;
[0011] Extracting frequency domain feature vectors and time domain feature vectors from the two-dimensional multi-layer brain functional network;
[0012] The frequency domain feature vector and the time domain feature vector are input into a mental state classifier to obtain a classification result output by the mental state classifier.
[0013] In some embodiments, preprocessing the EEG signal includes:
[0014] Calculating the potential average value of the EEG signal, and setting the potential average value as a target electrode reference point, wherein the target electrode reference point is used to determine the zero potential point of the EEG signal;
[0015] Performing filtering processing on the EEG signal according to a preset low-pass filter and a high-pass filter to obtain a first EEG signal;
[0016] Using a fast independent component analysis algorithm to remove artifact signals in the first EEG signal to obtain a second EEG signal;
[0017] According to the superposition window of preset time length and preset period, the second EEG signal is divided into data segments to generate a pure EEG signal.
[0018] In some embodiments, obtaining a microstate sequence based on the clean EEG signal includes:
[0019] Performing clustering processing on the pure EEG signal according to a clustering algorithm to identify multiple types of microstates in the EEG signal;
[0020] Detecting the microstate type corresponding to each time segment in the pure EEG signal;
[0021] Time segments corresponding to multiple types of microstates are respectively extracted from the pure EEG signal to generate microstate sequences corresponding to multiple types of microstates.
[0022] In some embodiments, a two-dimensional multi-layer brain function network combining frequency domain and time domain is constructed according to the microstate sequence, including:
[0023] Acquiring rhythmic signals of multiple rhythms of the microstate sequence;
[0024] Constructing a frequency-domain and time-domain combined functional connection matrix according to the rhythmic signal;
[0025] A two-dimensional multi-layer brain functional network is generated based on the functional connection matrix combining the frequency domain and the time domain.
[0026] In some embodiments, constructing a frequency domain and time domain combined functional connectivity matrix according to the rhythmic signal includes:
[0027] Performing phase and phase-coupled PPC processing on the rhythm signal of each rhythm at the same time to obtain a first matrix block;
[0028] Performing phase and amplitude coupled PAC processing on rhythm signals of multiple rhythms at the same time to obtain a second matrix block;
[0029] Using the first matrix block as a diagonal block and the second matrix block as a non-diagonal block, a block matrix is established to generate a frequency domain variation matrix;
[0030] Performing phase and phase-coupled PPC processing on the rhythm signal of each rhythm at adjacent times respectively to obtain a third matrix block;
[0031] Using the third matrix block as a diagonal block and the zero matrix as a non-diagonal block, a block matrix is established to generate a time domain variation matrix;
[0032] The frequency domain change matrix and the time domain change matrix share nodes to construct a functional connection matrix combining the frequency domain and the time domain.
[0033] In some embodiments, generating a two-dimensional multi-layer brain functional network based on the functional connectivity matrix combined in the frequency domain and the time domain further includes:
[0034] Binarization processing is performed on the first matrix block and the second matrix block in the frequency domain change matrix, and binarization processing is performed on the third matrix block and the zero matrix in the time domain change matrix to generate a two-dimensional multi-layer brain functional network.
[0035] In some embodiments, the frequency domain feature vector includes: a frequency domain function integration graph metric and a frequency domain function separation graph metric. The frequency domain function separation graph metric includes a frequency domain same-layer clustering coefficient and a frequency domain cross-layer clustering coefficient. The frequency domain function integration graph metric includes a frequency domain participation coefficient, a frequency domain characteristic path length, a frequency domain global efficiency, and a frequency domain overlap entropy.
[0036] In some embodiments, the frequency domain same-layer clustering coefficient is:
[0037]
[0038] in,
[0039] t represents the time point, N T Indicates the number of time points; k, l and p t Represents a node in an EEG signal;
[0040] represents node p on rhythm f t The connection relationship between k and layer t at time point;
[0041] Represents the connection relationship between nodes l and k on rhythm f at time point t;
[0042] represents node p on rhythm f t The connection relationship between l and layer at time point t;
[0043] The frequency domain cross-layer clustering coefficient is:
[0044]
[0045] in,
[0046] σ(·) represents a binary function, ‖·‖ represents a matrix norm;
[0047] B f Represents a block matrix, where the diagonal blocks are zero matrices and the off-diagonal blocks are
[0048] The frequency domain participation coefficient is:
[0049]
[0050] in,
[0051] represents the degree of overlap of node p at time point t on rhythm f;
[0052] The frequency domain characteristic path length includes the frequency domain same window characteristic path length and the frequency domain cross-window layer characteristic path length;
[0053] The characteristic path length in the same window in the frequency domain is:
[0054]
[0055] in,
[0056] represents the shortest path between node m and node l at layer t at time point; m represents the number of nodes;
[0057] The frequency domain cross-window layer characteristic path length is:
[0058]
[0059] in,
[0060] t c represents the temporal combination of adjacent times on the rhythm f;
[0061] The frequency domain global efficiency includes the frequency domain same window global efficiency and the frequency domain cross-window layer global efficiency;
[0062] The global efficiency in the same window in the frequency domain is:
[0063]
[0064] The frequency domain cross-window layer global efficiency is:
[0065]
[0066] The frequency domain overlap entropy is:
[0067]
[0068] in,
[0069] In some embodiments, the time domain feature vector includes: a time domain function integration graph metric and a time domain function separation graph metric. The time domain function separation graph metric includes a time domain same-layer clustering coefficient, a time domain cross-layer clustering coefficient, and a time domain cross-two-layer clustering coefficient. The time domain function integration graph metric includes a time domain participation coefficient, a time domain characteristic path length, a time domain global efficiency, and a time domain overlap entropy. The time domain cross-two-layer clustering coefficient is:
[0070]
[0071] in,
[0072] f1, f2 and f3 represent rhythmic layers, f i and f j represents a rhythm and belongs to the set {f1,f2,f3};
[0073] is a block matrix, the diagonal blocks are zero matrices, and the off-diagonal blocks are
[0074] In a second aspect, some embodiments of the present application provide a mental state detection system based on the combination of frequency domain and time domain, including:
[0075] The EEG signal acquisition module is configured to acquire the EEG signal of the tested target in a resting state;
[0076] A preprocessing module, configured to preprocess the EEG signal to obtain a pure EEG signal;
[0077] A microstate sequence acquisition module, configured to acquire a microstate sequence based on the clean EEG signal;
[0078] A network construction module is configured to construct a two-dimensional multi-layer brain function network combining frequency domain and time domain according to the microstate sequence;
[0079] A feature vector extraction module is configured to extract a frequency domain feature vector and a time domain feature vector from the two-dimensional multi-layer brain functional network;
[0080] The mental state detection module is configured to input the frequency domain feature vector and the time domain feature vector into the mental state classifier to obtain a classification result output by the mental state classifier.
[0081] It can be seen from the above technical solutions that some embodiments of the present application provide a mental state detection method and system based on the combination of frequency domain and time domain. Collect the EEG signals of the tested target in a resting state, and pre-process the EEG signals to obtain pure EEG signals. Obtain a microstate sequence based on the pure EEG signals, and construct a two-dimensional multi-layer brain function network combining frequency domain and time domain according to the microstate sequence. Extract frequency domain feature vectors and time domain feature vectors from the two-dimensional multi-layer brain function network, and input the frequency domain feature vectors and time domain feature vectors into the mental state classifier to obtain the classification results output by the mental state classifier. The present application combines the two dimensions of frequency domain and time domain, and uses a two-dimensional multi-layer brain function network to explore the microscopic fluctuation changes of multi-rhythm complex dynamic interactions of brain activity under a specific distribution, fully analyzes the working mechanism of the brain under a specific state, and improves the accuracy of mental state detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate some embodiments of the present application or technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0083] Figure 1 A flowchart of a mental state detection method based on the combination of frequency domain and time domain provided in some embodiments of the present application. DETAILED DESCRIPTION
[0084] In order to make the purpose, technical solutions and advantages of some embodiments of the present application clearer, the technical solutions of some embodiments of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0085] It should be noted that the brief description of terms in some embodiments of the present application is only for the convenience of understanding the implementation methods described below, and is not intended to limit the implementation methods of some embodiments of the present application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.
[0086] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise indicated. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, for example, they can be implemented according to orders other than those given in the diagrams or descriptions of the embodiments of this application.
[0087] In addition, the terms "include" and "have" and any variations thereof are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to those components explicitly listed but may include other components not explicitly listed or inherent to such products or devices.
[0088] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.
[0089] Mental states include attention, fatigue, tension, relaxation, sadness, joy, etc. Technicians can detect the user's mental state through interviews to determine whether the user is currently in a depressed state. However, in this way, the user subjectively expresses his or her mental state, and the technicians also make subjective judgments. Both parties are controlled by subjective consciousness, resulting in a low accuracy rate of mental state detection.
[0090] It should be noted that different changes in mental state have obvious differences in some physiological indicators, and electroencephalogram (EEG) is one of them. The nerve cells in the brain communicate with each other through some weak nerve signals, producing some measurable changes, which can be called EEG signals. The essence of EEG signals is the spontaneous discharge behavior of neuronal activity, which is not easily controlled by subjective consciousness and can be used as the basis for mental state detection.
[0091] In current research, EEG signals can be used to construct brain function networks, and the correspondence between brain activity and mental state can be determined through linear analysis to identify whether the user is in a state of depression. However, brain activity is a complex dynamic process, and only linear analysis of brain networks is one-sided, resulting in inaccurate results for mental state detection.
[0092] In some embodiments, the frequency-varying multilayer brain function network, as a network framework that contains multi-rhythm interaction information, has a wide range of applications in exploring abnormal rhythmic interaction patterns of depression, but the network framework does not contain information on dynamic changes in brain activity. The time-varying multilayer brain function network depicts the complex dynamic changes of brain connections over time during construction, but the pattern information related to the interaction between different rhythms is ignored in the analysis of the network framework. Therefore, the current technology has low accuracy when detecting mental states.
[0093] In order to solve the problem of inaccurate mental state detection results, some embodiments of the present application provide a mental state detection method based on the combination of frequency domain and time domain. Figure 1FIG. 2 shows a flow chart of a method for detecting a mental state based on the combination of frequency domain and time domain in some embodiments. Figure 1 As shown, the method comprises the following steps:
[0094] S1, collect the EEG signal of the tested target in a resting state;
[0095] S2, preprocessing the EEG signal to obtain a pure EEG signal;
[0096] S3, obtaining a microstate sequence based on the pure EEG signal;
[0097] S4, constructing a two-dimensional multi-layer brain functional network combining frequency domain and time domain according to the microstate sequence;
[0098] S5, extracting frequency domain feature vectors and time domain feature vectors from the two-dimensional multi-layer brain functional network;
[0099] S6. Input the frequency domain feature vector and the time domain feature vector into a mental state classifier to obtain a classification result output by the mental state classifier.
[0100] In step S1, the user's electroencephalogram (EEG) signal may be collected by an EEG signal collection device.
[0101] First, multiple test targets within a preset age range can be determined. For example, multiple test subjects with poor mental state, such as depressed test subjects, and multiple test subjects with normal mental state of similar age and gender can be screened out. After that, the sampling frequency of the EEG signal can be set, and then the EEG signal of the test target can be collected through the sensor of the EEG cap according to the sampling frequency.
[0102] In the embodiment of the present application, the EEG signal acquisition device may include an EEG acquisition instrument, a 128-lead EEG cap and an amplifier. Among them, the EEG acquisition device can use the EEG acquisition instrument produced by Electrical Geodesics Ins, the EEG cap is a 128-lead HCGSN (HydroCel Geodesic SensorNet) EEG acquisition system, the amplifier is NetAmps200, and the EEG acquisition software is Net Station 5.4 version. The position of the electrode is placed according to the international standard lead 10-20 system standard, the reference electrode is Cz, the sampling frequency is 250Hz, and the impedance of the electrode is less than 50kΩ.
[0103] The EEG data collected is when the test target is in a resting state with eyes closed for a set period of time, for example, the EEG data collected is when the test target is in a resting state with eyes closed for 5 minutes.
[0104] In step S2, after the EEG signal of the tested target in a resting state is collected, in order to ensure the accuracy of the detection, the EEG signal can be preprocessed to obtain a pure EEG signal.
[0105] Since the original EEG signals contain noise and invalid data from various sources, these factors may interfere with the real EEG activity and thus affect the final analysis results. Preprocessing can improve the quality of EEG signals, eliminate noise and interference that may affect the results, and provide a clear and reliable EEG signal basis for subsequent mental state recognition.
[0106] In order to improve the accuracy of the test results, before the main preprocessing process, the integrity of the EEG signal can be detected first, and the data of subjects with more missing data during the EEG signal acquisition process can be removed, so that the data of subjects with more comprehensive data are finally left.
[0107] In some embodiments, the preprocessing of the EEG signal may include steps such as electrode re-referencing, filtering, artifact removal, and sample division.
[0108] First, the reference electrode position can be reset to reduce the influence of reference electrode selection on the EEG signal.
[0109] The potential average of the EEG signal can be calculated and set as the target electrode reference point, which is used to determine the zero potential point of the EEG signal. It is understandable that the original electrode configuration may lead to spatial inhomogeneity of the EEG signal. By using the average value of the whole-brain electrode potential to create a new reference point, the EEG signal can be standardized, the variability between different electrodes can be reduced, and the signal can be made more comparable.
[0110] After resetting the reference electrode, a relatively standard EEG signal can be obtained, and the EEG signal can be filtered using a bandpass filter.
[0111] The electroencephalogram signal is filtered according to a preset low-pass filter and a preset high-pass filter to obtain a first electroencephalogram signal. The electroencephalogram signal is input into a preset low-pass filter and a preset high-pass filter to filter out fast wave components and slow wave components in the electroencephalogram signal.
[0112] For example, a 0.5 Hz high-pass filter is used to remove low-frequency drift and DC components of the EEG signal, and a 40 Hz low-pass filter is used to remove high-frequency noise of the EEG signal, such as electromyographic artifacts and power line noise, thereby enhancing the stability of the signal and improving the sensitivity of subsequent analysis.
[0113] After filtering, artifact removal can be performed.
[0114] A fast independent component analysis algorithm is used to remove artifact signals in the first EEG signal to obtain a second EEG signal.
[0115] Signal artifacts include electrooculographic artifacts and electromyographic artifacts, etc. The FastICA (fast independent component analysis) algorithm can be used to analyze the first EEG signal to separate interfering signals such as electrooculographic artifacts and electromyographic artifacts, thereby retaining a pure EEG signal.
[0116] The second EEG signal can be divided into data segments according to a preset time-length superposition window and a preset period to generate a pure EEG signal. For example, a 2-second superposition window can be used to segment the second EEG signal with a 4-second period, and 90 seconds of clean EEG data can be extracted as a pure EEG signal for subsequent mental state detection.
[0117] In step S3, a microstate sequence may be obtained based on the pure EEG signal, including the following steps:
[0118] S301. Perform clustering processing on the pure EEG signal according to a clustering algorithm to identify multiple types of microstates in the EEG signal.
[0119] Among them, microstates refer to stable and short-lived potential distribution patterns in EEG signals. EEG signals usually maintain a relatively stable spatial activation pattern for a certain period of time (tens to one hundred milliseconds), and then quickly switch to another relatively stable spatial activation pattern. Several typical activation patterns can be obtained through cluster analysis of EEG topology maps, and neural activity repeatedly switches between these patterns. These short-term stable activation patterns are called "microstates", which reflect the instantaneous state of neural activity in the whole brain. Microstates can also be considered as topographic maps of EEG signals.
[0120] It has been found that there are four microstates (defined as A, B, C, D) with similar patterns, and these four microstates can correspond to the resting brain network found in functional magnetic resonance imaging (fMRI), and the four EEG microstates (A, B, C, D) can correspond to the four resting brain functional networks of auditory network, visual network, salience network and attention network respectively. The global pattern of EEG signals changes less, indicating that the brain is performing certain specific functional activities, and these patterns can explain most of the variance of EEG signals. For this reason, the microstate types in the embodiments of the present application adopt the above four types.
[0121] For the clean EEG signals obtained, four prototype microstates can be identified using the AAHC (Atomize and Agglomerate Hierarchical Clustering) clustering algorithm at the group level (the collected data of the tested targets can be divided into a depression group or a normal group).
[0122] S302: Detect the microstate type corresponding to each time segment in the pure EEG signal.
[0123] Based on the group-level template, it can be determined which microstate the EEG signal of each tested target belongs to at each time point.
[0124] S303. Extracting time segments corresponding to multiple types of microstates from the pure EEG signal respectively to generate microstate sequences corresponding to multiple types of microstates.
[0125] Since the clustering algorithm does not produce a consistent specific clustering order in different data sets, the microstates can be reordered based on the template to ensure consistency between different subjects. After determining the microstate type to which the signal segment corresponding to each time point belongs, the corresponding segments of the four microstates can be extracted respectively, thereby obtaining a set sequence consisting of four segments, that is, the microstate sequence corresponding to the four microstate types.
[0126] In step S4, a two-dimensional multi-layer brain function network combining frequency domain and time domain is constructed according to the microstate sequence. Specifically, the following steps are included:
[0127] S401. Acquire rhythmic signals of multiple rhythms of a microstate sequence.
[0128] The embodiment of the present application can divide the EEG signal into five frequency bands according to the preset frequency band values, namely delta band (1-4 Hz), theta band (4-8 Hz), alpha band (8-14 Hz), beta band (14-31 Hz) and gamma band (31-50 Hz). The EEG signal corresponding to each frequency band is the rhythm.
[0129] By applying high-pass filtering and low-pass filtering to the four microstate sequences, the rhythmic signals corresponding to the five rhythms can be extracted. Among them, the delta rhythm (using high-pass filtering 0.5Hz, low-pass filtering 4Hz), theta rhythm (using high-pass filtering 4Hz, low-pass filtering 8Hz), alpha rhythm (using high-pass filtering 8Hz, low-pass filtering 13Hz), beta rhythm (using high-pass filtering 13Hz, low-pass filtering 30Hz) and gamma rhythm (using high-pass filtering 30Hz, low-pass filtering 40Hz) components are obtained, thereby obtaining the above five standard rhythms of each microstate sequence.
[0130] S402. Construct a functional connection matrix combining frequency domain and time domain according to the rhythmic signal.
[0131] The functional connection matrices corresponding to the frequency domain and the time domain can be constructed separately, and then the two matrices can be merged to obtain a functional connection matrix combining the frequency domain and the time domain.
[0132] Among them, the construction method of the functional connection matrix corresponding to the frequency domain is as follows:
[0133] Phase and phase coupling PPC processing is performed on the rhythmic signals of each rhythm at the same time to obtain the first matrix block. The rhythms include delta, theta, alpha, beta and gamma. PPC processing can be performed on the five rhythms respectively to obtain the first matrix blocks corresponding to the five rhythms.
[0134] The EEG signal includes signals in multiple frequency bands. Assuming that x(t) and y(t) are two signals in the EEG signal, the PPC calculation method is as follows:
[0135]
[0136] in,
[0137] sign is the sign function, and are the instantaneous phases of the EEG signals at time point t after Hilbert transform, and mean(·) means the average of the results at all time points.
[0138] Furthermore, phase and amplitude coupled PAC processing can be performed on the rhythm signals of multiple rhythms at the same time to obtain a second matrix block. By performing PAC processing on the rhythm signals of every two rhythms, 10 second matrix blocks can be obtained, represented as: (delta-theta, delta-alpha, delta-beta, delta-gamma, theta-alpha, theta-beta, theta-gamma, alpha-beta, alpha-gamma and beta-gamma).
[0139] PAC is calculated as follows:
[0140]
[0141] in,
[0142] log(·) means taking the natural logarithm, p(A) and are the marginal probability densities of amplitude and phase, is the joint probability density of amplitude and phase.
[0143] A block matrix is established with the first matrix block as a diagonal block and the second matrix block as a non-diagonal block to generate a frequency domain variation matrix.
[0144] The frequency domain change matrix is a functional connection matrix formed by 5×5 blocks, wherein the 5 first matrix blocks are used as the 5 diagonal blocks on the diagonal line, and the 10 second matrix blocks are distributed once on the upper and lower sides of the diagonal line, with a total of 20 blocks as non-diagonal blocks.
[0145] The construction method of the functional connection matrix corresponding to the time domain is as follows:
[0146] Phase and phase coupling PPC processing is performed on the rhythm signals of each rhythm at adjacent times to obtain the third matrix block. PPC processing can be performed on the five rhythms respectively to obtain the third matrix blocks corresponding to the five rhythms.
[0147] The block matrix is established with the third matrix block as the diagonal block and the zero matrix as the non-diagonal block to generate the time domain change matrix. The time domain change matrix is a functional connection matrix formed by 5×5 blocks. Among them, the 5 third matrix blocks are used as the 5 diagonal blocks on the diagonal line, and the remaining 20 non-diagonal blocks are all zero matrices. The time domain change matrix can measure the relationship between adjacent time domain signals.
[0148] The frequency domain change matrix and the time domain change matrix share nodes to construct a functional connection matrix combining the frequency domain and the time domain. The nodes can be considered as the electrode positions corresponding to the EEG signals.
[0149] The functional connection matrix combining frequency domain and time domain can be expressed as:
[0150]
[0151] in,
[0152] is time point t i The corresponding frequency domain change matrix;
[0153] is time point t i and its adjacent time point t j The time domain change matrix of the interaction, whose diagonal blocks represent the time point t i Each node and its j The connection relationship between corresponding nodes under the same rhythm.
[0154] S403. Generate a two-dimensional multi-layer brain functional network based on the functional connection matrix combining the frequency domain and the time domain.
[0155] Binarization processing is performed on the first matrix block and the second matrix block in the frequency domain variation matrix, and binarization processing is performed on the third matrix block and the zero matrix in the time domain variation matrix to generate a two-dimensional multi-layer brain functional network.
[0156] For all blocks in the functional connectivity matrix, CST (Cluster Span Threshold) technology can be used for binarization. CST technology is an unbiased threshold method, which first calculates the binarized network under the ratio threshold of 15% to 85% (with a step size of 1%), and then selects the ratio threshold that can make the ratio of closed triples to open triples closest to 0.5 as the final selected threshold. Assuming that the total number of nodes is N, the ratio of closed and open triples is calculated as:
[0157]
[0158] in,
[0159] A is the adjacency matrix obtained by binarizing the FC matrix under the current ratio threshold. ij represents the element in the i-th row and j-th column of matrix A, Indicates setting the diagonal elements of the matrix to 0.
[0160] In step S5, frequency domain feature vectors and time domain feature vectors are extracted from the two-dimensional multi-layer brain functional network.
[0161] The two-dimensional multi-layer brain function network can show the user's brain activity from two dimensions: frequency domain and time domain. The two-dimensional multi-layer brain function network can be divided into multiple time layers and multiple rhythm layers.
[0162] The two-dimensional multi-layer brain functional network can be analyzed from the frequency domain dimension and the time domain dimension to extract graph metrics, which are topological property indicators that can be used as feature vectors for subsequent detection. Graph metrics can include features related to functional integration and functional separation, so they can be extracted separately.
[0163] In some embodiments, the frequency domain feature vector may include: a frequency domain function integration graph metric and a frequency domain function separation graph metric.
[0164] Among them, the frequency domain function separation graph metrics include the frequency domain same-layer clustering coefficient and the frequency domain cross-layer clustering coefficient. The frequency domain function integration graph metrics include: frequency domain characteristic path length, frequency domain global efficiency, and frequency domain overlap entropy.
[0165] From the frequency domain perspective, graph metrics related to functional separation can be defined, including:
[0166] The frequency domain same-layer clustering coefficient can be defined as:
[0167]
[0168] in,
[0169] t represents the time point, N TIndicates the number of time points; k, l and p t Represents a node in an EEG signal;
[0170] represents node p on rhythm f t The connection relationship between k and layer t at time point;
[0171] Represents the connection relationship between nodes l and k on rhythm f at time point t;
[0172] represents node p on rhythm f t The connection relationship between l and l at time point t.
[0173] mean(·) represents the average of the local clustering coefficients of all channels at the same level.
[0174] The frequency domain cross-layer clustering coefficient can be defined as:
[0175]
[0176] in,
[0177] σ(·) represents a binary function, ‖·‖ represents a matrix norm;
[0178] B f Represents a block matrix, where the diagonal blocks are zero matrices and the off-diagonal blocks are B f The non-diagonal blocks of are the sub-matrices of the adjacent block matrix of the time point t layer on the rhythm f after deleting the column or row where the node p is located.
[0179] represents nodes p and k on rhythm f at time point t i Connection relationships on layers;
[0180] represents nodes l and k on rhythm f at time point t i Connection relationships on layers;
[0181] represents nodes p and l on rhythm f at time point t i The connection relationship on the layer.
[0182] You can define graph metrics related to functional integration, including:
[0183] The frequency domain participation coefficient is:
[0184]
[0185] in,
[0186] Represents the degree of overlap of node p at layer t on rhythm f at time point t.
[0187] The frequency domain characteristic path length includes the characteristic path length within the same window in the frequency domain and the characteristic path length across the window layer in the frequency domain.
[0188] Among them, the average value of the sum of the lengths of the shortest paths between nodes in the same time layer on the rhythm f can be calculated, and the characteristic path length GWL in the same window can be obtained f Then, by calculating the average of the sum of the lengths of the shortest path lengths between nodes at different time layers on the rhythm f, the cross-window layer characteristic path length GCL can be obtained. f .
[0189] The characteristic path length in the same window in the frequency domain is expressed as:
[0190]
[0191] in,
[0192] represents the shortest path between node m and node l at layer t at time point; m represents the number of nodes;
[0193] The characteristic path length across the window layer in the frequency domain is expressed as:
[0194]
[0195] in,
[0196] t c It represents the temporal combination of adjacent times on the rhythm f, that is, the interactive time with connections.
[0197] You can also define the global efficiency in the frequency domain, including the global efficiency within the same window in the frequency domain and the global efficiency across window layers in the frequency domain.
[0198] Among them, the global efficiency in the same window in the frequency domain is expressed as:
[0199]
[0200] The global efficiency of the cross-window layer in the frequency domain is expressed as:
[0201]
[0202] By integrating the definition methods of overlap and Shannon entropy, the frequency domain overlap entropy can be obtained as:
[0203]
[0204] in,
[0205] In some embodiments, the time-domain feature vector includes: a time-domain functional integration graph metric and a time-domain functional separation graph metric.
[0206] Among them, the time domain function separation graph metrics include the time domain same-layer clustering coefficient, the time domain cross-layer clustering coefficient, and the time domain cross-two-layer clustering coefficient. The time domain function integration graph metrics include the time domain participation coefficient, the time domain characteristic path length, the time domain global efficiency, and the time domain overlap entropy.
[0207] It is possible to define graph metrics related to functional separation.
[0208] By replacing the consideration of the connection relationship of nodes on a certain rhythmic time layer with the consideration of the connection relationship of nodes on a rhythmic layer at a certain time point, we can obtain the clustering coefficient (GC) related to functional separation in the time domain. t ), cross-layer clustering coefficient (GC2 t ). The calculation method is the same as GC f and GC2 f The difference is that what is involved now are the nodes within the same rhythm layer and between different rhythm layers at time point t, and the corresponding distance relationship involved depends on the connection within the rhythm layer and between rhythm layers at time point t.
[0209] Among them, the time domain same-layer clustering coefficient is expressed as:
[0210]
[0211] in,
[0212] f represents any rhythm among delta, theta, alpha, beta and gamma, k, l and p f Represents a node;
[0213] Represents the connection relationship between nodes p and q on the rhythm f layer at time point t.
[0214] The time domain cross-layer clustering coefficient is expressed as:
[0215]
[0216] in,
[0217] σ(·) represents a binary function, ‖·‖ represents a matrix norm;
[0218] B t Represents a block matrix related to connection, where the diagonal blocks are zero matrices and the off-diagonal blocks are B t The non-diagonal blocks are the rhythm f at time point t i and rhythm jThe adjacency block matrix of the interactive layer is the sub-matrix after deleting the column or row where the node p is located.
[0219] Indicates rhythm f i The connection relationship between the upper nodes p and k at the time point t layer;
[0220] Indicates rhythm f j The connection relationship between the upper nodes l and k at the time point t layer;
[0221] Indicates rhythm f i The connection relationship between nodes p and l at time point t.
[0222] In addition, compared with a certain rhythm, there is only a composite connection network in adjacent time layers, that is, only the same nodes in adjacent time layers have connection edges. Therefore, there is no connection edge between different nodes across two time layers at the same time, so it is impossible to form a closed triangle across two time layers; while at the same time point, there may be a fully connected network between rhythm layers, that is, there are connection edges between different nodes between rhythm layers, so a closed triangle across two rhythm layers in the time domain can be formed, so the clustering coefficient across two layers in the time domain (GC3) can be further defined. t ), expressed as:
[0223]
[0224] in,
[0225] f1, f2 and f3 are any three different rhythmic layers among delta, theta, alpha, beta and gamma;
[0226] f i and f j represents rhythm and belongs to the set {f1,f2,f3};
[0227] The diagonal blocks are zero matrices, and the off-diagonal blocks are represents the rhythm f at time point t i and rhythm j The sub-matrix of the block matrix related to the interaction layer connection after deleting the column or row where the corresponding time point is located.
[0228] represents the connection relationship between nodes p and k on rhythm f1 at time point t;
[0229] represents the connection relationship between nodes l and k on rhythm f2 at time point t;
[0230] Represents the connection relationship between nodes p and l on rhythm f3 at time point t.
[0231] The time domain feature path length includes the feature path length within the same window in the time domain and the feature path length across window layers in the time domain.
[0232] Among them, the characteristic path length in the same window in the time domain is expressed as:
[0233]
[0234] The feature path length across the window layer in the time domain is expressed as:
[0235]
[0236] in,
[0237] f c represents any pair of interacting rhythms among delta-theta, delta-alpha, delta-beta, delta-gamma, theta-alpha, theta-beta, theta-gamma, alpha-beta, alpha-gamma and beta-gamma;
[0238] is the shortest path from node k to node l.
[0239] The global efficiency in the time domain includes the global efficiency in the same window in the time domain globalGWL t and time domain cross-window layer global efficiency globalGCL t , respectively expressed as:
[0240]
[0241] Time domain overlap entropy (GME t ) is defined as
[0242]
[0243] in,
[0244] The time domain participation coefficient can be expressed as:
[0245]
[0246] In step S6, the frequency domain feature vector and the time domain feature vector are input into the mental state classifier to obtain the classification result output by the mental state classifier.
[0247] The mental state classifier can be a support vector machine classifier (SVM), a decision tree classifier (DT), a K-nearest neighbor classifier (KNN), and a naive Bayes classifier ( Bayes, NB).
[0248] The frequency domain feature vector and the time domain feature vector are classified by a mental state classifier, and the output classification result represents the detection result of the mental state.
[0249] In the embodiment of the present application, frequency domain feature vectors and time domain feature vectors are combined to perform classification detection together, thereby improving the accuracy of mental state detection.
[0250] In order to verify the present application, three cases, namely, using the frequency domain feature vector alone, using the time domain feature vector alone, and using both feature vectors simultaneously, can be used for experimental verification.
[0251] The feature selection algorithms used include: Correlation-based Feature Selection (CFS), ReliefF method (ReliefF), Mutual Information based Feature Selection (mutInfFS) and Laplacian Score for Feature Selection (LSFS).
[0252] For each feature vector, four classifiers are used directly in turn, or four feature selection algorithms are further combined to distinguish the two groups of people. For each classification task, 20 rounds of three-fold cross validation are performed, and the average classification accuracy results are shown in Tables 1 and 2.
[0253] Table 1 evaluates the depression recognition performance of three feature vectors under different feature selection methods based on SVM, DT, KNN and NB classifiers:
[0254]
[0255]
[0256] Among them, CFS is the correlation-based Feature Selection method, ReliefF is the ReliefF method, mutInfFS is the mutual information based Feature Selection method, LSFS is the Laplacian Score for Feature Selection, and FULL is a feature-free selection algorithm.
[0257] Table 2 evaluates the depression recognition performance of three feature vectors under different classifiers based on CFS, ReliefF, mutInfFS and LSFS feature selection algorithms:
[0258]
[0259] Note: SVM: Support Vector Machine, DT: Decision Tree, KNN: K-Nearest Neighbor, NB: Naive Bayesian Bayes).
[0260] According to the average results of the classification accuracy of the four classifiers under the four feature selection algorithms shown in Table 1, the state sequences Microstates A and D can achieve the highest average classification accuracy in this state when FTFV is used as the feature vector and ReliefF is used as the feature selection algorithm; the state sequence Microstate B can also achieve the highest average classification accuracy in this state when FTFV is used as the feature vector and mutInfFS is used as the feature selection algorithm. At this time, under different feature selection algorithms, a total of 3 / 4 state sequences (Microstates A, B and D) can achieve the highest accuracy when using the two-dimensional combined feature vector FTFV. According to the average results of the classification accuracy of the four feature selection algorithms under different classifiers shown in Table 2, the state sequences Microstates A and D can achieve the highest average classification accuracy in this state when FTFV is used as the feature vector and SVM is used as the classifier; the state sequence Microstate B can also achieve the highest average classification accuracy in this state when FTFV is used as the feature vector and NB is used as the classifier. Similarly, when using different classifiers, 3 / 4 of the state sequences (Microstates A, B and D) can achieve the highest accuracy when using the two-dimensional combined feature vector FTFV.
[0261] For the three cases, the average classification accuracy under different state sequences, classifiers, and feature selection algorithms are shown in Table 3. The results show that the average accuracy of the two-dimensional combined feature vector FTFV is the highest.
[0262] Table 3 evaluates the depression recognition performance of three feature vectors under different conditions based on SVM, DT, KNN and NB classifiers and CFS, ReliefF, mutInfFS and LSFS feature selection algorithms:
[0263]
[0264] Therefore, this application expands the existing multi-layer brain function network framework, first uses microstate analysis to capture specific metastable spatial patterns, and then uses a two-dimensional multi-layer brain function network to explore the microscopic fluctuation changes of multi-rhythmic complex dynamic interactions of brain activity under a specific distribution, fully analyzing the working mechanism of the brain under a depressive state and improving the accuracy of mental state detection.
[0265] The embodiment of the present application also provides a mental state detection system based on the combination of frequency domain and time domain. It includes:
[0266] The EEG signal acquisition module is configured to acquire the EEG signal of the tested target in a resting state;
[0267] A preprocessing module, configured to preprocess the EEG signal to obtain a pure EEG signal;
[0268] A microstate sequence acquisition module, configured to acquire a microstate sequence based on the clean EEG signal;
[0269] A network construction module is configured to construct a two-dimensional multi-layer brain function network combining frequency domain and time domain according to the microstate sequence;
[0270] A feature vector extraction module is configured to extract a frequency domain feature vector and a time domain feature vector from the two-dimensional multi-layer brain functional network;
[0271] The mental state detection module is configured to input the frequency domain feature vector and the time domain feature vector into the mental state classifier to obtain a classification result output by the mental state classifier.
[0272] The same and similar parts between the various embodiments in this specification can be referenced to each other and will not be described again here.
[0273] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art that are not disclosed in the present invention.
[0274] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for detecting mental state based on the combination of frequency domain and time domain, characterized in that: include: Collect the EEG signals of the tested target in a resting state; Preprocessing the EEG signal to obtain a pure EEG signal; Acquire a microstate sequence based on the pure EEG signal; Constructing a two-dimensional multi-layer brain functional network combining frequency domain and time domain according to the microstate sequence; Extracting frequency domain feature vectors and time domain feature vectors from the two-dimensional multi-layer brain functional network; The frequency domain feature vector and the time domain feature vector are input into a mental state classifier to obtain a classification result output by the mental state classifier.
2. The mental state detection method according to claim 1, characterized in that: Preprocessing the EEG signal includes: Calculating the potential average value of the EEG signal, and setting the potential average value as a target electrode reference point, wherein the target electrode reference point is used to determine the zero potential point of the EEG signal; Performing filtering processing on the EEG signal according to a preset low-pass filter and a high-pass filter to obtain a first EEG signal; Using a fast independent component analysis algorithm to remove artifact signals in the first EEG signal to obtain a second EEG signal; According to the superposition window of preset time length and preset period, the second EEG signal is divided into data segments to generate a pure EEG signal.
3. The mental state detection method according to claim 1, characterized in that: Acquiring a microstate sequence based on the pure EEG signal includes: Performing clustering processing on the pure EEG signal according to a clustering algorithm to identify multiple types of microstates in the EEG signal; Detecting the microstate type corresponding to each time segment in the pure EEG signal; Time segments corresponding to multiple types of microstates are respectively extracted from the pure EEG signal to generate microstate sequences corresponding to multiple types of microstates.
4. The mental state detection method according to claim 1, characterized in that: A two-dimensional multi-layer brain function network combining frequency domain and time domain is constructed according to the microstate sequence, including: Acquiring rhythmic signals of multiple rhythms of the microstate sequence; Constructing a frequency-domain and time-domain combined functional connection matrix according to the rhythmic signal; A two-dimensional multi-layer brain functional network is generated based on the functional connection matrix combining the frequency domain and the time domain.
5. The mental state detection method according to claim 4, characterized in that: A frequency domain and time domain functional connection matrix is constructed according to the rhythmic signal, including: Performing phase and phase-coupled PPC processing on the rhythm signal of each rhythm at the same time to obtain a first matrix block; Performing phase and amplitude coupled PAC processing on rhythm signals of multiple rhythms at the same time to obtain a second matrix block; Using the first matrix block as a diagonal block and the second matrix block as a non-diagonal block, a block matrix is established to generate a frequency domain variation matrix; Performing phase and phase-coupled PPC processing on the rhythm signal of each rhythm at adjacent times respectively to obtain a third matrix block; Using the third matrix block as a diagonal block and the zero matrix as a non-diagonal block, a block matrix is established to generate a time domain variation matrix; The frequency domain change matrix and the time domain change matrix share nodes to construct a functional connection matrix combining the frequency domain and the time domain.
6. The mental state detection method according to claim 5, characterized in that: Generating a two-dimensional multi-layer brain functional network based on the functional connection matrix combined with the frequency domain and the time domain also includes: Binarization processing is performed on the first matrix block and the second matrix block in the frequency domain change matrix, and binarization processing is performed on the third matrix block and the zero matrix in the time domain change matrix to generate a two-dimensional multi-layer brain functional network.
7. The mental state detection method according to claim 5, characterized in that: The frequency domain feature vector includes: frequency domain function integration graph metric and frequency domain function separation graph metric; The frequency domain functional separation graph measurement includes a frequency domain same-layer clustering coefficient and a frequency domain cross-layer clustering coefficient; The frequency domain functional integration graph metrics include frequency domain participation coefficient, frequency domain characteristic path length, frequency domain global efficiency, and frequency domain overlap entropy.
8. The mental state detection method according to claim 7, characterized in that: The frequency domain same-layer clustering coefficient is: in, t represents the time point, N T Indicates the number of time points; k, l and p t Represents a node in an EEG signal; represents node p on rhythm f t The connection relationship between k and layer t at time point; Represents the connection relationship between nodes l and k on rhythm f at time point t; represents node p on rhythm f t The connection relationship between l and layer l at time point t; The frequency domain cross-layer clustering coefficient is: in, σ(·) represents a binary function, ‖·‖ represents a matrix norm; B f Represents a block matrix, where the diagonal blocks are zero matrices and the off-diagonal blocks are The frequency domain participation coefficient is: in, represents the degree of overlap of node p at time point t on rhythm f; The frequency domain characteristic path length includes the frequency domain same window characteristic path length and the frequency domain cross-window layer characteristic path length; The characteristic path length in the same window in the frequency domain is: in, represents the shortest path between node k and node l at layer t at time point; m represents the number of nodes; The frequency domain cross-window layer characteristic path length is: in, t c represents the temporal combination of adjacent times on the rhythm f; The frequency domain global efficiency includes the frequency domain same window global efficiency and the frequency domain cross-window layer global efficiency; The global efficiency in the same window in the frequency domain is: The frequency domain cross-window layer global efficiency is: The frequency domain overlap entropy is: in, 9. The mental state detection method according to claim 8, characterized in that: The time domain feature vector includes: a time domain function integration graph metric and a time domain function separation graph metric; The time domain functional separation graph metrics include the time domain same-layer clustering coefficient, the time domain cross-layer clustering coefficient and the time domain cross-two-layer clustering coefficient; The time domain functional integration graph metrics include time domain participation coefficient, time domain characteristic path length, time domain global efficiency, and time domain overlap entropy; The time domain cross-two-layer clustering coefficient is: in, f1, f2 and f3 represent rhythmic layers, f i and f j represents a rhythm and belongs to the set {f1,f2,f3}; is a block matrix, the diagonal blocks are zero matrices, and the off-diagonal blocks are 10. A mental state detection system based on frequency domain and time domain combination, characterized in that: include: The EEG signal acquisition module is configured to acquire the EEG signal of the tested target in a resting state; A preprocessing module, configured to preprocess the EEG signal to obtain a pure EEG signal; A microstate sequence acquisition module, configured to acquire a microstate sequence based on the clean EEG signal; A network construction module is configured to construct a two-dimensional multi-layer brain function network combining frequency domain and time domain according to the microstate sequence; A feature vector extraction module is configured to extract a frequency domain feature vector and a time domain feature vector from the two-dimensional multi-layer brain functional network; The mental state detection module is configured to input the frequency domain feature vector and the time domain feature vector into the mental state classifier to obtain a classification result output by the mental state classifier.
Citation Information
Cited By
Electroencephalogram signal feature extraction method and device based on frequency domain analysis
CN119564230A
Electroencephalogram signal feature extraction method and device based on frequency domain analysis
CN119564230B
Space auditory attention dynamic coupling analysis method and system based on multilayer network
CN120216935A
Method and system for dynamic coupling analysis of spatial auditory attention based on a multi-layer network
CN120216935B
