A pain real-time discrimination and treatment effect evaluation system based on EEG microstate monitoring

The EEG microstate monitoring system uses a deep learning model to determine pain levels and assess treatment effects in real time, solving the objectivity and accuracy problems of traditional pain identification and treatment assessment, and realizing real-time monitoring of pain status and quantitative evaluation of treatment effects.

CN120837016BActive Publication Date: 2026-03-17GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional pain assessment relies on patients' subjective descriptions, which lack objectivity and accuracy. Treatment effectiveness assessment is affected by psychological state and environmental factors, making it difficult to assess pain status and treatment effectiveness in real time and accurately.

Method used

The EEG microstate monitoring system generates template images through the microstate extraction and analysis module. Combined with a deep learning pain detection model, it can determine the pain level in real time and evaluate the treatment effect through the feature parameter set before and after treatment, generating quantitative efficacy indicators.

Benefits of technology

It enables real-time, precise classification of pain states and objective quantitative assessment of treatment effects, providing scientific clinical decision support, reducing reliance on subjective patient feedback, and improving diagnostic efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120837016B_ABST
    Figure CN120837016B_ABST
Patent Text Reader

Abstract

The application relates to a pain real-time discrimination and treatment effect evaluation system based on EEG microstate monitoring. The system comprises the following modules: a microstate extraction and analysis module which extracts GFP peak topography from EEG signal data, optimizes a template map, calculates the average duration of each microstate category and the like, and outputs a microstate feature parameter set; a pain real-time discrimination module which inputs the microstate feature parameter set into a deep learning model for detection to obtain a detection result containing a pain level; and a treatment effect evaluation module which obtains and compares the microstate feature parameter set before and after treatment, obtains a quantitative treatment effect index, and generates a report containing the index, analysis results and a microstate change trend chart. The system can monitor the pain state of a patient in real time through EEG signal microstate, and can provide objective evaluation indexes about the treatment effect for a clinician by quantifying the dynamic change of the EEG microstate of the patient before and after treatment, so that the scientificity and accuracy of treatment effect monitoring are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of biomedical engineering technology, and in particular relates to a real-time pain discrimination and treatment effect evaluation system based on EEG microstate monitoring. Background Technology

[0002] Pain is a common and complex symptom in clinical practice, significantly impacting patients' quality of life. Specifically, pain can be categorized into acute pain and chronic pain. Acute pain is a natural response of the body to acute injury, while chronic pain refers to persistent pain that exceeds the normal tissue healing time and can become a long-term health burden. Pain is significantly subjective; different individuals experience varying degrees of pain from the same stimulus, and the same individual's pain tolerance can differ in different environments. This subjectivity presents numerous challenges to the identification of pain states and the assessment of treatment effectiveness.

[0003] With the in-depth development of EEG signal analysis technology and neuroscience research, EEG microstate analysis technology has gradually become an important tool for studying the dynamic functional activities of the brain. This technology can decompose multi-channel EEG signals into a finite number of microstates by analyzing the transient patterns of scalp potential topology, capturing the brain's functional reorganization patterns on a sub-second timescale. It provides a concise and powerful tool for understanding complex brain functions and has wide applications in neuroscience research, disease diagnosis, cognitive function research, and brain-computer interfaces. However, in traditional techniques, pain assessment mainly relies on the patient's subjective description, and treatment effect evaluation mainly relies on the patient's subjective feedback and some indirect physiological indicators, such as behavioral performance and facial expressions. Regarding pain assessment, because pain is significantly subjective—different individuals experience different levels of pain from the same stimulus, and the same individual's pain tolerance varies in different environments—traditional methods relying on the patient's subjective description cannot capture subtle changes in the patient's pain state in real time, nor can they accurately and objectively assess the pain state. In terms of evaluating treatment effectiveness, traditional methods that rely on subjective descriptions and indirect physiological indicators are easily affected by various factors such as the patient's psychological state and environmental factors, lacking objectivity and accuracy, and failing to provide clinicians with reliable evaluation basis. Summary of the Invention

[0004] Therefore, it is necessary to provide a real-time pain identification and treatment effect evaluation system based on EEG microstate monitoring to address the above-mentioned technical problems, so as to identify the patient's pain status in real time and accurately, and to scientifically and objectively evaluate the treatment effect, thus providing strong support for clinical treatment decisions.

[0005] Firstly, this application provides a real-time pain discrimination and treatment effect evaluation system based on EEG microstate monitoring, including:

[0006] The micro-state extraction and analysis module is used for:

[0007] The GFP peak topographic map was extracted from the EEG signal data as the original map, and the original map was optimized based on the clustering algorithm to generate a microstate template map.

[0008] For the microstate template graph, calculate the average duration, occurrence frequency, overall coverage and inter-class transition probability of each microstate category, and output the microstate feature parameter set;

[0009] The real-time pain discrimination module is used to input the micro-state feature parameter set into the deep learning-based pain detection model for detection and obtain the detection results. The detection results include the pain level, which can be any one of no pain, mild, moderate and severe.

[0010] The treatment efficacy evaluation module is used for:

[0011] Obtain the first set of microstate feature parameters before treatment and the second set of microstate feature parameters after treatment;

[0012] By comparing the feature parameters of each microstate category in the first microstate feature parameter set with those in the second microstate feature parameter set, quantitative efficacy indicators are obtained, and efficacy analysis reports are generated. The quantitative efficacy indicators include the rate of change of average duration, the difference in inter-class conversion probability, and the coverage recovery rate indicator. The efficacy analysis report includes the quantitative efficacy indicators, efficacy analysis results, and microstate change trend graphs.

[0013] In one embodiment, the microstate extraction and analysis module includes a microstate template graph extraction subunit, used for:

[0014] Calculate the global field power at each time point in the EEG signal data, extract the time points corresponding to the local maxima of the global field power, and use the GFP peak topographic map corresponding to the time points as the original map.

[0015] Based on the improved K-means clustering algorithm, n topographic maps are randomly selected from the original map as initial template maps. The improved K-means clustering algorithm selects the GFP peak topographic map as the original map and uses the maximization of the proportion of total variance explained as the iteration termination condition.

[0016] Calculate the spatial correlation coefficient between each initial template image and the original images, and classify each original image into the template category with the largest spatial correlation coefficient.

[0017] Spatial averaging is performed on the original plots in each template category to generate new template plots. The classification and averaging operations are repeated until the proportion of total variance explained is maximized, and the microstate template plot is output.

[0018] In one embodiment, the microstate extraction and analysis module includes a microstate feature extraction subunit, used for:

[0019] Spatial correlation coefficient matching is performed between EEG signal data and microstate template diagrams according to time series to determine the microstate category at each time point and obtain the matching results;

[0020] Based on the matching results, the average duration, frequency of occurrence, and overall coverage of each microstate category are statistically analyzed.

[0021] Based on the matching results, the jump relationship of micro-state categories corresponding to adjacent time points is analyzed, and the inter-class transition probability matrix is ​​calculated.

[0022] The microstate feature parameter set is obtained by combining the average duration, occurrence frequency, overall coverage, and inter-class transition probability matrix.

[0023] In one embodiment, the pain detection model is a pre-trained GNN+Transformer neural network model, and the real-time pain discrimination module includes:

[0024] The feature extraction subunit, used by the GNN and Transformer modules of the pain detection model, extracts features from the micro-state feature parameter set to generate a spatiotemporal fusion feature vector;

[0025] The classification and discrimination subunit is used for:

[0026] The spatiotemporal fusion feature vector is input into the fully connected classification layer, and the pain probability distribution of the pain state is output. The pain states include no pain, mild pain, moderate pain and severe pain.

[0027] The confidence score for each pain state is calculated based on the pain probability distribution, and the detection results are obtained by combining the pain probability distribution.

[0028] In one embodiment, the system further includes an EEG acquisition module for:

[0029] EEG signal data was collected using a wearable EEG acquisition device, which included 32 Ag-AgCl scalp electrodes.

[0030] During EEG signal data acquisition, the impedance of each Ag-AgCl scalp electrode is monitored in real time. When the impedance of the Ag-AgCl scalp electrode exceeds the safety threshold, an early warning command is generated. The early warning command is used to interrupt data acquisition and prompt adjustment of electrode contact.

[0031] EEG signal data is converted into a preset format file and stored in a micro-state feature database.

[0032] In one embodiment, the system further includes an EEG preprocessing module for:

[0033] Channel data location is performed on EEG signal data, valid signal channels are identified and invalid channel data is removed to obtain valid channel data;

[0034] Bandpass filtering is performed on the effective channel data to obtain filtered data;

[0035] Based on independent component analysis, the EEG artifacts, ECG artifacts and EMG artifacts were separated from the filtered data to obtain artifact-free EEG signal data.

[0036] Using the whole brain average potential as a reference, the artifact-free EEG signal data was re-referenced and a reference electrode was added to the electrode array to obtain the pre-processed EEG signal data.

[0037] Secondly, this application also provides a method for real-time pain discrimination and treatment effect evaluation based on EEG microstate monitoring, the method comprising:

[0038] The GFP peak topographic map was extracted from the EEG signal data as the original map, and the original map was optimized based on the clustering algorithm to generate a microstate template map.

[0039] For the microstate template graph, calculate the average duration, occurrence frequency, overall coverage and inter-class transition probability of each microstate category, and output the microstate feature parameter set;

[0040] The micro-state feature parameter set is input into a deep learning-based pain detection model for detection, and the detection results are obtained. The detection results include the pain level, which can be any one of no pain, mild, moderate and severe.

[0041] Obtain the first set of microstate feature parameters before treatment and the second set of microstate feature parameters after treatment;

[0042] By comparing the feature parameters of each microstate category in the first microstate feature parameter set with those in the second microstate feature parameter set, quantitative efficacy indicators are obtained, and efficacy analysis reports are generated. The quantitative efficacy indicators include the rate of change of average duration, the difference in inter-class conversion probability, and the coverage recovery rate indicator. The efficacy analysis report includes the quantitative efficacy indicators, efficacy analysis results, and microstate change trend graphs.

[0043] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the first aspect.

[0044] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the first aspect.

[0045] The aforementioned EEG microstate monitoring-based real-time pain discrimination and treatment efficacy evaluation system, through a microstate extraction and analysis module, extracts GFP peak topography from EEG signal data and optimizes it to generate microstate template maps. It then calculates a set of microstate feature parameters, such as average duration and frequency of occurrence, accurately capturing the brain's microstate characteristics at different times. This provides a comprehensive and accurate data foundation for subsequent pain discrimination and treatment efficacy evaluation. The real-time pain discrimination module can input the microstate feature parameter set into a deep learning-based pain detection model to obtain pain level detection results for no pain, mild, moderate, and severe pain. This enables real-time and accurate classification of the patient's pain state, helping doctors quickly and accurately grasp the patient's pain level, adjust treatment plans in a timely manner, and improve the efficiency and accuracy of clinical diagnosis. The treatment efficacy evaluation module can obtain quantitative efficacy indicators such as the average duration change rate, inter-class conversion probability difference, and coverage recovery rate by acquiring the microstate feature parameter set before and after treatment, comparing the feature parameters of each microstate category, and generating efficacy analysis reports that include these indicators, efficacy analysis results, and microstate change trend graphs. This provides doctors with objective and scientific basis for evaluating treatment efficacy and reduces reliance on subjective feedback from patients.

[0046] Through the coordinated operation of the three modules mentioned above, the system can not only accurately identify the patient's pain status in real time, but also provide objective and quantitative assessments of treatment effects, providing scientific and effective decision support for clinical decision-making and adjustments to subsequent treatment plans. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A schematic diagram of a system for real-time pain discrimination and treatment effect evaluation based on EEG microstate monitoring is provided as an exemplary embodiment of the present invention.

[0049] Figure 2 A schematic diagram of the comparison of EEG microstates before and after treatment, provided as an exemplary embodiment of the present invention;

[0050] Figure 3The flowchart illustrates a method for real-time pain discrimination and treatment effect evaluation based on EEG microstate monitoring, provided as an exemplary embodiment of the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] In one embodiment, such as Figure 1 As shown, a real-time pain discrimination and treatment effect evaluation system 100 based on EEG microstate monitoring is provided. This embodiment illustrates the application of this system to a terminal. It is understood that this system can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the system includes:

[0053] The micro-state extraction and analysis module 101 is used for:

[0054] The GFP peak topographic map was extracted from the EEG signal data as the original map, and the original map was optimized based on the clustering algorithm to generate a microstate template map.

[0055] For the microstate template graph, calculate the average duration, occurrence frequency, overall coverage, and inter-class transition probability of each microstate category, and output the microstate feature parameter set.

