Electroencephalogram analysis model training method and apparatus, computer device, computer-readable storage medium and computer program product

By masking and reconstructing the simulated source signal and simulated EEG signal, the EEG signal analysis model is trained, which solves the problem of large differences between models in different environments and subjects, and achieves accurate results in a variety of scenarios. EEG signal decoding ability.

WO2024169267A9PCT designated stage expired Publication Date: 2024-09-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/130339
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-02-14
Filing Date
2023-11-08
Publication Date
2024-09-19

AI Technical Summary

Technical Problem

Existing EEG signal analysis models have large differences in different environments and subjects, resulting in reduced model performance and difficulty in accurately analyzing EEG signals in various application scenarios.

Method used

By masking and reconstructing the simulated source signal and simulated EEG signal, the EEG signal analysis model is trained so that it can universally decode EEG signals in a variety of scenarios.

Benefits of technology

The universal decoding ability of the EEG signal analysis model is improved, and the EEG information in real EEG signals can be accurately decoded in various downstream task scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023130339_19092024_PF_FP_ABST
    Figure CN2023130339_19092024_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of computers, and provides an electroencephalogram analysis model training method and apparatus, a device and a storage medium. The method comprises: acquiring a first embedded vector of a simulation source signal and a second embedded vector of a simulation electroencephalogram; separately masking the first embedded vector and the second embedded vector to correspondingly obtain a first mask vector of the simulation source signal and a second mask vector of the simulation electroencephalogram; performing signal reconstruction on the simulation source signal on the basis of the first mask vector to obtain a reconstructed source signal, and performing signal reconstruction on the simulation electroencephalogram on the basis of the second mask vector to obtain a reconstructed electroencephalogram; and, on the basis of the difference between the simulation source signal and the reconstructed source signal and the difference between the simulation electroencephalogram and the reconstructed electroencephalogram, training an electroencephalogram analysis model.
Need to check novelty before this filing date? Find Prior Art

Description

Training method, device, computer equipment, computer-readable storage medium, and computer program product for EEG signal analysis model

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese patent application with application number 202310149984.9 and application date February 14, 2023, and claims the priority of the above Chinese patent application. The entire content of the above Chinese patent application is hereby introduced into this application as a reference. Technical Field

[0003] The present application relates to the field of computer technology, and in particular to a training method, apparatus, computer equipment, computer-readable storage medium, and computer program product for an electroencephalogram (EEG) signal analysis model. Background Art

[0004] A brain-computer interface (BCI) is a technology that creates a direct connection between the human or animal brain and an external device, enabling information exchange between the brain and the device. By analyzing EEG signals and detecting and identifying the activation effects of different brain regions, BCIs can determine user intent, thereby enabling direct communication and control between the human brain and external devices. BCIs have broad application prospects in fields such as gaming and entertainment, industrial processes, and medical engineering. However, due to the complex and unstable composition of EEG signals, the EEG signals of the same subject in different environments, or of multiple subjects in the same environment, can be different and highly variable, limiting the reusability of training data and reducing model performance. Therefore, mitigating the variability of EEG signals to improve model performance is a technical problem that needs to be addressed.

[0005] Related technologies often employ adversarial training to mitigate the performance degradation caused by variability in training data. However, this approach relies on a large amount of real EEG signal data, which limits the model's performance and makes it suitable only for specific application scenarios. Therefore, a new training method for EEG signal analysis models is urgently needed to accurately analyze EEG signals in a variety of application scenarios.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a training method, apparatus, computer device, computer-readable storage medium, and computer program product for an EEG signal analysis model, which can enable the trained EEG signal analysis model to have universal decoding capabilities for EEG signals, can more accurately decode EEG information in real EEG signals, and can be widely applied to various downstream task scenarios. The technical solution is as follows:

[0008] The present invention provides a method for training an EEG signal analysis model, which is applied to a computer device. The method includes:

[0009] Masking the embedding vector of the simulated source signal and the embedding vector of the simulated EEG signal respectively to obtain a mask vector of the simulated source signal and a mask vector of the simulated EEG signal, wherein the simulated source signal is used to simulate an electrophysiological signal generated inside the brain of the target subject, and the simulated EEG signal is used to simulate an electrical signal measured from the scalp of the target subject by a sensor;

[0010] Based on the mask vector of the simulated source signal and the mask vector of the simulated EEG signal, reconstructing the simulated source signal and the simulated EEG signal to obtain a reconstructed source signal and a reconstructed EEG signal, wherein the signal reconstruction includes encoding and decoding;

[0011] An EEG signal analysis model is trained based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

[0012] The present invention provides a training device for an electroencephalogram (EEG) signal analysis model, comprising:

[0013] a first acquisition module configured to acquire a first embedding vector of a simulated source signal and a second embedding vector of a simulated EEG signal, wherein the simulated source signal is used to simulate an electrophysiological signal generated inside the brain of the target subject, and the simulated EEG signal is used to simulate an electrical signal measured from the scalp of the target subject by a sensor;

[0014] a masking module configured to mask the first embedding vector and the second embedding vector respectively, to obtain a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal;

[0015] a reconstruction module configured to perform signal reconstruction on the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and to perform signal reconstruction on the simulated EEG signal based on the second mask vector to obtain a reconstructed EEG signal, wherein the signal reconstruction includes encoding and decoding;

[0016] The first training module is configured to train an EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

[0017] An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the training method of the EEG signal analysis model in the embodiment of the present application.

[0018] An embodiment of the present application provides a computer-readable storage medium, which stores at least one computer program. The at least one computer program is loaded and executed by a processor to implement a training method for an EEG signal analysis model as described in an embodiment of the present application.

[0019] An embodiment of the present application provides a computer program product, including a computer program, which is executed by a processor to implement the training method of the EEG signal analysis model provided in the embodiment of the present application.

[0020] The embodiment of the present application provides a training method for an EEG signal analysis model, by masking the first embedding vector of the simulation source signal and the second embedding vector of the simulation EEG signal respectively, the masked first embedding vector (i.e., the first mask vector) and the masked second embedding vector (i.e., the second mask vector) can be obtained, so that the randomness of the input data can be increased. Then, encoding and decoding are performed respectively by the first mask vector and the second mask vector, and the reconstructed source signal corresponding to the simulation source signal and the reconstructed EEG signal corresponding to the simulation EEG signal can be reconstructed. Then, based on the difference between the simulation source signal and the reconstructed source signal and the difference between the simulation EEG signal and the reconstructed EEG signal, the EEG signal analysis model is trained so that the EEG signal analysis model after training can have a universal decoding capability for EEG signals collected in various scenarios, and thus can decode the EEG information in the real EEG signal more accurately, and can be widely used in various downstream task scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0022] FIG1 is a schematic diagram of an implementation environment of a training method for an EEG signal analysis model provided in accordance with an embodiment of the present application;

[0023] FIG2 is a flow chart of a method for training an EEG signal analysis model according to an embodiment of the present application;

