Electroencephalogram signal analysis method and system, electronic equipment and storage medium

By cleaning, enhancing and feature extraction of EEG signal data, and analyzing it with a trained model, the problem of insufficient data scale and quality in the existing technology is solved, and the accuracy and reliability of separating EEG signal analysis is improved.

CN120036797APending Publication Date: 2025-05-27BEIJING TIANTAN HOSPITAL AFFILIATED TO CAPITAL MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510088495.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

The prior art has problems in the analysis of separating EEG signal, which has insufficient data scale, unstable data quality and inability to capture the dependence of EEG signal, resulting in poor diagnostic results.

Method used

By collecting the original EEG signal data, cleaning and enhancing processing, the differential entropy characteristics and power spectral density characteristics of EEG signal are extracted, and spliced ​​into the final characteristics, and input into the trained model for analysis.

Benefits of technology

It improves the accuracy and reliability of EEG signal analysis, enhances the understanding of EEG activity patterns, and improves the early diagnosis and disease monitoring capabilities of spermatorrhea diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120036797A_ABST
    Figure CN120036797A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electroencephalogram signals, and discloses an electroencephalogram signal analysis method and system, electronic equipment and a storage medium. The method comprises the following steps: acquiring original electroencephalogram signal data; cleaning the original electroencephalogram signal data to obtain cleaned electroencephalogram signal data; performing enhancement processing on the cleaned electroencephalogram signal data; combining the enhanced electroencephalogram signal sample with the cleaned electroencephalogram signal to produce an electroencephalogram signal total data set, and performing frequency domain feature extraction on the electroencephalogram signal total data set; splicing the extracted electroencephalogram signal differential entropy features and the extracted power spectrum density features to obtain final electroencephalogram signal features; and inputting the final electroencephalogram signal characteristics into a trained electroencephalogram signal model to obtain a fine analysis result output by the electroencephalogram signal model. By means of the electroencephalogram signal analysis method and device, the accuracy and reliability of electroencephalogram signal analysis are improved, and a firmer data support and analysis basis is provided for brain science research and related clinical application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electroencephalogram (EEG) signals, and particularly to an EEG signal analysis method, system, electronic device, and storage medium. Background Art

[0002] The research on EEG signals of schizophrenia mainly focuses on analyzing EEG signals to identify and understand the characteristics of EEG activities of schizophrenia patients. In recent years, machine learning and deep learning technologies have been widely applied to the analysis of schizophrenia EEG signals, which is of great significance for understanding the physiological basis of schizophrenia.

[0003] The existing technology mainly records brain activities through electroencephalograms, and uses machine learning methods to extract and classify features for the research and diagnosis of schizophrenia. However, the existing technology has the following defects: 1. To train a machine learning model, a large amount of data is usually required. However, due to ethical and resource limitations, the relevant datasets are small, resulting in insufficient generalization ability of the schizophrenia EEG analysis system and poor performance on new datasets or patients. 2. The problem of data quality. During the process of EEG signal acquisition, physiological noise interference usually exists, resulting in unstable signal quality. 3. Traditional machine learning-based methods cannot capture the dependencies between EEG signals, and feature capture is insufficient. Summary of the Invention

[0004] In view of this, embodiments of the present disclosure provide an EEG signal analysis method, system, electronic device, and storage medium for the early diagnosis and disease monitoring of schizophrenia, and to make up for the deficiencies of traditional methods in dealing with data scale, data quality, and EEG signal dependencies.

[0005] In a first aspect, embodiments of the present disclosure provide an EEG signal analysis method, including:

[0006] Collecting original EEG signal data;

[0007] Performing cleaning processing on the original EEG signal data to obtain the cleaned EEG signal data;

[0008] Performing enhancement processing on the cleaned EEG signal data to obtain the enhanced EEG signal data;

[0009] Combining the enhanced EEG signal samples with the cleaned EEG signal to obtain a total EEG signal dataset, and performing frequency-domain feature extraction on the total EEG signal dataset. The extracted features include EEG signal differential entropy features and power spectral density features;

[0010] Concatenating the extracted EEG signal differential entropy features and power spectral density features to obtain the final EEG signal features;

[0011] Input the final EEG signal features into the trained EEG signal model to obtain the schizophrenia analysis result output by the EEG signal model.

[0012] According to a specific implementation manner of the embodiments of the present disclosure, the step of performing cleaning processing on the original EEG signal data to obtain the cleaned EEG signal data includes:

[0013] Use the independent component analysis method to separate the artifact signals of the original EEG signal data, identify and remove irrelevant components, and perform data cleaning on the collected EEG signals to obtain the cleaned EEG signal data.

[0014] According to a specific implementation manner of the embodiments of the present disclosure, using the independent component analysis method to separate the artifact signals of the original EEG signal data, identify and remove irrelevant components, includes:

[0015] Perform mean removal processing on the collected EEG signal data using formula (1):

[0016]

[0017] where x i is the EEG data of a certain channel in the collected data, μ is the average value of this channel, and N is the overall length of the data of this channel;

[0018] Calculate the covariance matrix after mean processing using formula (2):

[0019]

[0020] where X is the EEG data matrix after mean processing;

[0021] Perform decomposition on the data through the independent component analysis algorithm using formula (3) to obtain independent components:

[0022]

[0023] S 1 、S 2 、S 3 represent three independent components;

[0024] When the weight matrix is W, the cleaned and restored signal is:

[0025] X cleaned =W -1 .S reduced ;

[0026] S reduced is obtained by selecting the principal components to be retained in S.

[0027] According to a specific implementation manner of an embodiment of the present disclosure, the enhanced EEG signal samples are combined with the cleaned EEG signals to generate a total EEG signal dataset, and frequency-domain features are extracted from the total EEG signal dataset. The extracted features include EEG signal differential entropy features and power spectral density features, including:

[0028] Slice the initial EEG signals of different channels by time, and divide them into M EEG waveform signals with a length of t. Perform spectral separation on each time slice after slicing. The method of spectral separation is carried out using formula (4):

[0029]

[0030] where X(f) is the frequency-domain signal, x(n) is the discrete sample of the time-domain signal, and f is the corresponding frequency index;

[0031] Extract the EEG signal differential entropy features and power spectral density features of EEG signals in different time segments and different frequency bands. The EEG signal differential entropy features can be expressed as:

[0032]

[0033] where DE is the EEG signal differential entropy feature, x is a random variable, and p(x) is the probability density function related to x;

[0034] The power spectral density feature is:

[0035]

[0036] where I i (w) is the periodogram of the i-th segment, X i (n) represents the information of the i-th data segment, and M is the total number of segments;

