4D-CNN-Transformer fear emotion intensity evaluation method and system based on electroencephalogram signals

By using a 4D-CNN-Transformer model, combined with multi-scale convolution and residual attention mechanisms, and utilizing EEG signal features to assess the intensity of fear, the low annotation accuracy and noise problems in existing technologies are solved, achieving real-time and accurate fear assessment.

CN121533734APending Publication Date: 2026-02-17ZHEJIANG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511743720.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2026-02-17

AI Technical Summary

Technical Problem

Existing EEG emotion data annotation accuracy is low, and real-time annotation methods introduce noise, making it difficult to effectively combine with Transformer models to achieve real-time and accurate assessment of fear.

Method used

The 4D-CNN-Transformer model is adopted, which combines multi-scale convolution module, electrode coding module and time coding module. It utilizes the power spectral density, peak frequency, spectral centroid and differential entropy features of EEG signal, combined with residual attention mechanism, to achieve real-time assessment of fear intensity.

Benefits of technology

It achieves accurate, real-time quantitative assessment of the intensity of fear, reduces experiential interference, improves the model's recognition ability and accuracy, and reduces computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121533734A_ABST
    Figure CN121533734A_ABST
Patent Text Reader

Abstract

The invention discloses a 4D-CNN-Transform electroencephalogram emotion recognition method based on electroencephalogram signals. The method comprises the following steps: (1) collecting fear state electroencephalogram data under VR (Virtual Reality); (2) preprocessing electroencephalogram data; (3) preprocessing label data; (4) 4D electroencephalogram feature extraction; (5), a 4D-CNN-Transform network is constructed, and the 4D-CNN-Transform network is constructed; (6) carrying out 4D-CNN-Transform model training, and carrying out 4D-CNN-Transform model training; and (7) evaluating the fear emotion intensity. The invention further provides a 4D-CNN-Transformer fear emotion intensity evaluation system based on the electroencephalogram signals. The system sequentially comprises the following modules: (1) a VR fear emotion electroencephalogram data and label acquisition module; (2) a data preprocessing module; (3) a 4D feature extraction module; (4), a 4D-CNN-Transform model training module is used; and (5) a fear emotion intensity evaluation module. And the accuracy of electroencephalogram fear emotion intensity evaluation is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of brain-computer interaction, affective computing, and specifically relates to a 4D-CNN-Transformer fear emotion intensity evaluation method and system based on electroencephalogram signals. BACKGROUND

[0002] Modern neuroscience research shows that emotion regulation has significant correlation with the central nervous system. Emotion, as a core component of human psychological activity, involves complex neural conduction processes, and electroencephalogram can reflect the cognitive state and emotional response of the brain in real time by capturing changes in brain electrical activity. Emotion recognition technology based on electroencephalogram has become an important research direction in the field of affective computing due to its non-invasive advantage. Emotion recognition technology is gradually developing into an effective means for real-time and accurate assessment of emotional state. In the field of fear emotion evaluation, electroencephalogram provides unprecedented real-time and accuracy.

[0003] In existing electroencephalogram emotion data sets, the electroencephalogram data during the same emotion induction trial period is often labeled as the same emotion category, resulting in low accuracy of electroencephalogram data label annotation, affecting model training. The method of real-time labeling using a joystick introduces high electroencephalogram noise, and a method that can real-time label and reduce distraction and electroencephalogram noise is needed.

[0004] With the introduction of machine learning methods, classification algorithms have been greatly improved. Traditional emotion classification methods mostly use machine learning algorithms based on statistics and signal processing, such as support vector machines, K-nearest neighbors, etc. With the development of big data and deep learning technology, emotion recognition methods based on deep learning models such as convolutional neural networks and recurrent neural networks have gradually become a hot spot. Deep learning models can automatically extract complex rules from electroencephalogram features, reducing human intervention and improving the accuracy and robustness of emotion recognition. However, how to more effectively combine the Transformer model with other network architectures to achieve complementary advantages still faces challenges. SUMMARY

[0005] The present application overcomes the above-mentioned shortcomings of the prior art and provides a 4D-CNN-Transformer fear emotion intensity evaluation method based on electroencephalogram signals.

