EEG signal analysis method and device based on multi-scale EEG feature fusion

Through the multi-scale EEG feature fusion method, combined with brain area division and local correlation analysis, the existing technology solves the problems of insufficient brain area information fusion and insufficient capture of dynamic changes, and achieves more accurate and comprehensive EEG signal analysis. .

CN118551340BActive Publication Date: 2024-10-15XIAOZHOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411025981.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-10-15
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

Existing EEG signal analysis methods are difficult to fully integrate brain region information, resulting in insufficient feature extraction and insufficient combination of local and global features, making it difficult to capture complex dynamic changes in brain activity.

Method used

Using a multi-scale based EEG feature fusion method, by dividing multiple brain areas, constructing EEG feature sequences in key areas, combining local correlation analysis and dynamic time windows, optimizing the weight parameters of calculation sub-units, and fusing different times and spaces Characteristics of scale.

Benefits of technology

It improves the accuracy and comprehensiveness of EEG signal analysis, enhances sensitivity to key brain areas, enables continuous tracking and conversion detection of EEG states, and provides a more comprehensive information basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551340B_ABST
    Figure CN118551340B_ABST
Patent Text Reader

Abstract

The present application discloses an EEG signal analysis method and device based on multi-scale EEG feature fusion, which divides the EEG target signal after processing the original EEG signal into multiple areas including the EEG target signal corresponding to each brain area according to the knowledge of brain area distribution of the human brain; divides the calculation unit corresponding to the pre-trained psychological state evaluation model into multiple calculation sub-units; determines the key brain area among the multiple brain areas, and constructs a first EEG feature sequence through the calculation sub-units corresponding to the key area corresponding to the key brain area; obtains the edge local features corresponding to the key brain area based on the local correlation analysis method to optimize the weight parameters of the calculation sub-units corresponding to the key brain area; adjusts the sliding window time length and position of the calculation sub-unit to construct a second EEG feature sequence; respectively inputs the first EEG feature sequence and the second EEG feature sequence into the psychological state evaluation model to obtain the first EEG state and the second EEG state, and completes the analysis of the original EEG signal.
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 interface technology, and in particular to an electroencephalogram (EEG) signal analysis method and device based on multi-scale EEG feature fusion. Background Art

[0002] EEG signal analysis has important application value in the clinical diagnosis and scientific research of mental illness. Mainstream EEG-based analysis methods usually use power spectrum analysis and other means to analyze EEG features from the frequency domain, or obtain time domain features through cross-correlation, wavelet transform, etc., in an attempt to extract EEG indicators that reflect the overall brain activity state. However, this overall feature extraction method is difficult to take into account the structural and functional heterogeneity of the human brain. Different brain regions have different effects on specific brain activity states, and simple overall features often fail to highlight the role of key brain regions.

[0003] In order to obtain more targeted feature expressions, existing technologies have begun to try to combine brain region location information to guide feature extraction. For example, the region of interest is predefined and feature channels are only selected from specific brain regions. However, such methods rely on subjective assumptions and may not accurately locate the truly relevant brain regions. Other researchers have tried to learn dynamic brain region weights for different states through neural network attention models, but the learning process is complicated and it is difficult to explain the exact meaning of the weights. Overall, the work of integrating brain region information to guide EEG feature extraction in existing technologies is not sufficient.

[0004] In addition, most methods only extract the overall features of EEG signals, but as a high-dimensional complex dynamic system, the local features of EEG also contain effective information. Some scholars use local correlation, wavelet local energy, etc. to analyze the local features of EEG, but local and overall features are rarely combined, resulting in incomplete information. It should also be noted that the state of brain activity has the characteristics of continuous dynamic evolution, and static features are difficult to evaluate the changes in the time axis of EEG signals, so the dynamic feature extraction of multiple time windows is also key. Summary of the invention

[0005] The embodiment of the present application provides an EEG signal analysis method and device based on multi-scale EEG feature fusion, which can solve the problem that most current methods only extract the overall features of EEG signals, but EEG is a high-dimensional complex dynamic system, and its local features also contain effective information. At the same time, some scholars use local correlation, wavelet local energy, etc. to analyze EEG local features, but local and overall features are rarely combined, resulting in incomplete information.

[0006] In a first aspect, an embodiment of the present application provides an EEG signal analysis method based on multi-scale EEG feature fusion, the method comprising:

[0007] Obtaining the original EEG signal to be analyzed, preprocessing the original EEG signal data, and obtaining the EEG target signal;

[0008] According to the knowledge of brain region distribution of human brain, the EEG target signal is divided into multiple regions, each region corresponds to a brain region, and each region at least contains the EEG target signal corresponding to the brain region;

[0009] Divide the computing unit corresponding to the pre-trained mental state assessment model to obtain multiple computing sub-units, each computing sub-unit corresponding to a region;

[0010] Determine a key brain region from multiple brain regions, the region corresponding to the key brain region is the key region, and construct a first EEG feature sequence of the key region through a computing subunit corresponding to the key region;

[0011] In multiple regions, local edge features corresponding to key brain regions are obtained based on local correlation analysis, and weight parameters of computing subunits corresponding to key brain regions are optimized according to the local edge features;

[0012] Adjusting the sliding window time length and position of the calculation subunit corresponding to the key brain area, and constructing a second EEG feature sequence of the key brain area through the calculation subunit corresponding to the key brain area;

[0013] The first EEG feature sequence and the second EEG feature sequence are respectively input into the psychological state assessment model to obtain a first EEG state corresponding to the first EEG feature sequence and a second EEG state corresponding to the second EEG feature sequence, and the original EEG signal is analyzed according to the first EEG state and the second EEG state.

[0014] In a second aspect, the present application also provides an electroencephalogram signal analysis device, comprising:

[0015] A signal acquisition unit, used to acquire the original EEG signal to be analyzed, pre-process the original EEG signal data, and acquire the EEG target signal;

[0016] A signal division unit, used for dividing the EEG target signal into a plurality of regions according to the knowledge of brain region distribution of the human brain, each of the regions corresponding to a brain region, and each of the regions at least containing the EEG target signal corresponding to the brain region;

[0017] A unit division unit, used for dividing the calculation unit corresponding to the pre-trained psychological state assessment model to obtain a plurality of calculation sub-units, each of which corresponds to one of the regions;

[0018] A key determination unit, configured to determine a key brain region from among the plurality of brain regions, wherein the region corresponding to the key brain region is the key region, and construct a first EEG feature sequence of the key region through the calculation subunit corresponding to the key region;

[0019] A weight optimization unit, configured to obtain edge local features corresponding to the key brain region in the plurality of regions based on a local correlation analysis method, and optimize weight parameters of the calculation subunits corresponding to the key brain region according to the edge local features;

[0020] A window adjustment unit, used to adjust the time length and position of the sliding window of the calculation subunit corresponding to the key brain area, and construct a second EEG feature sequence of the key brain area through the calculation subunit corresponding to the key brain area;

[0021] A signal analysis unit is used to input the first EEG feature sequence and the second EEG feature sequence into the psychological state assessment model respectively, obtain a first EEG state corresponding to the first EEG feature sequence and a second EEG state corresponding to the second EEG feature sequence, and complete the analysis of the original EEG signal according to the first EEG state and the second EEG state.

[0022] In a third aspect, the present application also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the method for analyzing EEG signals based on multi-scale EEG feature fusion as described in the first aspect is implemented.

[0023] In a fourth aspect, the present application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the EEG signal analysis method based on multi-scale EEG feature fusion as described in the first aspect.

[0024] Compared with the prior art, this application has at least the following beneficial effects:

[0025] 1. Multi-scale feature fusion improves the accuracy and comprehensiveness of EEG signal analysis: This method significantly improves the accuracy and comprehensiveness of analysis by combining EEG features of different time scales and spatial scales. In terms of time scale, sliding windows of 256ms and 512ms are used to extract short-term and long-term EEG features respectively. This dual-time scale analysis can capture both instantaneous EEG state changes and long-term activity trends, thereby more comprehensively describing the dynamic activity patterns of the brain. In terms of spatial scale, EEG signals are divided into multiple regional samples based on the 10-20 system, each of which contains information about core electrodes and peripheral electrodes. This spatial division takes into account the interaction between brain regions and can better capture complex brain functional network activities. By fusing multi-scale features, this method can simultaneously analyze local and global EEG activity patterns, providing a more comprehensive and accurate information basis for understanding complex cognitive processes, emotional changes, and EEG characteristics of various neuropsychiatric diseases.

[0026] 2. Brain region adaptive optimization improves the model's sensitivity to key brain regions: This method introduces a brain region adaptive optimization technique based on a simulated annealing algorithm, which significantly improves the sensitivity of the analysis model to the EEG features of key brain regions. By using edge local features, the method is able to adaptively adjust the specific EEG features of each key brain region. This optimization not only takes into account the EEG signal processing within a single brain region, but also optimizes the EEG information interaction between the brain region and the surrounding areas. For example, for different brain regions, the optimized weights may be more sensitive to EEG activity in specific frequency bands, which is consistent with the role of each brain region in different cognitive functions. This adaptive optimization technique enables the model to more accurately capture the unique contributions of different brain regions in specific cognitive tasks or EEG states, thereby improving the accuracy and specificity of the overall analysis.

