Psychological state detection method based on cross-frequency coupling and band attention mechanism

By employing cross-frequency coupling and frequency band attention mechanisms, this study addresses the issues of low adaptability and feature utilization efficiency in existing mental state detection models under new environments, thereby achieving highly efficient mental state detection.

CN117653117BActive Publication Date: 2026-06-23BEIJING UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING UNIV OF TECH
Filing Date
2024-01-19
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing mental state detection methods struggle to adapt to new environments, and their performance deteriorates with limited labeled data, making it difficult to effectively utilize EEG signal features and thus reducing detection capabilities.

Method used

A psychological state detection method based on cross-frequency coupling and frequency band attention mechanism is adopted. By preprocessing EEG data, decomposing frequency bands, calculating phase-amplitude coupling matrix, extracting cross-frequency coupling features, and using adaptive attention mechanism and multi-scale feature extraction, the psychological state classification network is optimized.

Benefits of technology

This improved the model's adaptability and detection accuracy in new environments, enhanced feature representativeness, and enabled efficient psychological state detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117653117B_ABST
    Figure CN117653117B_ABST
Patent Text Reader

Abstract

The present application provides a mental state detection method based on cross-frequency coupling and band attention mechanism, relates to the technical field of electroencephalogram signal processing, and comprises the following steps: preprocessing electroencephalogram data and decomposing the electroencephalogram data into a high-frequency band range and a low-frequency band range, and respectively performing sub-band selection; calculating a phase-amplitude coupling matrix for the multi-channel decomposition result of each sub-band; calculating the attention weight of each pair of sub-bands, and aggregating and convolving features to obtain a unique representation of each band coupling feature; performing multi-scale feature extraction, capturing coupling features with high contribution in different receptive fields and performing feature enhancement processing; a mental state classification network initial model compresses the coupling features after the feature enhancement processing, reduces the dimension of the coupling features, obtains new feature representations, and performs classification training based on the new feature representations through a plurality of full connection layers to obtain an optimized mental state classification network model. The present application can effectively improve the accuracy of the classification model in mental state detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electroencephalogram (EEG) signal processing technology, and in particular to a method for detecting mental states based on cross-frequency coupling and bandgap attention mechanisms. Background Technology

[0002] The goal of mental state detection is to effectively detect an individual's mental state. As detection models continue to evolve, the number of parameters increases, placing higher demands on the required training data and necessitating large amounts of diverse labeled data to achieve high generalization. However, in practical applications, acquiring large-scale labeled data for specific scenarios is challenging. Furthermore, identification models often struggle to adapt quickly to new individuals exhibiting depressive mental states, leading to performance degradation. Therefore, how to cultivate efficient mental state identification models with limited labeled data has become an urgent problem to be solved in the medical and scientific communities.

[0003] In existing methods for detecting mental states, the ever-growing parameter size of modern models makes them prone to overfitting with existing data and feature models without sufficiently accurate feature extraction methods. This leads to a significant decline in their ability to detect the mental states of new individuals in new environments. Furthermore, existing methods struggle to adapt effectively to changing environments. Most machine learning models typically focus on fitting the data distribution during the learning process, neglecting the phase synchronization phenomenon of EEG data across different frequency bands. This makes effective adaptation and learning challenging in new contexts where labeled data is scarce.

[0004] Therefore, the question is how to enable machine learning models to more effectively utilize EEG signal features in data, thereby adapting to and learning new situations more quickly, and thus solving the problems of different mental states of individuals in new scenarios and the inefficiency of screening EEG-related features. Summary of the Invention

[0005] To address the problems in the background technology, this invention provides a psychological state detection method based on cross-frequency coupling and frequency band attention mechanism, which dynamically calculates indicators according to the actual needs of the project to meet the development needs of the business.

[0006] To achieve the above objectives, this invention provides a method for detecting mental states based on cross-frequency coupling and bandgap attention mechanisms, comprising:

[0007] Preprocessing of EEG data yields high-quality EEG signals that meet standards;

[0008] High-quality EEG signals are decomposed into high-frequency and low-frequency bands, and sub-band selection is performed on the high-frequency and low-frequency band data respectively.

[0009] Calculate the phase-amplitude coupling matrix for the multichannel decomposition results of each sub-band in the high-frequency and low-frequency ranges;

