Method, device and storage medium for controlling motor imagery difficulty based on brain-computer interface
By collecting and analyzing EEG signals and using classification models to evaluate and regulate the difficulty of motor imagery, the problem of poor treatment effect caused by uniform difficulty in existing equipment is solved, and personalized stroke rehabilitation treatment is achieved.
Patent Information
- Application Number
- CN202411200319.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Existing motor imagery brain-computer interface devices adopt a treatment paradigm of uniform difficulty for stroke patients, resulting in some patients having a high learning curve, being unable to maintain concentration, and having poor treatment effects.
By collecting EEG signals from multiple brain regions of the user, extracting the average power spectral density curve, and using a classification model to predict the imagination accuracy of the motor imagery task, the difficulty level of the motor imagery is determined based on the accuracy, and the difficulty is adjusted in real time to adapt to individual differences.
It achieves accurate assessment and personalized regulation of motor imagery difficulty, improves the rehabilitation effect of stroke patients, ensures that the treatment is within the acceptable range for patients, and encourages patients to continue treatment.
Smart Images

Figure CN119312126B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of signal processing technology, and specifically relates to a method, device and storage medium for controlling the difficulty of motor imagery based on a brain-computer interface. Background Art
[0002] Stroke causes brain cell death or tissue damage, and its incidence is high. Its sequelae can lead to severe disability, placing a heavy burden on patients and their families. In recent years, the incidence of stroke has gradually increased, while the age of onset has gradually decreased, increasing the medical burden on society as a whole and causing irreversible physical, psychological, and spiritual damage to patients and their families.
[0003] Motor imagery-based brain-computer interface (BCI) stroke treatment is a rehabilitation technology that helps stroke patients reshape their motor nerves by training the connection between the brain's motor cortex and muscle movement. Motor imagery therapy typically involves patients imagining themselves performing a certain sport, thereby stimulating neurons in the cerebral cortex and accelerating the directional recovery process. However, due to individual differences and varying degrees of brain damage from stroke, patients have varying degrees of mastery of motor imagery, resulting in poor treatment outcomes. Existing equipment uses a treatment paradigm of uniform difficulty for all patients, making the learning curve too high for some patients and making it impossible for them to maintain sustained focus on treatment. Summary of the Invention
[0004] This application aims to address the above technical problems existing in the prior art and provide a method, device and storage medium for regulating the difficulty of motor imagery based on a brain-computer interface, so as to regulate the difficulty of motor imagery according to the patient's performance so that it is within an appropriate range, thereby helping the patient to recover better.
[0005] In order to achieve the above technical objectives, this application adopts the following technical solutions.
[0006] In a first aspect, an embodiment of the present application provides a method for controlling the difficulty of motor imagery based on a brain-computer interface, comprising:
[0007] Collect EEG signals from multiple brain regions of the user;
[0008] extracting the average power spectral density curve of the EEG signal from each of the brain regions;
[0009] Extracting the relative intensities of α rhythm energy and β rhythm energy, the energy peak in the α rhythm frequency range, and the energy peak in the β rhythm frequency range according to the average power spectrum density curve;
[0010] According to the relative intensities of the alpha rhythm energy and the beta rhythm energy and the energy peaks, using the trained classification model, predicting the imagination accuracy of the user performing the motor imagery task;
[0011] The motor imagery difficulty level is determined according to the imagery accuracy rate.
[0012] In some embodiments, determining the motor imagery difficulty level based on the imagery accuracy includes:
[0013] Determining the category of the user's motor imagination difficulty based on the imagination accuracy;
[0014] Based on the imagination accuracy and the category, the motor imagination difficulty level is determined, and the expression is as follows:
[0015]
[0016] Wherein, MI is the difficulty level of motor imagery, L n is the center value of the motor imagery difficulty level interval corresponding to the category, S n is the standard deviation of imagination accuracy within the category, P pre is the imagination accuracy, M n is the central value of the imagination accuracy within the category.
[0017] In some embodiments, determining the category of the user's motor imagination difficulty based on the imagination accuracy rate includes: clustering the training data set according to the motor imagination accuracy rates in advance and dividing them into categories;
[0018] Determine the central value of imagination accuracy within each category based on the clustering results;
[0019] The distance between the imagination accuracy and each center value is calculated, and the user's movement imagination difficulty is classified into the category with the closest distance.
[0020] In some embodiments, the method further includes: determining the average of n consecutive imagination accuracy rates; comparing the average with a threshold range, and if the average is greater than the threshold range, increasing the motor imagination difficulty level by one level to increase the motor imagination difficulty; if the average is less than the threshold range, reducing the motor imagination difficulty level by one level to reduce the motor imagination difficulty.
[0021] In some embodiments, the fitting formula of the power spectrum density curve is as follows:
[0022]
[0023] Wherein, P(x) is the fitting model of the power spectrum density curve, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model; a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters.
[0024] In some embodiments, the noise fitting model θ(x|a,b) is expressed as follows:
[0025]
[0026] Where x is a variable whose value range is the same as the bandpass frequency; a is the first parameter and b is the second parameter.
[0027] In some embodiments, based on the relative intensities of the alpha rhythm energy and the beta rhythm energy and each of the energy peaks, using a trained classification model, predicting the imagination accuracy of the user performing the motor imagery task includes:
[0028] The brain regions include a first brain region, a second brain region, and a third brain region;
[0029] extracting the relative intensities of alpha rhythm energy and beta rhythm energy based on the average power spectral density curve of the first brain region;
[0030] extracting a power peak in the alpha rhythm frequency range and a power peak in the beta rhythm frequency range based on the average power spectral density curves of the second brain region and the third brain region, respectively;
[0031] determining the total energy peak values E of the second brain region and the third brain region respectively according to the energy peak values in the α rhythm frequency range and the energy peak values in the β rhythm frequency range;
[0032] The calculation formula of the total energy peak E is as follows:
[0033]
[0034] in, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model; a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters.
[0035] In some embodiments, the method further includes: determining the age and gender of the user, and selecting the corresponding classification model based on the age and gender.
[0036] In a second aspect, the embodiment of the present application also includes a device for controlling the difficulty of motor imagery based on a brain-computer interface, including:
[0037] an EEG signal acquisition module configured to acquire EEG signals from multiple brain regions of the user;
[0038] a feature extraction module configured to extract an average power spectral density curve of the EEG signal of each of the brain regions; and extract, based on the average power spectral density curve, the relative intensities of the alpha rhythm energy and the beta rhythm energy, the energy peak in the alpha rhythm frequency range, and the energy peak in the beta rhythm frequency range;
[0039] The difficulty level identification module is configured to predict the imagination accuracy of the user performing the motor imagination task based on the relative intensity of the α rhythm energy and the β rhythm energy and each of the energy peaks using the classification model obtained through training; and determine the motor imagination difficulty level based on the imagination accuracy.
[0040] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes a method for controlling the difficulty of motor imagination based on a brain-computer interface as provided in any possible embodiment of the first aspect.
[0041] Compared with the existing technology, the method for regulating the difficulty of motor imagery based on a brain-computer interface provided in the embodiment of the present application, by collecting EEG signals from multiple brain regions of the user and extracting the average power spectral density curve, can capture subtle changes in the user's brain activity when performing motor imagery tasks of different difficulty levels, making the assessment of motor imagery difficulty more accurate; through refined feature extraction, the accuracy and stability of the classification model can be improved; the extracted features are input into the trained classification model to predict the accuracy of motor imagery, and the motor imagery difficulty level can be determined based on the accuracy, so that the motor imagery difficulty can be regulated according to the patient's performance, so that it is in an appropriate range, thereby helping the patient to recover better. This step not only realizes the automated assessment of the difficulty of motor imagery, but also provides strong support for subsequent difficulty regulation.
[0042] Compared with the existing technology, the motor imagery difficulty control device based on brain-computer interface provided in the embodiment of the present application has the same beneficial technical effects as the above-mentioned motor imagery difficulty control method based on brain-computer interface, which will not be elaborated. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the present application in any way. In addition, the shapes and proportional dimensions of the components in the drawings are only schematic and are used to help understand the present application. They do not specifically limit the shapes and proportional dimensions of the components of the present application. Those skilled in the art can select various possible shapes and proportional dimensions to implement the present application according to the specific circumstances under the guidance of the present application. In the drawings:
[0044] Figure 1A flowchart of a method for controlling the difficulty of motor imagery based on a brain-computer interface provided in an embodiment;
[0045] Figure 2 A schematic flow chart of a method for controlling motor imagery difficulty based on a brain-computer interface provided in another embodiment;
[0046] Figure 3 This is a schematic block diagram of the structure of a motor imagery difficulty control device based on a brain-computer interface provided in an embodiment. DETAILED DESCRIPTION
[0047] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0048] This embodiment provides a method for controlling the difficulty of motor imagery based on a brain-computer interface. Figure 1 , comprising: step S1: collecting EEG signals from multiple brain regions of the user;
[0049] Step S2: extract the average power spectrum density curve of the EEG signal of each brain region respectively;
[0050] Step S3: extracting the relative intensities of the α rhythm energy and the β rhythm energy, the energy peak in the α rhythm frequency range, and the energy peak in the β rhythm frequency range according to the average power spectral density curve;
[0051] Step S4: Based on the relative intensities of the α rhythm energy and the β rhythm energy and the peak values of each energy, the classification model obtained through training is used to predict the imagination accuracy of the user performing the motor imagery task;
[0052] Step S5: Determine the motor imagery difficulty level according to the imagery accuracy.
[0053] In specific implementations, step S1 involves having the user wear an electrode cap, distributing multiple electrodes across the user's head to record EEG activity in the cerebral cortex. The electrode cap can include dry electrodes, wet electrodes, gel electrodes, or other electrodes. During the electrical signal acquisition phase, the user wears the EEG acquisition device to collect EEG signals and record EEG activity in the user's cerebral cortex.
[0054] As an example, the brain areas for collecting EEG signals may include the frontal lobe area (Fz or nearby leads) and the left and right motor areas (usually C3, C4 or nearby leads). In EEG recordings, Fz represents the electrode position located in the center of the forehead, and the leads near Fz refer to other electrode positions around Fz, which are also commonly used to record EEG activity in the frontal lobe area. C3 and C4 represent the electrode positions located in the central areas of the left and right hemispheres of the brain, respectively. Leads near C3 and C4 can also record EEG activity in the motor area.
[0055] Specific implementations may also include processing of the collected EEG signals. For example, filtering involves first applying a 50Hz notch to the overall data to remove power frequency interference, then bandpass filtering the EEG data, typically with a 3Hz-25Hz bandpass, using a fourth-order zero-phase Butterworth filter. Artifact removal involves removing physiological artifacts such as electrooculography, electromyography, and electrocardiogram (ECG) from the filtered EEG data. Segmentation involves dividing the entire EEG signal data into time windows. Preprocessing EEG signals can effectively remove noise.
[0056] In a specific embodiment, the collected EEG signals include static EEG signals and motor imagery EEG signals when the user performs a motor imagery task.
[0057] As an example, during the resting EEG signal acquisition period, the user is required to open both eyes and look at the display screen. When a moving cursor slowly appears in the center of the display screen, the user begins to focus on the cursor and acquire data for a set duration (e.g., 1 minute). In one embodiment, the resting-state task data has a time window of 5 seconds and a sliding interval of 2 seconds.
[0058] The motor imagery EEG signals of the user are collected when performing a motor imagery task. The motor imagery task can be a traditional arrow-guided motor imagery task or a motor imagery task accompanied by a regular rhythm. The user can imagine the left hand moving or the right hand moving according to the prompt. As an example, each motor imagery task includes 20 sets of motor imagery, each set includes 1 for each hand. Each motor imagery includes a 3-second rest and 5-second imagination, for a total of 8 seconds. Optionally, when collecting the motor imagery EEG signals, data is collected for the first 3 seconds and the last 5 seconds of each motor imagery.
[0059] Steps S2 and S3 implement the feature extraction stage.
[0060] In step S2, the power spectral density (PSD) curves of the EEG signals collected by each lead of the prefrontal brain area, the left motor brain area, and the right motor brain area can be calculated for each time window, and then the power spectral density curves of the same task state (left hand motor imagery or right hand motor imagery) are averaged, that is, the average PSD data of the prefrontal brain area, the average PSD data of the left motor brain area, and the average PSD data of the right motor brain area. If a certain brain area has only a single electrode, no averaging processing is required to form a second feature set.
[0061] In some embodiments, the averaged power spectral density curve can be smoothed. After the processing is completed, each sample of the second feature set includes PSD data of three brain regions (prefrontal brain region, left motor brain region and right motor brain region), namely, PSD data of the prefrontal brain region, PSD data of the left motor brain region and PSD data of the right motor region.
[0062] In some embodiments, baseline correction of the motor imagery EEG signal is also included. The specific method includes: subtracting the PSD data of the first 3 seconds from the PSD data of the 5 seconds after each imagery to obtain the corrected PSD data.
[0063] In some embodiments, step S3 performs feature extraction on the second feature set. For each sample, the specific steps are as follows: Calculate the alpha rhythm energy and beta rhythm energy for the prefrontal brain region PSD data. For each time window, calculate the energy area between 8Hz and 13Hz as the alpha energy value, and calculate the energy area between 14Hz and 32Hz as the beta energy value for the prefrontal brain region spectrum data. Calculate the alpha / beta ratio as the relative intensity feature of the alpha and beta rhythm energies.
[0064] In some embodiments, the corrected left motor brain area PSD data and the corrected right motor area PSD data are further processed and calculated for energy peaks, and the steps are as follows: using nonlinear fitting methods, the PSD curves of the left motor brain area PSD data and the right motor area PSD data are respectively modeled, and the energy peaks of the PSD curves in the α rhythm frequency range and the energy peaks in the β rhythm frequency range are calculated. The modeling fitting formula of the power spectrum density is as follows:
[0065]
[0066] Where P(x) is the fitting model of the power spectrum density curve, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model, and a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters. To ensure that the fitting effect is as close to the real world as possible, a1, a2, a3, k1, k2, k3 are all greater than 0.
[0067] As an example, the b1 value range is 8-12 Hz to ensure that the peak is within the α rhythm frequency range; the b2 value range is 12-20 Hz to ensure that the peak is within the β rhythm frequency range; the b3 value is related to the lower limit of the bandpass filter and the filter order. As a rule of thumb, the lower limit is plus or minus 2. For example, when the data bandpass filter range is 3 Hz-40 Hz, the b2 value range is ln(1) to ln(5).
[0068] In some embodiments, the energy peak model is expressed as follows:
[0069]
[0070] Where x is a random variable, a is the variance of the first distribution, and b is the parameter of the second distribution.
[0071] As an example, the noise fitting model θ(x|a,b) is expressed as follows:
[0072]
[0073] Where x is a random variable, a is the first parameter, and b is the second parameter.
[0074] In some embodiments, after the fitting is completed, the total energy peak E of the entire brain region is calculated using the following formula:
[0075]
[0076] As an example, the random variable x takes values in the range of 8 Hz to 20 Hz.
[0077] It can be understood that the energy value may change with the change of the random variable x, and the maximum energy value is taken as the energy peak value.
[0078] After the above feature extraction process, each piece of data in the second feature set obtains three feature values, which can be respectively:
[0079] 1) The α / β value of the prefrontal brain area;
[0080] 2) the total energy peak E1 in the left motor brain area;
[0081] 3) The total energy peak E2 of the right motor brain area.
[0082] Then, the resting-state EEG signals and the motor imagery EEG signals when the user performs the motor imagery task are normalized separately and then averaged to obtain a total of 6 feature values corresponding to the two tasks for each user, 2 average values of α / β in the prefrontal brain area, and 4 average values of motor-related potential peaks in the motor area. They are also normalized separately to obtain the third feature set.
[0083] In some embodiments, step S4 inputs the features of the third feature set into a classification model to predict the imagination accuracy of the user performing the motor imagery task.
[0084] In an embodiment, the classification model is used to detect the imagination accuracy of the user when performing the current motor imagery task, and to predict the initial difficulty of the motor imagery that the user can bear.
[0085] In some embodiments, a large amount of user motor imagery EEG and corresponding imagery accuracy data can be collected, and a third feature set and corresponding imagery accuracy can be extracted using each set of EEG signals, and the obtained regression model can be trained as a classification model.
[0086] Optionally, users are divided into 6 groups (male / female; young / middle-aged / elderly) according to their age and gender, and each group includes an independent motor imagery difficulty level category and the imagination accuracy rate of the motor imagery difficulty level category.
[0087] Optionally, the corresponding classifier is selected according to the user's age and gender (male / female; young / middle-aged / elderly). The model input feature number is 6, and the output result is the imagination accuracy rate P of the motor imagery task. pre ,According to the imagination accuracy, the imagination accuracy of the user performing the,motor imagination task is predicted.
[0088] In some embodiments, determining the difficulty level of motor imagery based on the imagination accuracy rate includes: pre The imagination accuracy rate achieved by the user when performing the motor imagery task at the default difficulty level is used as the first classification output. The category of the user's motor imagery difficulty is determined based on the imagination accuracy rate. Based on the imagination accuracy rate and the category, the motor imagery difficulty level MI is calculated as the second classification output. The formula is as follows:
[0089]
[0090] Among them, MI is the difficulty level of motor imagery, L n is the center value of the motor imagery difficulty level interval corresponding to the category mapping, S n is the standard deviation of imagination accuracy within the category, P pre is the imagined accuracy rate obtained by the classification model prediction, M n is the central value of the imagination accuracy within the category.
[0091] For example, if the first category's classification model predicts an imagination accuracy range of 30%-56%, with a center value of 40% for that category, the imagination accuracy can be mapped to a range of 0-2.5 using the motor imagery difficulty level (MI) calculation formula, with a center value of 40% corresponding to a motor imagery difficulty level of 1.25.
[0092] In some embodiments, the category to which the user's motion imagination difficulty belongs is determined based on the imagination accuracy, including: clustering the motion imagination accuracy of the training data set in advance and dividing it into various categories; determining the central value of the imagination accuracy in each category based on the clustering results; calculating the distance between the imagination accuracy and each central value, and classifying the user's motion imagination difficulty into the category with the closest distance.
[0093] As an example, the first category imagination accuracy is mapped to the first interval of the motion imagination difficulty level (such as 0-2.5), and the central value of the imagination accuracy in the first category is mapped to the first central value of the motion imagination difficulty level (such as 1.25), indicating that the user's motion imagination is the most difficult; the second category imagination accuracy is mapped to the second interval (such as 2.6-5), and the central value of the imagination accuracy in the second category is mapped to the second central value of the motion imagination difficulty level (such as 3.75), indicating that the user's motion imagination is slightly difficult; the third category imagination accuracy is mapped to the third interval of the motion imagination difficulty level (such as 5-7.5), and the central value of the imagination accuracy in the third category is mapped to the third central value of the motion imagination difficulty level (such as 6.75), indicating that the user's motion imagination difficulty is appropriate; the fourth category imagination accuracy is mapped to the fourth interval of the motion imagination difficulty level (7.6-10), and the central value of the imagination accuracy in the fourth category is mapped to the fourth central value of the motion imagination difficulty level (such as 8.75), indicating that the user's motion imagination is relatively easy.
[0094] Optionally, the calculated motor imagery difficulty level MI range cannot exceed the mapped category boundary value and is rounded to 1 decimal place. If the user's imagination accuracy is classified as the third category, the motor imagery difficulty level interval center value L corresponding to the third category is n If the calculated value of MI is less than the first boundary (such as 5) or greater than the second boundary (such as 7.5), the boundary value can be taken.
[0095] In some embodiments, the central imagination accuracy of the third category of users is the standard imagination accuracy P0, and the standard deviation of the imagination accuracy of the third category of users is S0.
[0096] The imagination accuracy rate P is calculated by the motor imagination difficulty level MI formula. preConverted into the motor imagery difficulty level MI, the scoring range is 0-10, 0 represents the lowest difficulty of the system setting, and 10 represents the highest difficulty of the system setting, ensuring that the accuracy of all types of users is close to the standard motor imagery accuracy when actually performing motor imagery tasks.
[0097] The method for regulating the difficulty of motor imagery based on a brain-computer interface provided in the embodiment of the present application can personalize rehabilitation treatment plans according to the patient's brain activity characteristics and improve the treatment effect.
[0098] Based on the above embodiments, some embodiments provide a method for controlling the difficulty of motor imagery based on a brain-computer interface, such as Figure 2 As shown, the system also includes online difficulty assessment: During treatment, users follow prompts to perform motor imagery tasks. EEG signals are collected in real time and, based on the difficulty strategy, output is provided to determine whether the user's imagery is correct. Simultaneously, the difficulty is adjusted in real time based on the user's performance. This system evaluates the user's current performance based on their real-time performance and adjusts the difficulty accordingly.
[0099] Optionally, after obtaining the initial motor imagery ability level of each user, targeted rehabilitation training is performed on each user according to the motor imagery difficulty grading table.
[0100] Collect the user's EEG data in real time, determine the average of n consecutive imagination accuracy rates, and obtain the average imagination accuracy PM. The calculation formula is as follows:
[0101]
[0102] Among them, PM refers to the most recent n motor imagery tasks of each user, P i Refers to the imagination accuracy of a motor imagery task, optionally, the motor imagery correct P i 1, error P i is 0.
[0103] The value of n can be 10, which is an experience value. After the nth motor imagery task, an evaluation is performed after each motor imagery task, and PM is output to adjust the difficulty of motor imagery.
[0104] With P0 as the baseline difficulty, the normal range is P0-S0 to P0+S0. If the mean image accuracy PM falls within the normal range, no difficulty intervention is performed. If PM is greater than the normal range, the MI is increased by 1. If PM is less than the normal range, the MI is decreased by 1.
[0105] The embodiment of the present application analyzes the collected electroencephalography (EEG) signals to predict the difficulty of motor imagery that the patient can bear. The initial difficulty is set according to the prediction result, and motor imagery training is started. During the training process, the difficulty of motor imagery is adjusted in real time according to the patient's performance. The difficulty of motor imagery can be adjusted according to the evaluation results of the user's motor imagery ability. If the user's motor imagery ability is weak (the total energy peak E value is low), the user shows a low degree of movement completion or obvious fatigue, and the difficulty of motor imagery can be appropriately reduced; if the user's motor imagery ability is strong (the total energy peak E value is high), the user shows a high degree of movement completion, and the difficulty of motor imagery can be appropriately increased.
[0106] The embodiment of the present application can adjust the treatment difficulty in real time according to the individual differences and recovery status of the patient, thereby improving the treatment effect. At the same time, the feedback module can help patients understand their own recovery status and encourage them to persist in treatment.
[0107] Based on the same inventive concept above, an embodiment of the present application also provides a motor imagery difficulty control device based on a brain-computer interface, including: an EEG signal acquisition module, a feature extraction module and a difficulty level recognition module.
[0108] The EEG signal acquisition module is configured to acquire EEG signals from multiple brain regions of the user;
[0109] The feature extraction module is configured to extract the average power spectrum density curve of the EEG signal of each brain region respectively; based on the average power spectrum density curve, extract the relative intensity of the alpha rhythm energy and the beta rhythm energy, the energy peak in the alpha rhythm frequency range, and the energy peak in the beta rhythm frequency range;
[0110] The difficulty level identification module is configured to predict the imagination accuracy of the user performing the motor imagination task based on the relative intensity of α rhythm energy and β rhythm energy and each energy peak using the classification model obtained through training; and determine the difficulty level of the motor imagination based on the imagination accuracy.
[0111] In some embodiments, such as Figure 3 As shown, the motor imagery difficulty control device based on the brain-computer interface also includes a difficulty assessment module and a difficulty adjustment module; the difficulty assessment module is configured to determine the average of the accuracy rates of n consecutive imaginations; and compare the average with a threshold range; the difficulty adjustment module is configured to increase the motor imagery difficulty level by one level if the average is greater than the threshold range, thereby increasing the motor imagery difficulty; and to decrease the motor imagery difficulty level by one level if the average is less than the threshold range, thereby decreasing the motor imagery difficulty. The embodiment of the present application can adjust the difficulty at any time according to the patient's performance, ensuring that the treatment is always within the range acceptable to the patient.
[0112] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the above-mentioned method for controlling the difficulty of motor imagery based on a brain-computer interface.
[0113] Each embodiment in this specification focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.
[0114] The above is a detailed introduction to the method, device and storage medium for controlling the difficulty of motor imagination based on brain-computer interface provided by this application. This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the concept of this application and should not be understood as limiting the scope of protection of this application.
Claims
1. A method for controlling the difficulty of motor imagery based on a brain-computer interface, characterized in that: include: Collect EEG signals from multiple brain regions of the user; extracting the average power spectral density curve of the EEG signal from each of the brain regions; According to the average power spectrum density curve, the relative intensity of α rhythm energy and β rhythm energy, the energy peak in the α rhythm frequency range, and the energy peak in the β rhythm frequency range are extracted; according to the relative intensity of α rhythm energy and β rhythm energy and each energy peak, the classification model obtained by training is used to predict the imagination accuracy of the user performing the motor imagery task, including: the brain area includes a first brain area, a second brain area and a third brain area; based on the average power spectrum density curve of the first brain area, the relative intensity of α rhythm energy and β rhythm energy is extracted; based on the average power spectrum density curves of the second brain area and the third brain area, the energy peak in the α rhythm frequency range and the energy peak in the β rhythm frequency range are extracted respectively; according to the energy peak in the α rhythm frequency range and the energy peak in the β rhythm frequency range, the total energy peak E of the second brain area and the third brain area are determined respectively; The calculation formula of the total energy peak E is as follows: in, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model; a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters; The motor imagery difficulty level is determined according to the imagery accuracy rate.
2. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 1, characterized in that: The motor imagery difficulty level is determined based on the imagery accuracy, including: Determining the category of the user's motor imagination difficulty based on the imagination accuracy; Based on the imagination accuracy and the category, the motor imagination difficulty level is determined, and the expression is as follows: Wherein, MI is the difficulty level of motor imagery, L n is the center value of the motor imagery difficulty level interval corresponding to the category, S n is the standard deviation of the imagination accuracy within the category, P pre M is the predicted accuracy of the imagination. n is the center value of the imagination accuracy within the category.
3. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 2, characterized in that: Determining the category of the user's motor imagination difficulty based on the imagination accuracy includes: Clustering is performed in advance based on the motor imagery accuracy of the training data set to obtain each category; Determine the central value of imagination accuracy within each category based on the clustering results; The distance between the imagination accuracy and each center value is calculated, and the user's movement imagination difficulty is classified into the category with the closest distance.
4. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 1, characterized in that: The method further comprises: Determine the mean of the accuracy of n consecutive imaginations; Compare the mean with the threshold range. If the mean is greater than the threshold range, increase the motor imagination difficulty level by one level to increase the motor imagination difficulty; if the mean is less than the threshold range, reduce the motor imagination difficulty level by one level to reduce the motor imagination difficulty.
5. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 1, characterized in that: The fitting formula of the power spectral density curve is as follows: Wherein, P(x) is the fitting model of the power spectrum density curve, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model; a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters.
6. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 5, characterized in that: The expression of the noise fitting model θ(x|a,b) is as follows: Where x is a variable whose value range is the same as the bandpass frequency; a is the first parameter and b is the second parameter.
7. The method for controlling the difficulty of motor imagery based on brain-computer interface according to claim 1, characterized in that: The method further comprises: Determine the age and gender of the user, and select the corresponding classification model according to the age and gender.
8. A device for controlling the difficulty of motor imagery based on a brain-computer interface, characterized in that: include: an EEG signal acquisition module configured to acquire EEG signals from multiple brain regions of the user; The feature extraction module is configured to respectively extract the average power spectrum density curve of the electroencephalogram signal of each of the brain regions; extract the relative intensity of α rhythm energy and β rhythm energy, the energy peak in the α rhythm frequency range, and the energy peak in the β rhythm frequency range based on the average power spectrum density curve, including: the brain regions include a first brain region, a second brain region, and a third brain region; based on the average power spectrum density curve of the first brain region, extract the relative intensity of α rhythm energy and β rhythm energy; based on the average power spectrum density curves of the second brain region and the third brain region, extract the energy peak in the α rhythm frequency range and the energy peak in the β rhythm frequency range; based on the energy peak in the α rhythm frequency range and the energy peak in the β rhythm frequency range, respectively determine the total energy peak E of the second brain region and the third brain region; the calculation formula of the total energy peak E is as follows: in, is the energy peak model of the α rhythm frequency range, is the energy peak model of the β rhythm frequency range, θ(x|a3,b3) is the noise fitting model; a1, a2, a3, b1, b2, b3, k1, k2, k3 are fitting parameters; The difficulty level identification module is configured to predict the imagination accuracy of the user performing the motor imagination task based on the relative intensity of the α rhythm energy and the β rhythm energy and each of the energy peaks using the classification model obtained through training; and determine the motor imagination difficulty level based on the imagination accuracy.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the method for controlling the difficulty of motor imagery based on a brain-computer interface as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Limb movement imagination brain-computer interaction method and system
CN112306244A
Motor imagery recognition method based on electroencephalogram signal cross-rhythm multilayer coupling brain network
CN116211318A