Federal learning-based cross-device brain grain model training system and method

By employing a three-layer architecture based on federated learning and multi-dimensional optimization techniques, the problems of privacy leakage, hardware differences, and low efficiency of asynchronous collaboration in brain pattern recognition model training are solved, enabling efficient cross-device model training and deployment, and improving the model's practicality and privacy protection.

CN121301872APending Publication Date: 2026-01-09BEIJING LIANDING TECHNOLOGY CO LTD

Patent Information

Application Number
CN202511291397.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2026-01-09

AI Technical Summary

Technical Problem

Existing brainprint recognition model training suffers from privacy risks, decreased model generalization ability due to differences in hardware performance and signal quality, coarse dynamic weight allocation in federated learning schemes, low efficiency of asynchronous collaboration, and difficulties in cross-device knowledge transfer.

Method used

A three-layer federated architecture is adopted. The terminal device layer performs local lightweight training and uploads encrypted model updates, the edge coordination layer performs regional model aggregation, and the central server layer performs global optimization. It combines dynamic weight allocation, asynchronous federated learning and federated transfer learning, uses differential privacy and homomorphic encryption technology to protect privacy, and optimizes model deployment through knowledge distillation and model compression.

Benefits of technology

It significantly improves the model's privacy protection and generalization capabilities, shortens the cold start time on new devices, and enhances the model's usability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121301872A_ABST
    Figure CN121301872A_ABST
Patent Text Reader

Abstract

The invention discloses a federal learning-based cross-device brain grain model training system. The system comprises a terminal device layer, an edge coordination layer and a central server layer, the terminal equipment layer is responsible for collecting original electroencephalogram data and executing local lightweight training; the edge coordination layer is used for aggregating model updates of a plurality of terminal devices in the jurisdiction to generate a regionalized sub-model; according to the central server layer, a central server performs secondary optimization on each regional model to generate a global unified model; the encrypted global model and strategy configuration are pushed to all edge coordination layers; and the edge coordination layer pushes the optimized model and strategy to terminal equipment. Through a three-layer federated architecture and multi-dimensional optimization, the system efficiency is remarkably improved: the terminal equipment only uploads an encrypted model increment, and source data protection is realized in combination with differential privacy and homomorphic encryption; federal transfer learning shortens the cold start time of new equipment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of brain-computer interface, and particularly relates to a cross-device brainprint model training system and method based on federated learning. BACKGROUND

[0002] The current brainprint recognition as a new direction of biometric authentication, its model training highly depends on the electroencephalogram (EEG) data collected by multiple devices. The traditional method adopts centralized training, which needs to upload the original EEG data to the central server, and there is a risk of privacy leakage. The EEG data contains sensitive physiological information, and the centralized transmission is easy to be stolen or misused. In addition, the hardware performance and signal quality of different terminal devices (such as head ring and portable EEG instrument) are greatly different, which leads to the decline of model generalization ability. Although federated learning alleviates the privacy problem through local training, the existing scheme still has the problems of rough dynamic weight allocation, low asynchronous collaboration efficiency, and difficult cross-device knowledge transfer, which restricts the model accuracy and practicability. SUMMARY

[0003] Therefore, the present application provides a cross-device brainprint model training system and method based on federated learning to solve the problems in the prior art.

[0004] In order to achieve the above purpose, the present application provides the following technical scheme:

[0005] A cross-device brainprint model training system based on federated learning, comprising a terminal device layer, an edge coordination layer and a central server layer;

[0006] The terminal device layer is responsible for collecting original electroencephalogram data and performing local lightweight training. After the terminal device completes the local training, only the incremental update of the model parameters is uploaded. The terminal device sends the encrypted model update and metadata to the edge coordination layer to which it belongs;

[0007] The edge coordination layer aggregates the model updates of multiple terminal devices in the jurisdiction to generate a regional sub-model. The edge coordination layer sends the encrypted regional model and statistical information to the central server layer;

[0008] The central server layer performs secondary optimization on each regional model to generate a global unified model. And the encrypted global model and strategy configuration are pushed to all edge coordination layers;