[0027] 3. Dynamic time window analysis realizes continuous tracking and transition detection of EEG states: This method uses dynamic time window analysis technology to realize continuous tracking of EEG states and accurate state transition detection. By sliding time windows of different lengths on the time axis, the method can continuously output two sets of scores reflecting instantaneous states and long-term trends. This dual-time scale dynamic analysis enables the method to capture rapid neural state changes and slow EEG pattern evolution at the same time. For example, it can identify a persistent high activation state of the brain, or capture the transition process from activation to inhibition. This dynamic analysis method can not only accurately capture the moment of EEG state transition, but also describe the specific process and duration of the transition. This is of great significance for studying the dynamic changes of EEG states during attention switching, emotional changes, or learning. In addition, this method can also be applied to clinical research, such as identifying the precursors of epileptic seizures, monitoring changes in anesthesia depth, or observing the long-term change trend of EEG states in patients with mental illness during treatment, providing an important basis for the formulation and evaluation of personalized medical plans.

[0028] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 A schematic diagram of a flow chart of an EEG signal analysis method based on multi-scale EEG feature fusion according to an embodiment of the present application;

[0030] Figure 2 This is a schematic diagram of the structure of an electroencephalogram signal analysis device according to an embodiment of the present application;

[0031] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0033] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0035] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0036] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0037] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0038] The technical solution of the embodiment of the present application is introduced below.

[0039] EEG signal analysis has important application value in the clinical diagnosis and scientific research of mental illness. Accurate analysis of EEG signals can help doctors screen and conduct qualitative and quantitative analysis of mental illness, and provide a basis for determining the condition. At present, the technologies for analyzing EEG signals mainly include behavioral detection, physiological signal detection, brain imaging detection, and detection based on EEG signals. Among them, EEG signals have the advantages of convenient acquisition and high temporal resolution, and are one of the important ways to analyze changes in brain activity states. However, EEG signals have extremely complex dynamic change characteristics in both time and frequency space, and it is very difficult to extract the key features that truly reflect the brain's activity state.

[0040] Mainstream EEG-based analysis methods usually use power spectrum analysis and other methods to analyze EEG features in the frequency domain, or obtain time domain features through cross-correlation, wavelet transform, etc., in an attempt to extract EEG indicators that reflect the overall brain activity state. However, this overall feature extraction method is difficult to take into account the structural and functional heterogeneity of the human brain. Different brain regions have different effects on specific brain activity states, and simple overall features often fail to highlight the role of key brain regions.

[0041] In order to obtain more targeted feature expressions, some scholars have tried to combine brain region location information to guide feature extraction. For example, the region of interest is predefined and feature channels are selected only from specific brain regions. However, such methods rely on subjective assumptions and may not accurately locate the truly relevant brain regions. Other researchers have tried to learn dynamic brain region weights for different states through a neural network attention model, but the learning process is complex and it is difficult to explain the exact meaning of the weights. Overall, the work of integrating brain region information to guide EEG feature extraction in the existing technology is not sufficient.

[0042] In addition, most methods only extract the overall features of EEG signals, but as a high-dimensional complex dynamic system, the local features of EEG also contain effective information. Some scholars use local correlation, wavelet local energy, etc. to analyze the local features of EEG, but local and overall features are rarely combined, resulting in incomplete information. It should also be noted that the state of brain activity has the characteristics of continuous dynamic evolution, and static features are difficult to evaluate the changes in the time axis of EEG signals, so the dynamic feature extraction of multiple time windows is also key.

[0043] To solve the above problems, please refer to Figure 1 , Figure 1 A flowchart of an EEG signal analysis method based on multi-scale EEG feature fusion provided in an embodiment of the present application. The EEG signal analysis method based on multi-scale EEG feature fusion in an embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1As shown, the EEG signal analysis method based on multi-scale EEG feature fusion of this embodiment includes steps S101 to S107, which are described in detail as follows:

[0044] Step S101, obtaining the original EEG signal to be analyzed, preprocessing the original EEG signal data, and obtaining the EEG target signal.

[0045] Specifically, the present application collects the original EEG signal data of users under different cognitive tasks. Select appropriate EEG equipment, configure acquisition parameters, determine users and stimulation tasks, perform EEG signal acquisition according to standard procedures, and obtain original EEG signal data sets containing information of all brain regions of the whole brain. This method uses electroencephalogram (EEG) for signal acquisition. When determining the acquisition parameters, it is necessary to consider the age range of the user. The sampling frequency for adult users is 250-500Hz, and the sampling frequency for children users is 500-1000Hz; the number of recording channels must cover the entire scalp area, usually 32 channels, 64 channels or 128 channels; the recording time must fully include the cognitive task process, generally controlled within 10-30 minutes. Taking the 128-channel system as an example, the sampling frequency is set to 500Hz and the recording time is set to 20 minutes. When configuring EEG sensors, the international 10-20 system is used. The system divides the sensors evenly into 10% and 20% distance points according to the anatomical position of the scalp, and can standardize the configuration of electrodes to cover all parts of the scalp. Taking the 128-channel system as an example, 128 electrodes will be set on the scalp, and each electrode name corresponds to the scalp area. After the electrode configuration is completed, the signal quality check needs to be performed to confirm that each electrode has good contact and the EEG signal is clear and usable.

[0046] In some embodiments, obtaining the original EEG signals to be analyzed includes: obtaining stimulation types and intensity parameters corresponding to multiple cognitive stimulation tasks; configuring acquisition parameters of a preset EEG acquisition device according to the stimulation types and intensity parameters; and completing the acquisition of the original EEG signals of the user under the multiple cognitive stimulation tasks through the adjusted EEG acquisition device.

[0047] When determining cognitive stimulation tasks, appropriate stimulation types, intensity parameters, etc. should be set to induce corresponding EEG activity patterns. For example, to evaluate EEG activity in the attention state, a visual search task can be set to guide attention concentration or distraction. Specifically, the Steady-State Visual Evoked Potential (SSVEP) paradigm can be used to continuously and quickly present alphanumeric sequences on the screen, and users need to identify the target stimulus. Different target stimulus probabilities can be set to guide the attention state. A high probability of target stimulus will cause the user to continue to pay attention; a low probability of target stimulus will cause attention distraction. When setting parameters, the target stimulus probability can be 10%-30% to represent the attention concentration condition, and 2%-5% to represent the attention distraction condition. The sequence presentation speed is generally 50-100ms per item. Under each condition, 5-10 minutes of uninterrupted EEG signals are extracted to collect EEG samples in a stable attention state. Through the parameter control of the SSVEP task, the corresponding EEG data can be effectively collected under different attention states.

[0048] In addition to evaluating EEG activity in the attention state, this method can also be used to evaluate EEG characteristics in other cognitive states, such as emotions, stress, fatigue, etc. For example, when evaluating EEG activity in different emotional states, the International Affective Picture System (IAPS) can be used. This system collects a large number of images with emotion-inducing effects. These image stimuli can be presented to induce different emotional responses in the subjects, and the corresponding EEG data can be recorded at the same time. Images can be divided into four categories according to their scores: low arousal positive, high arousal positive, low arousal negative, and high arousal negative. 10-15 images are selected for each category and presented alternately and quickly, with each image lasting 6 seconds. The subjects are asked to make subjective scores for each image and record their emotional experience. In this process, EEG data is continuously collected, segmented and marked as EEG samples in the corresponding emotional state.

[0049] The EEG signal is recorded continuously while the user is performing cognitive tasks, and the duration is controlled to be 10 seconds or longer to collect sufficient EEG data. At the same time, the stimulus event marker is set for subsequent analysis. After the recording is completed, the EEG data segment containing complete scalp area information and sufficient duration is extracted, stored to generate the original EEG data set, and passed to the subsequent processing steps.

[0050] Then, the raw EEG signal data is preprocessed, and the signals are processed using denoising, filtering and other algorithms to identify and delete errors caused by technical noise and human factors, and obtain clean and reliable EEG target signals.

[0051] In some embodiments, the raw EEG signal data is preprocessed, including: first extracting the raw EEG signal data x(t) 2 minutes before the start of the task for each EEG channel, calculating the mean value mean(x(t0:t1)) of x(t) in the 2-minute time period, and using the mean value as the baseline value of the channel, where t0 and t1 are the start and end points of the 2-minute time period, and then subtracting the corresponding baseline value mean(x(t0:t1)) from the entire time series data x(t) of the channel to obtain the baseline-corrected EEG data y(t)=x(t)-mean(x(t0:t1)) to eliminate the influence of low-frequency baseline drift on the EEG signal amplitude caused by electrochemical effects and other reasons. Then design an IIR elliptical bandpass filter with a cutoff frequency of 0.5Hz at the lower limit and 40Hz at the upper limit, and a transition bandwidth of 0.2Hz, requiring the minimum passband attenuation to be no less than 40dB. The filter can be easily designed using the iirfilter function of MATLAB. The code is [b, a] = iirfilter (4, [0.5 / (fs / 2) 40 / (fs / 2)], 'ellip') where 4 is the filter order and fs is the sampling frequency of the EEG data. The function will automatically calculate the Num and Den coefficients of the filter according to the specified cutoff frequency, transition bandwidth and other parameters, and store them in b and a. After obtaining the filter coefficients, the filtfilt function of MATLAB is used to perform phase-delay filtering on the baseline-corrected EEG data y. The formula is y_filt = filtfilt (b, a, y). Among them, filtfilt is a forward and reverse filtering method based on filters, which can effectively eliminate the nonlinear phase of the frequency response of the filter group, thereby avoiding phase distortion of the EEG data and obtaining the filtering result y_filt without phase delay. Through this bandpass filtering, low-frequency drift below 0.5Hz and high-frequency clutter above 40Hz in the EEG data can be filtered out, and the required EEG frequency band signal can be retained. For missing values ​​in the filtered EEG data y_filt, if the missing duration is less than 0.5 seconds, linear interpolation is used to fill in the missing values; if the missing duration exceeds 0.5 seconds, the data segment is directly eliminated.

