AI-based EEG detection data processing method and system
By acquiring and optimizing EEG signals through multi-channel acquisition, and combining them with a pre-trained model for feature extraction and pattern recognition, the problems of noise interference and single feature extraction in traditional EEG detection are solved, achieving efficient and accurate EEG detection.
Patent Information
- Application Number
- CN202511172563.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Traditional EEG detection techniques suffer from severe noise interference, limited feature extraction, and limited pattern recognition capabilities, resulting in insufficient signal quality and diagnostic accuracy.
Raw EEG signals are continuously acquired through multiple channels, and quality optimization processing is performed to remove interference. Different frequency rhythms and signal synchronization features between channels are extracted, and a pre-trained EEG analysis model is used for pattern recognition to generate abnormal activity periods and brain region localization information.
It improves the accuracy and efficiency of EEG detection, realizes full automation and intelligence from data acquisition to application, ensures signal stability and reliability, and can more accurately reflect neural activity patterns.
Smart Images

Figure CN120713538B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to an AI-based method and system for processing electroencephalogram (EEG) detection data. Background Technology
[0002] In the fields of brain science research and clinical medical diagnosis, electroencephalography (EEG) technology is a crucial tool. EEG reflects the electrical activity of neurons in the brain. By detecting and analyzing EEG, we can gain a deeper understanding of the brain's functional state and assist in the diagnosis of various neurological diseases, such as epilepsy and sleep disorders.
[0003] Currently, traditional methods for processing EEG data have many limitations. In signal acquisition, the raw EEG signals often contain significant noise and interference, such as environmental electromagnetic interference and artifacts caused by poor electrode-scalp contact. These interferences severely affect signal quality, significantly reducing the accuracy of subsequent analysis. In feature extraction, traditional methods typically extract only relatively simple features, failing to comprehensively reflect the complex neural activity patterns of the brain. Furthermore, in the pattern recognition stage, the lack of effective models for accurately classifying and recognizing the extracted features results in limited detection capabilities for abnormal EEG activity, making it impossible to accurately identify the time periods of abnormal activity and locate the corresponding brain regions. Summary of the Invention
[0004] In view of the aforementioned problems, and in conjunction with the first aspect of the present invention, embodiments of the present invention provide an AI-based method for processing electroencephalogram (EEG) detection data, the method comprising:
[0005] A set of raw EEG signals acquired continuously from multiple channels is obtained. The set of raw EEG signals consists of multiple time-stamped EEG signal sequences, each EEG signal sequence corresponding to a neural electrical activity record within a detection period.
[0006] The original set of EEG signals is subjected to quality optimization processing to obtain a set of effective EEG signals that meet the detection standards. The set of effective EEG signals includes stable signal segments with acceptable signal interference levels.
[0007] The effective set of EEG signals is processed by feature extraction to obtain a combination of EEG features reflecting the pattern of neural activity. The combination of EEG features includes energy distribution features of different frequency rhythms and signal synchronization features between channels.
[0008] The pre-trained EEG analysis model is invoked to perform pattern recognition processing on the EEG feature combination, generating EEG detection results containing abnormal activity period identifiers and corresponding brain region localization information;
[0009] Based on the abnormal activity period identifiers and brain region localization information in the EEG detection results, an EEG processing instruction containing spatiotemporal information is generated, and the EEG processing instruction is sent to the target device to trigger a response operation.
[0010] In another aspect, embodiments of the present invention also provide an AI-based EEG detection data processing system, including a processor and a machine-readable storage medium connected to the processor. The machine-readable storage medium is used to store programs, instructions, or code, and the processor is used to execute the programs, instructions, or code in the machine-readable storage medium to implement the above-described method.
[0011] Based on the above, this invention continuously acquires raw EEG signal sets through multiple channels, comprehensively obtaining neural electrical activity records from different time periods and brain regions. The raw EEG signal sets undergo quality optimization processing, effectively removing interference and obtaining a valid EEG signal set that meets detection standards, ensuring signal stability and reliability and improving data quality from the source. Feature extraction processing is performed on the valid EEG signal set, comprehensively considering the energy distribution characteristics of different frequency rhythms and the signal synchronization characteristics between channels, enabling a more comprehensive and accurate reflection of neural activity patterns. A pre-trained EEG analysis model is invoked to perform pattern recognition processing on the EEG feature combinations. Utilizing the powerful learning capabilities of AI, EEG detection results containing abnormal activity time period identifiers and corresponding brain region location information can be generated more accurately. Finally, based on the EEG detection results, EEG processing instructions containing spatiotemporal information are generated and sent to the target device to trigger a response operation. This achieves full-process automation and intelligence from data acquisition and processing to application, greatly improving the accuracy and efficiency of EEG detection. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of the execution flow of the AI-based EEG detection data processing method provided in an embodiment of the present invention.
[0013] Figure 2 This is a schematic diagram of exemplary hardware and software components of the AI-based EEG detection data processing system provided in an embodiment of the present invention. Detailed Implementation
[0014] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 This is a flowchart illustrating an AI-based EEG detection data processing method according to an embodiment of the present invention. The following is a detailed description of the AI-based EEG detection data processing method.
[0015] Step S110: Acquire a set of raw EEG signals acquired continuously from multiple channels. The set of raw EEG signals consists of multiple EEG signal sequences with time stamps, and each EEG signal sequence corresponds to a neural electrical activity record within a detection period.
[0016] In this embodiment, to comprehensively and accurately capture information about the brain's neural electrical activity, a multi-channel EEG signal acquisition device can be used. These EEG signal acquisition devices typically contain multiple electrodes that can be precisely placed at different locations on the human head. Because the neural electrical activity varies in different brain regions, multi-channel acquisition can cover a wider range of brain regions. Taking a common EEG acquisition cap as an example, it has multiple electrode channels evenly distributed on it, allowing for the simultaneous collection of EEG signals from different locations.
[0017] During the acquisition process, the EEG signal acquisition device operates continuously, recording the acquired EEG signals in sequence. Each EEG signal sequence corresponds to a specific detection time period, during which neural electrical activity is fully recorded. Furthermore, to facilitate subsequent temporal localization and analysis of the signals, each EEG signal sequence is assigned a time stamp. For example, in a long detection process, multiple detection time periods can be divided according to set time intervals, and each time period's EEG signal sequence has its corresponding precise time stamp, such as down to the millisecond level. All these time-stamped EEG signal sequences are combined to form the raw EEG signal set. This raw EEG signal set contains rich information about brain neural activity; however, due to the influence of the acquisition environment and various factors, the signals in this raw EEG signal set may contain some interference and noise, requiring further processing.
[0018] Step S120: Perform quality optimization processing on the original EEG signal set to obtain an effective EEG signal set that meets the detection standards. The effective EEG signal set includes stable signal segments with signal interference levels that meet the requirements.
[0019] The raw EEG signal dataset is inevitably affected by various interference factors during acquisition. Electromagnetic interference from the external environment is a common source; for example, electromagnetic radiation from surrounding electronic devices and power lines may contaminate the EEG signal. The subject's own body movements, such as slight head movements, blinking, and swallowing, can also interfere with the EEG signal. These interferences degrade the quality of the raw EEG signal, affecting the accurate analysis of subsequent brain neural activity. Therefore, it is necessary to perform quality optimization processing on the raw EEG signal dataset to obtain a high-quality, effective dataset.
[0020] Step S121: Perform interference assessment processing on each EEG signal sequence in the original EEG signal set, and determine whether there are interference components that are not neural electrical activities by analyzing the fluctuation pattern of the signal and comparing it with the typical characteristics of normal neural electrical activity.
[0021] When assessing interference, it is essential to first identify the typical characteristics of normal neural electrical activity. Under normal circumstances, brain neural electrical activity exhibits specific frequency ranges and fluctuation patterns in different states. For example, in a state of wakefulness and relaxation, EEG signals may exhibit alpha wave characteristics, with frequencies typically between 8-13 Hz and a relatively regular fluctuation pattern. In a sleep state, EEG signals of different frequencies and patterns, such as delta waves, may appear.
[0022] Each segment of the original EEG signal sequence can be analyzed in detail. During this analysis, various features of the EEG signal can be extracted, such as amplitude, frequency, and phase. These extracted features are then compared with typical characteristics of normal neural electrical activity. For example, the energy distribution of the signal in different frequency ranges can be calculated and compared with the energy distribution of the same frequency range under normal conditions. If the energy distribution of the signal in certain frequency ranges differs significantly from normal, or if the signal fluctuation pattern shows abnormal peaks or abrupt changes, it may indicate the presence of non-neural electrical interference components in the signal sequence.
[0023] Step S122: Based on the judgment result, the EEG signal sequence containing interfering components is subjected to interference suppression processing. An independent interference reference signal is separated from the original signal. The signal to be processed and the interference reference signal are input into the adaptive adjustment module. The module parameters of the adaptive adjustment module are dynamically adjusted through an iterative optimization method to minimize the difference between the output signal and the original signal, thereby attenuating the interference components and retaining the effective components of neural electrical activity, and obtaining the EEG signal sequence after interference suppression.
[0024] Step S1221: Identify the dedicated interference channel signal in the original EEG signal set, wherein the dedicated interference channel is only used to collect environmental interference without contacting the test object, and the dedicated interference channel signal contains non-neural electrical activity components.
[0025] Within the raw EEG signal set, there may be dedicated interference channels specifically for collecting environmental interference. The electrodes of these dedicated interference channels are placed in locations that do not contact the subject, such as on the outer casing of the acquisition device or in specific locations in the surrounding environment. Their function is to specifically collect interference signals from the external environment, such as electromagnetic interference and power supply noise. These interference signals do not contain information about the subject's neural electrical activity; they only reflect the influence of the external environment on the acquisition process. By identifying these dedicated interference channel signals, environmental interference can be separated from the raw EEG signal.
[0026] Step S1222: The EEG signal sequence to be processed is used as the main input signal, and the dedicated interference channel signal is used as the auxiliary input signal. Both signals are simultaneously input to the two input ports of the adaptive adjustment module.
[0027] After identifying the dedicated interference channel signal, the EEG signal sequence to be processed can be used as the main input signal, which contains the neural electrical activity information of the subject and any potential interference components. The dedicated interference channel signal serves as the auxiliary input signal, containing only interference information from the external environment. Both signals are simultaneously input to the two input ports of the adaptive adjustment module. The adaptive adjustment module adjusts its parameters based on the characteristics of these two input signals to effectively suppress the interference components.
[0028] Step S1223: Initialize the parameters of the adaptive adjustment module to random small values, calculate the correlation between the main input signal and the auxiliary input signal, and adjust the module parameters of the adaptive adjustment module through an iterative optimization method so that the difference between the output signal of the adaptive adjustment module and the main input signal gradually decreases.
[0029] At the start of processing, the parameters of the adaptive adjustment module can be initialized to random small values. This is to give the adaptive adjustment module an initial state so that it can be adjusted according to the input signal later. Then, the correlation between the main input signal and the auxiliary input signal is calculated. The correlation calculation helps the adaptive adjustment module understand which parts of the main input signal are caused by external interference. For example, if the main input signal and the auxiliary input signal have a high correlation in certain frequency ranges, then the main input signal is likely affected by external interference in those frequency ranges.
[0030] The module parameters of the adaptive adjustment module are adjusted through iterative optimization. Iterative optimization is a process of continuous trial and improvement. In each iteration, the module parameters can be adjusted based on the difference between the current main input signal and the output signal of the adaptive adjustment module. For example, optimization algorithms such as gradient descent can be used to adjust the parameters according to the gradient direction of the difference, gradually reducing the difference.
[0031] Step S1224: In each iteration, adjust the module parameters of the adaptive adjustment module according to the current difference value until the difference value converges to a stable state, and use the corresponding output signal of the adaptive adjustment module as the effective neural electrical activity signal after suppressing interference.
[0032] During the iteration process, the difference between the main input signal and the output signal of the adaptive adjustment module is calculated at each iteration. Based on this difference, the module parameters of the adaptive adjustment module can be updated. For example, if the difference is large, it means that the current module parameter settings are not ideal and require significant adjustments; if the difference is small, it means that the module parameters are close to the optimal settings and only require minor adjustments.
[0033] As the iterations proceed, the difference value gradually decreases. When the difference value converges to a stable state, it means that the adaptive adjustment module has obtained the optimal parameter settings, at which point it can suppress interference components to the greatest extent while retaining the effective components of neural electrical activity. The output signal of the adaptive adjustment module at this point is taken as the effective neural electrical activity signal after interference suppression.
[0034] Step S1225: Perform feature verification processing on the effective neural electrical activity signal, check whether the effective neural electrical activity signal retains the typical rhythmic features of the original neural electrical activity, and use the verified effective neural electrical activity signal as the final EEG signal sequence after interference suppression.
[0035] After obtaining the effective neural electrical activity signal after interference suppression, it needs to undergo feature verification processing to ensure that the typical rhythmic features of the original neural electrical activity were not removed during the interference suppression process. During verification, various features of the effective neural electrical activity signal, such as frequency, amplitude, and phase, can be extracted again and compared with the typical features of the original neural electrical activity. For example, check whether the energy distribution of the signal in different frequency ranges is similar to the energy distribution of normal neural electrical activity, and whether the fluctuation pattern of the signal conforms to normal rhythmic features. If the effective neural electrical activity signal retains the typical rhythmic features of the original neural electrical activity, the interference suppression processing is successful, and the verified effective neural electrical activity signal is used as the final EEG signal sequence after interference suppression.
[0036] Step S123: Perform baseline correction processing on the EEG signal sequence after interference suppression, calculate the overall trend of the EEG signal over a long period of time, generate a baseline trend curve by linear fitting method, subtract the trend curve from the original signal to eliminate baseline drift, and obtain the corrected EEG signal sequence.
[0037] Even after interference suppression processing, baseline drift may still exist in EEG signals. Baseline drift refers to a slow change in the overall level of the EEG signal over time, which may be caused by factors such as changes in the contact resistance between the electrodes and the skin, zero-point drift of the acquisition device, etc. Baseline drift can affect the accurate analysis of EEG signals, therefore baseline correction processing is necessary.
[0038] First, the overall trend of EEG signals over a long period can be calculated. The EEG signal sequence can be divided into multiple relatively long time intervals, and statistical analysis can be performed on the signals within each interval, such as calculating the average value. Then, a baseline trend curve is generated using linear fitting. Linear fitting is a commonly used mathematical method that finds a straight line that best fits a set of data points. In this process, a baseline trend curve that best represents the overall trend of the EEG signals can be found based on the calculated statistical values for each time interval.
[0039] Finally, subtracting this baseline trend curve from the original EEG signal eliminates the influence of baseline drift, resulting in a corrected EEG signal sequence. The corrected EEG signal sequence is more stable and can more accurately reflect the true state of brain neural electrical activity.
[0040] Step S124: Perform time alignment processing on the corrected EEG signal sequence. Using the time stamp of the main acquisition device as a reference, adjust the time stamp of each channel signal through interpolation to make the time stamp deviation of different channel signals less than the accuracy required by the detection standard, and obtain the target EEG signal sequence.
[0041] During the multi-channel acquisition of EEG signals, the time stamps of the EEG signals acquired from different channels may deviate due to differences in hardware characteristics and signal transmission paths. This time stamp deviation can affect subsequent analysis of the relationship between signals from different channels, thus requiring time alignment processing.
[0042] Using the time stamp of the main acquisition device as a reference, the main acquisition device typically possesses high temporal accuracy and stability. For EEG signal sequences from other channels, their time stamps can be adjusted using interpolation methods. Interpolation is a method of estimating unknown data points based on known data points. For example, linear interpolation, spline interpolation, and other methods can be used. Through interpolation, the signals from other channels can be adjusted in time, ensuring that the time stamp deviation between signals from different channels is less than the accuracy required by the detection standard. After time alignment processing, the resulting EEG signal sequence is the target EEG signal sequence, which guarantees the temporal consistency of signals from different channels.
[0043] Step S125: Perform quality screening on the target EEG signal sequence to obtain all signal sequences that meet the detection criteria, and finally form a valid EEG signal set.
[0044] After obtaining the target EEG signal sequence, quality screening is required. Testing standards typically impose a series of requirements on the quality of EEG signals, such as signal-to-noise ratio (SNR) and signal stability. During quality screening, various quality indicators of the target EEG signal sequence can be evaluated. For example, the SNR, which is the ratio of useful components to noise components, can be calculated. If the SNR is lower than a set threshold, it indicates poor signal quality and potential noise interference; the resulting signal sequence will be rejected.
[0045] Simultaneously, signal stability is checked, such as whether signal fluctuations are within a reasonable range. Signal sequences that do not meet the detection criteria are excluded. Only those signal sequences that meet the detection criteria are retained. All these signal sequences that meet the detection criteria are combined to form the final valid EEG signal set. This valid EEG signal set contains signal interference levels that meet the requirements and includes stable signal segments.
[0046] Step S130: Perform feature extraction processing on the effective set of EEG signals to obtain a combination of EEG features reflecting neural activity patterns. The combination of EEG features includes energy distribution features of different frequency rhythms and signal synchronization features between channels.
[0047] Although the effective EEG signal set has undergone quality optimization, the information it contains is still quite complex, requiring further extraction of key features to better reflect the brain's neural activity patterns. Feature extraction mainly includes two aspects: extracting energy distribution features of different frequency rhythms and signal synchronicity features between channels.
[0048] Step S131: Perform time-frequency decomposition processing on each EEG signal sequence in the effective EEG signal set. The time-domain signal is decomposed into time-frequency energy distributions of multiple frequency intervals by time-frequency analysis method. Each element of the time-frequency energy distribution represents the signal energy of the corresponding time point and frequency interval.
[0049] Time-frequency decomposition transforms time-domain EEG signals into a time-frequency domain representation to better analyze the energy distribution of the signal across different times and frequencies. Common time-frequency analysis methods include wavelet transform and short-time Fourier transform. Taking wavelet transform as an example, it can decompose EEG signals into wavelet coefficients at different scales and locations. Each wavelet coefficient corresponds to the characteristics of the signal in a specific time and frequency range.
[0050] For each EEG signal sequence in a valid EEG signal set, time-frequency analysis can be used to decompose it into time-frequency energy distributions across multiple frequency intervals. In this process, the signal can be divided into different frequency intervals, such as delta waves (0-4Hz), theta waves (4-8Hz), alpha waves (8-13Hz), and beta waves (13-30Hz). Then, the signal energy of each frequency interval at different time points is calculated. The time-frequency energy distribution is a two-dimensional matrix, where each element represents the signal energy at the corresponding time point and frequency interval. This time-frequency energy distribution can visually demonstrate the energy changes of the EEG signal at different times and frequencies.
[0051] Step S132: Perform energy statistical processing on the time-frequency energy distribution, calculate the cumulative energy value of each frequency interval within the total duration of the signal sequence, and calculate the proportion of the cumulative energy of each frequency interval to the total energy of all frequency intervals, generating an energy distribution feature that includes the proportion of energy of different frequency rhythms.
[0052] After obtaining the time-frequency energy distribution, it needs to be statistically processed. First, the time-frequency energy distribution can be integrated along the frequency dimension. This means summing the energy values of each frequency interval at each time point to obtain the total energy value at each time point. Then, the energy value of each frequency interval is integrated along the time dimension, that is, the energy values of that frequency interval are summed at all time points to obtain the cumulative energy value of that frequency interval over the total duration of the signal sequence.
[0053] Next, the sum of the cumulative energy values across all frequency intervals is calculated; this sum represents the total energy value of the signal sequence. Finally, the cumulative energy value of each frequency interval is divided by the total energy value to obtain the energy percentage of that frequency interval. The energy percentages of each frequency interval are then arranged sequentially to generate an energy distribution feature vector. This energy distribution feature vector represents the relative importance of different frequency rhythms in neural electrical activity, reflecting the energy distribution of each frequency rhythm in different brain states.
[0054] Step S1321: Integrate the time-frequency energy distribution along the frequency dimension, and sum the energy values of each frequency interval at each time point to obtain the total energy value at each time point.
[0055] When performing energy statistical processing, the time-frequency energy distribution must first be integrated along the frequency dimension. The time-frequency energy distribution is a two-dimensional matrix, with one dimension representing time and the other frequency. For each time point, the energy values of each frequency interval corresponding to that time point can be summed. For example, at a specific time point, the energy value of the delta wave frequency interval is A, the energy value of the theta wave frequency interval is B, the energy value of the alpha wave frequency interval is C, etc. These energy values are summed to obtain the total energy value for that time point. By performing the above processing for each time point, the total energy value for each time point can be obtained. These total energy values reflect the overall energy level of the EEG signal at different time points.
[0056] Step S1322: Integrate the energy value of each frequency interval along the time dimension, and sum the energy values of the frequency interval at all time points to obtain the cumulative energy value of the frequency interval over the total duration of the signal sequence.
[0057] Next, the energy values for each frequency range can be integrated over time. For each frequency range, the energy values at all time points can be summed. For example, for the delta wave frequency range, the energy values at each time point in the signal sequence are summed sequentially, and the resulting sum is the cumulative energy value of that frequency range over the total duration of the signal sequence. This cumulative energy value reflects the total energy contribution of the EEG signal in that frequency range throughout the entire detection period. The cumulative energy values of different frequency ranges can reflect the intensity of brain activity at different frequency rhythms. For example, in certain specific brain states, the cumulative energy value of a certain frequency range may be relatively high, which may indicate that the neural activity corresponding to that frequency is more active.
[0058] Step S1323: Calculate the sum of the cumulative energy values across all frequency ranges, which is taken as the total energy value of the signal sequence.
[0059] After obtaining the cumulative energy value for each frequency interval, the cumulative energy values for all frequency intervals are summed to obtain the total energy value of the signal sequence. This total energy value represents the total energy level of the entire EEG signal sequence across all frequencies, reflecting the overall activity level of brain neural electrical activity during the detection period.
[0060] Step S1324: Divide the cumulative energy value of each frequency range by the total energy value to obtain the energy percentage of that frequency range.
[0061] Dividing the cumulative energy value of each frequency interval by the total energy value of the signal sequence yields the energy percentage of that frequency interval. The energy percentage reflects the proportion of energy in the total energy for each frequency interval, providing a more intuitive understanding of the relative importance of different frequency rhythms in neural electrical activity. For example, a higher energy percentage for a particular frequency interval indicates that the neural activity corresponding to that frequency plays a more significant role in overall brain activity; conversely, a lower energy percentage indicates that the neural activity corresponding to that frequency is relatively weaker.
[0062] Step S1325: Arrange the energy proportions of each frequency range in order to generate an energy distribution feature vector, which is used to represent the relative importance of different frequency rhythms in neural electrical activity.
[0063] The energy proportions calculated for each frequency interval are arranged in a predetermined order (e.g., from low to high frequency) to form an energy distribution feature vector. This vector is multi-dimensional, with each dimension corresponding to the energy proportion of a frequency interval. The energy distribution feature vector clearly demonstrates the relative importance of different frequency rhythms in neural electrical activity.
[0064] Step S133: Perform synchronization analysis on the multi-channel EEG signal sequence in the effective EEG signal set, calculate the degree of synchronization between any two channel signals within the same time window. The degree of synchronization is determined by analyzing the fluctuation consistency and phase relationship of the signals, and is used to characterize the synergistic relationship of neural electrical activity in different brain regions.
[0065] For multi-channel EEG signal sequences within a valid EEG signal set, synchronization analysis is required. Different channels of EEG signals correspond to the neural electrical activity of different brain regions. By analyzing the degree of synchronization between any two channels within the same time window, the synergistic relationship of neural electrical activity between different brain regions can be understood. The calculation of synchronization degree is mainly based on the wave consistency and phase relationship of the signals. The wave consistency of the signals can be determined by comparing the amplitude changes of two channel signals at the same time point. If the amplitude change trends of the two signals are similar, it indicates that they have a high degree of wave consistency. The phase relationship reflects the relative position of the two signals in time. For example, if the phase difference between two signals is small, it indicates that they are relatively synchronized in time. By comprehensively analyzing the wave consistency and phase relationship of the signals, the degree of synchronization between any two channels can be calculated. This synchronization degree value is a multi-dimensional result that reflects the synergistic strength of neural electrical activity between different brain regions.
[0066] Step S134: Perform spatial mapping processing on the synchronization degree to convert the synchronization degree between channels into a two-dimensional spatial distribution map. The value of each position in the two-dimensional spatial distribution map represents the coordination strength between the corresponding brain region and other brain regions.
[0067] After obtaining the synchronization level of any two channel signals, this synchronization information needs to be spatially mapped to more intuitively display the collaborative relationships between different brain regions. Spatial mapping is the process of converting the synchronization level between channels into a two-dimensional spatial distribution map. First, the brain region location corresponding to each channel needs to be determined. Typically, the electrode channels of the acquisition device are placed at different positions on the head according to predefined rules, and these positions correspond to different brain regions. Then, based on the synchronization level between channels, the collaborative strength between that brain region and other brain regions is assigned to each brain region location in two-dimensional space. For example, if a brain region has a high synchronization level with multiple brain regions, then the location value corresponding to that brain region in the two-dimensional spatial distribution map will be larger; conversely, if the synchronization level with other brain regions is low, the location value will be smaller. The resulting two-dimensional spatial distribution map can intuitively display the collaborative relationships of neural electrical activity between different brain regions.
[0068] Step S135: Perform feature standardization and integration processing on the energy distribution characteristics and spatial distribution map to generate EEG feature combinations.
[0069] After obtaining the energy distribution feature vector and the two-dimensional spatial distribution map, they need to be standardized and integrated to generate the final EEG feature combination. The purpose of feature standardization and integration is to unify different types of features, making them comparable and fusionable in subsequent analyses. First, the energy distribution feature vector and the spatial distribution map are standardized. Standardization maps feature values to a set range, such as normalizing them to the [0, 1] interval. This eliminates differences in dimensions and numerical ranges between different features, making them equally important in subsequent calculations and analyses. Then, the standardized energy distribution feature vector and the spatial distribution map are concatenated. The concatenation method can be chosen according to specific needs; for example, the energy distribution feature vector can be added as a dimension to the spatial distribution map, or other concatenation strategies can be used. The final EEG feature combination is a multi-dimensional feature set that includes energy distribution features of different frequency rhythms and signal synchronization features between channels, comprehensively reflecting the neural activity patterns of the brain.
[0070] Step S140: Call the pre-trained EEG analysis model to perform pattern recognition processing on the EEG feature combination, and generate EEG detection results containing abnormal activity period identifiers and corresponding brain region localization information.
[0071] After obtaining the combined EEG features, a pre-trained EEG analysis model needs to be invoked for pattern recognition processing. This pre-trained model is trained on a large amount of training data and can learn the characteristic patterns of normal and abnormal EEG signals. The combined EEG features are input into the model, which analyzes and processes them, identifying potential abnormal activity patterns. Finally, the model generates EEG results containing identifiers of abnormal activity periods and corresponding brain region localization information. The abnormal activity period identifiers clearly indicate the time periods during which abnormal brain activity occurred, while the corresponding brain region localization information determines the specific brain region where the abnormal activity occurred.
[0072] Step S141: Input the combined EEG features into the rhythm analysis module of the EEG analysis model, extract the local fluctuation pattern and global trend pattern of rhythm energy distribution at different frequencies, and generate a first feature vector reflecting the rhythm features.
[0073] The EEG analysis model comprises multiple modules, with the rhythm analysis module primarily responsible for analyzing the energy distribution of different frequency rhythms within EEG feature combinations. Inputting EEG feature combinations into the rhythm analysis module allows for in-depth analysis of energy distribution characteristics. First, it extracts local fluctuation patterns in the energy distribution of different frequency rhythms. These local fluctuation patterns reflect changes in energy distribution over short periods, capturing subtle changes in brain neural activity within specific timeframes. For example, a sudden increase or decrease in energy within a certain frequency range may indicate abnormal neural activity in the brain during that time period. Next, it extracts global trend patterns in the energy distribution of different frequency rhythms. These global trend patterns reflect the overall trend of energy distribution over longer periods, helping to understand the long-term patterns of brain neural activity. For example, a gradual increase or decrease in energy within a certain frequency range throughout the detection period may be related to a physiological state or disease progression in the brain. By extracting local fluctuation patterns and global trend patterns, a first feature vector reflecting the rhythm characteristics is generated. This first feature vector is a multi-dimensional vector containing both local and global feature information of the energy distribution of different frequency rhythms.
[0074] Step S142: Input the combined EEG features into the synchronization analysis module of the EEG analysis model, and encode the brain region coordination relationship in the spatial distribution map using graph structure modeling method to generate a second feature vector reflecting the synchronization features.
[0075] The synchronicity analysis module is another important module in the EEG analysis model. It is primarily used to analyze the brain region coordination relationships reflected in the spatial distribution map of EEG feature combinations. When EEG feature combinations are input into the synchronicity analysis module, the module processes the spatial distribution map using a graph modeling approach. Graph modeling treats brain regions in the spatial distribution map as nodes and the coordination relationships between brain regions as edges. This transforms the brain region coordination relationships in the spatial distribution map into graph-structured data. Then, the graph-structured data is encoded and converted into a vector form, namely the second feature vector reflecting the synchronicity characteristics. This second feature vector contains synchronicity information of neural electrical activity between different brain regions, reflecting the brain's functional connectivity patterns. Analyzing the synchronicity characteristics allows for further understanding of the brain's neural activity coordination mechanisms under different states.
[0076] Step S143: Input the first feature vector and the second feature vector into the temporal modeling module of the EEG analysis model, analyze the change pattern of features over time through the temporal modeling method, and generate a comprehensive feature vector containing temporal context information.
[0077] The first feature vector, reflecting rhythmic characteristics, and the second feature vector, reflecting synchronicity characteristics, are input into the temporal modeling module of the EEG analysis model. The main function of the temporal modeling module is to analyze the changing patterns of features over time. Because neural activity in the brain is a dynamic process that changes over time, understanding the temporal patterns of feature changes is crucial for accurately identifying abnormal activity patterns. Temporal modeling methods can capture the correlation and trends of features across different points in time. For example, a feature may exhibit periodic changes over a period of time, or a sudden change may occur at a specific point in time. Through temporal modeling, this temporal information can be incorporated into the features, generating a comprehensive feature vector that includes temporal contextual information. This comprehensive feature vector not only contains rhythmic and synchronicity characteristics but also information on the changes in these characteristics over time.
[0078] Step S1431: Arrange the first feature vector and the second feature vector in chronological order to form a time-series feature sequence, wherein each time window corresponds to a feature vector.
[0079] After inputting the first and second feature vectors into the temporal modeling module, they are first arranged in chronological order to form a temporal feature sequence. Since EEG signals are continuously acquired over time, each time window corresponds to a feature vector (containing information from both the first and second feature vectors). These feature vectors are arranged sequentially in chronological order to form a temporal feature sequence. This temporal feature sequence is a multi-dimensional sequence that reflects the changes in brain neural activity characteristics over time. For example, the values of the first and second feature vectors may change within different time windows, reflecting the state of brain neural activity at different points in time.
[0080] Step S1432: Initialize the hidden state of the time series modeling module to the initial value, and input the feature vector of each time window into the time series modeling module in sequence.
[0081] Temporal modeling modules are typically built upon recurrent neural networks (RNNs) or their variants (such as Long Short-Term Memory (LSTM) networks and gated recurrent units (GRUs). Before processing the temporal feature sequence, the hidden states of the temporal modeling module need to be initialized to initial values. The hidden state is a crucial concept in the temporal modeling module, used to store and pass information from previous time steps. The initial value is usually a preset constant or a random small value. Then, the feature vectors of each time window are input into the temporal modeling module sequentially. At each time step, the module calculates and updates the current hidden state based on the currently input feature vector and the hidden state of the previous time step. This process iterates until the entire temporal feature sequence has been processed.
[0082] Step S1433: Control the transmission of historical feature information through the update mechanism of the time series modeling module to generate a hidden state vector containing historical context.
[0083] The update mechanism of the temporal modeling module is its core component, determining how to control the transmission of historical feature information. Taking LSTM as an example, it includes components such as input gates, forget gates, and output gates. The input gate determines how much information from the current input feature vector can enter the hidden state; the forget gate determines how much information from the hidden state of the previous time step needs to be forgotten; and the output gate determines how much information from the current hidden state can be output. Through the control of these gates, the temporal modeling module can effectively control the transmission of historical feature information. At each time step, the module calculates the current hidden state vector based on the current input feature vector and the hidden state of the previous time step through the update mechanism. This hidden state vector contains the context of historical feature information, reflecting the state information of brain neural activity in previous time steps.
[0084] Step S1434: Fuse the feature vector of the current time window with the hidden state vector to generate a comprehensive feature representation that includes current features and historical information.
[0085] After obtaining the hidden state vector at the current time step, it is fused with the feature vector of the current time window. The purpose of this fusion is to combine current feature information with historical contextual information to generate a more comprehensive feature representation. Fusion can be performed in various ways, such as weighted concatenation or weighted addition. Through fusion, the resulting comprehensive feature representation includes both the feature information of the current time window and historical contextual information. This comprehensive feature representation can more accurately reflect the state of brain neural activity at the current time point because it considers the influence of information from previous time steps on the current state.
[0086] Step S1435: Input the comprehensive feature representation into the fully connected layer for feature optimization to generate a comprehensive feature vector.
[0087] After obtaining the comprehensive feature representation, it is input into a fully connected layer for feature optimization. A fully connected layer is a common type of neural network layer that can perform non-linear transformations and feature combinations on the input features. In a fully connected layer, each input unit is connected to an output unit. The input features are weighted and summed through a series of weight parameters, and then processed by an activation function to obtain the optimized features. Through the processing of the fully connected layer, useful information in the comprehensive feature representation can be further extracted and optimized, redundant information can be removed, and finally a comprehensive feature vector is generated. This comprehensive feature vector is a multi-dimensional vector that contains rhythmic features, synchronicity features, and temporal context information of brain neural activity.
[0088] Step S144: Perform deviation evaluation processing on the comprehensive feature vector, calculate the degree of difference between the comprehensive feature vector and the pre-stored normal pattern feature vector, and the degree of difference is used to represent the deviation level of neural activity from the normal state within the current time window.
[0089] After obtaining the comprehensive feature vector, deviation assessment is required. The pre-stored normal pattern feature vectors were obtained during previous training by analyzing and processing a large amount of normal EEG signal data. These normal pattern feature vectors represent the neural activity characteristics of the brain under normal conditions. The comprehensive feature vector is compared with the pre-stored normal pattern feature vectors to calculate the degree of difference between them. Various methods can be used to calculate the degree of difference, such as Euclidean distance and cosine similarity. If the difference between the comprehensive feature vector and the normal pattern feature vector is large, it indicates that the neural activity within the current time window deviates significantly from the normal state; conversely, if the difference is small, it indicates that the neural activity is close to the normal state. This degree of difference is a multi-dimensional result that accurately reflects the level of deviation between the neural activity and the normal state within the current time window.
[0090] Step S145: Perform temporal continuity detection processing on the deviation level, identify the period when the deviation level exceeds the standard within the continuous time window as the abnormal activity period, and record the corresponding start time mark and end time mark as the abnormal activity period identifier.
[0091] After obtaining the degree of difference between the comprehensive feature vector and the normal pattern feature vector, a temporal continuity detection process is needed to assess this deviation level. The purpose of this process is to identify time periods within a continuous time window where the deviation level exceeds a standard, as these periods may represent abnormal brain activity. First, a standard value for the deviation level needs to be established. This standard value is determined based on extensive experimental data and clinical experience and is used to determine whether neural activity is in an abnormal state. Then, continuous time windows are examined. If the deviation level of a certain time window exceeds the standard value, and the deviation levels of several subsequent consecutive time windows also exceed the standard value, then this continuous period is identified as an abnormal activity period. Simultaneously, the start and end timestamps of this abnormal activity period are recorded; these timestamps constitute the abnormal activity period identifier. The abnormal activity period identifier clearly indicates within which time periods the brain exhibits abnormal neural activity.
[0092] Step S146: Spatial localization processing is performed on the synchronicity features during the abnormal activity period. The contribution of each brain region to the deviation level is analyzed, and the coordinates of the brain region with the largest contribution are used as the corresponding brain region localization information of the abnormal activity.
[0093] After identifying the period of abnormal activity, spatial localization processing of the synchronicity features within that period is required to determine the specific brain region where the abnormal activity occurred. Spatial localization primarily relies on the synchronicity features within the abnormal activity period to analyze the contribution of each brain region to the level of deviation. Since synchronicity features reflect the coordinated relationship of neural electrical activity between different brain regions, analyzing the changes in coordination between each brain region and other brain regions during the abnormal activity period can determine the contribution of each brain region to the level of deviation. For example, if a brain region shows significant changes in its synchronicity with multiple brain regions during the abnormal activity period, it indicates that this brain region contributes significantly to the level of deviation. The coordinates of the brain region with the highest contribution are used as the corresponding brain region localization information for the abnormal activity. This brain region localization information can accurately pinpoint the specific location of the abnormal activity in the brain.
[0094] Step S150: Generate an EEG processing instruction containing spatiotemporal information based on the abnormal activity period identifier and brain region localization information in the EEG detection results, and send the EEG processing instruction to the target device to trigger a response operation.
[0095] After obtaining EEG results containing identifiers of abnormal activity periods and corresponding brain region locations, it is necessary to generate EEG processing instructions with spatiotemporal information based on this information. The purpose of generating EEG processing instructions is to trigger the target device to perform corresponding operations based on the abnormal brain activity, thereby achieving intervention and regulation of brain neural activity.
[0096] Step S151: Analyze the start time marker and end time marker in the abnormal activity period identifier to determine the time range for intervention triggering. The time range covers the abnormal activity period and includes a preset advance amount and delay amount.
[0097] First, the start and end time markers in the abnormal activity period identifiers are analyzed. These time markers clearly indicate the start and end times of abnormal brain activity. Then, based on preset rules, the time range for intervention triggering is determined. This time range must not only cover the abnormal activity period but also include preset lead and delay amounts. The lead amount is set to activate the target device before the abnormal activity begins, allowing for more timely intervention on brain neural activity. For example, when abnormal activity is detected to be about to begin, the target device is activated a certain amount of time in advance, giving it sufficient time to reach a stable working state and thus better exert its intervention effect. The delay amount is set to ensure that the target device continues to work for a period of time after the abnormal activity ends, to consolidate the intervention effect and prevent recurrence of abnormal activity. By comprehensively considering the abnormal activity period, lead amount, and delay amount, a reasonable intervention triggering time range can be determined.
[0098] Step S152: Extract the EEG acquisition channel position corresponding to the brain region localization information, and convert the EEG acquisition channel position into the target device's operating position using a coordinate transformation method. The coordinate transformation method is based on a pre-established correspondence table between EEG channels and device operating positions.
[0099] The EEG acquisition channel locations corresponding to brain region localization information are extracted from the EEG test results. Since the electrode channels of the EEG acquisition device are placed in different positions on the head according to pre-defined rules, these positions correspond to different brain regions. Therefore, the corresponding EEG acquisition channel locations can be determined using the brain region localization information. Next, these EEG acquisition channel locations need to be converted into the target device's operating position. This is because the EEG acquisition channel locations and the target device's operating position may use different coordinate systems. To achieve accurate conversion, a pre-established correspondence table between EEG channels and device operating positions is required. This table records the mapping relationship between each EEG acquisition channel location and the target device's operating position. By querying this correspondence table, the EEG acquisition channel locations can be accurately converted into the target device's operating position, thereby ensuring that the target device can accurately target abnormally active brain regions.
[0100] Step S153: Perform validity verification on the target location, check whether the target location covers the abnormally active brain region and does not overlap with other areas that need intervention. If there is overlap, select the second-best location by using the nearest neighbor search method.
[0101] After obtaining the target device's location, its effectiveness needs to be verified. The purpose of this verification is to ensure that the target location accurately covers the abnormally active brain region and does not overlap with other areas requiring intervention. First, check if the target location covers the abnormally active brain region. This can be done by comparing the extent of the target location with the location information of the abnormally active brain region. If the target location does not completely cover the abnormally active brain region, it indicates that the location may not be effective in intervening in the abnormal activity and needs adjustment. Second, check if the target location overlaps with other areas requiring intervention. In some cases, multiple abnormally active areas requiring intervention may exist simultaneously in the brain. If the target location overlaps with other areas, it may lead to mutual interference of intervention effects and even cause unnecessary harm to the brain. If overlap exists, a suboptimal location needs to be selected using a proximity search method. The proximity search method is a method of finding a suitable location near the target location. By searching the area around the target location, a suboptimal location is found that both covers the abnormally active brain region and does not overlap with other areas requiring intervention, thereby ensuring that the target device can accurately and effectively intervene in the abnormally active brain region.
[0102] Step S154: Generate a basic trigger instruction based on the time range and the position of action. The basic trigger instruction includes the association information of the start trigger time, end trigger time and position of action, which is used to indicate the start and stop timing and position of the target device.
[0103] Based on the previously determined intervention trigger time range and the target device's location, a basic trigger command is generated. This basic trigger command includes information relating the start and end trigger times to the location of action. The start and end trigger times, determined by the intervention trigger time range, specify the activation and deactivation times of the target device. The location information specifies the exact location where the target device needs to operate. By integrating this information to form the basic trigger command, it accurately instructs the target device when to activate, when to deactivate, and at what location. For example, the basic trigger command can be stored and transmitted in a predefined encoding format. Upon receiving the basic trigger command, the target device can accurately execute the corresponding operation based on the information contained within it.
[0104] Step S155: Adjust the action parameters of the target device by combining the continuous characteristics of abnormal activity and brain region characteristics. The action parameters include action intensity and action frequency. The adjustment process is based on preset parameter association rules.
[0105] After generating the basic trigger command, it is necessary to adjust the action parameters of the target device by combining the persistence characteristics of the abnormal activity and brain region characteristics. Action parameters mainly include action intensity and action frequency. The persistence characteristics of the abnormal activity reflect its severity and duration. For example, a longer duration of abnormal activity may indicate a more severe condition requiring stronger intervention. Brain region characteristics are related to the functional properties and sensitivity of different brain regions. Different brain regions may respond differently to external interventions, and some regions may have specific requirements for action intensity and frequency. To achieve more precise intervention, action parameters need to be adjusted based on pre-defined parameter association rules. These parameter association rules are pre-established based on extensive experimental data and clinical experience. For example, establishing a association rule between the duration of abnormal activity and action intensity; when the duration of abnormal activity is longer, the action intensity is increased accordingly. Establishing a association rule between the functional characteristics of the brain region with abnormal activity and action frequency; setting the action frequency of the target device according to the optimal action frequency for different brain regions. By querying these parameter association rules, appropriate action intensity and frequency can be determined based on the persistence characteristics of the abnormal activity and brain region characteristics, thereby improving the intervention effect of the target device.
[0106] Step S1551: Establish the first association rule between the duration of abnormal activity and the intensity of its effect, wherein the longer the duration, the greater the intensity of the effect.
[0107] To accurately adjust the intensity of intervention from the target device based on the duration of abnormal activity, a first association rule needs to be established between the duration of abnormal activity and the intensity of intervention. The core idea of this first association rule is that the longer the abnormal activity lasts, the more severe it is, requiring a greater intervention intensity. During the rule-building process, a large amount of experimental data can be collected, including abnormal activities of different durations and their corresponding optimal intervention intensities. By analyzing and statistically processing this data, the relationship between the duration of abnormal activity and the intervention intensity can be identified. For example, a curve fitting method can be used to obtain a function that describes this relationship. In practical applications, when abnormal activity is detected, the appropriate intervention intensity can be determined by consulting this first association rule based on its duration. This ensures that the target device provides an appropriate intervention intensity when faced with abnormal activities of varying durations, thereby more effectively intervening in brain neural activity.
[0108] Step S1552: Establish a second association rule between the severity of abnormal activity and the intensity of its effect, wherein the higher the severity, the greater the intensity of the effect.
[0109] Besides the duration of anomalous activity, its severity is also a crucial factor influencing the intensity of intervention. Therefore, a second correlation rule needs to be established between the severity of anomalous activity and the intensity of intervention. The severity of anomalous activity can be measured in various ways, such as its amplitude and frequency variations. Similarly, by collecting extensive experimental data, the optimal intervention intensity corresponding to different severities of anomalous activity can be analyzed to identify the correlation between the two. When establishing the rule, the severity of anomalous activity may be categorized, with each level corresponding to a suitable range of intervention intensity. When anomalous activity is detected, its severity is first assessed, and then the corresponding intervention intensity is determined according to the second correlation rule. The establishment of this second correlation rule can further refine the adjustment of the intervention intensity, enabling the target device to provide more precise intervention based on the actual severity of the anomalous activity.
[0110] Step S1553: Establish a third association rule between the functional characteristics and frequency of abnormal brain regions, where different brain regions correspond to preset optimal frequencies of action.
[0111] Different brain regions possess different functional characteristics and require varying frequencies of external intervention. Therefore, it is necessary to establish a third association rule between the functional characteristics of abnormally active brain regions and the frequency of intervention. Before establishing this rule, detailed studies of each brain region are required to understand its functional characteristics and its response to different intervention frequencies. Through extensive experiments and research, the preset optimal intervention frequency for each brain region is determined. These optimal frequencies are those that most effectively regulate neural activity in that brain region. In practical applications, once the abnormally active brain region is identified, the third association rule allows for the setting of appropriate intervention frequencies for the target device. For example, for a specific brain region, the preset optimal intervention frequency might be a specific frequency range, and the target device will operate within this range to achieve effective intervention in the neural activity of that brain region.
[0112] Step S1554: Establish the fourth association rule between the sensitivity of abnormally active brain regions and the frequency of action, wherein the higher the sensitivity, the closer the frequency of action is to the lower limit of the physiological tolerance range.
[0113] Considering the varying sensitivities of different brain regions, a fourth association rule needs to be established to correlate the sensitivity of abnormally active brain regions with the frequency of intervention. The sensitivity of a brain region reflects its responsiveness to external interventions. More sensitive brain regions may be more sensitive to changes in the frequency of intervention; excessively high frequencies may cause unnecessary stimulation or even exceed their physiological tolerance range. Therefore, when a brain region is highly sensitive, the frequency of intervention should be closer to the lower limit of its physiological tolerance range. In establishing the fourth association rule, the sensitivity of different brain regions can be determined through experiments and research, and the relationship between sensitivity and frequency of intervention can be identified. For example, for highly sensitive brain regions, the frequency of intervention can be set at the lower end of the physiological tolerance range to ensure effective intervention without overstimulation. In practical applications, the fourth association rule can be consulted based on the sensitivity of the abnormally active brain region to adjust the frequency of the target device, achieving safer and more effective intervention.
[0114] Step S1555: Determine the initial action intensity by querying the first association rule and the second association rule based on the duration and severity of the abnormal activity; determine the initial action frequency by querying the third association rule and the fourth association rule based on the functional characteristics and sensitivity of the brain region.
[0115] When determining the action parameters of the target device, it is necessary to comprehensively consider the duration, severity, brain region functional characteristics, and sensitivity of the abnormal activity. Based on the duration of the abnormal activity, a first association rule is consulted to obtain a reference value for the action intensity corresponding to the duration. Then, based on the severity of the abnormal activity, a second association rule is consulted to obtain another reference value for the action intensity corresponding to the severity. By combining these two reference values, the initial action intensity is determined. Similarly, based on the brain region functional characteristics, a third association rule is consulted to obtain a reference value for the action frequency corresponding to the brain region functional characteristics; based on the brain region sensitivity, a fourth association rule is consulted to obtain another reference value for the action frequency corresponding to the sensitivity. By combining these two reference values, the initial action frequency is determined. In this way, by combining multiple association rules, the action intensity and frequency of the target device can be preliminarily determined based on the specific circumstances of the abnormal activity.
[0116] Step S1556: Perform joint verification processing on the initial action intensity and initial action frequency to ensure that the combination of the initial action intensity and initial action frequency does not exceed the equipment safety threshold and meets the physiological tolerance requirements. If it fails, adjust the initial action intensity and initial action frequency by a preset step size until they do not exceed the equipment safety threshold and meet the physiological tolerance requirements.
[0117] After determining the initial action intensity and frequency, they need to be jointly validated. This is to ensure that the combination of initial action intensity and frequency neither exceeds the safety threshold of the target device nor meets the physiological tolerance requirements of the brain. The target device has its own safe operating range; exceeding this range may lead to device damage or unnecessary harm to the brain. The brain also has its physiological tolerance range; excessively high action intensity and inappropriate action frequency may cause adverse reactions. During the joint validation process, it can be checked whether the combination of initial action intensity and frequency meets these requirements. If not, i.e., exceeding the device's safety threshold or not meeting physiological tolerance requirements, the initial action intensity and frequency need to be adjusted according to a preset step size. The preset step size is a pre-set adjustment range; by gradually adjusting the action intensity and frequency, their combination is ultimately ensured to not exceed the device's safety threshold and meet physiological tolerance requirements. For example, if the initial action intensity is found to be too high, the action intensity is reduced according to the preset step size; if the initial action frequency is found to be inappropriate, the action frequency is adjusted according to the preset step size. Through continuous adjustment and validation, a safe and effective combination of action intensity and frequency is finally determined.
[0118] Step S156: Perform safety verification on the adjusted action parameters. If the verification fails, reduce the intensity or adjust the frequency according to the preset rules until the safety requirements are met.
[0119] After adjusting the action parameters, a safety verification process is required. This is the final safeguard to ensure that the target device, operating according to the adjusted parameters, poses no safety risk to the brain. The safety verification process assesses multiple aspects, such as whether the action intensity is within the brain's tolerance range and whether the action frequency conforms to the brain's physiological rhythms. If the verification fails, it indicates that the adjusted action parameters still pose safety risks. In this case, the action intensity needs to be reduced or the action frequency adjusted according to preset rules. These preset rules are established in advance based on extensive experimental data and safety standards. For example, if the action intensity is too high, it is gradually reduced according to the preset rules; if the action frequency is inappropriate, it is adjusted to better suit the brain's physiological requirements. This process of continuous safety verification and parameter adjustment continues until the action parameters meet the safety requirements.
[0120] Step S157: Integrate the final determined time range, location of action, and parameters of action into a complete EEG processing instruction. The EEG processing instruction includes spatiotemporal information and device control parameters, which is used to trigger a targeted response operation of the target device.
[0121] After determining the time range, shifting the action location, adjusting the action parameters, and verifying safety, the finalized time range, action location, and action parameters are integrated into a complete EEG processing command. This EEG processing command contains spatiotemporal information (time range and action location) and device control parameters (action intensity and action frequency), accurately instructing the target device when, where, and with what parameters to operate. During the integration process, this information can be encoded in a predefined format for easy storage and transmission. Upon receiving the EEG processing command, the target device can perform targeted response operations based on the information contained within. For example, within a specified time range, at a specific action location, and with appropriate action intensity and frequency, intervention can be performed on brain neural activity, thereby achieving effective regulation and treatment of abnormal EEG activity.
[0122] For example, the method may also include:
[0123] Step S210: Obtain a training dataset containing normal EEG samples and abnormal EEG samples. Each training sample in the training dataset contains a set of original EEG signals, manually labeled abnormal activity time periods, and brain region localization information.
[0124] To train the pre-trained EEG analysis model, a training dataset containing both normal and abnormal EEG samples is needed. This training dataset contains rich information on brain neural activity. Each training sample in the dataset includes a set of raw EEG signals, manually labeled abnormal activity periods, and brain region localization information. The raw EEG signals are collected from different individuals using EEG acquisition equipment; these individuals may be in normal or abnormal states. The manually labeled abnormal activity periods and brain region localization information are added by professional medical personnel or researchers based on detailed analysis and judgment of the EEG signals. By carefully observing the characteristics of the EEG signals, the periods of abnormal activity and the corresponding brain regions are identified and accurately labeled. By collecting a large number of these training samples, a representative training dataset is constructed.
[0125] Step S220: Perform quality optimization and feature extraction processing on the original EEG signal set in the training dataset to generate EEG feature combinations for training.
[0126] After obtaining the training dataset, the raw EEG signal set needs to undergo quality optimization and feature extraction processing. The quality optimization process is similar to the previously described process for optimizing the raw EEG signal set, including steps such as interference assessment, interference suppression, baseline correction, time alignment, and quality screening. These processes remove interference and noise from the raw EEG signals, improving signal quality and stability. Feature extraction involves extracting key features reflecting brain neural activity patterns from the optimized EEG signals. This also includes steps such as time-frequency decomposition, energy statistics, synchronicity analysis, spatial mapping, and feature standardization and integration. These processes generate a training EEG feature set. This training EEG feature set contains energy distribution features of different frequency rhythms and inter-channel signal synchronicity features, providing high-quality input features for training the EEG analysis model.
[0127] Step S230: Input the combined EEG features for training into the initial EEG analysis model, generate the predicted abnormal activity period identifiers and brain region localization information through forward propagation, and obtain the prediction results.
[0128] The generated training EEG feature combination is input into the initial EEG analysis model. The initial EEG analysis model is a pre-built neural network model containing several key modules, including a rhythm analysis module, a synchronicity analysis module, and a temporal modeling module. After the training EEG feature combination is input, the model undergoes a forward propagation process. Forward propagation refers to the process of input data being passed and processed sequentially through the various modules of the model. First, the training EEG feature combination enters the rhythm analysis module, extracting local fluctuation patterns and global trend patterns of energy distribution at different frequencies to generate a first feature vector reflecting rhythmic characteristics. Then, it enters the synchronicity analysis module, which encodes the brain region coordination relationships in the spatial distribution map using graph structure modeling methods, generating a second feature vector reflecting synchronicity characteristics. Next, the first and second feature vectors enter the temporal modeling module, which analyzes the changes in features over time using temporal modeling methods, generating a comprehensive feature vector containing temporal context information. Finally, based on the comprehensive feature vector, predicted abnormal activity period identifiers and brain region localization information are generated. The prediction result is a judgment made by the model based on the combination of EEG features used for training, and it will be compared with the results of human annotation to evaluate the model's performance.
[0129] Step S240: Calculate the difference between the prediction result and the manually labeled result. The difference includes the temporal deviation of the abnormal activity period identification and the spatial deviation of the brain region localization information.
[0130] To evaluate the performance of the initial EEG analysis model, it is necessary to calculate the difference between the predicted results and the manually labeled results. This difference mainly includes the temporal deviation of the abnormal activity period identification and the spatial deviation of the brain region localization information. For the temporal deviation of the abnormal activity period identification, the time difference is calculated by comparing the predicted start and end times of the abnormal activity period with the manually labeled start and end times. The smaller the temporal deviation, the more accurate the model's prediction of the abnormal activity period. For the spatial deviation of the brain region localization information, the spatial distance is calculated by comparing the predicted brain region location with the manually labeled brain region location. The smaller the spatial deviation, the more accurate the model's localization of the abnormally active brain region. By comprehensively considering both temporal and spatial deviations, a comprehensive difference value is obtained, which reflects the degree of deviation between the predicted and actual results.
[0131] Step S250: Adjust the model parameters of the initial EEG analysis model using the backpropagation method to minimize the difference value until the prediction accuracy of the initial EEG analysis model on the validation set reaches a preset standard, and finally obtain the pre-trained EEG analysis model.
[0132] After obtaining the difference between the predicted results and the manually labeled results, the model parameters of the initial EEG analysis model need to be adjusted using backpropagation. Backpropagation is an important algorithm in neural network training. Its core idea is to calculate the contribution of each model parameter to the difference based on the difference value, and then adjust these parameters according to a set rule so that the difference value gradually decreases.
[0133] Specifically, the backpropagation process starts from the model's output layer and gradually backtracks to the input layer. First, the gradient of the difference value with respect to the model output is calculated; this gradient represents the rate of change of the difference value with respect to the output. Then, based on this gradient, the gradients of the connection weights between the output layer and the previous layer, as well as the gradients of the biases of the neurons in the previous layer, are calculated. Next, these gradients are propagated to the previous layer, continuing to calculate the gradients of the connection weights and biases between the previous and the layer before that, and so on, until the gradients of all model parameters are calculated.
[0134] After calculating the gradients of all model parameters, these gradients can be used to adjust the model parameters. A commonly used method is gradient descent, which updates the model parameters in the opposite direction of the gradient. For example, for a given model parameter, the updated parameter value is obtained by subtracting a learning rate multiplied by the gradient of that parameter from its current value. The learning rate is a pre-defined hyperparameter that controls the step size of each parameter update. A learning rate that is too large may prevent the initial EEG analysis model from converging, while a learning rate that is too small will result in excessively slow convergence.
[0135] After each parameter update, the updated initial EEG analysis model is forward-propagated again on the training dataset to generate new predictions and calculate new discrepancy values. This process is repeated, continuously adjusting the model parameters to gradually reduce the discrepancy values.
[0136] To evaluate the generalization ability of the initial EEG analysis model, a validation set is used. The validation set is a subset of the entire dataset that is not used in model training; it is only used to evaluate the performance of the initial EEG analysis model on unseen data. After each parameter update, in addition to calculating the dissimilarity values on the training dataset, the updated initial EEG analysis model is tested on the validation set, and the prediction accuracy on the validation set is calculated. Prediction accuracy can be measured using various metrics, such as precision and recall.
[0137] Parameter adjustments and accuracy assessments are continuously performed until the initial EEG analysis model's prediction accuracy on the validation set reaches a preset standard. This preset standard is an accuracy threshold pre-set based on specific application needs and task requirements. When the model's prediction accuracy on the validation set reaches this accuracy threshold, the initial EEG analysis model is considered to have learned sufficient features and patterns, and the training process ends. The resulting initial EEG analysis model is the pre-trained EEG analysis model.
[0138] The pre-trained EEG analysis model has good performance and can accurately perform pattern recognition on the combination of input EEG features, generating EEG detection results that include abnormal activity period identifiers and corresponding brain region localization information.
[0139] During data collection and processing, data such as electroencephalogram (EEG) signals may contain sensitive information, such as individual brain activity characteristics. To protect this sensitive data, a series of privacy protection and leak prevention technologies are employed. For example, during data collection, strict security management is implemented for the collection equipment to ensure data encryption and integrity during transmission. During data storage, data is stored on secure servers and encrypted using encryption algorithms to prevent unauthorized access. During data usage, strict access control is implemented for personnel, allowing only authorized personnel to access and process the data. Furthermore, during data processing, the data is anonymized to remove personally identifiable information, ensuring data privacy and security.
[0140] Figure 2 The illustration shows exemplary hardware and software components of an AI-based EEG detection data processing system 100 that can implement the ideas of this application, according to some embodiments of this application. For example, a processor 120 can be used in the AI-based EEG detection data processing system 100 and to perform the functions in this application.
[0141] The AI-based EEG detection data processing system 100 can be a general-purpose server or a special-purpose server, both of which can be used to implement the AI-based EEG detection data processing method of this application. Although only one server is shown in this application, for convenience, the functions described in this application can be implemented in a distributed manner on multiple similar platforms to balance the processing load.
[0142] For example, the AI-based EEG detection data processing system 100 may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and various forms of storage media 140, such as a disk, ROM, or RAM, or any combination thereof. Exemplarily, the AI-based EEG detection data processing system 100 may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The methods of this application can be implemented according to these program instructions. The AI-based EEG detection data processing system 100 also includes an I / O interface 150 between the computer and other input / output devices.
[0143] For ease of explanation, only one processor is described in the AI-based EEG detection data processing system 100. However, it should be noted that the AI-based EEG detection data processing system 100 of this application may also include multiple processors, and therefore the steps performed by one processor as described in this application may also be performed jointly or individually by multiple processors. For example, if the processor of the AI-based EEG detection data processing system 100 performs steps A and B, it should be understood that steps A and B may also be performed jointly by two different processors or individually by one processor. For example, the first processor performs step A, the second processor performs step B, or the first processor and the second processor jointly perform steps A and B.
[0144] Furthermore, this embodiment of the invention also provides a readable storage medium, wherein computer-executable instructions are preset in the readable storage medium, and when the processor executes the computer-executable instructions, the above-mentioned AI-based EEG detection data processing method is implemented.
[0145] It should be noted that, in order to simplify the description of the present invention and thus help to understand one or more embodiments of the invention, multiple features may sometimes be grouped into one embodiment, drawing or description thereof in the foregoing description of the embodiments of the present invention.
Claims
1. A method for processing electroencephalogram (EEG) detection data based on AI, characterized in that, The method includes: A set of raw EEG signals acquired continuously from multiple channels is obtained. The set of raw EEG signals consists of multiple time-stamped EEG signal sequences, each EEG signal sequence corresponding to a neural electrical activity record within a detection period. The original set of EEG signals is subjected to quality optimization processing to obtain a set of effective EEG signals that meet the detection standards. The set of effective EEG signals includes stable signal segments with acceptable signal interference levels. The effective set of EEG signals is processed by feature extraction to obtain a combination of EEG features reflecting the pattern of neural activity. The combination of EEG features includes energy distribution features of different frequency rhythms and signal synchronization features between channels. The pre-trained EEG analysis model is invoked to perform pattern recognition processing on the EEG feature combination, generating EEG detection results containing abnormal activity period identifiers and corresponding brain region localization information; Based on the abnormal activity period identifiers and brain region localization information in the EEG detection results, an EEG processing instruction containing spatiotemporal information is generated, and the EEG processing instruction is sent to the target device; The effective EEG signal set is subjected to feature extraction processing to obtain a combination of EEG features reflecting neural activity patterns. This combination of EEG features includes energy distribution characteristics of different frequency rhythms and signal synchronicity characteristics between channels, including: Each EEG signal sequence in the effective EEG signal set is subjected to time-frequency decomposition processing. The time-domain signal is decomposed into time-frequency energy distributions in multiple frequency intervals through time-frequency analysis methods. Each element of the time-frequency energy distribution represents the signal energy of the corresponding time point and frequency interval. The time-frequency energy distribution is subjected to energy statistical processing to calculate the cumulative energy value of each frequency interval within the total duration of the signal sequence, and to calculate the proportion of the cumulative energy of each frequency interval to the total energy of all frequency intervals, thereby generating an energy distribution feature that includes the proportion of energy of different frequency rhythms. Synchronization analysis is performed on the multi-channel EEG signal sequences in the effective EEG signal set to calculate the degree of synchronization between any two channel signals within the same time window. The degree of synchronization is determined by analyzing the fluctuation consistency and phase relationship of the signals, and is used to characterize the synergistic relationship of neural electrical activities in different brain regions. The synchronization level is spatially mapped to convert the synchronization level between channels into a two-dimensional spatial distribution map. The value of each position in the two-dimensional spatial distribution map represents the coordination strength between the corresponding brain region and other brain regions. The energy distribution characteristics and spatial distribution map are subjected to feature standardization and integration processing to generate a combination of EEG features.
2. The AI-based EEG detection data processing method according to claim 1, characterized in that, The process of optimizing the original EEG signal set to obtain a valid EEG signal set that meets the detection standards includes: Interference assessment processing is performed on each EEG signal sequence in the original EEG signal set. By analyzing the fluctuation pattern of the signal and comparing it with the typical characteristics of normal neural electrical activity, it is determined whether there are interference components that are not neural electrical activity. Based on the judgment results, interference suppression processing is performed on the EEG signal sequence containing interference components. An independent interference reference signal is separated from the original signal. The signal to be processed and the interference reference signal are input into the adaptive adjustment module. The module parameters of the adaptive adjustment module are dynamically adjusted through an iterative optimization method to minimize the difference between the output signal and the original signal, thereby attenuating the interference components and retaining the effective components of neural electrical activity, and obtaining the EEG signal sequence after interference suppression. Baseline correction was performed on the EEG signal sequence after interference suppression. The overall trend of the EEG signal over a long period of time was calculated. A baseline trend curve was generated by linear fitting. The original signal was subtracted from the trend curve to eliminate baseline drift and obtain the corrected EEG signal sequence. The corrected EEG signal sequence is time-aligned. Using the time stamp of the main acquisition device as a reference, the time stamp of each channel signal is adjusted by interpolation to make the time stamp deviation of different channel signals less than the accuracy required by the detection standard, thus obtaining the target EEG signal sequence. The target EEG signal sequence is subjected to quality screening to obtain all signal sequences that meet the detection criteria, and finally a valid EEG signal set is formed.
3. The AI-based EEG detection data processing method according to claim 2, characterized in that, The process involves performing interference suppression processing on the EEG signal sequence containing interfering components based on the judgment result. An independent interference reference signal is separated from the original signal. The signal to be processed and the interference reference signal are input into an adaptive adjustment module. The module parameters of the adaptive adjustment module are dynamically adjusted through an iterative optimization method to minimize the difference between the output signal and the original signal, thereby attenuating the interference components and retaining the effective components of neural electrical activity, resulting in an interference-suppressed EEG signal sequence, including: Identify dedicated interference channel signals in the original EEG signal set, wherein the dedicated interference channel is used only to collect environmental interference without contacting the subject being tested, and the dedicated interference channel signals contain non-neural electrical activity components; The EEG signal sequence to be processed is used as the main input signal, and the dedicated interference channel signal is used as the auxiliary input signal. Both signals are simultaneously input to the two input ports of the adaptive adjustment module. The parameters of the adaptive adjustment module are initialized to random small values. The correlation between the main input signal and the auxiliary input signal is calculated. The module parameters of the adaptive adjustment module are adjusted by an iterative optimization method so that the difference between the output signal of the adaptive adjustment module and the main input signal gradually decreases. In each iteration, the module parameters of the adaptive adjustment module are adjusted according to the current difference value until the difference value converges to a stable state. The output signal of the corresponding adaptive adjustment module is then used as the effective neural electrical activity signal after the interference is suppressed. The effective neural electrical activity signal is subjected to feature verification processing to check whether the effective neural electrical activity signal retains the typical rhythmic features of the original neural electrical activity, and the verified effective neural electrical activity signal is used as the final EEG signal sequence after interference suppression.
4. The AI-based EEG detection data processing method according to claim 1, characterized in that, The energy statistical processing of the time-frequency energy distribution involves calculating the cumulative energy value of each frequency interval within the total duration of the signal sequence, and calculating the proportion of the cumulative energy of each frequency interval to the total energy of all frequency intervals, generating an energy distribution feature that includes the proportion of energy in different frequency rhythms, including: The time-frequency energy distribution is integrated along the frequency dimension, and the energy values of each frequency interval at each time point are summed to obtain the total energy value at each time point. The energy value of each frequency interval is integrated along the time dimension, and the energy values of the frequency interval at all time points are summed to obtain the cumulative energy value of the frequency interval over the total duration of the signal sequence. Calculate the sum of the cumulative energy values across all frequency ranges, and use this sum as the total energy value of the signal sequence. Divide the cumulative energy value of each frequency range by the total energy value to obtain the energy percentage of that frequency range; The energy proportions of each frequency range are arranged in order to generate an energy distribution feature vector, which is used to represent the relative importance of different frequency rhythms in neural electrical activity.
5. The AI-based EEG detection data processing method according to claim 1, characterized in that, The pre-trained EEG analysis model is invoked to perform pattern recognition processing on the EEG feature combinations, generating EEG detection results containing abnormal activity period identifiers and corresponding brain region localization information, including: The combined EEG features are input into the rhythm analysis module of the EEG analysis model to extract the local fluctuation patterns and global trend patterns of rhythm energy distribution at different frequencies, and generate a first feature vector reflecting the rhythm features. The combined EEG features are input into the synchronization analysis module of the EEG analysis model. The brain region coordination relationship in the spatial distribution map is encoded by the graph structure modeling method to generate a second feature vector reflecting the synchronization features. The first and second feature vectors are input into the temporal modeling module of the EEG analysis model. The temporal modeling method is used to analyze the change pattern of features over time and generate a comprehensive feature vector containing temporal context information. The comprehensive feature vector is subjected to deviation evaluation processing, and the degree of difference between the comprehensive feature vector and the pre-stored normal pattern feature vector is calculated. The degree of difference is used to represent the level of deviation between neural activity and normal state within the current time window. The deviation level is subjected to temporal continuity detection processing, and the time period in which the deviation level exceeds the standard within the continuous time window is identified as the abnormal activity period, and the corresponding start time mark and end time mark are recorded as the abnormal activity period identifier; Spatial localization processing was performed on the synchronicity characteristics during the abnormal activity period. The contribution of each brain region to the deviation level was analyzed, and the coordinates of the brain region with the largest contribution were used as the localization information of the corresponding brain region of the abnormal activity.
6. The AI-based EEG detection data processing method according to claim 5, characterized in that, The step of inputting the first feature vector and the second feature vector into the temporal modeling module of the EEG analysis model, and analyzing the change pattern of features over time using a temporal modeling method to generate a comprehensive feature vector containing temporal context information includes: The first and second feature vectors are arranged in chronological order to form a time-series feature sequence, where each time window corresponds to a feature vector. The hidden state of the time series modeling module is initialized to an initial value, and the feature vector of each time window is sequentially input into the time series modeling module; The update mechanism of the time-series modeling module controls the transmission of historical feature information, generating a hidden state vector containing historical context; The feature vector of the current time window is fused with the hidden state vector to generate a comprehensive feature representation that includes current features and historical information; The comprehensive feature representation is input into the fully connected layer for feature optimization to generate a comprehensive feature vector.
7. The AI-based EEG detection data processing method according to claim 1, characterized in that, The generation of EEG processing instructions containing spatiotemporal information based on the abnormal activity period identifiers and brain region localization information in the EEG detection results includes: The start and end time markers in the abnormal activity period identifier are parsed to determine the time range for intervention triggering. The time range covers the abnormal activity period and includes a preset advance and delay amount. The EEG acquisition channel position corresponding to the brain region localization information is extracted, and the EEG acquisition channel position is converted into the target device's operating position using a coordinate transformation method. The coordinate transformation method is based on a pre-established correspondence table between EEG channels and device operating positions. The effectiveness of the target location is verified by checking whether the target location covers the abnormally active brain region and does not overlap with other areas that need intervention. If there is overlap, the second-best location is selected by the nearest neighbor search method. A basic trigger instruction is generated based on the time range and the location of action. The basic trigger instruction includes the association information of the start trigger time, the end trigger time and the location of action, and is used to indicate the start and stop timing and location of action of the target device. The target device's operating parameters are adjusted by combining the persistent characteristics of abnormal activity and brain region characteristics. The operating parameters include operating intensity and operating frequency. The adjustment process is based on preset parameter association rules. The adjusted parameters are subjected to safety verification. If the verification fails, the intensity is reduced or the frequency is adjusted according to the preset rules until the safety requirements are met. The final determined time range, location of action, and parameters of action are integrated into a complete EEG processing instruction. This EEG processing instruction includes spatiotemporal information and device control parameters, which is used to trigger a targeted response operation of the target device.
8. The AI-based EEG detection data processing method according to claim 7, characterized in that, The adjustment of the target device's parameters, which combines the persistent characteristics of abnormal activity with brain region characteristics, includes the effect intensity and the effect frequency, and includes: Establish a first association rule between the duration of abnormal activity and the intensity of its effect, wherein the longer the duration, the greater the intensity of the effect; Establish a second association rule between the severity of abnormal activity and its intensity, where a higher severity corresponds to a greater intensity of influence. A third association rule is established between the functional characteristics and frequency of abnormal brain regions, where different brain regions correspond to a preset optimal frequency of action. A fourth association rule was established between the sensitivity of abnormally active brain regions and the frequency of action, wherein the higher the sensitivity, the closer the frequency of action is to the lower limit of the physiological tolerance range. The initial intensity of action is determined by querying the first and second association rules based on the duration and severity of abnormal activity, and the initial frequency of action is determined by querying the third and fourth association rules based on the functional characteristics and sensitivity of brain regions. The initial action intensity and initial action frequency are jointly verified to ensure that the combination of the initial action intensity and initial action frequency does not exceed the equipment safety threshold and meets the physiological tolerance requirements. If it fails, the initial action intensity and initial action frequency are adjusted by a preset step size until they do not exceed the equipment safety threshold and meet the physiological tolerance requirements.
9. An AI-based brainwave detection data processing system, characterized in that, The method includes a processor and a memory, the memory being connected to the processor. The memory is used to store programs, instructions, or code, and the processor is used to execute the programs, instructions, or code in the memory to implement the AI-based EEG detection data processing method according to any one of claims 1-8.
Citation Information
Patent Citations
Brain wave inspection device and method based on artificial intelligence
CN111508578A
Electroencephalogram feature proxy measurement and pseudo-multi-mode freezing gait detection method and device
CN113812964A