[0009] The edge coordination layer converts the global model issued by the central server into a lightweight version adapted to the terminal device. And the optimized model and strategy are pushed to the terminal device.

[0010] Further, the terminal device of the terminal device layer includes a smart headband and a portable EEG collector. The terminal device can collect multi-modal data and perform real-time preprocessing on the collected data.

[0011] Further, a lightweight feature extraction network is deployed in the terminal device. The network focuses on the brain region activity related to cognitive tasks through a spatio-temporal attention mechanism and outputs a fixed-dimension brainprint feature vector.

[0012] The terminal device includes a set of federated training clients. The federated training clients run a customized federated learning framework, support asynchronous training and gradient compression, and integrate differential privacy training to prevent member inference attacks through gradient clipping and noise injection. The sensitive parameters are encrypted and transmitted using homomorphic encryption technology.

[0013] Further, each edge server is responsible for coordinating the collaborative training of multiple terminal devices in its jurisdiction. The main functions of the edge server include dynamic group management, hierarchical federated aggregation, model conflict detection and repair, lightweight model conversion, and security audit middleware.

[0014] Further, the federated learning algorithm is optimized, including a dynamic weight allocation strategy, asynchronous federated learning optimization, and federated transfer learning expansion. The dynamic weight allocation strategy dynamically adjusts the weight of each device in global aggregation based on data quality, training stability, and contribution. The asynchronous federated learning optimization allows devices to submit model updates at different time points and uses a buffer pool mechanism to mitigate the impact of network latency. The federated transfer learning expansion supports the rapid fine-tuning of pre-trained models on new devices, reducing the cold start time.

[0015] Further, the calculation formula of the dynamic weight allocation is as follows:

[0016] w i =Softmax(k1·α i +k2·β i +k3·γ i );

[0017] where w i is the aggregation weight of device i, α i is the data quality factor, β i is the training stability factor, γ i is the contribution factor, k1, k2, and k3 are hyperparameters, and Softmax(·) is a normalization function.

[0018] The calculation formula of the data quality factor is as follows:

[0019]

[0020] where SNRi SNR is the signal-to-noise ratio of the current collected signal of device i; max(SNR) is the maximum value of the signal-to-noise ratio of all devices, used for normalization;

[0021] The calculation formula of the training stability factor is:

[0022]

[0023] wherein, is the standard deviation of the loss curve when device i is locally trained; max(σ loss ) is the maximum value of the loss standard deviation of all devices; the smaller the loss fluctuation (the lower σloss is), the closer βi is to 1, and the higher the weight is;

[0024] The calculation formula of the contribution factor is:

[0025]

[0026] wherein, c i is the number of effective model updates uploaded by device i in total; the denominator is the total contribution number of all devices, to ensure that ∑γ i = 1.

[0027] Further, the calculation formula of the model parameter after global aggregation of the asynchronous federated learning optimization is:

[0028]

[0029] wherein, θ global is the model parameter after global aggregation, obtained by weighted average of the model updates of multiple devices in the buffer pool; θ j is the model parameter submitted by device j, the model parameter after local training; w j is the aggregation weight of device j; n j is the sample size used by device j for this training; and m is the number of devices in the buffer pool currently to be aggregated, the number of devices actually participating in this aggregation.

[0030] Further, the calculation formula of the total loss function of the federated transfer learning extension is:

[0031]

[0032] wherein, L task is the task-specific loss (such as cross-entropy), which measures the performance of the model on local data; λ is a regularization strength hyperparameter, which controls the penalty strength of the difference between the pre-trained parameters and the new parameters; Θ new is the model parameter after fine-tuning, the parameter updated by local training of the new device; Θ0 is the pre-trained model parameter; is the square of the L2 norm.

[0033] Further: the pre-trained base model of the central server can capture the common brainprint features across devices; after the new device loads the pre-trained base model, only the last several layers are trained, and the remaining layers are frozen to retain the general features.

