Anxiety regulation method based on dual-guide electroencephalogram detection and transcranial micro-current stimulation

CN122499409APending Publication Date: 2026-08-04BEIJING NAOLI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING NAOLI TECHNOLOGY CO LTD
Filing Date
2026-05-20
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]1、焦虑识别与CES参数选择相互割裂,检测结果通常停留在提示层面,无法自动驱动会话模板和周期更新

Benefits of technology

[0022] In one or more of the above specific embodiments, the anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation provided by the present invention achieves accurate labeling of anxiety state by collecting data through bi-day high and low anxiety induction tasks and constructing anxiety labels, solving the problems of label distortion and insufficient coverage in single anxiety induction scenarios; dual-channel EEG acquisition combined with preprocessing and feature screening improves the effectiveness of EEG signals and the specificity of features, providing reliable data support for anxiety scoring; it provides two scoring methods, machine learning and frequency band ratio algorithm, taking into account the accuracy and real-time performance of the scoring, adapting to the usage needs of different scenarios; the whole-process evaluation of the conversation and dynamic generation of parameter templates realize personalized adaptation of CES stimulation parameters, avoiding the problem of poor adjustment effect of fixed parameters; the combination of conversation-level and periodic-level linkage adjustment with safety gating strategy ensures both the continuity and effectiveness of anxiety regulation, and comprehensively avoids safety risks in the stimulation process, ensuring that the regulation process is safe, controllable and efficient, ultimately achieving scientific and precise regulation of anxiety state, improving user experience and regulation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122499409A_ABST
    Figure CN122499409A_ABST
Patent Text Reader

Abstract

This invention provides an anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation (CES), comprising: collecting EEG data from subjects using bi-day data collection as a basic data unit, constructing anxiety labels; collecting real-time dual-channel EEG signals from target users using a dual-channel EEG device, preprocessing, extracting, and filtering the collected real-time dual-channel EEG signals, inputting the filtered features into a pre-trained machine learning model to obtain an anxiety score output by the pre-trained machine learning model; executing a pre-session assessment, session execution, and post-session review process based on the anxiety score, generating a CES session parameter template according to preset rules; executing CES stimulation according to session-level and periodic-level linkage regulation logic, while simultaneously executing a safety gating control strategy according to preset rules. This achieves scientific and precise regulation of anxiety states, improving user experience and regulation effectiveness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and brain-computer interface technology, and in particular to an anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation. Background Technology

[0002] Anxiety recognition and state regulation are important technological directions in brain-computer interfaces, emotion computing, digital health, and wearable electronic devices. In scenarios such as working, studying, driving, focus training, pre-sleep preparation, and high-intensity interaction, users' anxiety levels fluctuate continuously with task load, environmental stimuli, and individual state. If the system cannot promptly identify and provide stable regulation strategies over a longer period, it will lead to decreased attentional resources, reduced cognitive efficiency, and increased subjective discomfort.

[0003] Existing technical solutions generally include subjective scales, behavioral detection, simple EEG threshold schemes, brain-computer interface schemes requiring personal calibration, and stand-alone CES devices. However, existing technical solutions suffer from problems such as insufficient real-time performance, difficulty in establishing a stable long-term use mechanism, high deployment barriers, and strong reliance on manual parameter tuning.

[0004] Specifically, the existing technical solutions have the following main defects.

[0005] 1. Anxiety recognition and CES parameter selection are disconnected, and the detection results usually remain at the prompt level, failing to automatically drive conversation templates and periodic updates.

[0006] 2. Solutions that rely on calibration by target users have high deployment costs, are not suitable for plug-and-play scenarios, and are not conducive to large-scale deployment.

[0007] 3. The simple rule method is not expressive enough and cannot make full use of comprehensive information such as high-frequency beta, frequency band ratio, asymmetry and connectivity.

[0008] 4. There is a lack of a stable reasoning mechanism suitable for dual-channel prefrontal EEG, and there is a tendency for discrepancies between offline training and online reasoning.

[0009] 5. There is a lack of CES parameter linkage logic around single sessions and continuous usage cycles, and many solutions still rely on manual parameter selection.

[0010] 6. Lacks a mature safety gating mechanism, and does not incorporate earlobe contact, inapplicable situations, active stop, and abnormal shutdown into a unified control logic. Summary of the Invention

[0011] This invention relates to an anxiety regulation method based on dual-channel electroencephalography (EEG) detection and transcranial microcurrent stimulation, in order to solve at least one of the above-mentioned technical problems.

[0012] To solve the above-mentioned technical problems, the present invention adopts the following technical means: An anxiety modulation method based on dual-channel EEG detection and transcranial microcurrent stimulation includes: Using bi-day data collection as a basic data unit, the participants' EEG data were collected using a pre-defined anxiety-inducing paradigm. On the first day, a high-anxiety-inducing task was performed, and on the second day, a low-anxiety-inducing task was performed. Anxiety labels were constructed based on task difficulty, task accuracy, reaction time, and task progress. The feature data obtained by preprocessing, feature extraction and feature screening of the EEG signals acquired by the dual-channel EEG device are used in conjunction with the anxiety label to train a pre-trained machine learning model. A dual-channel EEG device is used to collect real-time dual-channel EEG signals from the target user. The collected real-time dual-channel EEG signals are preprocessed, feature extracted, and feature filtered. The filtered features are input into the pre-trained machine learning model to obtain the anxiety score output by the pre-trained machine learning model; or, the anxiety score is obtained by calculating the frequency band ratio algorithm based on the filtered features. Based on the anxiety score, a pre-session assessment, session execution, and post-session review process are performed, and a transcranial microcurrent stimulation (CES) session parameter template is generated according to preset rules. CES stimulation is executed according to the session-level and periodic-level linkage adjustment logic, while safety gating control strategy is executed according to preset rules.