[0024] FIG3 is a flow chart of another method for training an EEG signal analysis model according to an embodiment of the present application;

[0025] FIG4 is a schematic diagram of brain region distribution according to an embodiment of the present application;

[0026] FIG5 is a schematic structural diagram of an embedded module provided according to an embodiment of the present application;

[0027] FIG6 is a schematic structural diagram of a deconvolution module provided according to an embodiment of the present application;

[0028] FIG7 is a schematic diagram of the structure of an EEG signal analysis model provided according to an embodiment of the present application;

[0029] FIG8 is a schematic diagram of a training process of an EEG signal analysis model provided according to an embodiment of the present application;

[0030] FIG9 is a block diagram of a training device for an EEG signal analysis model according to an embodiment of the present application;

[0031] FIG10 is a block diagram of another training device for an EEG signal analysis model according to an embodiment of the present application;

[0032] FIG11 is a structural block diagram of a terminal provided according to an embodiment of the present application;

[0033] FIG12 is a schematic diagram of the structure of a server provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0035] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on the quantity and execution order.

[0036] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0037] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the source signals, simulated source signals, EEG signals and simulated EEG signals involved in this application are all obtained with full authorization.

[0038] The following explains the terms used in this application.

[0039] 1) Artificial Intelligence (AI): It is the theory, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0040] 2) Artificial intelligence technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.

[0041] 3) Machine Learning (ML): This is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0042] 4) Brain-Computer Interface (BCI): This refers to a direct connection between the human or animal brain and an external device, enabling direct communication between the two. Broadly speaking, BCIs include but are not limited to brain signals, muscle signals, or other signals. The ultimate goal is to achieve a seamless interaction between the virtual and real worlds.

[0043] 5) Electroencephalography (EEG): This is a non-invasive method for measuring electrical activity in the brain. It involves placing electrodes on the scalp and recording the voltage potentials generated by electrical currents in and around neurons.

[0044] 6) Motor Imagery (MI): When imagining limb (or muscle) movement without actual movement, specific brain regions are activated. By analyzing EEG signals and identifying activation patterns in different brain regions, the user's intent is determined, enabling direct communication and control between the brain and external devices. Currently, common motor imagery involves the left and right sides, right hand, feet, and tongue.

[0045] 7) Convolutional Neural Networks (CNN): A feed-forward neural network consisting of several convolutional layers and pooling layers.

[0046] 8) Self-Attention Model (Transformer): The Transformer is a deep learning model that uses a self-attention mechanism to weight the salience of each part of the input data differently. It is primarily used in natural language processing and computer vision.

[0047] 9) Feature: The intermediate layer result after the target is input into CNN, which is the representation of the input in high-dimensional space after nonlinear transformation.

[0048] 10) Embedded processing: The process of converting an analog signal into a corresponding digital sequence (vector) through analog-to-digital (A / D) conversion.

[0049] The following will explain the training method of the EEG signal analysis model provided in the embodiment of the present application based on machine learning technology and brain-computer interface technology.

[0050] The training method of the EEG signal analysis model provided in the embodiment of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. Taking the computer device as an example of a server, the implementation environment of the training method of the EEG signal analysis model provided in the embodiment of the present application is introduced. Figure 1 is a schematic diagram of the implementation environment of the training method of the EEG signal analysis model provided in accordance with the embodiment of the present application. Referring to Figure 1, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 are directly or indirectly connected via wired or wireless communication, and this application does not limit this.

[0051] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a car terminal, etc., but is not limited thereto. An application with EEG signal processing capability is installed on the terminal 101. The application may be a virtual reality application, a game application, or an artificial intelligence application with EEG signal processing capability, which is not limited in the embodiments of the present application. The application is associated with the server 102, and the server 102 provides background services. In some embodiments, the terminal 101 may also be an electronic device with a brain-computer interface, which can obtain EEG signals from the target object's head through electrodes.

[0052] In some embodiments, the server 102 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the server 102 may have a data transmission interface, which is used to receive the EEG signals collected by the terminal 101 with a brain-computer interface. In some embodiments, the server 102 undertakes the main computing work and the terminal 101 undertakes the secondary computing work; or, the server 102 undertakes the secondary computing work and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 adopt a distributed computing architecture for collaborative computing.

[0053] In a possible implementation of an embodiment of the present application, the server 102 is able to reconstruct the EEG signal based on the EEG signal analysis model to obtain a reconstructed signal, and then train the EEG signal analysis model based on the difference between the EEG signal and the reconstructed signal. After the training process of the EEG signal analysis model is completed, the server 102 sends the trained EEG signal analysis model to the terminal 101 via a wired or wireless connection. The terminal 101 receives the trained EEG signal analysis model and inputs the data information corresponding to the EEG signal analysis model into an application with an EEG signal processing function, so that when the user uses the application to process the EEG signal, the EEG signal can be processed according to the trained EEG signal analysis model.

[0054] FIG2 is a flow chart of a method for training an EEG signal analysis model according to an embodiment of the present application. As shown in FIG2 , the method is described in the embodiment of the present application by taking the server as an example. The method for training the EEG signal analysis model includes the following steps:

[0055] 201. The server obtains a first embedding vector of a simulated source signal and a second embedding vector of a simulated electroencephalographic signal, where the simulated source signal is used to simulate an electrophysiological signal generated inside a target object's brain, and the simulated electroencephalographic signal is used to simulate an electrical signal measured from the target object's scalp by a sensor.

[0056] In an embodiment of the present application, a simulated source signal is an electrical signal generated by simulating a real source signal, and the source signal is an electrophysiological signal generated inside the brain of the target subject, which is used to reflect the brain activity and brain connection information of the target subject; a simulated EEG signal is an electrical signal generated by simulating a real EEG signal, and the EEG signal is an electrical signal measured from the scalp of the target subject's brain by a sensor, which is used to reflect the voltage potential generated by the current in and around the neurons in the brain of the target subject. Based on the EEG signal analysis model, the server can convert the simulated source signal and the simulated EEG signal into vector representations by embedding them separately, that is, obtaining the embedded vector of the simulated source signal and the embedded vector of the simulated EEG signal.

[0057] 202. The server masks the first embedding vector and the second embedding vector respectively, and correspondingly obtains a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal.

[0058] In this embodiment of the present application, the server masks the first embedded vector to cover some of the elements in the first embedded vector, thereby obtaining a masked first embedded vector, also known as a first masked vector, which increases the diversity and randomness of the input data. Similarly, the server masks the second embedded vector to cover some of the elements in the second embedded vector, thereby obtaining a masked second embedded vector, also known as a second masked vector.

[0059] 203. The server reconstructs the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and reconstructs the simulated EEG signal based on the second mask vector to obtain a reconstructed EEG signal. The signal reconstruction includes encoding and decoding.