[0034] To achieve the above purpose, the application also provides a cross-device brainprint model training method based on federated learning, comprising the following steps:

[0035] S1. System initialization and device registration, the central server builds a federated learning platform and defines the base model architecture, then each edge device registers with the server, synchronizes the device computing capability meta information to support subsequent differentiated task allocation;

[0036] S2. Enter the data collection and local preprocessing stage, each device independently collects multi-channel electroencephalogram signals and their corresponding subject identifiers to form a local dataset; the preprocessing module performs temporal and spatial filtering, event-related potential extraction and data enhancement on the original signal; all sensitive data are stored locally on the device, and only sample size, channel number and other non-sensitive meta information are reported to the server to eliminate the risk of privacy leakage from the source;

[0037] S3. Model distribution and local training, the server pushes the global model weight to each device; each device performs local training based on its own dataset, iterates for several rounds, and adds Gaussian noise to the gradient through differential privacy mechanism; after training, the device only uploads the model update and loss function value;

[0038] S4. Federated aggregation and global update; the server dynamically allocates aggregation weights according to the device sample size and data distribution difference, and introduces an elastic regularization term to suppress model drift; by weighted fusion of the model updates of each device, a new global model is generated, while monitoring the training loss curve and validation set accuracy trend to ensure steady improvement of model performance;

[0039] S5. After completing the basic training, enter the model compression and edge deployment stage; through knowledge distillation technology, the knowledge of the global model is transferred to a lightweight child model, and the parameter quantity is further reduced by combining channel pruning; the device continuously collects prediction error samples in actual operation to form a closed-loop feedback mechanism, providing high-quality negative samples for the next round of training;

[0040] S6. Through continuous learning and security enhancement mechanism, long-term stable operation is realized; every several communication rounds, the bottom feature extraction layer is frozen to fine-tune the classification head only, balancing the fusion of new and old knowledge; the blockchain notarization technology records the operation hash value of each model update, and the federated intrusion detection system monitors abnormal device behavior in real time; cross-device cross-validation is performed regularly to evaluate the generalization ability of the model, ensuring the robustness of the system.

[0041] The present application has the following advantages: the present application significantly improves system performance through a three-layer federal architecture and multi-dimensional optimization: the terminal device only uploads encrypted model increments, combining differential privacy and homomorphic encryption to achieve source data protection; federal transfer learning shortens the cold start time of new devices.

[0042] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more intuitively illustrate the prior art and the present application, exemplary drawings are given below. It should be understood that the specific shapes, structures shown in the drawings should not be regarded as limiting conditions in the implementation of the present application; for example, based on the technical concepts disclosed in the present application and the exemplary drawings, those skilled in the art can easily make routine adjustments or further optimizations to some units (components) in terms of increase / decrease / attribute division, specific shape, positional relationship, connection mode, size ratio relationship, etc.

[0044] Figure 1 A federal learning-based cross-device brainprint model training system implementation flowchart is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0045] The embodiments of the present application are described below by specific specific embodiments, and those skilled in the art can easily understand other advantages and effects of the present application from the disclosed content. Obviously, the described embodiments are part of the embodiments of the present application, not all. It should be understood that these embodiments are only to further illustrate the present application, and cannot be understood as limiting the scope of protection of the present application. The technical engineers in this field can make some non-essential improvements and adjustments to the present application according to the content of the above-mentioned application; based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0046] Please refer to Figure 1 A federal learning-based cross-device brainprint model training system includes a terminal device layer, an edge coordination layer, and a central server layer.

[0047] 1. The terminal device layer is responsible for collecting raw EEG data and performing local lightweight training, and ensuring data privacy;

[0048] The terminal devices of the terminal device layer include smart head rings, portable EEG collectors, etc. These devices are directly facing users and can collect multi-modal data, and at the same time, real-time preprocessing is performed on the collected data.

[0049] Multi-modal data acquisition: Support both dry / wet electrode acquisition modes, record 64-channel high-density EEG signals (sampling rate ≥ 256 Hz) synchronously, and integrate inertial measurement unit (IMU) to obtain head posture information for motion artifact correction.

