Data processing method based on brain-computer interface and mobile device

By combining EEG and fNIRS signals into a lightweight neural network model on mobile devices, and dynamically adjusting feature extraction and weight allocation, the problems of computational complexity and insufficient recognition ability of brain-computer interfaces on mobile devices are solved, and efficient and accurate cognitive state recognition is achieved.

CN122365400BActive Publication Date: 2026-08-04SHENZHEN XINYANG CHUANGZHI TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN XINYANG CHUANGZHI TECHNOLOGY CO LTD
Filing Date
2026-06-08
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

When applying brain-computer interfaces to mobile devices, the complex computational process makes it difficult to meet real-time requirements, and single-modal neural signal processing methods have insufficient recognition capabilities in different application scenarios, failing to accurately identify the user's cognitive state.

Method used

A lightweight neural network model is used, combining EEG signals and functional near-infrared spectroscopy (fNIRS) signals. Through spatiotemporal separation convolutional layers and attention layers, feature extraction and weight allocation are dynamically adjusted to identify the cognitive state of the target user.

Benefits of technology

It improves the accuracy and real-time performance of mobile devices in recognizing cognitive states in different application scenarios, enhances the adaptability and decoding efficiency of devices under limited computing resources, and reduces energy consumption and information leakage risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122365400B_ABST
    Figure CN122365400B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and mobile device based on a brain-computer interface, which fuses two kinds of multi-modal neural signals of electroencephalogram (EEG) and functional near-infrared spectroscopy (fNIRS), and performs accurate alignment based on time stamps, obtains the mechanism of the current application scene and the proportion of the required computing resources for feature extraction after the alignment of the signals, and dynamically adjusts feature extraction and weight distribution according to the scene by using the space-time separation convolution layer and attention layer of a lightweight neural network model, instead of indiscriminately processing all brain areas and frequency bands, so as to improve the adaptability and decoding efficiency of the mobile device in different application scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the intersection of brain-computer interface technology, mobile computing, and artificial intelligence. Specifically, it relates to a data processing method based on a brain-computer interface, a mobile device, and a computer-readable storage medium. Background Technology

[0002] Brain-computer interface (BCI) technology, serving as a bridge connecting the brain to external devices, has shown immense potential in fields such as medical rehabilitation and human-computer interaction. Non-invasive BCIs, due to their non-invasive and easy-to-deploy characteristics, have become the mainstream approach for consumer-level applications. However, when applying BCI technology to mobile devices, the complexity of the computational process makes it difficult to meet the real-time requirements of mobile devices.

[0003] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0004] The purpose of this application is to provide a data processing method and mobile device based on brain-computer interface, which can balance the efficiency and accuracy of EEG signal decoding under the limited computing resources of mobile devices, adapt to the cognitive state recognition needs of different application scenarios, and effectively improve the accuracy and real-time performance of cognitive state recognition.

[0005] Firstly, this application provides a data processing method based on a brain-computer interface, the technical solution of which is as follows: A brain-computer interface-based data processing method is applied to a mobile device. The mobile device is equipped with a lightweight neural network model and stores the target brain regions associated with different application scenarios and their corresponding target frequency band associations. The method includes: The target user's multimodal neural signals are obtained, including electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals, both of which carry timestamps. EEG and fNIRS signals are aligned based on timestamps, and the aligned EEG and fNIRS signals are fused to obtain a fused multimodal neural signal data matrix. Obtain the current application scenario and the proportion of computing resources required to extract features from the multimodal neural signal data matrix; The multimodal neural signal data matrix is ​​input into the spatiotemporal separation convolutional layer of the lightweight neural network model. Based on the current application scenario and the proportion of computing resources required to extract the features of the multimodal neural signal data matrix, the spatiotemporal features corresponding to the current application scenario are calculated. The spatiotemporal features refer to the vector or matrix representations with semantics of brain region activation relationships and rhythmic change patterns obtained after extraction by spatial convolution and temporal convolution. Spatiotemporal features are input into the attention layer of a lightweight neural network model. Based on the current application scenario, the first attention weight is assigned to the feature channels of the target brain region and target frequency band associated with the current application scenario in the spatiotemporal features, and the second attention weight is assigned to other feature channels to obtain the weighted contextual features, wherein the first attention weight is greater than the second attention weight. Contextual features are input into a lightweight classification network within a lightweight neural network to identify the cognitive state of the target user.

[0006] Compared to existing single-modal neural signal processing methods, this embodiment fuses two multimodal neural signals—EEG and fNIRS—and utilizes a lightweight neural network model with spatiotemporally separated convolutional layers and attention layers to dynamically adjust feature extraction and weight allocation based on the scenario, rather than indiscriminately processing all brain regions and frequency bands. This scenario-based dynamic resource allocation and feature focusing enables the system to more efficiently and accurately identify the user's cognitive state in specific scenarios, thereby improving the adaptability and decoding efficiency of mobile devices in different application scenarios.

[0007] Secondly, embodiments of this application provide a mobile device including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the steps of the method as described in the first aspect and any possible implementation.

[0008] Thirdly, embodiments of this application provide a computer program product containing computer instructions that, when run on a computer, cause the method described in the first aspect and any possible implementation to be implemented.

[0009] The beneficial effects of the second and third aspects can be referred to the content described in the first aspect and any possible implementation method above, and will not be repeated here. Attached Figure Description

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

[0011] Figure 1 This application provides a schematic flowchart of a data processing method based on a brain-computer interface. Figure 2 This is a schematic flowchart of a computing resource allocation method provided in an embodiment of this application; Figure 3This is a schematic diagram of the structure of a mobile device provided in an embodiment of this application. Detailed Implementation

[0012] In the application of non-invasive brain-computer interface technology to mobile devices, multimodal neural signal processing faces technical challenges. The amplitude range of EEG signals acquired from the scalp is 0.5-100μV, making them susceptible to interference from electromyography (EMG), eye movements, and environmental power frequency signals, resulting in a signal-to-noise ratio below 10dB. This makes it difficult to meet the real-time requirements of mobile scenarios in terms of feature extraction accuracy. Differences in EEG characteristics among different users, including rhythm distribution and response amplitude characteristics, lead to a decline in the cross-user adaptability of general models. Existing algorithms are designed for medical rehabilitation scenarios and lack sufficient ability to recognize states such as cognitive load, creative stimulation, and episodic memory in civilian scenarios such as learning, office work, and home. Furthermore, under the constraints of mobile device computing resources, algorithms struggle to balance decoding efficiency and accuracy, and lightweight designs result in accuracy loss. In addition, the centralized cloud processing model for neural data poses a risk of information leakage.

[0013] For example, in mobile learning scenarios, EEG signals and functional near-infrared spectral signals are collected by dry electrode earpieces integrated into smartphones. During the learning process, minute head movements trigger electromyographic artifacts, and changes in ambient light cause fluctuations in near-infrared signals, reducing the quality of the original signal. Different users exhibit different EEG response patterns to the same knowledge points; the characteristics of prefrontal alpha waves and parietal P300 waves are inconsistent, causing general models to fail to accurately identify the level of knowledge mastery. Basic attention span is monitored, but mild inattention cannot be distinguished from weak knowledge, preventing targeted content delivery. During algorithm operation, central processing unit resources are heavily consumed, device temperature rises, and battery consumption decreases rapidly. Raw neural data is uploaded to the cloud without anonymization, posing a risk of leakage of user cognitive preferences and emotional states.

[0014] If the aforementioned technical problems are not effectively resolved, the application of brain-computer interface systems on mobile devices will be severely limited. State recognition results will be unreliable, and accurate cognitive state feedback will be unavailable. Insufficient model generalization ability will necessitate frequent scene calibration, reducing the continuity of the user experience. Differentiated services will be unavailable. The battery life and response speed of mobile devices will be affected, making it difficult to meet high-frequency interaction needs.

[0015] For details, please refer to the appendix. Figure 1 The diagram shows a flowchart of a brain-computer interface-based data processing method. This application proposes a brain-computer interface-based data processing method applied to a mobile device. The mobile device is equipped with a lightweight neural network model and stores the target brain regions associated with different application scenarios and their corresponding target frequency band associations. The method includes: Step 201: Obtain the multimodal neural signals of the target user, which include electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals, both of which carry timestamps; Step 202: Align the EEG signal and the fNIRS signal based on the timestamp, and fuse the aligned EEG signal and fNIRS signal to obtain the fused multimodal neural signal data matrix; Step 203: Obtain the current application scenario and the proportion of computing resources required to extract features from the multimodal neural signal data matrix; Step 204: Input the multimodal neural signal data matrix into the spatiotemporal separation convolutional layer of the lightweight neural network model. Based on the current application scenario and the proportion of computing resources required to extract the features of the multimodal neural signal data matrix, calculate the spatiotemporal features corresponding to the current application scenario. The spatiotemporal features refer to the vector or matrix representations with semantics of brain region activation relationships and rhythmic change patterns obtained after extraction by spatial convolution and temporal convolution. Step 205: Input the spatiotemporal feature into the attention layer of the lightweight neural network model. Based on the current application scenario, assign a first attention weight to the feature channels of the target brain region and target frequency band associated with the current application scenario in the spatiotemporal feature, and assign a second attention weight to other feature channels to obtain the weighted scenario-based feature, wherein the first attention weight is greater than the second attention weight. Step 206: Input the contextual features into the lightweight classification network in the lightweight neural network to identify the cognitive state of the target user.

