Brain-computer interface data privacy protection method, device and equipment and storage medium

By generating simulated EEG signals consistent with normalized EEG signals through deep convolutional generative adversarial networks, the problem of EEG data privacy leakage is solved, achieving a balance between privacy protection and data availability, and ensuring the high fidelity and usability of simulated EEG signals.

CN122490589APending Publication Date: 2026-07-31SHANGHAI UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI UNIV
Filing Date
2026-06-10
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

EEG data, as highly sensitive biometric data, poses serious ethical risks and security threats if its privacy is compromised. Existing technologies struggle to provide high-fidelity, usable simulated EEG data to support large-scale cloud-based model training while protecting privacy.

Method used

By training a deep convolutional generative adversarial network, the underlying distribution characteristics of normalized EEG signals are learned, and simulated EEG signals consistent with them are generated. The network is trained locally until convergence, avoiding the direct uploading of raw EEG data. Simulated EEG signals are used for cloud training.

Benefits of technology

It effectively blocks the direct exposure path of the original EEG data, eliminates the risk of privacy leakage, ensures the data quality and usability of the simulated EEG signal, reduces the ethical and security risks caused by data abuse, and the generated simulated EEG signal is highly consistent with the original signal in terms of time and frequency characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122490589A_ABST
    Figure CN122490589A_ABST
Patent Text Reader

Abstract

This application provides a method, apparatus, device, and storage medium for protecting brain-computer interface data privacy. The method includes: acquiring local EEG signals; performing preprocessing operations on the local EEG signals to obtain normalized EEG signals; training a deep convolutional generative adversarial network (DGAN) using the normalized EEG signals and standard latent noise until the DGAN converges, obtaining a simulated EEG signal output by the DGAN that is consistent with the distribution of the normalized EEG signals; and uploading the simulated EEG signal to a cloud server, allowing the cloud server to use the simulated EEG signal for large-scale model training. This application, by generating simulated EEG signals that are highly consistent with the distribution of real EEG signals, completely eliminates the risk of privacy leakage caused by the direct correlation between EEG data and user cognitive state, emotional fluctuations, and thought content, while preserving the statistical characteristics and usability of the data, thereby significantly reducing the ethical and security risks associated with data misuse.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of EEG signal processing technology and relates to a method, device, equipment and storage medium for protecting data privacy in brain-computer interfaces. Background Technology

[0002] Brain-computer interface (BCI) technology, by collecting electrophysiological signals from the human brain, establishes an information channel for direct interaction between the brain and external devices, and has demonstrated wide application value in fields such as medical rehabilitation, assistive communication, and virtual reality. However, as a type of highly sensitive biometric data, EEG data deeply contains a user's cognitive state, emotional fluctuations, and even thought processes. The leakage of this data privacy could lead to serious ethical risks and security threats.

[0003] Therefore, the challenge lies in providing a new brain-computer interface data processing technology that can balance privacy and data availability, aiming to completely isolate raw, sensitive EEG data from the external environment while providing high-fidelity, usable simulated EEG data support for training large cloud-based models. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for protecting brain-computer interface data privacy, which can completely eliminate the risk of privacy leakage caused by the direct correlation between EEG data and the user's cognitive state, emotional fluctuations, and thought content, significantly reduce the ethical and security risks caused by data abuse, and provide high-fidelity and usable simulated EEG data for training large cloud models.

[0005] In a first aspect, this application provides a method for protecting the privacy of brain-computer interface data. The method includes: acquiring local EEG signals; performing preprocessing operations on the local EEG signals to obtain normalized EEG signals; training a deep convolutional generative adversarial network (DGAN) using the normalized EEG signals and standard latent noise until the DGAN converges, thereby obtaining a simulated EEG signal output by the DGAN that is consistent with the distribution of the normalized EEG signals, so as to effectively avoid the leakage of user privacy data; and uploading the simulated EEG signals to a cloud server, so that the cloud server can use the simulated EEG signals to train a large model.

[0006] In this application, a deep convolutional generative adversarial network is trained to learn the potential distribution characteristics of normalized EEG signals, and a simulated EEG signal that is highly consistent with the target distribution of the local normalized EEG signal is generated during the convergence phase. This method fundamentally achieves the de-identification processing of sensitive biometric data. This technique effectively blocks the direct exposure path of raw EEG data in sharing and application scenarios. While preserving the statistical characteristics and usability of the data, it completely eliminates the risk of privacy leakage caused by the direct association of EEG data with users' cognitive state, emotional fluctuations and thought content, thereby significantly reducing the ethical and security risks caused by data abuse.

[0007] In one implementation of the first aspect, training the deep convolutional generative adversarial network (DGAN) using the normalized EEG signal and standard latent noise until the DGAN converges includes: inputting the standard latent noise into a generator; performing a deconvolution operation on the Gaussian random latent noise within the generator to map and generate a simulated EEG signal and generator parameters corresponding to the simulated EEG signal; inputting the normalized EEG signal or the simulated EEG signal into a discriminator; outputting a true / false discrimination score of the signal and discriminator parameters corresponding to the discrimination score; and optimizing the generator parameters and the discriminator parameters based on an alternating optimization strategy until the loss error corresponding to the generator parameters and the discriminator parameters is within a preset range, at which point the DGAN converges, wherein the DGAN includes the generator and the discriminator.