[0010] Based on the phase-amplitude coupling matrix, the attention weights for each pair of sub-bands are calculated, and the convolutional features are aggregated to obtain a unique representation of the coupling features of each band.

[0011] Multi-scale feature extraction is performed based on the unique representation of each frequency band coupling feature to capture coupling features with high contribution in different receptive fields and perform feature enhancement processing.

[0012] The initial model of the mental state classification network compresses the coupled features after feature enhancement to reduce the dimensionality of the coupled features and obtain new feature representations. The optimized mental state classification network model is then trained based on the new feature representations through multiple fully connected layers.

[0013] As a further improvement of the present invention, preprocessing of the EEG data includes:

[0014] The EEG data were processed sequentially by baseline removal, bandpass filtering, artifact removal, downsampling, and sliding window segmentation.

[0015] As a further improvement of the present invention, a high-pass filter is used to remove baseline processing and eliminate DC offset in the EEG data.

[0016] The frequency ranges of theta and gamma in the EEG data were extracted by performing bandpass filtering.

[0017] Artifact removal was performed using independent component analysis, which included removing eye movement, muscle activity, and power supply interference data.

[0018] As a further improvement of the present invention, the EEG data is divided into short data segments based on 5 seconds using a sliding window method.

[0019] As a further improvement of the present invention, the high-quality EEG signal is decomposed into a high-frequency band and a low-frequency band, including:

[0020] High-quality EEG signals were decomposed into 4–8 Hz and 30–50 Hz frequency bands using a 0–50 Hz bandpass filter. The 4–8 Hz band was designated as the low-frequency band, and the 30–50 Hz band as the high-frequency band.

[0021] As a further improvement to the present invention, sub-band selection is performed on the high-frequency band data and the low-frequency band data respectively, including:

[0022] Sub-bands were selected in 5Hz increments within the high-frequency band range, resulting in four sub-bands.

[0023] By selecting frequency bands in 1Hz increments for the low-frequency range, four sub-bands are also obtained.

[0024] As a further improvement of the present invention, the phase-amplitude coupling matrix is ​​calculated for the multi-channel decomposition results of each sub-band in the high-frequency and low-frequency ranges; including:

[0025] Each sub-frequency band has 128 channels. The phase-amplitude coupling matrix is ​​calculated from the decomposition results of each channel in the four high-frequency bands and four low-frequency bands, yielding R. 4×4×128×128 The phase-amplitude coupling matrix.

[0026] As a further improvement of the present invention

[0027] For different frequency band combinations in the phase-amplitude coupling matrix, the phase of the dominant frequency and the amplitude of the nested frequency are extracted from the phase-amplitude coupling matrix. The amplitude of the nested frequency is divided into different dominant frequency phase intervals, and the cross-frequency coupling feature matrix under different frequency bands is calculated and generated.

[0028] As a further improvement of the present invention

[0029] By assigning different weights to the cross-frequency coupling characteristics, the coupling relationship between the low-frequency range sub-band and the high-frequency range sub-band can be reflected;

[0030] Perform dimensional transformation on the cross-frequency coupling feature matrix under different frequency bands to convert it to X′∈R (L*H,m,m) Where L and H represent the number of sub-bands selected in the specified low-frequency range and high-frequency range, respectively, and m represents the number of channels of the EEG signal;

[0031] Based on X′∈R (L*H,m,m) An adaptive frequency band attention module is used, and an efficient channel attention mechanism is employed to learn the attention coefficients for each frequency band.

[0032] Global average pooling is used to aggregate convolutional features to obtain a unique representation of each frequency band coupled feature;

[0033] Calculate the frequency band weights and apply them to the original features to generate features after cross-frequency coupling of multiple sub-bands.

[0034] As a further improvement of the present invention, multi-scale feature extraction is performed based on the unique representation of each frequency band coupling feature to capture coupling features with high contribution in different receptive fields and perform feature enhancement processing; including:

[0035] Use sizes of k1,…,k jOne-dimensional convolutions with multiple kernels of different sizes are used to learn key scores of cross-frequency coupled features within receptive fields of different sizes, for input features x = {x1, x2, ... x}. L Then, a one-dimensional convolution with a kernel size of k is used to calculate the interaction between cross-frequency coupled features, and the sigmoid function is used to output the key score of each feature:

[0036] F k (L) = sigmoid(C1D) k (x))

[0037] in,

[0038] x represents the input feature, C1D k F represents a one-dimensional convolution with a kernel size of k. k (L) represents the key score of the Lth coupled feature when the kernel size is k;

[0039] Sort all weights and retain the coupling features with larger weights. When F k When (L) is greater than the preset threshold, the current coupling feature contributes significantly to identifying whether there is a negative psychological state. k When (L) is small, it indicates that the current coupling feature has a low contribution to identifying whether there is a negative psychological state, so the coupling feature is set to zero.

[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0041] This invention improves upon traditional recognition models by simulating human attention allocation across different frequency bands, addressing the issues of low efficiency in multi-frequency band data utilization and inefficient feature extraction. Compared to existing technologies, the adaptive attention mechanism introduced in this invention can adjust the distribution of coupled features across different frequency bands, thereby enhancing the model's adaptability to various subject samples.

[0042] This invention also transforms traditional single-band feature extraction into cross-band coupled feature extraction, further enhancing the representativeness of the features and improving the model's efficiency. Therefore, this method not only achieves efficient and accurate detection of mental states but also provides flexible and adaptable foundational support for detection tasks in different scenarios. Overall, this invention brings new ideas and methods to the research and application of mental state detection, possessing significant scientific and practical value. Attached Figure Description

[0043] Figure 1 This is a flowchart of a psychological state detection method based on cross-frequency coupling and bandgap attention mechanism disclosed in one embodiment of the present invention;

[0044] Figure 2This is a detailed diagram of a self-attention module disclosed in one embodiment of the present invention;

[0045] Figure 3 This is a detailed diagram of a multi-scale convolution module disclosed in one embodiment of the present invention. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] The present invention will now be described in further detail with reference to the accompanying drawings:

[0048] like Figure 1 As shown, the mental state detection method based on cross-frequency coupling and bandgap attention mechanism provided by this invention includes the following steps:

[0049] S1. Preprocess the EEG data to obtain high-quality EEG signals that have undergone rigorous processing and meet the standards.

[0050] in,

[0051] The EEG data were processed sequentially through a series of operations, including baseline removal, bandpass filtering, artifact removal, downsampling, and sliding window segmentation.

[0052] Furthermore,

[0053] A high-pass filter is used to remove baseline processing and eliminate DC offset in the EEG data;

[0054] By performing bandpass filtering, the frequency range of interest can be extracted. Here, the theta and gamma frequency ranges in the EEG data can be extracted, while other frequencies are suppressed.

[0055] Artifact removal was performed using independent component analysis (ICA), which included removing eye movement, muscle activity, and power supply interference data.

[0056] The EEG data was segmented into short data segments with a 5-second interval using a sliding window method.

[0057] Specifically,

[0058] In this invention, downsampling reduces the dimensionality of the data, decreases computational complexity, and maintains information integrity through downsampling.

[0059] S2. Decompose the high-quality EEG signal into high-frequency band and low-frequency band, and perform sub-band selection on the high-frequency band data and low-frequency band data respectively;

[0060] This includes:

[0061] High-quality EEG signals were decomposed into 4–8 Hz and 30–50 Hz frequency bands using a 0–50 Hz bandpass filter. The 4–8 Hz band was designated as the low-frequency band, and the 30–50 Hz band as the high-frequency band.

[0062] Furthermore, sub-band selection is performed separately for the high-frequency band data and the low-frequency band data, including:

[0063] Sub-bands were selected in 5Hz increments within the high-frequency band range, resulting in four sub-bands.

[0064] By selecting frequency bands in 1Hz increments for the low-frequency range, four sub-bands are also obtained.

[0065] S3. Calculate the phase-amplitude coupling matrix for the multi-channel decomposition results of each sub-band in the high-frequency and low-frequency ranges;

[0066] This includes:

[0067] Each sub-frequency band has 128 channels. The phase-amplitude coupling matrix is ​​calculated from the decomposition results of each channel in the four high-frequency bands and four low-frequency bands, yielding R. 4×4×128×128 The phase-amplitude coupling matrix.