[0050] Real-time preprocessing pipeline: Contains adaptive notch filtering (to eliminate power interference), independent component analysis (ICA) denoising, re-reference to average electrode, etc. to ensure signal quality.

[0051] Lightweight feature extraction network: Deploy an improved CNN-LSTM hybrid model to focus on brain region activity related to cognitive tasks through spatio-temporal attention mechanism, and output a fixed-dimensional brainprint feature vector.

[0052] Federal training client: Run a customized federated learning framework that supports asynchronous training and gradient compression, requiring only <5KB of model update package for a single training.

[0053] Privacy-enhanced technology: Locally integrate differential privacy training (DP-SGD) to prevent member inference attacks through gradient clipping and noise injection; use homomorphic encryption technology to encrypt sensitive parameters for encrypted transmission.

[0054] 2. Edge coordination layer, used to undertake regional model aggregation and conflict resolution, balance heterogeneous device differences; the edge coordination layer is composed of multiple edge servers.

[0055] Each edge server can be responsible for coordinating the collaborative training of multiple terminal devices within its jurisdiction. The main functions of the edge server include: dynamic grouping management, hierarchical federated aggregation, model conflict detection and repair, lightweight model conversion, and security audit middleware.

[0056] Among them, dynamic grouping management constructs heterogeneous device groups according to device geographic location, hardware performance, and data quality, avoiding the "rich get richer" Matthew effect.

[0057] Hierarchical federated aggregation adopts a two-stage aggregation strategy: first, perform Group FedAvg within the group to select the Top-K devices with the fastest loss function decline; then perform cross-group weighted averaging, with weights determined by device contribution, including data volume and training duration.

[0058] Model conflict detection and repair: Identify divergent parameters through parameter space projection method, use majority voting + expert threshold dual decision mechanism for controversial layers; introduce regularization term to constrain model complexity.

[0059] Lightweight model conversion: Convert the aggregated global model into a sparse version suitable for terminal deployment, reducing storage overhead through channel pruning and quantization compression.

[0060] Security audit middleware, record all device training logs and model update history, generate blockchain storage hash value for central server verification.

[0061] 3. Central server layer: leading global model optimization and security governance, driving cross-device knowledge fusion and continuous evolution;

[0062] The core functions of the central server are as follows:

[0063] Meta-learning driven hyperparameter optimization: build a meta-learner to predict the optimal learning rate, batch size and other hyperparameters for different devices, accelerate the convergence speed;

[0064] Cross-device knowledge transfer: use domain adaptation technology to reduce the data distribution difference between different devices and improve the model generalization ability;

[0065] Model distillation and compression: use the teacher-student framework to transfer the knowledge of complex models to lightweight networks to support real-time inference on mobile devices;

[0066] Security threat perception system: establish a device behavior baseline model to monitor abnormal training patterns (such as gradient explosion, spike attack) in real time; deploy a federal learning firewall to block malicious traffic;

[0067] Full life cycle management: provide model version control, OTA security update, device whitelist management and other functions to ensure the continuous and stable operation of the system.

[0068] The device terminal layer can extract brainprint features, and the brainprint feature extraction network includes an input layer, a spatio-temporal attention module, and a hybrid neural network architecture.

[0069] The input layer can receive pre-processed multi-channel EEG time series signals; the spatio-temporal attention module can use self-attention mechanism to capture the relevance between different time steps and channels, and generate attention weight matrix.

[0070] The hybrid neural network architecture includes a CNN branch and an LSTM branch; the CNN branch uses depth separable convolution to extract spatial features and reduce parameter quantity; the LSTM branch models time series dependency and captures long-term context information.

[0071] The CNN branch and the LSTM branch dynamically weight the two features through the gating mechanism, output a unified feature vector, and generate a feature activation heat map to visually show which brain regions play a key role in classification.

[0072] In this implementation, the federal learning algorithm is also optimized; including dynamic weight distribution strategy, asynchronous federal learning optimization and federal transfer learning extension.