[0006] The fear emotion intensity evaluation process used by the present application is shown as follows. First, the user watches a VR fear inducing video to induce a fear emotion, and wears an electroencephalogram cap to record electroencephalogram signals during watching to obtain electroencephalogram data, and holds a VR handle to use a trigger to label the fear intensity felt to obtain label data. The electroencephalogram data is preprocessed by wave trap filtering, band pass filtering and average re-reference, and is down-sampled to 200 Hz. The label data is re-sampled to 200 Hz and aligned with the electroencephalogram data. The preprocessed electroencephalogram signal is feature extracted, segmented, position mapped and feature calculated to obtain a training set. A model is built through a multi-scale convolution module, an electrode coding module, a time coding module and an output module, and the model is trained based on the electroencephalogram data and the label data to obtain a 4D-CNN-Transformer fear emotion intensity evaluation model. The fear intensity evaluation is realized based on the model.

[0007] The present application provides a 4D-CNN-Transformer fear emotion intensity evaluation method based on electroencephalogram signals, mainly comprising the following steps: (1) Collecting electroencephalogram data in a fear state under VR; The user watches a VR panoramic video segment that can induce a fear of heights emotion, and records the corresponding label data using a VR trigger according to the user's fear intensity. According to the international standard 10-20 system electrode position, 21 channels of electroencephalogram data related to fear emotion are collected.

[0008] (2) Electroencephalogram data preprocessing; The collected electroencephalogram signal is preprocessed, a 49-51 Hz wave trap filter is used to eliminate power frequency interference, a 0.5-99 Hz band pass filter is used to extract electroencephalogram signals of a specific wave band, the collected emotional electroencephalogram data is down-sampled to 200 Hz, and average re-reference is performed.

[0009] (3) Label data preprocessing; The collected label data is preprocessed, the label data is re-sampled to 200 Hz, missing data is supplemented by a forward filling method, and is time-aligned with the electroencephalogram data.

[0010] (4) 4D electroencephalogram feature extraction; The preprocessed electroencephalogram signal is divided into a training set and a test set according to a set proportion, and then feature extraction is performed. The 3-second electroencephalogram signal is segmented into 6 time slices using a 0.5-second non-overlapping sliding window, the electroencephalogram data of different electrodes is mapped to a 5x5 matrix according to the electrode position, and the 5 frequency bands are decomposed according to the Fourier transform. The power spectral density, peak frequency, spectral centroid and differential entropy features of each frame are extracted in each channel of the five frequency bands, and the electroencephalogram 4D features are input into the 4D-CNN-Transformer model.

[0011] (5) 4D-CNN-Transformer network building; The structure of the 4D-CNN-Transformer network is that, starting from an input layer, a multi-scale convolution module, an electrode encoding module, a time encoding module and an output module are sequentially connected; The multi-scale convolution module is used for deep spatial feature extraction of the extracted frequency domain features and simultaneously processing information of multiple time periods; the electrode encoding module is used for further improving the model's ability to capture long-range correlations between electrode features; the time encoding module is used for further extracting high-level features and global time information through time sequence relationship; and the output module is used for mapping input data to a hidden layer and outputting continuous prediction values of the fear emotion intensity. (6) 4D-CNN-Transformer model training; The training set is input into the 4D-CNN-Transformer network for training, and a finally trained 4D-CNN-Transformer network is obtained.

[0012] (7) Fear emotion intensity evaluation; The test set is input into the finally obtained 4D-CNN-Transformer network, and fear emotion intensity evaluation is completed.

[0013] The application further provides a 4D-CNN-Transformer fear emotion intensity evaluation system based on electroencephalogram signals, which sequentially comprises the following modules: (1) A VR fear emotion electroencephalogram data and label collection module, which is used for acquiring and saving emotion electroencephalogram data; (2) A data preprocessing module, which is used for preprocessing the collected data for subsequent feature extraction and fusion; (3) A 4D feature extraction module, which is used for 4D feature extraction of the preprocessed data for subsequent model input; (4) A 4D-CNN-Transformer model training module, which builds a model through a multi-scale convolution module, an electrode encoding module, a time encoding module and an output module, trains and saves the model using the extracted features, and is used for subsequent emotion recognition; (5) A fear emotion intensity evaluation module, which is used for fear emotion intensity recognition and result display.