[0013] In some embodiments, preprocessing the acquired EEG signals specifically includes: The raw EEG signal was sequentially subjected to 50Hz power frequency notch filtering and 1-45Hz bandpass filtering. The filtered signal is segmented with a single window length of 2 seconds and an overlap rate of 40%. The number of sampling points per window is 500 and the sliding window step size is 300. The segmented signals are aggregated using a 20-second aggregation window.

[0014] In some embodiments, constructing the anxiety label specifically includes: The corresponding normalized parameters are calculated based on the average task difficulty, average task accuracy, average reaction time, current trial start time, and total task duration. The original anxiety value is obtained by weighting and summing the normalized parameters according to preset weights. The original anxiety value is mapped to the 0-100 range using the Sigmoid activation function; wherein, the baseline value for high anxiety-induced days is set to 70 and the amplitude value is set to 30, and the baseline value for low anxiety-induced days is set to 20 and the amplitude value is set to 20.

[0015] In some embodiments, the anxiety score in the 0-100 range specifically includes: In the process of machine learning anxiety scoring, the 51-dimensional anxiety feature vector after the k-th window is filtered is input into the pre-trained machine learning model to obtain the anxiety classification probability output by the model, and the probability value is multiplied by 100 to obtain the machine learning anxiety score. In the process of band ratio anxiety scoring, the ratio of the sum of the power of β wave 0.3 to the sum of the power of α wave 0.3 and the power of θ wave 0.3 is calculated, and this ratio is multiplied by preset coefficients to obtain the band ratio anxiety score.

[0016] In some embodiments, when performing a pre-session assessment, the anxiety level is divided into four levels according to the pre-session anxiety score, specifically including: A pre-conversation anxiety score of less than 35 is classified as level 0. A pre-conversation anxiety score of 35 or higher but less than 60 is classified as Level 1. A pre-conversation anxiety score of 60 or higher but less than 80 is classified as Level 2. A pre-conversation anxiety score of 80 or higher is classified as Level 3.

[0017] In some embodiments, generating a transcranial microcurrent stimulation (CES) session parameter template specifically includes: The duration of the conversation is limited to 20-60 minutes, based on the anxiety level and the decrease in the average anxiety score in the previous stage. The intensity level of stimulation is determined based on the anxiety level and whether the score after the previous session is greater than or equal to the anxiety score before the session, and is limited to a range of 1-6. The weekly usage frequency is limited to 2-7 times based on the anxiety level and whether the anxiety score is trending upward. The interval between reassessments is limited to 1-7 days based on the anxiety level. The parameter template for the next cycle is obtained by weighting the current cycle parameter template and the target template in a 6:4 ratio and then rounding it down.

[0018] In some embodiments, the execution of the security gating control policy specifically includes: The session can be initiated if the following conditions are met simultaneously: the quality of the EEG signal is up to standard, the earlobe electrode is in normal contact, no active stop command is triggered, and the device is not malfunctioning. Session persistence requires, in addition to the initial conditions, that the user provides no discomfort feedback and that the device battery level is not lower than a safe threshold; CES stimulation is only performed when both the initial and persistence conditions are met.

[0019] This invention also provides an anxiety regulation system based on dual-channel EEG detection and transcranial microcurrent stimulation, for implementing the method described above, the system comprising: The dual-channel EEG acquisition module is used to acquire EEG signals at preset locations, with reference and ground electrodes set at the central location, and outputs anxiety-related features required for pre-conversation assessment, post-conversation review, and periodic review. The CES execution module is used to output transcranial microcurrent stimulation through electrodes held between the earlobes. The control and evaluation module is used to perform filtering, segmentation, feature extraction, model inference, score mapping, parameter template selection, and periodic recording. Mobile or local interactive modules are used to display assessment results, questionnaire results, conversation records, and suggestions for next use; The background or local archive module is used to save information on user-inapplicable situations, historical session records, parameter templates, and periodic reports.

[0020] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described above.

[0021] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.

[0022] In one or more of the above specific embodiments, the anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation provided by the present invention achieves accurate labeling of anxiety state by collecting data through bi-day high and low anxiety induction tasks and constructing anxiety labels, solving the problems of label distortion and insufficient coverage in single anxiety induction scenarios; dual-channel EEG acquisition combined with preprocessing and feature screening improves the effectiveness of EEG signals and the specificity of features, providing reliable data support for anxiety scoring; it provides two scoring methods, machine learning and frequency band ratio algorithm, taking into account the accuracy and real-time performance of the scoring, adapting to the usage needs of different scenarios; the whole-process evaluation of the conversation and dynamic generation of parameter templates realize personalized adaptation of CES stimulation parameters, avoiding the problem of poor adjustment effect of fixed parameters; the combination of conversation-level and periodic-level linkage adjustment with safety gating strategy ensures both the continuity and effectiveness of anxiety regulation, and comprehensively avoids safety risks in the stimulation process, ensuring that the regulation process is safe, controllable and efficient, ultimately achieving scientific and precise regulation of anxiety state, improving user experience and regulation effect. Attached Figure Description