[0056] Specifically, EEG signal data contains rich information about brain activity, but the raw data is complex and subject to noise interference. GFP (Global Field Power) reflects the overall intensity of EEG signal activity on the scalp, and topographic maps with higher GFP exhibit better stability and signal-to-noise ratio, more accurately representing the brain's electrical activity state at a given moment. Therefore, the microstate extraction and analysis module 101 can calculate the GFP of each topographic map based on EEG signal data, thereby identifying topographic maps with higher stability and signal-to-noise ratio, which are then used as the original maps. Subsequently, a clustering algorithm can be used to optimize the original maps, generating a microstate template map. The clustering algorithm groups topographic maps with similar characteristics into one category. Furthermore, through continuous iteration, the most reasonable classification method is found, ultimately generating the microstate template map. This microstate template map represents typical patterns of the brain in different functional states, providing a data foundation for subsequent analysis of brain activity.

[0057] After generating the microstate template map, the microstate extraction and analysis module 101 can further analyze the microstate template map, calculating characteristic parameters such as the average duration, frequency of occurrence, overall coverage, and inter-class transition probability of each microstate category. These characteristic parameters comprehensively quantify the dynamic changes in brain activity, providing accurate data support for subsequent pain discrimination and treatment effect evaluation. Specifically, the average duration of each microstate category reflects the average duration the brain is in a specific microstate. The frequency of occurrence reflects how frequently a specific microstate appears within a certain period. Furthermore, by analyzing changes in the frequency of occurrence, we can understand whether the activity level and regularity of brain activity have changed due to pain or treatment. The overall coverage shows the proportion of each microstate category throughout the entire EEG signal monitoring period, macroscopically presenting the degree of participation of different microstates in brain activity. The inter-class transition probability reveals the possibility of mutual transformation between different microstates, reflecting the dynamic relationship between brain functional states.

[0058] The real-time pain discrimination module 102 is used to input the micro-state feature parameter set into the deep learning-based pain detection model for detection and obtain the detection result, which includes the pain level, which can be any one of no pain, mild, moderate and severe.

[0059] Specifically, the real-time pain discrimination module 102 can utilize the micro-state feature parameter set output by the micro-state extraction and analysis module 101, combined with deep learning technology, to achieve accurate classification of pain states. The deep learning pain detection model can be trained on a large amount of historical data, enabling it to identify micro-state feature patterns related to different pain levels. Illustratively, this historical data includes EEG micro-state features at different pain levels. Through training, the model can master the complex mapping relationship between micro-state features and pain levels. When the micro-state feature parameter set is input into the model, it can be analyzed and judged, ultimately outputting the detection result. This result includes pain levels specifically categorized as painless, mild, moderate, and severe. Through this process, real-time monitoring of the patient's pain state is achieved, overcoming the reliance on subjective patient feedback in traditional methods and improving the objectivity and accuracy of pain discrimination.

[0060] Treatment efficacy evaluation module 103 is used for:

[0061] Obtain the first set of microstate feature parameters before treatment and the second set of microstate feature parameters after treatment;

[0062] By comparing the feature parameters of each microstate category in the first microstate feature parameter set with those in the second microstate feature parameter set, quantitative efficacy indicators are obtained, and efficacy analysis reports are generated. The quantitative efficacy indicators include the rate of change of average duration, the difference in inter-class conversion probability, and the coverage recovery rate indicator. The efficacy analysis report includes the quantitative efficacy indicators, efficacy analysis results, and microstate change trend graphs.

[0063] Specifically, a first set of microstate feature parameters can be obtained before the patient receives treatment. This first set of microstate feature parameters represents the microstate characteristics of the patient's brain before treatment. After treatment, a second set of microstate feature parameters can be obtained. By comparing the feature parameters of each microstate category in the two sets, the treatment effect evaluation module 103 can calculate quantitative efficacy indicators. Among them, the rate of change in average duration reflects the change in the average duration of a specific microstate before and after treatment. For example, if the treatment is effective, the average duration of pain-related microstates may approach the normal level, and this is presented through the rate of change in average duration. The difference in inter-class transition probability reflects the difference in the transition probability between different microstates before and after treatment, which helps to understand whether the treatment has changed the dynamic transition pattern between brain functional states. For example, if the transition probability of certain microstates that frequently transitioned in a pain state decreases after treatment, it indicates that the treatment has had a positive impact on the functional connectivity of the brain. The coverage recovery index measures the recovery of the overall coverage of each microstate category after treatment, indirectly reflecting the impact of treatment on the overall functional state distribution of the brain. If the coverage is closer to that of microstates in a normal state, it indicates a better treatment effect. Based on these quantitative efficacy indicators, the treatment efficacy evaluation module 103 can generate a detailed efficacy analysis report. This report not only includes the quantitative efficacy indicators but also further efficacy analysis results. That is, the efficacy analysis results can be interpreted to help doctors understand the specific manifestations and significance of the treatment effect. In addition, the report also includes a microstate change trend graph, visually displaying the changing trends of microstate characteristics before and after treatment. Therefore, this report allows for a more comprehensive evaluation of the treatment effect, providing strong support for further adjustments to the treatment plan.

[0064] In the aforementioned system, the microstate extraction and analysis module 101 extracts GFP peak topographic maps from EEG signal data and optimizes the original maps based on an improved clustering algorithm to generate microstate template maps. This enables precise capture of dynamic changes in brain activity, calculation of microstate feature parameter sets such as average duration, and accurate capture of brain microstate characteristics, providing a scientific basis for subsequent pain discrimination and treatment effect evaluation. The real-time pain discrimination module 102 inputs the microstate feature parameter set into the pain detection model, enabling real-time and accurate classification of the patient's pain state. This helps doctors quickly grasp the patient's pain level and adjust treatment plans in a timely manner. The treatment effect evaluation module 103 can obtain quantitative efficacy indicators such as the rate of change in average duration by acquiring the microstate feature parameter sets before and after treatment, generating a report containing indicators, analysis results, and microstate change trend maps. This provides doctors with objective and scientific efficacy evaluation basis, reducing reliance on subjective patient feedback and improving the scientific rigor and adaptability of treatment effect monitoring.

[0065] Compared with traditional methods of pain assessment and treatment effect evaluation, this system, through EEG microstate analysis, deep learning technology, and quantitative evaluation indicators, can not only monitor the patient's pain status in real time, but also objectively quantify the treatment effect, significantly improving the scientificity and accuracy of pain monitoring and treatment effect evaluation, and providing scientific decision support for clinicians.

[0066] In an exemplary embodiment, the microstate extraction and analysis module 101 includes a microstate template graph extraction subunit, used for:

[0067] Calculate the global field power at each time point in the EEG signal data, extract the time points corresponding to the local maxima of the global field power, and use the GFP peak topographic map corresponding to the time points as the original map.