[0014] The application further provides a computer readable storage medium, which stores a program, and the program is executed by a processor to implement the 4D-CNN-Transformer fear emotion intensity evaluation method based on electroencephalogram signals.

[0015] The present invention also provides a computing device, including a memory and a processor, wherein the memory stores executable code, and the processor executes the executable code to implement the method of the present invention.

[0016] The working principle of this invention is: This invention collects EEG signals from subjects in a VR environment, uses sliding window technology to segment continuous signals into sample segments, and maps them to a two-dimensional electrode space matrix based on an international standard lead system. Next, the signals are subjected to multi-band filtering to extract four complementary features: power spectral density (PSD), differential entropy (DE), peak frequency (PF), and spectral centroid (SC) to construct a multi-dimensional spatiotemporal frequency input tensor. The data then enters a 4D-CNN-Transformer model. First, grouped convolutions are used to process each feature independently to avoid interference, and multi-scale convolutions are combined to capture spatial patterns in parallel across different ranges. Then, implicit positional encoding and a Transformer encoder incorporating residual attention are used to sequentially extract global spatial features and temporal dynamic features. Finally, after mapping through fully connected layers and processing with a sigmoid activation function, a continuous value between 0 and 1 is output in real time, thereby achieving accurate and real-time quantitative assessment of the intensity of an individual's fear.

[0017] The innovation of this invention is: (1) Introduction of a novel combination of frequency domain features (PF & SC): Unlike the traditional method that only uses power spectral density (PSD) and differential entropy (DE), this invention introduces peak frequency (PF) and spectral centroid (SC). These two features provide more refined frequency domain analysis. PF reflects the location of dominant energy accumulation, and SC reveals the overall energy distribution within the frequency band, effectively enhancing the model's ability to capture neural oscillatory activity.

[0018] (2) Network structure combining grouping and multi-scale convolution: In the design of convolutional layers, grouping convolution and multi-scale convolution are innovatively adopted. Grouping convolution ensures that features with different physical meanings (such as power features and frequency features) are processed independently in shallow networks, avoiding interference. Multi-scale convolution captures local details and global spatial patterns simultaneously through convolutional kernels of different sizes, solving the problem of limited receptive field of a single convolutional kernel.

[0019] (3) Residual Attention (RA): The self-attention mechanism in the Transformer encoder is improved by adding residual connections. The attention score is passed between layers, which not only solves the gradient vanishing problem in deep networks, but also prompts the model to generate a sparser and more correlated attention distribution, enabling the model to focus more accurately on key brain regions related to fear (such as the frontal lobe and temporal lobe).

[0020] (4) Implicit position encoding strategy: By utilizing the zero-padding characteristic in the two-dimensional matrix mapping and convolution process, the model can naturally learn the absolute spatial position of the electrodes, thereby removing the complex explicit position encoding layer in the traditional Transformer. This reduces the number of model parameters and avoids the spatial information distortion caused by forcibly mapping three-dimensional EEG electrodes into a one-dimensional sequence.

[0021] The advantages of this invention are: users can annotate the fear intensity of EEG data by triggering a trigger, and the fear intensity is mapped to the trigger depth through the natural fear reflex, thereby reducing experiential interference and achieving real-time continuous annotation. Furthermore, it introduces location mapping and features such as EEG power spectral density, peak frequency, spectral centroid, and differential entropy, increasing the dimensionality of the input data and the upper limit of the model's recognition ability. The 4D-CNN-Transformer model achieves information extraction in the time, frequency, and spatial domains through serial encoding using multi-scale convolution modules, electrode encoding modules, and temporal encoding modules. The multi-scale convolution module employs grouped convolution and multi-scale convolution design, and the Transformer layer uses residual attention, thereby enhancing the model's local feature extraction ability while reducing model complexity and computation time. Attached Figure Description

[0022] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart illustrating the method of the present invention.

[0024] Figure 2 This is a schematic diagram of the 4D feature organization of the present invention.

[0025] Figure 3 This is a schematic diagram of the model framework of the present invention.

[0026] Figure 4 This is a flowchart of the system of the present invention. Detailed Implementation