[0060] In an embodiment of the present application, the server, based on the EEG signal analysis model, can restore the first embedding vector of the simulated source signal by predicting the values ​​of the obscured elements in the first embedding vector. The server can then reconstruct the simulated source signal based on the restored first embedding vector to obtain a reconstructed source signal. Similarly, the server can restore the second embedding vector of the simulated EEG signal by predicting the values ​​of the obscured elements in the second embedding vector of the simulated EEG signal. The server can then reconstruct the simulated EEG signal based on the restored second embedding vector to obtain a reconstructed EEG signal.

[0061] 204. The server trains an EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

[0062] In an embodiment of the present application, the server can obtain the training loss of the EEG signal analysis model by determining the difference between the simulated source signal and the reconstructed source signal, as well as the difference between the simulated EEG signal and the reconstructed EEG signal. Among them, the training loss is used to reflect the training accuracy of the EEG signal analysis model, and the training loss is negatively correlated with the training accuracy. If the training loss of the EEG signal analysis model is smaller, the training accuracy of the EEG signal analysis model is higher, that is, the EEG signal analysis model has a stronger decoding ability for the simulated source signal and the simulated EEG signal.

[0063] The embodiment of the present application provides a training method for an EEG signal analysis model, by masking the first embedding vector of the simulation source signal and the first embedding vector of the simulation EEG signal respectively, the masked first embedding vector (i.e., the first mask vector) and the masked second embedding vector (i.e., the second mask vector) can be obtained to increase the randomness of the input data. Then, by encoding and decoding the first mask vector and the second mask vector respectively, the reconstructed source signal corresponding to the simulation source signal and the reconstructed EEG signal corresponding to the simulation EEG signal can be reconstructed. Based on the difference between the simulation source signal and the reconstructed source signal and the difference between the simulation EEG signal and the reconstructed EEG signal, the EEG signal analysis model is trained so that the EEG signal analysis model after training can have a universal decoding capability for EEG signals, and can then decode the EEG information in the real EEG signal more accurately, and can be widely used in various downstream task scenarios.

[0064] FIG3 is a flow chart of another method for training an EEG signal analysis model according to an embodiment of the present application. As shown in FIG3 , the method is described in the embodiment of the present application by taking the server as an example. The method for training an EEG signal analysis model includes the following steps:

[0065] 301. The server obtains random white noise.

[0066] In the embodiment of the present application, the random white noise refers to noise whose power spectrum density is uniformly distributed in the frequency domain. The server can generate a stable simulation source signal by processing the acquired white noise.

[0067] 302. The server processes the random white noise based on the activation form and activation position of the source signal to generate a simulated source signal. The source signal is used to represent the electrophysiological signal generated inside the brain of the target object. The activation form is used to represent the frequency range of the source signal. The activation position is used to represent the location where the source signal is generated. The simulated source signal is used to simulate the electrophysiological signal generated inside the brain of the target object.

[0068] In an embodiment of the present application, the source signal is an electrophysiological signal generated inside the brain of the target object, which is used to reflect the brain activity and brain connection information of the target object. The target object can be a human or an animal. The simulated source signal is an electrical signal generated by simulating a real source signal. Since there are multiple brain regions inside the brain, the frequency range of the source signals generated by different brain regions is also different. Based on the activation form and activation position of the source signal, the server can determine the frequency range of the source signal and the generation position of the source signal, and then process the random white noise according to the frequency range to obtain a simulated source signal of a specific frequency band. The frequency range of the simulated source signal is consistent with the source signal.

[0069] In some embodiments, for the activation location of the source signal, this application uses the brain region definition specification of HCPMMP1.0 (Human Connectome Project Multi-Modal Parcellation version 1.0) to divide the target subject's brain. Specifically, referring to Figure 4, this application defines 44 brain regions with bilateral symmetrical distribution based on the functional and structural characteristics of the brain. Among them, the center point of each brain region is used as the activation location of the source signal. Each activation location has a 0.5 probability of randomly generating a source signal.

[0070] In some embodiments, the server performs band-pass filtering on the random white noise based on the activation form of the source signal to generate a simulated source signal of a specific frequency band. Referring to Table 1, a total of five frequency bands are set in the embodiment of the present application, which include the main frequency ranges of the EEG signal. Among them, each source signal randomly selects a frequency band from the five frequency bands with a probability of 0.2 as the frequency range of the source signal, and then performs band-pass filtering on the random white noise to generate a simulated source signal. Since different types of brain waves reflect different human body states, different frequency ranges of EEG signals often express different meanings, as shown in Table 2.

[0071] Table 1

[0072] Table 2

[0073] In some embodiments, this solution can also combine the 44 brain regions into 10 sets based on location and function. Each set considers source signals from multiple frequency bands at multiple activation locations, facilitating the model's subsequent EEG signal classification tasks. As shown in Table 3, due to the bilateral symmetry of brain regions, the 22 brain regions on either side can be divided into five sets.

[0074] Table 3

[0075] 303. The server processes the simulated source signal based on the diffusion mode of the source signal to generate a simulated EEG signal, which is used to simulate the electrical signal measured from the scalp of the target object by the sensor.

[0076] In the embodiment of the present application, the source signal is a signal generated inside the brain and cannot be directly measured. In order to simulate the EEG signal measured on the scalp, it is usually necessary to determine the diffusion mode of the source signal, that is, the source signal passes through the gray matter of the brain, the skull, the soft tissue, etc. from the inside of the brain, and finally diffuses to the scalp. Based on the diffusion mode of the source signal, the server processes the simulation signal of the source signal, that is, the simulated source signal, and can generate a simulated EEG signal. Among them, the simulated EEG signal is an electrical signal generated by simulating a real EEG signal, and the EEG signal is an electrical signal measured from the scalp of the target object by a sensor, which is used to reflect the voltage potential generated by the current in and around the brain neurons of the target object.

[0077] In some embodiments, the server can determine the diffusion mode of the source signal based on the parameters of the head forward model, and then process the simulated source signal based on the diffusion mode to obtain the simulated EEG signal. The parameters of the head forward model are shown in Table 4.

[0078] Table 4

[0079] 304. The server obtains a first embedding vector of the simulated source signal and a second embedding vector of the simulated EEG signal.

[0080] In some embodiments, the server performs time convolution on the simulation source signal and the simulation EEG signal respectively to obtain the time source vector of the simulation source signal and the time EEG vector of the simulation EEG signal, and then normalizes the time source vector and the time EEG vector respectively to obtain the normalized time source vector and the normalized time EEG vector respectively, and then performs spatial convolution on the normalized time source vector and the normalized time EEG vector respectively to obtain the first embedding vector of the simulation source signal and the second embedding vector of the simulation EEG signal.

[0081] In an embodiment of the present application, the EEG signal analysis model includes an embedding module, which includes a time convolution layer, a normalization layer, and a spatial convolution layer. Among them, the time convolution layer is used to perform feature aggregation on the simulation source signal and the simulated EEG signal in the dimension of time; the normalization layer is used to normalize the simulation source signal and the simulated EEG signal; and the spatial convolution layer is used to perform feature aggregation on the simulation source signal and the simulated EEG signal in the dimension of space. Based on the time convolution layer, the server can obtain the time source vector of the simulation source signal and the time EEG vector of the simulation EEG signal by performing time convolution on the simulation source signal and the simulated EEG signal respectively. Then, based on the normalization layer, the time source vector and the time EEG vector are normalized respectively, and the normalized time source vector and the normalized time EEG vector are obtained accordingly. Finally, based on the spatial convolution layer, the normalized time source vector and the time EEG vector are spatially convolved respectively to obtain the first embedding vector of the simulation source signal and the second embedding vector of the simulation EEG signal.