[0068] Based on the improved K-means clustering algorithm, n topographic maps are randomly selected from the original map as initial template maps. The improved K-means clustering algorithm selects the GFP peak topographic map as the original map and uses the maximization of the proportion of total variance explained as the iteration termination condition.

[0069] Calculate the spatial correlation coefficient between each initial template image and the original images, and classify each original image into the template category with the largest spatial correlation coefficient.

[0070] Spatial averaging is performed on the original plots in each template category to generate new template plots. The classification and averaging operations are repeated until the proportion of total variance explained is maximized, and the microstate template plot is output.

[0071] Specifically, GFP is an indicator that measures the global activity level of EEG signals, reflecting the overall activity intensity of the brain at a given moment. The microstate template extraction subunit can identify moments with high stability and signal-to-noise ratio by calculating the global field power (GFP) at each time point in the EEG signal data. The corresponding topographic maps, i.e., GFP peak topographic maps, represent the instantaneous patterns of brain activity and can be used as raw maps for further analysis. Unlike the traditional K-means algorithm, this embodiment uses an improved K-means clustering algorithm that selects GFP peak topographic maps as raw maps and uses maximizing the Global Explained Variance (GEV) as the iteration termination condition, thus ensuring the stability and accuracy of the clustering results. Illustratively, the algorithm randomly selects n topographic maps from the raw maps as initial template maps and calculates the spatial correlation coefficient between each initial template map and the raw map. The spatial correlation coefficient measures the similarity of two topographic maps in spatial features; a larger coefficient indicates a higher similarity between the two topographic maps. By calculating the spatial correlation coefficient, the micro-state template graph extraction sub-unit can classify each original graph into the template category with the largest spatial correlation coefficient, so that original graphs with similar spatial features are classified into the same category, thus initially realizing the classification of the original graphs and laying the foundation for generating more accurate template graphs in the future.

[0072] Specifically, the spatial averaging of the original images in each template category involves comprehensively averaging the spatial features of all original images within the same template category to remove some noise and individual differences, making the generated new template image more representative of the common features of the original images in that category. After generating the new template image, the classification and averaging operations are repeated: the spatial correlation coefficient between the new template image and the original images is recalculated, the original images are reclassified, and then the spatial averaging of the original images in the new template category is performed again to generate an updated template image. Through multiple iterations, the proportion of variance explained (GEV) is maximized. When GEV no longer increases, it means that the clustering result has reached its optimal state. At this point, the output microstate template image can most effectively reflect the typical patterns in different functional states of the brain, providing a precise template basis for subsequent in-depth analysis of brain microstates. This helps to more accurately study the relationship between brain activity and pain states, as well as assess the impact of treatment effects on brain microstates.

[0073] In an exemplary embodiment, the micro-state extraction and analysis module 101 includes a micro-state feature extraction subunit, used for:

[0074] Spatial correlation coefficient matching is performed between EEG signal data and microstate template diagrams according to time series to determine the microstate category at each time point and obtain the matching results;

[0075] Based on the matching results, the average duration, frequency of occurrence, and overall coverage of each microstate category are statistically analyzed.

[0076] Based on the matching results, the jump relationship of micro-state categories corresponding to adjacent time points is analyzed, and the inter-class transition probability matrix is ​​calculated.

[0077] The microstate feature parameter set is obtained by combining the average duration, occurrence frequency, overall coverage, and inter-class transition probability matrix.

[0078] Specifically, EEG signal data changes continuously over time, recording the brain's electrical activity at different moments. Microstate template maps, on the other hand, represent typical patterns in different functional states of the brain. Therefore, by calculating the spatial correlation coefficient between the topographic map corresponding to the EEG signal data at each time point and each microstate template map, the degree of similarity between the two can be measured. The larger the spatial correlation coefficient, the more similar the EEG topographic map at that moment is to the corresponding microstate template map. Based on the calculated spatial correlation coefficient, the EEG data at each time point is classified into the category represented by the microstate template map with the largest spatial correlation coefficient, thus determining the microstate category at each time point and ultimately obtaining the matching result. Illustratively, for each microstate category, the duration of each occurrence during the entire EEG signal recording period can be counted, and these durations are summed and divided by the number of times the microstate category occurs to obtain the average duration. This average duration reflects the stability of the brain in a specific microstate. Furthermore, the frequency of occurrence of each microstate category during the entire recording period can be calculated and divided by the total number of time points to obtain the occurrence frequency of that microstate category. The frequency of occurrence reflects the activity level of a specific microstate in brain activity.

[0079] Specifically, the proportion of time each microstate category occupies within the entire recording period can be statistically analyzed; that is, the total duration of each microstate category divided by the total recording duration yields the overall coverage rate. The overall coverage rate macroscopically demonstrates the contribution of each microstate category to brain activity, helping to understand the proportion of different functional states in overall brain activity. Furthermore, brain microstates may change at adjacent time points in the EEG signal time series. This change reflects the dynamic transitions between brain functional states. By statistically analyzing the microstate category transitions at all adjacent time points, the probability of transitioning from one microstate category to another can be calculated, and the transition probabilities between all microstate categories can be organized to form an inter-class transition probability matrix. This matrix comprehensively displays the transition patterns between different brain functional states. Finally, the statistically obtained average duration, frequency of occurrence, overall coverage rate, and calculated inter-class transition probability matrix are integrated to obtain a microstate feature parameter set. This parameter set comprehensively describes the stability, activity level, overall contribution, and state transition patterns of brain microstates from multiple dimensions, providing important data for subsequent real-time pain identification and treatment effect evaluation.

[0080] In an exemplary embodiment, the pain detection model is a pre-trained GNN+Transformer neural network model, and the real-time pain discrimination module 102 includes:

[0081] The feature extraction subunit, used by the GNN and Transformer modules of the pain detection model, extracts features from the micro-state feature parameter set to generate a spatiotemporal fusion feature vector;

[0082] The classification and discrimination subunit is used for:

[0083] The spatiotemporal fusion feature vector is input into the fully connected classification layer, and the pain probability distribution of the pain state is output. The pain states include no pain, mild pain, moderate pain and severe pain.

[0084] The confidence score for each pain state is calculated based on the pain probability distribution, and the detection results are obtained by combining the pain probability distribution.

[0085] Specifically, the microstate feature parameter set can be viewed as a graph-structured data. There are potential correlations between different microstate features, which can be represented by the edges of a graph, with each microstate feature corresponding to a node in the graph. Illustratively, we can assume that the microstate feature parameter set constitutes a graph G = (V, ε), where node v i Represents the microstate category, edge e ijThis represents the transition relationships between microstates. The GNN (Graph Neural Network) module can effectively process this graph structure data, that is, it passes information between nodes through a message-passing mechanism and updates the feature representation of the nodes using the following formula:

[0086]

[0087] in, For node v i The set of neighboring nodes, W (l) Let σ be the weight matrix of the l-th layer, and σ be the activation function. Illustratively, when processing the micro-state feature parameter set, the GNN module can construct a graph structure based on the relationships between micro-states, and then perform convolution operations on the graph. This allows it to capture local and global correlation information between micro-state features, uncover hidden patterns and rules in the graph structure, and extract representative spatial features. In this embodiment, the micro-state feature parameter set changes over time, exhibiting significant time-series characteristics. The Transformer module takes the spatial features extracted by the GNN module as input and uses a self-attention mechanism to dynamically focus on feature information at different time steps. The self-attention mechanism allows the model to adaptively allocate attention weights based on the correlation between features when processing features at each time step, thereby capturing the dependencies between different positions in the time series. This enables the fusion of spatial features extracted by the GNN module with features in the time dimension, ultimately generating a spatiotemporal fusion feature vector. This vector integrates key information of micro-state features in both spatial and temporal dimensions, providing a more representative and discriminative feature representation for subsequent pain state classification.

[0088] To illustrate, the Transformer module can calculate the attention weights for each feature using the following formula:

[0089]

[0090] Where Q is the query matrix, K is the key matrix, and d k Let V be the attention head dimension, and V be the value matrix. To scale the dot product attention, we calculate the correlation of features at different time steps, ultimately generating a spatiotemporal fusion feature vector Z.

[0091] Specifically, the fully connected classification layer takes the spatiotemporal fusion feature vector as input and maps the high-dimensional feature vector to a low-dimensional vector space through a series of linear transformations of weight matrices and bias terms. The dimension of this vector is the same as the number of pain state categories, corresponding to no pain, mild pain, moderate pain, and severe pain. The output of the fully connected layer is then processed using the softmax activation function. The softmax function converts each output value into a probability value, ensuring that the sum of all output probabilities is 1. These probability values ​​represent the likelihood that the current input spatiotemporal fusion feature vector belongs to different pain states, thus obtaining the pain probability distribution. Furthermore, to more accurately determine the pain state, the classification and discriminant subunit can calculate a confidence score for each pain state based on the pain probability distribution. This confidence score reflects the reliability of the model's prediction for each pain state. Finally, combining the pain probability distribution and the confidence score yields the detection result. Illustratively, when the probability of a certain pain state is the highest among all pain states, and its confidence score reaches a certain threshold, this pain state can be output as the final detection result. Through this process, the real-time pain discrimination module 102 can accurately classify the patient's pain status, providing an important basis for clinical diagnosis and treatment.

[0092] In one exemplary embodiment, the system further includes an EEG acquisition module for:

[0093] EEG signal data was collected using a wearable EEG acquisition device, which included 32 Ag-AgCl scalp electrodes.

[0094] During EEG signal data acquisition, the impedance of each Ag-AgCl scalp electrode is monitored in real time. When the impedance of the Ag-AgCl scalp electrode exceeds the safety threshold, an early warning command is generated. The early warning command is used to interrupt data acquisition and prompt adjustment of electrode contact.

[0095] EEG signal data is converted into a preset format file and stored in a micro-state feature database.

[0096] Specifically, this wearable device is equipped with 32 Ag-AgCl scalp electrodes, which can be positioned according to the international 10-20 system. The international 10-20 system is a widely recognized standard for electrode placement, ensuring accurate and repeatable electrode placement on the scalp, thereby guaranteeing that the acquired EEG signals comprehensively and accurately reflect the electrical activity of different brain regions. The Ag-AgCl scalp electrodes possess excellent conductivity and biocompatibility, enabling stable acquisition of weak electrical signals emitted by the brain. During acquisition, the electrodes maintain close contact with the scalp, converting the bioelectrical signals generated by neuronal activity in the brain into electrical signals, which are then transmitted to the acquisition device.

[0097] During continuous EEG signal data acquisition, the EEG acquisition module can monitor the impedance of each Ag-AgCl scalp electrode in real time. Electrode impedance is a crucial indicator of the contact quality between the electrode and the scalp. Excessive electrode impedance can lead to a decrease in the quality of the acquired EEG signal, causing noise interference and signal distortion, which in turn affects the accuracy of subsequent data analysis and results. Therefore, a safety threshold can be set to ensure the normal operation of the electrodes. For example, when the impedance of a particular Ag-AgCl scalp electrode exceeds the safety threshold, the EEG acquisition module can immediately generate an early warning command. This command interrupts the current data acquisition process to avoid acquiring low-quality data. It also triggers a notification mechanism, alerting the operator to adjust the electrode contact. Upon receiving the notification, the operator can check the contact between the electrode and the scalp for tightness, the presence of dirt, sweat, or other factors that may affect contact, and promptly clean and re-secure the electrode to ensure it returns to normal working condition, guaranteeing the continued acquisition of high-quality EEG signal data.

[0098] Furthermore, to facilitate subsequent processing, analysis, and storage management, the EEG acquisition module can convert the acquired EEG signal data into a preset format file. This preset format file can be common formats such as .edf or .set. After conversion, the EEG acquisition module stores the preset format file in the microstate feature database. This microstate feature database is the core of the entire system's data storage, responsible for storing the raw data acquired from the EEG acquisition module, as well as the intermediate and final result data generated by subsequent modules. The EEG signal data stored in the database provides an important data foundation for the microstate extraction and analysis module, the real-time pain discrimination module, and the treatment effect evaluation module, enabling these modules to perform in-depth analysis and processing based on this data, thereby achieving real-time discrimination of the patient's pain state and accurate evaluation of treatment effects. For example, the real-time pain discrimination module 102 can choose to load historical EEG microstate feature data from the microstate feature database or directly load the current EEG microstate feature data from the microstate extraction and analysis module 102.

[0099] In one exemplary embodiment, the system further includes an EEG preprocessing module for:

[0100] Channel data location is performed on EEG signal data, valid signal channels are identified and invalid channel data is removed to obtain valid channel data;

[0101] Bandpass filtering is performed on the effective channel data to obtain filtered data;

[0102] Based on independent component analysis, the EEG artifacts, ECG artifacts and EMG artifacts were separated from the filtered data to obtain artifact-free EEG signal data.