[0052] Then, the fastica function of MATLAB was used to perform independent component analysis (ICA) on the filtered EEG data to obtain independent components IC, and the parameters approach='deflation', numOfICs=64 were set. According to the time domain, frequency domain, topological distribution and other characteristics of IC, physiological artifact components such as blinking and body movement were identified and removed to reconstruct clean EEG data. Then, the EEG power spectrum density of each time point and channel was calculated, and the abnormal points that deviated from the normal value by more than 5 standard deviations were marked. At the same time, based on the topological distribution of adjacent electrodes, the abnormal points that were too different from the surrounding electrodes were marked and removed.

[0053] Finally, the reref function in the EEGLAB toolbox is used to re-reference the EEG data obtained through the above preprocessing steps to the average reference of the entire scalp area. The specific method is: for each time point and channel, the average value of all channel data at that time point is calculated, mean(EEG.data,3), where EEG.data is the input preprocessed three-dimensional matrix data (channel×time point×trial), mean(EEG.data,3) represents the mean calculated on the third dimension (trial), and a two-dimensional matrix (channel×time point) is obtained. Then, the repmat function is used to repeat this two-dimensional mean matrix EEG.nbchan times (nbchan represents the number of channels) on the third dimension, so that it has the same size as the original three-dimensional data EEG.data. Finally, the mean matrix is ​​subtracted from EEG.data, so that the EEG data of each channel and time point are subtracted from the scalp average value, thereby achieving the average reference of the entire scalp area. The formula is EEG.data=EEG.data-repmat(mean(EEG.data,3),[1 1 EEG.nbchan]), This step can eliminate the influence of the original arbitrary selection of a reference electrode and obtain a pure EEG signal that is independent of the scalp average. Among them, [1 1 EEG.nbchan] specifies the number of repetitions in three dimensions, 1 means no repetition, EEG.nbchan means repetition nbchan times, and nbchan is the number of channels stored in the EEG data structure.

[0054] Step S102, based on the knowledge of brain region distribution of the human brain, the EEG target signal is divided into a plurality of regions, each region corresponds to a brain region, and each region at least contains the EEG target signal corresponding to the brain region.

[0055] Specifically, the human brain is an organ with a complex structure and diverse functions. Different brain regions are responsible for processing different types of information and performing different cognitive functions. In order to better analyze EEG signals and understand the brain activity they reflect, this application needs to divide the collected EEG signals into multiple regional samples according to the anatomical structure and functional divisions of the human brain. This division method not only retains the integrity of the original signal, but also reduces the granularity of the analysis to a single functional brain region, laying the foundation for subsequent targeted feature extraction and analysis model construction.

[0056] In some embodiments, the EEG target signal includes multiple electrode measurement signals; dividing the EEG target signal into multiple regions includes: determining multiple brain regions and brain region position information corresponding to the brain regions based on the knowledge of brain region distribution of the human brain; obtaining electrode position information of the EEG acquisition device corresponding to the EEG target signal; determining the electrode corresponding to each brain region based on the brain region position information and electrode position information corresponding to each brain region; constructing the region corresponding to the brain region using the electrode measurement signal corresponding to each brain region and the electrode measurement signal within a preset range, thereby completing the construction of multiple regions.

[0057] When dividing brain regions, this application is mainly based on the internationally accepted 10-20 system standard. This standard is a method widely used for electroencephalogram (EEG) electrode placement. It evenly distributes the electrodes at 10% and 20% distance points based on the anatomical position of the scalp. This standardized electrode arrangement not only covers all important parts of the scalp, but also ensures that the data between different experiments are comparable. According to the 10-20 system, this application can roughly divide the human brain into the following main functional areas: prefrontal region, frontal region, central region, parietal region, occipital region, temporal region and some other auxiliary regions.

[0058] The prefrontal region is located at the front of the brain, including the electrode positions of Fp1, Fp2, AF3, AF4, F7, F5, F3, F1, Fz, F2, F4, F6, F8, etc. This area is mainly related to high-level cognitive functions, such as executive control, decision making, working memory, etc. When analyzing EEG activities related to these high-level cognitive processes, the signals in the prefrontal region are particularly important.

[0059] The frontal region is located behind the prefrontal lobe and includes electrode locations such as FT7, FC5, FC3, FC1, FCz, FC2, FC4, FC6, and FT8. This region is involved in a variety of complex cognitive and behavioral processes, such as motor planning, problem solving, and emotional regulation. The EEG activity of the frontal lobe is important for understanding human behavioral control and emotional processing.

[0060] The central region spans the middle of the brain and includes electrode locations such as T7, C5, C3, C1, Cz, C2, C4, C6, and T8. This region is closely related to sensory-motor integration and corresponds to the motor cortex and somatosensory cortex of the brain. Analyzing EEG signals in the central region can help the application understand the neural mechanisms of sensory information processing and motor control.

[0061] The parietal region is located behind the central region, including CP5, CP3, CP1, CPz, CP2, CP4, CP6, TP7, P7, P5, P3, P1, Pz, P2, P4, P6, P8, TP8 and other electrode positions. This area is involved in functions such as spatial processing, attention allocation and sensory integration. The EEG activity of the parietal lobe is of great value for studying spatial cognition and attention mechanisms.

[0062] The occipital lobe area is located at the end of the brain, including PO7, PO5, PO3, POz, PO4, PO6, PO8, O1, Oz, O2 and other electrode positions. This area is mainly responsible for processing visual information. Analyzing the EEG signals in the occipital lobe area can help the application understand the neural response to visual stimuli and the visual cognitive process.

[0063] The temporal lobe region is located on both sides of the brain, including electrode locations such as T7, T8, TP7, TP8, FT7, and FT8. This area is closely related to functions such as auditory processing, language comprehension, and long-term memory. The EEG activity of the temporal lobe is of great significance for studying the neural mechanisms of auditory and language processing.

[0064] In addition to these major functional areas, there are additional electrode locations such as AF7, AF8, F9, F10, FT9, FT10, C9, C10, TP9, TP10, etc. These electrodes provide additional spatial resolution and help to more finely localize EEG activity.

[0065] Based on the above brain region division, this application can construct 41 regional samples. Each regional sample contains not only the core electrode signal of the functional area, but also the signal of the adjacent peripheral electrode as a contextual supplement. This division method ensures that each regional sample covers all relevant detail information of the brain area, while also taking into account the mutual influence between brain regions.

[0066] Specifically, the present application can divide the prefrontal region into 8 brain region samples, and the EEG target signal of each sample contains signals corresponding to 2-3 core electrodes and their surrounding electrodes. For example, the first prefrontal sample may contain signals of Fp1, Fp2, AF3, AF7, AF8, AF4 and their surrounding electrodes. The parietal regions on the left and right sides are divided into 11 brain region samples, each of which contains 5-6 core electrodes and their surrounding electrode signals. The midline region can be divided into 6 brain region samples, including FCz, Cz, CPz, Pz, POz, and Oz, each of which consists of a midline electrode and its adjacent electrodes. The occipital region can be divided into 4 brain region samples, consisting of core electrodes such as PO7, PO3, PO3z, PO4, PO4z, and PO8 and their surrounding electrode signals. Other electrode signals can be classified into the nearest neighbor related brain region samples according to their spatial position.

[0067] An important feature of this brain region division method is that it not only takes into account the activity of a single brain region, but also reflects the interaction between brain regions by including peripheral electrode information. This is crucial for understanding complex EEG activity patterns, because the various regions of the brain do not operate in isolation, but collaborate and influence each other. For example, when performing visual tasks, although the occipital lobe area is the main visual processing center, the prefrontal and parietal regions may also be involved in advanced visual cognitive processes. Through the division method of this application, this cross-regional collaborative activity can be better captured and analyzed.

[0068] In actual operation, this application needs to establish a mapping relationship between brain regions and electrodes. This can be achieved by creating a data structure that contains a list of core electrodes and peripheral electrodes corresponding to each brain region sample. Then, this application can write corresponding functions to extract each brain region and its context signal from the original EEG data to generate a data set of 41 regional samples.

[0069] This detailed brain region division and signal extraction process enables this application to better capture the spatial distribution characteristics of EEG signals. It provides richer and more targeted information for subsequent feature extraction and analysis, allowing this application to more comprehensively describe and understand complex EEG activity patterns. In this way, this application can focus on the activities of specific brain regions while retaining the information of the whole brain, thereby achieving more accurate and targeted EEG signal analysis.