[0016] For ease of understanding, the following explains some key terms in this embodiment: Multimodal neural signals refer to a collection of various types of signals acquired from the nervous system of an organism. In this embodiment, it specifically refers to the combination of electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals. EEG signals reflect the electrical activity of neurons in the cerebral cortex and have high temporal resolution; fNIRS signals reflect neural activity by monitoring changes in blood oxygen concentration in the cerebral cortex and have high spatial resolution. The fusion of these two signals aims to provide more comprehensive and accurate information on brain activity.

[0017] Electroencephalography (EEG) is a signal that reflects the electrophysiological activity of neurons in the brain, recorded by electrodes placed on the scalp. This signal is typically measured in microvolts (μV) and contains rhythms of different frequencies, such as alpha waves, beta waves, and theta waves, which are associated with different cognitive states.

[0018] Functional near-infrared spectroscopy (fNIRS) is a non-invasive neuroimaging technique that indirectly reflects changes in blood oxygen concentration in the cerebral cortex by measuring changes in the absorption and scattering of near-infrared light in brain tissue, thereby inferring neuronal activity. This signal can provide activation information for specific brain regions.

[0019] Lightweight neural network models are optimized neural network structures with fewer parameters and lower computational cost. These models are designed to run efficiently on computationally limited devices, such as mobile devices, while maintaining high performance.

[0020] Spatiotemporally separated convolutional layers are a component in lightweight neural network models. Their design philosophy is to decompose traditional convolution operations into independent spatial and temporal convolutions. Spatial convolutions are used to extract spatial activation features between different brain regions, while temporal convolutions are used to capture the dynamic rhythmic features of neural signals changing over time. This separation helps reduce the computational complexity and number of parameters in the model.

[0021] An attention layer is a mechanism in neural networks that allows the model to dynamically focus on specific parts of the input data based on task requirements. By assigning different weights to different feature channels, attention layers can enhance important features relevant to the current task or scenario while suppressing irrelevant or distracting features.

[0022] Lightweight classification networks are the final classification module in lightweight neural network models. Their structure is simplified, enabling them to efficiently map extracted features to specific cognitive state categories. This network aims to achieve accurate cognitive state recognition with low computational overhead.

[0023] Cognitive state refers to an individual's mental activity and state of consciousness at a specific moment, such as focus, relaxation, fatigue, cognitive load, and memory arousal. Identifying cognitive states is of great significance for achieving personalized human-computer interaction and intelligent intervention.

[0024] The method in this embodiment is applied to a mobile device equipped with a lightweight neural network model and storing the target brain regions and corresponding target frequency band associations associated with different application scenarios. This mobile device can be a smartphone, tablet, smart headphones, or other portable device, or it can be an audio device or wearable device, possessing certain computing power and storage space, enabling it to acquire, process, and analyze neural signals.

[0025] The technical solution in this embodiment will be described in detail below.

[0026] This embodiment provides a data processing method based on a brain-computer interface. The method first requires obtaining multimodal neural signals from the target user. These multimodal neural signals can be acquired by a mobile device through built-in or external sensors. For example, a dry electrode headband can be used to acquire electroencephalogram (EEG) signals, while a sensor integrated into a smart headset can acquire functional near-infrared spectral signals (fNIRS). During acquisition, to ensure the accuracy of subsequent processing, a timestamp can be added to each signal to record its acquisition time. One implementation is that after the sensor acquires the signal, it immediately timestamps the data packet using a hardware clock module and transmits it to the mobile device via wireless communication methods such as Bluetooth or Wi-Fi. Another implementation is that the mobile device immediately records the reception time as a timestamp upon receiving the sensor data.

[0027] After obtaining the multimodal neural signals, the EEG signal and the fNIRS signal need to be aligned based on the timestamp. The purpose of alignment is to eliminate potential time delays during the acquisition or transmission of different modal signals, ensuring consistency across the time dimension. After alignment, the EEG signal and the fNIRS signal are fused to obtain a fused multimodal neural signal data matrix. One fusion method is to simply concatenate the aligned EEG signal and the fNIRS signal along the feature dimension to form a higher-dimensional feature vector or matrix. For example, if the EEG signal has 8 channels and the fNIRS signal has 4 channels, the fused data matrix will contain information from 12 channels. Another fusion method is to linearly superimpose or weightedly average the original data of the two signals after alignment to generate a unified signal representation.

[0028] Next, it's necessary to obtain the current application scenario and the proportion of computational resources required to extract features from the multimodal neural signal data matrix. The current application scenario can be obtained in various ways. For example, mobile devices can make a comprehensive judgment based on data from multiple sensors, such as the user's currently used application, geographic location information, ambient light intensity, and ambient noise level. For instance, if a user uses a learning application for an extended period, and the ambient light and noise levels match the characteristics of a learning environment, the current application scenario can be determined to be a learning scenario. The proportion of computational resources can be pre-set. For example, a fixed computational resource allocation scheme can be preset for each application scenario; in a learning scenario, 70% of the computational resources could be allocated to feature extraction related to focus.

[0029] Next, the multimodal neural signal data matrix is ​​input into the spatiotemporal segregated convolutional layer of the lightweight neural network model. This spatiotemporal segregated convolutional layer calculates spatiotemporal features corresponding to the current application scenario, based on the proportion of computational resources required to extract features from the multimodal neural signal data matrix. These spatiotemporal features are vector or matrix representations with semantic representations of brain region activation relationships and rhythmic changes, obtained after spatial and temporal convolution. For example, the spatial convolution part identifies activation patterns in learning-related brain regions (such as the prefrontal and parietal lobes), while the temporal convolution part captures rhythmic changes in specific frequency bands (such as alpha waves and P300 waves) within these brain regions. In this way, the spatiotemporal segregated convolutional layer calculates spatiotemporal features corresponding to the learning scenario, which contain the spatial activation relationships and temporal rhythmic changes of the user's brain during the learning process. For example, in learning scenarios, spatiotemporal separation convolutional layers can prioritize processing spatial and temporal features related to the prefrontal alpha wave and parietal P300 wave based on a preset resource ratio, thereby obtaining spatiotemporal features reflecting the user's focus and understanding of knowledge points. One implementation involves a spatiotemporal separation convolutional layer comprising a spatial convolution module and a temporal convolution module. The spatial convolution module uses a two-dimensional convolution kernel to process the spatial distribution of multi-channel signals, while the temporal convolution module uses a one-dimensional convolution kernel to process the temporal sequence of signals, thereby reducing computational load on mobile devices and achieving lightweight computing.

[0030] Then, the spatiotemporal features are input into the attention layer of the lightweight neural network model. Based on the current application scenario, the attention layer assigns a first attention weight to feature channels in the spatiotemporal features that are associated with the target brain region and target frequency band, and a second attention weight to other feature channels, resulting in a weighted, contextualized feature. The first attention weight is greater than the second attention weight. For example, in a learning scenario, the attention layer identifies feature channels associated with prefrontal alpha waves and parietal P300 waves and assigns them higher attention weights, while assigning lower weights to feature channels in other brain regions or frequency bands. One implementation is that the attention layer dynamically generates weight coefficients for different feature channels based on the contextual information of the current application scenario through a fully connected network or a self-attention mechanism.

[0031] Finally, the contextualized features are input into a lightweight classification network within this lightweight neural network to identify the cognitive state of the target user. This lightweight classification network receives contextualized features weighted by an attention layer and maps them to predefined cognitive state categories. For example, in a learning scenario, the classification network can identify whether the user is currently in a state of "focus," "slight inattentiveness," or "weak knowledge point." One implementation approach is to use a multilayer perceptron (MLP) or small convolutional neural network (CNN) structure, transforming features into a probability distribution through activation functions and output layers to determine the final cognitive state.

[0032] Compared to existing single-modal neural signal processing methods, this embodiment effectively improves the information dimensionality and reliability of neural signal data by fusing two multimodal neural signals: electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals, and performing precise alignment based on timestamps. For example, when a user is learning, a single EEG signal may be insufficient to accurately distinguish whether decreased concentration is due to fatigue or a lack of understanding of the knowledge points, while fNIRS signals can provide information on blood oxygenation changes in specific brain regions. The fusion of the two signals can more comprehensively reflect the user's cognitive state, thereby overcoming the limitations of poor signal quality and single information dimension in existing technologies.

[0033] Furthermore, this embodiment introduces a mechanism to obtain the current application scenario and the proportion of computational resources required for feature extraction. It utilizes the spatiotemporally separated convolutional layers and attention layers of a lightweight neural network model to dynamically adjust feature extraction and weight allocation based on the scenario. For example, in a user's learning scenario, the system can focus computational resources and attention on brain regions and frequencies highly relevant to learning and cognition (such as prefrontal alpha waves and parietal P300 waves), rather than processing all brain regions and frequencies indiscriminately. This scenario-based dynamic resource allocation and feature focusing enables the system to more efficiently and accurately identify the user's cognitive state in a specific scenario, significantly outperforming the accuracy degradation problem caused by "single model adapting to all scenarios" in existing technologies. This improves the adaptability and decoding efficiency of mobile devices in different application scenarios.

[0034] In some of the above implementations, mobile devices compute spatiotemporal features corresponding to the current application scenario through spatiotemporal separation convolutional layers of lightweight neural network models. However, in practical applications, how to efficiently and accurately extract rich spatiotemporal features from multimodal neural signals that contain both brain region activation relationships and rhythmic variation patterns, while taking into account the limited computing resources of mobile devices, is a technical problem that needs to be solved. Improperly designed spatiotemporal feature extraction mechanisms may lead to feature redundancy, excessive computational overhead, or insufficient feature representation capabilities, thereby affecting the accuracy and real-time performance of cognitive state recognition.