[0068] For different frequency band combinations in the phase-amplitude coupling matrix, the phase of the dominant frequency and the amplitude of the nested frequency are extracted from the phase-amplitude coupling matrix. The amplitude of the nested frequency is divided into different dominant frequency phase intervals, and the cross-frequency coupling feature matrix under different frequency bands is calculated and generated.

[0069] Furthermore,

[0070] The nested frequency amplitude data is divided into different dominant frequency phase intervals. Finally, the cross-frequency coupling characteristics, i.e., the PAC matrix, are calculated and combined.

[0071]

[0072] In the formula,

[0073] n represents the total number of time points in the EEG brainwave data;

[0074] a t This represents the EEG amplitude in the high-frequency band at time t;

[0075] This represents the EEG phase in the low-frequency band at time t, where i represents the complex unit.

[0076] S4. Based on the phase-amplitude coupling matrix, calculate the attention weights for each pair of sub-bands and aggregate the convolutional features to obtain a unique representation of the coupling features for each band.

[0077] in,

[0078] Based on the adaptive frequency band attention module, the attention weights for each pair of sub-bands are calculated by comprehensively analyzing the coupling features of multiple intersecting sub-bands. Next, global average pooling is used to effectively aggregate convolutional features, thereby deriving a unique representation of the coupling features for each frequency band. This approach enhances the representativeness of the features and improves the model's performance.

[0079] Furthermore,

[0080] Based on the cross-frequency coupling feature of the four-dimensional matrix X∈R L×H×m×m L and H represent the number of low-frequency and high-frequency signals selected in the specified low-frequency and high-frequency ranges, respectively, and m represents the number of EEG signal channels. The low-frequency and high-frequency coupling relationship is reflected by assigning different weights to the PAC matrix (cross-frequency coupling feature matrix) constructed by selecting sub-frequency bands in the low-frequency and high-frequency ranges.

[0081] An adaptive band attention module is then employed, and an efficient channel attention (ECA) mechanism is introduced to learn the attention coefficients for each band. ECA employs a non-dimensionality-reduction local cross-channel interaction strategy; this module involves only a few parameters but exhibits significant performance gains. First, the PAC feature matrix is ​​transformed to X′∈R. (L*H,m,m) After learning the attention coefficients for different frequency bands using an efficient channel attention mechanism, global average pooling (GAP) is used to aggregate the convolutional features, thereby obtaining a unique representation of the coupled features for each frequency band:

[0082] y = GAP(X′)

[0083] Then, the attention coefficient ω of the frequency band is learned using the ECA mechanism:

[0084] ω=sigmoid(C1D k (y))

[0085] Where C1D represents one-dimensional convolution.

[0086] Then, global average pooling is used to aggregate the convolutional features, resulting in a unique representation for each frequency band coupled feature. Finally, frequency band weights are calculated and applied to the original features to generate features fused from multiple sub-frequency band cross-coupled networks.

[0087]

[0088] This represents the characteristics after fusing multiple sub-band cross-coupled networks.

[0089] S5. Perform multi-scale feature extraction based on the unique representation of each frequency band coupling feature, capture coupling features with high contribution in different receptive fields and perform feature enhancement processing.

[0090] in,

[0091] The design incorporates a convolutional module with multiple kernels of varying sizes to process the coupling features of each frequency band, capturing key features within different neighborhood ranges. This module can capture coupling features with higher contribution within different receptive fields, retain these high-contribution coupling features, and enhance them.

[0092] Furthermore,

[0093] The multi-scale feature extraction module uses a size of k1,…,k j One-dimensional convolutions with multiple kernels of different sizes are used to learn key scores for PAC features within receptive fields of different sizes. For input features x = {x1, x2, ... x...} L Then, a one-dimensional convolution with a kernel size of k is used to calculate the interaction between PAC features, and the key score of each feature is output using the sigmoid function.

[0094] F k (L) = sigmoid(C1D) k (x))