[0070] Step S103, dividing the calculation unit corresponding to the pre-trained mental state assessment model to obtain multiple calculation sub-units, each calculation sub-unit corresponding to a region.

[0071] Specifically, this application will group the computing units of the trained EEG signal analysis model and obtain multiple computing subunits so that each group of computing subunits corresponds to a specific brain area sample. The establishment of this correspondence enables the model to more accurately capture and analyze EEG signal features from different brain areas. For example, the computing subunits related to the prefrontal lobe will specifically process EEG signals from the prefrontal lobe area, while the computing subunits related to the occipital lobe will focus on processing vision-related EEG activity.

[0072] Step S104, determining a key brain region from multiple brain regions, the region corresponding to the key brain region is the key region, and constructing a first EEG feature sequence of the key region through the calculation subunit corresponding to the key region.

[0073] Specifically, from the multiple regions divided in the above steps, the time domain and frequency domain global features of the key brain regions are extracted based on the time-frequency analysis method to form the first EEG feature sequence, and implemented on the computing subunit of the region.

[0074] In some embodiments, the mental state assessment model includes an input layer, multiple convolutional layers, at least one fully connected layer and an output layer, and the computing unit corresponds to multiple convolution kernels in the convolutional layer; the computing unit corresponding to the pre-trained mental state assessment model is divided to obtain multiple computing sub-units, including: dividing the convolution kernels of the first layer of the convolutional layer, and dividing the convolution kernels into computing sub-units corresponding to the prefrontal area, parietal area, midline area and occipital area of ​​the brain; obtaining the size of the feature map output by the first layer of the convolutional layer, and dividing the convolution kernels of the second layer of the convolutional layer into the computing sub-units corresponding to the multiple brain areas according to the size of the feature map; adding a shared identifier to the convolution kernels of the remaining convolutional layers, so that each of the computing sub-units can use the convolution kernel with the shared identifier.

[0075] Assume that this application uses an EEG signal analysis model based on a convolutional neural network (CNN). The basic structure of this model includes: an input layer with a size of N×T (N is the number of channels, T is the number of time points); 4 convolutional layers for extracting the spatiotemporal features of EEG signals; 2 fully connected layers for integrating these features; and finally an output layer for giving the final analysis results. The total weight parameters of the entire network are about 3.7 million.

[0076] In order to divide this network into 41 groups of computing units, corresponding to the 41 brain region samples divided before this application, this application can adopt the following grouping strategy:

[0077] First, the present application groups the first layer of convolution kernels. Specifically, the present application can assign the first 16 convolution kernels to 8 groups of computing units in the prefrontal region, with 2 convolution kernels in each group. This setting is because the prefrontal region is closely related to high-level cognitive functions and requires more computing resources to process its complex signal patterns. Next, the present application can assign 22 convolution kernels to 11 groups of computing units in the left parietal lobe, with 2 convolution kernels in each group; similarly, another 22 convolution kernels are assigned to 11 groups of computing units in the right parietal lobe. The parietal region is involved in important functions such as spatial processing and attention allocation, so a considerable number of computing units are also required.

[0078] For the midline area, the present application can allocate 12 convolution kernels to 6 groups of computing units, with 2 convolution kernels in each group. Although the midline area is smaller in space, it connects the left and right hemispheres and plays an important role in many cognitive processes. The occipital lobe area can allocate 8 convolution kernels to 4 groups of computing units, with 2 convolution kernels in each group. Although the occipital lobe is mainly responsible for visual processing, its signal pattern may be more complex and require sufficient computing resources. Finally, the present application can allocate the remaining 4 convolution kernels to 2 groups of computing units in other areas, with 2 convolution kernels in each group.

[0079] This allocation method takes into account the functional importance and signal complexity of different brain regions, ensuring that each key brain region has sufficient computing resources to process its unique signal pattern. At the same time, this grouping method also maintains a certain degree of flexibility, allowing information exchange between different brain regions.

[0080] For the second convolution layer, the present application can allocate convolution kernels to each group of computing units in proportion according to the size of the first layer output feature map. This ensures that information from different brain regions can be fully processed and integrated in deeper network layers.

[0081] It is worth noting that starting from the third convolutional layer, since the dimension of the feature map has been greatly reduced, the application can no longer be strictly grouped according to brain regions, but allows the computing units of these layers to share and process information from different brain regions. This design reflects the fact that high-level cognitive processes in the brain often involve the collaborative work of multiple brain regions.

[0082] An important advantage of this method of grouping computational units is that it makes the model structure correspond to the functional anatomical structure of the human brain. This not only improves the interpretability of the model, but also may improve its performance. For example, when analyzing EEG activity related to working memory, the model can pay more attention to signals in the prefrontal and parietal regions, because these regions play a key role in the working memory process.

[0083] In the actual implementation process, this application needs to first assign a unique index number to each of the 41 brain region samples. For example, this application can number the first sample of the prefrontal region as 0, the second sample as 1, and so on until number 40. Then, when defining the convolution layer of the CNN model, this application needs to bind the index of the convolution kernel to the number of the corresponding brain region. For example, the convolution kernel with an index of 0-1 will be responsible for extracting the features of the prefrontal region 1 numbered 0, the convolution kernel with an index of 2-3 will be responsible for extracting the features of the prefrontal region 2 numbered 1, and so on.

[0084] For the fully connected layer, the application also needs to divide the weight vector of the neuron into 41 sub-vectors according to a certain ratio and connect them to the computing unit groups of the corresponding brain regions. This design ensures that even at the high level of the network, information from different brain regions can still maintain a certain degree of independence.

[0085] During the model training phase, the present application can utilize the subnetwork segmentation function provided by the deep learning framework, such as TensorFlow's tf.slice operation, to divide the parameters of the entire network according to the previously determined index, and obtain 41 subnetwork parameter sets. Each subset corresponds to a brain area and is responsible for processing the EEG signals of that brain area. Then, the present application can construct a computational graph for the entire model, allowing each subnetwork parameter set to calculate the output of the corresponding brain area respectively. This parallelized computing method not only improves training efficiency, but also enables the model to process information from different brain areas at the same time.

[0086] Through this method, the application finally obtained 41 groups of computing units, each of which focused on extracting and analyzing the EEG characteristics of a specific brain area. This design lays the foundation for the optimization and adjustment of the computing units in subsequent steps, enabling the application to target the characteristics of different brain areas and enhance their impact in the overall analysis. For example, the application can adjust the weights of the computing units corresponding to key brain areas according to specific analysis tasks to increase the model's sensitivity to signals in these areas.

[0087] Exemplarily, before determining the key brain area among the multiple brain areas, it also includes: obtaining a weight vector corresponding to the fully connected layer, dividing the weight vector into multiple sub-vectors; each of the sub-vectors is connected to one of the computing sub-units.

[0088] For the fully connected layer, this application adopts a special grouping method. Specifically, this application divides the weight vector of each fully connected layer into 41 sub-vectors according to a certain ratio, and each sub-vector is connected to the computing unit group of the corresponding brain area. This design allows the model to integrate information from different brain areas while still maintaining the distinction between the contributions of each brain area.

[0089] In some embodiments, the first EEG feature sequence of the key area is constructed by the calculation subunit corresponding to the key area, including: performing short-time Fourier transform on the EEG target signal corresponding to the key area to obtain the time-frequency diagram corresponding to the key area; extracting the time domain global features and frequency domain global features corresponding to the key area according to the time-frequency diagram; splicing the time domain global features and the frequency domain global features to obtain the first EEG feature sequence.

[0090] First, determine the key brain regions that need to be analyzed: First, clarify the target EEG state, such as attention, emotion, stress, fatigue, etc., and consult relevant neuroscience research literature to understand the association between different EEG states and specific brain regions. For example, the attention state is mainly related to the EEG activity of the prefrontal cortex and parietal cortex; positive emotions are related to increased EEG activity in the amygdala, ventral pretransverse cortex and other regions; negative emotions are related to increased EEG activity in the insula, anterior cingulate gyrus and other regions. Through literature research, the candidate brain regions closely related to the target EEG state can be preliminarily determined. Then compare the above candidate brain regions with the 41 brain region samples divided in the above steps to find the regional samples that contain these candidate brain regions. For example, if the study shows that the attention state is closely related to the prefrontal region and the parietal region, then among the 41 regional samples, the 8 regional samples containing the prefrontal lobe and the 22 regional samples containing the parietal lobe are preliminary key region candidates. Then carefully check the specific brain region range covered by each candidate region sample to ensure that it completely contains the target brain region, and appropriately expand the adjacent region as a context supplement. For example, the second area sample of the prefrontal region includes AF3, AF4, F7, F5, F3, and F1 electrodes, which can completely cover the ventrolateral area of ​​the prefrontal lobe. It also includes some frontal orbital and orbital frontal electrodes, so it can be identified as one of the key brain area samples. According to the complexity of the EEG state and the number of related brain areas reported in the literature, 5-10 most critical areas are selected from the candidate area samples as the final analysis objects, and the importance of each area should be weighed during the screening. For example, attention state research shows that the prefrontal lobe and parietal lobe are two core areas, so they must be regarded as key areas; while the occipital lobe has a low correlation with attention and can be temporarily ignored.