[0035] In response, this application further proposes that the lightweight neural network model includes a spatial convolutional layer and a temporal convolutional layer, which are connected in series. The spatial convolutional layer extracts spatial activation features between different brain regions, and the temporal convolutional layer extracts the fluctuation features of EEG rhythm over time. The spatial convolutional layer uses a two-dimensional convolutional kernel, and the temporal convolutional layer uses a one-dimensional convolutional kernel.

[0036] Spatial and temporal convolutional layers are specific types of convolutional layers in neural networks used to process data with spatial and temporal dimensions. Concatenation means that the output of one layer serves as the input to another, forming a processing sequence. For example, a spatial convolutional layer can be designed to process the input data first, and its output can then be passed to a temporal convolutional layer for further processing. This approach is typically used to first capture spatial patterns and then analyze how these patterns change over time. Alternatively, spatial and temporal convolutional layers can be integrated as independent modules into a lightweight neural network model, concatenated through well-defined input-output interfaces. Spatial convolutional layers aim to identify and extract spatial association patterns or activation features between different brain regions in multimodal neural signals. For example, when a cognitive task occurs, the activation intensity of specific brain regions and their interactions can be observed. Spatial convolutional layers can receive signals from different brain regions or sensor channels as input, and capture local or global spatial patterns by sliding and weighted summing across these spatial dimensions using convolutional kernels. Alternatively, multiple convolutional kernels can be applied to generate multiple feature maps, each representing a specific pattern response of the input signal in different spatial dimensions. Temporal convolutional layers focus on extracting dynamic patterns that change over time from neural signals, particularly the fluctuating characteristics of frequency, amplitude, and phase of EEG rhythms (such as alpha, beta, theta, and delta waves). Temporal convolutional layers typically process time-series data, capturing the dependencies and dynamic evolution of signals at different time steps by sliding a one-dimensional convolutional kernel along the temporal dimension; or, by using convolutional kernels of different sizes or stacking multiple temporal convolutional layers, they can extract multi-scale temporal features, thereby capturing short- and long-term rhythmic variations. Two-dimensional convolutional kernels are suitable for processing data with spatial layouts, such as images or sensor data arranged in two dimensions. In brain-computer interfaces, this can correspond to the two-dimensional distribution of electrodes on the scalp or the two-dimensional projection of fNIRS probes onto the cortex. For example, the positions of EEG electrodes or fNIRS probes can be mapped onto a two-dimensional grid, and then a two-dimensional convolutional kernel can be applied to the grid to capture the spatial correlations between adjacent electrodes or probes; alternatively, the two-dimensional convolutional kernel can operate on the input feature map to extract higher-level spatial features. One-dimensional convolutional kernels are specifically designed for processing time-series data, effectively capturing local patterns and dependencies of signals along the time axis. For example, a one-dimensional convolutional kernel operates on time-series data in a sliding window manner, performing weighted summation on the data within the window to extract temporal features; or, by adjusting the size and stride of the convolutional kernel, a one-dimensional convolutional layer can effectively extract EEG rhythm features within different frequency ranges.

[0037] This application's solution achieves effective separation and extraction of spatial and temporal features from multimodal neural signals by specifically designing the spatiotemporal separation convolutional layer of a lightweight neural network model as a cascaded structure of spatial and temporal convolutional layers. This separation process not only captures the complex information contained in neural signals more precisely, but also avoids the enormous computational overhead that can arise from traditional three-dimensional convolutional kernels due to the use of lightweight convolutional kernels. This separate, lightweight convolutional kernel design significantly reduces the computational complexity and number of parameters of the model, thereby improving the accuracy and efficiency of spatiotemporal feature extraction under the limited computing resources of mobile devices. It achieves efficient and accurate spatiotemporal feature extraction, providing high-quality input for subsequent cognitive state recognition. This structured feature extraction method enables the lightweight neural network model to better understand the semantics of brain region activation relationships and rhythmic changes in neural signals, thus improving the accuracy and efficiency of cognitive state recognition.

[0038] The following is a concrete example. On a mobile device, the spatiotemporal separation convolutional layer in the lightweight neural network model can be implemented as follows: First, the fused multimodal neural signal data matrix (e.g., a two-dimensional matrix representing the spatial distribution of electrodes / probes, where each element contains time-series data) is input into the spatial convolutional layer. This spatial convolutional layer can be configured with multiple two-dimensional convolutional kernels, for example, using 16 3x3 convolutional kernels. These kernels slide along the dimension representing the spatial distribution of brain regions or electrodes to extract spatial activation features between different brain regions. For example, when the input data is the fused data of 64-channel EEG signals and 16-channel fNIRS signals, it can be reshaped into a feature map with a spatial dimension of 8x8, and then spatial feature extraction is performed using 3x3 two-dimensional convolutional kernels. Subsequently, these spatial feature maps obtained after processing by the spatial convolutional layer are flattened or reshaped and used as input to the temporal convolutional layer. Temporal convolutional layers can be configured with multiple one-dimensional convolutional kernels, for example, using 32 1x5 kernels that slide along the time dimension to extract the fluctuating features of EEG rhythms over time. For instance, for each spatial feature point, the temporal convolutional layer applies a 1x5 kernel to convolve over the time series, thereby capturing rhythmic changes at different time scales. In this way, the spatial convolutional layer first extracts spatial features from the input signal, and its output is then used by the temporal convolutional layer to extract temporal features, thus efficiently acquiring spatiotemporal features with semantic representations of brain region activation relationships and rhythmic variation patterns.

[0039] In some of the embodiments described above in this application, mobile devices need to extract features from multimodal neural signal data matrices. However, in practice, due to the limited computing resources of mobile devices, if the same computing resources are invested in the extraction of all neural signal features, it may lead to a waste of resources or an inability to effectively highlight the key features most relevant to the current application scenario, thereby affecting the efficiency and accuracy of cognitive state recognition.

[0040] For details, please refer to the appendix. Figure 2 The flowchart of the computational resource allocation method shown in the figure further illustrates the steps for obtaining the proportion of computational resources required to extract features from the multimodal neural signal data matrix, including: Step 301: Obtain a predefined list of neural signal features, which includes neural signal features of different brain regions and their corresponding frequency bands; Step 302: Based on the current application scenario and the correlation, determine the target brain region and its corresponding target frequency band in the list that correspond to the current application scenario; Step 303: For each predefined neural signal feature in the list, allocate a proportion of computing resources required to extract each predefined neural signal feature, wherein the first computing resource proportion is greater than the second computing resource proportion. The first computing resource proportion is the proportion of computing resources allocated to extracting features of the target brain region and its corresponding target frequency band, and the second computing resource proportion is the proportion of computing resources allocated to extracting features of non-target brain regions and their corresponding target frequency bands.

[0041] The predefined list of neural signal features refers to a dataset pre-defined and stored on the mobile device. Its purpose is to define the various neural signal features that the system can recognize and process. This list can exist in the form of a database, configuration file, or hard-coded list, recording the neural signal features represented by different brain regions (e.g., prefrontal lobe, temporal lobe, occipital lobe) corresponding to different scenarios, and the specific frequency bands (e.g., alpha waves, theta waves, beta waves, P300 waves, μ waves, etc.) corresponding to these brain regions. For example, the list may contain entries such as "prefrontal alpha wave" and "temporal theta wave," each representing an extractable neural signal feature.

[0042] Based on the correlation of the current application scenario, the system identifies the target brain regions and their corresponding target frequency bands from the list. For example, if the current scenario is a "learning scenario," the system will determine "prefrontal alpha waves" and "parietal P300 waves" as target features based on the correlation. This determination process can be achieved through table lookup, rule matching, or a machine learning-based classifier.

[0043] The system dynamically or pre-allocates a share of computational resources to be consumed during feature extraction for each neural signal feature in the list. This allocation can be based on preset weights, real-time evaluation, or dynamic adjustment. For example, a percentage can be assigned to each feature to represent its proportion of total computational resources.

[0044] Specifically, higher resource allocation is given to target brain regions and corresponding target frequency bands that are highly relevant to the current application scenario. This means that for neural signal features identified as directly related to the current application scenario, the system allocates more processor time, memory, or computing unit resources for refined extraction and analysis. Conversely, for non-target features with lower relevance to the current application scenario, relatively fewer resources are allocated, and they may even be extracted coarsely or partially skipped. This differentiated allocation strategy ensures that limited computing resources are prioritized for processing the most critical information for recognizing the current cognitive state.

[0045] The proposed solution pre-acquires and stores the correlations between different application scenarios and target brain regions and corresponding target frequency bands. During actual operation, based on the current application scenario, it intelligently identifies the target brain region and target frequency band most relevant to that scenario from a predefined list of neural signal features. Furthermore, instead of evenly allocating computing resources, the system adopts a differentiated resource allocation strategy. This mechanism allows mobile devices to concentrate their limited computing resources on extracting the most critical neural signal features for recognizing the current cognitive state, thereby significantly improving resource utilization efficiency and reducing the energy consumption of mobile devices while ensuring recognition accuracy. In this way, mobile devices can more effectively process multimodal neural signal data matrices, providing high-quality and contextualized feature inputs for subsequent cognitive state recognition.

[0046] Through the above technical solutions, mobile devices can intelligently adjust their computing resource allocation strategies according to the current application scenario, prioritizing the processing of neural signal features most relevant to the current application scenario. This not only avoids ineffective computation of unimportant features, saving valuable computing resources and power, but also significantly improves the accuracy and real-time performance of cognitive state recognition by investing more resources in the extraction of key features. Especially when mobile devices have limited computing power, this optimization strategy is of great significance for realizing efficient and accurate brain-computer interface applications.