[0103] Using the whole brain average potential as a reference, the artifact-free EEG signal data was re-referenced and a reference electrode was added to the electrode array to obtain the pre-processed EEG signal data.

[0104] Specifically, EEG signal data is typically acquired through multiple electrode channels. However, during actual acquisition, some channels may fail to acquire valid signals due to various reasons such as poor electrode contact or electrode damage. Therefore, the EEG preprocessing module can locate the channels in the acquired EEG signal data, thereby identifying which channels acquired valid signals and which acquired invalid signals. Invalid channel data can be discarded, retaining only the valid channel data. Furthermore, EEG signals contain various frequency components, but only signals within specific frequency ranges are relevant to the brain activity we are interested in. Generally, the frequency range of EEG signals related to brain cognition and physiological activities is 0.5-50Hz. Therefore, after obtaining the valid channel data, the EEG preprocessing module can perform bandpass filtering, that is, by setting appropriate bandpass filtering parameters, only signals within this frequency range are retained, resulting in filtered data.

[0105] However, the filtered data may still contain artifacts, such as EEG, ECG, and EMG artifacts, which interfere with the analysis of the brain's true electrical activity. Therefore, independent component analysis (ICA) can be used to separate these artifacts. ICA is a signal processing method based on statistical properties, which assumes that the observed mixed signal is a linear combination of multiple independent source signals. Illustratively, this algorithm can decompose the filtered data into multiple independent components. Then, based on the characteristics of each component, such as frequency characteristics and waveform features, it identifies which components are EEG, ECG, or EMG artifacts and removes them, obtaining the artifact-free EEG signal data. EEG artifacts are electrical signals generated by eye movements (such as blinking and eye rotation), ECG artifacts are electrical signals generated by heartbeats, and EMG artifacts are electrical signals generated by muscle contractions. These artifacts interfere with the analysis of the brain's true electrical activity, and therefore need to be separated from the filtered data.

[0106] Furthermore, during EEG signal acquisition, each electrode records the potential difference between itself and a reference electrode. However, the original reference electrode may introduce unnecessary interference, affecting the accurate analysis of brain electrical activity. Therefore, after obtaining artifact-free EEG signal data, to more accurately reflect the potential differences between different brain regions, a rereference calculation can be performed using the whole-brain average potential as a reference benchmark. The whole-brain average potential is obtained by averaging the potential values ​​acquired by all effective electrodes; using it as a reference benchmark allows the potentials recorded by each electrode to better reflect the relative potential differences between different brain regions. After completing the rereference calculation, this module can add the reference electrode to the electrode array to maintain the integrity of the electrode array and facilitate further data analysis and processing. Finally, preprocessed EEG signal data is generated. This data is of higher quality and more suitable for subsequent analyses such as microstate extraction, pain discrimination, and treatment effect evaluation.

[0107] Indicative, such as Figure 2 As shown in the illustration, this embodiment also provides a comparative chart of EEG microstates before and after treatment. In this embodiment, when the patient is in a resting state, an EEG acquisition module is used to collect EEG signal data using 32 Ag-AgCl scalp electrodes according to the international 10-20 system. Subsequently, the patient is stimulated with Capzasin-HP capsaicin to induce a pain state, and EEG signal data is collected again. EEG signal data is also collected after the patient receives a course of treatment, such as acupuncture. Using a microstate extraction and analysis module, GFP peak topographic maps are extracted from the three types of EEG signal data collected above as raw maps. Based on an improved K-means clustering algorithm, corresponding microstate template maps are generated, and then microstate characteristic parameters such as the average duration, frequency of occurrence, overall coverage, and inter-class transition probability for each microstate category are calculated.

[0108] As shown in the figure, state A is related to auditory language processing, state B to visual processing, state C to subjective feelings, and state D to attention and concentration. In the transition from the resting state to capsaicin-induced pain state, the frequency of transitions from microstates B, C, and D to microstate A increases, the frequency of transitions from microstates A, C, and D to microstate B decreases, the frequency of transitions from microstate B to microstate C decreases, and the frequency of transitions from microstate A to microstate D increases. After treatment, there were no significant differences in state transitions among microstates A, B, C, and D. Therefore, it can be understood that the brain's microstate transition patterns change significantly under pain conditions, reflecting the interference of pain on brain function. Specifically, the inter-class transition probabilities in the microstate feature parameter sets of the three states changed before and after treatment; and after treatment, these transition patterns returned to normal, indicating that the corresponding treatment effectively alleviated the impact of pain. Furthermore, the efficacy can be further evaluated by calculating the difference in inter-class transition probabilities using the microstate feature parameter sets of the three states, outputting the corresponding efficacy analysis results.

[0109] Based on the same inventive concept, such as Figure 3 As shown in the embodiments of this application, a method for real-time pain discrimination and treatment effect evaluation based on EEG microstate monitoring is also provided, including:

[0110] S301: Extract the GFP peak topographic map from the EEG signal data as the original map, and optimize the original map based on the clustering algorithm to generate a micro-state template map;

[0111] S302: For the microstate template graph, calculate the average duration, occurrence frequency, overall coverage and inter-class transition probability of each microstate category, and output the microstate feature parameter set;

[0112] S303: Input the set of micro-state feature parameters into the deep learning-based pain detection model for detection, and obtain the detection results. The detection results include the pain level, which can be any one of no pain, mild, moderate and severe.

[0113] S304: Obtain the first microstate feature parameter set before treatment and the second microstate feature parameter set after treatment;

[0114] S305: Compare the feature parameters of each microstate category in the first microstate feature parameter set with those in the second microstate feature parameter set to obtain quantitative efficacy indicators and generate an efficacy analysis report. The quantitative efficacy indicators include the average duration change rate, the difference in inter-class conversion probability, and the coverage recovery rate indicator. The efficacy analysis report includes the quantitative efficacy indicators, efficacy analysis results, and microstate change trend graph.

[0115] In the above method, GFP peak topographic maps are extracted from EEG signal data and optimized to generate microstate template maps. By focusing on the GFP peak topographic maps, more stable and reliable raw data can be obtained, ensuring the accuracy of the microstate template maps and providing data support for subsequent precise analysis of brain activity. Secondly, by calculating parameters such as the average duration of each microstate category and outputting a microstate feature parameter set, the dynamic changes in brain activity can be comprehensively quantified, providing a comprehensive data basis for subsequent pain discrimination and treatment effect evaluation. Inputting this microstate feature parameter set into a pain detection model can monitor the patient's pain status in real time and accurately classify pain levels, helping doctors to quickly and accurately grasp the patient's pain level and providing a basis for timely intervention and treatment. In addition, by obtaining and comparing the microstate feature parameter sets before and after treatment, quantitative efficacy indicators such as the rate of change in average duration are obtained and reports are generated, enabling objective and scientific evaluation of treatment effects, reducing reliance on subjective patient feedback, and facilitating the adjustment and optimization of subsequent treatment plans. This method, through EEG microstate analysis and deep learning technology, achieves real-time pain discrimination and precise evaluation of treatment effects, improving the scientificity and accuracy of pain diagnosis and treatment, and providing strong support for clinical pain management.