[0027] The following will describe in detail, with reference to the accompanying drawings and embodiments, a 4D-CNN-Transformer method and system for assessing fear intensity based on electroencephalogram (EEG) signals, according to the present invention. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention and should not be construed as limiting the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0028] Example 1

[0029] See Figure 1 This invention provides a 4D-CNN-Transformer method for assessing fear intensity based on electroencephalogram (EEG) signals, and the specific steps of which are described below: (1) Collecting EEG data and tags; VR devices were used as the induction source, and VR controllers and EEG caps were used as data acquisition devices. The trigger depth of the VR controllers varied within the range of [0,1], with a depth of 0 when not pressed and a depth of 1 when fully pressed. Considering that participants might forget the current trigger depth during the experiment, the controllers vibrated to remind participants when the depth reached 0.25 or 0.75. Emotional intensity labels were recorded in real time in the VR program, and EEG data were acquired in the EEG program. The sampling rate of the emotional intensity labels was consistent with the refresh rate of the Unity program, while the EEG data was acquired at a sampling rate of 1000Hz. During EEG acquisition, AFz electrodes were used as ground electrodes, and CPz electrodes were used as reference electrodes. A total of 21 EEG electrodes were collected, including Fp1, Fpz, Fp2, F7, F3, Fz, F4, F8, T7, C3, Cz, C4, T8, P7, P3, Pz, P4, P8, O1, Oz, and O2. The impedance of all electrodes to the scalp was controlled below 5 kΩ. Data from each video was stored separately in different files. The baseline start time and the video start time were automatically synchronized in the Unity program and tagged in the emotion intensity tag file and the EEG data file to ensure the accuracy and consistency of the data recording. Users were given a fear response by watching 8 VR videos. The induction sources were divided into 4 types of scenarios: natural environment (high altitude, deep sea, etc.), animal type (worms, snakes, etc.), and situational type (enclosed space, dark environment, etc.). Each scenario had 2 different videos, and each movie clip lasted 180 seconds.

[0030] (2) Data preprocessing; The acquired EEG signals were preprocessed by using a 49-51Hz notch filter to eliminate power frequency interference, and by using a 0.5-99Hz bandpass filter to extract EEG signals in specific bands. The acquired emotional EEG data were downsampled to 200 Hz and then averaged and rereferenced.

[0031] (3) Label preprocessing; The collected labeled data were preprocessed by resampling the labeled data to 200Hz, and missing data were filled in using forward imputation and time-aligned with the EEG data.

[0032] (4) 4D EEG feature extraction; The preprocessed EEG signals are divided into training and testing sets according to a predetermined ratio, and then feature extraction is performed. For example... Figure 2 As shown, a 3-second EEG signal is divided into 6 time slices using a 0.5-second non-overlapping sliding window. EEG data from different electrodes are mapped to a 5×5 matrix based on electrode location. The matrix is ​​then decomposed into 5 frequency bands using Fourier transform: δ (delta, 0.5–4 Hz), θ (theta, 4–8 Hz), α (alpha, 8–13 Hz), β (beta, 13–30 Hz), and γ (gamma, 30–42 Hz). Power spectral density, peak frequency, spectral centroid, and differential entropy features are extracted from each frame across all five frequency bands in each channel, forming 4D EEG features that are input into the 4D-CNN-Transformer model. The periodogram estimator for the power spectral density feature is calculated using the following formula: (1) in, The window length represents the discrete Fourier transform. Represents the spectral coefficients. Sampling rate. Each frequency band. The formula for calculating the average power spectral density is: (2) in, Indication and frequency band The corresponding discrete Fourier transform frequency point index set is obtained. As a characteristic of power spectral density.

[0033] The formula for calculating the peak frequency characteristic is as follows: (3) The formula for calculating the spectral centroid feature is as follows: (4) For differential entropy features, for lengths of... sub-band signal The formula for calculating its differential entropy characteristic is: (5) The final constructed input tensor A multidimensional spatiotemporal-frequency joint representation comprising four types of features, among which These represent 6 time slices, x-axis position of the position matrix, y-axis position of the position matrix, 5 frequency bands, and 4 types of EEG features.