[0008] In one implementation of the first aspect, the generator and the discriminator achieve collaborative optimization through a minimax game, and the expression for the overall objective function of the deep convolutional generative adversarial network is:

[0009]

[0010] in, This represents the mathematical expectation of the corresponding distribution. This represents the discriminator's score in distinguishing between true and false normalized EEG signals; This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator.

[0011] In one implementation of the first aspect, the optimization of the generator parameters and the discriminator parameters based on the alternating optimization strategy includes: fixing the generator parameters, minimizing the discriminator loss through gradient descent, and updating the discriminator parameters; fixing the discriminator parameters, minimizing the generator loss through gradient descent, and updating the generator parameters.

[0012] In one implementation of the first aspect, the expression corresponding to the discriminator loss is:

[0013]

[0014] Among them, among them, The Sigmoid activation function is used to map the output score of the discriminator to the interval [0, 1]. The simulated EEG signal output by the generator. This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator. This represents the score by which the discriminator distinguishes between genuine and fake normalized EEG signals. This represents the mathematical expectation of the corresponding distribution. This indicates that the sample follows a data distribution. .

[0015] In one implementation of the first aspect, the expression corresponding to the generator loss is:

[0016]

[0017] in, The Sigmoid activation function is used to map the output score of the discriminator to the interval [0, 1]. The simulated EEG signal output by the generator. This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator. This represents the mathematical expectation of the corresponding distribution. This indicates that the sample follows a data distribution. .

[0018] In one implementation of the first aspect, the step of performing preprocessing operations on the local EEG signal to obtain a normalized EEG signal includes: adjusting the dimensions of the local EEG signal; performing noise filtering on the dimension-adjusted local EEG signal to obtain a filtered EEG signal; and performing normalization processing on the filtered EEG signal using a global minimum-maximum normalization method to obtain a normalized EEG signal.

[0019] Secondly, this application provides a brain-computer interface data privacy protection device, the device comprising: a signal acquisition module for acquiring local EEG signals; a preprocessing module for performing preprocessing operations on the local EEG signals to obtain normalized EEG signals; a simulated EEG signal generation module for training a deep convolutional generative adversarial network (DGAN) using the normalized EEG signals and standard latent noise until the DGAN converges, thereby obtaining a simulated EEG signal output by the DGAN that is consistent with the distribution of the normalized EEG signals, so as to effectively avoid the leakage of user privacy data; and a training module for uploading the simulated EEG signals to a cloud server, so that the cloud server can use the simulated EEG signals to train a large model.

[0020] Thirdly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the brain-computer interface data privacy protection method described in any one of the first aspects of embodiments of this application.

[0021] Fourthly, embodiments of this application provide an electronic device, the electronic device comprising: a memory storing a computer program; and a processor communicatively connected to the memory, which executes the brain-computer interface data privacy protection method described in any one of the first aspects of this application when the computer program is invoked.

[0022] As described above, the brain-computer interface data privacy protection method, apparatus, device, and storage medium described in this application have the following beneficial effects:

[0023] 1) By training a deep convolutional generative adversarial network to learn the potential distribution characteristics of normalized EEG signals, and generating simulated EEG signals that are highly consistent with the target distribution of normalized EEG signals during the convergence phase, this method fundamentally achieves the de-identification of sensitive biometric data. This technique effectively blocks the direct exposure path of raw EEG data in sharing and application scenarios. While preserving the statistical characteristics and usability of the data, it completely eliminates the risk of privacy leakage caused by the direct association of EEG data with users' cognitive state, emotional fluctuations, and thought content, thereby significantly reducing the ethical and security risks caused by data abuse.

[0024] 2) By constructing a game-like adversarial mechanism between the generator and the discriminator, an effective mapping from the latent space to the high-dimensional EEG signal feature space is achieved using deconvolution operations. Based on an alternating optimization strategy, the generator and discriminator parameters are iteratively optimized until the loss error converges. This process enables the generator to accurately capture and approximate the complex distribution characteristics and potential statistical regularities of real EEG signals. This deep adversarial training mechanism significantly improves the realism and fidelity of the simulated EEG signals, ensuring a high degree of consistency between the generated simulated EEG signals and the original normalized EEG signals in terms of time-frequency characteristics. Therefore, it effectively guarantees the data quality and usability of the simulated EEG signals without relying on the original sensitive data.

[0025] 3) By adjusting the dimensions of the local EEG signal, the data format was ensured to precisely match the input requirements of the subsequent filtering processing module, guaranteeing the compatibility of data flow and the smoothness of the processing workflow. By implementing a combined noise filtering strategy including power frequency notch filtering, high-pass filtering, and low-pass filtering, artifacts in specific frequency bands such as power frequency interference, baseline drift, and high-frequency noise were effectively removed, significantly improving the signal-to-noise ratio and purity of the EEG signal.