[0037] U is a normalization factor:

[0038]

[0039] w(n) is a window function, m is the number of data in each segment, and X i (n) represents the information of the i-th data segment.

[0040] According to a specific implementation manner of an embodiment of the present disclosure, after collecting the original EEG signal data, the method further includes:

[0041] Analyze whether the original EEG signal data is complete;

[0042] In the case where the original EEG signal is missing, re-collect the EEG signal data;

[0043] When the original EEG signal data is complete, proceed to the step of cleaning the original EEG signal data to obtain the cleaned EEG signal data.

[0044] According to a specific implementation manner of an embodiment of the present disclosure, the method further includes:

[0045] Input the schizophrenia analysis result into the large model system;

[0046] Receive the diagnostic suggestions output by the large model system according to the schizophrenia analysis result.

[0047] In a second aspect, an embodiment of the present disclosure provides an EEG signal analysis system, including:

[0048] A data acquisition module for acquiring original EEG signal data;

[0049] A data cleaning module for cleaning the original EEG signal data to obtain the cleaned EEG signal data;

[0050] A data enhancement module for enhancing the cleaned EEG signal data to obtain the enhanced EEG signal data;

[0051] A feature extraction module for combining the enhanced EEG signal samples with the cleaned EEG signal to generate a total EEG signal dataset, and extracting frequency domain features from the total EEG signal dataset, where the extracted features include EEG signal differential entropy features and power spectral density features;

[0052] A feature splicing module for splicing the extracted EEG signal differential entropy features and power spectral density features to obtain the final EEG signal features;

[0053] An analysis module for inputting the final EEG signal features into a trained EEG signal model to obtain the schizophrenia analysis result output by the EEG signal model.

[0054] In a third aspect, an embodiment of the present disclosure further provides an electronic device, which includes:

[0055] At least one processor; and,

[0056] A memory communicatively connected to the at least one processor; wherein,

[0057] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the EEG signal analysis method in the foregoing first aspect or any implementation manner of the first aspect.

[0058] Fourthly, an embodiment of the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the electroencephalogram signal analysis method in the foregoing first aspect or any implementation manner of the first aspect.

[0059] Fifthly, an embodiment of the present disclosure also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to execute the electroencephalogram signal analysis method in the foregoing first aspect or any implementation manner of the first aspect.

[0060] The electroencephalogram signal analysis method in the embodiments of the present disclosure includes collecting original electroencephalogram signal data; cleaning the original electroencephalogram signal data to obtain the cleaned electroencephalogram signal data; enhancing the cleaned electroencephalogram signal data to obtain the enhanced electroencephalogram signal data; combining the enhanced electroencephalogram signal samples with the cleaned electroencephalogram signals to generate a total electroencephalogram signal dataset, and extracting frequency-domain features from the total electroencephalogram signal dataset. The extracted features include differential entropy features and power spectral density features of the electroencephalogram signals; splicing the extracted differential entropy features and power spectral density features of the electroencephalogram signals to obtain the final electroencephalogram signal features; inputting the final electroencephalogram signal features into a trained electroencephalogram signal model to obtain the schizophrenia analysis result output by the electroencephalogram signal model. Through the solution of the present disclosure, the accuracy and reliability of electroencephalogram signal analysis are improved, providing a more solid data support and analysis basis for brain science research and related clinical applications. Description of the Drawings

[0061] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following will briefly introduce the drawings required for the embodiments. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0062] Figure 1 Schematic flowchart of an electroencephalogram signal analysis method provided by an embodiment of the present disclosure;

[0063] Figure 2 Electroencephalogram signal analysis model diagram implemented by the present disclosure;

[0064] Figure 3 Schematic diagram of an electronic device provided by an embodiment of the present disclosure. Detailed Embodiments

[0065] The following will describe the embodiments of the present disclosure in detail with reference to the drawings.

[0066] The following describes the embodiments of the present disclosure through specific specific examples. Those skilled in the art can easily understand the other advantages and effects of the present disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The present disclosure can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts belong to the scope of protection of the present disclosure.

[0067] It should be noted that the following describes various aspects of the embodiments within the scope of the appended claims. It should be obvious that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is illustrative only. Based on the present disclosure, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects described herein can be used to implement the device and / or practice the method. In addition, this device and / or practice this method can be implemented using other structures and / or functions in addition to one or more of the aspects described herein.

[0068] It should also be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present disclosure in a schematic manner. The drawings only show the components related to the present disclosure, rather than being drawn according to the number, shape and size of the components in actual implementation. The type, quantity and proportion of each component in its actual implementation can be an arbitrary change, and the component layout type may also be more complex.

[0069] In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.

[0070] An embodiment of the present disclosure provides a method for analyzing electroencephalogram signals. The message sending method provided in this embodiment can be executed by a computing device, which can be implemented as software, or implemented as a combination of software and hardware. The computing device can be integrally provided in a server, a terminal device, etc.

[0071] See Figure 1 , a method for analyzing electroencephalogram signals provided by an embodiment of the present disclosure, includes:

[0072] Step 10, collecting original electroencephalogram signal data.

[0073] In the embodiments of the present invention, electroencephalogram (EEG) signals of 200 healthy individuals and 200 schizophrenia patients are collected; a wireless EEG acquisition device with a high sampling rate and excellent anti-interference ability is used; the subjects receive specific visual stimuli, such as flashing lights, grid patterns, etc. in a quiet, comfortable, moderately lit, and temperature-appropriate environment; specifically, the following method can be used for operation:

[0074] Determine the experimental purpose and protocol design: clarify the specific research objectives for collecting EEG signal data, such as exploring the brain nerve activity patterns under specific cognitive tasks, or evaluating the impact of a certain disease state on EEG characteristics, etc. According to the experimental purpose, carefully design a detailed experimental protocol, and determine the variables, stimulus types, experimental procedures, and selection criteria for the subjects, etc.

[0075] Subject recruitment and screening: recruit suitable subjects through various channels according to the established selection criteria. Before the subjects participate in the experiment, conduct a comprehensive health status assessment and relevant background information investigation to exclude factors that may affect the accuracy of EEG signal acquisition, such as having a neurological disease, taking specific medications recently, or having a history of head trauma, etc.

[0076] Preparation of EEG acquisition equipment:

[0077] Select a suitable EEG acquisition device, such as a professional electroencephalograph (EEG). Ensure that the device has good performance, has been calibrated and maintained, and all electrode channels are working properly without obvious noise interference.