[0047] In some other embodiments, this application proposes a data processing method based on a brain-computer interface. In some of the embodiments described above, the proportion of computational resources allocated to extracting features from target brain regions and their corresponding target frequency bands is greater than the proportion allocated to extracting features from non-target brain regions and their corresponding target frequency bands. However, this resource allocation method may not fully consider the differences in the actual importance of different features in specific scenarios and the real-time fluctuations in their signal quality, which may result in insufficiently refined allocation of computational resources, affecting the efficiency and accuracy of feature extraction.

[0048] In response, this application further proposes to calculate the proportion of computing resources that each predefined neural signal feature in the list should occupy based on its static importance coefficient and real-time signal quality coefficient in the current application scenario through a three-dimensional weighted fusion model.

[0049] The static importance coefficient refers to the inherent, prior importance of a predefined neural signal feature for identifying the cognitive state of a target in a specific application scenario. This coefficient is typically determined based on extensive offline data analysis, expert knowledge, or the results of pre-trained models, reflecting the feature's contribution under normal circumstances. For example, the static importance coefficient can be obtained by analyzing historical datasets using feature selection algorithms to evaluate the correlation between each feature and the cognitive state label; alternatively, it can be manually set through expert scoring or domain knowledge. For instance, in attention tasks, features related to prefrontal alpha waves may be assigned a higher static importance coefficient.

[0050] Real-time signal quality coefficient (RQC) is a quantitative indicator of the current signal quality of a predefined neural signal feature during data acquisition. Electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals are susceptible to various noises and artifacts. RQC reflects the degree to which these interferences affect signal usability. For example, signal quality can be assessed in real-time by calculating the signal-to-noise ratio (SNR), artifact percentage, or signal stationarity index, and then normalized to a coefficient between 0 and 1. Alternatively, it can be determined by monitoring for abnormalities in signal amplitude and frequency range, or by using machine learning models to classify signals in real-time to identify high-quality signals and assign a corresponding quality coefficient.

[0051] A three-dimensional weighted fusion model is a mathematical model used to comprehensively consider multiple influencing factors (in this case, scene, static importance, and real-time signal quality) to calculate the final weights or proportions. It can effectively integrate information from different dimensions to generate a more comprehensive and refined decision-making basis. For example, a linear weighted model can be used, which assigns a preset weight to each input dimension and then sums or multiplies these weighted values ​​to obtain the final fusion result; alternatively, a nonlinear fusion model can be used, such as one based on neural networks or fuzzy logic systems, to achieve more intelligent weighted fusion by learning the complex relationship between input dimensions and output results.

[0052] This application's solution overcomes the limitations of coarse allocation based solely on target / non-target features by introducing static importance coefficients and real-time signal quality coefficients, and utilizing a three-dimensional weighted fusion model to finely allocate computational resources. The three-dimensional weighted fusion model integrates this multi-dimensional information to calculate the proportion of computational resources each feature should occupy. This mechanism makes resource allocation more intelligent and dynamic. For example, even if a feature is identified as a target feature, if its current signal quality is poor, the allocated computational resources may be reduced accordingly to avoid ineffective processing of low-quality data; conversely, if a non-target feature exhibits high static importance or excellent signal quality in a specific scenario, its resource allocation proportion may be appropriately increased. This refined resource allocation strategy ensures that limited computational resources are prioritized for processing the most critical and reliable neural signal features for cognitive state recognition, thereby improving the effectiveness and efficiency of feature extraction and ultimately enhancing the accuracy of mobile devices in recognizing user cognitive states.

[0053] The following is a concrete example to illustrate this. When a mobile device processes multimodal neural signals from a target user, it first obtains a predefined list of neural signal features. This list includes neural signal features from different brain regions and their corresponding frequency bands, such as "prefrontal alpha waves" and "temporal theta waves." Assuming the current application scenario is a "learning scenario," based on preset associations, the system determines "prefrontal alpha waves" and "parietal P300 waves" as the target brain regions and frequency bands for this scenario. When allocating computational resources to these features, the system evaluates each feature in the list. For example, for the feature "prefrontal alpha waves," the system queries its static importance coefficient in the "learning scenario," which might be preset to 0.8, indicating that it contributes significantly to attention recognition in the learning scenario. Simultaneously, the system monitors the quality of the currently acquired "prefrontal alpha wave" signal in real time, for example, by calculating its signal-to-noise ratio and artifact ratio to obtain a real-time signal quality coefficient, assumed to be 0.7. Subsequently, these parameters (scene priority, static importance coefficient, and real-time signal quality coefficient) are input into a pre-trained three-dimensional weighted fusion model. This model integrates these inputs to calculate a comprehensive weight, thereby determining the proportion of computational resources that the "prefrontal alpha wave" feature should occupy at the current moment. Similarly, for non-target features such as the "temporal lobe theta wave," their static importance coefficient (which may be low, such as 0.3) and real-time signal quality coefficient (which may be 0.9) in the current application scenario are calculated, and the proportion of computational resources they should occupy is calculated using the three-dimensional weighted fusion model. In this way, even for target features, the final resource allocation is not fixed but dynamically adjusted according to their importance and signal quality, thereby achieving optimal allocation of computational resources.

[0054] Through the above technical solution, this application can dynamically and precisely calculate the proportion of computing resources that each neural signal feature should occupy based on its static importance and real-time signal quality in the current application scenario. This method avoids simply allocating computing resources roughly to target or non-target features, but instead achieves intelligent and adaptive allocation of computing resources. This refined resource management strategy helps improve the overall performance and robustness of mobile devices in recognizing the cognitive state of target users, especially in environments with large fluctuations in signal quality or complex and ever-changing scene characteristics.

[0055] This application further proposes calculating the proportion of computing resources that a feature should occupy based on its static importance coefficient and real-time signal quality coefficient in the current application scenario using a three-dimensional weighted fusion model, including: In the three-dimensional weighted fusion model, the comprehensive weight W of the i-th predefined neural signal is calculated according to the following formula 1. i : ; in, This is the scene priority coefficient. Let be the static importance coefficient of the i-th feature. Let be the real-time signal quality coefficient of the i-th feature. is the real-time signal quality coefficient corresponding to the Kth feature, and n is the total number of features in the current application scenario; Based on the comprehensive weight of the i-th predefined neural signal, the resource allocation ratio R is calculated according to the following formula 2: ; Wherein, γ is a pre-set weight adjustment factor.

[0056] The three-dimensional weighted fusion model is a multi-factor comprehensive evaluation mechanism designed to quantify the importance of each predefined neural signal feature by integrating information from multiple dimensions (such as scene priority, static feature importance, and real-time signal quality). Its implementation can be a mathematical function or algorithm module that receives multi-dimensional input and outputs a comprehensive weight value. For example, the model can be a linear weighting function or a non-linear decision tree or neural network structure for weight allocation in complex scenarios. The comprehensive weight W of the i-th predefined neural signal... i This represents the overall importance or priority of the i-th predefined neural signal feature in the current application scenario. Its calculation method is shown in Formula 1, which involves using a scenario priority coefficient... The static importance coefficient of the i-th feature The real-time signal quality coefficient of the i-th feature Perform a product and divide by the sum of similar products of all features to achieve normalization, ensuring that the sum of the combined weights of all features is 1. This is the scenario priority coefficient, which reflects the overall attention or importance of specific neural signal features in the current application scenario. For example, in a focus training scenario, the priority coefficients for brain regions and frequency bands related to focus can be set higher; while in a relaxation scenario, they may be set lower. The value range is typically between 0 and 1, and can be determined through preset values, user configuration, or dynamic adjustment based on historical data. Let be the static importance coefficient of the i-th feature. This coefficient represents the inherent importance or contribution of the i-th predefined neural signal feature in a specific application scenario. It is typically predetermined based on domain expert knowledge, large-scale dataset analysis, or offline training results. For example, in memory tasks, features associated with hippocampal theta waves may have a high static importance coefficient. This coefficient is usually a fixed value, reflecting the general value of the feature. Let be the real-time signal quality coefficient for the i-th feature. This coefficient reflects the data quality of the i-th predefined neural signal feature during real-time acquisition. Signal quality is affected by various factors, such as poor sensor contact, environmental noise, and artifact interference. A higher ... A value indicates good signal quality, while a lower value indicates good signal quality. The value indicates poor signal quality. The calculation can be based on metrics such as signal-to-noise ratio (SNR), artifact ratio, and signal stability. For example, Qi can be determined based on the weighted average of SNR and artifact ratio. n represents the total number of features in the current application scenario. This parameter indicates the total number of predefined neural signal features that the system is interested in or needs to process in the current application scenario. This number is dynamic and depends on the configuration and requirements of the current application scenario.

[0057] The resource allocation ratio R i This represents the proportion of total computing resources allocated to the i-th predefined neural signal feature. Its calculation method is shown in Formula 2, by using the comprehensive weight W... i Multiplying by the weight adjustment factor γ and adding a basic average allocation term (1-γ)×1 / n, this ensures that while prioritizing important features, it also provides a basic resource guarantee for all features. γ is a pre-set weight adjustment factor used to adjust the overall weight W. i In the final resource allocation ratio R i The influence of γ on resource allocation. The value of γ typically ranges from 0 to 1. When γ is close to 1, resource allocation will tend to favor features with higher overall weight; when γ is close to 0, resource allocation will tend to be more even. This factor allows the system to flexibly adjust its resource allocation strategy based on actual needs and performance objectives.