[0082] For example, Figure 5 is a structural diagram of an embedding module provided according to an embodiment of the present application. The embedding module is used to embed the simulated source signal and the simulated EEG signal respectively, thereby converting the simulated source signal and the simulated EEG signal into vector representations. As shown in Figure 5, C represents the number of channels, and K represents the size of the convolution kernel. The embedding module consists of a temporal convolution layer 501, a normalization layer 502, and a spatial convolution layer 503. Among them, the size of the convolution kernel in the temporal convolution layer is 2×2, the number of channels is 1, and the number of convolution kernels is 65; the size of the convolution kernel in the spatial convolution layer is 2×2, C represents the number of electrodes, that is, the number of channels of the simulated EEG signal, which is usually set to 64, and the number of convolution kernels is 5.

[0083] 305. The server masks the first embedding vector and the second embedding vector respectively, and correspondingly obtains a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal.

[0084] In the embodiment of the present application, the server masks the first embedded vector to cover some of the elements in the first embedded vector, thereby obtaining the masked first embedded vector, also known as the first masked vector. Similarly, the server masks the second embedded vector to cover some of the elements in the second embedded vector, thereby obtaining the masked second embedded vector, also known as the second masked vector. This increases the diversity and randomness of the input data.

[0085] In some embodiments, the server masks the first embedded vector and the second embedded vector based on a pre-set masking ratio. The masking ratio can be 50%, 60%, 70%, etc. For example, if the masking ratio is 50%, half of the elements in the embedded vector can be masked by masking the first embedded vector. The embodiments of the present application do not impose any restrictions on the masking ratio.

[0086] 306. The server encodes the first mask vector and the second mask vector respectively, and correspondingly obtains a first intermediate feature vector of the simulated source signal and a second intermediate feature vector of the simulated EEG signal.

[0087] In an embodiment of the present application, the EEG signal analysis model further includes an encoder corresponding to the simulated source signal and an encoder corresponding to the simulated EEG signal, and the encoder is used to extract features from the simulated source signal and the simulated EEG signal. Based on the encoder, the server can encode the mask vector of the simulated source signal and the mask vector of the simulated EEG signal obtained after masking, respectively, to obtain a first intermediate feature vector of the simulated source signal and a second intermediate feature vector of the simulated EEG signal, thereby mapping the simulated source signal and the simulated EEG signal to a common feature space, facilitating joint processing of the feature vectors of the two types of signals.

[0088] 307. The server performs feature alignment on the first intermediate feature vector and the second intermediate feature vector to obtain a source feature vector of the simulated source signal and an EEG feature vector of the simulated EEG signal.

[0089] In an embodiment of the present application, the EEG signal analysis model further includes a joint encoder for aligning features of the simulated source signal and the simulated EEG signal. Based on the joint encoder, the server can perform feature alignment on the intermediate feature vectors of the encoded simulated source signal and the intermediate feature vectors of the simulated EEG signal to obtain a source feature vector of the simulated source signal and an EEG feature vector of the simulated EEG signal.

[0090] 308. The server decodes the source feature vector and the EEG feature vector respectively to obtain a decoded source feature vector and a decoded EEG feature vector respectively.

[0091] In an embodiment of the present application, the EEG signal analysis model further includes a decoder corresponding to the simulated source signal and a decoder corresponding to the simulated EEG signal. The decoder is used to predict obscured elements in the embedding vector, thereby restoring the embedding vector. Based on the decoder, the server can decode the source feature vector and the EEG feature vector obtained after feature alignment, respectively, to obtain a first embedding vector for the restored simulated source signal and a second embedding vector for the restored simulated EEG signal.

[0092] In some embodiments, before encoding and decoding the simulated source signal and the simulated EEG signal, the server masks some elements of the embedding vectors of the two types of signals. In order to restore the embedding vector, the server can fill the feature vector of the signal. Accordingly, the server fills the source feature vector based on the mask mark of the simulated source signal to obtain the filled source feature vector, and the mask mark of the simulated source signal is used to represent the masked elements in the embedding vector of the simulated source signal; the server fills the EEG feature vector based on the mask mark of the simulated EEG signal to obtain the filled EEG feature vector, and the mask mark of the simulated EEG signal is used to represent the masked elements in the embedding vector of the simulated EEG signal; the server decodes the filled source feature vector and the filled EEG feature vector respectively, and obtains the decoded source feature vector and the decoded EEG feature vector respectively. Wherein, the server can mask some elements in the embedding vector by masking the first embedding vector and the second embedding vector respectively to obtain the mask vector. Based on the difference between the mask vector and the embedding vector, the server can determine the mask mark of the simulation signal, and the mask mark is used to represent the masked elements in the embedding vector. The server can predict the value of the masked elements in the embedding vector by decoding the source feature vector and the EEG feature vector. Therefore, before decoding, the server can determine the masked elements in the embedding vector based on the mask mark, and then use the preset weights to fill the source feature vector and the EEG feature vector respectively, so that the filled source feature vector and the filled EEG feature vector can be decoded respectively to obtain the first embedding vector of the restored simulation source signal and the second embedding vector of the simulation EEG signal.

[0093] 309. The server maps the decoded source feature vector to a reconstructed source signal, and maps the decoded EEG feature vector to a reconstructed EEG signal.

[0094] In an embodiment of the present application, the EEG signal analysis model further includes a deconvolution module corresponding to the simulated source signal and a deconvolution module corresponding to the simulated EEG signal. The deconvolution module is configured to perform feature mapping on the simulated source signal and the simulated EEG signal. Based on the deconvolution module, the server is capable of mapping the source feature vector of the decoded simulated source signal to the reconstructed source signal and mapping the EEG feature vector of the decoded simulated EEG signal to the reconstructed EEG signal.

[0095] In some embodiments, the deconvolution module includes a deconvolution layer and a convolution layer. Accordingly, the server performs deconvolution processing on the decoded source feature vector to obtain a deconvolution source vector of the simulated source signal; the server performs convolution processing on the deconvolution source vector to obtain a reconstructed source signal; the server performs deconvolution processing on the decoded EEG feature vector to obtain a deconvolution EEG vector of the simulated EEG signal; the server performs convolution processing on the deconvolution EEG vector to obtain a reconstructed EEG signal. Among them, the deconvolution module includes a deconvolution layer and a convolution layer. The deconvolution layer is used to deconvolve the decoded source feature vector and the decoded EEG feature vector to obtain a deconvolution source vector of the simulated source signal and a deconvolution EEG vector of the simulated EEG signal. The convolution layer is used to further process the deconvolution source vector and the deconvolution EEG vector, thereby mapping the simulated source signal and the simulated EEG signal from the feature space back to the original space to obtain the reconstructed source signal and the reconstructed EEG signal.