[0078] According to the experimental requirements, prepare the corresponding electrode cap or electrode patches. The size of the electrode cap should match the head size of the subject, and the electrode patches need to have good conductivity and stability. Clean and disinfect the electrode cap or electrode patches to ensure the safety and hygiene of the subjects. Connect and check the data transmission line between the EEG acquisition device and the computer to ensure that the data can be stably and quickly transmitted to the computer for storage and subsequent analysis.

[0079] Experimental environment layout: create a quiet, comfortable, appropriately lit, and less electromagnetic interference experimental environment. Place the EEG acquisition device on a stable workbench, adjust the height and position of the subject's seat so that the subject can remain relaxed and the head is relatively fixed during the experiment. Set up necessary shielding facilities, such as shielding nets or shielding rooms, in the laboratory to reduce the interference of external electromagnetic fields on EEG signals.

[0080] Electrode placement and connection stage:

[0081] Scalp cleaning and preprocessing: Let the subject sit on the prepared seat, and carefully clean the subject's scalp with a mild cleanser and clean water to remove the oil, dirt and cutin layer on the scalp surface, reduce the skin resistance and improve the acquisition quality of EEG signals. After cleaning, gently dry the scalp with a clean towel.

[0082] Determination of electrode placement positions: According to the international standard 10-20 electrode placement system or the electrode layout scheme required by a specific experiment, accurately mark the placement positions of each electrode on the subject's scalp. These positions usually correspond to specific brain regions of the brain, which helps to accurately analyze the electrical activity of different brain regions.

[0083] Electrode installation and connection: Carefully wear the electrode cap or electrode patches on the subject's head according to the marked positions, ensuring that each electrode is in close contact with the scalp without looseness or deviation. For the electrode cap, adjust the tightness of the cap strap so that it can fix the electrodes without causing excessive discomfort to the subject. During the installation of the electrodes, appropriately apply conductive paste or physiological saline to the contact area between the electrodes and the scalp to further reduce the resistance and enhance the signal conduction effect. Connect the wires of the electrodes to the EEG acquisition device, and according to the requirements of the device instruction manual, ensure that the wire connections are correct and firm, and avoid problems such as poor contact or short circuit.

[0084] Signal acquisition stage:

[0085] Device parameter setting: Turn on the EEG acquisition device and the computer, and enter the data acquisition software interface. Set appropriate acquisition parameters according to the experimental requirements, including sampling frequency (such as 250Hz, 500Hz or higher), resolution (such as 16 bits or 24 bits), amplifier gain, filter settings (such as setting a low-pass filter to remove high-frequency noise and a high-pass filter to remove DC drift and low-frequency interference), etc. When setting the parameters, it is necessary to comprehensively consider the experimental purpose, the frequency range of the EEG signals and the performance characteristics of the device to obtain high-quality raw EEG signal data that accurately reflects the brain nerve activities.

[0086] Baseline acquisition and calibration: Before officially starting the experimental data acquisition, first perform a period of baseline data acquisition. Let the subject be in a quiet, relaxed and eyes-closed state, and continuously acquire EEG signals for a certain period of time (such as 1-2 minutes) as baseline data. By analyzing the baseline data, the stability of the EEG acquisition device and the basic level of the subject's EEG signals can be evaluated, and at the same time, necessary calibration and adjustment of the device can be carried out to ensure that the acquired signals are true, reliable and without obvious abnormal fluctuations or noise interference.

[0087] Experimental task execution and data synchronous acquisition: According to the experimental protocol, corresponding stimuli are presented to the subjects or the subjects are guided to perform specific cognitive tasks or behavioral operations, such as viewing pictures, listening to sounds, performing motor tasks, etc. During the process of the subjects performing the tasks, the electroencephalogram (EEG) acquisition device synchronously acquires the raw EEG signal data generated by the brain and transmits the data to the computer for storage in real time. During the acquisition process, closely monitor the operation status of the device and the reactions of the subjects to ensure the continuity and integrity of data acquisition. If device failures or abnormal reactions of the subjects are found, the acquisition should be paused in a timely manner and corresponding measures should be taken.

[0088] Data storage and labeling: The acquired raw EEG signal data is stored in the computer hard disk in a specific file format (such as.edf,.mat, etc.), and at the same time, the data is labeled according to the occurrence order and type of experimental events. For example, label the start time, end time, and type of the presented stimulus, as well as the reaction time and reaction type of the subject, etc., so that relevant EEG signal segments related to experimental events can be accurately extracted and analyzed during the subsequent data analysis stage, and the relationship between brain neural activities and experimental tasks or stimuli can be explored in depth.

[0089] Through the above detailed and comprehensive steps, the raw EEG signal data can be collected more systematically and accurately.

[0090] Step 20, perform cleaning processing on the raw EEG signal data to obtain the cleaned EEG signal data

[0091] Before performing cleaning processing on the data, the following steps are also required:

[0092] Data reading: Use professional EEG signal processing software (such as EEGLAB, FieldTrip, etc.) to import the raw EEG signal data file stored in the computer hard disk into the processing environment. Ensure that the data file format is compatible with the selected software and correctly identify the various parameters of the data, including the sampling frequency, the number of electrode channels, the data resolution, etc.

[0093] Data integrity verification: Conduct an integrity check on the imported data to confirm whether there are missing segments or abnormal interruptions in the data. Check whether the length of the time series of the data meets the expectations, and whether the data of each electrode channel is completely acquired and stored. If missing or damaged data is found, it is necessary to evaluate its impact on subsequent analysis and consider whether to take measures such as data repair or excluding some data.

[0094] Removing DC drift: Due to factors such as EEG acquisition equipment or the physical state of the subject, the original EEG signal may exhibit DC drift, manifested as the overall signal slowly deviating from the baseline. A high-pass filter (such as a cut-off frequency of 0.1 Hz - 1 Hz) is used to remove this DC component, restoring the baseline of the EEG signal to stability for clearer observation and analysis of signal fluctuations.

[0095] Filtering out noise interference: Filtering out low-frequency noise: Electrical equipment in the environment and physiological activities of the human body (such as heartbeat, breathing, etc.) may introduce low-frequency noise into the EEG signal. A low-pass filter (usually set with a cut-off frequency between 30 Hz - 50 Hz, depending on the experimental purpose and the frequency band of interest in the EEG signal) is used to remove this low-frequency noise interference, retaining the frequency components that mainly reflect brain nerve activities.