[0026] 4) Global min-max normalization is used to map the signal amplitude to a uniform numerical range, eliminating the amplitude differences and dimensionality effects between different individuals or collection periods. This effectively avoids the instability of model training caused by data distribution fluctuations, thus providing standardized and high-quality data input for deep convolutional generative adversarial networks, ensuring the accuracy of feature learning and the robustness of the generative model. Attached Figure Description

[0027] Figure 1A The diagram shows an application scenario corresponding to the brain-computer interface data privacy protection method provided in the embodiments of this application.

[0028] Figure 1B The flowchart shown is a brain-computer interface data privacy protection method provided in an embodiment of this application.

[0029] Figure 2 The flowchart shown is a process for training a deep convolutional generative adversarial network provided in an embodiment of this application.

[0030] Figure 3A This illustrates the process of optimizing the generator parameters and the discriminator parameters based on an alternating optimization strategy, as provided in this embodiment of the application.

[0031] Figure 3B The diagram shown is a schematic of the DCGAN architecture provided in an embodiment of this application.

[0032] Figure 4 The flowchart shown is a normalized electroencephalogram (EEG) signal provided in an embodiment of this application.

[0033] Figure 5 This is a frequency domain comparison diagram of a real EEG signal (left) and a simulated EEG signal (right) provided in the embodiments of this application.

[0034] Figure 6 The diagram shown is a structural diagram of a brain-computer interface data privacy protection device provided in an embodiment of this application.

[0035] Figure 7 The diagram shown is a structural diagram of an electronic device provided in an embodiment of this application.

[0036] Component designation explanation

[0037] S11~S14 step 64 Training module S21~S23 step 70 electronic devices S31~S32 step 71 processor S41~S43 step 72 Non-volatile storage media 60 Brain-computer interface data privacy protection device 73 System bus 61 Signal acquisition module 74 Internal memory 62 Preprocessing module 75 Network interface 63 Simulated EEG signal generation module Detailed Implementation

[0038] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. This application can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, unless otherwise specified, the following embodiments and features in the embodiments can be combined with each other.

[0039] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this application. Therefore, the drawings only show the components related to this application and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0040] like Figure 1A As shown in the diagram, this embodiment provides an application scenario illustration of a brain-computer interface data privacy protection method, specifically including: a hardware environment layer, a software environment layer, and an implementation step layer. The hardware environment layer is used to collect local EEG signals, and in conjunction with the software environment layer, preprocesses the collected local EEG signals and trains a deep convolutional generative adversarial network (DGAN) to obtain a true / false discrimination score, until the DGAN converges, resulting in a simulated EEG signal output by the DGAN that is consistent with the normalized EEG signal distribution. The signal acquisition module within the hardware environment layer is connected to the implementation step layer and is used to collect the subject's local EEG signals.

[0041] The technical solutions in the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0042] like Figure 1BAs shown in the flowchart, this application provides a brain-computer interface data privacy protection method. Figure 1B As shown, the brain-computer interface data privacy protection method provided in this application embodiment includes the following steps S11 to S14.

[0043] S11, collects local EEG signals.

[0044] For example, an 8-channel EEG acquisition device based on OpenBCI can be used to acquire the user's local EEG signals using the SSVEP paradigm as the stimulation scheme.

[0045] S12, perform preprocessing on the local EEG signal to obtain a normalized EEG signal.

[0046] For example, the acquired raw EEG signals are preprocessed locally to obtain standardized normalized EEG signals. The preprocessing process includes dimensionality adjustment, reference correction, noise filtering, and normalization.

[0047] S13, the deep convolutional generative adversarial network is trained using the normalized EEG signal and standard latent noise until the deep convolutional generative adversarial network converges, thereby obtaining a simulated EEG signal output by the deep convolutional generative adversarial network that is consistent with the distribution of the normalized EEG signal.

[0048] Specifically, the simulated EEG signal output by the deep convolutional generative adversarial network is obtained, which is consistent with the normalized EEG signal distribution, so as to effectively avoid the leakage of user privacy data.

[0049] For example, after convergence, a deep convolutional generative adversarial network can generate simulated EEG signals that are consistent with the statistical characteristics of real normalized EEG signals.

[0050] S14, the simulated EEG signal is uploaded to the cloud server, so that the cloud server can use the simulated EEG signal to train a large model.

[0051] This application provides a method for protecting the privacy of brain-computer interface (BCI) data. In this method, a deep convolutional generative adversarial network (GAN) is trained to learn the potential distribution characteristics of normalized EEG signals. During the convergence phase, a simulated EEG signal highly consistent with the target distribution of the normalized EEG signal is generated. This method fundamentally achieves the de-identification of sensitive biometric data. This technique effectively blocks the direct exposure path of raw EEG data in sharing and application scenarios. While preserving the statistical characteristics and usability of the data, it completely eliminates the risk of privacy leakage caused by the direct association of EEG data with the user's cognitive state, emotional fluctuations, and thought content, thereby significantly reducing the ethical and security risks caused by data misuse. Furthermore, the generated simulated EEG signal retains the core physiological characteristics and distribution patterns of the original EEG signal and can be directly used for training BCI-related models. The decoding accuracy of the trained model decreases by no more than 5% compared to using the original data, resolving the contradiction between privacy protection and data usability.