[0073] The dynamic weight allocation strategy dynamically adjusts the weight of each device in the global aggregation according to the data quality, training stability and contribution of the device, and solves the problems of device heterogeneity and data quality.

[0074] Among them, the data quality is evaluated by the signal-to-noise ratio (SNR); the training stability is monitored by the fluctuation amplitude of the loss curve; and the contribution is the cumulative number of effective model updates uploaded.

[0075] The calculation formula of dynamic weight allocation is:

[0076] w i =Softmax(k1·α i +k2·β i +k3·γ i );

[0077] Among them, w i is the aggregation weight of device i; α i is the data quality factor; β i is the training stability factor; γ i is the contribution factor; k1, k2, k3 are hyperparameters; Softmax(·) is a normalization function.

[0078] The calculation formula of the data quality factor is:

[0079]

[0080] Among them, SNR i is the signal-to-noise ratio of the current signal collected by device i; max(SNR) is the maximum value of the signal-to-noise ratio of all devices, which is used for normalization.

[0081] The calculation formula of the training stability factor is:

[0082]

[0083] Among them, is the standard deviation of the loss curve when device i is locally trained; max(σ loss ) is the maximum value of the loss standard deviation of all devices; the smaller the loss fluctuation (σloss is lower), the closer βi is to 1, and the higher the weight.

[0084] The calculation formula of the contribution factor is:

[0085]

[0086] Among them, c i is the cumulative number of effective model updates uploaded by device i; the denominator is the total contribution number of all devices, which ensures that ∑γ i =1.

[0087] Asynchronous federated learning optimization allows devices to submit model updates at different time points, mitigating the impact of network latency through a buffer pool mechanism.

[0088] The formula for calculating the model parameters after global aggregation of asynchronous federated learning optimization is:

[0089]

[0090] where θ global is the model parameter after global aggregation, obtained by weighted averaging of model updates from multiple devices in the buffer pool; θ j is the model parameter submitted by device j, the model parameter after local training; w j is the aggregation weight of device j; n j is the sample size used by device j for this training; m is the number of devices currently in the buffer pool, the actual number of devices participating in this aggregation.

[0091] Buffer pool size B, the maximum number of updates to be aggregated set by the system (e.g., B = 100).

[0092] Timeout time t timeout , if the buffer pool is not full, the maximum waiting time (t timeout = 5 min)

[0093] Federated transfer learning extension, supporting fast fine-tuning of pre-trained models on new devices, reducing cold start time.

[0094] The formula for calculating the total loss function of federated transfer learning extension is:

[0095]

[0096] where L task is the task-specific loss (e.g., cross-entropy), measuring the performance of the model on local data; λ is the regularization strength hyperparameter, controlling the penalty of the difference between pre-trained parameters and new parameters; Θ new is the fine-tuned model parameter, the parameter updated by local training of the new device; Θ0 is the pre-trained model parameter; is the square of the L2 norm.

[0097] In this embodiment, the pre-trained model M0 is a basic model pre-trained by the central server, capturing common brain feature across devices.

[0098] Fine-tuning strategy, after loading M0, the new device only trains the last few layers (e.g., classification head), and freezes the remaining layers to preserve general features;

[0099] Regularization effect, by penalizing Constrain the fine-tuning amplitude to prevent overfitting.

[0100] In addition, the present application also provides a privacy protection technology stack, including privacy training, homomorphic encryption transmission and federated learning security protocol.

[0101] Among them, the differential privacy training adds Laplace noise in gradient calculation, the privacy budget epsilon = 3-5 is adjustable, and the privacy and accuracy are balanced; the homomorphic encryption transmission uses Paillier encryption algorithm to encrypt the model parameters, ensuring that the transmission process is tamper-proof;

[0102] The federated learning security protocol includes digital signature device identity authentication based on X.509 certificate, gradient integrity verification based on Merkle tree structure to check the integrity of data block, and anti-poisoning attack by KL divergence to detect abnormal gradient update.