[0096] Filtering out high-frequency noise: High-frequency noise may come from electromagnetic radiation, spikes caused by poor electrode-to-scalp contact, etc. A high-pass filter (such as a cut-off frequency of 50 Hz - 100 Hz) is set to filter out high-frequency noise, improving the signal-to-noise ratio of the EEG signal. When performing filtering operations, it is necessary to carefully select the type of filter (such as Butterworth filter, Chebyshev filter, etc.) and parameters to avoid excessive distortion or attenuation of the effective components of the EEG signal.

[0097] Identifying bad channels: Check the data quality of each electrode channel and identify bad channels with obvious abnormalities. Abnormal situations may include continuously too large or too small signal amplitudes, frequent spike pulses in the signal, severely distorted signal waveforms, etc. Determine the location and number of bad channels by visually observing the EEG waveforms of each channel, calculating statistical features of the signal (such as mean, variance, peak-to-peak value, etc.), and comparing with other normal channels.

[0098] Formulating bad channel repair strategies: Formulate corresponding repair strategies according to the specific conditions of bad channels. For some slightly abnormal channels, an interpolation repair method is used, using data from adjacent normal channels to estimate the signal values of bad channels. For example, linear interpolation, spline interpolation, or an interpolation algorithm based on principal component analysis (PCA) is used to calculate reasonable interpolation results based on the data relationship of electrode channels around the bad channel to replace the bad channel data. For channels that are severely damaged and cannot be repaired, if their impact on the overall experimental analysis is small, the data of this channel can be directly removed; if this channel is crucial to the research area, it may be necessary to re-collect the data of this channel or adjust the experimental design.

[0099] Electrooculogram (EOG) Component Analysis: In electroencephalogram (EEG) signals, EOG artifacts are common interference sources, mainly originating from the electrical activities generated by eye movements (such as blinking, saccades, etc.). By performing time-domain and frequency-domain analyses on the original EEG signals, the characteristic components related to EOG are identified. In the time domain, blinking usually appears as sharp pulses with large amplitudes and short durations; saccades present relatively smooth waveform changes. In the frequency domain, EOG signals are mainly concentrated in the lower frequency range (generally below 10 Hz).

[0100] Methods for Removing EOG Artifacts:

[0101] Independent Component Analysis (ICA): ICA assumes that EEG signals are composed of multiple independent source signals mixed together. By decomposing the mixed signals, they are separated into independent components. Then, according to the characteristics of EOG artifacts in the components (such as specific time-domain waveforms, frequency-domain distributions, and correlations with eye movements), the components containing EOG artifacts are identified and removed, thereby obtaining relatively pure EEG signals.

[0102] Regression Analysis Method: A regression model is established between EOG signals and EEG signals, with EOG signals as the independent variable and EEG signals as the dependent variable. Through regression analysis, the influence coefficient of EOG signals on EEG signals is calculated, and then the estimated value of the EOG artifact component is subtracted from the EEG signals to achieve the removal of EOG artifacts. When applying the regression analysis method, it is necessary to accurately synchronously collect EOG signals as a reference to establish a reliable regression model.

[0103] In the embodiments of this method, the independent component analysis method is used to remove EOG artifacts.

[0104] Reference Electrode Selection: The original EEG signals are usually collected with a specific electrode (such as the average potential of bilateral mastoids, the Cz electrode on the top of the head, etc.) as the reference electrode. However, different reference electrode selections may affect the distribution and characteristics of EEG signals. According to the experimental purpose and research requirements, a suitable reference electrode or reference scheme is reselected. For example, average reference can be selected, that is, the average value of the potentials of all electrodes is used as the reference potential, which can make the distribution of EEG signals on the scalp surface more symmetrical and intuitive; or an electrode in a specific brain region can be selected as a local reference to highlight the electrical activity changes in this brain region relative to other regions.

[0105] Data Conversion: According to the selected new reference electrode or reference scheme, the original EEG signal data is recalculated and converted. By subtracting the potential value of the reference electrode, the reference point of the EEG signal is adjusted to a new position, thereby obtaining the processed data based on the new reference. When performing data rereferencing, attention should be paid to the accuracy and consistency of the data to avoid data distortion or deviation caused by errors in the reference conversion process.

[0106] Determination of data segmentation basis: According to the experimental design and research questions, determine the basis for data segmentation. For example, if the experiment is to study the EEG response under specific stimuli, then based on the time point when the stimulus is presented, the EEG signal is divided into different time periods such as before and after the stimulus. The length of each time period should be determined according to the response characteristics of the EEG signal and the time range of experimental concern, generally ranging from a few hundred milliseconds to several seconds.

[0107] Data segmentation operation: Use data processing software to perform precise segmentation processing on the EEG signal according to the determined segmentation basis. Cut the continuous EEG signal data into individual independent segments, and each segment corresponds to a specific experimental event or time window. During the segmentation process, it is necessary to ensure the accuracy and consistency of segmentation to avoid data overlap or omission.

[0108] Mark synchronization update: Synchronize and update the marker information of the experimental events during the previous data acquisition stage to the segmented EEG signal data. Ensure that each data segment is correctly associated with the corresponding experimental event markers, such as stimulus type, subject response, etc. information. In this way, during subsequent data analysis, statistical analysis, spectral analysis, time-frequency analysis, etc. operations can be conveniently performed on the EEG signal segments under different experimental conditions to deeply explore the relationship between brain nerve activities and experimental variables.

[0109] After the above series of data processing steps, the original EEG signal data is converted into processed EEG signal data, and these data have been significantly improved in terms of quality, accuracy, and usability, providing a reliable data basis for further EEG signal analysis, brain function research, and applications in related fields.

[0110] Step 30, perform enhancement processing on the cleaned EEG signal data to obtain enhanced EEG signal data;

[0111] First, organize and classify the cleaned EEG signal data to ensure that the data format is standardized and unified for subsequent enhancement operations. At the same time, according to the objectives of this analysis and research and the expected enhancement effects to be achieved, select appropriate EEG signal enhancement algorithms and related tool software. Common enhancement algorithms include, but are not limited to, wavelet transform enhancement method, generative adversarial network (GAN) enhancement method based on deep learning, etc., and the corresponding tool software should be able to accurately support the operation of these algorithms and have good stability and compatibility.

[0112] In the embodiment of the present invention, the wavelet transform enhancement method is taken as an example: When using the wavelet transform enhancement method, it is necessary to first determine an appropriate wavelet basis function. According to the characteristics of the EEG signal data, such as factors such as the frequency distribution range of the signal and the noise characteristics, select appropriate wavelets such as Haar wavelet, Daubechies wavelet, etc.