[0052] like Figure 2 As shown in the figure, this application provides a flowchart for training a deep convolutional generative adversarial network, as follows: Figure 2 As shown in the embodiments of this application, the method for training a deep convolutional generative adversarial network includes the following steps S21 to S23.

[0053] S21, the standard latent noise is input into the generator, and a deconvolution operation is performed on the Gaussian random latent noise in the generator to map and generate a simulated EEG signal and the generator parameters corresponding to the simulated EEG signal.

[0054] For example, assume that the normalized EEG signal samples follow a data distribution. Normalized EEG signals Suppose the generator's input is Gaussian random latent noise. It follows a standard normal distribution. (in (identity matrix); generator : with hidden noise Using 1D deconvolution operations as input, simulated EEG signals are generated. The generator parameters are .

[0055] S22, the normalized EEG signal or the simulated EEG signal is input into the discriminator, and the true / false discrimination score of the output signal and the discriminator parameters corresponding to the discrimination score are output.

[0056] For example, discriminator : Using normalized EEG signals Or simulated EEG signals The input and output signals are used to determine their authenticity, and the discriminator parameters are as follows: .

[0057] S23, the generator parameters and discriminator parameters are optimized based on an alternating optimization strategy until the loss error corresponding to the generator parameters and discriminator parameters is within a preset range, and the deep convolutional generative adversarial network converges.

[0058] The deep convolutional generative adversarial network includes the generator and the discriminator.

[0059] For example, the alternating optimization strategy involves alternately optimizing the generator and the discriminator until the loss error of the generator and the discriminator converges.

[0060] In some embodiments, the generator and the discriminator achieve collaborative optimization through a minimax game, and the overall objective function of the deep convolutional generative adversarial network is expressed as:

[0061]

[0062] in, This represents the mathematical expectation of the corresponding distribution. This represents the discriminator's score in distinguishing between true and false normalized EEG signals; This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator.

[0063] Specifically, the core of this objective function is: the discriminator. To the greatest extent possible, we can distinguish between real normalized EEG signals and simulated EEG signals (i.e., maximize...) ), generator To generate normalized EEG signals that approximate the true distribution as closely as possible to deceive the discriminator (i.e., minimize...). ).

[0064] This application provides a method for training a deep convolutional generative adversarial network (GAN). In this method, a game-like adversarial mechanism is constructed between the generator and the discriminator. Deconvolution operations are used to achieve an effective mapping from the latent space to the high-dimensional EEG signal feature space. An alternating optimization strategy is used to iteratively optimize the generator and discriminator parameters until the loss error converges. This process enables the generator to accurately capture and approximate the complex distribution characteristics and potential statistical regularities of real EEG signals. This deep adversarial training mechanism significantly improves the realism and fidelity of the simulated EEG signals, ensuring a high degree of consistency between the generated simulated EEG signals and the original normalized EEG signals in terms of time-frequency characteristics. Therefore, without relying on the original sensitive data, the data quality and usability of the simulated EEG signals are effectively guaranteed.

[0065] like Figure 3AAs shown in the figure, this application provides a flowchart for optimizing the generator parameters and the discriminator parameters based on an alternating optimization strategy, as follows: Figure 3A As shown in the figure, the method for optimizing the generator parameters and the discriminator parameters based on the alternating optimization strategy provided in this application includes the following steps S31 to S32.

[0066] S31, fix the generator parameters, minimize the discriminator loss through gradient descent, and update the discriminator parameters.

[0067] In some embodiments, the expression corresponding to the discriminator loss is:

[0068]

[0069] Among them, among them, The Sigmoid activation function is used to map the output score of the discriminator to the interval [0, 1]. The simulated EEG signal output by the generator. This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator. This represents the score by which the discriminator distinguishes between genuine and fake normalized EEG signals. This represents the mathematical expectation of the corresponding distribution. This indicates that the sample follows a data distribution. .

[0070] S32, fix the discriminator parameters, minimize the generator loss through gradient descent, and update the generator parameters.

[0071] In some embodiments, the expression corresponding to the generator loss is:

[0072]

[0073] in, The Sigmoid activation function is used to map the output score of the discriminator to the interval [0, 1]. The simulated EEG signal output by the generator. This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator. This represents the mathematical expectation of the corresponding distribution. This indicates that the sample follows a data distribution. .

[0074] Specifically, the Deep Convolutional Generative Adversarial Networks (DCGANs) defined by the above formula can generate simulated EEG signals that are consistent with the distribution of real EEG signals, thus meeting the needs of subsequent signal processing and analysis.

[0075] Please see Figure 3B , Figure 3B The diagram shown is a schematic of the DCGAN architecture provided in an embodiment of this application.

[0076] Depend on Figure 3B As can be seen, the DCGAN architecture includes a generator and a discriminator. The generator comprises an input layer, a fully connected layer, a first deconvolutional layer, a second deconvolutional layer, and a third deconvolutional layer. The discriminator comprises an input layer, a convolutional layer, a pooling layer, a first fully connected layer, a second fully connected layer, and an output layer.