[0058] This application's solution introduces a three-dimensional weighted fusion model to achieve refined management of computational resource allocation for different neural signal features. Through this mechanism, mobile devices can intelligently adjust the allocation of computational resources based on the characteristics of the current application scenario and the real-time quality of the neural signals, concentrating more computational power on the most critical and reliable neural signal features for identifying the current cognitive state. This maximizes the effectiveness and accuracy of feature extraction within the limited computational resources of mobile devices.

[0059] As a specific implementation method, suppose that in a certain learning scenario, the system needs to process three predefined neural signal features: Feature 1 (prefrontal alpha wave), Feature 2 (parietal P300 wave), and Feature 3 (occipital beta wave). The total number of features n in the current application scenario is 3. First, determine the coefficients: scenario priority coefficient. It can be set to 0.8 to reflect the higher priority of attention-related features in the learning scenario. Based on offline analysis, the static importance of feature 1 (prefrontal alpha waves) is... 1 is 0.9, static importance of feature 2 (apical P300 wave) 2 is 0.7, static importance of feature 3 (occipital β wave) 3 is 0.5. Real-time monitoring shows that the signal quality of feature 1 is... 1 is 0.95, and the signal quality of feature 2 is... 2 is 0.8, and the signal quality of feature 3 is... 3 is 0.6. The preset weight adjustment factor γ is 0.7. Next, calculate the comprehensive weight Wi for each feature: the comprehensive weight W1 for feature 1 is (0.8 × 0.9 × 0.95) / [(0.8 × 0.9 × 0.95) + (0.8 × 0.7 × 0.8) + (0.8 × 0.5 × 0.6)] ≈ 0.4985; the comprehensive weight W2 for feature 2 is ≈ 0.3265; the comprehensive weight W3 for feature 3 is ≈ 0.1750. Then, calculate the resource allocation percentage Ri for each feature: Resource allocation percentage R1 for feature 1 = W1 × γ + (1 - γ) × (1 / n) ≈ 0.4985 × 0.7 + (1 - 0.7) × (1 / 3) ≈ 0.4489; Resource allocation percentage R2 for feature 2 ≈ 0.3265 × 0.7 + 0.3 × 0.3333 ≈ 0.3285; Resource allocation percentage R3 for feature 3 ≈ 0.1750 × 0.7 + 0.3 × 0.3333 ≈ 0.2225. Through the above calculations, the system can allocate computing resources according to these percentages R1, R2, and R3. For example, allocate approximately 44.89% of computing resources to feature 1, approximately 32.85% to feature 2, and approximately 22.25% to feature 3. This ensures that, in learning scenarios, prefrontal alpha wave features that are related to attention and have good signal quality can receive more computational resources for fine processing, thereby improving the accuracy of cognitive state recognition.

[0060] Through the above technical solution, this application can dynamically and finely allocate computing resources based on the priority of the current application scenario, the inherent importance of neural signal features, and real-time signal quality. This multi-dimensional weighted fusion computing method enables the system to accurately evaluate the value of each feature at a specific moment, avoiding the inefficiency caused by blind or average resource allocation. It not only optimizes the utilization efficiency of limited computing resources on mobile devices but also significantly improves the accuracy and robustness of identifying the cognitive state of target users in complex and ever-changing application scenarios.

[0061] In some embodiments described above in this application, a method for allocating resource ratios based on a comprehensive weight, where the comprehensive weight takes into account the real-time signal quality coefficient. However, in practical applications, the quality of real-time neural signals fluctuates significantly and is easily affected by noise and artifacts. If the calculation of the real-time signal quality coefficient is not precise enough or lacks effective constraints, it may lead to a decrease in the accuracy of resource allocation and affect the reliability of the final cognitive state recognition.

[0062] In response, this application further proposes a real-time signal quality coefficient. Limited to a preset minimum quality coefficient It is between 1 and 2, and is obtained according to a specific formula. Wherein, The value range is 0.5-0.7. Let be the real-time signal-to-noise ratio of the i-th feature. Let be the theoretical maximum signal-to-noise ratio for the i-th feature. This represents the percentage of artifacts in real time.

[0063] Real-time signal quality coefficient This is an indicator that measures the current quality of a specific neural signal feature, reflecting the reliability and availability of the signal. Its purpose is to ensure that high-quality signal features are prioritized when allocating computational resources, avoiding wasting resources on low-quality or contaminated signals. This coefficient can be comprehensively evaluated by analyzing various statistical indicators such as the signal's power spectral density, signal stability, and deviation from the baseline signal, or it can be used through a machine learning model, taking the original signal data as input and outputting a score representing the signal quality.

[0064] Preset minimum quality coefficient It is a pre-set threshold used to limit the lower limit of the real-time signal quality coefficient. Its function is to ensure that even under poor signal quality conditions, the real-time signal quality coefficient will not fall below an acceptable minimum value, thereby avoiding extreme deviations in the allocation of computing resources due to extremely low-quality signals. The value can be set based on empirical values, experimental data, or domain expert knowledge, such as 0.5, 0.6, or 0.7. Alternatively, it can be dynamically adjusted based on historical data or the current ambient noise level using an adaptive algorithm.

[0065] Theoretical maximum signal-to-noise ratio It refers to the maximum signal-to-noise ratio (SNR) achievable for a specific neural signal characteristic under ideal conditions. It serves as a normalization factor used to adjust the real-time SNR. Mapped to a relative quality range. It can be obtained through statistical analysis of baseline data collected in a noise-free or extremely low-noise environment, or it can be set according to the physical characteristics and theoretical limits of the sensor itself.

[0066] Real-time artifact percentage This refers to the proportion of interference signals caused by non-neural activity (such as electrooculography, electromyography, and motion artifacts) in a specific neural signal feature. Its function is to quantify the degree of artifacts in the signal; the higher the proportion of artifacts, the worse the signal quality. The artifact proportion can be identified and quantified using signal processing techniques such as Independent Component Analysis (ICA) and Principal Component Analysis (PCA). Alternatively, it can be calculated by using a pre-trained classifier to detect and classify artifacts in signal segments.

[0067] The solution in this application introduces a method for accurately calculating the real-time signal quality coefficient. This method ensures the accuracy and reliability of resource allocation. The method also incorporates real-time signal quality coefficients. Limited to a preset minimum quality coefficient Between 1 and 2, extreme resource allocation deviations caused by excessively low signal quality are avoided.