[0113] The wavelet decomposition is performed on the cleaned EEG signal data, and it is decomposed into low-frequency approximation components and high-frequency detail components according to different scales and wavelet coefficients. During this process, the information contained in each component is carefully analyzed to distinguish useful signal features and residual noise components. For the high-frequency detail components, threshold processing means are used. By setting a reasonable threshold (which can be in the form of a soft threshold or a hard threshold), the coefficients with amplitudes lower than the threshold are regarded as noise and suppressed accordingly, while the coefficients with larger amplitudes representing the effective EEG signal features are retained. Then, the processed high-frequency detail components and low-frequency approximation components are used for wavelet reconstruction, thereby realizing the enhancement of the EEG signal data. On the basis of retaining the original effective features, the noise of the enhanced signal is further weakened.

[0114] In addition, the generative adversarial network (GAN) enhancement method based on deep learning can also be used to enhance the cleaned EEG signal data. In this scheme, the cleaned data is used as the training data of the generative adversarial network, and Time-series GAN is used as the generative adversarial network model.

[0115] The loss function of the discriminator D is:

[0116]

[0117] The loss function of the generator G is:

[0118]

[0119] Among them, G(z) is the output of the generator, z is the input random noise, D(x) is the output of the discriminator, and the symbol E represents the expected value.

[0120] After the training is completed, the generator is used to generate new EEG signal samples, and the generated EEG signal samples are combined with the original cleaned EEG signals to form a richer total data set.

[0121] Specifically, when using GAN for enhancement, a suitable GAN network model structure needs to be constructed first. Determine the specific number of layers, the number of neurons, and the activation function and other parameter settings of the generator and the discriminator to ensure that it can adapt to the dimension and complexity of the EEG signal data. For example, the generator can adopt a multi-layer fully connected network or a convolutional neural network structure to gradually generate enhanced signals similar to real EEG signals; the discriminator is used to accurately distinguish real EEG signals and the signals generated by the generator, and is continuously optimized through adversarial training between the two.

[0122] Divide the cleaned EEG signal data into a training set, a validation set, and a test set, and allocate them according to an appropriate ratio to provide data support for the training of the GAN model. Use the training set data to repeatedly train the constructed GAN model. During the training process, according to the change of the loss function, continuously adjust the network parameters so that the generator can generate enhanced data with higher quality and more in line with the characteristics of real EEG signals.

[0123] After multiple rounds of training until the model converges to a stable state, use the test set data to verify the effect of the trained GAN model. If the verification result meets the pre-set enhancement effect indicators, the cleaned EEG signal data can be input into the trained generator, and the generator outputs the enhanced EEG signal data.

[0124] Step 40, combine the enhanced EEG signal samples with the cleaned EEG signals to produce a total EEG signal dataset, and extract the frequency domain features of the total EEG signal dataset. The extracted features include the differential entropy feature and the power spectral density feature of the EEG signal;

[0125] The specific method includes:

[0126] Slice the initial EEG signals of different channels by time, and divide them into M EEG waveform signals with a length of t. Perform spectral separation on each time slice after slicing. The method of spectral separation is carried out using formula (4):

[0127]

[0128] Among them, X(f) is the frequency domain signal, x(n) is the discrete sample of the time domain signal, and f is the corresponding frequency index;

[0129] Extract the differential entropy feature and the power spectral density feature of the EEG signal for different time segments and different frequency bands. The differential entropy feature of the EEG signal can be expressed as:

[0130]

[0131] Among them, DE is the differential entropy feature of the EEG signal, x is a random variable, and p(x) is the probability density function related to x.

[0132] The power spectral density feature can be expressed as:

[0133]

[0134] Among them, I i (w) is the periodogram of the i-th segment, X i (n) represents the information of the i-th data segment, M is the total number of segments, and U is the normalization factor, which can be expressed as:

[0135]