[0116] Furthermore, the GFP peak topographic map is extracted from the EEG signal data as the original map, and the original map is optimized based on a clustering algorithm to generate a microstate template map, including:

[0117] Calculate the global field power at each time point in the EEG signal data, extract the time points corresponding to the local maxima of the global field power, and use the GFP peak topographic map corresponding to the time points as the original map.

[0118] Based on the improved K-means clustering algorithm, n topographic maps are randomly selected from the original map as initial template maps. The improved K-means clustering algorithm selects the GFP peak topographic map as the original map and uses the maximization of the proportion of total variance explained as the iteration termination condition.

[0119] Calculate the spatial correlation coefficient between each initial template image and the original images, and classify each original image into the template category with the largest spatial correlation coefficient.

[0120] Spatial averaging is performed on the original plots in each template category to generate new template plots. The classification and averaging operations are repeated until the proportion of total variance explained is maximized, and the microstate template plot is output.

[0121] Furthermore, for the microstate template graph, the average duration, occurrence frequency, overall coverage, and inter-class transition probability of each microstate category are calculated, and the microstate feature parameter set is output, including:

[0122] Spatial correlation coefficient matching is performed between EEG signal data and microstate template diagrams according to time series to determine the microstate category at each time point and obtain the matching results;

[0123] Based on the matching results, the average duration, frequency of occurrence, and overall coverage of each microstate category are statistically analyzed.

[0124] Based on the matching results, the jump relationship of micro-state categories corresponding to adjacent time points is analyzed, and the inter-class transition probability matrix is ​​calculated.

[0125] The microstate feature parameter set is obtained by combining the average duration, occurrence frequency, overall coverage, and inter-class transition probability matrix.

[0126] Furthermore, the micro-state feature parameter set is input into a deep learning-based pain detection model for detection, yielding detection results. These results include pain level, which can be any one of the following: no pain, mild pain, moderate pain, or severe pain. The pain detection model is a pre-trained GNN+Transformer neural network model, including:

[0127] The GNN and Transformer modules of the pain detection model extract features from the micro-state feature parameter set to generate a spatiotemporal fusion feature vector;

[0128] The spatiotemporal fusion feature vector is input into the fully connected classification layer, and the pain probability distribution of the pain state is output. The pain states include no pain, mild pain, moderate pain and severe pain.

[0129] The confidence score for each pain state is calculated based on the pain probability distribution, and the detection results are obtained by combining the pain probability distribution.

[0130] Furthermore, the method also includes:

[0131] EEG signal data was collected using a wearable EEG acquisition device, which included 32 Ag-AgCl scalp electrodes.

[0132] During EEG signal data acquisition, the impedance of each Ag-AgCl scalp electrode is monitored in real time. When the impedance of the Ag-AgCl scalp electrode exceeds the safety threshold, an early warning command is generated. The early warning command is used to interrupt data acquisition and prompt adjustment of electrode contact.

[0133] EEG signal data is converted into a preset format file and stored in a micro-state feature database.

[0134] Furthermore, before extracting the GFP peak topographic map from the EEG signal data as the original map, the following steps are also included:

[0135] Channel data location is performed on EEG signal data, valid signal channels are identified and invalid channel data is removed to obtain valid channel data;

[0136] Bandpass filtering is performed on the effective channel data to obtain filtered data;

[0137] Based on independent component analysis, the EEG artifacts, ECG artifacts and EMG artifacts were separated from the filtered data to obtain artifact-free EEG signal data.

[0138] Using the whole brain average potential as a reference, the artifact-free EEG signal data was re-referenced and a reference electrode was added to the electrode array to obtain the pre-processed EEG signal data.

[0139] In one exemplary embodiment, the present invention also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the EEG microstate monitoring system for real-time pain discrimination and treatment effect evaluation according to this application. A multi-core processor is preferred to improve the system's parallel processing capability. The memory provides sufficient temporary storage space to support program execution and data processing. The memory capacity should be large enough to accommodate a large amount of supply information and computational tasks.

[0140] In one exemplary embodiment, the present invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the steps of the present application's EEG microstate monitoring system for real-time pain discrimination and treatment effect evaluation. The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).