[0023] Embodiments of the invention will now be described by way of example only, with reference to the accompanying schematic diagrams, wherein: Figure 1 Schematic diagram of EEG device and ear clip-on CES device; Figure 2 This is a schematic diagram of a wearable device; Figure 3 Flowchart for single-session use; Figure 4 This is a timing diagram for periodic-level adjustment; Figure 5 Update the logic graph for inter-session parameters; Figure 6 Flowchart for security gating and inapplicable scenarios; Figure 7 A diagram illustrating the collaboration between devices, mobile devices, and the backend; Figure 8 This is a graph showing the cross-validation results of the anxiety detection model. Figure 9 A hierarchical mapping diagram for CES session templates; Figure 10 This is a diagram illustrating the periodic template update and review process. Detailed Implementation

[0024] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0025] First, the technical terms involved in the embodiments of the present invention will be explained as follows.

[0026] EEG: Electroencephalography, used to collect neurophysiological signals from users during anxiety assessment, pre-stimulation assessment, post-stimulation reassessment, and periodic follow-up phases.

[0027] CES: Transcranial Microcurrent Stimulation, used to apply microcurrent stimulation to users through electrodes on both earlobes to achieve status support, emotion regulation and long-term use management.

[0028] Portable dual-channel EEG device: refers to an EEG device that includes at least two acquisition channels. In this application, FP1 and FP2 are preferably used as acquisition electrodes, with reference and ground electrodes respectively set at the center position, and a frontal integrated wireless patch structure is preferred.

[0029] Plug-and-Play: Once the target user connects to the system, there is no need to retrain the model or perform additional calibration procedures; the system can be directly deployed and output anxiety recognition results. After the model is trained on the source domain subject data, it can be directly generalized to the target subject for inference, without relying on the target subject's personal calibration samples.

[0030] Session-level adjustment: A parameter distribution and review method centered on a single 20-60 minute CES usage session.

[0031] Periodic adjustment: A long-term usage method that involves conducting multiple CES sessions daily or weekly and updating parameter templates based on the results of phased review.

[0032] Anxiety score: A continuous value mapped to the range of 0-100. The higher the value, the closer the target user is to a state of high anxiety.

[0033] In one specific embodiment, the anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation provided by the present invention includes the following steps: S110: Using bi-day collection as a basic data unit, the EEG data of the subjects were collected using a preset anxiety induction paradigm. On the first day, a high anxiety induction task was performed, and on the second day, a low anxiety induction task was performed. Anxiety labels were constructed based on task difficulty, task accuracy, reaction time, and task progress. S120: The feature data obtained by preprocessing, feature extraction and feature screening of the EEG signals acquired by the dual-lead EEG device are used in conjunction with the anxiety label to train a pre-trained machine learning model. S130: The dual-channel EEG signal of the target user is collected using a dual-channel EEG device. The collected real-time dual-channel EEG signal is preprocessed, feature extracted and filtered. The filtered features are input into the pre-trained machine learning model to obtain the anxiety score output by the pre-trained machine learning model; or, the anxiety score is obtained by calculating the frequency band ratio algorithm based on the filtered features. S140: Based on the anxiety score, perform the pre-session assessment, session execution, and post-session review process, and generate a transcranial microcurrent stimulation (CES) session parameter template according to preset rules; S150: Execute CES stimulation according to the session-level and periodic-level linkage adjustment logic, and at the same time execute the safety gating control strategy according to the preset rules.

[0034] Specifically, this invention provides a scheme for anxiety identification and long-term regulation based on portable dual-channel EEG detection and transcranial microcurrent stimulation. This scheme builds upon existing dual-channel EEG feature extraction and machine learning recognition mechanisms, and further utilizes the recognition results for session initiation, post-session review, and parameter template updates. In terms of hardware support, the system and device structure include: 1. Dual-channel EEG acquisition module: used to acquire EEG signals at FP1 and FP2 positions, with reference and ground electrodes set at the center position, and output anxiety-related features required for pre-meeting assessment, post-meeting review and periodic review.

[0035] 2. CES Execution Module: Used to output transcranial microcurrent stimulation through electrodes held between the earlobes, preferably supporting multiple intensity levels and session duration settings of 20-60 minutes per session.

[0036] 3. Control and Evaluation Module: Used to perform filtering, segmentation, feature extraction, model inference, score mapping, parameter template selection, and periodic recording.

[0037] 4. Mobile or local interactive module: used to display assessment results, questionnaire results, conversation records, and suggestions for next use.

[0038] 5. Background or local archive module: Used to save information on user inapplicability situations, historical session records, parameter templates, and periodic reports.

[0039] In step S120, the preprocessing of the acquired EEG signals specifically includes: The raw EEG signal was sequentially subjected to 50Hz power frequency notch filtering and 1-45Hz bandpass filtering. The filtered signal is segmented with a single window length of 2 seconds and an overlap rate of 40%. The number of sampling points per window is 500 and the sliding window step size is 300. The segmented signals are aggregated using a 20-second aggregation window.