[0136] Let \(w(n)\) be the window function, \(m\) be the number of data in each segment, and \(X i (n) represents the information of the \(i\)-th data segment.

[0137] Step 50: Concatenate the extracted differential entropy features and power spectral density features of the EEG signals to obtain the final EEG signal features;

[0138] The concatenation method of the differential entropy features and power spectral density features of the EEG signals includes:

[0139] Feature data inspection and verification: First, conduct a comprehensive and detailed inspection of the already extracted differential entropy features and power spectral density feature data of the EEG signals. Verify the data integrity of both, ensure that the differential entropy feature values and power spectral density feature values corresponding to each EEG signal are accurate and there are no problems such as data missing or outliers. At the same time, check whether the data dimensions of the two match, that is, the number of each group of differential entropy features and the corresponding number of power spectral density features should be logically corresponding. For example, if the differential entropy feature is a single value calculated for each EEG signal, and the power spectral density feature is a group of values at multiple different frequency points for the same EEG signal, then clarify this corresponding relationship between the two to lay the foundation for subsequent concatenation operations.

[0140] Data format unification: Since there may be differences in data storage formats, data types, etc. between the differential entropy features and power spectral density features, format unification processing is required. If the differential entropy features are stored in the form of a list in Python, and the power spectral density features are stored in the form of a NumPy array, then according to the convenience of subsequent concatenation operations and subsequent use, choose to convert both to the same data structure, such as converting them all to the form of a NumPy array. And ensure the consistency of data types, such as uniformly converting the feature values to appropriate floating-point data types (such as single-precision floating-point type or double-precision floating-point type, etc.) to avoid errors during concatenation or subsequent processing due to inconsistent data types.

[0141] Determine the concatenation method: Determine the specific concatenation method according to the actual application scenario and the subsequent usage requirements of the final EEG signal features. The common concatenation methods are column-wise concatenation and row-wise concatenation.

[0142] Column-wise concatenation: If you want to expand the differential entropy features and power spectral density features in the feature dimension, that is, take the differential entropy features corresponding to each EEG signal as a new feature column and add it next to the power spectral density feature matrix to form a wider feature matrix. In this case, the column-wise concatenation method is selected. For example, if the dimension of the power spectral density feature matrix is [m, n], and the differential entropy feature is a one-dimensional array of length m, after column-wise concatenation, the dimension of the final obtained feature matrix will become [m, n+1], and the newly added column is the corresponding differential entropy feature value.

[0143] Row-wise concatenation: When you prefer to arrange the differential entropy features and power spectral density features as two different parts in sequence to form a longer feature vector to represent each EEG signal, the row-wise concatenation method can be used. For example, if the power spectral density feature is a [m, n] matrix, first perform a dimension transformation (such as through the reshape operation in Python, etc.) to make it a one-dimensional vector with m*n elements. Similarly, process the one-dimensional array of differential entropy features with length m, and then concatenate the two together in sequence. Finally, for each EEG signal, a one-dimensional feature vector with length m + n will be obtained, and the combination of these feature vectors of all EEG signals constitutes the final EEG signal feature representation form.

[0144] Using tools for concatenation operations: After determining the concatenation method, select a suitable programming tool or software library to implement the specific concatenation operation. In the Python environment, if column-wise concatenation is used and the feature data has been converted into the form of NumPy arrays, the numpy.concatenate function can be directly used. By specifying the concatenation axis parameter (such as axis = 1 for column-wise concatenation), the concatenation of the differential entropy features and power spectral density features can be achieved. If it is row-wise concatenation, set the concatenation axis parameter to axis = 0. For other programming languages or data processing platforms, there are also corresponding array and matrix operation functions or methods to complete similar concatenation tasks. For example, in MATLAB, the cat function can be used to perform data concatenation operations according to the specified dimension.

[0145] Verification of concatenation results: After completing the concatenation operation, it is necessary to verify the final EEG signal features obtained to ensure the accuracy of the concatenation. You can randomly select several EEG signals and check whether the concatenated feature values conform to the expected logical relationships. For example, after column-wise concatenation, whether the differential entropy feature values at the corresponding positions in the new feature matrix are consistent with the differential entropy features of the original extracted EEG signal, and whether the power spectral density feature values also remain unchanged and are in the correct order. At the same time, check again from the perspectives of the dimension and data type of the overall data to ensure that the concatenated feature data meets the requirements of subsequent analysis, modeling, and other applications.

[0146] Feature sorting and annotation: For more convenient interpretation and use of the final EEG signal features in the future, appropriate sorting and annotation work can be carried out. For example, add corresponding name annotations to the newly added feature columns or elements in the feature vectors after splicing, clearly indicating which parts correspond to differential entropy features, which parts correspond to power spectral density features, and the frequency meanings represented by each specific feature, etc., so as to facilitate quick and accurate understanding and application of these feature data in subsequent data analysis, machine learning model training and other processes.

[0147] Through the above complete steps, the differential entropy features and power spectral density features of EEG signals can be successfully spliced to obtain the final EEG signal features, providing a suitable data basis for subsequent further research, application and other work.

[0148] Step 60: Input the final EEG signal features into the trained EEG signal model to obtain the schizophrenia analysis result output by the EEG signal model.

[0149] Finally, input the obtained EEG signal features into the trained EEG signal model, and analyze the EEG signal features through the EEG signal model to obtain the analysis result.

[0150] Adopting the solution of the embodiment of the present invention, by collecting the original electroencephalogram (EEG) signal data; cleaning the original EEG signal data to obtain the cleaned EEG signal data; enhancing the cleaned EEG signal data to obtain the enhanced EEG signal data; combining the enhanced EEG signal samples with the cleaned EEG signal to produce the total EEG signal dataset, performing frequency-domain feature extraction on the total EEG signal dataset, and the extracted features include the differential entropy feature and power spectral density feature of the EEG signal; splicing the extracted differential entropy feature and power spectral density feature of the EEG signal to obtain the final EEG signal feature; inputting the final EEG signal feature into the trained EEG signal model to obtain the schizophrenia analysis result output by the EEG signal model. Through the solution of the present disclosure, the accuracy and reliability of EEG signal analysis are improved, providing a more solid data support and analysis basis for brain science research and related clinical applications. In the medical field, it can assist doctors in diagnosing brain diseases more accurately, such as early screening and condition monitoring of diseases such as epilepsy and brain tumors. For neuroscience research, these high-quality EEG signal features contribute to in-depth exploration of the neural activity mechanism of the brain and reveal the mysteries of the brain under different cognitive tasks and emotional states. At the same time, the data processing flow adopted by this solution also provides a useful reference example for the subsequent development of more advanced EEG signal analysis algorithms, which is conducive to continuous innovation and breakthrough in the entire EEG signal research field, further expanding the application scope and depth of EEG signals in the interdisciplinary field, promoting the deep integration and collaborative development of brain science with disciplines such as computer science and medical engineering, and thus benefiting human society at a broader level.

[0151] Based on the method of the above embodiment, in another embodiment, the step of using independent component analysis to separate the artifact signal of the original EEG signal data, identify and remove irrelevant components, and perform data cleaning on the collected EEG signal includes:

[0152] Performing de-mean processing on the collected EEG signal data using formula (1):

[0153]

[0154] where x i is the EEG data of a certain channel in the collected data, μ is the average value of this channel, and N is the overall length of the data of this channel;

[0155] Calculating the covariance matrix after the mean processing using formula (2):

[0156]

[0157] where X is the EEG data matrix after the mean processing;

[0158] The data is decomposed by the independent component analysis algorithm using formula (3) to obtain independent components:

[0159]

[0160] where S 1 , S 2 , S 3 represent three independent components.

[0161] When the weight matrix is W, the signal after cleaning and restoration is:

[0162] X cleaned = W -1 .S reduced

[0163] S reduced Obtained by selecting the principal components to be retained in S.

[0164] The electroencephalogram signal analysis model is as Figure 2 shown, and this network consists of the following main parts:

[0165] 1. Input features: Concatenated feature vectors from multiple electroencephalogram channels.

[0166] Since Transformer does not have information on sequence order, positional encoding PE is used to inject positional information:

[0167]

[0168] After adding positional encoding, the input is adjusted to:

[0169] X′ = X + PE

[0170] where pos represents the position of the word or feature in the sequence, d represents the total dimension of the feature, and i represents the index of the feature dimension.

[0171] 2. Transformer layer: A self-attention network used to process input features.

[0172] The Transformer layer can customize parameters such as the depth of the Transformer layer, the number of heads in the multi-head attention mechanism, the size of the feed-forward neural network, and the dropout rate for regularization. The calculation formula of the self-attention mechanism is as follows:

[0173]

[0174] The feature matrix X′ is transformed through the weight matrix to obtain Q, K, and V, and then the attention output is calculated through Q, K, and V. d k is the vector dimension of the key value k. The attention scores are converted into a probability distribution through the softmax activation.

[0175] 3. Random Masked Pre-training: Train the Transformer by masking the features of the input.

[0176] Perform random masking on the input features. Let the masking matrix be P. When a certain feature is masked, set the corresponding position to 0, and if it is not masked, set it to 1. The masking operation is as follows:

[0177] X masked = X' ⊙ P

[0178] where X' represents the feature vector after adding the positional encoding PE, and ⊙ represents element-wise multiplication.

[0179] The goal of the pre-training task is to predict the true value of the masked feature. Define the loss function as the mean squared error:

[0180]

[0181] where y is the true feature, y' is the feature predicted by the model, |P| is the total number of zero elements in the mask, and P i,j represents the masking value at position i, j.

[0182] 4. MLP Layer: That is, the multi-layer perceptron, which converts the output of the Transformer into a classification result

[0183] Use the features generated by the pre-trained Transformer to obtain a fixed-size feature representation through the fully connected layer and the pooling operation. The depth of the MLP fully connected layer in this solution can be customized. The ReLU activation function is used, and the softmax activation function is used in the last layer. The pooling operation adopted in this solution is average pooling:

[0184] Z pool = AveragePooling(Z)

[0185] AveragePooling represents average pooling. Input the features after the pooling operation into the MLP for classification, calculate the cross-entropy loss, and further update the weights of the MLP layer. The loss function of the multi-layer perceptron layer is defined as:

[0186]

[0187] where C is the number of classes, y c is the true label, and y' c is the predicted label.

[0188] The relevant diagnosis of the fine-grained disease can be carried out through the output of the multi-layer perceptron.

[0189] In addition, an embodiment of the present invention also discloses another method, which further includes:

[0190] Input the schizophrenia analysis result into the large model system;

[0191] Receive the diagnostic suggestions output by the large model system according to the schizophrenia analysis result.

[0192] The specific method includes: 1. Collect data: Collect clinical guidelines, treatment plans, case studies related to mental illnesses, use a vector database to process the collected data, and convert it into a retrievable format to build a knowledge base.

[0193] 2. Integrate the LangChain and LLAMA models: Create a LangChain application, and use its Retrieval Chain function to be responsible for managing input queries and initiating retrieval requests to the knowledge base.

[0194] 3. Combine retrieval and generation: After retrieving relevant documents, use these documents as context inputs and pass them to the LLAMA model for reasoning and generation. Use the LLAMA model to understand the context information and generate personalized treatment plans and recommendations. And feedback the user feedback and the generated suggestions to the model to further optimize the generation process and make the generated treatment plan more suitable for the actual situation of relevant personnel.

[0195] An embodiment of the present invention provides a method and system for electroencephalogram (EEG) signal analysis, including steps such as data acquisition and cleaning, frequency-domain feature extraction, EEG analysis model establishment and training, and large model interface. In the data acquisition and cleaning step, a wireless EEG acquisition device with a high sampling rate and excellent anti-interference ability is used to collect EEG data from relevant personnel, and the collected data is processed for data cleaning and data augmentation, solving the problem of a small EEG signal dataset due to ethical and resource limitations; in the frequency-domain feature extraction step, frequency-domain features are extracted from the data after data cleaning and data augmentation. Based on the segmentation of the time-domain EEG signals, differential entropy (DE) features and power spectral density (PSD) features of the schizophrenia EEG signals are extracted, and the relevant features are concatenated to more effectively distinguish different EEG activity patterns, thereby improving the accuracy of the model; in the EEG analysis model establishment and training step, a network model for EEG analysis is determined based on Transformer and multi-layer perceptron. The EEG analysis model is divided into two stages: pre-training and application training, and positional encoding is added to the model feature layer to improve the model's ability to capture hidden dependencies between EEG signals; finally, the Lamma large model is combined with treatment plans related to mental illnesses in the form of RAG using LangChain to expand the schizophrenia-related knowledge of the large model, and the user feedback and generated suggestions are fed back to the model to further optimize the generation process of the Lamma large model, enabling the large model to generate personalized suggestions that meet the user's needs, improving user satisfaction, and reducing treatment costs.

[0196] The present invention uses the ICA algorithm and generative adversarial network to process the collected EEG signal data for data cleaning and data augmentation, solving the problem of physiological signal interference in the EEG signal acquisition process and making up for the shortcoming of a small EEG signal dataset due to ethical and resource limitations;

[0197] Based on the segmentation of the time-domain EEG signals, the present invention extracts differential entropy features and power spectral density features of the schizophrenia EEG signals, and concatenates the relevant features to more comprehensively describe the characteristics of EEG signals and more effectively distinguish different EEG activity patterns;

[0198] The EEG analysis model of the present invention is based on Transformer and multi-layer perceptron. The EEG analysis model is divided into two stages: pre-training and application training, and positional encoding is added to the model feature layer to enhance the model's understanding of the statistical characteristics and potential relationships of signals and improve the generalization ability of the model;

[0199] The present invention combines the Lamma large model with treatment plans related to mental illnesses in a RAG manner, expands the knowledge related to schizophrenia for the large model, improves user satisfaction, and reduces the diagnosis and treatment costs of related diseases.

[0200] Corresponding to the above method embodiments, the present disclosure embodiments also provide an electroencephalogram (EEG) signal analysis system, including:

[0201] A data acquisition module for acquiring raw EEG signal data;

[0202] A data cleaning module for cleaning the raw EEG signal data to obtain the cleaned EEG signal data;

[0203] A data enhancement module for enhancing the cleaned EEG signal data to obtain the enhanced EEG signal data;

[0204] A feature extraction module for combining the enhanced EEG signal samples with the cleaned EEG signals to generate a total EEG signal dataset, and performing frequency-domain feature extraction on the total EEG signal dataset. The extracted features include EEG signal differential entropy features and power spectral density features;

[0205] A feature splicing module for splicing the extracted EEG signal differential entropy features and power spectral density features to obtain the final EEG signal features;

[0206] An analysis module for inputting the final EEG signal features into a trained EEG signal model to obtain the schizophrenia analysis result output by the EEG signal model.

[0207] For parts not described in detail in this embodiment, refer to the content recorded in the above method embodiments and will not be elaborated here.

[0208] See Figure 3 , the present disclosure embodiments also provide an electronic device, which includes:

[0209] At least one processor; and,

[0210] A memory communicatively connected to the at least one processor; wherein,

[0211] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the EEG signal analysis method in the foregoing method embodiments.

[0212] The present disclosure embodiments also provide a non-transitory computer-readable storage medium, which stores computer instructions for causing the computer to execute the EEG signal analysis method in the foregoing method embodiments.

[0213] An embodiment of the present disclosure also provides a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to execute the electroencephalogram signal analysis method in the foregoing method embodiment.

[0214] Based on the same inventive concept as the foregoing embodiment, an embodiment of the present invention provides an electronic device, as Figure 3 shown. The device includes: a processor 310 and a memory 311 storing a computer program; wherein, Figure 3 The processor 310 shown in [diagram] does not refer to the number of processors 310 being one, but only refers to the positional relationship of the processor 310 relative to other components. In actual applications, the number of processors 310 can be one or more; similarly, Figure 2 the memory 311 shown in [diagram] has the same meaning, that is, it only refers to the positional relationship of the memory 311 relative to other components. In actual applications, the number of memories 311 can be one or more. When the processor 310 runs the computer program, the method applied to the above device is implemented.

[0215] The device may further include: at least one network interface 312. Each component in the device is coupled together through a bus system 313. It can be understood that the bus system 313 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 313 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 2 all kinds of buses are labeled as the bus system 313.

[0216] Among them, the memory 311 can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a ferromagnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), sync link dynamic random access memory (SLDRAM), direct rambus random access memory (DRRAM).The memory 311 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0217] The memory 311 in the embodiments of the present invention is used to store various types of data to support the operation of the device. Examples of such data include: any computer programs for operating on the device, such as operating systems and application programs; contact data; phone book data; messages; pictures; videos, etc. Among them, the operating system contains various system programs, such as the framework layer, the core library layer, the driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application programs can include various application programs, such as a Media Player, a Browser, etc., for implementing various application services. Here, the program for implementing the method of the embodiments of the present invention can be included in the application programs.