[0096] For example, Figure 6 is a structural diagram of a deconvolution module provided according to an embodiment of the present application. The deconvolution module is used to perform feature mapping on the simulated source signal and the simulated EEG signal, respectively, so as to map the source feature vector and the EEG feature vector to the reconstructed source signal and the reconstructed EEG signal. As shown in Figure 6, C represents the number of channels, and the deconvolution module consists of a deconvolution layer 601 and a convolution layer 602. The size of the convolution kernel in the deconvolution layer is 2×2, the number of channels is 64, and the number of convolution kernels is 5; the size of the convolution kernel in the convolution layer is 1×1, the number of channels is 1, and the number of convolution kernels is 65.

[0097] 310. The server trains an EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

[0098] In an embodiment of the present application, the server can obtain the training loss of the EEG signal analysis model by determining the difference between the simulated source signal and the reconstructed source signal, as well as the difference between the simulated EEG signal and the reconstructed EEG signal. Based on the training loss, the model parameters of the EEG signal analysis model can be updated. The training loss is used to reflect the training accuracy of the EEG signal analysis model, and the training loss is negatively correlated with the training accuracy. The smaller the training loss of the EEG signal analysis model, the higher the training accuracy of the EEG signal analysis model, that is, the stronger the decoding ability of the EEG signal analysis model for the simulated source signal and the simulated EEG signal.

[0099] For example, FIG7 is a structural diagram of an EEG signal analysis model provided according to an embodiment of the present application. The EEG signal analysis model is composed of an embedding module 701, an embedding module 702, a first encoder 703, a second encoder 704, a joint encoder 705, a first decoder 706, a second decoder 707, a deconvolution module 708, and a deconvolution module 709. Among them, the first encoder 703, the second encoder 704, and the joint encoder 705 are composed of a hidden layer and a forward layer. The input of the EEG signal analysis model is a simulated source signal and a simulated EEG signal. First, the simulated EEG signal and the simulated source signal are converted into an embedding vector using an embedding module. After passing through the embedding module, a fixed position encoding is added to the embedding vector to add position information to the embedding vector. The mask vector obtained after masking the embedding vector is then input to the first encoder and the second encoder respectively to obtain the intermediate feature vector of the simulated source signal and the intermediate feature vector of the simulated EEG signal, that is, to map the signals of the two modalities to a common feature space. The joint encoder then further performs feature alignment on the intermediate feature vectors of the two types of signals to obtain a source feature vector and an EEG feature vector. The EEG feature vector and the source feature vector are input to the first decoder and the second decoder for decoding respectively. After decoding, the EEG feature vector and the source feature vector are mapped back to the original space through the deconvolution module to obtain the reconstructed EEG signal and the reconstructed source signal.

[0100] In some embodiments, the specific parameters of each module in the EEG signal analysis model are shown in Table 5. The first encoder, second encoder, joint encoder, first decoder, and second encoder in the EEG signal analysis model all adopt a Transformer structure. The number of Transformer layers is 3, 3, 2, 1, and 1, respectively. The hidden layer feature dimension is 64, the forward layer feature dimension is 256, the activation function is GeLU, the normalization function is BatchNorm, and the Dropout (dropout rate) is 0.1.

[0101] Table 5

[0102] In some embodiments, the server determines the total loss of the model based on the reconstruction loss of the simulated source signal and the reconstruction loss of the simulated EEG signal. Accordingly, the server obtains the reconstruction loss of the simulated source signal based on the difference between the simulated source signal and the reconstructed source signal; the server obtains the reconstruction loss of the simulated EEG signal based on the difference between the simulated EEG signal and the reconstructed EEG signal; the server weightedly sums the reconstruction loss of the simulated source signal and the reconstruction loss of the simulated EEG signal to obtain the training loss of the EEG signal analysis model; and the server updates the parameters of the EEG signal analysis model based on the training loss. The server can determine the reconstruction loss of the simulated source signal by determining the difference between the simulated source signal and the reconstructed source signal; similarly, the reconstruction loss of the simulated source signal can be determined by determining the difference between the simulated EEG signal and the reconstructed EEG signal. Furthermore, the weighted summation of the reconstruction losses corresponding to the two signals can be performed to determine the total loss of the model, i.e., the training loss of the EEG signal analysis model. Based on this training loss, the model parameters of the EEG signal analysis model can be updated to reduce the training loss, thereby training an updated EEG signal analysis model. By training the model with the combined simulation signals of the two modalities, the model can be promoted to align the signal characteristics of the simulated source signal and the simulated EEG signal, thereby improving the EEG signal analysis model's general decoding capability for EEG signals.

[0103] In some embodiments, the training loss of the EEG signal analysis model is determined according to the following formula (1).

[0104] Among them, L is the training loss of the EEG signal analysis model, Reconstruct EEG signals and source signals respectively; M x , M s are the masks of the simulated EEG signal and the simulated source signal, respectively. In the mask, 1 represents the masked part and 0 represents the rest. numel(·) represents the statistical M x , M s The number of non-zero positions in γ is used for normalization; γ is a hyperparameter used to balance the reconstruction loss of the simulated source signal and the reconstruction loss of the simulated EEG signal, γ = 1.

[0105] In some embodiments, the server can construct a target EEG signal model based on the target embedding module and the first encoder in the EEG signal analysis model, and fine-tune the target EEG signal model using the real EEG signal. Accordingly, the server constructs the target EEG signal model based on the target embedding module, the first encoder, and the first decoder; the first decoder is used to decode the EEG feature vector of the real EEG signal; the target EEG signal model is used to reconstruct the EEG signal, and the real EEG signal is used to represent the electrical signal measured from the target subject's scalp based on the sensor; the server reconstructs the real EEG signal based on the target EEG signal model to obtain a reconstructed signal; the server trains the target EEG signal model based on the difference between the real EEG signal and the reconstructed signal. Among them, the target embedding module is the embedding module in the EEG signal analysis model that embeds the simulated EEG signal; the first decoder is the encoder in the EEG signal analysis model that encodes the embedding vector of the simulated EEG signal. The server can construct the target EEG signal model based on the target embedding module, the first encoder, and the first decoder for decoding the EEG feature vector of the real EEG signal. Based on the target embedding module, first encoder, and first decoder in the target EEG model, the server can embed, encode, and decode the real EEG signal, thereby reconstructing the reconstructed signal corresponding to the real EEG signal. Based on the difference between the real EEG signal and the reconstructed signal, the target EEG signal analysis model is trained, so that the trained target EEG signal model can more accurately decode the EEG information in the real EEG signal. This further improves the model's decoding ability for real EEG signals, building on the model's general decoding ability for EEG signals.