[0103] In addition, to cope with the challenges of limited computing resources and storage space of terminal devices, the system adopts a multi-dimensional collaborative model compression and acceleration technology system.

[0104] Structural pruning is the first step, based on Taylor expansion to trace the sensitivity of network channels, and through quantifying the influence of input disturbance on output, redundant connections are accurately located, and then low contribution convolution kernels and neurons are peeled off layer by layer to realize lightweight reconstruction of model structure.

[0105] On this basis, the knowledge distillation technology introduces a teacher model (usually a high-performance model before compression) as a knowledge carrier, through soft label supervision and attention guiding mechanism, so that the student model focuses on retaining key feature expression ability, and makes up for the information loss caused by pruning.

[0106] To adapt to the heterogeneous hardware characteristics of edge devices, the quantization-aware training simulates the error caused by INT8 low-precision quantization during the training stage, and through quantization-dequantization operation, a more robust numerical representation space is constructed, which significantly improves the inference throughput after deployment.

[0107] For the domain shift problem caused by the difference in data distribution across devices, the dynamic batch normalization technology innovatively maintains independent BN layer statistics for different devices, and dynamically adjusts the update strategy of mean and variance through meta-learning, effectively eliminating the influence of data distribution difference between devices on model performance.

[0108] This series of technologies form a complete link from structure simplification, knowledge transfer, numerical optimization to distribution adaptation, and finally realize the efficient deployment and real-time inference of brainprint feature extraction model on terminal devices.

[0109] In this embodiment, the three-level collaborative workflow is shown in the following table.

[0110]

[0111] A cross-device brainprint model training method based on federated learning, comprising the following steps:

[0112] S1. System initialization and device registration: the central server builds a federated learning platform and defines the basic model architecture (such as convolutional neural network or time series model), and then each edge device (such as medical monitor, wearable device) registers access to the server, synchronizes device computing capability meta information to support subsequent differentiated task allocation.

[0113] S2. Enter the data collection and local preprocessing stage, each device independently collects multi-channel electroencephalogram (EEG) signals and their corresponding subject identifiers, forming a local data set. The preprocessing module performs temporal and spatial filtering (such as Butterworth band-pass filtering), event-related potential extraction, and data enhancement (time series flipping, noise injection) on the original signal, significantly improving data quality; all sensitive data are stored locally on the device, and only sample size, channel number and other non-sensitive meta information are reported to the server, eliminating the risk of privacy leakage from the source.

[0114] S3. Model distribution and local training stage, the server pushes the global model weight encryption to each device.

[0115] Each device performs local training based on its own data set, uses the AdamW optimizer for several rounds of iteration, and adds Gaussian noise to the gradient through the differential privacy mechanism (DP-SGD) to protect individual data features and maintain model convergence. After training, the device only uploads the model update ΔW and the loss function value, avoiding the leakage of original data.

[0116] S4. Federated aggregation and global update;

[0117] The server uses the improved FedProx algorithm, dynamically allocates aggregation weights according to the device sample size and data distribution difference, and introduces an elastic regularization term to suppress model drift; by weighted fusion of the model update of each device, a new global model is generated, while monitoring the training loss curve and validation set accuracy trend to ensure steady improvement of model performance.

[0118] S5. After completing the basic training, enter the model compression and edge deployment stage;

[0119] Through the knowledge distillation technology, the knowledge of the global model is transferred to the lightweight child model, and the channel pruning is further combined to reduce the parameter quantity; the optimized model is converted to TensorRT / ONNX format and deployed to each device to realize real-time inference. The device continuously collects prediction error samples in actual operation to form a closed-loop feedback mechanism, providing high-quality negative samples for the next round of training.

[0120] S6. Achieve long-term stable operation through continuous learning and security enhancement mechanisms;

[0121] Every few rounds of communication, the underlying feature extraction layer is frozen and only the classification head is fine-tuned to balance the fusion of new and old knowledge. Blockchain storage technology records the operation hash value of each model update, and the federal intrusion detection system (FIDS) monitors abnormal device behavior in real time. The model generalization ability is evaluated periodically through cross-validation across devices to ensure system robustness.