[0218] Based on the same inventive concept as the foregoing embodiments, this embodiment also provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium. The computer-readable storage medium can be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; it can also be various devices including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc. When the computer program stored in the computer-readable storage medium is run by a processor, the above method is implemented. For the specific step flow implemented when the computer program is executed by the processor, please refer to Figure 1 the description of the illustrated embodiments, which will not be repeated here.

[0219] The technical features of the above-described embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0220] In this text, the terms "comprising", "including" or any other variant thereof are intended to cover non-exclusive inclusion. In addition to the elements listed, it may also include other elements not expressly listed.

[0221] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the said claims.

Claims

1. A method for analyzing electroencephalogram signals, characterized in that: The EEG signal analysis method comprises: Collect raw EEG signal data; Cleaning the original EEG signal data to obtain cleaned EEG signal data; Performing enhancement processing on the cleaned EEG signal data to obtain enhanced EEG signal data; Combining the enhanced EEG signal sample with the cleaned EEG signal to obtain an EEG signal total data set, performing frequency domain feature extraction on the EEG signal total data set, wherein the extracted features include EEG signal differential entropy features and power spectral density features; The extracted EEG signal differential entropy features and power spectrum density features are spliced ​​to obtain the final EEG signal features; The final EEG signal feature is input into the trained EEG signal model to obtain the psychiatric analysis result output by the EEG signal model.