[0040] It should be understood that 50Hz power frequency notch filtering can effectively filter out power grid interference, while 1-45Hz bandpass filtering can retain the frequency bands of EEG signals related to anxiety states (such as alpha, beta, and theta waves), eliminate irrelevant frequency noise, and improve the purity of the original EEG signal. The 2-second single-window segmentation combined with a 40% overlap rate setting can avoid feature fragmentation caused by overly fine signal segmentation, and also prevent feature omission caused by overly coarse segmentation, ensuring that the segmented signals can completely retain the EEG features related to anxiety. The 20-second aggregation window aggregates the segmented signals, which can further smooth signal fluctuations, reduce the impact of random noise on feature extraction, improve the accuracy and stability of subsequent feature extraction, and provide a basic guarantee for the accuracy of anxiety scoring.

[0041] Specifically, in the preferred embodiment of anxiety recognition and preprocessing, the EEG sampling rate is 250 Hz, and the number of acquisition channels is 2, corresponding to FP1 and FP2 respectively. The offline modeling stage uses two days of data for modeling. The data acquisition method is as follows: the first day executes a task with higher anxiety induction difficulty, and the second day executes a task with lower anxiety induction difficulty. Regarding trigger management, the start trigger code for the high-anxiety block is 2000, the end trigger code is 2001, the start trigger code for a single trial is 2010, and the trigger codes for correct, incorrect, timeout, and excessively fast responses are 2011, 2012, 2013, and 2014, respectively. In the preferred task configuration, the anxiety induction task is selected as a four-arithmetic problem, the maximum duration of a single anxiety induction task is 6 minutes, the timeout time for a single question is 6 seconds, the question interval range is 1.0-2.0 seconds, the adaptive window is 5 questions, and the target accuracy rates are easy=0.8 and hard=0.65, respectively. Signal preprocessing preferably involves first performing a 50.0 Hz notch filter, followed by a 1.0-45.0 Hz bandpass filter; then, the signal is segmented into fixed-length windows with a window length of 2 seconds, an overlap rate of 0.4, and an aggregation window length of 20.0 seconds.

[0042] ; in, Indicates the first The raw EEG signals of each channel, This indicates the EEG signal after notch and bandpass processing. For bandpass filters, It is a notch filter.

[0043] ; in, This represents the number of sampling points per window, and `step` represents the sliding window step size. Using these parameters allows for a balance between online response speed and frequency domain stability.

[0044] The preferred embodiment of the anxiety feature construction and recognition approach adopts a feature extraction-machine learning approach consistent with existing engineering practices for anxiety recognition. Based on current representative experimental results, the initial number of features was 100, and after screening, 51 were retained for stable inference across the subject deployment phase. Representative retained features include: log_energy, power_entropy, channel_correlation, iqr (interquartile range), mav (mean absolute value), mad (median absolute difference), envelope_mean, fft_max (fast Fourier transform peak value), global_efficiency, std (standard deviation), and envelope_std (standard deviation of envelope). These features cover different information levels such as frequency domain power, spectral entropy, statistics, envelope features, complexity, and connectivity, and can collectively characterize anxiety-related EEG states.

[0045] ; in, Indicates the first The system maintains a consistent feature order and input format for each window's corresponding anxiety feature vector during training and deployment to ensure consistent inference.

[0046] ; in, This represents a pre-trained anxiety recognition model. In a representative cross-subject experiment, the best single model was naive_bayes, with an average F1 score of approximately 0.552, average accuracy of approximately 0.624, average precision of approximately 0.528, and average recall of approximately 0.708. For resource-constrained devices, a bandwidth ratio algorithm can also be used as a lightweight alternative, maintaining a consistent 0-100 score output interface with the machine learning model.

[0047] ; The above formula corresponds to the optimized anxiety bandwidth ratio formula in the existing engineering, where BR represents the bandwidth ratio algorithm.

[0048] In step S130, constructing the anxiety label specifically includes: The corresponding normalized parameters are calculated based on the average task difficulty, average task accuracy, average reaction time, current trial start time, and total task duration. The original anxiety value is obtained by weighting and summing the normalized parameters according to preset weights. The original anxiety value is mapped to the 0-100 range using the Sigmoid activation function; wherein, the baseline value for high anxiety-induced days is set to 70 and the amplitude value is set to 30, and the baseline value for low anxiety-induced days is set to 20 and the amplitude value is set to 20.

[0049] Thus, the method provided by this invention calculates normalized parameters using multi-dimensional task-related parameters (task difficulty, accuracy, reaction time, task progress) to achieve a multi-dimensional representation of anxiety states, avoiding the problem of incomplete anxiety representation by a single parameter; the pre-set weighted summation highlights the differences in the impact of different parameters on anxiety states, making the original anxiety value more closely match the actual anxiety level; the sigmoid activation function maps the original anxiety value to the 0-100 range, standardizing the anxiety value and facilitating subsequent anxiety level classification and score comparison; the differentiated setting of the baseline and amplitude values ​​for high and low anxiety-inducing days can accurately match the anxiety level of bi-day induced tasks, ensuring the discriminativeness and accuracy of anxiety labels, providing high-quality label data for pre-trained machine learning models, and improving model training effects.

[0050] The anxiety score range of 0-100 includes: In the process of machine learning anxiety scoring, the 51-dimensional anxiety feature vector after the k-th window is filtered is input into the pre-trained machine learning model to obtain the anxiety classification probability output by the model, and the probability value is multiplied by 100 to obtain the machine learning anxiety score. In the process of band ratio anxiety scoring, the ratio of the sum of the power of β wave 0.3 to the sum of the power of α wave 0.3 and the power of θ wave 0.3 is calculated, and this ratio is multiplied by preset coefficients to obtain the band ratio anxiety score.