[0034] (5) Construction of 4D-CNN-Transformer network; The structure of the 4D-CNN-Transformer network is as follows: starting from the input layer, it is sequentially connected to a multi-scale convolutional module, an electrode coding module, a temporal coding module, and an output module. The model is built using a multi-scale convolution module, an electrode encoding module, a temporal encoding module, and an output module, such as... Figure 3 As shown.

[0035] The multi-scale convolution module processes data as follows: First, data normalization is performed on the data from each time segment. Then, group convolution is performed on the four extracted feature types (PSD, PF, SC, DE), with each feature undergoing convolution independently. After group convolution, each feature occupies 256 channels. Each feature type is convolved using three different kernel sizes. convolution kernel, convolution kernel and Convolution kernel, where The convolution kernel has 16 kernels. The convolution kernel has 64 kernels. The convolution kernels consist of 176 kernels, all with a stride of 1 and zero-padding to maintain spatial dimensionality. After convolution, the feature maps of each spatial location are concatenated along the channel dimension to form a 256-dimensional local feature vector for each electrode in each frequency band. Subsequently, the feature vectors from the four EEG features are concatenated and integrated to generate a 1024-dimensional unified representation vector for each electrode. The final output tensor... .

[0036] The electrode encoding module processes the data as follows: First, the electrode feature matrix of each time segment is rearranged into an electrode feature sequence of length 25. Next, an additional trainable CLS token is added before the electrode feature sequence. The initial value of this CLS token is continuously optimized during training and reaches its optimal parameter after training. After adding the CLS token, the data enters a 4-layer Transformer encoder for encoding. The attention calculation formula for the Transformer encoder is: (6) The processing steps of the time encoding module are as follows: The spatial encoding module... The parallel output vectors for each time period are sorted and merged to obtain the time feature sequence. The data is then input into the time encoding module. The time encoding module consists of a time position encoding module and an encoder module. Time position encoding embeds temporal sequence information, enabling the model to understand relative positional information within the time series and further extract high-level features through temporal relationships. Time position encoding uses sine and cosine functions to generate the position encoding matrix. .

[0037] Wherein, sequence position .

[0038] The encoder module contains two Transformer encoder layers. Finally, the output vector corresponding to the CLS token is extracted as the module output, with a vector length of 1024.

[0039] Finally, the output vector of the temporal encoding module is processed by a fully connected layer, and the classification probabilities of the four categories are output. The category with the highest probability is taken as the classification result.

[0040] The processing steps of the output module are as follows: a 3-layer fully connected neural network structure is adopted. There are 4096 neurons between the input layer and the hidden layer, and only 1 neuron in the output layer. After the output layer, the Sigmoid function is introduced as the activation function. The output of the Sigmoid function represents the intensity of emotion. The closer the value is to 1, the higher the intensity, and the closer it is to 0, the lower the intensity.

[0041] (6) Training of 4D-CNN-Transformer model; The training set is input into the 4D-CNN-Transformer network for training, resulting in the final trained 4D-CNN-Transformer network.

[0042] (7) Assessment of the intensity of fear; The test set is fed into the final 4D-CNN-Transformer network to complete the fear emphasis assessment.

[0043] Example 2

[0044] like Figure 4 As shown, this embodiment provides a system for implementing the 4D-CNN-Transformer fear intensity assessment method based on electroencephalogram (EEG) signals of Embodiment 1. For ease of explanation, only the parts relevant to the embodiments of the present invention are shown. The functional modules / units in this system can be hardware modules / units or software modules / units, and mainly include:

[0045] (1) VR fear emotion EEG data and tag acquisition module, used to acquire and save emotion EEG data; (2) Data preprocessing module, which preprocesses EEG data and tag data to make them conform to the specifications; (3) Feature extraction module: 4D features are extracted from the preprocessed data for subsequent model input; (4) 4D-CNN-Transformer model training module: The model is built by multi-scale convolution module, electrode coding module, time coding module and output module, and the model is trained based on EEG data and label data to obtain 4D-CNN-Transformer fear intensity assessment model for subsequent emotion recognition. (5) Fear intensity assessment module, used for the identification and display of fear intensity on EEG.

[0046] Example 3

[0047] A computer-readable storage medium is characterized in that it stores a program thereon, which, when executed by a processor, implements the 4D-CNN-Transformer fear intensity assessment method based on electroencephalogram (EEG) signals described in Example 1.