2. The method for analyzing electroencephalogram signals according to claim 1, characterized in that: The raw EEG signal data is cleaned to obtain cleaned EEG signal data, including: The independent component analysis method is used to separate the artifact signals of the original EEG signal data, identify and remove irrelevant components, and perform data cleaning on the collected EEG signals to obtain the cleaned EEG signal data.

3. The method for analyzing electroencephalogram signals according to claim 2, characterized in that: Use independent component analysis to separate artifact signals from raw EEG data and identify and remove irrelevant components, including: The collected EEG signal data is de-averaged using formula (1): x i ′ =x i -m where x i is the EEG data of a certain channel in the collected data, μ is the average value of the channel, and N is the overall length of the channel data; Formula (2) is used to calculate the covariance matrix after averaging: Where X is the EEG data matrix after averaging; Formula (3) is used to decompose the data through the independent component analysis algorithm to obtain independent components: S1, S2, and S3 represent three independent components; When the weight matrix is ​​W, the signal after cleaning and restoration is: X cleaned =W -1 .S reduced ; S reduced Obtained by selecting the principal components to be retained in S.

4. The method for analyzing electroencephalogram signals according to claim 1, characterized in that: The enhanced EEG signal samples are combined with the cleaned EEG signal to generate an EEG signal total data set, and frequency domain feature extraction is performed on the EEG signal total data set. The extracted features include EEG signal differential entropy features and power spectrum density features, including: The initial EEG signals of different channels are sliced ​​into M EEG waveform signals of length t according to time slices, and spectrum separation is performed on each time slice after slicing. The spectrum separation method is to use formula (4): Where X(f) is the frequency domain signal, x(n) is the discrete sample of the time domain signal, and f is the corresponding frequency index; The EEG signal differential entropy features and power spectrum density features of EEG signals in different time segments and frequency bands are extracted. The EEG signal differential entropy features can be expressed as: Where DE is the differential entropy feature of the EEG signal, x is a random variable, and p(x) is the probability density function associated with x; The power spectral density characteristic is characterized by: Among them, I i (w) is the periodogram of the i-th segment, X i (n) represents the i-th data segment information, M is the total number of segments; U is the normalization factor: w(n) is the window function, m is the number of data in each segment, X i (n) represents the i-th data segment information.

5. The method for analyzing electroencephalogram signals according to any one of claims 1 to 4, characterized in that: After collecting the original EEG signal data, the EEG signal analysis method further includes: Analyzing whether the original EEG signal data is complete; In the case where the original EEG signal is missing, re-collecting the EEG signal data; When the original EEG signal data is complete, the step of cleaning the original EEG signal data to obtain cleaned EEG signal data is performed.

6. The method for analyzing electroencephalogram signals according to any one of claims 1 to 4, characterized in that: The EEG signal analysis method further comprises: Inputting the precision analysis results into the large model system; Receive diagnostic suggestions output by the large model system based on the results of psychiatric analysis.

7. An electroencephalogram signal analysis system, characterized in that: include: Data acquisition module, used to collect raw EEG signal data; A data cleaning module, used for cleaning the raw EEG signal data to obtain cleaned EEG signal data; A data enhancement module is used to enhance the cleaned EEG signal data to obtain enhanced EEG signal data; A feature extraction module is used to combine the enhanced EEG signal sample with the cleaned EEG signal to produce a total EEG signal data set, and perform frequency domain feature extraction on the total EEG signal data set, wherein the extracted features include EEG signal differential entropy features and power spectral density features; A feature concatenation module is used to concatenate the extracted EEG signal differential entropy features and power spectrum density features to obtain the final EEG signal features; The analysis module is used to input the final EEG signal features into the trained EEG signal model to obtain the psychiatric analysis results output by the EEG signal model.

8. An electronic device, characterized in that include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the electroencephalogram signal analysis method according to any one of claims 1 to 6.

9. A storage medium storing computer instructions for causing the computer to execute the electroencephalogram signal analysis method according to any one of claims 1 to 6.