[0141] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A system for real-time discrimination of pain and evaluation of treatment effect of EEG microstate monitoring, characterized in that, The pain real-time discrimination and treatment effect evaluation system of the EEG microstate monitoring comprises: An EEG acquisition module is configured to: Collect EEG signal data through a wearable EEG acquisition device, wherein the wearable EEG acquisition device comprises 32 Ag-AgCl scalp electrodes; During the EEG signal data collection process, the impedance of each Ag-AgCl scalp electrode is monitored in real time, and when the impedance of the Ag-AgCl scalp electrode exceeds a safety threshold, a warning instruction is generated, which is used to interrupt data collection and prompt adjustment of electrode contact; The EEG signal data is converted into a preset format file and stored in a microstate feature database; An EEG preprocessing module is configured to: Locate channel data of the EEG signal data, identify valid signal channels, and eliminate invalid channel data to obtain valid channel data; Perform band-pass filtering on the valid channel data to obtain filtered data; Based on independent component analysis, separate the filtered data into electrooculogram artifact components, electrocardiogram artifact components, and electromyogram artifact components to obtain EEG signal data after artifact removal; Perform re-reference calculation on the EEG signal data after artifact removal with whole-brain average potential as a reference benchmark to obtain preprocessed EEG signal data; A microstate extraction and analysis module is configured to: Extract a GFP peak topographic map from the preprocessed EEG signal data as an original map, and optimize the original map based on a clustering algorithm to generate a microstate template map; According to the microstate template map, calculate the average duration, occurrence frequency, overall coverage rate, and inter-class transition probability of each microstate category, and output a microstate feature parameter set; A pain real-time discrimination module is configured to input the microstate feature parameter set into a deep learning-based pain detection model for detection to obtain a detection result, wherein the detection result comprises a pain level, and the pain level is any one of no pain, mild pain, moderate pain, and severe pain; A treatment effect evaluation module is configured to: Obtain a first microstate feature parameter set before treatment and a second microstate feature parameter set after treatment; Compare the feature parameters of each microstate category in the first microstate feature parameter set and the second microstate feature parameter set to obtain a quantitative efficacy index, generate an efficacy analysis report, wherein the quantitative efficacy index comprises an average duration change rate, an inter-class transition probability difference degree, and a coverage recovery degree index, and the efficacy analysis report comprises the quantitative efficacy index, an efficacy analysis result, and a microstate change trend graph; The microstate extraction and analysis module comprises a microstate template map extraction subunit and a microstate feature extraction subunit, and the microstate template map extraction subunit is configured to: Calculate the global field power of each time point in the preprocessed EEG signal data, extract the time point corresponding to the local maximum value of the global field power, and take the GFP peak topographic map corresponding to the time point as the original map. based on an improved K-means clustering algorithm, n GFP peak topographic maps are randomly selected from the original maps as initial template maps, wherein the improved K-means clustering algorithm adopts total variance proportion maximization as an iteration termination condition; a spatial correlation coefficient of each initial template map and each original map is calculated, and each original map is classified into a template category with the maximum spatial correlation coefficient; the original maps in each template category are spatially averaged to generate a new template map, and the classification and averaging operations are repeated until the total variance proportion maximization is maximized, and the microstate template map is output; the microstate feature extraction subunit is configured to: match the preprocessed EEG signal data with the microstate template map in a time sequence according to a spatial correlation coefficient, determine the microstate category to which each time point belongs, and obtain a matching result; based on the matching result, the average duration, the occurrence frequency and the total coverage of each microstate category are counted; based on the matching result, the transition probability between categories is calculated by analyzing the transition relationship of the microstate categories corresponding to adjacent time points; the microstate feature parameter set is obtained by combining the average duration, the occurrence frequency, the total coverage and the transition probability between categories; the pain detection model is a pre-trained GNN+Transformer neural network model, and the pain real-time discrimination module comprises: a feature extraction subunit configured to perform feature extraction on the microstate feature parameter set based on the GNN module and the Transformer module of the pain detection model, and generate a spatiotemporal fusion feature vector; a classification and discrimination subunit configured to: input the spatiotemporal fusion feature vector into a fully connected classification layer to output a pain probability distribution of a pain state, wherein the pain state includes a painless state, a mild pain state, a moderate pain state and a severe pain state; and calculate a confidence score of each pain state based on the pain probability distribution, and obtain the detection result by combining the pain probability distribution.

2. A method for pain real-time discrimination and treatment effect evaluation of EEG microstate monitoring, characterized in that, The pain real-time discrimination and treatment effect evaluation method of the EEG microstate monitoring comprises: obtaining EEG signal data; converting the EEG signal data into a preset format file and storing it in a microstate feature database; locating the channel data of the EEG signal data, identifying valid signal channels and eliminating invalid channel data to obtain valid channel data; performing band-pass filtering on the valid channel data to obtain filtered data; based on independent component analysis, separating the filtered data into electrooculogram artifact components, electrocardiogram artifact components and electromyogram artifact components to obtain de-artifacted EEG signal data; performing re-reference calculation on the de-artifacted EEG signal data with the whole brain average potential as a reference benchmark to obtain preprocessed EEG signal data; extracting GFP peak topographic maps from the preprocessed EEG signal data as original maps, and optimizing the original maps based on a clustering algorithm to generate a microstate template map, specifically comprising: calculating global field power of each time point in the preprocessed EEG signal data, extracting a time point corresponding to a local maximum of the global field power, and taking a GFP peak topography corresponding to the time point as the original map; selecting n GFP peak topographies from the original map as initial template maps based on an improved K-means clustering algorithm, wherein the improved K-means clustering algorithm adopts maximum overall variance explanation ratio as an iteration termination condition; calculating a spatial correlation coefficient of each initial template map and each original map, and classifying each original map into a template category with the maximum spatial correlation coefficient; performing spatial averaging on original maps in each template category to generate a new template map, repeating the classification and averaging operations until the maximum overall variance explanation ratio is reached, and outputting the microstate template map; calculating average duration, occurrence frequency, overall coverage rate, and inter-class transition probability of each microstate category based on the microstate template map, and outputting a microstate feature parameter set, specifically including: matching the preprocessed EEG signal data in time sequence with the microstate template map based on a spatial correlation coefficient to determine a microstate category to which each time point belongs, and obtaining a matching result; based on the matching result, calculating the average duration, the occurrence frequency, and the overall coverage rate of each microstate category; based on the matching result, analyzing the jump relationship of the microstate categories corresponding to adjacent time points, and calculating the inter-class transition probability; combining the average duration, the occurrence frequency, the overall coverage rate, and the inter-class transition probability to obtain the microstate feature parameter set; inputting the microstate feature parameter set into a deep learning-based pain detection model for detection to obtain a detection result, wherein the detection result includes a pain level, and the pain level is any one of no pain, mild, moderate, and severe; the pain detection model is a pre-trained GNN+Transformer neural network model; obtaining a first microstate feature parameter set before treatment and a second microstate feature parameter set after treatment; comparing the feature parameters of each microstate category in the first microstate feature parameter set and the second microstate feature parameter set to obtain a quantitative efficacy index, generating an efficacy analysis report, wherein the quantitative efficacy index includes an average duration change rate, an inter-class transition probability difference degree, and a coverage recovery degree index, and the efficacy analysis report includes the quantitative efficacy index, an efficacy analysis result, and a microstate change trend graph; the step of inputting the microstate feature parameter set into the deep learning-based pain detection model for detection to obtain a detection result includes: performing feature extraction on the microstate feature parameter set based on a GNN module and a Transformer module of the pain detection model to generate a spatio-temporal fusion feature vector; The spatio-temporal fusion feature vector is input into a full connection classification layer, and a pain probability distribution of a pain state is output, the pain state including a painless state, a mild pain state, a moderate pain state and a severe pain state; and a confidence score of each pain state is calculated based on the pain probability distribution, and the detection result is obtained in combination with the pain probability distribution.

3. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program is executed by the processor to implement the method for real-time discrimination of pain and evaluation of treatment effect of EEG microstate monitoring according to claim 2.

4. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the method for real-time discrimination of pain and evaluation of treatment effect of EEG microstate monitoring according to claim 2.

Citation Information

Patent Citations

  • Anesthesia depth monitoring system based on micro-state power spectrum analysis and method thereof

    CN110811557A

  • Electroencephalogram signal-based nerve electrical stimulation method, device and system

    CN119971314A