[0051] It should be noted that the 51-dimensional anxiety feature vector covers multi-dimensional EEG features. After being input into the pre-trained model, it is converted into a score through classification probability, which can make full use of the model's learning ability to achieve accurate anxiety scoring and adapt to the individual differences of different users. The band ratio algorithm focuses on the core EEG waves (β wave, α wave, θ wave) related to anxiety. It highlights the representation role of EEG frequency band differences in anxiety state through exponential operation and ratio calculation. Multiplying by a preset coefficient achieves score standardization. This algorithm has low computational load and fast response speed, and can achieve real-time output of anxiety scores. The two scoring methods are complementary. Machine learning scoring ensures accuracy, while band ratio scoring ensures real-time performance. It can be flexibly selected according to actual use scenarios (such as real-time monitoring and accurate assessment) to improve the applicability and reliability of anxiety scoring.

[0052] When conducting the pre-conversation assessment, the anxiety level is divided into four levels according to the pre-conversation anxiety score, specifically including: A pre-conversation anxiety score of less than 35 is classified as level 0. A pre-conversation anxiety score of 35 or higher but less than 60 is classified as Level 1. A pre-conversation anxiety score of 60 or higher but less than 80 is classified as Level 2. A pre-conversation anxiety score of 80 or higher is classified as Level 3.

[0053] This approach divides anxiety scores into four levels, achieving a refined classification of anxiety levels and avoiding the problem of single or coarse levels failing to accurately match users' anxiety states. The reasonable setting of scoring ranges for each level clearly distinguishes between mild, moderate, and severe anxiety and normal states, providing a clear basis for the personalized adjustment of subsequent CES stimulus parameters. This ensures that users with different anxiety levels can receive appropriate adjustment plans, avoiding the problem of discomfort caused by excessively high parameters or the inability to achieve the desired adjustment effect by excessively low parameters, thereby improving the targeting and effectiveness of anxiety regulation.

[0054] Specifically, since the anxiety identification in this application is directly derived from the homology anxiety detection logic of existing projects, the same data organization and score mapping methods are continued in the label construction stage. Preferably, anxiety labels in the 0-100 range are generated based on task difficulty, accuracy, reaction time, and task progress.

[0055] ; ; ; ; in, Indicates the average difficulty of the window. This represents the average accuracy of the window. This indicates the average response time of the window. Indicates the start time of the current trial. Indicates the total duration of the task.

[0056] ; ; On days when high anxiety is triggered, prioritize =70、 =30; On days with low anxiety triggers, the preferred option is... =20、 =20. After applying the above Sigmoid smoothing, the original task labels can be stably mapped to the 0-100 range.

[0057] In step S140, a transcranial microcurrent stimulation (CES) session parameter template is generated, specifically including: The duration of the conversation is limited to 20-60 minutes, based on the anxiety level and the decrease in the average anxiety score in the previous stage. The intensity level of stimulation is determined based on the anxiety level and whether the score after the previous session is greater than or equal to the anxiety score before the session, and is limited to a range of 1-6. The weekly usage frequency is limited to 2-7 times based on the anxiety level and whether the anxiety score is trending upward. The interval between reassessments is limited to 1-7 days based on the anxiety level. The parameter template for the next cycle is obtained by weighting the current cycle parameter template and the target template in a 6:4 ratio and then rounding it down.

[0058] In this way, the session parameters (duration, intensity, frequency, and reassessment interval) are dynamically adjusted based on the user's actual anxiety level and historical regulation effects (score decrease value, score change trend), achieving personalized and dynamic optimization of parameters and avoiding the limitations of fixed parameters. The range of 20-60 minutes in duration, 1-6 levels of intensity, and 2-7 times in frequency not only conforms to human physiological tolerance but also adapts to the regulation needs of different anxiety levels. The graded setting of the reassessment interval can track changes in the user's anxiety state in a timely manner, providing a basis for parameter adjustment. The weighted generation method of the parameter template for the next cycle achieves a smooth transition of the regulation plan, taking into account both the current regulation effect and long-term goals, avoiding discomfort or fluctuations in regulation effect caused by parameter mutations, and continuously improving the effectiveness and consistency of anxiety regulation.

[0059] Specifically, the CES session template and parameter formula are as follows: ; ; ; ; ; ; ; Where G(k) represents the pre-meeting anxiety level, Indicates the duration of the session. Indicates the intensity level. Indicates the frequency of use per week. Indicates the interval between re-evaluations. This indicates the current session template. This is an indicator function used to convert the corresponding judgment condition into a binary gating variable; when the condition within the parentheses is true, =1, otherwise =0. Specifically... When the average anxiety score decreases in the recent period If the value is less than or equal to 5, the value is 1, indicating that the recent adjustment effect is insufficient and the duration of this session needs to be appropriately increased; otherwise, the value is 0. Anxiety score after the last session ended Greater than or equal to the anxiety score before the start of the session If the value is 1, it means that the previous session did not achieve a significant reduction effect and the intensity level of the current session needs to be appropriately increased; otherwise, it is 0. When the first If an upward trend in anxiety scores is detected during the next cycle assessment, indicating a rebound trend, a value of 1 is assigned, signifying a need to increase weekly usage frequency; otherwise, a value of 0 is assigned. Using this formula avoids relying entirely on human experience for conversation templates.

