Depression biphase classification method and device based on single-channel electroencephalogram signals and program product
Through a single-channel portable EEG device and a blind box game with reward and punishment task state, combined with deep learning models to analyze EEG signals, the complex and expensive problems of misdiagnosis of depression and traditional EEG devices are solved, and efficient auxiliary diagnosis of depression in daily environments is achieved.
Patent Information
- Application Number
- CN202510691565.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-27
AI Technical Summary
The existing diagnostic methods for depression lack objectivity and are easily misdiagnosed as bipolar disorder, leading to wrong treatment plans. The traditional multi-channel EEG equipment is complex and expensive to operate, and is not suitable for use in non-laboratory environments.
A single-channel portable EEG device is used, combined with a blind box game with reward and punishment task state, and the EEG signals under open eyes, closed eyes and game tasks are analyzed through deep learning models, two-dimensional data characteristics are constructed, and depression and bipolar disorder are classified.
Improves the accuracy of identification of depression and bipolar disorder, simplifies operations, reduces costs, is suitable for use in clinical and family settings, and provides the possibility of assisted diagnosis in daily life.
Smart Images

Figure CN120531394A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent medical care, and specifically to a method, device, program product, and computer-readable storage medium for classifying bipolar depression based on single-channel EEG signals. Background Art
[0002] Depression is characterized by high prevalence and low recognition rates, which can easily lead to missed diagnosis and poor prognosis. Effective objective indicators are urgently needed to aid diagnosis. Statistics show that the incidence of depression is high, but the recognition rate is low. Existing studies have included over 50,000 patients, but less than half were correctly diagnosed with depression. Currently, the mainstream diagnostic method for depression is through psychiatric interviews with patients and their families, supplemented by the Diagnostic and Statistical Manual of Mental Disorders (DSM-IV) and Psychiatric Rating Scale. This method lacks objective depression assessment criteria, is inconsistent, is highly subjective, and takes a long time to diagnose. Patients may also overlook early symptoms or refuse treatment out of fear or fear of honesty. Furthermore, depression and bipolar disorder share some symptom overlap, affecting the hippocampus, prefrontal cortex, and amygdala, and sharing certain common functional connectivity patterns, making misdiagnosis a common problem. Previous studies have found that approximately 40% of patients with bipolar disorder are misdiagnosed with unipolar depressive disorder, with misdiagnosis lasting for up to 5 to 10 years. This results in approximately one-third of bipolar patients not receiving timely and appropriate treatment. How to achieve early and accurate differentiation between the two is an urgent clinical problem that needs to be solved. The treatment principles of depression and bipolar disorder are also very different. Patients with depression use antidepressants to alleviate depression, while patients with bipolar disorder mainly use mood stabilizers for treatment. Therefore, if the diagnosis of the disease is inaccurate, it will lead to incorrect treatment plans. Patients with bipolar disorder taking inappropriate doses of antidepressants may even trigger their manic episodes or worsen their condition. Therefore, finding objective auxiliary diagnostic indicators to simultaneously differentiate depression, bipolar disorder and healthy people can not only optimize clinical decision-making, but also promote scientific research and public health strategies, and ultimately achieve the goal of precision psychiatry.
[0003] Electroencephalography (EEG), as a non-invasive method for studying brain function, has been widely used in medical diagnosis and neuroscience research. By recording changes in electrical activity, EEG can provide information on the functional status of different brain regions, and is particularly valuable in the diagnosis and monitoring of neuropsychiatric disorders. EEG signals reflect electrical activity in the cerebral cortex, including various brain waves associated with consciousness, attention, emotion, and cognition. In the field of psychiatric disorders, particularly depression, EEG has been shown to reveal abnormal brain function. By analyzing EEG signals using methods such as spectral, time-domain, and nonlinear dynamic analysis, researchers can identify EEG features that differ from normal brain activity. EEG also has a role in distinguishing patients from depression and bipolar disorder. Studies have found increased theta power in the left prefrontal cortex in patients with depression, while patients with bipolar disorder have higher frontal theta activity. EEG changes such as frontal alpha asymmetry and gamma frequency bands can also distinguish between the two disorders. Therefore, EEG can non-invasively identify the differences in EEG activity between people with depression, bipolar disorder, and healthy individuals by analyzing spectral, time-domain, and nonlinear characteristics, providing an objective basis for the diagnosis of mental illness. Existing EEG equipment mostly relies on multi-channel sensors and usually needs to be operated in a laboratory environment, which brings inconvenience to the widespread application of EEG, especially in clinical and home environments. Currently, most EEG-based depression-related studies use whole-brain EEG signals with 32 channels or more. However, this process requires professional operation, is complex and relatively expensive, and is not suitable for non-laboratory environments or everyday scenarios. Summary of the Invention
[0004] A single-channel portable EEG has only one EEG signal acquisition channel and has the characteristics of small size, low power consumption, low cost, and simple operation. It is conducive to improving the accuracy of machine learning models, accelerating the popularization of EEG technology, and promoting the application and development of EEG technology in daily life. In response to the above problems, the present invention provides a depression bipolar classification method based on single-channel EEG signals. The portable EEG acquisition device can better help people achieve efficient personal health management, enable patients with depression to collect EEG signals themselves in daily life without being restricted by laboratory space, and assist large sample populations in auxiliary diagnosis of depression and long-term dynamic monitoring in daily environments. Specifically, it includes: fixing the single-channel EEG signal acquisition device to the frontal lobe of the brain of the person to be tested; When the subject performs the task action, a one-dimensional time-series EEG signal is obtained from a single-channel EEG signal acquisition device; Converting the one-dimensional time series EEG signal into a two-dimensional EEG signal based on different time dimensions; The two-dimensional EEG signal is input into a depression bipolar classification model for classification to obtain healthy, depressed, and bipolar classification results.
[0005] The task actions include eyes-open task, eyes-closed task, and game task; Optionally, the subject sequentially performs an eyes-open task, an eyes-closed task, and a game task, and obtains one-dimensional time-series EEG signals of the actions of performing each task, converts the one-dimensional time-series EEG signals of the actions of performing each task into two-dimensional EEG signals based on different time dimensions, and inputs the two-dimensional EEG signals into a depression bipolar classification model for classification; Optionally, the game task is to open a blind box by selecting it, and the box will give a virtual currency gain or loss animation. After M rounds, the overall game profit and loss will be displayed, where M is a natural number greater than or equal to 50; Optionally, when the subject performs the eyes-open task, an eyes-open EEG signal is obtained for N minutes, where N is a natural number greater than or equal to 5, and the eyes-closed EEG signal for N minutes is converted into a two-dimensional eyes-open EEG signal based on different time dimensions; Optionally, when the subject performs the eyes-closing task, an eyes-closing EEG signal for N minutes is obtained, and the eyes-closing EEG signal for N minutes is converted into a two-dimensional eyes-closing EEG signal based on different time dimensions; Optionally, when the subject performs a game task, 2N minutes of game EEG signals are obtained, and the 2N minutes of game EEG signals are converted into two-dimensional game EEG signals based on different time dimensions.
[0006] The game EEG signal also includes signal extraction, extracting the EEG signal S seconds before opening the box and the EEG signal L seconds after opening the box to obtain the extracted game EEG signal, inputting the eyes-open EEG signal, eyes-closed EEG signal, and the extracted game EEG signal into the depression bipolar classification model for classification to obtain the classification results of healthy, depressed, and bipolar; S and L are natural numbers greater than 1; Optionally, the game EEG signal extracts EEG signals 3 seconds before opening the box and 5 seconds after opening the box; Optionally, the game signal extraction also includes an EEG signal showing the overall game gains and losses.
[0007] The method further includes data preprocessing, performing data preprocessing on the one-dimensional time series EEG signal to obtain a preprocessed one-dimensional time series EEG signal, and then converting the preprocessed one-dimensional time series EEG signal into a two-dimensional EEG signal based on different time dimensions, wherein the data preprocessing includes one or more of the following: signal filtering, motion artifact removal, and signal quality screening; Optionally, the preprocessing sequentially performs signal filtering, motion artifact removal, and signal quality screening.
[0008] The signal quality screening is to judge the quality of the EEG signal and remove the signals with poor quality to obtain the preprocessed EEG signal; Optionally, the quality judgment is performed by sliding window and quartile statistics; Optionally, the quality judgment process is: Statistical task action data amplitude; Calculate the mean and variance of the data amplitude and set the upper and lower limits of the data amplitude based on the mean and variance; By sliding the moving window on the data amplitude, the number of data points in each window that fall outside the upper and lower amplitude limits is obtained and recorded as signal non-valid values; Compare the signal's invalid value with the preset threshold value. If the signal's invalid value is greater than the preset threshold value, remove it; otherwise, retain it. Optionally, the quality judgment process further includes statistical distribution, performing statistical distribution on the non-valid values of the signal to obtain a statistical distribution value, and obtaining a preset threshold based on the statistical distribution value; Optionally, the preset threshold is the upper quarter value of the statistical distribution of the non-valid value of the signal; Optionally, the window width of the moving window is half of the sampling frequency.
[0009] The training process of the depression bipolar classification model is as follows: Obtain a one-dimensional time-series EEG signal dataset and labels for eyes open, eyes closed, and gaming; Performing two-dimensional processing on the one-dimensional time series EEG signal and the label to obtain a two-dimensional EEG signal; Inputting the two-dimensional EEG signal into the classifier to be trained for training until the loss function remains unchanged, thereby obtaining a depression bidirectional classification model; Optionally, the two-dimensional processing is based on converting one-dimensional time-series EEG signals of different time dimensions into a two-dimensional matrix to obtain a two-dimensional EEG signal; wherein the rows or columns of the matrix represent time, and the columns or rows of the matrix represent the one-dimensional time-series EEG signal; Optionally, the classifier includes one or more of the following: convolutional neural network, residual network, extreme learning machine, perceptron vector machine, random forest, decision tree, support vector machine, AdaBoost, Transformer.
[0010] The method further includes secondary prediction, wherein the depression bipolar classification model performs classification to obtain category probabilities, obtains basic information of the subject, and performs secondary prediction based on the category probabilities and basic information to obtain classification prediction results of health, depression, and bipolar; Optionally, the secondary prediction is performed by one or more of the following models: logistic regression, naive Bayes, AdaBoost, GBM, LDA; Optionally, the basic information includes one or more of the following: age, gender, medical history, and symptoms.
[0011] The object of the present invention is to provide a computer program product comprising a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the above-mentioned method for classifying bipolar depression based on a single-channel EEG signal.
[0012] The object of the present invention is to provide a computer device comprising a memory, a processor, and a computer program or instruction stored on the memory, wherein the computer program or instruction is executed by the processor to implement the above-mentioned depression bipolar classification method based on single-channel EEG signals.
[0013] The object of the present invention is to provide a computer-readable storage medium having a computer program or instruction stored thereon, wherein the computer program or instruction is executed by a processor to implement the above-mentioned depression bipolar classification method based on a single-channel EEG signal.
[0014] Advantages of the present invention: 1. Previously, auxiliary diagnosis for depression medication treatment often relied on the resting-state (eyes open / closed) EEG paradigm. However, the differential diagnosis of depression requires a more comprehensive assessment. EEG signals generated during specific task states based on disease mechanisms and biological characteristics can effectively capture specific neural activity characteristics associated with clinical symptoms. This study constructed a model for auxiliary diagnosis of depression based on a cognitive task training strategy with a reward-punishment mechanism, and introduced time-frequency domain signal information before and after the results were presented. This effectively addressed the limitations of traditional methods in terms of data heterogeneity and individual resting-state EEG differences, providing new ideas for auxiliary diagnosis of depression and a reliable data foundation and theoretical support for the establishment of accurate auxiliary diagnosis models.
[0015] Specifically, the present invention proposes a blind box opening game in which a player selects a blind box to open. After opening the box, the player displays the virtual currency gain and loss values. After multiple rounds of opening the box, the total income and expenditure are displayed. The game collects and analyzes EEG signals before and after the box is opened, as well as the EEG signals after the total income and expenditure are displayed. This is used to enhance the tester's EEG signal changes, extract change features, and improve recognition accuracy. A deep learning classification method based on sliced EEG data from reward and punishment tasks: Different from the time-domain signal analysis used in previous depression screening studies, this method combines short-duration (8-second data) and multi-frequency (50 rounds of blind box opening) prefrontal EEG signal data from reward and punishment tasks with a two-dimensional convolutional neural network. This method achieves the highest level of classification and recognition accuracy for depression, bipolar disorder, and healthy individuals reported in the industry, providing a new technical solution for screening patients with depression.
[0016] 2. While existing EEG signal classification techniques can distinguish patients with depression, bipolar disorder, and healthy individuals to a certain extent, they generally face core challenges such as low classifier accuracy, weak cross-subject generalization, and a lack of appropriate cognitive tasks to stimulate characteristic EEG signals of depression. To this end, this study innovatively constructed a multimodal dynamic feature learning framework based on deep learning. By designing a time-frequency domain fusion feature extraction mechanism, it achieves multi-scale adaptive feature extraction of EEG signals. Specifically, the framework converts one-dimensional time series data into two-dimensional data; the one-dimensional EEG time series data collected from the test subject during S (50) game tasks is converted into two-dimensional data with the time dimension as the rows (columns) and the one-dimensional EEG time series data from a single game task as the columns (rows). Based on the changes in time during the game, the fluctuations in the emotional (EEG) signals of bipolar and depressive individuals during the game are used to extract features to improve the differentiation between depression and bipolar patients.
[0017] 3. Features are derived from pre- and post-box opening signals. These data are processed through game tasks. Depressed and bipolar patients exhibit differences in their EEG signals before and after box opening. Feature extraction is performed on these pre- and post-box opening signal data to improve differentiation between these two groups.
[0018] In addition to conventional filtering, denoising and other processing before model training, an innovative statistical method is proposed to evaluate the signal quality of the collected task-state single-channel EEG signals. The signals with better quality are input into the training model for parameter adjustment to ensure the stability and reliability of the model.
[0019] 4. The depression bipolar classification method based on single-channel EEG signals provided by the present invention is a whole. In order to facilitate use in clinical and home environments, single-channel signal acquisition and single-channel signal classification are adopted; in order to improve the reliability of single-channel signals, signal quality evaluation and screening, as well as signal noise reduction and filtering and other pre-processing are performed; secondly, in order to improve the characteristic representation of the signal, it is proposed to extract the EEG signals in the task state of the blind box opening game, and further clarify the EEG signals before and after opening the box. The classification results are obtained by inputting these processed signals into a trained two-dimensional classification model for classification. It is a complete technical solution that is different from the existing technical concept.
[0020] 5. Most existing EEG devices rely on multi-channel sensors and usually need to be operated in a laboratory environment, which brings inconvenience to the widespread application of EEG, especially in clinical and home environments. The present invention provides a single-channel EEG signal acquisition device to collect EEG signals of the subject, which can be used in clinical or home environments. While meeting the accurate requirements for bipolar depression classification, it reduces the amount of data input to the large model, improves computing efficiency, and is more friendly to large-scale disease screening.
[0021] 6. Current EEG classification techniques mostly focus on analyzing resting-state data. However, the diagnosis of mental illness requires a more comprehensive assessment. EEG signals generated during specific task states based on disease mechanisms and biomarker stimulation can better provide typical data and theoretical support for identifying healthy people, people with depression, and people with bipolar disorder. To this end, the present invention introduces task-state data, collecting EEG signals of the subjects while they are performing tasks. This improves the identification of abnormal people and increases recognition accuracy through EEG signals of specific tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A schematic flow chart of a method for classifying bipolar depression based on single-channel EEG signals provided in an embodiment of the present invention; Figure 2 A schematic diagram of a depression bipolar classification system based on single-channel EEG signals provided by an embodiment of the present invention; Figure 3 A schematic diagram of a depression biphasic classification device based on a single-channel EEG signal provided by an embodiment of the present invention; Figure 4 A diagram showing a bipolar depression classification framework structure provided by an embodiment of the present invention; Figure 5 A schematic diagram of executing tasks provided by an embodiment of the present invention; Figure 6 The signal sliding window task-state EEG data acquisition process provided by the embodiment of the present invention; Figure 7 The model quality evaluation threshold line provided by the embodiment of the present invention; Figure 8 A structural diagram of a classification model provided by an embodiment of the present invention; Figure 9 The number of model training times and accuracy provided by the embodiment of the present invention; Figure 10 The number of model training times and loss rate provided by the embodiment of the present invention; Figure 11 This is the classification visualization result provided by the embodiment of the present invention. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0025] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or may be executed in parallel. The serial numbers of the operations, such as S101, S102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to be different types.
[0026] Figure 1 A schematic diagram of a method for classifying biphasic depression based on a single-channel EEG signal provided by an embodiment of the present invention, wherein the single-channel EEG signal acquisition device specifically comprises: S101: Fixing a single-channel EEG signal acquisition device on the frontal lobe of the subject's brain; In one embodiment, the single-channel EEG signal device receives the EEG signal of the test subject through one channel, wherein the electrode piece and the frontal lobe position of the test subject's brain are used to collect EEG signals, and the signal is transmitted through a transmission line or a wireless port.
[0027] A depression screening device based on a single-channel portable EEG headband device combined with a tablet blind box opening task software.
[0028] In a specific embodiment, the present invention proposes a three-classification algorithm and device for healthy people, people with depression, and people with bipolar disorder based on a wearable EEG headband and reward-and-punishment tasks. This algorithm effectively addresses the complexity and high cost of traditional multi-channel equipment. By combining statistically derived demographic characteristics of the population at rest and EEG signals during task states for classification, it can also improve the ability to distinguish between patients with depression and healthy people. This technical solution is not only suitable for clinical diagnosis, but can also be widely used in remote monitoring of mental illness and daily health management, promoting the popularization of portable EEG technology in public health.
[0029] S102: Acquire a one-dimensional time-series EEG signal from a single-channel EEG signal acquisition device when the subject performs a task; convert the one-dimensional time-series EEG signal into a two-dimensional EEG signal based on different time dimensions; In one embodiment, the task actions include eyes-open task, eyes-closed task, and game task.
[0030] In one embodiment, the subject sequentially performs an eyes-open task, an eyes-closed task, and a game task and obtains one-dimensional time-series EEG signals of each task action, converts the one-dimensional time-series EEG signals of each task action into two-dimensional EEG signals based on different time dimensions, and inputs the two-dimensional EEG signals into a bipolar depression classification model for classification.
[0031] In one embodiment, the game task is to open a blind box by selecting it, and the box will give a virtual currency gain or loss animation. After M rounds, the overall game profit and loss will be displayed, where M is a natural number greater than or equal to 50; Optionally, when the subject performs the eyes-open task, N minutes of eyes-open EEG signals are obtained, where N is a natural number greater than or equal to 5, and the N minutes of eyes-closed EEG signals are converted into two-dimensional eyes-open EEG signals based on different time dimensions.
[0032] In one embodiment, when the subject performs the eyes-closing task, an eyes-closing EEG signal for N minutes is obtained, and the eyes-closing EEG signal for N minutes is converted into a two-dimensional eyes-closing EEG signal based on different time dimensions.
[0033] In one embodiment, when the subject performs a game task, 2N minutes of game EEG signals are obtained, and the 2N minutes of game EEG signals are converted into two-dimensional game EEG signals based on different time dimensions.
[0034] Any one or several of the two-dimensional eyes-open EEG signals, two-dimensional eyes-closed EEG signals, and two-dimensional game EEG signals are input into a depression bipolar classification model for classification.
[0035] In one embodiment, the game EEG signal also includes signal extraction, extracting the EEG signal S seconds before opening the box and the EEG signal L seconds after opening the box to obtain the extracted game EEG signal, and inputting the eyes-open EEG signal, eyes-closed EEG signal, and extracted game EEG signal into the depression bipolar classification model for classification to obtain healthy, depressed, and bipolar classification results; S and L are natural numbers greater than 1.
[0036] In one embodiment, the game EEG signals extract EEG signals 3 seconds before opening the box and 5 seconds after opening the box.
[0037] In one embodiment, the game signal extraction further includes displaying EEG signals after overall game gains and losses.
[0038] In one embodiment, the one-dimensional temporal game EEG signal before and after the box is opened is extracted, and the one-dimensional temporal game EEG signal before and after the box is opened is converted into a two-dimensional game EEG signal based on the time dimension.
[0039] In one embodiment, the method also includes data preprocessing, performing data preprocessing on the one-dimensional time series EEG signal to obtain a preprocessed one-dimensional time series EEG signal, and then converting the preprocessed one-dimensional time series EEG signal into a two-dimensional EEG signal based on different time dimensions. The data preprocessing includes one or more of the following: signal filtering, removal of motion artifacts, and signal quality screening.
[0040] In one embodiment, the preprocessing sequentially performs signal filtering, motion artifact removal, and signal quality screening.
[0041] In one embodiment, the signal quality screening is to judge the quality of the EEG signal and remove the signal with poor quality to obtain the preprocessed EEG signal.
[0042] In one embodiment, the quality judgment is performed by using a sliding window and quartile statistics.
[0043] In one embodiment, the quality judgment process is as follows: Statistical task action data amplitude; Calculate the mean and variance of the data amplitude and set the upper and lower limits of the data amplitude based on the mean and variance; By sliding the moving window on the data amplitude, the number of data points in each window that fall outside the upper and lower amplitude limits is obtained and recorded as signal non-valid values; Compare the signal's invalid value with the preset threshold. If the signal's invalid value is greater than the preset threshold, remove it; otherwise, retain it.
[0044] In one embodiment, the quality judgment process further includes statistical distribution, performing statistical distribution on the non-valid values of the signal to obtain a statistical distribution value, and obtaining a preset threshold based on the statistical distribution value.
[0045] Optionally, the preset threshold is the upper quarter value of the statistical distribution of the non-valid value of the signal; In one embodiment, the window width of the moving window is half of the sampling frequency.
[0046] In a specific embodiment, the depression bipolar classification screening mainly includes five modules, namely, a data acquisition module, a data processing module, a classification model training module, a depression identification module and a report output module (e.g., Figure 4As shown in the figure, the system first issues a voice prompt and displays a fixation cross on the screen to help the user focus. With the user's eyes open, the system collects resting EEG data for 5 minutes. Subsequently, the user hears a tone prompting them to close their eyes, and resting EEG data is collected with their eyes closed, also for 5 minutes. Finally, the user collects EEG data for approximately 10 minutes while interacting with the task. Since low or abnormal reward sensitivity is a hallmark of abnormal patients (e.g., depression), the EEG task designed in this paper employs an experimental paradigm of opening a blind box to receive rewards or penalties, aiming to identify abnormal patients. The user completes 50 rounds of a blind box game using an interactive tablet. In each round, the user selects one of two boxes that appear on the screen. A box-opening animation then plays, and the user is given feedback (gain or loss). Generally, there are no specific requirements for setting the reward and loss amounts. During the 50 rounds, the reward and penalty ratio is set to 50%, and the results of each round are randomly determined. After the 50 rounds, the user is presented with the overall game profit and loss. Before the experiment, ensure that the portable single-channel EEG headband device is functioning properly and test the signal quality. During the experiment, the user's EEG signals were recorded in real time while completing the task, and the experiment duration was controlled at around 20 minutes.
[0047] The data processing module includes signal filtering, signal noise reduction, signal quality screening, signal analysis, and model input processing. By incorporating high-quality task-state EEG signals and labeling the user groups accessing the data, including healthy individuals, patients with depression, and patients with bipolar disorder, the data is organized into model training data and model validation data in a specific proportion.
[0048] In a specific embodiment, the data collection process is as follows Figure 5 As shown, resting-state eyes-open data collection: During data collection under resting-state eyes-open conditions, the user is required to remain quiet and look directly at a fixed point on the screen or maintain a natural line of sight. At this time, the environment should minimize interference, including shielding external noise and reducing the impact of light changes to ensure that the collected EEG signals are stable and reliable. The portable single-channel EEG headband is worn correctly on the head, ensuring good contact between the electrodes and the skin, and confirming through the device software that the signal quality meets the collection standards. After the experiment begins, the device will continuously record the user's EEG signals for 5 minutes, which is enough to capture stable resting-state signals.
[0049] Resting Eyes Closed Data Collection: During resting eyes closed data collection, users are instructed to close their eyes, remain relaxed, and minimize facial and body muscle activity to capture pure closed-eye EEG signals. The collection environment must be quiet and moderately lit to avoid external audio and visual stimuli that could disrupt the user's state of relaxation. After the experiment is initiated, the device begins recording the user's closed-eye EEG signals for 3-5 minutes.
[0050] Task-State (Reward and Punishment Task) Data Collection: Users completed 50 rounds of a blind box game using an interactive tablet. Before the experiment, the portable single-channel EEG headband was ensured to function properly and the signal quality was tested. During the experiment, EEG signals were recorded in real time for the 3 seconds before each round of blind box opening and the 5 seconds after the result was obtained. The focus was on neural activity before and after the decision was made. The experiment lasted approximately 10 minutes. Behavioral data was recorded for analysis combined with EEG data.
[0051] After completing resting-state and task-based data collection, all EEG signals are organized and stored as standardized data files. These files use common EEG data formats (such as EDF, CSV, or MATLAB) to facilitate subsequent analysis and processing. Each file contains the complete time series signal, experimental condition annotations, and user information (such as ID and group category). Each EEG data segment is annotated with experimental status, including labels such as eyes open, eyes closed, and task status. Metadata such as experimental time, equipment ID, and environmental parameters are recorded to ensure data traceability.
[0052] In a specific embodiment, the data processing module is an important step to ensure the validity and reliability of EEG signals, and mainly includes the following: Signal filtering: A notch filter is used to remove 50 Hz power frequency interference, and a bandpass filter (usually 0.5-40 Hz) is used to remove high-frequency noise (such as electromyographic interference) and low-frequency drift (such as electrode noise), retaining the signal frequency band related to cognitive activity.
[0053] y[n]=F -1 (F(x[n])·H(f)) Where F is the Fourier transform, H(f) is the frequency response of the filter, x[n] is the original signal, and y[n] is the filtered signal.
[0054] Removing motion artifacts: Continuous motion artifact data is removed through a time domain threshold. Continuous data areas greater than the threshold are marked as pseudo data, and pseudo data is removed from the filtered data. In this case, the designed EEG threshold is -200μV to +200μV.
[0055] Since single-channel EEG signals cannot achieve correlation noise reduction similar to dual-channel signals, we use a sliding window combined with quartile statistical methods to judge the quality of the collected EEG signals in signal quality screening. We also eliminate user data with poor signal quality during modeling to prevent noise signals such as eye movements and body movements from interfering with the modeling.
[0056] Count the amplitudes of all data segments in the resting state and task state, obtain the mean μ and variance std of the amplitude, and define the upper and lower limits as [μ-1.5*std, μ+1.5*std]. Use a specific moving window width (typically half the sampling frequency) and a specific sliding step size (typically 1) to count the number of data points in each window that fall outside the upper and lower amplitude limits. These points are defined as signal invalid values (such as Figure 6 Perform a natural distribution statistical analysis on the number of non-valid values and set the upper quarter of the distribution as the quality judgment threshold Ratingthred (as shown in Figure 7 As shown in Figure 3, the number of non-significant values to the left of the red threshold line is considered as acceptable signal quality and is included in the classification training model.
[0057] In one embodiment, two-dimensional processing involves treating a single person's single task-state EEG signal as columns or rows, a total of S times, to form a two-dimensional matrix (two-dimensional EEG signal), where S is a natural number greater than or equal to 50, and the time dimension is used as the rows or columns. By converting the one-dimensional time series signal data into two-dimensional data and performing classification using the depression bipolar classification model to obtain classification results, the accuracy of the model classification can be improved.
[0058] In one embodiment, the benefits of converting from one dimension to two dimensions are: 1) Improve statistical power: Through multiple measurements, the amount of data can be increased, random errors can be reduced, and the sensitivity and reliability of statistical analysis can be improved.
[0059] 2) Assess intra-individual changes: It can track the dynamic changes of the same subject at different time points and reduce the interference of inter-individual differences.
[0060] 3) Reduced sample size requirements: Compared with cross-sectional studies, repeated measurements can utilize data from multiple time points on the same subjects, reducing reliance on large-scale samples.
[0061] 4) Enhance the robustness of results: Through multiple observations, the stability of the results can be verified and accidental deviations from single measurements can be avoided.
[0062] S103: Inputting the two-dimensional EEG signal into a depression bipolar classification model for classification to obtain classification results of healthy, depressed, and bipolar.
[0063] In one embodiment, the training process of the depression bipolar classification model is: Obtain a one-dimensional time-series EEG signal dataset and labels for eyes open, eyes closed, and gaming; Performing two-dimensional processing on the one-dimensional time series EEG signal and the label to obtain a two-dimensional EEG signal; Inputting the two-dimensional EEG signal into the classifier to be trained for training until the loss function remains unchanged, thereby obtaining a depression bidirectional classification model; Optionally, the two-dimensional processing is based on converting one-dimensional time series EEG signals of different time dimensions into a two-dimensional matrix to obtain a two-dimensional EEG signal; wherein the rows or columns of the matrix represent time, and the columns or rows of the matrix represent the one-dimensional time series EEG signal.
[0064] In one embodiment, the classifier includes one or more of the following: convolutional neural network, residual network, extreme learning machine, perceptron vector machine, random forest, decision tree, support vector machine, AdaBoost, Transformer.
[0065] In one embodiment, the method further includes secondary prediction, wherein the depression bipolar classification model performs classification to obtain category probabilities, obtains basic information of the subject, and performs secondary prediction based on the category probabilities and basic information to obtain classification prediction results of health, depression, and bipolar.
[0066] In one embodiment, the secondary prediction is performed by one or more of the following models: logistic regression, naive Bayes, AdaBoost, GBM, and LDA.
[0067] In one embodiment, the basic information includes one or more of the following: age, gender, medical history, and symptoms.
[0068] In a specific embodiment, in the present study, in the EEG study of differentiating patients with depression, bipolar disorder and healthy people, repeated measurements can identify the stability or dynamic changes of EEG features (such as theta, alpha, and gamma frequency bands), assisting in differential diagnosis.
[0069] In a specific embodiment, a deep learning algorithm based on a two-dimensional convolutional neural network is used for modeling to generate a trained model file to provide support for the subsequent prediction stage. During the model prediction process, the new EEG data is first preprocessed, and then the preprocessed data is input into the trained model for prediction. After the model outputs the classification result, it makes a comprehensive decision based on the patient's basic information to finally obtain the recognition result, which helps to judge the individual's mental illness status. The system outputs the user's test report to assist the clinic in early depression screening and help patients receive timely treatment.
[0070] In a specific embodiment, the algorithm model uses a two-dimensional convolutional neural network to process the time series EEG signals before and after 50 rounds of box opening to achieve accurate identification of healthy people and people with depression. The model structure is as follows Figure 8 As shown, it contains the following main parts: Input layer: The input layer accepts two-dimensional EEG signal data. The data consists of 8 seconds of EEG data during 50 rounds of blind box opening experiments. The headband data sampling rate is 160Hz. Therefore, the amount of input data in each batch is 50*(8*160), or 50*1280 data points.
[0071] Convolutional layer: The convolutional layer is the core of the convolutional neural network, extracting features from the input data through convolution operations. Each convolutional layer contains multiple convolution kernels (filters), which slide (i.e., convolve) through different parts of the input data to capture local patterns. The size of the convolution kernel is usually k×1, such as 3 or 5 (indicating that each convolution operation covers 3 or 5 time steps). The convolutional layer outputs a feature map, which is usually a combination of multiple feature maps, each corresponding to a convolution kernel. The convolution operation formula is as follows:
[0072] in: is the input signal sequence; is the convolution kernel; is the convolution output.
[0073] Activation layer: The activation layer usually follows the convolutional layer. The commonly used activation function is ReLU (Rectified Linear Unit). ReLU effectively introduces nonlinearity, allowing the network to learn complex patterns. The ReLU function is as follows:
[0074] Negative values will be suppressed to zero, while positive values remain unchanged.
[0075] Pooling layer: The pooling layer is an operation in convolutional neural networks that is used to reduce the size of feature maps, reduce computational complexity, avoid overfitting, and extract the most important features. The pooling layer is usually located after the convolution layer and simplifies the model by sampling features in local areas. There are many ways of pooling, the most common of which are maximum pooling and average pooling. In the maximum pooling layer, within each pooling window, maximum pooling selects the maximum value within the window as the output of the window. Maximum pooling can retain the most significant feature information and is especially suitable for tasks that contain strong features. The average pooling layer obtains the output by calculating the average of all values in the pooling window. Average pooling is smoother and helps to extract the overall trend within the area rather than focusing on the strongest local features.
[0076] Flattening layer: The output of convolutional and pooling layers is usually multi-dimensional, while fully connected layers require one-dimensional input. Therefore, the output of convolutional and pooling layers needs to be flattened into a one-dimensional vector.
[0077] Fully connected layer: The fully connected layer performs a weighted summation of previously extracted features and is usually used to integrate the extracted features and finally generate the output. The neurons in the fully connected layer are connected to all neurons in the previous layer. The fully connected formula is as follows:
[0078] in, is the weight matrix, is the input vector, is the bias.
[0079] Output layer: The output layer is the last layer of the network and is primarily used to generate predictions. For classification tasks, the output layer activation function is used to convert the model output into class probabilities.
[0080] Softmax activation function (multi-classification):
[0081] In multinomial logistic regression and linear discriminant analysis, the input of the function is the result obtained from K different linear functions, and the probability that the sample vector x belongs to the jth category is P(y=j).
[0082] After defining the model, you need to compile it, which involves selecting a loss function, optimizer, and evaluation metric. For classification tasks, use cross-entropy loss, Adam as the optimizer, and accuracy as the evaluation metric.
[0083] After the model is compiled, training begins. This step involves optimizing the model using input data and labels. During training, the network updates weights through backpropagation, allowing the model to better fit the data. Training involves specifying parameters such as training data, batch size, number of training rounds, and validation data.
[0084] By comparing the accuracy (such as Figure 9 shown) and loss rate (as shown) Figure 10 The optimal parameter model for classifying healthy and depressed people is determined by training the model with the same parameters as those in Figure 2 (shown).
[0085] In addition, the model has achieved good results in learning the EEG data features of healthy people, bipolar disorder people and depression people in the reward and punishment task state. The present invention also uses the T-SNE method to visualize and verify the feature quantity (such as Figure 11 From the vectors in the feature space, the characteristics of patients with depression, bipolar disorder, and healthy people have been well distinguished, indicating the effectiveness of the model.
[0086] In a specific embodiment, the present invention used 587 sets of data (287 healthy people, 242 people with depression, and 58 people with bipolar disorder) as model training data, and then tested and verified 254 sets of data (261 healthy people, 590 people with depression, and 159 people with bipolar disorder). It was found that the overall recognition accuracy of the model was 96.7%, of which the recognition accuracy for healthy people was 97.0%, the recognition accuracy for people with depression was 94.6%, and the recognition accuracy for people with bipolar disorder was 98.5%, reaching the best level of depression screening based on EEG signals in a large population base currently reported.
[0087] In a specific embodiment, after the model training is completed, the optimal parameters obtained from the training are saved as a model file, which mainly includes the following contents: File format: Use standardized model storage formats (such as HDF5 or ONNX) to facilitate cross-platform applications.
[0088] Storage content: network structure description; trained weight and bias parameters; normalization parameters of input features.
[0089] Version management: Store model files in versions and record the hyperparameter settings and performance indicators for each training to facilitate subsequent improvement and reproduction.
[0090] In a specific embodiment, after the signal is preprocessed, each frame of the preprocessed signal is input into a trained deep learning model for prediction. The specific steps are as follows: Input data: The framed EEG signal data is used as input. The data size is the same as the data size used in training, 50*1280 matrix.
[0091] Output results: The model output gives the probability of belonging to a certain category (healthy people, bipolar disorder people, depression people). Combined with the patient's basic information, including age, gender, medical history, and symptoms, the model is enhanced using logistic regression to form the final health or disease status prediction result.
[0092] Patient Basic Information (BI): age, gender, medical history, symptoms; Model diagnosis probability (P m : Probability of the model): The probability of disease predicted by the model; log(P final ) = + + β•log(P m ) in: is the weight coefficient of the patient's basic information, and β is the adjustment coefficient of the model classification probability.
[0093] Use the sigmoid function to get the final probability: P final =
[0094] In a specific embodiment, the report output module: the final diagnosis result is presented in text form, or displayed to doctors, patients or other relevant personnel through a visual interface. The report can be printed and stored. The report content includes the blind box opening task instructions, resting state EEG analysis, task state EEG analysis, and gives the analysis logic of the system diagnosis of health, bipolar disorder or depression.
[0095] In one embodiment, the present invention collects a single-channel EEG signal through a single-channel EEG signal device, wherein the EEG signal is the EEG signal of executing the eyes-opening, eyes-closing, and box-opening games, and inputs the EEG signal into a trained depression bipolar classification model for classification to obtain depression, bipolar, and health classification results. Among them, the box-opening game extracts the EEG signal before opening the box, after opening the box, and / or after the total profit and loss of the game for classification. In addition, for the single signal channel, signal quality judgment is proposed to perform signal screening and improve signal quality. The present invention provides an overall solution. There is data interaction from the single-channel signal to the final classification result. The modules are connected in series to complete the detection of the health or abnormality (depression or bidirectional) of the subject.
[0096] The disclosed embodiments of the present invention further provide a computer program product or system, including a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for classifying bipolar depression based on a single-channel EEG signal.
[0097] Figure 2 The schematic diagram of the depression bipolar classification system based on single-channel EEG signals provided by the embodiment of the present invention specifically includes: Fixing unit: fix the single-channel EEG signal acquisition device to the frontal lobe of the brain of the subject; Acquisition unit: acquires EEG signals from a single-channel EEG signal acquisition device when the subject performs a task; converts the one-dimensional time-series EEG signals into two-dimensional EEG signals based on different time dimensions; Classification unit: input the EEG signal into the depression bipolar classification model for classification to obtain the classification results of healthy, depressed, and bipolar.
[0098] In one embodiment, the system further includes a data processing unit for performing data preprocessing on the EEG signal to obtain a preprocessed EEG signal.
[0099] Figure 3A schematic diagram of a device for classifying biphasic depression based on a single-channel EEG signal provided by an embodiment of the present invention specifically includes: A memory and a processor; the memory is used to store program instructions; the processor is used to call program instructions, and when the program instructions are executed, any one of the above-mentioned depression bipolar classification methods based on single-channel EEG signals is executed.
[0100] The disclosed embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, any one of the above-mentioned methods for classifying bipolar depression based on single-channel EEG signals is implemented.
[0101] The validation results of this validation example demonstrate that assigning inherent weights to indications can improve the performance of the present method compared to the default settings. Those skilled in the art will readily appreciate that, for ease of description and brevity, the specific operating processes of the systems, devices, and units described above can be referenced to the corresponding processes in the aforementioned method embodiments and will not be further elaborated upon here. It should be understood that the disclosed systems, devices, and methods can be implemented in other ways within the several embodiments provided herein. For example, the device embodiments described above are merely illustrative. For example, the division of units described is merely a logical functional division. In actual implementation, other divisions may be employed, such as combining or integrating multiple units or components into another system, or omitting or disabling certain features. Furthermore, the coupling, direct coupling, or communication connection shown or discussed may be through interfaces, indirect coupling, or communication connection between devices or units, and may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the units may be selected to achieve the objectives of the present embodiment as needed. In addition, the functional units in the various embodiments of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units. Those skilled in the art will understand that all or part of the steps in the various methods of the above-mentioned embodiments may be completed by instructing the relevant hardware through a program, and the program may be stored in a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0102] Those skilled in the art will understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned medium storage can be a read-only memory, a disk or an optical disk, etc.
[0103] The above is a detailed introduction to a computer device provided by the present invention. For those skilled in the art, according to the concept of the embodiments of the present invention, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A depression bipolar classification method based on single-channel EEG signals, characterized in that: Single-channel EEG signal acquisition equipment, including: Fix the single-channel EEG signal acquisition device on the frontal lobe of the subject's brain; When the subject performs the task action, a one-dimensional time-series EEG signal is obtained from a single-channel EEG signal acquisition device; Converting the one-dimensional time series EEG signal into a two-dimensional EEG signal based on different time dimensions; The two-dimensional EEG signal is input into a depression bipolar classification model for classification to obtain healthy, depressed, and bipolar classification results.
2. The depression biphasic classification method based on single-channel EEG signals according to claim 1, characterized in that: The task actions include eyes-open task, eyes-closed task, and game task; Optionally, the subject sequentially performs an eyes-open task, an eyes-closed task, and a game task, and obtains one-dimensional time-series EEG signals of the actions of performing each task, converts the one-dimensional time-series EEG signals of the actions of performing each task into two-dimensional EEG signals based on different time dimensions, and inputs the two-dimensional EEG signals into a depression bipolar classification model for classification; Optionally, the game task is to open a blind box by selecting it, and the box will give a virtual currency gain or loss animation. After M rounds, the overall game profit and loss will be displayed, where M is a natural number greater than or equal to 50; Optionally, when the subject performs the eyes-open task, an eyes-open EEG signal is obtained for N minutes, where N is a natural number greater than or equal to 5, and the eyes-closed EEG signal for N minutes is converted into a two-dimensional eyes-open EEG signal based on different time dimensions; Optionally, when the subject performs the eyes-closing task, an eyes-closing EEG signal for N minutes is obtained, and the eyes-closing EEG signal for N minutes is converted into a two-dimensional eyes-closing EEG signal based on different time dimensions; Optionally, when the subject performs a game task, 2N minutes of game EEG signals are obtained, and the 2N minutes of game EEG signals are converted into two-dimensional game EEG signals based on different time dimensions.
3. The depression biphasic classification method based on single-channel EEG signals according to claim 2, characterized in that: The game EEG signal also includes signal extraction, extracting the EEG signal S seconds before opening the box and the EEG signal L seconds after opening the box to obtain the extracted game EEG signal, and inputting the eyes-open EEG signal, eyes-closed EEG signal, and the extracted game EEG signal into the depression bipolar classification model for classification to obtain the classification results of healthy, depressed, and bipolar; S and L are natural numbers greater than 1; Optionally, the game EEG signal extracts EEG signals 3 seconds before opening the box and 5 seconds after opening the box; Optionally, the game signal extraction also includes an EEG signal showing the overall game gains and losses.
4. The depression biphasic classification method based on single-channel EEG signals according to claim 1, characterized in that: The method further includes data preprocessing, performing data preprocessing on the one-dimensional time series EEG signal to obtain a preprocessed one-dimensional time series EEG signal, and then converting the preprocessed one-dimensional time series EEG signal into a two-dimensional EEG signal based on different time dimensions, wherein the data preprocessing includes one or more of the following: signal filtering, motion artifact removal, and signal quality screening; Optionally, the preprocessing sequentially performs signal filtering, motion artifact removal, and signal quality screening.
5. The depression biphasic classification method based on single-channel EEG signals according to claim 4, characterized in that: The signal quality screening is to judge the quality of the EEG signal and remove the signals with poor quality to obtain the preprocessed EEG signal; Optionally, the quality judgment is performed by sliding window and quartile statistics; Optionally, the quality judgment process is: Statistical task action data amplitude; Calculate the mean and variance of the data amplitude and set the upper and lower limits of the data amplitude based on the mean and variance; By sliding the moving window on the data amplitude, the number of data points in each window that fall outside the upper and lower amplitude limits is obtained and recorded as signal non-valid values; Compare the signal's invalid value with a preset threshold, and remove it when the signal's invalid value is greater than the preset threshold; Otherwise, keep it; Optionally, the quality judgment process further includes statistical distribution, performing statistical distribution on the non-valid values of the signal to obtain a statistical distribution value, and obtaining a preset threshold based on the statistical distribution value; Optionally, the preset threshold is the upper quarter value of the statistical distribution of the non-valid value of the signal; Optionally, the window width of the moving window is half of the sampling frequency.
6. The depression biphasic classification method based on single-channel EEG signals according to claim 1, characterized in that: The training process of the depression bipolar classification model is as follows: Obtain a one-dimensional time-series EEG signal dataset and labels for eyes open, eyes closed, and gaming; Performing two-dimensional processing on the one-dimensional time series EEG signal and the label to obtain a two-dimensional EEG signal; Inputting the two-dimensional EEG signal into the classifier to be trained for training until the loss function remains unchanged, thereby obtaining a depression bidirectional classification model; Optionally, the two-dimensional processing is based on converting one-dimensional time-series EEG signals of different time dimensions into a two-dimensional matrix to obtain a two-dimensional EEG signal; wherein the rows or columns of the matrix represent time, and the columns or rows of the matrix represent the one-dimensional time-series EEG signal; Optionally, the classifier includes one or more of the following: convolutional neural network, residual network, extreme learning machine, perceptron vector machine, random forest, decision tree, support vector machine, AdaBoost, Transformer.
7. The depression biphasic classification method based on single-channel EEG signals according to claim 1, characterized in that: The method further includes secondary prediction, wherein the depression bipolar classification model performs classification to obtain category probabilities, obtains basic information of the subject, and performs secondary prediction based on the category probabilities and basic information to obtain classification prediction results of health, depression, and bipolar; Optionally, the secondary prediction is performed by one or more of the following models: logistic regression, naive Bayes, AdaBoost, GBM, LDA; Optionally, the basic information includes one or more of the following: age, gender, medical history, and symptoms.
8. A computer program product comprising a computer program or instructions, characterized in that: The computer program or instructions are executed by a processor to implement the depression bipolar classification method based on single-channel EEG signals according to any one of claims 1 to 7.
9. A computer device comprising a memory, a processor, and a computer program or instruction stored in the memory, wherein: The computer program or instructions are executed by a processor to implement the depression bipolar classification method based on single-channel EEG signals according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: The computer program or instructions are executed by a processor to implement the depression bipolar classification method based on single-channel EEG signals according to any one of claims 1 to 7.
Citation Information
Patent Citations
Depression risk screening system and method based on virtual reality scene electroencephalogram signal
CN106407733A
Depression state evaluation system based on portable electroencephalogram
CN116570289A
Sleep cycle alternating mode detection method and device based on time-frequency domain correlation characteristics
CN116725553A
Depression patient pleasant sensation loss treatment monitoring system
CN119157554A
Depression identification device and electronic equipment
CN119791661A