[0068] As a specific implementation method, in calculating the real-time signal quality coefficient At that time, a preset minimum quality coefficient can be set. The value is 0.6, meaning that even with extremely poor signal quality, its quality coefficient will not be lower than 0.6. Suppose that at a certain moment, for the i-th predefined neural signal feature, the real-time signal-to-noise ratio is obtained through real-time monitoring. It is 10dB, while the theoretical maximum signal-to-noise ratio for this feature is... The value was 20 dB. Simultaneously, the real-time artifact percentage of this feature was detected using artifact removal techniques such as Independent Component Analysis (ICA). It is 0.1 (i.e., 10%). According to the formula... = + (1 - ) × ( / ) × (1 - Substituting the values ​​above, we can calculate: Qi = 0.6 + (1 - 0.6) × (10 / 20) × (1 - 0.1) = 0.6 + 0.4 × 0.5 × 0.9 = 0.6 + 0.18 = 0.78. This calculated Qi value of 0.78 will be used as the real-time signal quality coefficient of the i-th feature, and will be used in the subsequent calculation of the comprehensive weight Wi.

[0069] Through the above technical solution, the real-time signal quality coefficient is improved. The calculations become more accurate and reliable. Limited to a preset minimum quality coefficient Between 1 and 1, resource allocation imbalance caused by excessive signal quality fluctuations or extreme situations is effectively avoided. Simultaneously, the real-time signal-to-noise ratio is comprehensively considered. and the proportion of real-time artifacts , making It can comprehensively reflect the clarity and purity of the signal. This improvement The computational method provides more accurate input for the subsequent comprehensive weights Wi, enabling computational resources to be allocated more rationally to high-quality, high-importance neural signal features. This significantly improves the accuracy and robustness of lightweight neural network models in identifying the cognitive state of target users in complex and ever-changing environments.

[0070] In other embodiments, this application proposes a brain-computer interface-based data processing method applied to a mobile device equipped with a lightweight neural network model and storing target brain regions associated with different application scenarios and their corresponding target frequency bands. However, in practical applications, due to the limited data volume of a single mobile device and significant individual differences among users, models trained solely on local data may suffer from insufficient generalization ability and difficulty adapting to the differences among different users. Furthermore, directly processing raw neural signal data centrally on a server may pose a risk of user privacy leakage, while relying entirely on local training makes it difficult to achieve continuous model optimization and personalized adaptation.

[0071] In response, this application further proposes a collaborative learning method for mobile devices and cloud servers, based on the above aspects, including: Step 401: The mobile device performs bandpass filtering, independent component analysis artifact removal, and differential privacy desensitization on the target user's multimodal neural signal to obtain a desensitized multimodal neural signal; and sends the desensitized multimodal neural signal to the server; Step 402: Receive the update parameters of the global model sent by the server. The global model has the same network structure as the lightweight neural network model. The update parameters of the global model are the global model parameters obtained by the server training the global model based on the de-identified data of multiple mobile devices. Step 403: Update the parameters of the lightweight neural network model mounted on the mobile device according to the global model parameters; Step 404: Obtain local calibration data, wherein the local calibration data is EEG neural signal calibration data collected for the target user; Step 405: Use the calibration data to adjust the parameters of the attention layer in the lightweight neural network model after parameter update and the classification layer in the lightweight classification network to obtain the personalized lightweight neural network model mounted on the mobile device.

[0072] The process involves bandpass filtering, independent component analysis (ICA) artifact removal, and differential privacy desensitization of the target user's multimodal neural signals to obtain desensitized multimodal neural signals. This step aims to remove high-frequency noise and low-frequency drift from the multimodal neural signals, retaining signal components within a specific frequency range relevant to cognitive activity. For example, digital filters such as Butterworth filters, Chebyshev filters, or elliptic filters can be used to process the signal according to a preset cutoff frequency, improving the signal-to-noise ratio and the accuracy of subsequent feature extraction. This step also separates physiological artifacts unrelated to brain activity (such as electrooculography, electromyography, and electrocardiography) from the real neural signals in the multimodal neural signals. For example, Fast Independent Component Analysis (FastICA) or Principal Component Analysis (PCA) combined with ICA can be used to decompose the mixed signal into statistically independent components, and the neural signals are purified by identifying and removing artifact components. This step aims to protect user privacy by adding carefully designed noise to the multimodal neural signals, making it difficult to deduce the original user's information from the desensitized data, while preserving the statistical characteristics and usability of the data as much as possible. For example, a Laplace or Gaussian mechanism can be used to inject random noise into the signal according to a preset privacy budget ε and δ, thus satisfying the strict mathematical definition of differential privacy. After the above processing, the desensitized multimodal neural signal retains the key information for cognitive state recognition while blurring the individual characteristics of the original data to a certain extent, reducing the risk of privacy leakage.

[0073] The process of receiving updated parameters for the global model from the server enables mobile devices to access the global model information trained on the server. After receiving anonymized data uploaded from multiple mobile devices, the server aggregates and trains the data to generate a more generalizable global model. Mobile devices receive these updated parameters through a network interface, for example, by exchanging data via HTTP / HTTPS or a custom communication protocol.

[0074] The global model has the same network structure as the lightweight neural network model. This constraint ensures that the global model trained on the server side is architecturally compatible with the lightweight neural network model natively mounted on the mobile device. This means that the parameters of the global model can be directly applied to the local model without complex structural transformations, thus simplifying the model update process. The update parameters of the global model are obtained by the server training the global model using anonymized data from multiple mobile devices, clarifying the source and generation method of the global model update parameters. The server uses distributed learning paradigms such as federated learning to train the model using anonymized data from multiple mobile devices, aggregating the local model updates from each terminal, thereby obtaining global model parameters trained on a larger dataset with better generalization ability.

[0075] The mobile device updates the parameters of the lightweight neural network model mounted on the mobile device based on the global model parameters, integrating the global knowledge learned on the server side into the local model to improve the performance and generalization ability of the local model. After receiving the global model parameters, the mobile device uses these parameters to replace or merge the corresponding parameters of the local model, for example, by means of direct replacement, weighted averaging, or difference updates.

[0076] Local calibration data is typically collected in a controlled environment and reflects the neurophysiological response of the target user under the target cognitive task. The local calibration data refers to EEG neural signal calibration data collected specifically for the target user. This definition further clarifies the type and source of the calibration data, namely, EEG signal data specifically collected for the current target user. This data may include baseline data of the user in a resting state, as well as EEG response data when performing the target cognitive task (such as focus, memory, motor imagery, etc.).

[0077] The step of adjusting the parameters of the attention layer and the classification layer of the lightweight classification network in the updated lightweight neural network model using the calibration data is crucial for achieving model personalization. After receiving global updates, the model already possesses good generalization ability, but still needs fine-tuning for individual differences. By using local calibration data, adjusting the parameters only of the attention layer and classification layer most relevant to personalized feature recognition can efficiently adapt the model to the unique neural signal patterns of the target user without retraining the entire model. For example, optimization algorithms such as Mini-batch Gradient Descent or the Adam optimizer can be used to iteratively update the parameters of these specific layers with a small learning rate. This results in a personalized lightweight neural network model mounted on the mobile device. After the aforementioned local calibration and adjustment, the lightweight neural network model on the mobile device can better adapt to the individual characteristics of the target user, thus exhibiting higher accuracy and robustness in recognizing the user's cognitive state.

[0078] The following is a concrete example. After obtaining the multimodal neural signals of the target user, the mobile device can first perform bandpass filtering using a digital signal processor (DSP). For example, a 4th-order Butterworth filter can be used to limit the frequency range of the EEG signal to between 0.5Hz and 45Hz, and the frequency range of the fNIRS signal to between 0.1Hz and 2Hz. Subsequently, the FastICA algorithm running on the embedded processor is used to remove artifacts from the filtered signal, identifying and separating interference components such as electrooculography (EOG) and electromyography (EMG). Next, before data transmission, differential privacy desensitization is achieved by adding Laplace noise to the signal, ensuring that each data point is statistically difficult to infer the original value from. For example, a privacy budget ε is set to 1.0. The desensitized multimodal neural signals are sent to the cloud server via the encrypted MQTT protocol. After receiving the desensitized data from multiple mobile devices, the server uses the Federated Averaging (FedAvg) algorithm to train the global model, aggregating the model gradients or parameters uploaded by each terminal. After training, the server sends the latest global model parameters to the mobile device via an encrypted HTTPS connection. Upon receiving these parameters, the mobile device directly replaces the corresponding parameters in its local lightweight neural network model. To achieve personalization, the mobile device prompts the user to perform local calibration. For example, the user wears a brain-computer interface device and performs 5 minutes of resting-state data collection in a quiet environment, and 1 minute of attention task data collection while a specific image is displayed on the screen. This collected EEG neural signal calibration data, after local preprocessing, is used to train the attention and classification layers of the updated lightweight neural network model using mini-batch gradient descent (SGD). The learning rate can be set to 0.001, iterating for 10 epochs until the model achieves a classification accuracy of over 90% on the local calibration dataset. Ultimately, the mobile device carries a lightweight neural network model that possesses both global generalization capabilities and high personalization.

[0079] Through the above technical solution, this application effectively addresses the problems of insufficient generalization ability, privacy leakage risks, and difficulties in personalized adaptation faced by mobile devices in cognitive state recognition. By utilizing local calibration data to personalize the attention and classification layers in the model, the model can accurately capture the individual neurophysiological characteristics of the target user, thereby greatly improving the accuracy and personalization of cognitive state recognition. This strategy, combining global learning and local personalization, achieves high efficiency, accuracy, and adaptability of the cognitive state recognition model on mobile devices while protecting user privacy.

[0080] In some of the embodiments described above in this application, a lightweight neural network model mounted on a mobile device is updated by receiving global model update parameters from a server, and the model is then personalized using local calibration data. However, in practical applications, how to efficiently and accurately acquire high-quality local calibration data, and how to use this data to fine-tune the model to ensure the recognition accuracy and robustness of the personalized model, remains a technical problem that needs to be solved.

[0081] This application further proposes methods for obtaining local calibration data, including: The baselines of α, θ, and β waves of the target user in the resting state, as well as the EEG and functional near-infrared spectral (fNIRS) response features of the target cognitive task, wherein the target cognitive task includes at least one or more of the following: attention task response, memory recall response, and motor imagery response, and the response features include attention-related α / β waves, memory-related temporal lobe θ waves and blood oxygenation changes, and motor imagery-related μ wave desynchronization features; The parameters of the attention layer in the lightweight neural network model and the classification layer in the lightweight classification network are adjusted using the calibration data after parameter updates. This includes filtering, artifact removal, feature extraction, and normalization of the collected local calibration data. Using the processed local calibration data, the parameters of the attention layer in the lightweight neural network model and the classification layer in the lightweight classification network are adjusted iteratively using the stochastic gradient descent algorithm. Test the feature recognition accuracy until the recognition accuracy reaches the preset accuracy threshold.

[0082] The resting-state baseline refers to the brain electrophysiological activity pattern of a target user in a relaxed, goalless cognitive task state. It reflects the individual brain's inherent rhythms and activation levels, providing an individualized reference standard for subsequent cognitive task response analysis. The resting-state baseline can be obtained by having the user remain relaxed with their eyes closed or open for a specific time period while simultaneously recording their EEG signals. Targeted cognitive tasks aim to induce neural activity in the target user's brain under specific cognitive states, thereby obtaining response characteristics with clear physiological significance associated with these states. These tasks can be standardized psychological experimental paradigms, such as sustained task tasks for assessing attention or N-back tasks for assessing memory. Focused task response refers to the changes in neural signals produced by the brain when the target user performs a task requiring focused attention. For example, when a user completes a visual or auditory target detection task, their EEG and blood oxygenation signals will exhibit specific patterns related to attention. Memory recall response refers to the changes in neural signals produced by the brain when the target user performs memory encoding, storage, or retrieval activities. For example, when a user recalls specific information or images, specific theta wave activity may appear in the temporal lobe region of their brain, accompanied by changes in blood oxygen concentration. Motor imagery response refers to the changes in neural signals generated in the motor cortex of the brain when a target user imagines an action without actually performing it. For example, when a user imagines moving their hand, μ waves in the sensorimotor cortex may show desynchronization. Response characteristics include attention-related alpha / beta waves, memory-related temporal lobe theta waves and changes in blood oxygenation, and desynchronization features of μ waves related to motor imagery. Alpha waves (8-13 Hz) and beta waves (13-30 Hz) are the main rhythms in EEG signals, and they are closely related to the brain's attentional state and alertness. For example, during concentration, the power of alpha waves in specific brain regions may decrease (desynchronization), while the power of beta waves may increase. Theta waves (4-8 Hz) play an important role in memory encoding and retrieval, especially in the temporal lobe and hippocampus. Functional near-infrared spectroscopy (fNIRS) can detect changes in local blood oxygenation related to neural activity, providing hemodynamic indicators for memory activities. μ waves (8-12 Hz) mainly appear in the sensorimotor cortex; their power significantly decreases when an individual performs or imagines movement—a phenomenon known as desynchronization, an important neural marker of motor intention. Electroencephalography (EEG) signals have high temporal resolution, reflecting real-time electrophysiological activity of the brain; fNIRS signals have high spatial resolution, reflecting hemodynamic changes in the cerebral cortex and are closely related to neuronal activity. The combination of these two signals can provide more comprehensive and accurate information on neural activity for personalized calibration.

[0083] The collected local calibration data undergoes filtering, artifact removal, feature extraction, and normalization to ensure data quality and usability. Filtering removes noise and interference unrelated to the target neural activity from the raw neural signals, such as power line interference and high-frequency noise. Common filtering methods include bandpass filtering (preserving signals within a specific frequency range) and notch filtering (removing interference at specific frequencies). Artifacts refer to non-brain-derived physiological signals or external interference, such as electrooculography (EOG), electromyography (EMG), electrocardiography (ECG), and motion artifacts. Artifact removal aims to separate and eliminate these interferences from the neural signals to improve signal purity. Common artifact removal techniques include independent component analysis (ICA), wavelet transform, or template matching-based methods. Feature extraction extracts key information representing brain states from preprocessed neural signals based on specific physiological or cognitive significance. For example, time-domain features (such as signal mean and variance), frequency-domain features (such as power spectral density and band energy in different frequency bands), or time-frequency features (such as wavelet coefficients) can be extracted. Normalization aims to eliminate dimensional and magnitude differences between different individuals or between data collected from different time points of the same individual, making the data comparable and thus improving the stability and generalization ability of model training. Commonly used normalization methods include Z-score normalization (converting data into a distribution with a mean of 0 and a standard deviation of 1) or Min-Max normalization (scaling data to a specific range, such as [0, 1]).

[0084] Using processed local calibration data, the stochastic gradient descent algorithm is employed iteratively to adjust the parameters of the attention layer and the classification layer of a lightweight neural network model, aiming to efficiently personalize the model. Stochastic gradient descent is a commonly used optimization algorithm to minimize the loss function during neural network training. It calculates the gradient of the loss function with respect to the model parameters and updates the parameters in the opposite direction of the gradient to gradually find the optimal solution. Iteration refers to repeatedly executing a series of computational steps, updating the model parameters based on the previous result in each iteration, until a stopping condition is met. For example, the number of iterations can be set to 50 epochs, and after each epoch, a portion of the calibration data is used as a validation set to test the model's feature recognition accuracy. If the recognition accuracy reaches a preset 90% threshold, the iteration stops, and the current model parameters are saved as a personalized model. This approach allows the model to gradually learn and adapt to the features of the local calibration data. This targeted parameter adjustment strategy aims to efficiently personalize the model. The attention layer is responsible for assigning weights to different feature channels according to the current application scenario, directly affecting the model's focus on key information; the classification layer is responsible for making the final cognitive state recognition based on the weighted features. By adjusting only these two parameters, the model can quickly and accurately adapt to the individual differences of the target users while keeping the main structure and general knowledge unchanged, and at the same time significantly reducing the consumption of computing resources.

[0085] The feature recognition accuracy is tested until it reaches a preset accuracy threshold, aiming to ensure that the personalized model achieves the expected performance level. This can be achieved by calculating metrics such as classification accuracy, precision, recall, or F1 score. The preset accuracy threshold is a pre-defined performance standard; when the model's recognition accuracy reaches or exceeds this threshold, it indicates that the model has sufficiently adapted to the individual characteristics of the target user, and the iterative adjustment process can be stopped. This ensures that the personalized model meets the needs of practical applications.

[0086] The solution proposed in this application addresses the challenges faced by mobile devices in personalized cognitive state recognition by systematically acquiring high-quality local calibration data and employing a refined model adjustment strategy.

[0087] By combining the aforementioned global model update and local calibration mechanisms, this solution effectively balances the model's universality and personalized needs, enabling mobile devices to leverage the advantages of federated learning to acquire universal knowledge and achieve deep adaptation to individual users through local fine-tuning calibration. Ultimately, it provides highly accurate and personalized cognitive state recognition services, significantly improving user experience and system usability.

[0088] In some of the embodiments described above in this application, a method for identifying the cognitive state of a target user based on multimodal neural signals is proposed. However, in its implementation, simply identifying the cognitive state may not be sufficient to provide immediate and effective user support or environmental optimization.

[0089] In response, this application further proposes to trigger the corresponding intervention action of the mobile device based on the identified cognitive state.

[0090] The "identified cognitive state" refers to the judgment result about the target user's current psychological or physiological state obtained after processing multimodal neural signals through the aforementioned lightweight neural network model. These cognitive states may include, but are not limited to, focus, fatigue, stress, relaxation, and excitement. The "trigger" refers to the system automatically or semi-automatically activating a function, performing an operation, or issuing a command according to preset rules or logic. The "intervention action corresponding to the mobile device" refers to a specific behavior performed by the mobile device that aims to influence or respond to the user's current cognitive state. These intervention actions can be diverse, such as adjusting the mobile device's display brightness, volume, and notification settings, playing specific types of audio or video content, launching specific applications, or providing suggestions or reminders to the user.

[0091] This application's solution constructs a closed-loop intelligent feedback system by combining the identification of cognitive states with actual intervention actions. When a mobile device successfully identifies a target user's specific cognitive state, this identification result serves as a trigger to initiate pre-set intervention actions. For example, if the system detects that the user is in a highly focused state, it can trigger a do-not-disturb mode to reduce distractions; if it detects that the user is fatigued, it can trigger a rest reminder or play soothing music. This mechanism ensures that the identification of cognitive states is not merely a result of data analysis, but can be directly transformed into practical actions beneficial to the user, thereby achieving real-time optimization and personalized support for the user experience. In this way, mobile devices can dynamically adjust their behavior based on the user's internal state, providing more intelligent and humanized services.

[0092] Let's illustrate this with a concrete example. Suppose a mobile device recognizes that the target user is currently in a state of "stress." At this point, the mobile device can trigger a series of interventions. For example, the device can automatically reduce screen brightness and mute or vibrate notifications to minimize external stimuli. Simultaneously, it can automatically play a preset soothing piece of music or guided meditation audio and vibrate to remind the user to practice deep breathing. Furthermore, the device can display a suggestion on the screen, such as "You seem to be under some stress; we suggest taking a short break or engaging in relaxation activities." This combination of interventions aims to help the user relieve stress and regain calm.

[0093] Through the aforementioned technical solutions, mobile devices can proactively trigger corresponding intervention actions based on the identified cognitive state, thereby transforming the abstract cognitive state recognition results into concrete actions beneficial to the user. This not only enhances the intelligence level of mobile devices, enabling them to understand user needs more deeply, but also effectively improves the user experience in different scenarios through real-time and personalized interventions, such as increasing focus, relieving fatigue or stress, and thus enhancing the practicality and effectiveness of user interaction with mobile devices.

[0094] Furthermore, this application further proposes the correlation between target brain regions and corresponding target frequency bands associated with the different application scenarios, including: the target brain regions and frequency bands corresponding to the learning scenario are: prefrontal alpha waves and parietal P300 waves; the target brain regions and frequency bands corresponding to the office scenario are: prefrontal theta waves, hippocampal theta waves, and occipital beta waves; and the target brain regions and frequency bands corresponding to the family scenario are: temporal theta waves and motor cortex μ waves.

[0095] The statement "The target brain regions and frequency bands corresponding to the learning scenario are: prefrontal alpha waves and parietal P300 waves" clarifies that when a user is in a learning context, the system should focus on alpha wave activity in the prefrontal region and P300 event-related potentials in the parietal region. Prefrontal alpha waves are typically associated with attentional focus and inhibition of irrelevant information, while P300 waves are closely related to higher cognitive functions such as cognitive evaluation, decision-making, and memory updating. By focusing on these features, attention span, information processing depth, and memory encoding efficiency during the learning process can be assessed more effectively. Specifically, in the feature extraction stage, filter banks can be designed to specifically extract the 8-12Hz (alpha wave) frequency band energy of prefrontal electrodes (such as Fp1, Fp2, Fz, etc.) and the P300 amplitude and latency of parietal electrodes (such as Pz, P3, P4, etc.) after specific stimuli (such as the presentation of learning materials).

[0096] The definition of "target brain regions and frequency bands corresponding to office scenarios as: prefrontal theta waves, hippocampal theta waves, and occipital beta waves" specifies that the system should focus on theta waves in the prefrontal and hippocampal regions, as well as beta waves in the occipital lobe during office work. Prefrontal theta waves are associated with working memory, cognitive control, and task switching; hippocampal theta waves are associated with memory encoding and retrieval, and spatial navigation; while occipital beta waves may be associated with visual information processing and alertness. These characteristics help assess a user's working memory load, decision-making efficiency, and visual attention during office tasks. Specifically, power spectral densities of 4-8 Hz (theta waves) and 13-30 Hz (beta waves) can be extracted by performing spectral analysis on EEG signals from the prefrontal lobe (e.g., Fz, Fp1 / 2), temporal lobe (e.g., T7 / 8, indirectly reflecting hippocampal activity), and occipital lobe (e.g., Oz, O1 / 2).

[0097] The definition of "target brain regions and frequency bands corresponding to the home setting: temporal lobe theta waves and motor cortex μ waves" serves to define the areas the system should focus on for theta waves in the temporal lobe and μ waves in the motor cortex within a home context. Temporal lobe theta waves may be associated with emotion processing, social interaction, and episodic memory, while desynchronization of motor cortex μ waves (8-13 Hz) is typically associated with motor readiness or motor imagery. These characteristics help assess a user's emotional state, level of relaxation, or potential motor intentions (such as controlling smart home devices) in a home environment. For example, desynchronization can be detected by analyzing theta waves (4-8 Hz) from EEG signals from temporal lobe electrodes (such as T7 and T8) and by performing power spectral analysis on μ waves (8-13 Hz) from motor cortex electrodes (such as C3, Cz, and C4).

[0098] Furthermore, when the spatiotemporal features are input into the attention layer of the lightweight neural network model, based on the current application scenario, first attention weights are assigned to feature channels of target brain regions and target frequency bands associated with the current application scenario in the spatiotemporal features, and second attention weights are assigned to other feature channels. By explicitly specifying these associations, the attention mechanism can more accurately identify which feature channels are most important in the current application scenario, thereby avoiding the dispersion of computational resources and attention on irrelevant neural signals. For example, in an office scenario, the system will assign higher weights to feature channels corresponding to prefrontal theta waves, hippocampal theta waves, and occipital beta waves, ensuring that this key information dominates in cognitive state recognition. This mechanism ensures that on resource-constrained mobile devices, computational resources can be efficiently allocated to the most informative neural signal features, thereby optimizing the performance of feature extraction and cognitive state recognition.

[0099] It should be noted that the data used for training the global model in this application is data for which informed consent has been signed and the data has been anonymized for use in model training and optimization. This data does not contain personally identifiable information and does not raise any privacy issues. Furthermore, the user information involved in this application can be information authorized by the user or fully authorized by all parties.

[0100] In other embodiments, this application proposes a mobile device 1000, see appendix. Figure 3 The schematic diagram of the mobile device shown includes a memory 1002 and a processor 1001. The memory stores a computer program that can run on the processor, and when the processor executes the computer program, it implements the steps of the above-described method.

[0101] The processor 1001 can be a general-purpose processor or a dedicated processor. For example, the processor 1001 may include a baseband processor or a central processing unit (CPU). The baseband processor can be used to process communication protocols and communication data. The CPU can be used to control the mobile device 1000, execute software programs, and / or process data. Different processors can be independent devices or can be integrated into one or more processing circuits, for example, integrated onto one or more application-specific integrated circuits (ASICs). In one embodiment, memory 1002 stores instructions that can be executed by at least one processor 1001. At least one processor 1001 implements the functions of the aforementioned mobile device by executing the instructions stored in memory 1002, and correspondingly, can also implement the steps performed by the aforementioned mobile device. Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform any of the methods described above. In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or as a combination of hardware and software modules within the 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. This storage medium is located in memory, and the processor executes the instructions in the memory, combining them with its hardware to complete the steps of the above method. To avoid repetition, detailed descriptions are omitted here.

[0102] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0103] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