[0091] For each key brain region, first perform a short-time Fourier transform (STFT) on its EEG signal to obtain a time-frequency representation. Assume that the input EEG signal is x(t), the window function is w(t), and the calculation formula of STFT is STFT(t,f)=∫x(τ)w(τ-t)e^(-j2πfτ)dτ, where t is time and f is frequency. Select a suitable window length, such as 256 time points, corresponding to a window length of 512ms at a sampling rate of 500Hz, and the step length is set to 64 time points, i.e. 128ms. Perform STFT transformation on the EEG data of each key brain region to obtain its time-frequency representation.

[0092] Then, two types of global features, time domain and frequency domain, are extracted from the time-frequency diagram. In the time domain, for each time segment, the Hjorth parameters, namely Activity (A), Mobility (M), and Complexity (C), are calculated from the time axis of the time-frequency diagram. They represent the variance of the EEG signal, the variance ratio of the derivative, and the entropy of the variance ratio of the derivative, respectively, and can well describe the global statistical characteristics of the time domain signal. The calculation formula is: A=var(x), M=(var(x')) / (var(x)), C=(M*(M-1)) / (var(x'') / var(x'))^1 / 2, where var is the variance calculation, and x' and x'' are the first-order derivative and the second-order derivative, respectively. A sliding window with a length of 1s and an overlap of 50% is used to calculate the three Hjorth parameters for each window segment as the time domain global feature of that time point.

[0093] In the frequency domain, for the spectrum of each time segment, the relative power spectrum (RPS), spectral entropy (SE), and spectral edge frequency (SEF) are calculated as global features. The calculation of RPS is to first divide the frequency into five frequency bands: δ (1-4Hz), θ (4-8Hz), α (8-13Hz), β (13-30Hz), and γ (30-50Hz), and then calculate the power of each frequency band P_δ, P_θ, P_α, P_β, and P_γ respectively, and then normalize them to relative power ratios: RPS_δ=P_δ / sum(P), RPS_θ=P_θ / sum(P), and so on. Sum(P) is the total power. SE reflects the degree of disorder of the EEG spectrum distribution. The calculation formula is SE=-sum(P.log2(P)) / log2(N), where N is the number of frequency points. Assume that the minimum frequency required to contain α% of the total energy is f_α, then SEF_α=f_α / f_s*100%, usually α=95% is used to use SEF95% feature. Using the same sliding window as the time domain, frequency domain parameters such as RPS, SE, SEF, etc. are extracted for each time segment as the frequency domain global features at that time point.

[0094] The global features of the time domain (Hjorth parameter) and frequency domain (RPS, SE, SEF) at each time point are spliced ​​into a feature vector to form the global EEG feature corresponding to that time point. The global features of all time points are spliced ​​in time series to eventually form the first global EEG feature sequence of the key brain area. For the remaining key brain areas, the same time-frequency analysis and feature extraction process is used to obtain the global EEG feature sequence corresponding to each area. Finally, all the key brain area sequences are cascaded to obtain the complete first EEG feature sequence containing global time and frequency domain information.

[0095] Step S105, in multiple regions, edge local features corresponding to key brain regions are obtained based on the local correlation analysis method, and weight parameters of calculation subunits corresponding to key brain regions are optimized according to the edge local features.

[0096] Specifically, the key brain area samples obtained in the above steps need to be segmented into multiple overlapping local window segments, with the window length set to 256 time points (corresponding to 512ms at a sampling rate of 500Hz) and the step length set to 64 time points (128ms). Then, in each local window, for the center point t_c of the window, the Pearson correlation coefficient r(t_c,t_i) between it and other time points t_i (i=1,2,...,256) in the window is calculated to form a 256×256 local correlation matrix R centered on t_c. For each local window, the elements R(1,1), R(2,2)...R(256,256) on its diagonal are concatenated in sequence to obtain a 256-dimensional local autocorrelation feature vector, which is used to describe the changes in the autocorrelation of the local EEG signal within the window.

[0097] In addition, the cross-correlation coefficient between the center point t_c of the window and the edge point t_e needs to be calculated, where t_e is the n edge time points closest to t_c (usually n=8). Taking the second area of ​​the prefrontal lobe as an example, the samples in this area include electrodes such as AF3, AF4, F7, F5, F3, and F1. When calculating the local edge cross-correlation between the center point F3 and the edge points, AF3, AF4, F7, F5, and F1 can be selected as the edge point set, and the cross-correlation coefficient r(F3, t_e) between F3 and each edge point is calculated respectively. Then, the average value of these cross-correlation coefficients is taken as the edge cross-correlation value of the local window position. These edge cross-correlation values ​​are spliced ​​into an n-dimensional local edge cross-correlation feature vector, which is cascaded with the previous 256-dimensional local autocorrelation feature vector to obtain a 256+n-dimensional local correlation feature vector of the window position, which is used to describe the correlation of the EEG signals between the center point of the window and the internal and edge points. In this way, for each local window position, the corresponding local correlation feature vector can be extracted, and then spliced ​​in the time dimension to form a local correlation feature sequence on the entire time series, which contains the local autocorrelation information within the key brain area and the local edge cross-correlation information between the edge area and the key brain area. For other key brain area samples, the same local correlation analysis method can be used to extract the corresponding local autocorrelation and edge cross-correlation sequences.

[0098] It should be emphasized that the above local correlation analysis process needs to adopt a sliding window method, dynamically updated and calculated in the time dimension, so as to effectively capture the changes in local features over time. Specifically, for each key brain area sample, an initial window position is first set, and the local autocorrelation matrix and edge correlation coefficient are calculated within the window to obtain the local autocorrelation value and edge correlation value at that time point. Then the window is slid to the next time position according to the set step size, and the above calculation process is repeated to obtain a new local correlation feature value. In this way, the window is continuously slid until the entire time series is covered, and finally the local autocorrelation sequence and edge correlation sequence that change dynamically over time can be obtained.

[0099] Through local correlation analysis, not only can the local autocorrelation features within the key brain area be extracted, but also the local edge correlation between the area and the surrounding areas can be analyzed, which makes up for the defect of only focusing on the central brain area and ignoring the important information of the surrounding areas. The local autocorrelation sequence reflects the subtle dynamic activation pattern of the neuronal clusters within the key brain area, while the edge cross-correlation sequence describes the mutual influence between the brain area and the surrounding areas. The two complement each other and together constitute a more complete and rich local EEG feature representation. In addition, due to the use of sliding window calculation, the local correlation sequence obtained itself contains information about the dynamic changes in time, which can better capture the time-varying characteristics of EEG signals.

[0100] The advantage of this local correlation analysis method is that it can capture subtle changes and local features in EEG signals that may be averaged or ignored in global analysis. For example, in certain cognitive tasks, specific brain regions may experience brief but significant activation patterns that may only last for a few hundred milliseconds. Through local correlation analysis, the present application can detect such brief activation patterns and correlate them with task performance or other physiological indicators.

[0101] In addition, edge cross-correlation analysis can reveal functional connectivity patterns between different brain regions. For example, in certain cognitive tasks, the prefrontal and parietal lobes may show strong synchronous activity, which may reflect the activation of the attention network. By analyzing the edge cross-correlation between these brain regions, this application can quantify the strength of this functional connection and observe its changes over time.

[0102] Using the local features of the edge of the key brain region obtained in the above steps, the weight parameters of the computing subunits corresponding to the key region are adjusted and optimized to enhance the influence of the EEG features of the region on the final result.

[0103] For each critical brain region, the edge cross-correlation EEG feature sequence of the region needs to be used to optimize and adjust the weight of the neural network computing unit corresponding to the region, so that when the unit inputs the original EEG signal, its output can fit the edge cross-correlation sequence well, thereby enhancing the influence of the EEG features of the critical brain region on the final EEG state evaluation results. This scheme uses the simulated annealing algorithm for optimization and adjustment, and the specific steps are as follows:

[0104] First, it is necessary to initialize some parameters required by the simulated annealing algorithm, including the initial temperature T0, the termination temperature Tend, the temperature reduction amount in each iteration and its temperature reduction coefficient alpha, etc. The setting of these parameters has an important impact on the optimization performance of the algorithm, and it is necessary to determine the best values ​​through multiple experiments based on the specific EEG signal analysis problem.

[0105] Generally speaking, the initial temperature T0 needs to be set high enough to ensure that the algorithm can fully search the entire EEG feature solution space at high temperature to avoid falling into the local minimum; the termination temperature Tend needs to be set to a lower value. When the temperature drops to this value, the algorithm can terminate the iteration and output the optimal solution, because the temperature is already low enough at this time and the algorithm can no longer jump out of the current minimum; the smaller the temperature drop in each iteration, the slower and smoother the cooling process, which is conducive to the algorithm to fully search the EEG features in each temperature range, but it will also increase the convergence time of the algorithm; the cooling coefficient alpha usually takes a value between 0.7 and 0.99. When alpha is larger, the temperature drop rate is slower, which is conducive to the algorithm to perform fine search locally.