[0060] In step S150, the execution of the security gating control strategy specifically includes: The session can be initiated if the following conditions are met simultaneously: the quality of the EEG signal is up to standard, the earlobe electrode is in normal contact, no active stop command is triggered, and the device is not malfunctioning. Session persistence requires, in addition to the initial conditions, that the user provides no discomfort feedback and that the device battery level is not lower than a safe threshold; CES stimulation is only performed when both the initial and persistence conditions are met.

[0061] Multi-dimensional activation conditions (signal quality, electrode contact, command status, device status) can avoid ineffective stimulation and safety risks from the source, ensuring the reliability and safety of stimulation activation. During the session maintenance phase, user discomfort feedback and device power monitoring are added to achieve real-time monitoring of the stimulation process. This allows for timely response to abnormal situations (such as electrode detachment, user discomfort, or low device power) and immediate cessation of stimulation to avoid harm to the user. The dual verification of activation and maintenance conditions constructs a full-process safety protection mechanism, ensuring the effective execution of CES stimulation while maximizing user safety and enhancing user trust and comfort.

[0062] Specifically, the expression for the security gating mechanism is: ; ; in, When the first Pre-session EEG signal quality score Not lower than the preset threshold If the value is 1, then the value is 0; otherwise, the value is 0. This indicates a preset EEG signal quality threshold, used to determine whether the currently collected EEG data meets the session initiation conditions; the pre-session EEG signal quality score... Greater than or equal to If the current EEG signal quality is deemed acceptable, the subsequent conversation can proceed; when Less than If the system determines that the current EEG signal quality is unqualified, it will not activate the device and will prompt the user to re-wear the electrodes or adjust the device contact status. When the first If the earlobe electrode is in normal contact during the next session, use 1; otherwise, use 0. : 1 if the user does not trigger a stop command, otherwise 0. : 1 is set when there are no abnormalities such as device abnormalities, communication abnormalities, or other abnormal states that prevent the system from starting; otherwise, 0 is set. When the user is at the If no obvious inappropriate feedback is received in the next session, use 1; otherwise, use 0. When the device has remaining power Not lower than the preset safe remaining power threshold If the value is 1, then the value is 0; otherwise, the value is 0.

[0063] A session is initiated only when the conditions for EEG quality, earlobe contact, user status, and device status are all met. If any discomfort feedback, contact abnormality, or device malfunction occurs during the session, the system immediately terminates the current session and records the reason.

[0064] This invention also provides an anxiety regulation system based on dual-channel EEG detection and transcranial microcurrent stimulation, for implementing the method described above, the system comprising: The dual-channel EEG acquisition module is used to acquire EEG signals at preset locations, with reference and ground electrodes set at the central location, and outputs anxiety-related features required for pre-conversation assessment, post-conversation review, and periodic review. The CES execution module is used to output transcranial microcurrent stimulation through electrodes held between the earlobes. The control and evaluation module is used to perform filtering, segmentation, feature extraction, model inference, score mapping, parameter template selection, and periodic recording. Mobile or local interactive modules are used to display assessment results, questionnaire results, conversation records, and suggestions for next use; The background or local archive module is used to save information on user-inapplicable situations, historical session records, parameter templates, and periodic reports.

[0065] In one or more of the above specific embodiments, the anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation provided by the present invention achieves accurate labeling of anxiety state by collecting data through bi-day high and low anxiety induction tasks and constructing anxiety labels, solving the problems of label distortion and insufficient coverage in single anxiety induction scenarios; dual-channel EEG acquisition combined with preprocessing and feature screening improves the effectiveness of EEG signals and the specificity of features, providing reliable data support for anxiety scoring; it provides two scoring methods, machine learning and frequency band ratio algorithm, taking into account the accuracy and real-time performance of the scoring, adapting to the usage needs of different scenarios; the whole-process evaluation of the conversation and dynamic generation of parameter templates realize personalized adaptation of CES stimulation parameters, avoiding the problem of poor adjustment effect of fixed parameters; the combination of conversation-level and periodic-level linkage adjustment with safety gating strategy ensures both the continuity and effectiveness of anxiety regulation, and comprehensively avoids safety risks in the stimulation process, ensuring that the regulation process is safe, controllable and efficient, ultimately achieving scientific and precise regulation of anxiety state, improving user experience and regulation effect.

[0066] To facilitate understanding, the following will be combined with... Figures 1-8 The technical solutions provided by the present invention will be generally introduced through Examples 1-3.

[0067] Example 1: Example of data collection and algorithm construction for bi-day anxiety.

[0068] In this embodiment, the system uses two days of data collection as a basic data unit and four mental arithmetic problems as the evoked paradigm. On day 1, a high-anxiety evoked task is performed, and on day 2, a low-anxiety evoked task is performed to provide samples with cross-difficulty and cross-time periods for model training.

[0069] Each participant wore a frontal dual-channel EEG device with a sampling rate of 250 Hz, continuously recording EEG data from the FP1 and FP2 channels. The system automatically extracted high-anxiety blocks, low-anxiety blocks, and valid trial windows based on trigger codes, and used incorrect responses, timeouts, and excessively rapid responses as the basis for label correction.

[0070] In this embodiment, the EEG data is first processed with 50 Hz notch and 1-45 Hz bandpass, and then segmented with a 2-second window and a 40% overlap rate. Then, adjacent windows are aggregated at 20-second intervals to calculate the average difficulty, average accuracy, average reaction time and task progress.