[0106] For example, Figure 8 is a schematic diagram of the training process of an EEG signal analysis model provided according to an embodiment of the present application. As shown in Figure 8, first, the embodiment of the present application can be divided into three parts. The first part is to construct a simulation signal. First, the source signal is modeled, that is, the random noise is processed according to the activation form and activation position of the source signal to obtain a simulation source signal. Then, according to the parameters in the head forward model, the diffusion mode of the source signal can be determined, and the simulation source signal is processed to obtain a simulated EEG signal. The second part is to pre-train the EEG signal analysis model using the simulated EEG signal and the simulated source signal to improve the model's general decoding ability for EEG signals. The third part is for multiple downstream task scenarios, such as motion imagination, steady-state visual evoked potentials, sleep stage classification, and epilepsy localization. The embodiment of the present application can use real EEG signals to fine-tune the EEG signal analysis model obtained by pre-training, that is, the target EEG signal model corresponding to the downstream task uses the same embedding module and encoder as the EEG signal analysis model, and designs the decoder of the target EEG signal model according to the specific downstream task. Before fine-tuning the target EEG signal model using real EEG signals, the pre-trained weights of the embedding module and encoder are loaded, and the decoder is initialized. The target EEG signal model is then fine-tuned based on the real EEG signals provided by the downstream task. After the target EEG signal model is trained, loading the target EEG signal model enables the model to process real EEG signals and test its decoding ability.

[0107] The embodiment of the present application provides a training method for an EEG signal analysis model, by masking the first embedding vector of the simulation source signal and the second embedding vector of the simulation EEG signal respectively, the masked first embedding vector (i.e., the first mask vector) and the masked second embedding vector (i.e., the second mask vector) can be obtained, so that the randomness of the input data can be increased. Then, by encoding and decoding the first mask vector and the second mask vector respectively, the reconstructed source signal corresponding to the simulation source signal and the reconstructed EEG signal corresponding to the simulation EEG signal can be reconstructed. Then, based on the difference between the simulation source signal and the reconstructed source signal and the difference between the simulation EEG signal and the reconstructed EEG signal, the EEG signal analysis model is trained so that the EEG signal analysis model after training can have a universal decoding capability for EEG signals, and thus can decode the EEG information in the real EEG signal more accurately, and can be widely used in various downstream task scenarios.

[0108] It is understandable that in the embodiments of the present application, real EEG signals and other user-related data are involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0109] Figure 9 is a block diagram of a training device for an EEG signal analysis model according to an embodiment of the present application. The device is used to perform the training method for the EEG signal analysis model described above. Referring to Figure 9 , the device includes: a first acquisition module 901, a mask module 902, a reconstruction module 903, and a training module 904.

[0110] A first acquisition module 901 is configured to acquire a first embedding vector of a simulated source signal and a second embedding vector of a simulated EEG signal, wherein the simulated source signal is used to simulate an electrophysiological signal generated in the brain of a target subject, and the simulated EEG signal is used to simulate an electrical signal measured from the scalp of the target subject by a sensor;

[0111] a masking module 902 configured to mask the first embedding vector and the second embedding vector respectively, to obtain a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal;

[0112] A reconstruction module 903 is configured to perform signal reconstruction on the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and to perform signal reconstruction on the simulated EEG signal based on the second mask vector to obtain a reconstructed EEG signal, wherein the signal reconstruction includes encoding and decoding;

[0113] The first training module 904 is configured to train the EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

[0114] In some embodiments, Figure 10 is a block diagram of another training device for an EEG signal analysis model provided according to an embodiment of the present application. Referring to Figure 10, the reconstruction module 903 includes: an encoding unit 9031, configured to encode the first mask vector and the second mask vector respectively, corresponding to obtaining the first intermediate eigenvector of the simulated source signal and the second intermediate eigenvector of the simulated EEG signal; an alignment unit 9032, configured to perform feature alignment on the first intermediate eigenvector and the second intermediate eigenvector, to obtain the source eigenvector of the simulated source signal and the EEG eigenvector of the simulated EEG signal. A decoding unit 9033, configured to decode the source eigenvector and the EEG eigenvector respectively, corresponding to obtaining the decoded source eigenvector and the decoded EEG eigenvector; a mapping unit 9034, configured to map the decoded source eigenvector to the reconstructed source signal, and map the decoded EEG eigenvector to the reconstructed EEG signal.

[0115] In some embodiments, the decoding unit 9033 is configured to fill the source feature vector based on the mask mark of the simulated source signal to obtain a filled source feature vector, and the mask mark of the simulated source signal is used to represent the masked elements in the embedded vector of the simulated source signal; fill the EEG feature vector based on the mask mark of the simulated EEG signal to obtain a filled EEG feature vector, and the mask mark of the simulated EEG signal is used to represent the masked elements in the embedded vector of the simulated EEG signal; decode the filled source feature vector and the filled EEG feature vector respectively to obtain the decoded source feature vector and the decoded EEG feature vector respectively.

[0116] In some embodiments, the mapping unit 904 is configured to perform deconvolution processing on the decoded source feature vector to obtain a deconvolution source vector of the simulated source signal; perform convolution processing on the deconvolution source vector to obtain a reconstructed source signal; perform deconvolution processing on the decoded EEG feature vector to obtain a deconvolution EEG vector of the simulated EEG signal; and perform convolution processing on the deconvolution EEG vector to obtain a reconstructed EEG signal.

[0117] In some embodiments, continuing with FIG10 , the apparatus further includes: a second acquisition module 905 configured to acquire random white noise; a first generation module 906 configured to process the random white noise based on the activation form and activation position of the source signal to generate a simulated source signal, the source signal being used to represent the electrophysiological signal generated inside the brain of the target object, the activation form being used to represent the frequency range of the source signal, and the activation position being used to represent the location where the source signal is generated; a second generation module 907 configured to process the simulated source signal based on the diffusion mode of the source signal to generate a simulated EEG signal.

[0118] In some embodiments, the first training module 904 is configured to obtain the reconstruction loss of the simulated source signal based on the difference between the simulated source signal and the reconstructed source signal; obtain the reconstruction loss of the simulated EEG signal based on the difference between the simulated EEG signal and the reconstructed EEG signal; perform weighted summation of the reconstruction loss of the simulated source signal and the reconstruction loss of the simulated EEG signal to obtain the training loss of the EEG signal analysis model; and update the parameters of the EEG signal analysis model based on the training loss.

[0119] In some embodiments, referring to Figure 10, the first acquisition module 901 includes: a first convolution unit 9011, configured to perform time convolution on the simulation source signal and the simulation EEG signal respectively, to obtain the time source vector of the simulation source signal and the time EEG vector of the simulation EEG signal; a normalization unit 9012, configured to normalize the time source vector and the time EEG vector respectively, to obtain the normalized time source vector and the normalized time EEG vector; a second convolution unit 9013, configured to perform spatial convolution on the normalized time source vector and the time EEG vector respectively, to obtain the embedding vector of the simulation source signal and the embedding vector of the simulation EEG signal.