[0095] Where x represents the input feature, C1D k This represents a one-dimensional convolution with a kernel size of k. In this method, kernel sizes of 3, 5, 7, and F are used. k (L) represents the key score of the Lth coupled feature when the kernel size is k. All weights are sorted, and the connection features with larger weights are retained. When F... k When (L) is large, it indicates that the current coupling feature is more important for identifying whether there is a negative psychological state. When F k When (L) is small, it indicates that the current coupling features have a smaller effect on the recognition task. Therefore, these brain functional coupling features are set to zero. The overall retention rule is shown in the following formula:

[0096]

[0097] in,

[0098] This represents the brain functional connectivity features retained after filtering when the scale size is k.

[0099] β is a set threshold, which in this invention is set to retain the top 20% after weight sorting.

[0100] After the filtered PAC features are processed, redundant features are set to zero, resulting in a large amount of redundant information in the features. To reduce the impact of these zero elements on the subsequent classification process, this paper uses an autoencoder to reduce the dimensionality of the input features, as shown in the formula:

[0101]

[0102] in,

[0103] h k (x) represents the key features encoded when the kernel size is k;

[0104] Finally, the module output feature X is obtained by concatenating key features from multiple scales. out :

[0105]

[0106] Example:

[0107] Table 1 compares the classification performance of the classification model of this invention and six commonly used models applied to the resting-state depression dataset MODMA:

[0108]

[0109] Table 1

[0110] As can be seen from Table 1, the method proposed in this invention performs better than the latest methods in classification when applied to the resting-state depression dataset MODMA.

[0111] Table 2 compares the effects of cross-frequency coupling using the method of the present invention for different frequency band combinations:

[0112]

[0113] Table 2

[0114] As can be seen from Table 2, the method proposed in this invention has the best coupling effect between low frequency (7-8 Hz) and high frequency (45-50 Hz).

[0115] S6. The initial model of the mental state classification network compresses the coupled features after feature enhancement to reduce the dimensionality of the coupled features and obtain a new feature representation. The network is then trained based on the new feature representation through multiple fully connected layers to obtain the optimized mental state classification network model.

[0116] in,

[0117] The classification network employs an autoencoder to compress the coupled features with higher contribution within the receptive field captured in step S5, thereby obtaining new feature representations and effectively reducing feature dimensionality. This process reduces data redundancy, improves model computational efficiency, and retains important features of the original data, achieving a dual optimization of feature extraction and model training efficiency.

[0118] Furthermore,

[0119] Key features are extracted using key feature extraction modules at different scales, capturing information at varying scales. These extracted features are then classified using multiple fully connected layers to obtain the final classification result. To train the model, cross-entropy is used as the loss function to measure the difference between the classification result and the true label, thereby optimizing the model's parameters. The loss calculation is shown in the formula:

[0120]

[0121] in,

[0122] y i For the label of sample i, p i This is the probability of predicting the positive class.

[0123] Advantages of this invention:

[0124] This invention introduces a medical cross-coupling mechanism to develop a psychological state identification method with adaptive attention mechanism, cross-frequency coupling, and frequency band attention mechanism. In response to the different mental states of individuals in different scenarios, this invention uses an adaptive attention mechanism to extract comprehensive features from multiple frequency bands to enhance the discriminative coupling features. Compared with the traditional training and learning process, this helps the model obtain more suitable parameters and has higher generalization ability.

[0125] To address the problem of inefficient screening of EEG-related features, this invention introduces a cross-frequency coupling mechanism, extracting cross-frequency coupling features under different frequency band combinations. This allows for more efficient capture of phase synchronization relationships existing in different frequency bands of signals, and more efficient screening of important features in EEG data.

[0126] This invention can effectively extract phase synchronization features of EEG data in different frequency bands through a cross-frequency coupling feature extraction module, then enhance the discriminative coupling features through an adaptive frequency band attention module, and finally capture spatial features in different sensory fields through a multi-scale key feature extraction module.