[0048] Example 4

[0049] A computing device includes a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method described in Embodiment 1.

[0050] In the embodiments of this invention, the modules can be integrated into one unit, deployed separately, or further divided into multiple sub-modules. The modules can be distributed within the system of the embodiments as described, or they can be modified to reside in one or more systems different from those of the embodiments of this invention.

[0051] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, embodiments of the present invention are not limited to any particular combination of hardware and software.

[0052] The above-disclosed embodiments are merely specific examples of the present invention, but the present invention is not limited thereto. Those skilled in the art can make various modifications and variations to the present invention without departing from its spirit and scope. Obviously, all such modifications and variations should fall within the protection scope claimed by the present invention.

Claims

1. A 4D-CNN-Transformer method for assessing the intensity of fear based on electroencephalogram (EEG) signals, characterized in that... Includes the following steps: (1) Collecting EEG data on fear state under VR: The user watches VR panoramic video clips that can induce fear of heights. The corresponding tag data is recorded using VR triggers according to the user's fear intensity. According to the international standard 10-20 system electrode positions, 21 channels of EEG data related to fear are collected. (2) EEG data preprocessing: The collected EEG signals were preprocessed. A 49-51Hz notch filter was used to eliminate power frequency interference. A bandpass filter of 0.5-99Hz was used to extract EEG signals of specific bands. The collected emotional EEG data was downsampled to 200 Hz and averaged for rereference. (3) Label data preprocessing: The collected label data is preprocessed, the label data is resampled to 200Hz, the missing data is filled in by forward imputation, and the data is aligned with the EEG data time. (4) 4D EEG feature extraction: The preprocessed EEG signals are divided into training set and test set according to the set ratio and then feature extraction is performed; The 3-second EEG signal was divided into 6 time slices using a 0.5-second non-overlapping sliding window. The EEG data of different electrodes were mapped into a 5×5 matrix according to the electrode position. The matrix was decomposed into 5 frequency bands according to the Fourier transform. The power spectral density, peak frequency, spectral centroid and differential entropy features of each frame were extracted from all five frequency bands of each channel to form 4D EEG features, which were then input into the 4D-CNN-Transformer model. (5) 4D-CNN-Transformer network construction: 4DCT network is constructed. The structure of the 4DCT network is as follows: starting from the input layer, the multi-scale convolution module, the electrode coding module, the time coding module and the output module are connected in sequence. The multi-scale convolution module is used to perform in-depth spatial feature extraction on the extracted frequency domain features and process information from multiple time periods simultaneously; the electrode encoding module is used to further improve the model's ability to capture the long-range correlation between features between electrodes; the temporal encoding module is used to further extract high-level features and global temporal information through temporal relationships; and the output module is used to map the input data to the hidden layer and output continuous predicted values ​​of fear intensity. (6) Training the 4D-CNN-Transformer model: Input the training set into the 4D-CNN-Transformer network for training to obtain the final trained 4D-CNN-Transformer network; (7) Fear intensity assessment: Input the test set into the final 4D-CNN-Transformer network to complete the fear intensity assessment.

2. The method for assessing fear intensity based on EEG signals using 4D-CNN-Transformer as described in claim 1, characterized in that, The 4D-CNN-Transformer network further includes: a multi-scale convolution module that normalizes each time segment during the input phase; a multi-scale convolution module that performs grouped convolutions on four features (PSD, PF, SC, and DE) and uses different sized convolution kernels for each feature; an electrode encoding module that includes a CLS token insertion operation and a four-layer Transformer encoder with an improved residual attention structure; a temporal encoding module that includes a CLS token insertion operation and a one-layer Transformer encoder; and an output module consisting of a three-layer fully connected neural network, with 4096 neurons between the input and hidden layers. The hidden layers of the output module use the ReLU activation function, and the output layer uses the Sigmoid activation function.

3. The method for assessing the intensity of fear based on electroencephalogram (EEG) signals using 4D-CNN-Transformer as described in claim 1, characterized in that... The trigger marking method in step (1) is as follows: the user holds the VR controller and places his / her finger on the linear trigger. When the user feels fear, he / she presses the trigger. The higher the intensity of the user's fear, the deeper the trigger needs to be pressed.