[0077] Taking standard normally distributed random noise of dimension (B, 64) as the input layer of the generator as an example, the fully connected layer maps the 64-dimensional noise sent by the input layer to 640-dimensional features, reshaping the one-dimensional features into three-dimensional features of dimension (B, 16, 40). The first deconvolutional layer has 16 input channels, 16 output channels, 22 convolutional kernels, and a stride of 4. The second deconvolutional layer has 16 input channels, 16 output channels, 18 convolutional kernels, and a stride of 2. The third deconvolutional layer has 16 input channels, 8 output channels, 16 convolutional kernels, and a stride of 4. After processing by the fully connected layer and the three deconvolutional layers, the simulated EEG signal is output.

[0078] The discriminator's input layer randomly receives either simulated EEG signals or local EEG signals from the generator and sends them to the convolutional layer. The convolutional layer has 2 input channels, 16 output channels, a 10-kernel size, and a stride of 2. The pooling layer performs downsampling on the output of the convolutional layer, compressing the feature length and preserving key waveform features. The first fully connected layer has 16 input channels and 600 output channels. The second fully connected layer has 600 input channels and 1 output channel, and outputs a true / false discrimination score.

[0079] For example, the training process of a DCGAN network is as follows:

[0080] 1. Generator Training Process

[0081] First, a local standard latent noise is generated. Specifically, the standard latent noise can be a Gaussian random noise vector with a shape of [B, 64], where B is the batch size. This noise has no physiological meaning and does not contain any privacy information; it is only used as the input driver for generating simulated EEG signals.

[0082] The second layer is a fully connected layer that stores low-dimensional Gaussian random latent noise. Mapped to high-dimensional feature vectors Then, the high-dimensional feature vectors are reshaped into three-dimensional feature maps. To adapt to subsequent one-dimensional deconvolution operations, the corresponding expression is as follows:

[0083] .

[0084] in, As weight, For bias, This is the activation function.

[0085] The data shape is [B, 64]--[B, 640]--[B, 16, 40], where [B, 64] represents the shape of the Gaussian random noise vector, [B, 640] represents the shape of the high-dimensional feature vector, and [B, 16, 40] represents the shape of the three-dimensional feature map.

[0086] The third to fifth layers are deconvolutional layers, which process the 3D feature maps. Upsampling is performed to extend the signal length, and finally, a simulated EEG signal with a shape consistent with the real EEG signal is output. All three convolutional layers perform convolution processing based on the above formula, where, For convolution parameters, As weight, For bias, The output signals of the first / second and third deconvolution layers are represented. The data shape is [B, 16, 40]—[B, 16, 178]—[B, 16, 372]—[B, 2, 1500], where [B, 16, 178] represents the shape of the output signal of the first deconvolution layer, [B, 16, 372] represents the shape of the output signal of the second deconvolution layer, and [B, 2, 1500] represents the shape of the simulated EEG signal output by the third deconvolution layer.

[0087] 2. Discriminator Process

[0088] The simulated EEG signal output by the generator is input into the input layer of the discriminator. The discriminator distinguishes between the simulated EEG signal and the local normalized EEG signal to determine whether they are true or false, and outputs a confidence scalar.

[0089] The second layer is a convolutional layer, which extracts the time-series waveform and frequency-domain correlation local features of simulated EEG signals or local normalized EEG signals. The corresponding expression is: ,in, Represents simulated EEG signals or local normalized EEG signals, with data shape [B, 2, 1500] — [B, 16, 748].

[0090] The third layer is a pooling layer, which downsamples the features output by the convolutional layer, compresses the data volume, retains key discriminative features, and finally flattens it into a one-dimensional vector. The corresponding expression is: The data shape is [B, 16, 748] — [B, 16, 374] — [B, 5984], where [B, 16, 374] is the downsampled EEG signal and [B, 5984] represents the flattened one-dimensional vector.

[0091] The fourth and fifth layers are fully connected layers that fuse and nonlinearly map global features, outputting a final true / false confidence scalar that represents the confidence level of the input signal as a local normalized EEG signal. . is the activation function. The data shape is [B, 5984] — [B, 600] — [B, 1], where [B, 600] represents the EEG feature shape output by the first fully connected layer, [B, 1] represents the EEG feature shape output by the second fully connected layer, and 1 represents the authenticity score of the output signal.

[0092] It should be noted that each time the generator and discriminator are trained, the generator parameters and discriminator parameters are obtained based on the generator loss function and discriminator loss function. After multiple training sessions, the deep convolutional generative adversarial network converges and training stops when the loss error corresponding to the generator parameters and discriminator parameters after multiple training sessions is within a preset range.

[0093] like Figure 4 As shown in the figure, this application provides a flowchart of a normalized electroencephalogram (EEG) signal, as follows. Figure 4 As shown, the method for normalizing EEG signals provided in this application includes the following steps S41 to S43.

[0094] S41, Dimensional adjustment is performed on the local EEG signal.