[0120] In some embodiments, the EEG signal analysis model includes a target embedding module and a first encoder, the target embedding module is used to embed the simulated EEG signal, and the first encoder is used to encode the embedding vector of the simulated EEG signal;

[0121] Continuing with Figure 10, the device also includes: a model construction module 908, configured to construct a target EEG signal model based on the target embedding module, the first encoder and the first decoder, the first decoder being used to decode the EEG feature vector of the real EEG signal, the target EEG signal model being used to reconstruct the EEG signal, and the real EEG signal being used to represent the electrical signal measured from the scalp of the target object based on the sensor; a signal reconstruction module 909, configured to reconstruct the real EEG signal based on the target EEG signal model to obtain a reconstructed signal; a second training module 910, configured to train the target EEG signal model based on the difference between the real EEG signal and the reconstructed signal.

[0122] The embodiment of the present application provides a training device for an EEG signal analysis model. By masking the embedding vector of the simulation source signal and the embedding vector of the simulation EEG signal respectively, the embedding vector of the masked simulation source signal and the embedding vector of the masked simulation EEG signal, that is, the mask vector, can be obtained to increase the randomness of the input data. Then, by encoding and decoding the mask vector of the simulation source signal and the mask vector of the simulation EEG signal, the reconstructed source signal corresponding to the simulation source signal and the reconstructed EEG signal corresponding to the simulation EEG signal can be reconstructed. Based on the difference between the simulation source signal and the reconstructed source signal and the difference between the simulation EEG signal and the reconstructed EEG signal, the EEG signal analysis model is trained so that the EEG signal analysis model after training can have a universal decoding capability for EEG signals, and can then more accurately decode the EEG information in the real EEG signal, and can be widely used in various downstream task scenarios.

[0123] It should be noted that the training device for the EEG signal analysis model provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the training device for the EEG signal analysis model provided in the above embodiment and the training method embodiment of the EEG signal analysis model belong to the same concept. The specific implementation process is detailed in the method embodiment.

[0124] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a terminal, the terminal can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The embodiments of the present application do not limit this.

[0125] Figure 11 is a block diagram of a terminal 1100 according to an embodiment of the present application. Terminal 1100 may be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. Terminal 1100 may also be referred to as user equipment, a portable terminal, a laptop terminal, a desktop terminal, or other similar names.

[0126] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .

[0127] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0128] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one computer program, which is used to be executed by the processor 1101 to implement the training method of the EEG signal analysis model provided in the method embodiment of the present application.

[0129] In some embodiments, terminal 1100 may optionally include a peripheral device interface 1103 and at least one peripheral device. Processor 1101, memory 1102, and peripheral device interface 1103 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1103 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107, and a power supply 1108.

[0130] The peripheral device interface 1103 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1101 and the memory 1102. In some embodiments, the processor 1101, the memory 1102, and the peripheral device interface 1103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1101, the memory 1102, and the peripheral device interface 1103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0131] The RF circuit 1104 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1104 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the RF circuit 1104 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The RF circuit 1104 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or wireless fidelity (WiFi) networks. In some embodiments, the RF circuit 1104 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0132] The display screen 1105 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1105 is a touch screen display, the display screen 1105 also has the ability to collect touch signals on the surface or above the surface of the display screen 1105. The touch signal can be input as a control signal to the processor 1101 for processing. At this time, the display screen 1105 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1105, which is set on the front panel of the terminal 1100; in other embodiments, there can be at least two display screens 1105, which are respectively set on different surfaces of the terminal 1100 or in a folding design; in other embodiments, the display screen 1105 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1100. Even more, the display screen 1105 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1105 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0133] The camera assembly 1106 is used to capture images or videos. In some embodiments, the camera assembly 1106 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1106 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0134] The audio circuit 1107 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1101 for processing, or input into the radio frequency circuit 1104 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 1100. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1101 or the radio frequency circuit 1104 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as distance measurement. In some embodiments, the audio circuit 1107 may also include a headphone jack.

[0135] Power supply 1108 is used to power various components in terminal 1100. Power supply 1108 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1108 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.

[0136] In some embodiments, the terminal 1100 further includes one or more sensors 1109 , including but not limited to: an acceleration sensor 1110 , a gyroscope sensor 1111 , a pressure sensor 1112 , an optical sensor 1113 , and a proximity sensor 1114 .

[0137] The accelerometer 1110 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the terminal 1100. For example, the accelerometer 1110 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 1101 can control the display screen 1105 to display the user interface in either a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 1110. The accelerometer 1110 can also be used to collect game or user motion data.

[0138] The gyroscope sensor 1111 can detect the orientation and rotation angle of the terminal 1100. The gyroscope sensor 1111 can work with the accelerometer 1110 to collect the user's 3D movements on the terminal 1100. Based on the data collected by the gyroscope sensor 1111, the processor 1101 can implement the following functions: motion sensing (such as changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0139] The pressure sensor 1112 can be provided on the side frame of the terminal 1100 and / or below the display screen 1105. When the pressure sensor 1112 is provided on the side frame of the terminal 1100, it can detect the user's gripping signal of the terminal 1100, and the processor 1101 can perform left-hand or right-hand recognition or shortcut operations based on the gripping signal collected by the pressure sensor 1112. When the pressure sensor 1112 is provided below the display screen 1105, the processor 1101 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 1105. Operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0140] Optical sensor 1113 is used to detect ambient light intensity. In one embodiment, processor 1101 can control the display brightness of display screen 1105 based on the ambient light intensity detected by optical sensor 1113. Specifically, when the ambient light intensity is high, the display brightness of display screen 1105 is increased; when the ambient light intensity is low, the display brightness of display screen 1105 is decreased. In another embodiment, processor 1101 can also dynamically adjust the shooting parameters of camera assembly 1106 based on the ambient light intensity detected by optical sensor 1113.

[0141] Proximity sensor 1114, also known as a distance sensor, is typically located on the front panel of terminal 1100. Proximity sensor 1114 is used to detect the distance between the user and the front of terminal 1100. In one embodiment, when proximity sensor 1114 detects that the distance between the user and the front of terminal 1100 is gradually decreasing, processor 1101 controls display screen 1105 to switch from the screen-on state to the screen-off state. When proximity sensor 1114 detects that the distance between the user and the front of terminal 1100 is gradually increasing, processor 1101 controls display screen 1105 to switch from the screen-off state to the screen-on state.

[0142] Those skilled in the art will understand that the structure shown in FIG11 does not constitute a limitation on the terminal 1100 , and the terminal 1100 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0143] FIG12 is a schematic diagram of the structure of a server provided according to an embodiment of the present application. The server 1200 may vary greatly due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1201 and one or more memories 1202, wherein the memory 1202 stores at least one computer program, which is loaded and executed by the processor 1201 to implement the training method of the EEG signal analysis model provided by each of the above method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output, and may also include other components for implementing device functions.