[0127] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting mental states based on cross-frequency coupling and bandgap attention mechanisms, characterized in that, include: Preprocessing of EEG data yields high-quality EEG signals that meet standards; High-quality EEG signals are decomposed into high-frequency and low-frequency bands, and sub-band selection is performed on the high-frequency and low-frequency band data respectively. For each sub-band of the high-frequency band and the low-frequency band, the phase-amplitude coupling matrix is ​​calculated based on the multi-channel decomposition results. Specifically, for different frequency band combinations in the phase-amplitude coupling matrix, the phase of the main frequency and the amplitude of the nested frequency are extracted from the phase-amplitude coupling matrix. The amplitude of the nested frequency is divided into different main frequency phase intervals, and the cross-frequency coupling feature matrix under different frequency bands is calculated. Based on the phase-amplitude coupling matrix, the attention weights for each pair of sub-bands are calculated, and the convolutional features are aggregated to obtain a unique representation of the coupling features for each band. Different weights are assigned to the cross-frequency coupling features to reflect the coupling relationship between the low-frequency and high-frequency sub-bands. The cross-frequency coupling feature matrices under different bands are then dimensionally transformed to... In the formula, and These represent the number of sub-bands selected in the specified low-frequency range and high-frequency range, respectively. The number of channels representing EEG signals; based on An adaptive frequency band attention module is adopted and an efficient channel attention mechanism is used to learn the attention coefficients of each frequency band; global average pooling is used to aggregate convolutional features to obtain a unique representation of each frequency band coupled feature; frequency band weights are calculated and applied to the original features to generate features after cross-frequency coupling of multiple sub-frequency bands. Multi-scale feature extraction is performed based on the unique representation of each frequency band coupling feature to capture coupling features with high contribution in different receptive fields and perform feature enhancement processing. The initial model of the mental state classification network compresses the coupled features after feature enhancement to reduce the dimensionality of the coupled features and obtain new feature representations. The optimized mental state classification network model is then trained based on the new feature representations through multiple fully connected layers.

2. The mental state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 1, characterized in that: Preprocessing of EEG data includes: The EEG data were processed sequentially by removing baseline, bandpass filtering, removing artifacts, downsampling, and dividing the data into segments using a sliding window.

3. The psychological state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 2, characterized in that: A high-pass filter is used to remove baseline processing and eliminate DC offset in the EEG data; The frequency ranges of theta and gamma in the EEG data were extracted by performing bandpass filtering. Artifact removal is performed using independent component analysis, which includes removing eye movement, muscle activity, and power supply interference data.

4. The psychological state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 2, characterized in that: The EEG data was segmented into short data segments with a 5-second interval using a sliding window method.

5. The mental state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 1, characterized in that: High-quality EEG signals are decomposed into high-frequency and low-frequency bands, including: High-quality EEG signals were decomposed into 4-8 Hz and 30-50 Hz frequency bands using a 0-50 Hz bandpass filter. The 4-8 Hz band was designated as the low-frequency band, and the 30-50 Hz band as the high-frequency band.

6. The mental state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 5, characterized in that: Sub-band selection is performed separately for high-frequency and low-frequency band data, including: Sub-bands were selected in 5Hz increments within the high-frequency band range, resulting in four sub-bands. By selecting frequency bands in 1Hz increments for the low-frequency range, four sub-bands are also obtained.

7. The mental state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 6, characterized in that: Calculate the phase-amplitude coupling matrix for each sub-band in both the high-frequency and low-frequency ranges based on the multi-channel decomposition results; including: Each sub-frequency band has 128 channels. The phase-amplitude coupling matrix is ​​calculated from the decomposition results of each channel in the four high-frequency bands and four low-frequency bands. The phase-amplitude coupling matrix.

8. The mental state detection method based on cross-frequency coupling and bandgap attention mechanism according to claim 1, characterized in that: Multi-scale feature extraction is performed based on the unique representation of each frequency band coupling feature to capture coupling features with high contribution in different receptive fields and then perform feature enhancement processing; including: Use size is One-dimensional convolutions with multiple kernels of different sizes are used to learn key scores of cross-frequency coupled features within receptive fields of different sizes, for input features. Then use a convolution kernel size of One-dimensional convolution calculates the interaction between cross-frequency coupled features, and uses The function outputs a key score for each feature: ; in, Indicates input features, Indicates the kernel size as One-dimensional convolution, Indicates the kernel size as Time Key scores for each coupling feature; Sort all weights, when When the value is greater than or equal to a preset threshold, the current coupling feature contributes significantly to identifying whether there is a negative psychological state, and this coupling feature is retained. If the value is less than the preset threshold, the current coupling feature has a low contribution to identifying whether there is a negative psychological state, so the coupling feature is set to zero and is not retained.