[0095] For example, the dimensions of the local EEG signal can be adjusted from (number of samples, number of channels, time point) to (number of samples, time point, number of channels) to adapt to subsequent filtering processing.

[0096] It should be noted that if the dimensions of the local EEG signal itself are already adapted to the subsequent filtering process, there is no need to adjust the dimensions of the local EEG signal.

[0097] S42, perform noise filtering on the local EEG signal after dimension adjustment to obtain a filtered EEG signal.

[0098] For example, a 50Hz power frequency notch filter (using an IIR notch filter with a quality factor Q=30), a 9Hz high-pass filter (4th-order Butterworth filter), and a 60Hz low-pass filter (4th-order Butterworth filter) can be applied sequentially to remove power frequency interference, baseline drift, and high-frequency noise.

[0099] It should be noted that the filtering steps, filter types, and corresponding specific values ​​listed in the above examples are merely illustrative and this application does not impose any limitations on them.

[0100] S43, the filtered EEG signal is normalized using the global minimum-maximum normalization method to obtain a normalized EEG signal.

[0101] For example, the global min-max normalization method is used to map the filtered signal to the [0, 1] interval, as shown in the formula:

[0102]

[0103] in, Represents the global minimum value. This represents the global maximum value.

[0104] This application provides a method for normalizing EEG signals. By adjusting the dimensions of local EEG signals, it ensures that the data format accurately matches the input requirements of subsequent filtering modules, guaranteeing data flow compatibility and smooth processing. By implementing a combined noise filtering strategy including power frequency notch filtering, high-pass filtering, and low-pass filtering, artifacts in specific frequency bands such as power frequency interference, baseline drift, and high-frequency noise are effectively removed, significantly improving the signal-to-noise ratio and purity of the EEG signals. Furthermore, global min-max normalization is employed to map signal amplitudes to a uniform numerical range, eliminating amplitude differences and dimensional influences between different individuals or acquisition periods. This effectively avoids model training instability caused by data distribution fluctuations, thus providing standardized, high-quality data input for deep convolutional generative adversarial networks, ensuring the accuracy of feature learning and the robustness of the generative model.

[0105] Please see Figure 5 , Figure 5 This image shows a frequency domain comparison of a real electroencephalogram (EEG) signal (left) and a simulated EEG signal (right) provided in an embodiment of this application. Figure 5 It can be seen that the simulated EEG signals output by the deep convolutional generative adversarial network are consistent with the distribution of real EEG signals.

[0106] It should be noted that the brain-computer interface data privacy protection method provided in this application embodiment also has the following beneficial effects:

[0107] Low system overhead: The training and inference of generative models are completed on local edge devices without relying on cloud computing power, which reduces network transmission bandwidth and cloud storage pressure.

[0108] Wide adaptability: It supports EEG signal processing with different numbers of channels and different sampling frequencies, and is compatible with various types of EEG data such as motor imagery EEG, SSVEP, and event-related potentials (ERP). It also supports the replacement of various generative model architectures and has a wide range of applications.

[0109] This application will be further described in detail based on the following embodiments:

[0110] 1) Hardware Environment

[0111] Local acquisition device: OpenBCI Cyton 8-channel EEG module with gel electrode caps, sampling rate 500Hz.

[0112] Local computing terminal: Intel i7-9750H CPU, 16GB memory.

[0113] Cloud server: CPU Intel Xeon Gold 6248, GPU NVIDIA A100 (80GB), Memory 128GB, used for large model training;

[0114] (ii) Software Environment

[0115] Development language: Python 3.8;

[0116] Core libraries: NumPy 1.24.3, SciPy 1.10.1 (for signal preprocessing), PyTorch 2.0.1 (for model training), OpenBCI Python SDK (for data acquisition).

[0117] (III) Implementation Steps

[0118] Equipment deployment and calibration: Place the OpenBCI 8-channel electrode cap on the subject's head, aligning the electrodes with channels O1, O2, Oz, POz, PO3, PO4, Pz, and PO7. Connect the EEG module to the local computing terminal, start the device, and perform impedance calibration (ensure the electrode impedance is <5kΩ).

[0119] SSVEP stimulus presentation: The SSVEP stimulus program is run on the local computing terminal, presenting visual stimuli at four frequencies: 8Hz, 10Hz, 12Hz, and 15Hz. Each frequency stimulus is repeated 20 times, with each stimulus lasting 3 seconds and an interval of 1 second. Subjects are instructed to look at the stimulus source.

[0120] Raw data acquisition and storage: The OpenBCI module acquires local EEG signals and transmits them to the local computing terminal in real time. The data is stored in encrypted .npy format. After the acquisition is completed, the raw EEG data file is obtained. Each user has 20 samples per frequency, and the data dimension is (20, 8, 1500) (number of samples, number of channels, time points, 1500 = 3 seconds × 500Hz).

[0121] Local preprocessing: The preprocessing function is called to process the raw data, performing dimension adjustment (20, 1500, 8), 50Hz notch filtering, 9Hz high-pass + 60Hz low-pass filtering, normalization, and outputting standardized data (with dimensions maintained at 20, 1500, 8).