[0144] The present application also provides a computer-readable storage medium having at least one computer program stored therein, which is loaded and executed by a processor to implement the training method of the EEG signal analysis model in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0145] An embodiment of the present application also provides a computer program product, including a computer program product, which is executed by a processor to implement the training method of the EEG signal analysis model in the above embodiment.

[0146] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0147] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for training an electroencephalogram (EEG) signal analysis model, the method comprising: Obtaining a first embedding vector of a simulated source signal and a second embedding vector of a simulated electroencephalographic signal, wherein the simulated source signal is used to simulate an electrophysiological signal generated inside the brain of the target object, and the simulated electroencephalographic signal is used to simulate an electrical signal measured from the scalp of the brain of the target object based on a sensor; Masking the first embedding vector and the second embedding vector respectively, and correspondingly obtaining a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal; Reconstructing the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and reconstructing the simulated electroencephalogram signal based on the second mask vector to obtain a reconstructed electroencephalogram signal, wherein the signal reconstruction includes encoding and decoding; Based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal, an EEG signal analysis model is trained.

2. The method according to claim 1, wherein: The performing signal reconstruction on the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and performing signal reconstruction on the simulated electroencephalogram signal based on the second mask vector to obtain a reconstructed electroencephalogram signal, comprises: Encoding the first mask vector and the second mask vector respectively, and correspondingly obtaining a first intermediate feature vector of the simulated source signal and a second intermediate feature vector of the simulated EEG signal; Performing feature alignment on the first intermediate feature vector and the second intermediate feature vector to obtain a source feature vector of the simulated source signal and an electroencephalogram feature vector of the simulated electroencephalogram signal; Decoding the source feature vector and the EEG feature vector respectively, and obtaining the decoded source feature vector and the decoded EEG feature vector respectively; The decoded source feature vector is mapped to the reconstructed source signal, and the decoded EEG feature vector is mapped to the reconstructed EEG signal.

3. The method according to claim 2, wherein: The decoding of the source feature vector and the EEG feature vector respectively to obtain the decoded source feature vector and the decoded EEG feature vector respectively includes: Filling the source feature vector based on the mask mark of the simulation source signal to obtain the filled source feature vector, wherein the mask mark of the simulation source signal is used to represent the masked elements in the embedded vector of the simulation source signal; Filling the EEG feature vector based on the mask mark of the simulated EEG signal to obtain the filled EEG feature vector, wherein the mask mark of the simulated EEG signal is used to represent the masked elements in the embedded vector of the simulated EEG signal; The filled source feature vector and the filled electroencephalogram feature vector are decoded respectively to obtain the decoded source feature vector and the decoded electroencephalogram feature vector respectively.

4. The method according to claim 2, wherein: The step of mapping the decoded source feature vector to the reconstructed source signal and mapping the decoded EEG feature vector to the reconstructed EEG signal comprises: Performing deconvolution processing on the decoded source feature vector to obtain a deconvolution source vector of the simulation source signal; Performing convolution processing on the deconvolution source vector to obtain the reconstructed source signal; Performing deconvolution processing on the decoded EEG feature vector to obtain a deconvolution EEG vector of the simulated EEG signal; The deconvolution electroencephalogram vector is subjected to convolution processing to obtain the reconstructed electroencephalogram signal.

5. The method according to any one of claims 1 to 4, wherein: The method further comprises: Get random white noise; Based on the activation form and activation position of the source signal, the random white noise is processed to generate the simulation source signal, the source signal is used to represent the electrophysiological signal generated in the brain of the target object, the activation form is used to represent the frequency range of the source signal, and the activation position is used to represent the position where the source signal is generated; Based on the diffusion mode of the source signal, the simulated source signal is processed to generate the simulated EEG signal.

6. The method according to any one of claims 1 to 4, wherein: The step of obtaining a first embedding vector of a simulated source signal and a second embedding vector of a simulated EEG signal includes: Performing time convolution on the simulation source signal and the simulation EEG signal respectively to obtain a time source vector of the simulation source signal and a time EEG vector of the simulation EEG signal; Normalizing the time source vector and the time EEG vector respectively, and obtaining the normalized time source vector and the normalized time EEG vector respectively; The normalized time source vector and the normalized time EEG vector are spatially convolved respectively to obtain a first embedding vector of the simulation source signal and a second embedding vector of the simulation EEG signal.

7. The method according to any one of claims 1 to 4, wherein: The step of training an EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal comprises: Based on the difference between the simulated source signal and the reconstructed source signal, obtaining the reconstruction loss of the simulated source signal; Based on the difference between the simulated EEG signal and the reconstructed EEG signal, obtaining the reconstruction loss of the simulated EEG signal; Performing a weighted summation on the reconstruction loss of the simulated source signal and the reconstruction loss of the simulated EEG signal to obtain the training loss of the EEG signal analysis model; Based on the training loss, the parameters of the EEG signal analysis model are updated.

8. The method according to any one of claims 1 to 4, wherein: The EEG signal analysis model includes a target embedding module and a first encoder, wherein the target embedding module is used to embed the simulated EEG signal, and the first encoder is used to encode the embedding vector of the simulated EEG signal; The method further comprises: Based on the target embedding module, the first encoder and the first decoder, a target EEG signal model is constructed, wherein the first decoder is used to decode the EEG feature vector of the real EEG signal, and the target EEG signal model is used to reconstruct the EEG signal, wherein the real EEG signal is used to represent the electrical signal measured from the scalp of the target object based on the sensor; Based on the target EEG signal model, reconstructing the real EEG signal to obtain a reconstructed signal; The target EEG signal model is trained based on the difference between the real EEG signal and the reconstructed signal.

9. A training device for an electroencephalogram signal analysis model, the device comprising: A first acquisition module is configured to acquire a first embedding vector of a simulated source signal and a second embedding vector of a simulated electroencephalogram signal, wherein the simulated source signal is used to simulate an electrophysiological signal generated inside the brain of the target object, and the simulated electroencephalogram signal is used to simulate an electrical signal measured from the scalp of the brain of the target object based on a sensor; A masking module, configured to mask the first embedding vector and the second embedding vector respectively, and correspondingly obtain a first mask vector of the simulated source signal and a second mask vector of the simulated EEG signal; A reconstruction module, configured to perform signal reconstruction on the simulated source signal based on the first mask vector to obtain a reconstructed source signal, and perform signal reconstruction on the simulated EEG signal based on the second mask vector to obtain a reconstructed EEG signal, wherein the signal reconstruction includes encoding and decoding; The first training module is configured to train an EEG signal analysis model based on the difference between the simulated source signal and the reconstructed source signal and the difference between the simulated EEG signal and the reconstructed EEG signal.

10. A computer device, comprising a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor and executes the training method of the electroencephalogram signal analysis model described in any one of claims 1 to 8.

11. A computer-readable storage medium, wherein the computer-readable storage medium is used to store at least one computer program, wherein the at least one computer program is used to execute the training method of the electroencephalogram signal analysis model described in any one of claims 1 to 8.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the training method of the electroencephalogram signal analysis model according to any one of claims 1 to 8 is implemented.