[0071] Subsequently, using the aforementioned The window-level anxiety labels are calculated using the A(k) formula. Preferably, the label range for high anxiety-inducing days is concentrated in the range of 60-100, and the label range for low anxiety-inducing days is concentrated in the range of 0-40, thereby forming continuous value labels that can be directly used for modeling.

[0072] Example 2: Example of training a cross-subject anxiety recognition model and pre-session assessment and parameter distribution for a single CES session.

[0073] In this embodiment, the system organizes multiple subjects and multiple window EEG segments into a unified training set, and completes feature selection, model selection, and deployment information solidification in a cross-subject manner. In a representative experiment, 100 original features were first extracted from each window, and then 51 core features were selected; the preferred model was naive_bayes, with an average F1 score of approximately 0.552.

[0074] When terminal resources are insufficient or model files are temporarily unavailable, the system switches to the bandwidth ratio fallback route, calls the anxiety bandwidth ratio formula to calculate the score, and maintains an interface format consistent with the machine learning output.

[0075] After the user completes wearing the device, the system first performs a pre-meeting assessment. Preferably, a stable EEG window of no less than 20 seconds is collected first, and a pre-meeting score is obtained based on a machine learning model. .

[0076] If the example user's pre-meeting score is 76, then according to the grading formula, the following is obtained: If the average score decreased by more than 5 in the previous stage, the duration of this session will be... Minutes; if the score did not decrease in the previous session, then the intensity level. If it is gear 1, then it is gear 4; otherwise, it is gear 4.

[0077] During the session, the system does not perform second-level data transfer; instead, it maintains the current template and continuously monitors the earlobe contact status, user-initiated stop signals, and device malfunctions. EEG is collected again after the session ends. and calculate .

[0078] For example, in a certain conversation , ,but Since this value exceeds the preset threshold, the system prefers to maintain the current template or appropriately extend the review interval rather than immediately increasing the parameters.

[0079] Example 3: Periodic template update and security gating example.

[0080] In this embodiment, the system organizes multiple CES sessions into a 4-week cycle-level adjustment plan. Week 1 establishes an individual usage baseline, weeks 2 and 3 are executed according to the template, and week 4 updates the template for the next cycle based on cumulative records.

[0081] If the average score of the last two sessions decreased If the adjustment is insufficient, the template will be automatically strengthened; if it is insufficient twice in a row... If the value is greater than or equal to 15, it is considered to be stable and the template will be automatically moderated.

[0082] The system is organized around security gating, mobile interaction, and backend collaboration. Before the session begins, it performs inapplicability checks, earlobe contact checks, EEG signal quality checks, and electrical charge checks; if any condition is not met, the system only retains the evaluation results and does not initiate the CES session.

[0083] During session execution, the local controller is responsible for outputting execution records and collecting status; the mobile app is responsible for displaying scores, templates, session countdowns, and review reminders; and the backend is responsible for archiving session logs, template versions, and trend curves.

[0084] This application solution can be implemented as a standalone device, a combination of device and mobile terminal, or a device and back-end collaborative system.

[0085] For offline or weak network environments, data collection, evaluation, and session control can be completed on the local terminal; for network environments, the backend can further handle file management, template synchronization, and long-term trend analysis.

[0086] Therefore, this application is not limited to a specific scenario, but provides a set of anxiety recognition and long-term CES regulation technology solutions applicable to wearable emotion regulation devices.

[0087] The technical solution of this application has at least the following beneficial technical effects.

[0088] 1. Based on the dual-channel EEG feature extraction-machine learning path that has been verified in existing projects, the technology has a clear source and strong engineering reusability.

[0089] 2. Supports cross-subject calibration-free deployment, significantly reducing the access threshold for target users.

[0090] 3. Integrate the anxiety identification results with the CES long-term regulation parameter template to form a complete closed loop from detection to parameter issuance and periodic updates.

[0091] 4. Make CES usage more in line with actual product forms, that is, focus on single sessions and multi-week continuous use cycles, rather than instant feedback at the second level.

[0092] 5. Unify dual-channel EEG, mobile terminal, and back-end file management into the same technical framework to facilitate enterprise deployment and continuous iteration.

[0093] In one embodiment, a computer device, which may be a server, is provided. The computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and model predictions. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The model predictions of the computer device store static and dynamic information data. The network interface of the computer device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the above method embodiment.

[0094] Those skilled in the art will understand that this structure is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. Specific computer devices may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0095] Corresponding to the above embodiments, this invention also provides a computer storage medium containing one or more program instructions. These one or more program instructions are used to execute the method described above.

[0096] The present invention also provides a computer program product, the computer program product including a computer program, the computer program being stored on a non-transitory computer-readable storage medium, and the computer being able to perform the above-described method when the computer program is executed by a processor.

[0097] In this embodiment of the invention, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0098] The various methods, steps, and logic diagrams disclosed in the embodiments of this invention can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The processor reads information from the storage medium and, in conjunction with its hardware, completes the steps of the above methods.

[0099] The storage medium can be memory, such as volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.

[0100] Among them, non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory.

[0101] Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0102] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memory.

[0103] Those skilled in the art will recognize that, in one or more of the examples above, the functions described in this invention can be implemented using a combination of hardware and software. When applied as software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of computer programs from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0104] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made on the basis of the technical solution of the present invention should be included within the scope of protection of the present invention.

Claims