[0106] Depending on the complexity of the specific EEG signal analysis problem, the ideal setting values ​​of the above parameters usually need to be determined through continuous debugging and testing. However, in general, the initial temperature T0 can be around 1000, the end temperature Tend can be around 1e-6, the cooling amount can be calculated as 1%~5% of the initial temperature, and the cooling coefficient alpha can be around 0.95. After initializing the parameter settings, an initial weight parameter set theta0 needs to be given as the search starting point of the algorithm. The initial solution can be the weight parameters of the EEG signal analysis model obtained by pre-training, or a set of randomly generated weight parameter values.

[0107] In each iteration of the algorithm, first calculate the loss function value \(L_0 = L(f(x;\theta), y)\) between the output \(f(x;\theta)\) of the corresponding neural network computing unit when the current set of weight parameters \(\theta\) is input with the original EEG signal \(x\) of this key brain region and the cross-correlation EEG feature sequence \(y\) of this region. The loss function \(L\) can adopt common mean square error loss functions or other appropriate loss function forms. Then, by adding a random perturbation term \(\delta\theta\) to the current set of weight parameters \(\theta\), a new candidate set of weight parameters \(\theta_{new}=\theta+\delta\theta\) is generated, and then calculate the loss function value \(L_{new}\) corresponding to this new parameter set.

[0108] Next, it is necessary to determine whether to accept the new candidate set of weight parameters \(\theta_{new}\) to replace the current parameter set \(\theta\) as the initial solution for the next iteration. The criterion adopted here is: when \(L_{new}<L_0\), the new solution \(\theta_{new}\) will definitely be accepted to replace the old solution; when \(L_{new}\geq L_0\), the new solution will be accepted with a certain probability \(P = \exp(-(L_{new}-L_0) / T)\), where \(T\) is the current temperature. It can be seen that when the loss function value of the new solution is less than the current solution, it will definitely be accepted, which ensures that the algorithm will not reject a new solution that is better than the current solution; while when the loss value of the new solution is larger, there is still a certain probability of being accepted, but this probability will become smaller and smaller as the temperature \(T\) decreases. In this way, at high temperatures, the algorithm has a greater chance of accepting solutions with increased losses to jump out of the local minimum trap, and at low temperatures, it is more inclined to only accept new solutions that reduce the loss.

[0109] If it is decided to accept the new solution \(\theta_{new}\), then use it as the initial solution for the next iteration; if the new solution is rejected, then keep the current solution \(\theta\) unchanged as the initial solution for the next iteration. At the end of each iteration, it is also necessary to perturb the current optimal solution with a certain probability to prevent the algorithm from converging prematurely and falling into a suboptimal solution. After completing the above iteration process, it is necessary to appropriately reduce the temperature \(T\) according to the pre-set cooling method, such as according to the cooling coefficient \(\alpha\), to obtain a new current temperature, and enter the next iteration loop based on the new temperature.

[0110] Repeat the above iterative process until the temperature T drops to the preset termination temperature Tend or meets other termination conditions, and the algorithm will output the currently obtained optimal weight parameter set theta_best as the global optimal solution. theta_best is the weight of the neural network calculation unit that is specially optimized and adjusted for the key brain area, so that when the original EEG signal of the area is input, the output f(x;theta_best) of the calculation unit can well fit the edge cross-correlation EEG feature sequence y of the area, thereby enhancing the mapping ability of the connection between the key brain area and the target EEG state, and improving the sensitivity of the entire model to the EEG activity of the brain area.

[0111] An important advantage of this optimization method is that it can be adaptively adjusted for the specific EEG characteristics of each key brain region. For example, for the prefrontal region, the optimized weights may be more sensitive to EEG activity in the high-frequency beta band, which is consistent with the role of the prefrontal lobe in attention and executive control. For the occipital region, the optimized weights may pay more attention to EEG activity in the alpha band, which reflects the importance of the occipital lobe in visual processing and relaxation.

[0112] In addition, this optimization method also takes into account the interaction between brain regions. By using the edge cross-correlation EEG feature sequence as the optimization target, this application not only optimizes the EEG signal processing within a single brain region, but also optimizes the EEG information interaction between the brain region and the surrounding areas. This is particularly important for capturing complex brain functional network activities, because many cognitive processes and EEG states involve the collaborative work of multiple brain regions.

[0113] Step S106, adjusting the time length and position of the sliding window of the calculation subunit corresponding to the key brain area, and constructing a second EEG feature sequence of the key brain area through the calculation subunit corresponding to the key brain area.

[0114] Specifically, in the above steps, based on the key brain areas determined in the previous steps, the time-frequency analysis and global feature extraction of the EEG signal are re-performed using, for example, a sliding time window of 512ms and a step size of 256ms to obtain a second EEG feature sequence. Different from the first global feature sequence extracted using a 256ms window length and a 128ms step size in the above steps, the longer time window and larger step size set here are intended to capture EEG dynamic information over a longer time course, so as to better describe the slow evolution of the EEG state. The occurrence and transition of the EEG state is usually not an instantaneous process, but is accompanied by the gradual adjustment of the brain's intrinsic neural dynamics, gradually transitioning from one state to another, which takes a certain amount of time to complete. Therefore, the use of a longer window length of 512ms is conducive to obtaining the dynamic characteristics of brain activity in a wider time range, so as to more completely reflect the entire process of the evolution of the EEG state.

[0115] At the same time, the larger step size of 256ms is selected mainly to reduce the computational and storage overhead and improve the analysis efficiency. In the above steps, a smaller step size of 128ms is used in order to obtain a finer time resolution within a fixed 256ms time scale. However, in the above steps, the goal is to extract dynamic EEG features of a longer time course, so the requirements for time resolution can be appropriately relaxed and a larger step size can be used to reduce the amount of calculation. It should be noted that although the step size is increased, the time window length is also doubled accordingly. Therefore, within the same time range, it is actually still possible to obtain a time sampling density equivalent to that of the above steps, thereby ensuring the time coverage of EEG feature extraction.

[0116] After selecting a 512ms window length and a 256ms step length, time-frequency analysis will be performed on the EEG raw signal data of each key brain region. Similar to the above steps, short-time Fourier transform (STFT) is first performed on the EEG data of each key brain region to obtain its time-frequency representation within the 512ms time window. When calculating the STFT, a Hamming window function with a length of 512ms and an overlap of 256ms is required to ensure that the time window can slide continuously on the entire time axis with a step length of 256ms without interruption. The STFT transformation formula is as described above. Assume that the input EEG signal is x(t) and the window function w(t) is a Hamming window with a length of 512ms. The STFT result at this time point is: STFT(t,f) = ∫x(τ)w(τ-t)e^(-j2πfτ)dτ.

[0117] Where t is the current time point and f is the frequency component. Through this transformation, we can obtain a short-time Fourier spectrum with t as the center and a time width of 512ms, which reflects the time-frequency distribution characteristics of the EEG signal in this time period.

[0118] Next, we need to extract the global EEG features in the time domain and frequency domain from the time-frequency representation. In the time domain, we will calculate the Hjorth parameters, including Activity, Mobility, and Complexity, which represent the variance, first-order derivative variance ratio, and normalized second-order derivative variance ratio of the EEG time series, respectively, and can well describe the statistical time domain characteristics of the EEG signal. The calculation formula is as described above:

[0119] Activity = var(x);