[0122] DCGAN Model Training: Start training the optimized DCGAN model on the local computing terminal, set the batch size to 5, the number of training rounds to 1200, print the D loss and G loss every 100 rounds, and the model converges when the loss tends to stabilize.

[0123] Simulated EEG signal generation: After the model converges, generate an arbitrary number of n artificial EEG samples with data dimensions of (n, 1500, 8). The frequency characteristics (8-15Hz) and time-domain waveform similarity of the generated simulated EEG signals with the real SSVEP signals are analyzed.

[0124] Data upload and cloud training: Transmit simulated EEG signals to a cloud server, and train the SSVEP classification model using artificial samples in the cloud.

[0125] Privacy protection verification: No original local EEG data was uploaded throughout the process. Through privacy attack tests (such as model inversion attack and feature matching attack), attackers cannot recover any individual privacy information from the artificial data.

[0126] This application also provides a brain-computer interface data privacy protection system, including:

[0127] Local acquisition module: An 8-channel EEG acquisition device based on OpenBCI, used to acquire raw EEG signals in the SSVEP paradigm;

[0128] Local preprocessing module: Deployed on the local edge computing terminal, it is used to perform preprocessing processes such as dimension adjustment, reference correction, noise filtering, and normalization.

[0129] Generative model module: Deployed on a local edge computing terminal, including DCGAN model (or WGAN, VAE model), used to train and generate simulated EEG signals;

[0130] Data transmission module: used to encrypt and upload the generated simulated EEG signals to the cloud server;

[0131] Cloud-based training module: Deployed on a cloud server, used for training large brain-computer interface models using artificial EEG signals.

[0132] The scope of protection of the brain-computer interface data privacy protection method described in this application is not limited to the execution order of the steps listed in this embodiment. Any solution implemented by adding, subtracting, or replacing steps in the prior art based on the principles of this application is included within the scope of protection of this application.

[0133] This application also provides a brain-computer interface data privacy protection device, which can implement the brain-computer interface data privacy protection method described in this application. However, the implementation device of the brain-computer interface data privacy protection method described in this application includes, but is not limited to, the structure of the brain-computer interface data privacy protection device listed in this embodiment. All structural modifications and substitutions of the prior art made based on the principles of this application are included within the protection scope of this application.

[0134] like Figure 6 As shown, in one embodiment, the brain-computer interface data privacy protection device 60 of this application includes a signal acquisition module 61, a preprocessing module 62, a simulated EEG signal generation module 63, and a training module 64.

[0135] The signal acquisition module 61 is used to acquire local EEG signals.

[0136] The preprocessing module 62 is used to perform preprocessing operations on the local EEG signal to obtain a normalized EEG signal.

[0137] The simulated EEG signal generation module 63 is used to train the deep convolutional generative adversarial network (DGAN) using the normalized EEG signal and standard latent noise until the DGAN converges, thereby obtaining a simulated EEG signal output by the DGAN that is consistent with the distribution of the normalized EEG signal, so as to effectively avoid the leakage of user privacy data.

[0138] Training module 64 is used to upload the simulated EEG signals to a cloud server, so that the cloud server can use the simulated EEG signals to train a large model.

[0139] The structure and principle of the signal acquisition module 61, the preprocessing module 62, the simulated EEG signal generation module 63, and the training module 64 correspond one-to-one with the steps in the above-mentioned brain-computer interface data privacy protection method, so they will not be described in detail here.

[0140] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, or methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or units 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 of apparatuses or modules or units may be electrical, mechanical, or other forms.

[0141] The modules / units described as separate components may or may not be physically separate. The components shown as modules / units may or may not be physical modules; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules / units can be selected to achieve the objectives of the embodiments of this application, depending on actual needs. For example, the functional modules / units in the various embodiments of this application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0142] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] This application also provides an electronic device. Figure 7 The diagram shown is a structural schematic of an electronic device 70 in one embodiment of this application. The brain-computer interface data privacy protection method provided in this embodiment can be applied to… Figure 7 The electronic device 70 shown is an example, but not limited to it. For example... Figure 7 As shown, the electronic device 70 includes a processor 71, a memory, a system bus 73, and a network interface 75. The memory may include a non-volatile storage medium 72 and internal memory 74.

[0144] The non-volatile storage medium 72 can store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any of the brain-computer interface data privacy protection methods provided in the embodiments of this application.

[0145] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0146] The internal memory 74 provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor, it enables the processor to execute any of the brain-computer interface data privacy protection methods provided in the embodiments of this application.

[0147] This network interface 75 is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0148] It should be understood that processor 71 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, the general-purpose processor can be a microprocessor or any conventional processor.

[0149] The electronic device 70 in this application embodiment may include terminal devices such as tablet computers, laptop computers, mobile phones, supercomputers, and smart wearable devices. It can also be applied to databases, servers, and service response systems based on terminal artificial intelligence. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0150] For example, electronic devices can be stations (STAION, ST) in WLANs, cellular phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, handheld devices with wireless communication capabilities, computing devices or other processing devices connected to a wireless modem, computers, laptops, handheld communication devices, handheld computing devices, and / or other devices for communicating over wireless systems, as well as next-generation communication systems, such as mobile terminals in 5G networks, mobile terminals in future evolved Public Land Mobile Networks (PLMNs), or mobile terminals in future evolved Non-terrestrial Networks (NTNs).