[0122] In addition, a visual monitoring platform is also set up to display global model performance indicators (accuracy, loss value), device activity, training progress, etc. and provide multi-dimensional data statistical analysis such as contribution ranking of different device types and privacy budget usage, etc.

[0123] When detecting device offline, training anomalies, etc., the administrator is notified through email / sms.

[0124] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A federated learning based cross-device brainprint model training system, comprising: The terminal device layer, the edge coordination layer and the central server layer are included. The terminal device layer is responsible for collecting raw electroencephalogram data and performing local lightweight training. After the terminal device completes the local training, only the incremental update of the model parameters is uploaded. The terminal device sends the encrypted model update and metadata to the edge coordination layer to which it belongs. The edge coordination layer aggregates the model updates of multiple terminal devices in the jurisdiction to generate a regional sub-model. The edge coordination layer sends the encrypted regional model and statistical information to the central server layer. The central server layer performs secondary optimization on each regional model to generate a global unified model. The encrypted global model and strategy configuration are pushed to all edge coordination layers. The edge coordination layer converts the global model issued by the central server into a lightweight version suitable for the terminal device. The optimized model and strategy are pushed to the terminal device.

2. The federated learning based cross-device brainprint model training system of claim 1, wherein, The terminal device of the terminal device layer includes a smart head ring and a portable EEG collector. The terminal device can collect multi-modal data and perform real-time preprocessing on the collected data.

3. The federated learning based cross-device brainprint model training system of claim 2, wherein, A lightweight feature extraction network is deployed in the terminal device. The spatiotemporal attention mechanism focuses on the brain activity related to cognitive tasks, and outputs a fixed-dimensional brainprint feature vector. The terminal device includes a federated training client. The federated training client runs a customized federated learning framework, supports asynchronous training and gradient compression, and integrates differential privacy training to prevent member inference attacks through gradient clipping and noise injection. Homomorphic encryption technology is used to encrypt and transmit sensitive parameters.

4. The federated learning based cross-device brainprint model training system of claim 1, wherein, Each edge server is responsible for coordinating the collaborative training of multiple terminal devices in its jurisdiction. The main functions of the edge server include dynamic grouping management, hierarchical federated aggregation, model conflict detection and repair, lightweight model conversion, and security audit middleware.

5. The federated learning based cross-device brainprint model training system of claim 1, wherein, The federated learning algorithm is optimized, including dynamic weight distribution strategy, asynchronous federated learning optimization, and federated transfer learning expansion. The dynamic weight distribution strategy dynamically adjusts the weight of each device in global aggregation based on data quality, training stability, and contribution. The asynchronous federated learning optimization allows devices to submit model updates at different time points and uses a buffer pool mechanism to mitigate the impact of network latency. The federated transfer learning expansion supports the rapid fine-tuning of pre-trained models on new devices, reducing the cold start time.

6. The federated learning based cross-device brainprint model training system of claim 5, wherein, The calculation formula of the dynamic weight distribution is as follows: w i = Softmax(k1 · a i + k2 · b i + k3 · g i ); where w i is the aggregated weight of device i; a i is the data quality factor; b i is the training stability factor; g i is the contribution factor; k1, k2, k3 are hyperparameters; and Softmax(•) is a normalization function. The calculation formula of the data quality factor is as follows: where SNR i is the signal-to-noise ratio of the current acquisition of device i; max(SNR) is the maximum signal-to-noise ratio among all devices, used for normalization; The calculation formula of the training stability factor is as follows: where, is the standard deviation of the loss curve for device i when training locally; max(σ loss ) is the maximum of the loss standard deviation across all devices; the smaller the loss fluctuation (the lower σloss), the closer βi is to 1, and the higher the weight; The calculation formula of the contribution factor is as follows: where c i is the number of valid model updates uploaded by device i; the denominator is the total contribution of all devices, ensuring that∑γ i = 1.