[0120] Mobility = (var(x')) / (var(x));

[0121] Complexity = (Mobility*(Mobility-1)) / (var(x'') / var(x'))^(1 / 2);

[0122] In the frequency domain, the relative power spectrum (RPS), spectral entropy (SE) and spectral edge frequency (SEF) are extracted as global EEG features. The calculation process of RPS is to first divide the frequency into five frequency bands: δ (1-4Hz), θ (4-8Hz), α (8-13Hz), β (13-30Hz), and γ (30-50Hz), and then calculate the power P_δ, P_θ, P_α, P_β, and P_γ of each frequency band in the current 512ms time window, and then normalize them to relative power ratios, such as RPS_δ = P_δ / sum(P). SE reflects the degree of disorder in the EEG spectrum distribution, and the calculation formula is SE = -sum(P.log2(P)) / log2(N), where N is the number of frequency points and P is the power of each frequency component. SEF represents the percentage of the minimum frequency required to contain α% of the total energy to the entire sampling frequency. Usually α=95% is taken and SEF95% is used as the frequency domain feature.

[0123] The above-mentioned time domain Hjorth parameters are combined with frequency domain RPS, SE, SEF and other indicators to form the global EEG feature vector at that time point. By sliding the 512ms time window with a step size of 256ms, the global EEG feature sequence on the entire time series can be obtained, which reflects the dynamic changes of the EEG of the key brain area at this time scale. The same time-frequency analysis and feature extraction process is performed on the remaining key brain areas, and finally the global EEG feature sequences corresponding to multiple key areas can be obtained. These sequences are spliced ​​in a certain order to form the second EEG global feature sequence in the above steps.

[0124] It is worth mentioning that this feature sequence extracted under a longer time window of 512ms can better capture the slow evolution of the EEG state than the first feature sequence obtained based on the 256ms window in the above steps. For example, when analyzing changes in cognitive load, the EEG state often does not change dramatically in a short period of time, but instead shows a slow upward or downward trend, which is easier to observe at a time scale of 512ms. If you only rely on the features extracted from the 256ms window in the above steps, you may ignore the overall trend of change due to the short time scale. By supplementing the feature sequence under the 512ms window length in the above steps, you can effectively capture the dynamic evolution of the EEG state over a longer period of time, thereby providing more comprehensive information support for subsequent time evolution analysis.

[0125] Step S107, input the first EEG feature sequence and the second EEG feature sequence into the psychological state assessment model respectively, obtain the first EEG state corresponding to the first EEG feature sequence and the second EEG state corresponding to the second EEG feature sequence, and complete the analysis of the original EEG signal according to the first EEG state and the second EEG state.

[0126] Specifically, since the input of the convolutional neural network (CNN) needs to be three-dimensional tensor data, the one-dimensional global EEG feature sequence needs to be converted into a two-dimensional feature map first. Assuming that the length of the first global EEG feature sequence is T1, it contains N key brain regions and the feature dimension is M, it can be reshaped into a three-dimensional tensor of [N, T1, M] as the input feature map of CNN. Similarly, for the second global EEG feature sequence of length T2, it can also be converted into an input tensor of [N, T2, M].

[0127] In some embodiments, the analysis of the original EEG signal according to the first EEG state and the second EEG state includes: respectively obtaining a first output score and a second output score corresponding to the first EEG state and the second EEG state; if the first output score and the second output score are both greater than a first preset threshold, determining that the user corresponding to the original EEG signal is in a continuous highly activated state; if the first output score and the second output score are both less than a second preset threshold, determining that the user is in a relatively resting or relaxed state; if the first output score is greater than the first preset threshold and the second output score is less than the second preset threshold, determining that the user is in a transition period from activation to inhibition; if the first output score is less than the second preset threshold and the second output score is greater than the first preset threshold, determining that the user is in a transition period from rest to activation.

[0128] After the EEG features are input into CNN, it is necessary to perform convolution operations on the feature maps of each brain region. According to the unit grouping in the above steps, the calculation unit group corresponding to each brain region can be obtained, including the convolution kernel parameter set of the group. Then, using the parameter weights optimized and adjusted in the above steps, the convolution operation is performed on the feature map of the brain region to extract the local EEG pattern features unique to the region. After the convolution operation, the feature map of each region will be converted into a new feature map sequence, reflecting the local pattern distribution of the EEG signal in the time and channel dimensions of the region.

[0129] After the first layer of convolution, the output feature map sequences of all regions need to be merged to form the input of the next layer. The merging process is to splice the feature map sequences of all regions in the first dimension (brain region dimension) to form a large feature map sequence containing all regional information. This large sequence is then input into the second layer of convolution units to continue extracting more advanced EEG feature patterns. In the subsequent third and fourth layers of convolution and two fully connected layers, the entire large feature map sequence is analyzed and processed.

[0130] Finally, the output layer of the model will output a scalar value, which represents the predicted score of the EEG state in the current time window. Since two global EEG feature sequences of different time scales are input, the model will evaluate the state of these two sequences respectively and output the corresponding scores. Specifically, for the feature sequence of the first 256ms window, the score y1(t) output by the model can reflect the instantaneous level of the EEG state at time t. If y1(t) is high, it means that the brain is in a certain activation state at that time point; if y1(t) is low, it means that the brain may be in a relatively quiet or inhibited state at that time point.

[0131] For the feature sequence of the second 512ms window, the score y2(t) output by the model can reflect the overall trend of changes in the EEG state over a longer period of time. For example, if y2(t) shows an upward trend, it means that the brain's activity level is gradually increasing during this period of time; if y2(t) shows a downward trend, it means that the brain activity may be gradually calming down.

[0132] By comparing the two output scores y1(t) and y2(t), we can make a comprehensive judgment on the EEG state at time t:

[0133] 1. If both y1(t) and y2(t) are high, it means that the instantaneous EEG activity at time t is relatively strong and consistent with the EEG trend over a longer period of time. This may indicate that the brain is in a state of continuous high activation, such as high concentration of attention or strong emotional experience.

[0134] 2. If both y1(t) and y2(t) are low, it means that the instantaneous EEG activity at time t is weak and consistent with the EEG trend over a longer period of time, which may mean that the brain is in a relatively quiet or relaxed state.

[0135] 3. If y1(t) is high and y2(t) is low and shows a downward trend, it means that the instantaneous EEG activity at time t is strong, but it is inconsistent with the trend of gradually weakening EEG activity over a longer period of time. This may mean that the brain state is changing from activation to inhibition and is in a transition period of change.

[0136] 4. If y1(t) is low and y2(t) is high and on an upward trend, it means that the instantaneous EEG activity at time t is weak, but it is inconsistent with the trend of gradually increasing EEG activity over a longer period of time. This may mean that the brain state is shifting from resting to activated and is also in a transitional period of change.

[0137] Through the above analysis, we can not only evaluate the instantaneous EEG state at a specific time point, but also gain insight into the long-term dynamic evolution trend of the EEG state, so as to have a more comprehensive grasp of the temporal change process of the EEG state. This method is particularly suitable for analyzing complex cognitive processes, such as attention switching, emotional changes, or EEG state changes during learning.

[0138] In addition, since the evaluation is not based on the static output of a single time point, but on sliding the time window along the time axis to continuously obtain the time series output of y1(t) and y2(t), it is possible to dynamically track the change process of the EEG state. For example, if y1(t) and y2(t) remain at a high level and are relatively consistent over a period of time, it means that the brain is in a state of continuous high activation, which may correspond to a long-term focus task or a continuous emotional experience; if y1(t) and y2(t) diverge significantly around a certain time point and last for a period of time, it means that the brain's activity state has undergone a transition from activation to inhibition or from inhibition to activation, and the time point and evolution of this transition can be accurately captured.

[0139] This dual-time-scale analysis method provides a new perspective for EEG signal research. It can not only capture the instantaneous EEG state, but also reflect the long-term trend of EEG activity, thereby more comprehensively describing the dynamic activity pattern of the brain. This is of great significance for understanding complex cognitive processes, emotional changes, and EEG characteristics of various neuropsychiatric diseases. For example, when studying the EEG characteristics of patients with attention deficit hyperactivity disorder (ADHD), this method may reveal the unique EEG state change pattern of patients during the process of maintaining attention, providing new insights for clinical diagnosis and treatment.

[0140] Furthermore, the provided solution has the following beneficial effects:

[0141] 1. Multi-scale feature fusion improves the accuracy and comprehensiveness of EEG signal analysis: This method significantly improves the accuracy and comprehensiveness of analysis by combining EEG features of different time scales and spatial scales. In terms of time scale, sliding windows of 256ms and 512ms are used to extract short-term and long-term EEG features respectively. This dual-time scale analysis can capture both instantaneous EEG state changes and long-term activity trends, thereby more comprehensively describing the dynamic activity patterns of the brain. In terms of spatial scale, EEG signals are divided into multiple regional samples based on the 10-20 system, each of which contains information about core electrodes and peripheral electrodes. This spatial division takes into account the interaction between brain regions and can better capture complex brain functional network activities. By fusing multi-scale features, this method can simultaneously analyze local and global EEG activity patterns, providing a more comprehensive and accurate information basis for understanding complex cognitive processes, emotional changes, and EEG characteristics of various neuropsychiatric diseases.

[0142] 2. Brain region adaptive optimization improves the model's sensitivity to key brain regions: This method introduces a brain region adaptive optimization technique based on a simulated annealing algorithm, which significantly improves the sensitivity of the analysis model to the EEG features of key brain regions. By using edge local features, the method is able to adaptively adjust the specific EEG features of each key brain region. This optimization not only takes into account the EEG signal processing within a single brain region, but also optimizes the EEG information interaction between the brain region and the surrounding areas. For example, for different brain regions, the optimized weights may be more sensitive to EEG activity in specific frequency bands, which is consistent with the role of each brain region in different cognitive functions. This adaptive optimization technique enables the model to more accurately capture the unique contributions of different brain regions in specific cognitive tasks or EEG states, thereby improving the accuracy and specificity of the overall analysis.

[0143] 3. Dynamic time window analysis realizes continuous tracking and transition detection of EEG states: This method uses dynamic time window analysis technology to realize continuous tracking of EEG states and accurate state transition detection. By sliding time windows of different lengths on the time axis, the method can continuously output two sets of scores reflecting instantaneous states and long-term trends. This dual-time scale dynamic analysis enables the method to capture rapid neural state changes and slow EEG pattern evolution at the same time. For example, it can identify a persistent high activation state of the brain, or capture the transition process from activation to inhibition. This dynamic analysis method can not only accurately capture the moment of EEG state transition, but also describe the specific process and duration of the transition. This is of great significance for studying the dynamic changes of EEG states during attention switching, emotional changes, or learning. In addition, this method can also be applied to clinical research, such as identifying the precursors of epileptic seizures, monitoring changes in anesthesia depth, or observing the long-term change trend of EEG states in patients with mental illness during treatment, providing an important basis for the formulation and evaluation of personalized medical plans.

[0144] In order to implement the EEG signal analysis method based on multi-scale EEG feature fusion corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of an EEG signal analysis device 200 provided in an embodiment of the present application is shown. For the sake of convenience, only the parts related to the present embodiment are shown. The EEG signal analysis device 200 provided in an embodiment of the present application includes:

[0145] The signal acquisition unit 201 is used to acquire the original EEG signal to be analyzed, pre-process the original EEG signal data, and acquire the EEG target signal;

[0146] The signal division unit 202 is used to divide the EEG target signal into a plurality of regions according to the knowledge of brain region distribution of the human brain, each of the regions corresponds to a brain region, and each of the regions at least contains the EEG target signal corresponding to the brain region;

[0147] A unit division unit 203 is used to divide the calculation unit corresponding to the pre-trained psychological state assessment model to obtain a plurality of calculation sub-units, each of which corresponds to one of the regions;

[0148] A key determination unit 204 is used to determine a key brain region from the multiple brain regions, the region corresponding to the key brain region is the key region, and construct a first EEG feature sequence of the key region through the calculation subunit corresponding to the key region;

[0149] A weight optimization unit 205 is used to obtain edge local features corresponding to the key brain region in the multiple regions based on a local correlation analysis method, and optimize the weight parameters of the calculation subunits corresponding to the key brain region according to the edge local features;

[0150] A window adjustment unit 206, used to adjust the time length and position of the sliding window of the calculation subunit corresponding to the key brain area, and construct a second EEG feature sequence of the key brain area through the calculation subunit corresponding to the key brain area;

[0151] The signal analysis unit 207 is used to input the first EEG feature sequence and the second EEG feature sequence into the psychological state assessment model respectively, obtain the first EEG state corresponding to the first EEG feature sequence and the second EEG state corresponding to the second EEG feature sequence, and complete the analysis of the original EEG signal according to the first EEG state and the second EEG state.

[0152] The above-mentioned EEG signal analysis device 200 can implement the EEG signal analysis method based on multi-scale EEG feature fusion of the above-mentioned method embodiment. The options in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of this application can refer to the contents of the above-mentioned method embodiment, and will not be repeated in this embodiment.

[0153] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.

[0154] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0155] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0156] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.

[0157] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0158] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.

[0159] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

[0160] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0161] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A method for analyzing EEG signals based on multi-scale EEG feature fusion, characterized in that: include: Acquire the original EEG signal to be analyzed, preprocess the original EEG signal data, and acquire the EEG target signal; According to the knowledge of brain region distribution of human brain, the EEG target signal is divided into a plurality of regions, each of the regions corresponds to a brain region, and each of the regions at least contains the EEG target signal corresponding to the brain region; Dividing the calculation unit corresponding to the pre-trained psychological state assessment model to obtain a plurality of calculation sub-units, each of the calculation sub-units corresponding to one of the regions; Determine a key brain region among the multiple brain regions, the region corresponding to the key brain region is the key region, and construct a first EEG feature sequence of the key region through the calculation subunit corresponding to the key region; perform short-time Fourier transform on the EEG target signal corresponding to the key region to obtain a time-frequency diagram corresponding to the key region; extract the time domain global features and frequency domain global features corresponding to the key region according to the time-frequency diagram; splice the time domain global features and the frequency domain global features to obtain the first EEG feature sequence; wherein, the first EEG feature sequence is extracted using a 256ms window length and a 128ms step length to obtain a finer time resolution within a fixed 256ms time scale; In the plurality of regions, obtaining edge local features corresponding to the key brain regions based on a local correlation analysis method, and optimizing weight parameters of the computing subunits corresponding to the key brain regions according to the edge local features; The sliding window time length and position of the calculation subunit corresponding to the key brain area are adjusted, and the second EEG feature sequence of the key brain area is constructed through the calculation subunit corresponding to the key brain area; wherein, the second EEG feature sequence is extracted using a sliding time window of 512ms and a step size of 256ms, and the EEG dynamic information of a longer time course is captured by a longer time window and a larger step size, which can better describe the slow evolution process of the EEG state; The first EEG feature sequence and the second EEG feature sequence are respectively input into the psychological state assessment model to obtain a first EEG state corresponding to the first EEG feature sequence and a second EEG state corresponding to the second EEG feature sequence, and the original EEG signal is analyzed according to the first EEG state and the second EEG state.