[0151] This application also provides a computer-readable storage medium. Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing a processor. The program can be stored in a computer-readable storage medium, which is a non-transitory medium, such as random access memory, read-only memory, flash memory, hard disk, solid-state drive, magnetic tape, floppy disk, optical disk, and any combination thereof. The storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DVD)), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0152] This application embodiment may also provide a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application embodiment are generated. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0153] When the computer program product is executed by a computer, the computer performs the method described in the foregoing method embodiments. The computer program product can be a software installation package; when the foregoing method is required, the computer program product can be downloaded and executed on the computer.

[0154] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0155] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.

Claims

1. A brain-computer interface data privacy protection method, characterized in that, The method includes: Collect local EEG signals; Preprocessing is performed on the local EEG signal to obtain a normalized EEG signal; The deep convolutional generative adversarial network (DBN) is trained using the normalized EEG signal and standard latent noise until it converges, resulting in a simulated EEG signal output by the DBN that is consistent with the distribution of the normalized EEG signal, thus effectively preventing the leakage of user privacy data. The simulated EEG signals are uploaded to a cloud server, which then uses the simulated EEG signals to train a large model.

2. The method of claim 1, wherein, The step of training the deep convolutional generative adversarial network using the normalized EEG signal and standard latent noise until the deep convolutional generative adversarial network converges includes: The standard latent noise is input into the generator, and a deconvolution operation is performed on the Gaussian random latent noise in the generator to map and generate a simulated EEG signal and the generator parameters corresponding to the simulated EEG signal. The normalized EEG signal or the simulated EEG signal is input into the discriminator, and the true or false discrimination score of the output signal and the discriminator parameters corresponding to the discrimination score are output. The generator parameters and the discriminator parameters are optimized based on an alternating optimization strategy until the loss error corresponding to the generator parameters and the discriminator parameters is within a preset range, at which point the deep convolutional generative adversarial network converges. The deep convolutional generative adversarial network includes the generator and the discriminator.

3. The method of claim 2, wherein, The generator and the discriminator achieve collaborative optimization through a minimax game, and the overall objective function of the deep convolutional generative adversarial network is expressed as: wherein, denotes the mathematical expectation of the corresponding distribution, denotes the discriminator score of the authenticity of the normalized electroencephalogram signal; denotes the discriminator score of the authenticity of the simulated electroencephalogram signal output by the generator.

4. The method of claim 2, wherein, The optimization process for the generator parameters and the discriminator parameters based on the alternating optimization strategy includes: With the generator parameters fixed, the discriminator loss is minimized using gradient descent, and the discriminator parameters are then updated. With the discriminator parameters fixed, the generator loss is minimized by gradient descent, and the generator parameters are updated.

5. The method of claim 4, wherein, The expression corresponding to the discriminator loss is: wherein, wherein, is a Sigmoid activation function for mapping the output score of the discriminator to the interval [0, 1]; is the simulated electroencephalogram signal output by the generator, denotes the authenticity discrimination score of the simulated electroencephalogram signal output by the generator by the discriminator, denotes the authenticity discrimination score of the normalized electroencephalogram signal by the discriminator, denotes the mathematical expectation of the corresponding distribution, denotes that the sample is subject to the data distribution .

6. The method according to claim 4, characterized in that, The expression corresponding to the generator loss is: in, The Sigmoid activation function is used to map the output score of the discriminator to the interval [0, 1]. The simulated EEG signal output by the generator. This represents the score by which the discriminator determines the authenticity of the simulated EEG signal output by the generator. This represents the mathematical expectation of the corresponding distribution. This indicates that the sample follows a data distribution. .

7. The method according to claim 1, characterized in that, The preprocessing operation on the local EEG signal to obtain a normalized EEG signal includes: Dimensional adjustment is performed on the local EEG signal; The local EEG signal after dimension adjustment is subjected to noise filtering to obtain a filtered EEG signal. The filtered EEG signal was normalized using the global minimum-maximum normalization method to obtain a normalized EEG signal.

8. A brain-computer interface data privacy protection device, characterized in that, The device includes: The signal acquisition module is used to acquire local EEG signals; The preprocessing module is used to perform preprocessing operations on the local EEG signal to obtain a normalized EEG signal; The simulated EEG signal generation module is used to train the deep convolutional generative adversarial network (DGAN) using the normalized EEG signal and standard latent noise until the DGAN converges, thereby obtaining a simulated EEG signal output by the DGAN that is consistent with the distribution of the normalized EEG signal, so as to effectively avoid the leakage of user privacy data. The training module is used to upload the simulated EEG signals to a cloud server, so that the cloud server can use the simulated EEG signals to train a large model.

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

10. An electronic device, characterized in that, The electronic device includes: A memory that stores a computer program; The processor, which is communicatively connected to the memory, executes the method of any one of claims 1 to 7 when the computer program is invoked.