Claims

1. A data processing method based on a brain-computer interface, characterized in that, Applied to mobile devices, the mobile devices are equipped with lightweight neural network models and store target brain regions and corresponding target frequency band associations associated with different application scenarios. The method includes: The target user's multimodal neural signals are obtained, including electroencephalogram (EEG) signals and functional near-infrared spectroscopy (fNIRS) signals, wherein the EEG signals and fNIRS signals carry timestamps. The EEG signal and the fNIRS signal are aligned based on the timestamp, and the aligned EEG signal and fNIRS signal are fused to obtain a fused multimodal neural signal data matrix; Obtain the current application scenario and the proportion of computing resources required to extract features from the multimodal neural signal data matrix; The multimodal neural signal data matrix is ​​input into the spatiotemporal separation convolutional layer of the lightweight neural network model. Based on the current application scenario and the proportion of computing resources required to extract the features of the multimodal neural signal data matrix, spatiotemporal features corresponding to the current application scenario are calculated. The spatiotemporal features refer to vector or matrix representations with semantics of brain region activation relationships and rhythmic change patterns obtained after extraction by spatial convolution and temporal convolution. The spatiotemporal features are input into the attention layer of the lightweight neural network model. Based on the current application scenario, a first attention weight is assigned to the feature channels of the target brain region and target frequency band associated with the current application scenario in the spatiotemporal features, and a second attention weight is assigned to other feature channels to obtain weighted scenario-based features, wherein the first attention weight is greater than the second attention weight. The contextual features are input into the lightweight classification network in the lightweight neural network model to identify the cognitive state of the target user.