2. The method according to claim 1, characterized in that The obtaining of the original EEG signal to be analyzed comprises: Obtain stimulation type and intensity parameters corresponding to multiple cognitive stimulation tasks; Configuring acquisition parameters of a preset EEG acquisition device according to the stimulation type and intensity parameters; The original EEG signals of the user under the plurality of cognitive stimulation tasks are collected by the adjusted EEG collection device.

3. The method according to claim 1, characterized in that The EEG target signal includes a plurality of electrode measurement signals; and dividing the EEG target signal into a plurality of regions includes: Determine multiple brain regions and brain region position information corresponding to the brain regions according to the human brain region distribution knowledge; Acquire electrode position information of an EEG acquisition device corresponding to the EEG target signal; Determine the electrode corresponding to each brain region according to the brain region position information and the electrode position information corresponding to each brain region; The electrode measurement signals corresponding to each brain region and the electrode measurement signals within a preset range are used to construct the region corresponding to the brain region, thereby completing the construction of multiple regions.

4. The method according to claim 1, characterized in that: The mental state assessment model includes an input layer, multiple convolutional layers, at least one fully connected layer and an output layer, and the computing unit corresponds to multiple convolution kernels in the convolutional layer; the computing unit corresponding to the pre-trained mental state assessment model is divided to obtain multiple computing sub-units, including: Dividing the convolution kernels of the first convolution layer into the computing subunits corresponding to the prefrontal region, the parietal region, the midline region and the occipital region of the brain; Obtaining the size of a feature map output by the first convolutional layer, and dividing the convolution kernels of the second convolutional layer into the computing subunits corresponding to the plurality of brain regions according to the size of the feature map; A shared identifier is added to the convolution kernels of the remaining convolution layers so that each of the computing subunits can use the convolution kernel with the shared identifier.

5. The method according to claim 4, characterized in that Before determining the key brain region among the plurality of brain regions, the method further includes: Obtain a weight vector corresponding to the fully connected layer, and divide the weight vector into multiple sub-vectors; Each of the sub-vectors is connected to one of the computing sub-units.

6. The method according to claim 1, characterized in that The analyzing the original EEG signal according to the first EEG state and the second EEG state includes: Respectively obtain a first output score and a second output score corresponding to the first EEG state and the second EEG state; If both the first output score and the second output score are greater than a first preset threshold, it is determined that the user corresponding to the original EEG signal is in a continuous highly activated state; If both the first output score and the second output score are less than a second preset threshold, it is determined that the user is in a relatively resting or relaxing state; If the first output score is greater than the first preset threshold and the second output score is less than the second preset threshold, determining that the user is in a transition period of activating steering inhibition; If the first output score is less than the second preset threshold and the second output score is greater than the first preset threshold, it is determined that the user is in a transition period from rest to activation.

7. An electroencephalogram signal analysis device, characterized in that: include: A signal acquisition unit, used to acquire the original EEG signal to be analyzed, pre-process the original EEG signal data, and acquire the EEG target signal; A signal division unit, used for dividing the EEG target signal into a plurality of regions according to the knowledge of brain region distribution of human brain, each of the regions corresponds to a brain region, and each of the regions at least contains the EEG target signal corresponding to the brain region; A unit division unit, used for dividing the calculation unit corresponding to the pre-trained psychological state assessment model to obtain a plurality of calculation sub-units, each of which corresponds to one of the regions; A key determination unit is used to determine a key brain area among the multiple brain areas, the area corresponding to the key brain area is the key area, and a first EEG feature sequence of the key area is constructed by the calculation subunit corresponding to the key area; a short-time Fourier transform is performed on the EEG target signal corresponding to the key area to obtain a time-frequency diagram corresponding to the key area; a time-domain global feature and a frequency-domain global feature corresponding to the key area are extracted according to the time-frequency diagram; the time-domain global feature and the frequency-domain global feature are spliced ​​to obtain the first EEG feature sequence; wherein, the first EEG feature sequence is extracted using a 256ms window length and a 128ms step length to obtain a finer time resolution within a fixed 256ms time scale; A weight optimization unit, configured to obtain edge local features corresponding to the key brain region in the plurality of regions based on a local correlation analysis method, and optimize weight parameters of the calculation subunits corresponding to the key brain region according to the edge local features; A window adjustment unit is used to adjust the sliding window time length and position of the calculation subunit corresponding to the key brain area, and construct a second EEG feature sequence of the key brain area through the calculation subunit corresponding to the key brain area; wherein, a sliding time window of 512ms and a step size of 256ms are used to extract the second EEG feature sequence, and a longer time window and a larger step size are used to capture EEG dynamic information of a longer time course, which can better describe the slow evolution process of the EEG state; A signal analysis unit is used to input the first EEG feature sequence and the second EEG feature sequence into the psychological state assessment model respectively, obtain a first EEG state corresponding to the first EEG feature sequence and a second EEG state corresponding to the second EEG feature sequence, and complete the analysis of the original EEG signal according to the first EEG state and the second EEG state.

8. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the steps of the EEG signal analysis method based on multi-scale EEG feature fusion as described in any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the EEG signal analysis method based on multi-scale EEG feature fusion as described in any one of claims 1 to 6.