1. An anxiety regulation method based on dual-channel EEG detection and transcranial microcurrent stimulation, characterized in that, The method includes: Using bi-day data collection as a basic data unit, the participants' EEG data were collected using a pre-defined anxiety-inducing paradigm. On the first day, a high-anxiety-inducing task was performed, and on the second day, a low-anxiety-inducing task was performed. Anxiety labels were constructed based on task difficulty, task accuracy, reaction time, and task progress. The feature data obtained by preprocessing, feature extraction and feature screening of the EEG signals acquired by the dual-channel EEG device are used in conjunction with the anxiety label to train a pre-trained machine learning model. A dual-channel EEG device is used to collect real-time dual-channel EEG signals from the target user. The collected real-time dual-channel EEG signals are preprocessed, feature extracted, and feature filtered. The filtered features are input into the pre-trained machine learning model to obtain the anxiety score output by the pre-trained machine learning model; or, the anxiety score is obtained by calculating the frequency band ratio algorithm based on the filtered features. Based on the anxiety score, a pre-session assessment, session execution, and post-session review process are performed, and a transcranial microcurrent stimulation (CES) session parameter template is generated according to preset rules. CES stimulation is executed according to the session-level and periodic-level linkage adjustment logic, while safety gating control strategy is executed according to preset rules.

2. The method according to claim 1, characterized in that, Preprocessing of the acquired EEG signals specifically includes: The raw EEG signal was sequentially subjected to 50Hz power frequency notch filtering and 1-45Hz bandpass filtering. The filtered signal is segmented with a single window length of 2 seconds and an overlap rate of 40%. The number of sampling points per window is 500 and the sliding window step size is 300. The segmented signals are aggregated using a 20-second aggregation window.

3. The method according to claim 1, characterized in that, Constructing the anxiety label specifically includes: The corresponding normalized parameters are calculated based on the average task difficulty, average task accuracy, average reaction time, current trial start time, and total task duration. The original anxiety value is obtained by weighting and summing the normalized parameters according to preset weights. The original anxiety value is mapped to the 0-100 range using the Sigmoid activation function; wherein, the baseline value for high anxiety-induced days is set to 70 and the amplitude value is set to 30, and the baseline value for low anxiety-induced days is set to 20 and the amplitude value is set to 20.

4. The method according to claim 3, characterized in that, Anxiety scores ranging from 0 to 100 include: In the process of machine learning anxiety scoring, the 51-dimensional anxiety feature vector after the k-th window is filtered is input into the pre-trained machine learning model to obtain the anxiety classification probability output by the model, and the probability value is multiplied by 100 to obtain the machine learning anxiety score. In the process of band ratio anxiety scoring, the ratio of the sum of the power of β wave 0.3 to the sum of the power of α wave 0.3 and the power of θ wave 0.3 is calculated, and this ratio is multiplied by preset coefficients to obtain the band ratio anxiety score.

5. The method according to claim 1, characterized in that, When conducting the pre-conversation assessment, the anxiety level is divided into four levels according to the pre-conversation anxiety score, specifically including: A pre-conversation anxiety score of less than 35 is classified as level 0. A pre-conversation anxiety score of 35 or higher but less than 60 is classified as Level 1. A pre-conversation anxiety score of 60 or higher but less than 80 is classified as Level 2. A pre-conversation anxiety score of 80 or higher is classified as Level 3.

6. The method according to claim 5, characterized in that, Generate a CES session parameter template for transcranial microcurrent stimulation, specifically including: The duration of the conversation is limited to 20-60 minutes, based on the anxiety level and the decrease in the average anxiety score in the previous stage. The intensity level of stimulation is determined based on the anxiety level and whether the score after the previous session is greater than or equal to the anxiety score before the session, and is limited to a range of 1-6. The weekly usage frequency is limited to 2-7 times based on the anxiety level and whether the anxiety score is trending upward. The interval between reassessments is limited to 1-7 days based on the anxiety level. The parameter template for the next cycle is obtained by weighting the current cycle parameter template and the target template in a 6:4 ratio and then rounding it down.

7. The method according to claim 1, characterized in that, The implementation of the security gating control strategy specifically includes: The session can be initiated if the following conditions are met simultaneously: the quality of the EEG signal is up to standard, the earlobe electrode is in normal contact, no active stop command is triggered, and the device is not malfunctioning. Session persistence requires, in addition to the initial conditions, that the user provides no discomfort feedback and that the device battery level is not lower than a safe threshold; CES stimulation is only performed when both the initial and persistence conditions are met.

8. An anxiety regulation system based on dual-channel EEG detection and transcranial microcurrent stimulation, used to implement the method as described in any one of claims 1-7, characterized in that, The system includes: The dual-channel EEG acquisition module is used to acquire EEG signals at preset locations, with reference and ground electrodes set at the central location, and outputs anxiety-related features required for pre-conversation assessment, post-conversation review, and periodic review. The CES execution module is used to output transcranial microcurrent stimulation through electrodes held between the earlobes. The control and evaluation module is used to perform filtering, segmentation, feature extraction, model inference, score mapping, parameter template selection, and periodic recording. Mobile or local interactive modules are used to display assessment results, questionnaire results, conversation records, and suggestions for next use; The background or local archive module is used to save information on user-inapplicable situations, historical session records, parameter templates, and periodic reports.

9. A computer device, characterized in that, The method includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method described in any one of claims 1 to 7.