2. The method according to claim 1, characterized in that, The lightweight neural network model includes a spatial convolutional layer and a temporal convolutional layer, which are connected in series. The spatial convolutional layer extracts spatial activation features between different brain regions, and the temporal convolutional layer extracts the fluctuation features of EEG rhythm over time. The spatial convolutional layer uses a two-dimensional convolutional kernel, and the temporal convolutional layer uses a one-dimensional convolutional kernel.

3. The method according to claim 1, characterized in that, The proportion of computational resources required to obtain the features for extracting the multimodal neural signal data matrix includes: Obtain a predefined list of neural signal features, which includes neural signal features of different brain regions and their corresponding frequency bands; Based on the current application scenario and the correlation, the target brain region and its corresponding target frequency band corresponding to the current application scenario are determined in the list; For each predefined neural signal feature in the list, a proportion of computing resources required to extract each predefined neural signal feature is allocated, wherein a first computing resource proportion is greater than a second computing resource proportion. The first computing resource proportion is the proportion of computing resources allocated to extracting features of the target brain region and its corresponding target frequency band, and the second computing resource proportion is the proportion of computing resources allocated to extracting features of non-target brain regions and their corresponding target frequency bands.

4. The method according to claim 3, characterized in that, The allocation of computational resources required to extract each predefined neural signal feature in the list includes: For each predefined neural signal feature in the list, the proportion of computing resources that the feature should occupy is calculated using a three-dimensional weighted fusion model based on its static importance coefficient and real-time signal quality coefficient in the current application scenario.

5. The method according to claim 4, characterized in that, The step of calculating the proportion of computing resources that the feature should occupy based on its static importance coefficient and real-time signal quality coefficient in the current application scenario through a three-dimensional weighted fusion model includes: In the three-dimensional weighted fusion model, the comprehensive weight of the i-th predefined neural signal is calculated according to the following formula. : ; in, This is the scene priority coefficient. Let be the static importance coefficient of the i-th feature. Let be the real-time signal quality coefficient of the i-th feature, and n be the total number of features in the current application scenario. This represents the real-time signal quality coefficient corresponding to the Kth feature; Based on the comprehensive weight of the i-th predefined neural signal, the resource allocation ratio is calculated according to the following formula. : ; in, γ The pre-set weight adjustment factor.

6. The method according to claim 5, characterized in that, The real-time signal quality coefficient Limited to a preset minimum quality coefficient The value between 1 and 1 is obtained using the following formula: ; in, The value range is 0.5-0.

7. Let be the real-time signal-to-noise ratio of the i-th feature. Let be the theoretical maximum signal-to-noise ratio for the i-th feature. This represents the percentage of artifacts in real time.

7. The method according to claim 1, characterized in that, The method further includes: The desensitized multimodal neural signals of the target user are obtained by performing bandpass filtering, independent component analysis artifact removal, and differential privacy desensitization on the multimodal neural signals of the target user. The desensitized multimodal neural signals are sent to the server; The server receives update parameters for the global model, which has the same network structure as the lightweight neural network model. The update parameters for the global model are global model parameters obtained by the server training the global model based on de-identified data from multiple mobile devices. The parameters of the lightweight neural network model mounted on the mobile device are updated based on the global model parameters; Obtain local calibration data, which is EEG neural signal calibration data collected for the target user; The parameters of the attention layer and the classification layer of the lightweight classification network in the updated lightweight neural network model are adjusted using the local calibration data to obtain the personalized lightweight neural network model mounted on the mobile device.

8. The method according to claim 7, characterized in that: The process of obtaining local calibration data includes: The baselines of α, θ, and β waves of the target user in the resting state, as well as the EEG and functional near-infrared spectral (fNIRS) response features of the target cognitive task, wherein the target cognitive task includes at least one or more of the following: attention task response, memory recall response, and motor imagery response, and the response features include attention-related α / β waves, memory-related temporal lobe θ waves and blood oxygenation changes, and motor imagery-related μ wave desynchronization features; The step of adjusting the parameters of the attention layer in the lightweight neural network model and the classification layer of the lightweight classification network using the calibration data includes: The collected local calibration data is then filtered, artifacts are removed, features are extracted, and normalized. Using the processed local calibration data, the parameters of the attention layer and the classification layer of the lightweight neural network model are adjusted iteratively using the stochastic gradient descent algorithm. Test the feature recognition accuracy until the recognition accuracy reaches the preset accuracy threshold.

9. The method according to any one of claims 1-7, characterized in that, The association relationships between target brain regions and corresponding target frequency bands in different application scenarios include: Learning scenarios: prefrontal alpha wave, parietal P300 wave; Office environment: prefrontal theta waves, hippocampal theta waves, occipital beta waves; Family setting: temporal lobe theta wave, motor cortex μ wave.

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