4. The method for assessing the intensity of fear based on electroencephalogram (EEG) signals using 4D-CNN-Transformer as described in claim 1, characterized in that, The features in step (4) include, The power spectral density characteristics, and the formula for calculating its periodogram estimator are as follows: (1) in, The window length represents the discrete Fourier transform. Represents the spectral coefficients. Sampling rate; each frequency band The formula for calculating the average power spectral density is: (2) in, Indication and frequency band The corresponding discrete Fourier transform frequency point index set is obtained. As a characteristic of power spectral density; The peak frequency characteristic is calculated using the following formula: (3) The centroid feature of the spectrum is calculated using the following formula: (4) Differential entropy features, for lengths of sub-band signal The formula for calculating its differential entropy characteristic is: (5) The final constructed input tensor A multidimensional spatiotemporal-frequency joint representation comprising four types of features, among which These represent 6 time slices, x-axis position of the position matrix, y-axis position of the position matrix, 5 frequency bands, and 4 types of EEG features.

5. The method for assessing the intensity of fear based on electroencephalogram (EEG) signals using 4D-CNN-Transformer as described in claim 1, characterized in that, The multi-scale convolution module described in step (5) includes: data normalization, which normalizes the data for each time segment; group convolution, which performs group convolution on the four different feature types (PSD, PF, SC, DE) respectively, with each feature performing convolution independently, and each feature occupying 256 channels after group convolution; and multi-scale convolution, where each feature type is convolved using three different sized convolution kernels. convolution kernel, convolution kernel and Convolution kernel, where The convolution kernel has 16 elements. The convolution kernel has 64 elements. The convolution kernels consist of 176 kernels, all with a stride of 1 and zero-padding to maintain spatial dimensionality. After convolution, the feature maps of each spatial location are concatenated along the channel dimension to form a 256-dimensional local feature vector for each electrode in each frequency band. Subsequently, the feature vectors of the four EEG features are concatenated and integrated to generate a 1024-dimensional unified representation vector for each electrode. The final output tensor is... .

6. The method for assessing the intensity of fear based on electroencephalogram (EEG) signals using 4D-CNN-Transformer as described in claim 1, characterized in that, The electrode encoding module in step (5) includes: first, converting the electrode feature matrix of each time segment into an electrode feature sequence of length 25 through a rearrangement operation; then, adding an additional trainable CLS token before the electrode feature sequence; the initial value of the CLS token is continuously optimized during training and reaches the optimal parameter after training; after adding the CLS token, the data enters a 4-layer Transformer encoder for encoding; the attention calculation formula of the Transformer encoder is: (6)。 7. The method for assessing the intensity of fear based on electroencephalogram (EEG) signals using 4D-CNN-Transformer as described in claim 1, characterized in that, The output module described in step (5) adopts a 3-layer fully connected neural network structure. There are 4096 neurons between the input layer and the hidden layer, and only 1 neuron in the output layer. The Sigmoid function is introduced after the output layer as the activation function. The output of the Sigmoid function represents the intensity of emotion. The closer the value is to 1, the higher the intensity, and the closer it is to 0, the lower the intensity.

8. A system for assessing the intensity of fear based on electroencephalogram (EEG) signals using a 4D-CNN-Transformer method, characterized in that... include: VR fear emotion EEG data and tag acquisition module, used to acquire and save emotion EEG data; The data preprocessing module preprocesses the EEG data and labeled data to make them conform to the specifications; The 4D feature extraction module extracts 4D features from the preprocessed data for use as input to the subsequent model. The 4D-CNN-Transformer model training module builds the model through a multi-scale convolution module, an electrode coding module, a temporal coding module, and an output module. The model is trained based on EEG data and labeled data to obtain a 4D-CNN-Transformer fear intensity assessment model for subsequent emotion recognition. The fear intensity assessment module is used to identify and display the intensity of fear on EEG.

9. A computer-readable storage medium, characterized in that, It stores a program that, when executed by a processor, implements the 4D-CNN-Transformer fear intensity assessment method based on EEG signals as described in any one of claims 1-6.

10. A computing device comprising a memory and a processor, wherein, The memory stores executable code, and when the processor executes the executable code, it implements the method of any one of claims 1-6.