7. The federated learning based cross-device brainprint model training system of claim 5, wherein, The calculation formula of the global aggregated model parameters of the asynchronous federated learning optimization is as follows: wherein θ global is the global aggregated model parameter, which is obtained by weighted averaging of model updates from multiple devices in the buffer pool; θ j is the model parameter submitted by device j, which is the model parameter after local training; w j is the aggregation weight of device j; n j is the sample size used by device j for this training; and m is the number of devices in the buffer pool that are currently to be aggregated, which is the actual number of devices participating in this aggregation.

8. The federated learning based cross-device brainprint model training system of claim 5, wherein, The calculation formula of the total loss function of the federated transfer learning expansion is as follows: where L task is the task-specific loss (e.g., cross-entropy) that measures the model’s performance on the local data; λ is a regularization strength hyperparameter that controls the penalty strength of the difference between the pre-trained parameters and the new parameters; Θ new is the fine-tuned model parameters, and Θ0is the pre-trained model parameters. is the L2 norm squared.

9. The federated learning based cross-device brainprint model training system of claim 8, wherein, The pre-trained base model of the central server can capture common brainprint features across devices. After the new device loads the pre-trained base model, only the last few layers are trained, and the remaining layers are frozen to preserve the general features.

10. A cross-device brainprint model training method based on federated learning, characterized in that, The method includes the following steps: S1. System initialization and device registration, the central server builds a federated learning platform and defines the basic model architecture, then each edge device registers access to the server, synchronizes device computing capability meta information to support subsequent differentiated task allocation; S2. Enter the data collection and local preprocessing stage, each device independently collects multi-channel electroencephalogram signals and their corresponding subject identifiers to form a local dataset; The preprocessing module performs temporal and spatial filtering, event-related potential extraction, and data enhancement on the original signal; All sensitive data is stored locally on the device, and only sample size, channel number, and other non-sensitive meta information are reported to the server, eliminating the risk of privacy leakage from the source; S3. Model distribution and local training, the server pushes the global model weight encryption to each device; each device performs local training based on its own dataset, iterates for several rounds, and adds Gaussian noise to the gradient through differential privacy mechanism; After training, the device only uploads the model update and loss function value; S4. Federated aggregation and global update; the server uses dynamic allocation of aggregation weights according to device sample size and data distribution differences, and introduces an elastic regularization term to suppress model drift; by weighted fusion of each device's model update, a new global model is generated, while monitoring the training loss curve and validation set accuracy trend to ensure steady improvement of model performance; S5. After completing the basic training, enter the model compression and edge deployment stage; through knowledge distillation technology, the knowledge of the global model is transferred to a lightweight student model, and channel pruning is further used to reduce the parameter quantity; the device continuously collects prediction error samples in actual operation to form a closed-loop feedback mechanism, providing high-quality negative samples for the next round of training; S6. Through continuous learning and security enhancement mechanisms, long-term stable operation is achieved; every few communication rounds, the bottom feature extraction layer is frozen and only the classification head is fine-tuned to balance the fusion of new and old knowledge; blockchain storage technology records the operation hash value of each model update, and the federated intrusion detection system monitors abnormal device behavior in real time; cross-device cross-validation is performed regularly to evaluate the model's generalization ability, ensuring system robustness.

Citation Information

Patent Citations

  • ERP (Enterprise Resource Planning) signal detection method and device based on graph representation and attention mechanism

    CN115545065A

  • Lightweight federated learning privacy protection method under edge computing

    CN117294460A

  • Federal learning method and architecture based on dynamic sparse pulse neural network optimization

    CN119721141A

  • Self-adaptive federated learning method based on differential privacy

    CN120106242A

  • Lithium ion battery health state estimation method based on personalized federated transfer learning

    CN120522598A

Cited By

  • Big data-based information technology detection system with security protection

    CN121567489A

  • An information technology detection system with security protection based on big data

    CN121567489B

  • Scenarized semantic understanding and dialogue generation method and system

    CN121579654A