Adaptive concentration training method, device and medium based on electroencephalogram signals
By combining EEG detection and multimodal stimulation, artificial intelligence technology is used to achieve accurate assessment and dynamic adjustment of user's concentration status, the problem of difficulty in evaluating and adjusting user's attention in the existing technology is solved, and the attention of users is achieved Effectively improve and efficient completion of training tasks.
Patent Information
- Application Number
- CN202411433519.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-10-15
AI Technical Summary
The existing technology is difficult to effectively evaluate and adjust the user's concentration status, and the lack of real-time detection and closed-loop control mechanisms for user attention, making it difficult to achieve targeted concentration improvement.
By combining EEG detection, task attribute analysis and multimodal stimulation, artificial intelligence technology is used to achieve accurate detection and rational evaluation of user's concentration status, dynamically adjust visual and auditory feedback stimulation, and form a closed-loop optimization mechanism to improve user's attention Invest.
It realizes all-round and closed-loop optimization and adjustment of user attention, ensuring that the concentration dynamically returns to the optimal range, and improving the efficiency of training tasks and the user's concentration management ability.
Smart Images

Figure CN118963559B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of brain-computer interface technology, and in particular to an adaptive concentration training method, device and medium based on electroencephalogram signals. Background Art
[0002] In recent years, with the rapid development of information technology, human-computer interaction and intelligent systems have been increasingly used in various fields. In many scenarios such as education and training, work and study, how to effectively improve users' concentration and focus has become a key issue that needs to be solved urgently.
[0003] As a safe and non-invasive means of detecting brain activity, electroencephalogram (EEG) technology has the advantages of high temporal resolution and easy wearability, and has been widely used in the fields of cognitive computing and mind decoding. At present, using EEG signals to detect concentration has become a hot research direction. The common practice is to extract some features related to the state of concentration from EEG data, such as time domain statistics, frequency domain power spectrum, etc., and build a concentration classification model based on these features. However, existing methods can usually only evaluate the user's current concentration level, lacking the judgment of its rationality and targeted adjustment mechanism.
[0004] On the other hand, multiple stimulation modalities (visual, auditory, tactile, etc.) play an important role in attracting and maintaining human attention. By rationally designing the content, presentation time, and intensity parameters of multimodal stimulation, users can be effectively reminded to focus and improve their concentration. However, most existing multimodal stimulation systems lack real-time detection and closed-loop control mechanisms for user status, making it difficult to achieve targeted and individualized teaching. Summary of the invention
[0005] The embodiments of the present application provide an adaptive concentration training method, device and medium based on EEG signals, which can solve the problem of how to effectively improve the user's concentration and focus in many scenarios such as education and training, work and study. The provided method integrates EEG detection, task attribute analysis, multimodal stimulation and artificial intelligence technology, and realizes the seamless connection of accurate detection of the user's concentration state, rationality evaluation and closed-loop regulation, so as to maximize the stimulation and maintenance of the user's attention input, and provide intelligent auxiliary optimization for various cognitive training activities.
[0006] In a first aspect, the present application provides an adaptive concentration training method based on EEG signals, comprising:
[0007] Acquire the user's brain wave images at multiple times, and construct an original brain wave time series signal based on the multiple brain wave images;
[0008] Obtaining the original EEG data of the user to be trained, preprocessing the original EEG data, and obtaining time domain EEG features and frequency domain EEG features related to the concentration state;
[0009] Obtain a pre-built detection model, input the raw EEG data into the detection model, and output the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels;
[0010] Generate visual feedback stimulation and auditory feedback stimulation according to the concentration level to influence the user's concentration state;
[0011] Obtaining task attribute parameters of the training task corresponding to the user and the user's permission data for the training task, and generating a trade-off relationship based on the task attribute parameters and the permission data;
[0012] Generate a target focus level and a reasonable interval range corresponding to the target focus level according to task attribute parameters, trade-off relationships and focus levels;
[0013] The target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data are used to generate a focus evaluation set, multiple sub-evaluation scores corresponding to the focus evaluation set are calculated, and a comprehensive feedback adjustment coefficient is obtained based on the multiple sub-evaluation scores;
[0014] The parameters of the visual feedback stimulation and the auditory feedback stimulation are optimized according to the feedback adjustment coefficient, and the adaptive concentration training of the user is completed according to the optimized visual feedback stimulation and the auditory feedback stimulation.
[0015] In a second aspect, the present application also provides an adaptive concentration training device, comprising:
[0016] A data acquisition module is used to acquire the original EEG data of the user to be trained, pre-process the original EEG data, and acquire the time domain EEG features and frequency domain EEG features related to the concentration state;
[0017] A level output module is used to obtain a pre-built detection model, input the raw EEG data into the detection model, and output the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels;
[0018] A stimulus generation module, used for generating visual feedback stimulus and auditory feedback stimulus according to the concentration level, so as to influence the concentration state of the user;
[0019] A trade-off acquisition module is used to obtain the task attribute parameters of the training task corresponding to the user and the user's permission data for the training task, and generate a trade-off relationship based on the task attribute parameters and the permission data;
[0020] A target generation module, used to generate a target concentration level and a reasonable interval range corresponding to the target concentration level according to task attribute parameters, trade-off relationships and concentration levels;
[0021] The coefficient acquisition module is used to generate a focus evaluation set based on the target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data, calculate multiple sub-evaluation scores corresponding to the focus evaluation set, and obtain the comprehensive feedback adjustment coefficient based on the multiple sub-evaluation scores;
[0022] The training completion module is used to optimize the parameters of the visual feedback stimulation and the auditory feedback stimulation according to the feedback adjustment coefficient, and complete the adaptive concentration training of the user according to the optimized visual feedback stimulation and the auditory feedback stimulation.
[0023] In a third aspect, the present application also provides a computer device, comprising a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the adaptive concentration training method based on EEG signals as described in the first aspect is implemented.
[0024] In a fourth aspect, the present application further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the adaptive concentration training method based on EEG signals as described in the first aspect.
[0025] The invented method realizes all-round, closed-loop optimization and adjustment of user attention by designing multi-modal stimulations such as vision (font, color, animation, etc.), hearing (volume, pitch, speech speed, etc.), and touch (vibration intensity), and dynamically adjusting the parameter intensity of each modal stimulation based on the adjustment coefficient. The system will automatically select the appropriate stimulation mode (such as visual prompts, voice broadcasts, etc.) and the corresponding stimulation intensity according to the current concentration status, and guide the user to refocus on the cognitive training task. During the training process, the intelligent system forms an adaptive optimization closed loop with the user, continuously perceives and analyzes the user's concentration state, and conducts targeted adjustment interventions to dynamically restore the concentration to the optimal range, ensuring that the training task is completed efficiently. Long-term use of this method can not only improve the user's current concentration, but also play a role in cognitive ability training and habit formation, and gradually optimize their concentration management ability.
[0026] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of a flow chart of an adaptive concentration training method based on EEG signals according to an embodiment of the present application;
[0028] Figure 2 This is a schematic diagram of the structure of an adaptive concentration training device according to an embodiment of the present application;
[0029] Figure 3 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0030] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0031] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0032] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0033] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0034] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0035] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0036] The technical solution of the embodiment of the present application is introduced below.
[0037] Please refer to Figure 1 , Figure 1 The flowchart of an adaptive concentration training method based on EEG signals provided in the embodiment of the present application is shown in FIG. The adaptive concentration training method based on EEG signals in the embodiment of the present application can be applied to computer devices, including but not limited to smart phones, laptops, tablet computers, desktop computers, physical servers, cloud servers and other devices. Figure 1 As shown, the adaptive concentration training method based on EEG signals of this embodiment includes steps S101 to S107, which are described in detail as follows:
[0038] Step S101, obtaining the original EEG data of the user to be trained, preprocessing the original EEG data, and obtaining time domain EEG features and frequency domain EEG features related to the concentration state.
[0039] Specifically, the raw EEG data is preprocessed, including denoising and filtering, to eliminate irrelevant information such as electrode interference and environmental noise. Then, the time domain features (such as brain wave amplitude, change speed, etc.) and frequency domain features (such as power spectrum in a specific frequency band) related to the state of concentration are extracted. This ensures the accuracy and reliability of the data and improves the effect of subsequent analysis and model application. The core features that can reflect the user's state of concentration are extracted to provide basic data for subsequent steps.
[0040] In some embodiments, the raw EEG data is preprocessed, including: digital bandpass filtering of the raw EEG data, the filtered raw EEG data includes effective components related to the concentration state and filters out baseline drift, DC components, myoelectric interference, and power frequency interference in the raw EEG data; dividing the filtered raw EEG data according to preset time intervals to obtain multiple data segments; performing baseline correction on each data segment to eliminate remaining baseline drift and DC bias, so that the baseline of each data segment is 0 point.
[0041] By digitally bandpass filtering the raw EEG data. The frequency range of the bandpass filter is set to the frequency band that is usually associated with the state of concentration. For example, the common frequency band associated with concentration is 4-40 Hz. A bandpass filter can be selected, and this bandpass range mainly contains delta (0.5-4 Hz), theta (4-8 Hz), alpha (8-13 Hz), beta (13-30Hz) and gamma (30-40 Hz) waves. The following interferences are removed by bandpass filtering: Baseline drift: Low-frequency drift, usually caused by movement or electrode contact. DC component: Constant DC signal component. Myoelectric interference: Usually above 30 Hz, interference caused by head and facial muscle activity. Power frequency interference: Power supply noise, usually 50 or 60 Hz. Divide the filtered raw EEG data into preset time intervals, such as one segment every 2 seconds. Obtain multiple continuous data segments to ensure more detailed and accurate analysis and processing. Perform baseline correction on each data segment, that is, eliminate the remaining baseline drift and DC offset. The baseline correction method is usually to adjust the mean or median of each data segment to 0, which can greatly reduce the impact of slow drift and DC bias, making the baseline of each data segment relatively stable. Through bandpass filtering, irrelevant frequency components and interference are effectively removed, making the data purer and more accurate. Baseline drift, DC component, myoelectric interference and power frequency interference are eliminated, improving the quality of the signal. At the same time, the filtered data can more accurately reflect the effective components related to the state of concentration in the EEG signal, improving the reliability of the data. Baseline correction makes the baseline of each data segment 0, eliminates residual drift and bias, and ensures the fairness of analysis and comparison.
[0042] In some embodiments, obtaining time domain EEG features and frequency domain EEG features related to the state of concentration includes: obtaining the time delay and embedding dimension corresponding to the reconstruction of the original EEG data; constructing a phase space sequence corresponding to the original EEG data according to the time delay and embedding dimension; reconstructing the topologically equivalent phase space trajectory of the preprocessed original EEG data according to the phase space sequence; and extracting the time domain EEG features and frequency domain EEG features from the topologically equivalent phase space trajectory according to the Kent entropy method.
[0043] Time Delay: It refers to the time interval selected when reconstructing the phase space. The time delay is usually determined by the autocorrelation function or mutual information method. Embedding Dimension: It indicates the number of independent coordinate axes required to fully describe the system state in the phase space. The embedding dimension is usually determined by the pseudo nearest neighbor algorithm or the Cao method. Using the time delay and embedding dimension determined above, the original EEG data is converted into a point sequence in the phase space. The phase space sequence extracts the trajectory in the multidimensional phase space from the time series through the time delay coordinate transformation to reflect the dynamic characteristics of the system. The corresponding phase space trajectory is constructed based on the phase space sequence. During the topological reconstruction process, the dynamic characteristics of the data are kept unchanged, so as to obtain a topologically equivalent phase space trajectory. This trajectory reconstruction makes the complex dynamic behaviors (such as periodicity and chaotic characteristics) hidden in the EEG data more obvious. The time domain features are extracted from the topologically equivalent phase space trajectory using the Kantz Entropy method. Kent Entropy quantifies the complexity and uncertainty of the time series and can reflect the transient dynamic behavior of EEG signals. In the phase space trajectory, frequency domain characteristics are extracted through spectrum analysis (such as fast Fourier transform FFT). This includes energy distribution in different frequency bands, such as alpha waves, beta waves, etc. The time domain and frequency domain features extracted from the original EEG data not only help to more accurately evaluate and locate the user's concentration state, but also provide a solid data foundation for adaptive training. The application of these technologies improves the overall performance of the system and user experience.
[0044] Step S102, obtaining a pre-built detection model, inputting the original EEG data into the detection model, and outputting the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels.
[0045] Specifically, a pre-built detection model (usually a machine learning or deep learning model) is obtained. The pre-processed EEG data is input into the detection model, and the model analyzes and processes the data to output the user's concentration level (discrete values, such as high, medium, low, etc.) and confidence score. This provides a quantitative concentration indicator to help clarify the user's current state of concentration. The confidence score can measure the credibility of the output result and provide a basis for subsequent decision-making.
[0046] In some embodiments, obtaining a pre-built detection model includes: obtaining an EEG-concentration dataset collected under a preset cognitive processing task; the EEG-concentration dataset includes multiple sample EEG data and label data corresponding to each sample EEG data; obtaining time domain EEG features and frequency domain EEG features corresponding to the sample EEG data, splicing the time domain EEG features and the frequency domain EEG features to obtain a feature vector; constructing a training sample based on each sample EEG data, the label data corresponding to the sample EEG data, and the feature vector; completing the training of the detection model to be constructed based on the training samples, and obtaining the pre-built detection model.
[0047] By selecting a set of preset cognitive processing tasks, these tasks are designed to induce and measure different states of concentration. When performing cognitive processing tasks, multiple sets of EEG data are collected, and the concentration labels corresponding to each set of data (such as high concentration, medium concentration, and low concentration) are recorded. For each sample EEG data, time domain feature extraction and frequency domain feature extraction are performed. Time domain features may include: mean, variance, peak, time domain entropy, etc. Frequency domain features may include: power spectrum density, frequency center, etc. of each frequency band (such as delta, theta, alpha, beta, gamma). The time domain features and frequency domain features are spliced to form a comprehensive feature vector. This feature vector fully describes the characteristics of each sample EEG data. Through the feature vector and the corresponding concentration label, these data are formed into training samples. Each training sample consists of three parts: sample EEG data, label data corresponding to the sample EEG data, and spliced feature vector. Select an appropriate machine learning or deep learning algorithm (such as random forest, support vector machine, convolutional neural network, etc.). Use the constructed training sample set to train the detection model to be constructed. During the training process, the model parameters are continuously adjusted to optimize the model performance until satisfactory classification accuracy and robustness are achieved. After the training is completed, the trained detection model is saved and obtained. The model can input new EEG data and output the corresponding concentration level and its confidence score.
[0048] Furthermore, through training on a large number of sample EEG data, the detection model can accurately predict the concentration level of new EEG data, improving the accuracy of concentration assessment. The confidence score further provides the confidence of the model prediction and helps evaluate the reliability of the prediction results. The cognitive processing tasks are designed in a variety of ways and the data set covers a wide range, so that the model can adapt to the concentration state of different users and has a high degree of personalized adaptability. By adding label data, the diversity and representativeness of the training data are ensured to better reflect the actual application scenarios. The time domain and frequency domain features are spliced, the time and frequency information of the EEG data is fully utilized, and a high-dimensional feature vector is constructed to improve the ability of feature expression. The comprehensive feature vector ensures that the model has good recognition ability in different dimensions and improves the overall performance of the model. Through training on a large number of samples, the model has good generalization ability and can maintain good stability and accuracy between different tasks and users. Modern machine learning and deep learning algorithms are used to effectively deal with the high-dimensional and nonlinear characteristics of EEG data. The pre-built detection model can be applied to a variety of scenarios, such as education, games, and medical care, which helps to monitor and adjust the user's concentration state in real time. The training method and structure of the model are universal and can be flexibly adjusted and expanded according to different application scenarios.
[0049] Then, through detailed feature extraction and model training, the final detection model is ensured to be efficient, accurate and stable, which provides a solid technical foundation for subsequent user concentration monitoring and training.
[0050] Step S103: generating visual feedback stimulation and auditory feedback stimulation according to the concentration level to influence the concentration state of the user.
[0051] Specifically, corresponding visual and auditory feedback stimulation is generated according to the concentration level. The feedback stimulation can be in the form of pictures, animations, music, sound prompts, etc. The purpose is to guide and adjust the user's concentration state through these stimulations. Then, through timely feedback stimulation, the user can immediately perceive the changes in his concentration, adjust his attention, and improve the training effect.
[0052] In some embodiments, generating visual feedback stimulation and auditory feedback stimulation according to the concentration level includes: determining the visual stimulation type and visual stimulation parameters corresponding to the visual feedback stimulation and the auditory stimulation type and auditory stimulation parameters corresponding to the auditory feedback stimulation according to the concentration level; determining the modal coding and presentation method corresponding to the visual stimulation type and the auditory stimulation type; generating visual feedback stimulation and auditory feedback stimulation according to the modal coding, presentation method, visual stimulation type, auditory stimulation type, visual stimulation parameters and auditory stimulation parameters; wherein, if the concentration level is greater than or equal to a preset level, the visual stimulation type and the auditory stimulation type are positive visual stimulation and positive auditory stimulation; if the concentration level is lower than the preset level, the visual feedback stimulation and the auditory feedback stimulation are suggestive visual stimulation and suggestive auditory stimulation.
[0053] It is determined according to the user's current level of concentration. For example, a positive visual stimulus type can be a visual reward (such as color change, brighter screen, etc.), and a suggestive visual stimulus type can be a warning icon or darkening of color, etc. Visual stimulus parameters include but are not limited to parameters such as brightness, color, and display time. These parameters can refine the form of visual stimulation. The auditory stimulus type is determined according to the user's level of concentration. For example, a positive auditory stimulus type can be a positive sound effect (such as pleasant music or prompt sound), and a suggestive auditory stimulus type can be a reminder sound (such as a warning sound, a low prompt sound, etc.). Auditory stimulation parameters include parameters such as volume, pitch, duration, and rhythm, which define the specific form of auditory stimulation.
[0054] Different types of visual and auditory stimuli are concretized through coding. For example, a specific code represents a certain color change or a certain piece of music. Determine the presentation method of visual and auditory stimuli, such as synchronous display, delayed display, gradual change, etc. This determines the presentation time and order of feedback stimuli. According to the aforementioned determined modal coding, presentation method, stimulus type and its parameters, specific visual and auditory feedback stimuli are generated. Visual feedback stimuli may include color changes, brightness adjustment, icon display, etc. Auditory feedback stimuli may include prompt sounds, music, warning sounds, etc. According to the concentration level, the type and parameters of visual and auditory stimuli are dynamically adjusted: when the concentration level is greater than or equal to the preset level, positive visual stimuli and positive auditory stimuli are generated. When the concentration level is lower than the preset level, suggestive visual stimuli and suggestive auditory stimuli are generated.
[0055] Furthermore, the provided method can generate real-time and personalized visual and auditory feedback stimulation according to the user's concentration level, effectively promoting the improvement of the user's attention and the development of self-regulation ability. The above technical content and beneficial effects complement each other and provide users with an efficient, intelligent and highly interactive feedback mechanism.
[0056] Step S104, obtaining the task attribute parameters of the training task corresponding to the user and the user's authority data for the training task, and generating a trade-off relationship according to the task attribute parameters and the authority data.
[0057] Specifically, by obtaining the attribute parameters of the user's current training task (such as difficulty, type, goal, etc.), and then obtaining the user's permission data for the training task (such as whether interruption is allowed, maximum time limit, etc.), a trade-off relationship is generated, that is, a balance is found between the effectiveness of completing the task and the user's comfort. Personalized training tasks based on the needs of different users and tasks have been implemented, and the training content and intensity are dynamically adjusted. Improve the pertinence and effectiveness of training and avoid excessive fatigue or burden.
[0058] In some embodiments, the task attribute parameters include at least a difficulty level, a subject type, and a knowledge point range; a trade-off relationship is generated based on the task attribute parameters and the authority data, including: obtaining a difficulty coefficient corresponding to the task attribute parameters based on the difficulty level; obtaining a subject preference coefficient corresponding to the task attribute parameters based on the subject type; obtaining a knowledge point range coefficient corresponding to the task attribute parameters based on the knowledge point range; obtaining a permission level coefficient and an operable boundary based on the authority data; inputting the difficulty coefficient, subject preference coefficient, knowledge point range coefficient, authority level coefficient, and operable boundary into a preset mapping model, and the mapping model outputs a trade-off relationship corresponding to the task attribute parameters and the authority data.
[0059] The difficulty level indicates the complexity of the task and the skill level required to complete it, and usually has multiple levels (such as simple, medium, difficult, etc.). The topic type reflects the topic or field to which the task belongs, which can be a specific discipline or technology category. The knowledge point scope refers to the breadth and depth of the knowledge points involved in the task, which helps to evaluate the knowledge coverage and practical application value of the task. The difficulty coefficient is calculated based on the difficulty level using a preset standard or evaluation method. For example, a simple task may correspond to a lower difficulty coefficient, while a difficult task may correspond to a higher difficulty coefficient. The topic preference coefficient is calculated based on the topic type and the user / system preference history or settings. For example, if a user has a higher preference for a specific topic, the preference coefficient for that topic is higher. The knowledge point scope coefficient is calculated based on the scope of the knowledge points involved in the task, evaluating the breadth and depth. For example, a task with a wide range and depth corresponds to a higher knowledge point scope coefficient.
[0060] The permission level coefficient is assigned a corresponding coefficient value according to the permission level of the user or system. The permission level may include different levels such as ordinary users, advanced users, and administrators. The operable boundary is the scope and restrictions of the user or system in a specific task or operation determined based on the permission data.
[0061] All the above coefficients and operational boundaries are input into the preset mapping model. The mapping model generates the trade-off relationship between task attribute parameters and permission data through algorithms or rules. The mapping model can be a rule-based system or a machine learning model (such as linear regression, decision tree, neural network, etc.), which calculates the optimized trade-off relationship based on the input coefficients and boundaries. Through the application of multi-parameter comprehensive evaluation and mapping model, a scientific and reasonable trade-off relationship is generated, which realizes the refinement and intelligence of task configuration and permission management, and greatly improves the efficiency, security and user experience of the method.
[0062] Step S105 , generating a target concentration level and a reasonable interval range corresponding to the target concentration level according to the task attribute parameters, the trade-off relationship and the concentration level.
[0063] Specifically, the method provided generates the target concentration level for the next step based on the task attribute parameters, the trade-off relationship and the current concentration level. The reasonable interval range of the target concentration level (i.e., the range of concentration that the user needs to maintain) is determined. By setting clear goals, users can be guided to gradually improve their concentration ability. A reasonable interval range is determined to avoid goals that are too high or too low, thereby increasing accessibility and the actual effect of training.
[0064] In some embodiments, a target concentration level and a reasonable range corresponding to the target concentration level are generated according to task attribute parameters, trade-off relationships and concentration levels, including: obtaining target concentration levels and reasonable ranges corresponding to multiple preset cognitive task types; constructing a mapping table according to cognitive task types, target concentration levels and reasonable ranges; determining a target task type from multiple cognitive task types in the mapping table according to task attribute parameters, trade-off relationships and concentration levels, and obtaining a target concentration level and a reasonable range corresponding to the target task type.
[0065] Multiple cognitive task types are preset, and each task type corresponds to a specific required concentration level (target concentration level). The reasonable concentration interval indicates the fluctuation range of concentration required to complete this task. For example, for a high-difficulty task, the reasonable concentration interval may be set narrower to ensure efficient completion of the task. The table structure of the mapping table contains cognitive task types, target concentration levels, and reasonable concentration intervals. For example: simple tasks correspond to lower target concentration levels and wider reasonable concentration intervals; complex tasks correspond to higher target concentration levels and narrower reasonable concentration intervals. Among them, the task attribute parameters include difficulty level, topic type, and knowledge point range, which characterize the characteristics of the task. The trade-off relationship generated by the previous steps, taking into account the task attributes and permission data, can further affect the selection of the target task type. The concentration level is the current user's concentration level, which is obtained through EEG monitoring or similar methods as a real-time dynamic input. Based on the above input parameters, the mapping table is used to determine the most appropriate target task type.
[0066] The matching process uses the task attribute coefficient, trade-off relationship and current concentration level to find the best matching cognitive task type in the mapping table. For example, if the current concentration is low but the task difficulty is high, it may be necessary to select a transitional task type that can stimulate concentration. Obtain and output the target concentration level and reasonable interval. Once the target task type is determined, obtain its corresponding target concentration level and reasonable interval range from the mapping table. The target concentration level is the optimal concentration level value expected under the task type. The reasonable interval range is the upper and lower limits of the concentration required to complete this task.
[0067] By setting precise target concentration levels and reasonable intervals, we ensure that users perform tasks in an appropriate state of concentration and maximize performance. We adjust task attributes in a personalized way to avoid fluctuations in concentration caused by tasks that are too difficult or too difficult, and improve the efficiency and effectiveness of task completion. At the same time, we monitor and adjust the user's target concentration level and reasonable interval in real time to ensure that the user maintains the best state of concentration throughout the task. Based on changes in the user's current concentration level, we dynamically avoid tasks that are too challenging, and gradually guide users to improve their concentration and enhance their adaptability.
[0068] A systematic and data-driven decision model is provided through the mapping table to ensure the rationality and reliability of task configuration and focus level setting. Through the predefined cognitive task types and their corresponding focus parameters, the system can quickly find and match the best task type, reducing manual intervention and decision-making time. Using the mapping table to manage the focus requirements of different tasks helps the system to effectively allocate and manage resources among multiple tasks and users. According to the trade-off relationship and task attribute parameters, the task allocation strategy is optimized to improve the overall system operation efficiency and user experience. The method can make personalized adjustments to the focus levels and task attributes of different users, and provide tailored focus levels and reasonable ranges. The personalized focus goals provided help users gradually improve their focus ability and task completion quality, and have strong adaptability. In summary, by using the mapping table and multi-parameter input, the generation process of the target focus level is systematized and optimized, ensuring that users perform tasks in the best focus state, achieving scientific, personalized and dynamic dual improvements, and bringing significant efficiency and experience improvements.
[0069] Step S106, generating a focus evaluation set based on the target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data, calculating multiple sub-evaluation scores corresponding to the focus evaluation set, and obtaining a comprehensive feedback adjustment coefficient based on the multiple sub-evaluation scores.
[0070] Specifically, by comprehensively considering factors such as the target focus level, reasonable interval, current focus level, confidence score, task attributes, and permission data, a focus evaluation set is generated. Multiple sub-evaluation scores in the evaluation set (such as focus consistency, focus stability, etc.) are calculated, and the comprehensive feedback adjustment coefficient is obtained accordingly. This provides a comprehensive focus evaluation and refines each influencing factor. The feedback mechanism is optimized through the comprehensive feedback adjustment coefficient to improve the responsiveness and accuracy of training.
[0071] Step S107, optimizing the parameters of the visual feedback stimulation and the auditory feedback stimulation according to the feedback adjustment coefficient, and completing the adaptive concentration training of the user according to the optimized visual feedback stimulation and the auditory feedback stimulation.
[0072] Specifically, the feedback adjustment coefficient of the previous step is used to optimize the parameters of visual and auditory feedback stimulation (such as intensity, frequency, duration, etc.). According to the optimized feedback mechanism, the next round of training is implemented to continuously monitor and adjust the user's concentration. Through the adaptive adjustment of the feedback mechanism, the effect of training is ensured to be continuously improved. Users can obtain stimulation that is more suitable for their current state during training, improving the quality and effect of the overall training. Through the above steps, the adaptive concentration training method based on EEG signals can realize the accurate evaluation and dynamic regulation of user concentration, and ultimately help users effectively improve their concentration ability.
[0073] The method provided achieves a comprehensive, closed-loop optimization adjustment of the user's attention by designing multimodal stimulations such as vision (font, color, animation, etc.), hearing (volume, pitch, speech speed, etc.), and touch (vibration intensity), and dynamically adjusting the parameter intensity of each modal stimulation based on the adjustment coefficient. The method automatically selects the appropriate stimulation mode (such as visual prompts, voice broadcast, etc.) and the corresponding stimulation intensity according to the current concentration state, and guides the user to refocus on the cognitive training task. During the training process, the intelligent system forms an adaptive optimization closed loop with the user, continuously perceives and analyzes the user's concentration state, and conducts targeted adjustment interventions to dynamically restore the concentration to the optimal range, ensuring that the training task is completed efficiently. Long-term use of this method can not only improve the user's current concentration, but also play a role in cognitive ability training and habit formation, and gradually optimize their concentration management ability.
[0074] In some embodiments, tactile feedback stimulation is also generated according to the concentration level; the parameters of visual feedback stimulation and auditory feedback stimulation are optimized according to the feedback adjustment coefficient, including: adjusting the font size, font color, animation effect, and prompt box transparency of the visual feedback stimulation according to the feedback adjustment coefficient; adjusting the volume, pitch, speaking speed, and number of repetitions of the auditory feedback stimulation according to the feedback adjustment coefficient; and adjusting the vibration intensity of the tactile feedback stimulation according to the feedback adjustment coefficient.
[0075] According to the user's concentration level, tactile feedback stimulation is generated through devices (such as smart watches, bracelets, tactile feedback devices, etc.). Tactile feedback can be in the form of vibrations of different intensities and frequencies, with the purpose of attracting the user's attention or providing immediate feedback. The feedback adjustment coefficient is determined based on the user's concentration and the system's historical data. This coefficient is used to optimize various feedback stimulation parameters to improve user experience and effects. The adjustment coefficient can be pre-set or dynamically generated through the system's self-learning and adjustment mechanism.
[0076] Adjust visual feedback parameters by, for example, increasing or decreasing the font size of text to draw attention or reduce reading pressure, based on the feedback adjustment factor. Adjust text color to improve readability or emphasize important information. For example, use red to highlight warning messages. Increase or decrease animation effects to make it easier for users to notice visual changes. Adjust the transparency of the tooltip to make it more prominent or blend into the background.
[0077] Adjust the auditory feedback parameters by increasing or decreasing the volume to ensure that the user can receive the auditory prompt at an appropriate volume. Adjust the high and low pitch of the prompt to make it more in line with the user's auditory preferences or highlight the urgency of the prompt. Adjust the speed of the voice prompt to adapt to the user's understanding and acceptance. Increase or decrease the number of repetitions of the prompt as needed to ensure that the user does not miss important prompts or feel irritated by too many repetitions. Increase or decrease the vibration intensity to provide appropriate tactile feedback based on the user's current needs. Too high an intensity will disturb the user, and too low an intensity may be ignored.
[0078] The method uses visual, auditory and tactile feedback stimulation to enrich the feedback mechanism of the system. Multimodal feedback can more comprehensively cover the user's perception channels, improve feedback effects and user experience. Tactile feedback is particularly suitable for providing timely and effective feedback in quiet environments or scenarios where users cannot concentrate on browsing the screen. The feedback adjustment coefficient is used to dynamically optimize various feedback parameters, so that the system can quickly respond to changes in the user's concentration level and provide timely and accurate feedback. By optimizing the feedback parameters in real time, the user's fatigue and boredom caused by receiving too much or too little feedback information can be avoided, and the user's concentration and satisfaction can be improved.
[0079] By introducing a multimodal feedback mechanism and feedback adjustment coefficient, visual, auditory and tactile feedback are dynamically optimized to ensure that users have the best experience when receiving feedback, while improving their concentration and task completion quality. This technical solution provides a scientific, personalized and intelligent solution, greatly improving the user interaction experience and the overall system performance.
[0080] The following is a detailed description of the method provided by the present application:
[0081] 1. Establish an EEG data acquisition system, use electroencephalogram (EEG) acquisition equipment, and collect the user's original EEG data through multiple electrode points.
[0082] The core of the EEG data acquisition system is the EEG acquisition device, which mainly consists of an electrode system, reference electrode and ground electrode, bio-amplifier, analog-to-digital converter (ADC), data acquisition and storage module, clock synchronization and trigger control module, power supply and protection module, etc. To collect EEG activity, a series of electrodes need to be placed precisely at specific locations on the subject's scalp. The commonly used electrode placement method follows the international 10-20 system standard, which divides the entire scalp area into 19% and 81% in the vertical and horizontal directions. Measurement electrodes are placed in these areas, with a total of 21 electrode positions, including the frontal area Fp1, Fp2, and the top area Cz. There are also more dense 10-10 systems that use more electrode points. Each measurement electrode collects EEG activity data in the area where it is located. Electrode materials usually use good conductive materials such as tin, gold or silver chloride, and adopt appropriate structural designs, such as cup electrodes and needle electrodes, to ensure good contact with the scalp. In addition to the measuring electrodes, reference electrodes and ground electrodes are also required. The reference electrodes are used to eliminate the common-mode interference of all measuring electrodes and are usually placed at locations such as the bilateral mastoids or nasal roots. The ground electrodes are used to suppress power frequency interference and baseline drift and are located in the center of the forehead. The settings of both are crucial to obtaining high-quality EEG signals.
[0083] Since the electrical activity of neurons in the cerebral cortex is extremely weak, the potential difference sensed by the measuring electrode is usually between a few microvolts and tens of microvolts, and needs to be amplified by a biological amplifier. The amplifier has the characteristics of high input impedance, low noise, and good common-mode suppression to avoid distortion and noise pollution. The common amplification gain is 104-106 times. The amplified analog EEG signal needs to be converted into a digital signal through an analog-to-digital converter (ADC) for subsequent digital processing. The ADC needs to have sufficient sampling rate and quantization accuracy to ensure that the required time resolution and amplitude resolution are captured. The commonly used sampling rates are 256Hz, 512Hz or 1000Hz, and the quantization bits are 16 bits or 24 bits. The data acquisition and storage module includes a microcontroller, a storage medium, etc., which is used to collect digital EEG data after analog-to-digital conversion in real time and store it in a computer or other storage device for subsequent analysis and processing. In order to ensure the time consistency of the acquisition, a high-precision clock is needed to synchronize the sampling of each channel, and it is also necessary to support the input of external trigger signals to accurately align events with other devices such as eye trackers and stimulus presentation systems. The power supply and protection module provides a stable power supply for the entire system and provides necessary protection and isolation for humans and equipment to ensure safe use.
[0084] In the specific acquisition process, the following steps need to be followed: the subject wears a dry electrode EEG headband, which has multiple built-in dry electrodes that can directly contact the scalp to collect EEG signals; after starting the acquisition device, the system automatically detects the signal quality of each electrode channel, and prompts the subject to adjust the position of the headband appropriately according to the test results to improve the signal quality; the system pre-sets reasonable parameter configurations, such as gain 105 times, bandpass filter 0.5-40Hz, sampling rate 512Hz, quantization bit 24 bits, etc., to ensure effective capture of EEG signal characteristics; after completing the startup self-test and parameter setting, the system begins EEG data The system collects data in real time and stores the digital data stream to a computer or mobile storage device. During the collection process, the system monitors the data quality in real time and automatically removes obvious artifacts. If there is severe signal detuning, the subject will be prompted to readjust the position of the headband. In addition to EEG data, auxiliary data such as marker information related to cognitive tasks and user behavior logs can be recorded synchronously as needed for subsequent analysis. The collection process does not require human intervention. After the subject completes the cognitive task, the system automatically stops data collection and backs up and stores the original data to prepare for the subsequent EEG signal preprocessing and analysis stages.
[0085] 2. Use the original EEG data obtained in step 1 to perform preprocessing such as filtering, segmentation, and baseline correction to extract time domain and frequency domain EEG features related to the state of concentration.
[0086] The preprocessing process includes filtering, segmentation, baseline correction and other operations, the purpose of which is to remove irrelevant noise and interference components from the original EEG signal, so that the subsequent feature extraction and analysis are more accurate and effective. First, the original data will be bandpass digitally filtered, and the effective components related to the state of concentration will be retained by designing a reasonable bandpass frequency range, while filtering out low-frequency baseline drift and DC components, as well as high-frequency electromyography and power frequency interference. The filtering can use a linear phase FIR digital filter, such as a finite impulse response filter weighted by a window function, and select an appropriate filter order and cutoff frequency. Assuming that the effective frequency range of EEG in the state of concentration is 4-30Hz, a bandpass digital filter with a passband of 4-30Hz and a stopband of 0-2Hz and above 32Hz can be designed. Its transfer function can be expressed as H(z)=sum(i=0->N){b(i)*z^(-i)} / sum(i=0->N){a(i)*z^(-i)}, where N is the filter order, and {b(i)} and {a(i)} are the numerator and denominator coefficients respectively. After filtering, the continuous time series is divided into data segments of fixed length, such as 10 seconds per segment, to facilitate time window analysis and feature extraction. At the same time, baseline correction is performed on each data segment to eliminate the remaining baseline drift and DC offset, so that each segment of data has 0 as the baseline.
[0087] Next, an innovative time-frequency feature extraction method based on phase space reconstruction will be adopted. Phase space reconstruction is a nonlinear processing technique that maps a univariate time series to a high-dimensional phase space, and is often used to analyze the dynamic behavior of chaotic systems. For a given one-dimensional EEG time series x(t), this application can construct an m-dimensional phase space vector sequence: X(t)=[x(t), x(t+τ), x(t+2τ),..., x(t+(m-1)τ)]^T, where τ is the time delay and m is the embedding dimension. By appropriately selecting τ and m, the topologically equivalent phase space trajectory of the original system can be reconstructed, even if they are not mathematically equivalent, but have the same invariant statistics and dynamic laws. This phase space reconstruction method can be applied to EEG signal analysis. After mapping the univariate EEG sequence to a high-dimensional phase space, the time-frequency domain statistics related to the cognitive state can be extracted based on the trajectory features.
[0088] Specifically, this application will use the Kent entropy method based on phase space reconstruction to extract time-frequency features related to concentration. Kent entropy is a nonlinear statistic that measures the complexity of a time series. It is defined as the negative value of the average diameter of the K nearest neighbors of each time-space coordinate point on the logarithmic mapping K in the m-dimensional phase space. It can be expressed as C(r,m,N)=-sum(i=1->N){ln(C_i^m(r))} / N, where N is the sample size, r is the maximum distance between two vectors in the phase space, and C_i^m(r) is the average distance between each embedded vector and its K nearest neighbor vectors in the m-dimensional phase space. The feature extraction steps based on Kent entropy are as follows: (1) Reconstruct the phase space of each segment of preprocessed EEG data, that is, map the one-dimensional EEG time series x(t) to the m-dimensional phase space vector sequence X(t)=[x(t),x(t+τ),x(t+2τ),.. .,x(t+(m-1)τ)]^T, where the embedding dimension m=5 is selected, and the time delay τ is equal to the first uncorrelated point of the original sequence. After phase space reconstruction, the original EEG sequence is embedded in a topologically equivalent m-dimensional manifold space; (2) Calculate the Kent entropy C(r,m,N) of each embedded vector sequence in the m-dimensional phase space. Here, the parameter r can be selected using the nearest neighbor distance method, that is, the maximum distance between the sample point and its Kth nearest neighbor in the phase space is used as the estimated value of r, and the value of K is usually m+1 or other empirical values; (3) The Kent entropy C(r,m,N) calculated in the previous step is used as the time domain eigenvalue, which reflects the complexity and uncertainty of the EEG sequence in the time domain; (4) Wavelet transform is performed on the embedded vector sequence to obtain approximate component sequences and detail component sequences of different scales. These component sequences reflect the low-frequency and high-frequency components of the original sequence at the corresponding scale respectively; (5) The Kent entropy of each approximate component sequence and detail component sequence is calculated as the frequency domain eigenvalue corresponding to each scale, thereby characterizing the complexity of the EEG sequence in the frequency domain.
[0089] 3. Based on the EEG features extracted in step 2, use the labeled data to train a classification algorithm or deep learning model to build a detection model that can identify multiple discrete levels of concentration.
[0090] First of all, this application requires the collection of a certain amount of labeled data sets. The specific method is: invite a group of subjects to wear EEG acquisition equipment, let them operate under various cognitive processing tasks (such as video learning, programming, reading, etc.), and at the same time, trained scorers will manually annotate the subjects' behavioral performance (such as eye movement trajectories, facial expressions, etc.) and give the current concentration level score (such as 1-5 points corresponding to 5 discrete levels). During the subject's operation, the EEG data is continuously collected and combined with the manually annotated scores to construct a labeled EEG-concentration data set. The data set needs to contain enough samples to cover various concentration levels to improve the generalization ability of the classification model.
[0091] Secondly, this application will conduct model training, and this solution adopts the support vector machine (SVM) classification algorithm. First, feature engineering is required to combine the time domain and frequency domain features extracted from the EEG data into a high-dimensional feature vector as the input of the SVM. Specifically, for each EEG data segment collected by the subject under a specific cognitive task, a feature set containing time domain Kent entropy features and multi-scale frequency domain Kent entropy features can be obtained after preprocessing and feature extraction. This application splices these feature values in a fixed order to form a feature vector of fixed length, for example, x=[C_time, C_freq1, C_freq2, ..., C_freqn]^T, where C_time is the time domain Kent entropy feature, and C_freq1 to C_freqn correspond to the frequency domain Kent entropy features of n scales respectively. In this way, each EEG data segment can be represented by such a high-dimensional feature vector x. At the same time, this application needs to obtain the concentration level label y corresponding to the data segment, for example, y=1,2,...,m represents m discrete concentration levels respectively. The feature vectors of all samples and their annotations form a data set (x_i, y_i), i=1,2,...,N, where N is the total number of samples, which constitutes the input and output of the SVM classifier. It is worth noting that when combining feature vectors, each feature component needs to be normalized (such as subtracting the mean and dividing by the standard deviation) so that each feature is at the same level in the numerical range to avoid some components contributing too much or too little to the distance calculation.
[0092] Next is the training phase of the SVM model. For a given feature-labeled data set (x_i, y_i), the goal of SVM is to find an optimized classification hyperplane that separates sample points of different categories and maximizes the geometric interval (i.e., function interval) from positive and negative samples to the classification hyperplane. This is equivalent to finding a classification boundary with the largest geometric interval in the feature space, which can minimize the generalization error. For the linearly separable case, this application needs to solve a constrained optimization problem: minimize: (1 / 2)||w||^2 subject to: y_i(w^Tx_i + b) ≥ 1, i=1,2,...,N.
[0093] Where w is the normal vector of the hyperplane, b is the bias term, and the constraint condition indicates that the function interval from all samples to the hyperplane is not less than 1. It can be converted into a dual form through dual theory:
[0094] maximize: ∑_i α_i - (1 / 2)∑_i∑_j α_iα_jy_iy_jx_i^Tx_j subject to:∑_i α_iy_i = 0, 0 ≤ α_i ≤ C, i=1,2,...,N.
[0095] Here α_i is the dual variable, and C is the regularization constant used to control the complexity of the model. The solution α to the dual problem can determine the classification hyperplane w=∑_iα_iy_ix_i and the bias b. For the case of linear inseparability, this application needs to introduce kernel techniques to project the original input into a higher-dimensional feature space through a nonlinear mapping Φ(x), so that the samples become linearly separable in the new space, thereby solving the corresponding dual problem. Commonly used kernel functions include linear kernels, polynomial kernels, Gaussian kernels, etc. Choosing a suitable kernel function is crucial to the performance of SVM. Taking the Gaussian kernel as an example, the dual form is:
[0096] maximize: ∑_i α_i - (1 / 2)∑_i∑_j α_iα_jy_iy_jexp(-γ||x_i-x_j||^2)subject to: ∑_i α_iy_i = 0, 0 ≤ α_i ≤ C, i=1,2,...,N.
[0097] Where γ is the bandwidth parameter of the kernel function, which needs to be determined when the model is selected. Solving the dual problem can obtain the analytical solution α* of SVM, thereby determining the classification decision function: f(x) = sgn(∑_i α_iy_iK(x_i,x) + b).
[0098] Here K(x_i,x) is the kernel function. For a given test sample x, its category can be determined by calculating the sign of f(x). In the scenario of this application, since the focus level is a multi-classification problem, the One-vs-Rest or One-vs-One strategy can be used to decompose it into a series of binary classification sub-problems, and the output of the SVM classifier of each sub-problem is combined to obtain the final result.
[0099] In practical applications, this application requires hyperparameter tuning of SVM to obtain ideal performance. The main hyperparameters of SVM include kernel function parameters (such as the bandwidth γ of the Gaussian kernel), regularization constant C, different kernel functions and their combinations, etc. These hyperparameters are usually searched by grid search or random search, and cross-validation is used to evaluate the classification accuracy or other indicators on the validation set to select the optimal hyperparameter combination. The basic idea of cross-validation is to divide the training set into k subsets, use k-1 subsets to train the model in turn, and use the remaining 1 subset for validation, so as to obtain the average indicator of k validations as performance evaluation. This evaluation method can reduce the bias of data sampling and make the evaluation more objective and reliable. In addition, this application also needs to set reasonable stop iteration conditions to avoid overfitting.
[0100] Finally, after obtaining the ideal SVM model, this application can perform a final evaluation on the reserved test set to comprehensively examine the generalization ability of SVM on new data. Evaluation indicators can be selected from classification accuracy, precision, recall, F1 score, multi-classification confusion matrix and other indicators to quantify the prediction performance of the model from different angles.
[0101] 4. Input the new EEG data obtained in step 1 into the model constructed in step 3, output the current user's concentration level and confidence score, and realize real-time detection.
[0102] By inputting the new EEG data obtained in step 1 into the SVM model constructed in step 3, real-time detection of the current user's concentration level can be achieved and the confidence score of the prediction result can be output at the same time. Specifically, when the subject wears the EEG acquisition device and starts to perform a cognitive task, the system will continuously collect new raw EEG data streams. For each data segment of fixed length (such as 10 seconds), the system will perform real-time concentration detection according to the following process: First, the raw EEG data is preprocessed by bandpass filtering, segmentation, baseline correction, etc. to remove noise and interference and retain the effective components related to the concentration state; then, the phase space reconstruction method is used to map the preprocessed one-dimensional EEG sequence to a high-dimensional phase space vector sequence, and the Kent entropy features in the time domain and multi-scale frequency domain are calculated respectively. These eigenvalues are normalized and spliced in the order set before, and the eigenvector x corresponding to the data segment is obtained; next, the eigenvector x is input into the SVM classifier f(x) obtained by training in step 3. By calculating the sign of f(x), the predicted value y_pre of the current concentration level can be obtained. At the same time, the confidence score c_pre can also be calculated based on the distance from x to the classification hyperplane or the kernel function value.
[0103] In the above real-time detection process, the present application can set a variety of strategies to enhance the accuracy and robustness of the detection, such as using sliding window averaging, voting filtering and other methods to smooth the continuous prediction results, or removing or further processing the prediction results with low confidence according to the confidence score, etc. Below I will demonstrate the whole process of real-time detection and optimization post-processing in conjunction with a specific data flow simulation.
[0104] Assume that the real-time acquisition system of this application sets a data segment of 10 seconds in length, the bandpass filter frequency range is 4-30Hz, the embedding dimension m=5, the time delay τ is the first unrelated point, the wavelet transform uses Daubechies6 wavelet for 3-layer decomposition, and the frequency domain Kent entropy feature contains approximate components and detail components. Therefore, the feature vector x corresponding to each data segment is 12 dimensions, including 1 time domain Kent entropy feature, 3 approximate component frequency domain Kent entropy features, and 8 detail component frequency domain Kent entropy features. The pre-trained SVM classifier f(x) uses a Gaussian kernel and has completed hyperparameter tuning under cross-validation, mapping the 5 concentration levels (y=1,2,3,4,5) to 5 binary classifiers of One-vs-Rest. When the acquisition system starts to receive the EEG data stream in real time, this application uses a sliding window of length 3 to cache the last three data segments. For each newly arrived data segment:
[0105] (1) Perform preprocessing and feature extraction to obtain a 12-dimensional feature vector x_new;
[0106] (2) Input x_new into the trained SVM model to obtain the predicted concentration level y_pre and prediction confidence c_pre=||(x_new, 1) - (x_sv, y_sv)||^2, where (x_sv, y_sv) is the support vector pair;
[0107] (3) If c_pre is lower than the preset threshold of 0.3, y_pre is eliminated and not included in the final result;
[0108] (4) Store the valid y_pre and the corresponding c_pre into the sliding window;
[0109] (5) Perform weighted averaging on the predicted values y_pre sequence in the window, where the weight is calculated by arithmetic decreasing of the confidence c_pre;
[0110] (6) Output the weighted average of the focus level y_out and the final confidence score c_out as the current detection result.
[0111] 5. Based on the concentration level detected in step 4, provide corresponding feedback stimulation through visual, auditory and other modal designs to influence the user's concentration state.
[0112] First of all, this application needs to design appropriate stimulation content and types for different levels of concentration. The purpose of these stimulation contents is to attract the user's attention and maintain or awaken his or her concentration attitude towards the task. For the higher level of concentration detected, this application can choose to use positive positive stimulation as positive feedback to consolidate the current state of concentration. For example, a simple positive expression animation can be played through the visual mode, accompanied by gentle and pleasant audio feedback, or a simple text blessing can be presented in the corner of the screen. For lower levels of concentration, it is necessary to use prompt stimulation to make the user refocus his or her attention, such as reminding the user of phrases such as "Please concentrate" and "It is important to stay focused" through visual methods such as flashing and pop-up windows, or playing slightly exciting audio "Please concentrate! Class time is up" and other voices, or applying weak vibration stimulation through tactile mode. The stimulation content should be concise and avoid being too complicated to cause distraction. It should also consider the coordination with the current task scene and should not be too abrupt. At the same time, the most targeted stimulation can be customized for different users based on individual settings such as task proficiency and subject preference.
[0113] Secondly, this application requires the design of modal encoding and presentation of the above feedback stimulation. For visual stimulation, images or animations can be used, or text can be used; auditory stimulation can be a simple prompt sound or voice broadcast; tactile stimulation usually appears in the form of vibration; in addition, multimodal stimulation in virtual reality (VR) equipment can also be considered, such as picture changes and sound effect changes in VR environment. Each mode has different attention-attracting ability and interference level, which needs to be weighed and selected in combination with specific scenarios. It is usually recommended to adopt a multimodal fusion approach, that is, to present two or more modal stimuli at the same time to maximize attention and enhance the intensity of stimulation. Such as vision + hearing, hearing + touch, vision + hearing + touch and other combinations.
[0114] After the stimulus coding and presentation method are determined, it is necessary to dynamically adjust the intensity of stimulus parameters according to the concentration level detected to produce an appropriate effect. For example, for extremely low concentration levels, this application can increase the brightness and contrast of visual stimuli to make them more eye-catching; increase the volume and tone of auditory stimuli to improve penetration; and the intensity of tactile stimulation can also be appropriately enhanced. For higher concentration levels, the intensity of stimulation can be appropriately reduced to avoid interference. Specifically, assuming that this application uses a dual-modal stimulus of visual (text) + auditory (audio), each modality has several adjustable parameters, such as:
[0115] Visual modal parameters: 1) Font size (fs), which can be 24 / 30 / 36 / ... pixels; 2) Font color (fc), which can be red / blue / green, etc.; 3) Animation effect (ani), such as flashing frequency; 4) Tooltip transparency (alpha), which can be between 0 and 1; …
[0116] Auditory modal parameters: 1) volume (vol), 0-100 decibels; 2) pitch (pitch), 200-1000Hz; 3) speaking speed (speed); 4) number of repetitions (repeat); ….
[0117] This application can discretize the parameter values and set corresponding parameter combinations for each concentration level (such as 1-5 points) to construct a stimulus intensity mapping relationship:
[0118] Concentration level; Visual parameters; Auditory parameters;
[0119] 1 (lowest) fs=36,fc=red,ani=fast,alpha=1 vol=90,pitch=800,speed=fast,repeat=3;
[0120] 2 fs=30,fc=red,ani=flash,alpha=0.8 vol=80,pitch=700,speed=medium,repeat=2;
[0121] 3 fs=24,fc=blue,ani=none,alpha=0.6 vol=70,pitch=500,speed=slow,repeat=1;
[0122] 4 fs=24,fc=green,ani=none,alpha=0.4 vol=60,pitch=400,speed=slow,repeat=1;
[0123] 5 (highest) fs=24,fc=green,ani=none,alpha=0.2 vol=50,pitch=300,speed=slow,repeat=1.
[0124] According to the concentration level detection result of step 4, the present application can directly look up the table to obtain the corresponding stimulation parameter configuration, and render and generate the corresponding visual and auditory stimulation in real time, so as to achieve the purpose of reminder, awakening or positive motivation.
[0125] 6. Obtain the attribute parameters of the current training task, retrieve the user's authority data for the task, and determine the trade-off between task difficulty and authority tasks.
[0126] Task attribute parameters mainly include information such as difficulty level, topic type, and knowledge point range. These parameters directly affect the user's required concentration level and attention allocation strategy for the task. User permission data is related to the privacy sensitivity and operational risks involved in the task, and reflects the permission boundaries that users can access and operate autonomously in the task. By reasonably balancing task difficulty and user permissions, this application can dynamically determine the expected target concentration interval, thereby providing a basis for closed-loop adjustment of concentration.
[0127] First, let's look at how to obtain task attribute parameters. Different cognitive or computational tasks have different requirements for user concentration due to differences in complexity, subject content, and knowledge involved. For example, a simple memory training game, although the rules of the game are relatively simple, requires a high level of concentration to keep the new content in mind; while a code development task requires high programming knowledge and logical thinking, and is more difficult, so the required concentration parameters are correspondingly higher. On the other hand, some task themes are relatively boring and more likely to distract people; while areas of interest to users are easier to concentrate on. Therefore, this application needs to classify and model various common tasks in advance, configure each task with its inherent difficulty coefficient (diffIndex, 0-1 interval), theme preference coefficient (themeIndex, 0-1 interval) and the range of knowledge points involved (knowledgeVector) and other attribute parameters, and store them in the task library for retrieval. Assuming that the current user is performing a programming practice task, this application can retrieve the corresponding attributes from the task library as diffIndex=0.8, themeIndex=0.6, knowledgeVector={OOP, algorithm, data structure}.
[0128] The second step is to query the user's permission data for the task. According to the sensitivity of the task, the scope of operation, etc., this application needs to divide and control the user's permissions. For example, the permission requirements for ordinary web browsing tasks are relatively low, while tasks involving system operations require a higher permission level to run; personal learning and training tasks can usually be accessed independently, but tasks involving company secrets are restricted. This application can pre-establish a permission database and assign corresponding permission levels (authLevel, 1-5 points) and operable boundaries (operationScope) to each user according to task classification to ensure that the task runs safely under the premise of authorization. Assume that the current user's permission data for the programming practice task is authLevel=3, operationScope={non-core module}.
[0129] Next, this application needs to establish a mapping model to weigh the task attribute parameters and user permission data against each other, so as to output the expected target focus level (targetAttentionLevel, which can be 1-5 points) and its reasonable range [expectedMin, expectedMax]. The construction of the mapping model can be based on a large amount of annotated data for machine learning training, or it can be directly assigned by domain experts based on experience. A feasible implementation method is: based on the gradient boosting tree (GBT) regression algorithm, with diffIndex, themeIndex, knowledgeVector, authLevel, operationScope as input features, and targetAttentionLevel as the supervision label, a regression model is trained. For the acquisition of training data, this application can first build a simple rule mapping table, and domain experts give the corresponding expected output for each set of input features. On this basis, after allowing users to truly experience a series of tasks under the task attributes and permission settings of this group, their focus level annotation data in these tasks is collected, and the mapping table is continuously revised and improved. When the amount of annotated data is large enough, the GBT regression model is trained with this table as the supervision data.
[0130] Assume that the trained mapping model is: targetAttentionLevel = GBT(diffIndex, themeIndex, knowledgeVector, authLevel, operationScope) expectedMin = max(targetAttentionLevel-0.5, 1) expectedMax = min(targetAttentionLevel+0.5, 5).
[0131] Substituting the previously acquired task attributes (0.8, 0.6, {OOP, algorithm, data structure}) and user permissions (3, {non-core module}) into the model, the application can obtain the expected target focus level of targetAttentionLevel=4, expectedMin=3.5, expectedMax=4.5, which means that for this task, the user's focus level needs to be maintained between levels 3-5 for the most appropriate. If the detected real-time focus falls outside this range, the application needs to adjust it through multimodal stimulation to restore it to the expected range.
[0132] For the deployment and implementation of the mapping model, this application can adopt a Docker-based microservice architecture, independently encapsulate the GBT regressor as a prediction service, and decouple it from other services such as the task library and the permission library, and interactively call it through the RESTful or RPC mechanism. When the task ID is received, the prediction service will directly query the task library and the permission library to obtain the attribute parameters and permission data, input them into the model to obtain the expected focus interval, and finally return the prediction result to the upper-level application. This architecture has good scalability and maintainability. Different mapping models can be hot-swapped by replacing different prediction service instances. The upper-level application can be dynamically adapted without modification, and it also supports online updates and version control of the model. On the other hand, this application can also directly integrate the mapping model in the concentration detection module. Once the real-time detected concentration level exceeds the expected interval predicted by the mapping model, it directly triggers the multimodal stimulation closed loop to form an end-to-end adaptive EEG concentration optimization system.
[0133] It should be noted that for the deviation assessment between the real-time concentration detection and the expected concentration interval, the application can adopt the following strategy: check the difference between the current concentration level and the expected interval every certain period of time (such as 2 minutes), and if the deviation is within the controllable range (such as within 0.5 points), maintain the status quo; if the deviation is too large, trigger the stimulation closed loop and adjust about 1-2 levels to bring it back to the interval; if it still does not return to normal after several rounds of adjustment, it can be judged as an abnormal situation and requires manual intervention or other means to handle it. In addition, for different types of cognitive tasks, reasonable concentration level constraints can also be set, such as the concentration level of memory tasks should be kept in a higher range, while the constraints of creative thinking tasks can be appropriately relaxed.
[0134] 7. Based on the task attributes and trade-offs obtained in step 6, and the current concentration level detected in step 4, combined with the preset mapping table, determine the expected target concentration level and its reasonable range.
[0135] According to the task attributes (including difficulty level diffIndex, theme preference themeIndex and knowledge point range knowledgeVector) obtained in step 6, user authority data (authority level authLevel, operation boundary operationScope) and their trade-off mapping relationship, and the current real-time focus level currentAttentionLevel detected in step 4, this application will determine the target focus level targetAttentionLevel expected for the current scenario by consulting a preset mapping table. The mapping table can be regarded as a lookup table data structure. For a given task attribute, authority data and current focus level as input, the corresponding target focus level and its expected interval range [expectedMin, expectedMax] will be output according to the pre-set rules.
[0136] The basic idea of building a mapping table is: first, for various common cognitive task types, domain experts or experimental psychologists give corresponding target focus interval assessments; then, according to the difficulty coefficient, subject preference score, knowledge involved, and user authority level and operation range of each specific task, this baseline interval is adjusted and corrected to obtain the expected interval value for the specific task scenario. In addition, the mapping table also needs to include the current real-time detected focus level to determine whether the feedback adjustment mechanism needs to be triggered.
[0137] The mapping table needs to cover common task types and their combinations, and pre-evaluate and fill in the expected focus level targetLevel and its range [expectedMin, expectedMax] for each combination. In actual application, this application only needs to use the detected current focus level currentLevel and the corresponding task attributes (diffIndex, themeIndex, knowledgeVector) and permission data (authLevel, operationScope) as search keys to directly query the expected target focus level targetLevel and its range [expectedMin, expectedMax] in the table.
[0138] For example, suppose the current user is doing a programming practice task with the theme of "data structure". The system obtains the attribute parameters of the task from the task library and the permission library as diffIndex=0.6, themeIndex=0.4, knowledgeVector={programming, data structure}, and the user's permission data as authLevel=4, operationScope={core module}. At the same time, through the real-time detection of step 4, the system knows that the current user's concentration level is currentLevel=2. Then this application can find such a set of parameters in the mapping table: 0.6 0.4 {programming, data structure} 4 {core module} 2 4 3 5.
[0139] It can be seen that for this programming practice task, the expected target concentration level is targetLevel=4, and its reasonable range is [expectedMin=3, expectedMax=5]. In other words, this application hopes to improve the user's current concentration level from level 2 to between levels 3-5 through subsequent feedback adjustment. If the concentration level detected in real time after adjustment still does not fall into this expected range, it is necessary to further increase the feedback intensity or consider other intervention measures.
[0140] The process of building a mapping table requires the combination of expert experience and a large amount of practical data. One feasible method is to first have experts in the field of cognitive psychologists, education experts, etc. give the initial version of the mapping rules, and then invite a group of subjects to practice in various typical task scenarios, collect their behavioral data and concentration level score data, and continuously incorporate these real feedback into the mapping table for improvement and adjustment. An incremental update algorithm based on active learning can be designed to prioritize data collection for combinations that are not covered by the mapping table, and continuously expand the scale and accuracy of the mapping table to make it more comprehensive and reliable.
[0141] It should be noted that when evaluating the deviation between the current concentration level and the expected interval, this application does not require real-time table lookup operations, but can pre-load the mapping table to build an efficient search data structure, such as a KD tree or a ball tree, to support fast approximate nearest neighbor search. In this way, the expected interval can be searched in real time based on the collected parameters to shorten the query time and ensure the timeliness of the feedback response. For some special cases, if the search results are significantly different from the actual situation, this application can also introduce anomaly detection and manual correction mechanisms to prevent incorrect mapping from having too much impact on closed-loop regulation.
[0142] 8. Based on step 7, the expected target focus level targetAttentionLevel, the interval range [expectedMin, expectedMax], the real-time focus detection result currentAttentionLevel of step 4, the task attribute information (diffIndex, themeIndex, knowledgeVector) and the authority data (authLevel, operationScope) of step 6 are integrated to generate a comprehensive focus evaluation set, calculate the sub-evaluation scores of each dimension, and calculate the comprehensive feedback adjustment coefficient.
[0143] First, this application constructs a comprehensive evaluation set containing the following elements: current real-time focus level currentAttentionLevel, expected target focus level targetAttentionLevel, expected focus interval [expectedMin, expectedMax], task attributes (diffIndex, themeIndex, knowledgeVector), and permission data (authLevel, operationScope). Based on this evaluation set, this application defines and calculates sub-evaluation scores in six dimensions, quantifying the degree of influence of different influencing factors on focus.
[0144] (1) Real-time attention deviation score AttentionDeviationScore: This score is used to measure the deviation between the current real-time attention level currentAttentionLevel and the expected target attention level targetAttentionLevel. It can be calculated by the following formula: AttentionDeviationScore = 1 / (1 + |currentAttentionLevel- targetAttentionLevel|) The score value is between 0 and 1. The closer the value is to 1, the smaller the deviation is, and the closer the value is to 0, the larger the deviation is. For example, if currentAttentionLevel=3 and targetAttentionLevel=4, then AttentionDeviationScore=1 / (1+|3-4|)=1 / 2=0.5, indicating that there is a certain deviation.
[0145] (2) Task Difficulty Score: This score is directly determined by the task difficulty coefficient diffIndex, that is, TaskDifficultyScore = diffIndex. The larger the score, the more difficult the task is, and the higher the concentration requirement is. For example, when diffIndex = 0.8, TaskDifficultyScore = 0.8, which reflects the concentration requirement of high-difficulty tasks.
[0146] (3) Topic Preference Score: It is used to quantify the degree of fit between the current task theme and the user's interests and hobbies. Its value is themeIndex, that is, Topic Preference Score = themeIndex. The higher the score, the more the theme fits the user's interests and hobbies, which is conducive to improving concentration. If themeIndex = 0.6, then Topic Preference Score = 0.6, indicating that the user has a high preference for the theme.
[0147] (4) Knowledge Coverage Score: This score reflects how extensive the knowledge points involved in the task are. It can be calculated using the number of knowledge points n in knowledgeVector: KnowledgeCoverageScore = 1 - exp(-n / 5) where n is the number of knowledge points and 5 is an empirical parameter used to control the rate at which the score increases. The score value is between 0 and 1, and gradually increases with the increase of n, reflecting the positive impact of broad knowledge coverage on concentration. For example, if knowledgeVector = {programming, data structure}, then n = 2, KnowledgeCoverageScore = 1-exp(-2 / 5)≈0.33, indicating that the knowledge involved in the task is not too extensive.
[0148] (5) AuthorizationScore: The user's authority level authLevel is directly taken as the value of this score, that is, AuthorizationScore = authLevel. The higher the score, the higher the user's operation authority for the task, which is conducive to focusing attention. If authLevel = 4, then AuthorizationScore = 4, reflecting a higher authority level.
[0149] (6) ScopeScore: It measures the gap between the actual operation scope (operationScope) of the user in the task and the whole task domain (wholeDomain). It is calculated by comparing the difference set size: ScopeScore = 1 - |operationScope ^ wholeDomain| / |wholeDomain| where ^ represents the difference set operation and |·| is the set cardinality. The score value is between 0 and 1. The smaller the difference set, the higher the score, indicating a wider operation scope. Assuming wholeDomain = {core module, auxiliary module, configuration file}, if operationScope = {auxiliary module, configuration file}, then ScopeScore = 1-|{core module}| / 3≈0.67, indicating that the user has a wider range of operation permissions.
[0150] After calculating the sub-evaluation scores of the above six dimensions, this application will introduce an innovative artificial intelligence technology - the Self-Attention Mechanism, to fully capture the intrinsic correlation between the six evaluation scores and generate the final comprehensive feedback adjustment coefficient AdjustmentCoefficient. The self-attention mechanism is derived from the Transformer model in the field of natural language processing. It can adaptively learn the correlation between input features and dynamically adjust the contribution weight of each feature to the output accordingly, thereby achieving end-to-end feature fusion. Specifically, the six sub-evaluation scores AttentionDeviationScore, TaskDifficultyScore, TopicPreferenceScore, KnowledgeCoverageScore, AuthorizationScore and ScopeScore are first concatenated into a six-dimensional input vector X, and then passed into the self-attention layer for nonlinear transformation:
[0151] Z = softmax(Q*K^T / sqrt(d))*V.
[0152] Where Q, K, and V are the query, key, and value vectors obtained by three different linear transformations of the input X: Q = XWq K = XWk.
[0153] V = X*Wv.
[0154] Wq, Wk, and Wv are trainable transformation matrices, and d is the feature dimension (6 in this case). The softmax function is used to calculate the attention weight of each input feature to other features, and sqrt(d) is the normalization factor. Through this self-attention mechanism, each feature can dynamically adjust its contribution weight to the final output Z according to its degree of association with other features.
[0155] In order to fully integrate the global and local correlation information between different features, this application will adopt a multi-head attention structure, execute the above calculation process multiple times independently in different subspaces, and then splice the results of all subspaces together:
[0156] MultiHeadAttention(X) = Concat(head_1, head_2, ..., head_h)W^O wherehead_i = Attention(XW_i^Q, XW_i^K, XW_i^V).
[0157] Here h is the number of parallel heads, and W^O is the trainable output transformation matrix. Each subspace head_i can learn different association patterns of input features, which can be combined to fully characterize the complex interactions between features.
[0158] Finally, this application uses the output of the multi-head attention layer MultiHeadAttention(X) as a new feature vector, sends it to the feed-forward neural network for further nonlinear transformation, and normalizes it with the Sigmoid activation function to generate a feedback adjustment coefficient between [0,1]:
[0159] AdjustmentCoefficient = Sigmoid(FFN(MultiHeadAttention(X))).
[0160] Among them, FFN is a two-layer fully connected network, which includes ReLU activation function and Dropout regularization mechanisms to prevent overfitting.
[0161] 9. Apply the adjustment coefficient obtained in step 8 to the feedback mechanism designed in step 5 to adjust the intensity, mode and other parameters of the stimulation to form a closed loop for adaptive optimization and training of the user's concentration.
[0162] In step 5, the present application presets the stimulation parameters of three modalities: visual, auditory and tactile, including: visual modal parameters include font size fs, font color fc, animation effect ani, prompt box transparency alpha, etc.; auditory modal parameters include volume vol, pitch pitch, speech speed speed, number of repetitions repeat, etc.; tactile modal parameters are mainly vibration intensity vibration. The present application will dynamically scale these parameters according to the size of the adjustment coefficient AdjustmentCoefficient to adjust the overall intensity of each modal stimulation.
[0163] First, for visual stimulation, this application designs a differentiable parameter adjustment function VisionScaler to dynamically scale the visual stimulation parameters according to AdjustmentCoefficient:
[0164] fs' = fs * VisionScaler(AdjustmentCoefficient, 'fs') fc' = fc *VisionScaler(AdjustmentCoefficient, 'fc') ani' = ani * VisionScaler(AdjustmentCoefficient, 'ani') alpha' = alpha * VisionScaler(AdjustmentCoefficient, 'alpha').
[0165] VisionScaler is a two-variable function, the first input is AdjustmentCoefficient, and the second input is the type of visual parameter to be adjusted, such as 'fs' for font size, 'fc' for font color, and so on. The calculation formula of this function is:
[0166] VisionScaler(x, param_type) = 1 + (x - 0.5) * scale_factor(param_type).
[0167] Where x is the value of the adjustment coefficient AdjustmentCoefficient, and scale_factor is a preset parameter type-related scaling factor used to control the scaling strength of different parameters. For example, for the font size fs, this application can set scale_factor('fs')=0.8, then when AdjustmentCoefficient=1, fs'=fsVisionScaler(1,'fs')=fs(1+0.50.8)=1.4fs, that is, the font is enlarged by 40%; when AdjustmentCoefficient=0, fs'=fsVisionScaler(0,'fs')=fs(1-0.50.8)=0.6fs, that is, the font is reduced by 40%. Similarly, this application can set different scaling strengths scale_factor for other visual parameters such as fc, ani, alpha, etc., so as to achieve personalized parameter adjustment.
[0168] For auditory stimulation, this application also designs a similar adjustment function AudioScaler:
[0169] vol' = vol * AudioScaler(AdjustmentCoefficient, 'vol') pitch' = pitch* AudioScaler(AdjustmentCoefficient, 'pitch') speed' = speed * AudioScaler(AdjustmentCoefficient, 'speed') repeat' = repeat * AudioScaler(AdjustmentCoefficient, 'repeat').
[0170] The calculation formula of AudioScaler is:
[0171] AudioScaler(x, param_type) = 1 - (1 - x) * scale_factor(param_type).
[0172] It can be seen that, unlike the positive correlation of VisionScaler, AudioScaler is inversely proportional to AdjustmentCoefficient. This is because when the adjustment coefficient is large, the application hopes to reduce the intensity of auditory stimulation, and when the adjustment coefficient is small, it is necessary to increase auditory stimulation to re-attract attention. For example, when AdjustmentCoefficient=1, AudioScaler(1,'vol')=1, then vol'=vol, that is, the volume remains unchanged; when AdjustmentCoefficient=0, AudioScaler(0,'vol')=1+scale_factor('vol'), such as setting scale_factor('vol')=0.5, then vol'=1.5*vol, that is, the volume is increased by 50%.
[0173] As for tactile stimulation, this application directly makes the vibration intensity vibration' inversely proportional to the AdjustmentCoefficient:
[0174] vibration' = vibration_max * (1 - AdjustmentCoefficient).
[0175] Where vibration_max is the preset maximum vibration intensity value. When AdjustmentCoefficient=1, vibration'=0, which means no vibration; when AdjustmentCoefficient=0, vibration'=vibration_max, which means vibrating with maximum intensity to attract attention.
[0176] Through the above parameter adjustment mechanism, this application can dynamically adjust the stimulation intensity of the three modalities of vision, hearing and touch according to the comprehensive adjustment coefficient AdjustmentCoefficient calculated by the self-attention model, forming an adaptive closed-loop control process. Specifically, when the AdjustmentCoefficient is large (close to 1), it indicates that the current state of concentration is relatively ideal. This application will moderately reduce the parameter value of each modal stimulation to reduce interference to the user; when the AdjustmentCoefficient is small (close to 0), it indicates that there is a large focus deviation. The system will comprehensively enhance visual, auditory and tactile stimulation to focus the user's attention back on the task.
[0177] For example, suppose the current user's concentration level is level 2 (range 1-5), and the expected concentration level of the task after system evaluation is level 4. This leads to a large concentration deviation, and it is necessary to remind the user to concentrate by increasing the intensity of stimulation.
[0178] The system set the initial stimulus parameters for the three modalities: Visual - font size 24 pixels, blue, no animation.
[0179] Hearing - Volume 70 dB, Frequency 500 Hz, Normal speaking speed Touch - No vibration.
[0180] Based on the focus bias, the system calculates a smaller adjustment factor, assuming it is 0.3 (range 0-1). Then the stimulation parameters of each modality will be adjusted as follows:
[0181] Visual - font size becomes smaller (e.g. 18 pixels), color becomes darker (dark blue), flashing animation prompts appear Auditory - volume increases (e.g. 80 decibels), frequency increases (e.g. 600Hz), speech speed increases, and playback is repeated.
[0182] Haptic - A vibration reminder of medium intensity (such as level 3) occurs.
[0183] Through this full-modal stimulation enhancement, the aim is to improve the user's concentration and restore the focus level to the desired level 4 range.
[0184] If the concentration still does not improve after adjustment, the system will further increase the stimulation intensity; if the improvement is obvious, the stimulation will be appropriately weakened to avoid interference, thus forming a closed-loop adjustment process to adaptively optimize the user's concentration state.
[0185] Furthermore, the above embodiments correspond to the following beneficial effects:
[0186] 1. By collecting and analyzing the user's EEG signals, the objective detection and dynamic tracking of concentration are achieved, overcoming the inaccuracy of subjective evaluation and providing a scientific and effective basis for cognitive state evaluation. This method integrates EEG data preprocessing, feature extraction and concentration classification model construction, and uses an innovative time-frequency feature extraction method based on phase space reconstruction to efficiently and accurately characterize the user's concentration level from EEG signals.
[0187] 2. Compare the user's current real-time concentration with the expected target concentration level, and comprehensively evaluate the rationality of concentration by combining task attributes (such as difficulty, subject preference, knowledge involved, etc.) and user authority data (authority level, operation scope, etc.). This method designs a comprehensive mapping model, using machine learning algorithms (such as gradient boosting tree regression) to weigh and output the expected target concentration interval based on multiple evaluation dimensions, avoiding blind adjustment of attention.
[0188] 3. The self-attention mechanism is innovatively introduced to automatically learn and integrate the intrinsic correlation of multiple evaluation dimensions to generate a comprehensive feedback adjustment coefficient. This method uses different evaluation scores (such as real-time focus deviation score, task difficulty score, etc.) as input features, captures the correlation between them through the self-attention layer, and outputs the adjustment coefficient after nonlinear transformation, providing an accurate basis for focus adjustment. At the same time, technologies such as multi-head attention and feedforward neural network are also used to enhance feature fusion capabilities. This part can be regarded as an innovative artificial intelligence model that realizes adaptive modeling and comprehensive analysis of various factors affecting focus.
[0189] In order to implement the adaptive concentration training method based on EEG signals corresponding to the above method embodiment, so as to achieve the corresponding functions and technical effects. Figure 2 , Figure 2 The structure block diagram of an adaptive concentration training device 200 provided in an embodiment of the present application is shown. For the convenience of explanation, only the parts related to the present embodiment are shown. The adaptive concentration training device 200 provided in an embodiment of the present application includes:
[0190] The data acquisition module 201 is used to acquire the original EEG data of the user to be trained, pre-process the original EEG data, and acquire the time domain EEG features and frequency domain EEG features related to the concentration state;
[0191] The level output module 202 is used to obtain a pre-built detection model, input the original EEG data into the detection model, and output the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels;
[0192] A stimulus generation module 203, used to generate visual feedback stimulus and auditory feedback stimulus according to the concentration level, so as to influence the concentration state of the user;
[0193] The trade-off acquisition module 204 is used to acquire the task attribute parameters of the training task corresponding to the user and the user's authority data for the training task, and generate a trade-off relationship according to the task attribute parameters and the authority data;
[0194] A target generation module 205, for generating a target focus level and a reasonable interval range corresponding to the target focus level according to task attribute parameters, trade-off relationship and focus level;
[0195] The coefficient acquisition module 206 is used to generate a focus evaluation set based on the target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data, calculate multiple sub-evaluation scores corresponding to the focus evaluation set, and obtain a comprehensive feedback adjustment coefficient based on the multiple sub-evaluation scores;
[0196] The training completion module 207 is used to optimize the parameters of the visual feedback stimulation and the auditory feedback stimulation according to the feedback adjustment coefficient, and complete the adaptive concentration training of the user according to the optimized visual feedback stimulation and the auditory feedback stimulation. The above-mentioned adaptive concentration training device 200 can implement the adaptive concentration training method based on EEG signals of the above-mentioned method embodiment. The optional items in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiments of the present application can refer to the contents of the above-mentioned method embodiment, and will not be repeated in this embodiment.
[0197] Figure 3 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 3 As shown, the computer device 3 of this embodiment includes: at least one processor 30 ( Figure 3 Only one is shown in the figure), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, wherein the processor 30 implements the steps of any of the above method embodiments when executing the computer program 32.
[0198] The computer device 3 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 30 and a memory 31. Those skilled in the art will understand that Figure 3 It is only an example of computer device 3 and does not constitute a limitation on computer device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.
[0199] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0200] In some embodiments, the memory 31 may be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 may also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0201] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0202] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.
[0203] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.
[0204] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0205] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims
1. An adaptive concentration training method based on EEG signals, characterized in that: include: Obtaining original EEG data of the user to be trained, preprocessing the original EEG data, and obtaining time-domain EEG features and frequency-domain EEG features related to the concentration state; Obtaining a pre-built detection model, inputting the raw EEG data into the detection model, and outputting the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels; generating visual feedback stimulation and auditory feedback stimulation according to the concentration level, so as to influence the concentration state of the user; Acquire task attribute parameters of a training task corresponding to a user and permission data of the user for the training task, and generate a trade-off relationship according to the task attribute parameters and the permission data; Generate a target concentration level and a reasonable interval range corresponding to the target concentration level according to the task attribute parameters, the trade-off relationship and the concentration level; The target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data are used to generate a focus evaluation set, calculate multiple sub-evaluation scores corresponding to the focus evaluation set, and obtain a comprehensive feedback adjustment coefficient based on the multiple sub-evaluation scores; The parameters of the visual feedback stimulation and the auditory feedback stimulation are optimized according to the feedback adjustment coefficient, and the adaptive concentration training of the user is completed according to the optimized visual feedback stimulation and the auditory feedback stimulation.
2. The method according to claim 1, characterized in that The preprocessing of the raw EEG data comprises: Performing digital bandpass filtering on the raw EEG data, wherein the filtered raw EEG data includes effective components related to the concentration state and filters out baseline drift, DC components, myoelectric interference, and power frequency interference in the raw EEG data; Dividing the filtered raw EEG data according to preset time intervals to obtain multiple data segments; Baseline correction is performed on each of the data segments to eliminate the remaining baseline drift and DC offset, so that the baseline of each of the data segments is 0 point.
3. The method according to claim 1, characterized in that The step of acquiring time domain EEG features and frequency domain EEG features related to the concentration state includes: Obtaining the time delay and embedding dimension corresponding to the reconstruction of the original EEG data; Constructing a phase space sequence corresponding to the original EEG data according to the time delay and the embedding dimension; Reconstructing the topologically equivalent phase space trajectory of the preprocessed raw EEG data according to the phase space sequence; The time domain EEG features and frequency domain EEG features are extracted from the topologically equivalent phase space trajectory according to the Kent entropy method.
4. The method according to claim 1, characterized in that: The obtaining of the pre-built detection model comprises: Acquire an EEG-concentration data set collected under a preset cognitive processing task; the EEG-concentration data set includes a plurality of sample EEG data and label data corresponding to each sample EEG data; Acquire time domain EEG features and frequency domain EEG features corresponding to the sample EEG data, and concatenate the time domain EEG features and frequency domain EEG features to obtain a feature vector; Constructing a training sample according to each of the sample EEG data, the label data corresponding to the sample EEG data and the feature vector; The training of the detection model to be constructed is completed according to the training samples, and the pre-constructed detection model is obtained.
5. The method according to claim 1, characterized in that Generating visual feedback stimulation and auditory feedback stimulation according to the concentration level includes: Determining, according to the concentration level, a visual stimulation type and visual stimulation parameters corresponding to the visual feedback stimulation, and an auditory stimulation type and auditory stimulation parameters corresponding to the auditory feedback stimulation; Determining the modal coding and presentation method corresponding to the visual stimulation type and the auditory stimulation type; Generating the visual feedback stimulus and the auditory feedback stimulus according to the modality encoding, presentation mode, visual stimulus type, auditory stimulus type, visual stimulus parameters and auditory stimulus parameters; Among them, if the concentration level is greater than or equal to the preset level, the visual stimulation type and the auditory stimulation type are positive visual stimulation and positive auditory stimulation; if the concentration level is lower than the preset level, the visual feedback stimulation and the auditory feedback stimulation are suggestive visual stimulation and suggestive auditory stimulation.
6. The method according to claim 1, characterized in that The task attribute parameters at least include difficulty level, subject type and knowledge point range; generating a trade-off relationship according to the task attribute parameters and authority data includes: Obtaining a difficulty coefficient corresponding to the task attribute parameter according to the difficulty level; Acquire a topic preference coefficient corresponding to the task attribute parameter according to the topic type; Acquire the knowledge point range coefficient corresponding to the task attribute parameter according to the knowledge point range; Obtaining the authority level coefficient and the operable boundary according to the authority data; The difficulty coefficient, subject preference coefficient, knowledge point range coefficient, authority level coefficient and operable boundary are input into a preset mapping model, and the mapping model outputs a trade-off relationship between the task attribute parameters and the authority data.
7. The method according to claim 1, characterized in that The generating a target concentration level and a reasonable interval range corresponding to the target concentration level according to the task attribute parameters, the trade-off relationship and the concentration level includes: Obtain target concentration levels and reasonable concentration intervals corresponding to multiple preset cognitive task types; Constructing a mapping table according to the cognitive task type, target concentration level and reasonable concentration interval; Determine a target task type from a plurality of cognitive task types in the mapping table according to the task attribute parameters, the trade-off relationship and the concentration level, and obtain a target concentration level and a reasonable range interval corresponding to the target task type.
8. The method according to claim 1, characterized in that The step of further generating a tactile feedback stimulus according to the concentration level; and optimizing the parameters of the visual feedback stimulus and the auditory feedback stimulus according to the feedback adjustment coefficient comprises: Adjusting the font size, font color, animation effect, and prompt box transparency of the visual feedback stimulus according to the feedback adjustment coefficient; adjusting the volume, pitch, speech speed and number of repetitions of the auditory feedback stimulation according to the feedback adjustment coefficient; The vibration intensity of the tactile feedback stimulation is adjusted according to the feedback adjustment coefficient.
9. An adaptive concentration training device, characterized in that: include: A data acquisition module, used to acquire the original EEG data of the user to be trained, pre-process the original EEG data, and acquire time domain EEG features and frequency domain EEG features related to the concentration state; A level output module, used to obtain a pre-built detection model, input the raw EEG data into the detection model, and output the user's concentration level and confidence score; the detection model is used to identify multiple discrete concentration levels; A stimulus generation module, used for generating visual feedback stimulus and auditory feedback stimulus according to the concentration level, so as to influence the concentration state of the user; A trade-off acquisition module, used to acquire task attribute parameters of a training task corresponding to a user and the user's authority data for the training task, and generate a trade-off relationship according to the task attribute parameters and the authority data; A target generation module, used to generate a target concentration level and a reasonable interval range corresponding to the target concentration level according to the task attribute parameters, the trade-off relationship and the concentration level; A coefficient acquisition module is used to generate a focus evaluation set based on the target focus level, reasonable interval range, focus level, confidence score, task attribute parameters and authority data, calculate multiple sub-evaluation scores corresponding to the focus evaluation set, and obtain a comprehensive feedback adjustment coefficient based on the multiple sub-evaluation scores; The training completion module is used to optimize the parameters of the visual feedback stimulation and the auditory feedback stimulation according to the feedback adjustment coefficient, and complete the adaptive concentration training of the user according to the optimized visual feedback stimulation and the auditory feedback stimulation.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Acoustoelectric stimulation nerve regulation and control method and device using electroencephalogram detection analysis control
CN111477299A
Attention assessment method, system and equipment based on multi-modal fusion and medium
CN116881853A
Attention-based neurofeedback training
US20200168117A1
Sound-based attentive state assessment
US20230282080A1
System and method for enhancing attention-concentration power through auditory stimulus
WO2020013396A1
Cited By
Electroencephalogram neurofeedback training method and system based on reinforcement rate closed-loop control
CN122955071A
