EEG signal recognition model training, EEG signal recognition method, device and medium
By generating EEG signal time domain and frequency domain position maps and training the recognition model, the problem of low EEG signal recognition efficiency and poor accuracy is solved, and more efficient EEG signal recognition is achieved.
Patent Information
- Application Number
- CN202210097544.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2042-01-27
AI Technical Summary
Existing EEG signal recognition methods have low recognition efficiency and poor recognition accuracy, making it difficult to quickly and accurately identify EEG signals.
By obtaining the target user's EEG signal sample data and electrode position image sample data, the EEG signal time domain position map and frequency domain position map are generated, and the EEG signal recognition model is trained to improve recognition efficiency and accuracy.
The recognition efficiency and recognition accuracy of EEG signals are improved, and the problems of low recognition efficiency and poor accuracy in existing methods are solved.
Smart Images

Figure CN114469139B
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an electroencephalogram (EEG) signal recognition model training, an electroencephalogram (EEG) signal recognition method, an apparatus and a medium. Background Art
[0002] The nervous system is one of the three major physiological systems that affect human thoughts and behaviors. It is composed of a large number of neurons. Neurons are cells in the brain that can generate, transmit and process electrical signals. Neurons are connected to other neurons to form functional networks. The brain can be regarded as a collection of interacting neural networks. EEG signals are spontaneous potential activities generated by the activities of these nerve cells and always present in the central nervous system. EEG records EEG signals by measuring the voltage changes on the scalp caused by the activity of the cerebral cortex. Since EEG signals are high-dimensional and unstable, and are usually mixed with various environmental noises, it is a challenging task to identify EEG signals.
[0003] At present, with the continuous efforts of researchers, there are many methods for the recognition of EEG signals. The EEG signal recognition method based on traditional machine learning usually divides feature extraction and feature classification into two steps, but the EEG signal recognition accuracy of this method is poor. With the continuous research of deep learning methods, EEG signal recognition methods based on deep learning are widely used. This method usually directly inputs EEG signals into EEG signal recognition models for recognition, but because EEG signals usually contain a lot of useless information, this method cannot quickly and accurately recognize EEG signals. Therefore, the recognition efficiency of existing EEG signal recognition methods is low and the recognition accuracy is poor. Summary of the invention
[0004] The embodiments of the present invention provide an EEG signal recognition model training, an EEG signal recognition method, an apparatus, a device and a medium, which can improve the recognition efficiency and recognition accuracy of EEG signals.
[0005] According to one aspect of the present invention, there is provided a method for training an EEG signal recognition model, comprising:
[0006] Acquire EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data;
[0007] Generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map;
[0008] The EEG signal recognition model is trained according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model that matches the target user.
[0009] According to another aspect of the present invention, there is provided a method for recognizing an electroencephalogram signal, comprising:
[0010] Acquire the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified;
[0011] Generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized;
[0012] The EEG signal recognition model input data is input into a target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model.
[0013] According to another aspect of the present invention, there is provided an electroencephalogram signal recognition model training device, comprising:
[0014] A sample data acquisition module, used to acquire EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data;
[0015] A model input sample data generation module, used to generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map;
[0016] The target EEG signal recognition model acquisition module is used to train the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain the target EEG signal recognition model that matches the target user.
[0017] According to another aspect of the present invention, there is provided an electroencephalogram signal recognition device, comprising:
[0018] An image acquisition module, used to acquire the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified;
[0019] An EEG signal recognition model input data generation module is used to generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized;
[0020] The user identity recognition module is used to input the EEG signal recognition model input data into the target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model.
[0021] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0022] at least one processor; and
[0023] a memory communicatively connected to the at least one processor; wherein,
[0024] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the EEG signal recognition model training method described in any embodiment of the present invention, or can execute the EEG signal recognition method described in any embodiment of the present invention.
[0025] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the EEG signal recognition model training method described in any embodiment of the present invention, or to implement the EEG signal recognition method described in any embodiment of the present invention when executed.
[0026] The technical solution of the embodiment of the present invention obtains the EEG signal sample data of the target user and the electrode position image sample data of the EEG signal sample data, and generates EEG signal recognition model input sample data including an EEG signal time domain position map and an EEG signal frequency domain position map according to the EEG signal sample data and the electrode position image sample data, and trains the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model matching the target user, thereby using the successfully trained target EEG signal recognition model to identify the user identity of the target user, thereby solving the problems of low recognition efficiency and poor recognition accuracy of existing EEG signal recognition methods, and can improve the recognition efficiency and recognition accuracy of EEG signals.
[0027] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 is a flow chart of a method for training an EEG signal recognition model provided in Embodiment 1 of the present invention;
[0030] Figure 2 is a schematic diagram of electrode position image sample data provided by Embodiment 1 of the present invention;
[0031] Figure 3 is an example flow chart of an EEG signal recognition model training method provided in Embodiment 1 of the present invention;
[0032] Figure 4 is a flow chart of an EEG signal recognition method provided by Embodiment 2 of the present invention;
[0033] Figure 5 is a schematic diagram of an EEG signal recognition model training device provided in Embodiment 3 of the present invention;
[0034] Figure 6 is a schematic diagram of an electroencephalogram signal recognition device provided by a fourth embodiment of the present invention;
[0035] Figure 7 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0036] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.
[0037] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.
[0038] The terms "first" and "second" and the like in the description, claims and drawings of the embodiments of the present invention are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.
[0039] Embodiment 1
[0040] Figure 1 This is a flowchart of a method for training an EEG signal recognition model provided by the first embodiment of the present invention. This embodiment is applicable to the case of improving the efficiency and accuracy of EEG signal recognition. The method can be executed by an EEG signal recognition model training device, which can be implemented by software and / or hardware, and can generally be directly integrated into an electronic device that executes the method. The electronic device can be a terminal device or a server device. The embodiment of the present invention does not limit the type of electronic device that executes the EEG signal recognition model training method. Specifically, Figure 1 As shown, the EEG signal recognition model training method may specifically include the following steps:
[0041] S110, acquiring EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data.
[0042] The target user may be any user, for example, a user handling banking business, a user undergoing traffic security inspection, or a user cooperating with relevant departments for inspection, etc., and the embodiments of the present invention do not limit this. It is understandable that the user identity of the target user can be identified by identifying the EEG signal of the target user. The EEG signal sample data may be the EEG signal data of the target user that can be used as a sample. The electrode position image sample data may be the position image data of the EEG electrode that can be used as a sample.
[0043] In an embodiment of the present invention, EEG signal sample data of the target user and electrode position image sample data of the EEG signal sample data are obtained to generate EEG signal recognition model input sample data based on the EEG signal sample data and the electrode position image sample data. Specifically, the EEG signal sample data of the target user may be obtained through an EEG signal acquisition device. It can be understood that the EEG signal sample data of the target user obtained through the EEG signal acquisition device may be obtained through electrodes on the EEG signal acquisition device, and different electrodes on the EEG signal acquisition device may correspond to different brain regions, that is, different electrodes may read signals from different brain regions, and the position of the EEG electrode may be used to characterize the position of the brain region, and each electrode may be physically adjacent to multiple electrodes.
[0044] Optionally, obtaining EEG signal sample data of the target user may include: displaying a preset display image to the target user; and obtaining EEG signal sample data generated when the target user views the preset display image.
[0045] The preset display image may be any image preset to be displayed to the target user, and may be used to display the image to the target user to obtain the EEG signal sample data of the target user.
[0046] Specifically, the preset display image is displayed to the target user to obtain the EEG signal sample data generated when the target user watches the preset display image. Optionally, the preset display image may include a target user face image and nine other arbitrary images. When the preset display image is displayed to the target user, each image in the preset display image can be randomly displayed, and the display time of each image can be 300 milliseconds. It can be understood that by analogy with the blind source classification method, the EEG signal sample data can be considered as a multi-channel "voice" signal obtained from several "microphones" (related to EEG electrodes), which record signals from multiple "speakers" (corresponding to the activity of cortical areas). That is, the EEG signal sample data can be a series of one-dimensional vectors, each of which can represent the electrode reading at a certain moment.
[0047] Optionally, the electrode position image sample data obtained by obtaining the EEG signal sample data may be a two-dimensional image. In a specific example, Figure 2 is a schematic diagram of electrode position image sample data provided by the first embodiment of the present invention. The EEG electrodes are distributed in the three-dimensional space of the scalp. The electrode positions can be projected from the three-dimensional space to the two-dimensional surface by azimuthal equidistant projection (AEP) to obtain Figure 2 The electrode position image sample data of the two-dimensional image shown. It can be understood that the shape of the electrode cap worn on the human head can be approximated to a sphere, and the projection of the electrode position on the 2D surface tangent to the vertex of the head can be determined by the same method. By using the equidistant azimuthal projection method to project the three-dimensional space onto the two-dimensional image, the distance from the projection center to any other point can be kept constant, that is, the relative distance between adjacent electrodes can be maintained.
[0048] S120. Generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map.
[0049] The EEG signal recognition model input sample data may be sample data input to the EEG signal recognition model. The EEG signal time domain position map may be an image obtained by combining the time domain values in the EEG signal sample data with the electrode position image sample data. The EEG signal frequency domain position map may be an image obtained by combining the frequency domain values in the EEG signal sample data with the electrode position image sample data.
[0050] In an embodiment of the present invention, after obtaining the EEG signal sample data of the target user and the electrode position image sample data of the EEG signal sample data, the EEG signal recognition model input sample data can be further generated based on the EEG signal sample data and the electrode position image sample data. Specifically, the EEG signal recognition model input sample data may include an EEG signal time domain position map and an EEG signal frequency domain position map. It can be understood that the EEG signal not only changes with time, but also the frequency and phase of the EEG signal also contain rich information. Therefore, the EEG signal frequency domain position map can be generated based on the EEG signal sample data and the electrode position image sample data, so as to input the EEG signal frequency domain position map into the EEG signal recognition model, thereby improving the recognition accuracy of the EEG signal.
[0051] Optionally, before generating the EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data, the EEG signal sample data may be subjected to noise reduction processing.
[0052] It is understandable that EEG signals are easily contaminated by various interferences during the acquisition process, such as power frequency interference generated by the EEG signal acquisition equipment itself and artifact signals generated by blinking, muscle activity, etc. These noises inevitably interfere with the characteristics of EEG signals and thus affect recognition accuracy. Therefore, after obtaining EEG signal sample data, noise reduction processing is required to improve the quality of EEG signals and enhance the signal-to-noise ratio of EEG signals.
[0053] Optionally, generating an EEG signal time domain position map based on EEG signal sample data and electrode position image sample data may include: determining a target electrode in the electrode position image sample data and a target electrode position of the target electrode in the electrode position image sample data; determining target electrode moment signal data of the target electrode based on the EEG signal sample data; generating multiple continuous initial EEG signal moment time domain position maps based on the target electrode moment signal data and the target electrode position; performing image supplementation processing on the initial EEG signal moment time domain position map by linear interpolation to obtain an EEG signal moment time domain position map; and using each EEG signal moment time domain position map within a preset time period as the EEG signal time domain position map.
[0054] Among them, the target electrode can be any electrode that can obtain EEG signal sample data. The target electrode position can be the position of the target electrode in the electrode position image sample data. The preset time period can be a pre-set time period. It can be understood that the EEG signal sample data can be the EEG signal within the preset time period. The target electrode moment signal data can be the EEG signal data of the target electrode at a specific moment within the preset time period, that is, the electrode reading of the target electrode at a specific moment within the preset time period. The initial EEG signal moment time domain position map can be the initial image of the EEG signal time domain position map at a specific moment within the preset time period. The EEG signal moment time domain position map can be the time domain position map of the EEG signal at a specific moment within the preset time period.
[0055] Specifically, after obtaining the target user's EEG signal sample data and the electrode position image sample data of the EEG signal sample data, the target electrode in the electrode position image sample data and the target electrode position in the electrode position image sample data can be further determined, and the target electrode moment signal data of the target electrode can be determined based on the EEG signal sample data, so as to generate multiple continuous initial EEG signal moment time domain position maps based on the target electrode moment signal data and the target electrode position, and perform image supplementation processing on the initial EEG signal moment time domain position map through linear interpolation to obtain the EEG signal moment time domain position map, so as to use each EEG signal moment time domain position map within a preset time as the EEG signal time domain position map. Optionally, generating multiple continuous initial EEG signal moment time domain position maps based on the target electrode moment signal data and the target electrode position can be to fill the target electrode moment signal data with the target electrode position to generate multiple continuous initial EEG signal moment time domain position maps.
[0056] The above technical solution, by performing image supplementation processing on the time domain position map of the initial EEG signal moment by linear interpolation method, can prevent the time domain position map of the initial EEG signal moment from being too sparse and affecting the recognition efficiency of the EEG signal recognition model, thereby ensuring the recognition efficiency of the EEG signal recognition model.
[0057] Optionally, generating an EEG signal frequency domain position map based on EEG signal sample data and electrode position image sample data may include: determining the target electrode in the electrode position image sample data and the target electrode position of the target electrode in the electrode position image sample data; determining the target electrode moment signal data of the target electrode based on the EEG signal sample data; generating target electrode moment frequency domain signal data of the target electrode based on the target electrode moment signal data through discrete short-time Fourier transform; generating multiple continuous EEG signal moment frequency domain position maps based on the target electrode moment frequency domain signal data and the target electrode position; and using each EEG signal moment frequency domain position map within a preset time period as the EEG signal frequency domain position map.
[0058] The target electrode moment frequency domain signal data may be the frequency domain data of the EEG signal of the target electrode at a specific moment in a preset time period. The EEG signal moment frequency domain position diagram may be the frequency domain position diagram of the EEG signal at a specific moment in a preset time period.
[0059] Specifically, after obtaining the target user's EEG signal sample data and the electrode position image sample data of the EEG signal sample data, the target electrode in the electrode position image sample data and the target electrode position in the electrode position image sample data can be further determined, and the target electrode moment signal data of the target electrode can be determined based on the EEG signal sample data, so as to generate the target electrode moment frequency domain signal data of the target electrode based on the target electrode moment signal data through discrete short-time Fourier transform, and generate multiple continuous EEG signal moment frequency domain position maps based on the target electrode moment frequency domain signal data and the target electrode position, so as to use each EEG signal moment frequency domain position map within a preset time period as an EEG signal frequency domain position map.
[0060] Optionally, the target electrode moment frequency domain signal data of the target electrode is generated according to the target electrode moment signal data by discrete short-time Fourier transform, and the target electrode moment frequency domain signal data of the target electrode is generated according to the target electrode moment signal data by the following discrete short-time Fourier transform formula:
[0061]
[0062] Among them, T i represents the i-th channel in the EEG signal, x represents the discrete value in the time domain, K represents the discrete value in the frequency domain, and L represents the number of electrode data points.
[0063] The above technical scheme converts the EEG signal time domain value and the EEG signal frequency domain value into the EEG signal time domain position map and the EEG signal frequency domain position map of the two-dimensional image according to the target electrode position, so as to retain the spatial structure of the electrode, thereby representing the temporal evolution of brain activity through an image sequence within a preset time period.
[0064] S130, training the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model that matches the target user.
[0065] Among them, the EEG signal recognition model can be a model for recognizing EEG signals. The target EEG signal recognition model can be a target EEG signal recognition model that matches the target user. It is understandable that each user has different EEG signals. Therefore, the model parameters of the EEG signal recognition model trained according to the EEG signal recognition model input sample data of different users are different, that is, the target EEG signal recognition models matched with different target users are different.
[0066] In an embodiment of the present invention, after generating EEG signal recognition model input sample data based on EEG signal sample data and electrode position image sample data, the EEG signal recognition model can be further trained based on the EEG signal recognition model input sample data to obtain a target EEG signal recognition model matching the target user.
[0067] Optionally, training the EEG signal recognition model based on sample data input into the EEG signal recognition model may include: inputting the EEG signal time domain position map into the first convolutional neural network of the EEG signal recognition model, and inputting the EEG signal frequency domain position map into the second convolutional neural network of the EEG signal recognition model, so as to extract the EEG signal time domain features of the EEG signal time domain position map through the first convolutional neural network, and extract the EEG signal frequency domain features of the EEG signal frequency domain position map through the second convolutional neural network; performing feature splicing and fusion of the EEG signal time domain features and the EEG signal frequency domain features to obtain EEG signal fusion features; inputting the EEG signal fusion features into the recurrent neural network of the EEG signal recognition model to obtain EEG signal hidden layer information; classifying and identifying the EEG signal hidden layer information through the linear classifier of the EEG signal recognition model to obtain a user identity recognition result of the sample data input to the EEG signal recognition model; and comparing the user identity recognition result with the user identity labeling result of the sample data input to the EEG signal recognition model to determine the training effect of the EEG signal recognition model.
[0068] Among them, the first convolutional neural network can be a convolutional neural network in the EEG signal recognition model. The second convolutional neural network can be another convolutional neural network in the EEG signal recognition model. It can be understood that the convolutional neural network is a type of feedforward neural network that includes convolution calculations and has a deep structure. It has three important features: local receptive field, weight sharing, and downsampling. The local receptive field refers to the fact that the connection between neurons in the two layers of the network is a local connection rather than a full connection. This structure can greatly reduce the number of weights, reduce the complexity of the model, and make the network easier to converge. Weight sharing means that the connection weights between neurons in the same layer are the same. Since the weights are the same, the number of weights can be reduced. Downsampling is due to the fact that the input is generally large. In practice, there is no need to analyze the original image. The key is to effectively obtain image features. The downsampling process can be used to adjust the image size. The network structure of the convolutional neural network includes a convolutional layer, a pooling layer, and a fully connected layer.
[0069] Among them, the EEG signal time domain feature may be a feature extracted from the EEG signal time domain position map. The EEG signal frequency domain feature may be a feature extracted from the EEG signal frequency domain position map. The EEG signal fusion feature may be a feature obtained by fusing the EEG signal time domain feature and the EEG signal frequency domain feature. The EEG signal hidden layer information may be the hidden state information output by the recurrent neural network of the EEG signal recognition model. The user identity recognition result may be the result obtained by recognizing the user's EEG signal. The user identity marking result may be the marking result of the user's identity.
[0070] Specifically, after generating EEG signal recognition model input sample data according to EEG signal sample data and electrode position image sample data, the EEG signal time domain position map can be further input into the first convolutional neural network of the EEG signal recognition model, and the EEG signal frequency domain position map can be input into the second convolutional neural network of the EEG signal recognition model, so as to extract the EEG signal time domain features of the EEG signal time domain position map through the first convolutional neural network, and extract the EEG signal frequency domain features of the EEG signal frequency domain position map through the second convolutional neural network, so as to perform feature splicing and fusion of the EEG signal time domain features and the EEG signal frequency domain features to obtain EEG signal fusion features, and then input the EEG signal fusion features into the recurrent neural network of the EEG signal recognition model to obtain EEG signal hidden layer information, so as to classify and identify the EEG signal hidden layer information through the linear classifier of the EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input sample data, thereby comparing the user identity recognition result with the user identity labeling result of the EEG signal recognition model input sample data, and then determining the training effect of the EEG signal recognition model.
[0071] It is understandable that the loss value of the model can be calculated according to the user identity recognition result and the user identity tagging result through the model loss function, so as to train the EEG signal recognition model according to the loss value. Optionally, the cross entropy loss can be used as the model loss function. If the loss value meets the training requirements, such as being stable or always less than the set threshold, it means that the EEG signal recognition model is successfully trained, and the successfully trained EEG signal recognition model can be used as the target EEG signal recognition model to identify the user identity of the target user through the target EEG signal recognition model.
[0072] Optionally, the recurrent neural network can be a long short-term memory network (Long Short-term Memory Networks, LSTM). The EEG signal hidden layer information can be the hidden state information output by the last layer of LSTM units. The first convolutional neural network and the first convolutional layer of the second convolutional neural network can both adopt a conditional parameter convolution structure, and a squeeze excitation module can be included between the first convolutional layer and the second convolutional layer.
[0073] It can be understood that the Long Short-Term Memory Network is an improved recurrent neural network proposed to address the problem that gradient vanishing or gradient exploding may occur during traditional RNN training, resulting in the inability to process distant sequences and the loss of the ability to perceive distant moments.
[0074] The above technical solution, by adopting a conditional parameter convolution structure, can enable the EEG signal recognition model to have the ability to analyze specific users; by adding a squeeze excitation module between the first convolution layer and the second convolution layer, the EEG signal recognition model can make full use of global information and make a comprehensive judgment on the user's information, thereby improving the recognition accuracy of EEG signals.
[0075] In a specific example, Figure 3 is an example flow chart of a method for training an EEG signal recognition model provided in the first embodiment of the present invention. Figure 3 As shown, the method specifically includes the following contents:
[0076] (1) Determine the image sequence corresponding to the target user (i.e., the preset display image); wherein the image sequence may include one user face image and nine random images randomly selected from the image library. Obtain EEG signal sample data when the target user views the image sequence; wherein the images in the image sequence are presented in random order, and the duration of each image is 300 milliseconds.
[0077] (2) The electrode positions are projected from three-dimensional space to a two-dimensional surface through equidistant azimuthal projection to obtain electrode position image sample data.
[0078] (3) According to the electrode positions, the time domain and frequency domain values are respectively converted into two-dimensional images, namely, the EEG signal time domain position map and the EEG signal frequency domain position map. Specifically, the electrode positions are filled in with the electrode readings to obtain the EEG signal time domain position map, and the frequency domain signals obtained by discrete short-time Fourier transform (DSTFT) are filled in with the electrode positions to obtain the EEG signal frequency domain position map.
[0079] (4) The EEG signal time domain position map and the EEG signal frequency domain position map are respectively input into the convolutional neural network of the EEG signal recognition model for feature extraction to obtain the EEG signal time domain features and the EEG signal frequency domain features. The EEG signal time domain features and the EEG signal frequency domain features are fused and input into the long short-term memory network of the EEG signal recognition model. The hidden layer information of the last layer of the long short-term memory network unit is classified and recognized through the linear layer (i.e., linear classifier) of the EEG signal recognition model to obtain the classification result of the EEG signal.
[0080] (5) The EEG signal recognition model is trained according to the classification results of the EEG signal through the model loss function. Specifically, the cross entropy loss can be used as the model loss function.
[0081] The above technical solution, by converting the traditional one-dimensional vector EEG signal format into a two-dimensional grid-like EEG signal hierarchy, maps the electrode readings with the electrode position information, so as to keep the correlation between the EEG signal and the corresponding brain area consistent.
[0082] The technical solution of this embodiment obtains the EEG signal sample data of the target user and the electrode position image sample data of the EEG signal sample data, and generates EEG signal recognition model input sample data including an EEG signal time domain position map and an EEG signal frequency domain position map based on the EEG signal sample data and the electrode position image sample data, so as to train the EEG signal recognition model based on the EEG signal recognition model input sample data, thereby obtaining a target EEG signal recognition model matching the target user, which solves the problems of low recognition efficiency and poor recognition accuracy of existing EEG signal recognition methods, and can improve the recognition efficiency and recognition accuracy of EEG signals.
[0083] Embodiment 2
[0084] Figure 4 This is a flowchart of an EEG signal recognition method provided by the second embodiment of the present invention. This embodiment is applicable to the case of improving the efficiency and accuracy of EEG signal recognition. The method can be executed by an EEG signal recognition device, which can be implemented by software and / or hardware, and can generally be directly integrated into an electronic device that executes the method. The electronic device can be a terminal device or a server device. The embodiment of the present invention does not limit the type of electronic device that executes the EEG signal recognition method. Specifically, Figure 4 As shown, the EEG signal recognition method may specifically include the following steps:
[0085] S410, obtaining the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified.
[0086] The to-be-recognized EEG signal may be an EEG signal that needs to be recognized. The electrode position image data may be position image data of EEG electrodes.
[0087] In an embodiment of the present invention, the EEG signal to be identified of the target user and the electrode position image data of the EEG signal to be identified are obtained to generate EEG signal recognition model input data according to the EEG signal to be identified and the electrode position image data.
[0088] Optionally, obtaining the to-be-recognized electroencephalogram signal of the target user may include: displaying a preset display image to the target user; and obtaining the to-be-recognized electroencephalogram signal generated by the target user when viewing the preset display image.
[0089] Specifically, to obtain the EEG signal to be identified of the target user, a preset display image may be displayed to the target user to obtain the EEG signal to be identified generated when the target user views the preset display image.
[0090] S420. Generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized.
[0091] The EEG signal recognition model input data may be data input to the EEG signal recognition model. The time domain position map of the EEG signal to be recognized may be an image obtained by combining the time domain value in the EEG signal to be recognized and the electrode position image data. The frequency domain position map of the EEG signal to be recognized may be an image obtained by combining the frequency domain value in the EEG signal to be recognized and the electrode position image data.
[0092] In an embodiment of the present invention, after obtaining the target user's EEG signal to be identified and the electrode position image data of the EEG signal to be identified, the EEG signal recognition model input data can be further generated according to the EEG signal to be identified and the electrode position image data. Specifically, the EEG signal recognition model input data can include a time domain position map of the EEG signal to be identified and a frequency domain position map of the EEG signal to be identified.
[0093] Optionally, generating a time domain position map of an EEG signal to be identified based on the EEG signal to be identified and the electrode position image data may include: determining a target electrode in the electrode position image data and a target electrode position of the target electrode in the electrode position image data; determining the target electrode moment signal data to be identified of the target electrode based on the EEG signal to be identified; generating a plurality of continuous initial time domain position maps of an EEG signal to be identified based on the target electrode moment signal data to be identified and the target electrode position; performing image supplementation processing on the initial time domain position map of an EEG signal to be identified by a linear interpolation method to obtain a time domain position map of an EEG signal to be identified; and using each time domain position map of an EEG signal to be identified within a preset time period as the time domain position map of an EEG signal to be identified.
[0094] Among them, the signal data to be identified at the target electrode moment can be the EEG signal data to be identified at a specific moment in a preset time period, that is, the electrode reading to be identified at a specific moment in the preset time period. The time domain position map of the initial EEG signal to be identified moment can be the initial image of the time domain position map of the EEG signal to be identified at a specific moment in the preset time period. The time domain position map of the EEG signal to be identified moment can be the time domain position map of the EEG signal to be identified at a specific moment in the preset time period.
[0095] Specifically, after obtaining the target user's EEG signal to be identified and the electrode position image data of the EEG signal to be identified, the target electrode in the electrode position image data and the target electrode position of the target electrode in the electrode position image data can be further determined, and the target electrode moment signal data to be identified of the target electrode can be determined according to the EEG signal to be identified, and a plurality of continuous initial EEG signal moment time domain position maps to be identified are generated according to the target electrode moment signal data to be identified and the target electrode position, so as to obtain the EEG signal moment time domain position map by performing image supplementation processing on the initial EEG signal moment time domain position map through linear interpolation method, thereby taking each EEG signal moment time domain position map to be identified within a preset time period as the EEG signal moment time domain position map to be identified.
[0096] Optionally, generating a frequency domain position map of an EEG signal to be identified based on the EEG signal to be identified and the electrode position image data may include: determining a target electrode in the electrode position image data and a target electrode position of the target electrode in the electrode position image data; determining the target electrode moment signal data to be identified of the target electrode based on the EEG signal to be identified; generating the target electrode moment frequency domain signal data to be identified of the target electrode based on the target electrode moment signal data to be identified through discrete short-time Fourier transform; generating a plurality of continuous frequency domain position maps of the EEG signal to be identified at the moment based on the target electrode moment frequency domain signal data to be identified and the target electrode position; and using each frequency domain position map of the EEG signal to be identified at the moment within a preset time period as the frequency domain position map of the EEG signal to be identified.
[0097] The target electrode moment frequency domain signal data to be identified may be the frequency domain data of the target electrode's EEG signal to be identified at a specific moment within a preset time period. The EEG signal moment frequency domain position diagram may be the frequency domain position diagram of the EEG signal to be identified at a specific moment within a preset time period.
[0098] Specifically, after obtaining the target user's EEG signal to be identified and the electrode position image data of the EEG signal to be identified, the target electrode in the electrode position image data and the target electrode position of the target electrode in the electrode position image data can be further determined, and the target electrode moment signal data to be identified of the target electrode can be determined according to the EEG signal to be identified, and the target electrode moment signal data to be identified of the target electrode can be generated according to the target electrode moment signal data to be identified through discrete short-time Fourier transform, so as to generate multiple continuous EEG signal moment frequency domain position maps according to the target electrode moment frequency domain signal data to be identified and the target electrode position, so as to use each EEG signal moment frequency domain position map to be identified within a preset time period as the EEG signal frequency domain position map to be identified.
[0099] S430: Input the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model.
[0100] In an embodiment of the present invention, after generating EEG signal recognition model input data based on the EEG signal to be identified and the electrode position image data, the EEG signal recognition model input data can be further input into a target EEG signal recognition model matched with the target user, so as to identify the user identity of the target user through the target EEG signal recognition model.
[0101] Optionally, inputting the EEG signal recognition model input data into a target EEG signal recognition model that matches the target user, so as to identify the user identity of the target user through the target EEG signal recognition model, may include: inputting the time domain position map of the EEG signal to be identified into a first target convolutional neural network of the target EEG signal recognition model, and inputting the frequency domain position map of the EEG signal to be identified into a second target convolutional neural network of the target EEG signal recognition model, so as to extract the time domain features of the EEG signal to be identified of the time domain position map of the EEG signal to be identified through the first target convolutional neural network, and The network extracts the frequency domain features of the EEG signal to be identified from the frequency domain position map of the EEG signal to be identified; the time domain features of the EEG signal to be identified and the frequency domain features of the EEG signal to be identified are concatenated and fused to obtain the fused features of the EEG signal to be identified; the fused features of the EEG signal to be identified are input into the target recurrent neural network of the target EEG signal recognition model to obtain the hidden layer information of the EEG signal to be identified; the hidden layer information of the EEG signal to be identified is classified and identified by the linear classifier of the target EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input data, so as to identify the user identity of the target user.
[0102] Among them, the first target convolutional neural network can be a convolutional neural network in the target EEG signal recognition model. The second target convolutional neural network can be another convolutional neural network in the target EEG signal recognition model. The time domain features of the EEG signal to be identified can be features extracted from the time domain position map of the EEG signal to be identified. The frequency domain features of the EEG signal to be identified can be features extracted from the frequency domain position map of the EEG signal to be identified. The fusion features of the EEG signal to be identified can be features obtained by fusing the time domain features of the EEG signal to be identified and the frequency domain features of the EEG signal to be identified. The hidden layer information of the EEG signal to be identified can be the hidden state information output by the recurrent neural network of the target EEG signal recognition model.
[0103] Specifically, after the EEG signal recognition model input data is generated according to the EEG signal to be recognized and the electrode position image data, the time domain position map of the EEG signal to be recognized can be further input into the first target convolutional neural network of the target EEG signal recognition model, and the frequency domain position map of the EEG signal to be recognized can be input into the second target convolutional neural network of the target EEG signal recognition model, so as to extract the time domain features of the EEG signal to be recognized of the time domain position map of the EEG signal to be recognized through the first target convolutional neural network, and extract the frequency domain features of the EEG signal to be recognized of the frequency domain position map of the EEG signal to be recognized through the second target convolutional neural network. Then, the time domain features of the EEG signal to be recognized and the frequency domain features of the EEG signal to be recognized are spliced and fused to obtain the fused features of the EEG signal to be recognized, and the fused features of the EEG signal to be recognized are input into the target recurrent neural network of the target EEG signal recognition model to obtain the hidden layer information of the EEG signal to be recognized, and the hidden layer information of the EEG signal to be recognized is classified and recognized by the linear classifier of the target EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input data, thereby identifying the user identity of the target user.
[0104] Optionally, the target recurrent neural network can be a long short-term memory network. The hidden layer information of the EEG signal to be identified can be the hidden state information output by the last layer of LSTM units. The first convolutional layer of the first target convolutional neural network and the first convolutional layer of the second target convolutional neural network can both adopt a conditional parameter convolution structure, and a squeeze excitation module can be included between the first convolutional layer and the second convolutional layer.
[0105] In a specific example, the application scenario of user identification when handling banking business is used as an example. Identity authentication is a basic security precaution for banking business. Conventional identity authentication systems are based on passwords entered using keyboards, touch screens or mice. These identification methods are easy to lose, forget and steal. With the increasing security risks and the limitations of traditional models, biometric mechanisms, especially those based on neural activity, have emerged one after another. Although these authentication methods can use unique biometric technologies to improve security, they still face the following challenges: biometric features can be copied; after the body parts with these features are damaged, they cannot continue to be identified; there are certain restrictions on the use of different types of people, for example, disabled people without arms cannot use fingerprint recognition, and blind people cannot be recognized by iris. For various banking services, such as transfers and remittances, if the bank card password is stolen or cracked, and the fingerprint is copied, it will cause huge losses to users. Compared with traditional biometric technologies (such as face, fingerprint or DNA), EEG signals cannot be copied and stolen by current technology, cannot be obtained from the dead, and are difficult to obtain by coercion or violence. The huge pressure generated by people in danger will have a drastic impact on brain activity. Therefore, the use of EEG-based identity recognition technology in banking transactions can provide greater protection for the safety of customers' property.
[0106] The EEG signal recognition method currently widely used relies on manually constructed features, and a lot of preprocessing of the EEG signal is required before recognition. Traditional methods are generally divided into two stages: feature processing stage and feature classification stage. Among them, the feature processing stage is an extremely important part, and excellent feature extraction can greatly improve the feature classification accuracy of the model. However, traditional methods usually use manually designed data features, which makes the EEG signal recognition process complicated and error-prone, reducing recognition efficiency and accuracy.
[0107] The identification of users who conduct banking business by identifying EEG signals may specifically include: obtaining the EEG signals to be identified when the target user views the image sequence, and obtaining the electrode position image data. Determining the target electrode in the electrode position image data and the target electrode position of the target electrode in the electrode position image data, and determining the target electrode moment signal data to be identified of the target electrode according to the EEG signal to be identified. Inputting the target electrode moment signal data to be identified into the target electrode position, obtaining a plurality of continuous initial moment time domain position diagrams of the EEG signals to be identified, and performing image supplementation processing on the initial moment time domain position diagram of the EEG signals to be identified by linear interpolation method, obtaining the moment time domain position diagram of the EEG signals to be identified, thereby using the moment time domain position diagrams of the EEG signals to be identified in the preset time period as the moment time domain position diagram of the EEG signals to be identified. The target electrode moment frequency domain signal data to be identified of the target electrode is generated according to the target electrode moment signal data to be identified through discrete short-time Fourier transform, so as to generate multiple continuous moment frequency domain position diagrams of the EEG signal to be identified according to the target electrode moment frequency domain signal data to be identified and the target electrode position, so as to use each moment frequency domain position diagram of the EEG signal to be identified within a preset time period as the frequency domain position diagram of the EEG signal to be identified. The time domain position diagram of the EEG signal to be identified is input into the first target convolutional neural network of the target EEG signal recognition model, and the frequency domain position diagram of the EEG signal to be identified is input into the second target convolutional neural network of the target EEG signal recognition model, so as to extract the time domain features of the EEG signal to be identified of the time domain position diagram of the EEG signal to be identified through the first target convolutional neural network, and extract the frequency domain features of the EEG signal to be identified of the frequency domain position diagram of the EEG signal to be identified through the second target convolutional neural network. The time domain features of the EEG signal to be identified and the frequency domain features of the EEG signal to be identified are concatenated and fused to obtain the fused features of the EEG signal to be identified, and the fused features of the EEG signal to be identified are input into the target recurrent neural network of the target EEG signal recognition model to obtain the hidden layer information of the EEG signal to be identified, and the hidden layer information of the EEG signal to be identified is classified and identified by the linear classifier of the target EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input data, thereby identifying the user identity of the target user.
[0108] The above technical solution, by combining the recognition of EEG signals with the handling of financial services, can ensure the security of financial services and provide convenience for the handling of financial services.
[0109] The technical solution of this embodiment obtains the target user's EEG signal to be identified and the electrode position image data of the EEG signal to be identified, and generates EEG signal recognition model input data including a time domain position map of the EEG signal to be identified and a frequency domain position map of the EEG signal to be identified based on the EEG signal to be identified and the electrode position image data, so as to input the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, thereby identifying the user identity of the target user through the target EEG signal recognition model, which solves the problems of low recognition efficiency and poor recognition accuracy of existing EEG signal recognition methods and can improve the recognition efficiency and recognition accuracy of EEG signals.
[0110] Embodiment 3
[0111] Figure 5 is a schematic diagram of an EEG signal recognition model training device provided in Embodiment 3 of the present invention, such as Figure 5 As shown, the device includes: a sample data acquisition module 510, a model input sample data generation module 520 and a target EEG signal recognition model acquisition module 530, wherein:
[0112] The sample data acquisition module 510 is used to acquire the target user's EEG signal sample data and the electrode position image sample data of the EEG signal sample data;
[0113] The model input sample data generating module 520 is used to generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map;
[0114] The target EEG signal recognition model acquisition module 530 is used to train the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain the target EEG signal recognition model matched with the target user.
[0115] The technical solution of this embodiment obtains the EEG signal sample data of the target user and the electrode position image sample data of the EEG signal sample data, and generates EEG signal recognition model input sample data including an EEG signal time domain position map and an EEG signal frequency domain position map based on the EEG signal sample data and the electrode position image sample data, so as to train the EEG signal recognition model based on the EEG signal recognition model input sample data, thereby obtaining a target EEG signal recognition model matching the target user, which solves the problems of low recognition efficiency and poor recognition accuracy of existing EEG signal recognition methods, and can improve the recognition efficiency and recognition accuracy of EEG signals.
[0116] Optionally, the sample data acquisition module 510 may be specifically used to: display a preset display image to a target user; and acquire EEG signal sample data generated when the target user views the preset display image.
[0117] Optionally, the model input sample data generation module 520 can be specifically used to: determine the target electrode in the electrode position image sample data and the target electrode position of the target electrode in the electrode position image sample data; determine the target electrode moment signal data of the target electrode based on the EEG signal sample data; generate multiple continuous initial EEG signal moment time domain position maps based on the target electrode moment signal data and the target electrode position; perform image supplementation processing on the initial EEG signal moment time domain position map by linear interpolation to obtain an EEG signal moment time domain position map; and use each EEG signal moment time domain position map within a preset time period as an EEG signal time domain position map.
[0118] Optionally, the model input sample data generation module 520 can be specifically used to: determine the target electrode in the electrode position image sample data and the target electrode position in the electrode position image sample data; determine the target electrode moment signal data of the target electrode based on the EEG signal sample data; generate target electrode moment frequency domain signal data of the target electrode based on the target electrode moment signal data through discrete short-time Fourier transform; generate multiple continuous EEG signal moment frequency domain position maps based on the target electrode moment frequency domain signal data and the target electrode position; and use each EEG signal moment frequency domain position map within a preset time period as an EEG signal frequency domain position map.
[0119] Optionally, the target EEG signal recognition model acquisition module 530 can be specifically used to: input the EEG signal time domain position map into the first convolutional neural network of the EEG signal recognition model, and input the EEG signal frequency domain position map into the second convolutional neural network of the EEG signal recognition model, so as to extract the EEG signal time domain features of the EEG signal time domain position map through the first convolutional neural network, and extract the EEG signal frequency domain features of the EEG signal frequency domain position map through the second convolutional neural network; perform feature splicing and fusion on the EEG signal time domain features and the EEG signal frequency domain features to obtain the EEG signal fusion features; input the EEG signal fusion features into the recurrent neural network of the EEG signal recognition model to obtain the EEG signal hidden layer information; classify and identify the EEG signal hidden layer information through the linear classifier of the EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input sample data; compare the user identity recognition result with the user identity marking result of the EEG signal recognition model input sample data to determine the training effect of the EEG signal recognition model.
[0120] The above-mentioned EEG signal recognition model training device can execute the EEG signal recognition model training method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the EEG signal recognition model training method provided by any embodiment of the present invention.
[0121] Since the EEG signal recognition model training device introduced above is a device that can execute the EEG signal recognition model training method in the embodiment of the present invention, based on the EEG signal recognition model training method introduced in the embodiment of the present invention, the technical personnel in this field can understand the specific implementation of the EEG signal recognition model training device of this embodiment and its various variations, so how the EEG signal recognition model training device implements the EEG signal recognition model training method in the embodiment of the present invention will not be introduced in detail here. As long as the technical personnel in this field implement the device used by the EEG signal recognition model training method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0122] Embodiment 4
[0123] Figure 6 is a schematic diagram of an electroencephalogram signal recognition device provided by the fourth embodiment of the present invention, such as Figure 6 As shown, the device includes: an image acquisition module 610, a model input data generation module 620 and a user identification module 630, wherein:
[0124] An image acquisition module 610 is used to acquire the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified;
[0125] The model input data generating module 620 is used to generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized;
[0126] The user identity recognition module 630 is used to input the EEG signal recognition model input data into the target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model.
[0127] The technical solution of this embodiment obtains the target user's EEG signal to be identified and the electrode position image data of the EEG signal to be identified, and generates EEG signal recognition model input data including a time domain position map of the EEG signal to be identified and a frequency domain position map of the EEG signal to be identified based on the EEG signal to be identified and the electrode position image data, so as to input the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, thereby identifying the user identity of the target user through the target EEG signal recognition model, which solves the problems of low recognition efficiency and poor recognition accuracy of existing EEG signal recognition methods and can improve the recognition efficiency and recognition accuracy of EEG signals.
[0128] The above-mentioned EEG signal recognition device can execute the EEG signal recognition method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the EEG signal recognition method provided by any embodiment of the present invention.
[0129] Since the EEG signal recognition device introduced above is a device that can execute the EEG signal recognition method in the embodiment of the present invention, based on the EEG signal recognition method introduced in the embodiment of the present invention, the technical personnel in this field can understand the specific implementation of the EEG signal recognition device of this embodiment and its various variations, so how the EEG signal recognition device implements the EEG signal recognition method in the embodiment of the present invention is not introduced in detail here. As long as the technical personnel in this field implement the device used in the EEG signal recognition method in the embodiment of the present invention, it belongs to the scope of protection of this application.
[0130] Embodiment 5
[0131] Figure 7 It is a structural schematic diagram of an electronic device provided in Embodiment 5 of the present invention. Figure 7 A block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The electronic device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0132] like Figure 7 As shown, the electronic device 12 is in the form of a general purpose computing device. The components of the electronic device 12 may include, but are not limited to: one or more processors 16, a memory 28, and a bus 18 that connects various system components (including the memory 28 and the processor 16).
[0133] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0134] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0135] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0136] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0137] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and / or any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 through the bus 18. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0138] The processor 16 executes various functional applications and data processing by running the program stored in the memory 28, thereby realizing the EEG signal recognition model training method provided in the first embodiment of the present invention: obtaining the EEG signal sample data of the target user and the electrode position image sample data of the EEG signal sample data; generating EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map; training the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model matching the target user.
[0139] Or implement the EEG signal recognition method provided in the second embodiment of the present invention: obtain the EEG signal to be identified of the target user and the electrode position image data of the EEG signal to be identified; generate EEG signal recognition model input data according to the EEG signal to be identified and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be identified and a frequency domain position map of the EEG signal to be identified; input the EEG signal recognition model input data into the target EEG signal recognition model matched with the target user, so as to identify the user identity of the target user through the target EEG signal recognition model.
[0140] Embodiment 6
[0141] Embodiment 6 of the present invention further provides a computer storage medium storing a computer program, which, when executed by a computer processor, is used to execute the EEG signal recognition model training method described in the above-mentioned embodiment 1 of the present invention: obtaining EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data; generating EEG signal recognition model input sample data based on the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map; training an EEG signal recognition model based on the EEG signal recognition model input sample data to obtain a target EEG signal recognition model matching the target user.
[0142] Or the computer program, when executed by a computer processor, is used to execute the EEG signal recognition method described in the above-mentioned embodiment 2 of the present invention: obtaining the EEG signal to be identified of the target user and the electrode position image data of the EEG signal to be identified; generating EEG signal recognition model input data according to the EEG signal to be identified and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be identified and a frequency domain position map of the EEG signal to be identified; inputting the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, so as to identify the user identity of the target user through the target EEG signal recognition model.
[0143] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.
[0144] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0145] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0146] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0147] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for training an EEG signal recognition model, characterized in that: include: Acquire EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data; Generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map; Training the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model that matches the target user; Wherein, generating an EEG signal time domain position map according to the EEG signal sample data and the electrode position image sample data includes: Determine a target electrode in the electrode position image sample data and a target electrode position of the target electrode in the electrode position image sample data; Determining target electrode moment signal data of the target electrode according to the EEG signal sample data; Generating a plurality of continuous initial EEG signal time domain position diagrams according to the target electrode moment signal data and the target electrode position; Performing image supplementation processing on the initial EEG signal moment time domain position map by linear interpolation method to obtain the EEG signal moment time domain position map; Taking the time domain position diagram of each EEG signal within a preset time period as the time domain position diagram of the EEG signal; The target electrode moment signal data refers to the electrode reading of the target electrode at a specific moment in the preset time period; The step of generating an EEG signal frequency domain position map according to the EEG signal sample data and the electrode position image sample data includes: Determine a target electrode in the electrode position image sample data and a target electrode position of the target electrode in the electrode position image sample data; Determining target electrode moment signal data of the target electrode according to the EEG signal sample data; Generate target electrode moment frequency domain signal data of the target electrode according to the target electrode moment signal data by discrete short-time Fourier transform; Generating a plurality of continuous EEG signal moment frequency domain position maps according to the target electrode moment frequency domain signal data and the target electrode position; Using the moment frequency domain position diagram of each EEG signal within a preset time period as the frequency domain position diagram of the EEG signal; The step of training the EEG signal recognition model according to the EEG signal recognition model input sample data includes: Inputting the EEG signal time domain position map into the first convolutional neural network of the EEG signal recognition model, and inputting the EEG signal frequency domain position map into the second convolutional neural network of the EEG signal recognition model, so as to extract the EEG signal time domain features of the EEG signal time domain position map through the first convolutional neural network, and extract the EEG signal frequency domain features of the EEG signal frequency domain position map through the second convolutional neural network; Performing feature splicing and fusion of the EEG signal time domain features and the EEG signal frequency domain features to obtain EEG signal fusion features; Inputting the EEG signal fusion features into the recurrent neural network of the EEG signal recognition model to obtain the EEG signal hidden layer information; Classify and identify the EEG signal hidden layer information through the linear classifier of the EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input sample data; The user identity recognition result is compared with the user identity labeling result of the EEG signal recognition model input sample data to determine the training effect of the EEG signal recognition model.
2. The method according to claim 1, characterized in that Obtain the target user's EEG signal sample data, including: Displaying a preset display image to the target user; Obtaining electroencephalogram signal sample data generated when the target user watches the preset display image.
3. A method for recognizing an electroencephalogram signal, characterized in that: include: Acquire the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified; Generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized; Inputting the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model; Wherein, generating a time domain position map of the EEG signal to be identified according to the EEG signal to be identified and the electrode position image data includes: determining a target electrode in the electrode position image data and a target electrode position of the target electrode in the electrode position image data; Determine the target electrode moment signal data to be identified of the target electrode according to the EEG signal to be identified; Generate a plurality of continuous time-domain position diagrams of initial EEG signals to be identified according to the target electrode signal data to be identified and the target electrode position; The time domain position map of the initial EEG signal to be identified is processed by linear interpolation to obtain the time domain position map of the EEG signal to be identified; Using the time domain position diagram of each of the to-be-identified EEG signals within a preset time period as the time domain position diagram of the to-be-identified EEG signals; The target electrode moment signal data to be identified is the electrode reading to be identified of the target electrode at a specific moment within the preset time period; Wherein, generating a frequency domain position map of the EEG signal to be identified according to the EEG signal to be identified and the electrode position image data includes: determining a target electrode in the electrode position image data and a target electrode position of the target electrode in the electrode position image data; Determine the target electrode moment signal data to be identified of the target electrode according to the EEG signal to be identified; Generate target electrode moment frequency domain signal data of the target electrode according to the target electrode moment to-be-identified signal data by discrete short-time Fourier transform; Generate a plurality of continuous time-frequency domain position graphs of the EEG signals to be identified according to the time-frequency domain signal data of the target electrode and the position of the target electrode; The frequency domain position map of each of the to-be-identified EEG signals within a preset time period is used as the frequency domain position map of the to-be-identified EEG signals; The step of inputting the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, so as to identify the user identity of the target user through the target EEG signal recognition model, includes: Inputting the time domain position map of the EEG signal to be identified into the first target convolutional neural network of the target EEG signal recognition model, and inputting the frequency domain position map of the EEG signal to be identified into the second target convolutional neural network of the target EEG signal recognition model, so as to extract the time domain features of the EEG signal to be identified of the time domain position map of the EEG signal to be identified through the first target convolutional neural network, and extract the frequency domain features of the EEG signal to be identified of the frequency domain position map of the EEG signal to be identified through the second target convolutional neural network; The time domain features of the EEG signal to be identified and the frequency domain features of the EEG signal to be identified are concatenated and fused to obtain the fused features of the EEG signal to be identified; Input the fusion features of the EEG signal to be identified into the target recurrent neural network of the target EEG signal recognition model to obtain the hidden layer information of the EEG signal to be identified; The linear classifier of the target EEG signal recognition model is used to classify and recognize the hidden layer information of the EEG signal to be recognized, and the user identity recognition result of the EEG signal recognition model input data is obtained to recognize the user identity of the target user.
4. A brain wave signal recognition model training device, characterized in that: include: A sample data acquisition module, used to acquire EEG signal sample data of a target user and electrode position image sample data of the EEG signal sample data; A model input sample data generation module, used to generate EEG signal recognition model input sample data according to the EEG signal sample data and the electrode position image sample data; wherein the EEG signal recognition model input sample data includes an EEG signal time domain position map and an EEG signal frequency domain position map; A target EEG signal recognition model acquisition module is used to train the EEG signal recognition model according to the EEG signal recognition model input sample data to obtain a target EEG signal recognition model that matches the target user; Wherein, the model input sample data generating module is specifically used to: determine the target electrode in the electrode position image sample data and the target electrode position of the target electrode in the electrode position image sample data; Determining target electrode moment signal data of the target electrode according to the EEG signal sample data; Generating a plurality of continuous initial EEG signal time domain position diagrams according to the target electrode moment signal data and the target electrode position; Performing image supplementation processing on the initial EEG signal moment time domain position map by linear interpolation method to obtain the EEG signal moment time domain position map; Taking the time domain position diagram of each EEG signal within a preset time period as the time domain position diagram of the EEG signal; The target electrode moment signal data refers to the electrode reading of the target electrode at a specific moment in the preset time period; Wherein, the model input sample data generation module is specifically used for: Determine a target electrode in the electrode position image sample data and a target electrode position of the target electrode in the electrode position image sample data; Determining target electrode moment signal data of the target electrode according to the EEG signal sample data; Generate target electrode moment frequency domain signal data of the target electrode according to the target electrode moment signal data by discrete short-time Fourier transform; Generating a plurality of continuous EEG signal moment frequency domain position maps according to the target electrode moment frequency domain signal data and the target electrode position; Using the moment frequency domain position diagram of each EEG signal within a preset time period as the frequency domain position diagram of the EEG signal; The target EEG signal recognition model acquisition module is specifically used for: Inputting the EEG signal time domain position map into the first convolutional neural network of the EEG signal recognition model, and inputting the EEG signal frequency domain position map into the second convolutional neural network of the EEG signal recognition model, so as to extract the EEG signal time domain features of the EEG signal time domain position map through the first convolutional neural network, and extract the EEG signal frequency domain features of the EEG signal frequency domain position map through the second convolutional neural network; Performing feature splicing and fusion of the EEG signal time domain features and the EEG signal frequency domain features to obtain EEG signal fusion features; Inputting the EEG signal fusion features into the recurrent neural network of the EEG signal recognition model to obtain the EEG signal hidden layer information; Classify and identify the EEG signal hidden layer information through the linear classifier of the EEG signal recognition model to obtain the user identity recognition result of the EEG signal recognition model input sample data; The user identity recognition result is compared with the user identity labeling result of the EEG signal recognition model input sample data to determine the training effect of the EEG signal recognition model.
5. An electroencephalogram signal recognition device, characterized in that: include: An image acquisition module, used to acquire the target user's EEG signal to be identified and electrode position image data of the EEG signal to be identified; A model input data generating module, used to generate EEG signal recognition model input data according to the EEG signal to be recognized and the electrode position image data; wherein the EEG signal recognition model input data includes a time domain position map of the EEG signal to be recognized and a frequency domain position map of the EEG signal to be recognized; A user identity recognition module, used for inputting the EEG signal recognition model input data into a target EEG signal recognition model matched with the target user, so as to recognize the user identity of the target user through the target EEG signal recognition model; Wherein, the model input data generating module is specifically used to: determine the target electrode in the electrode position image data and the target electrode position of the target electrode in the electrode position image data; Determine the target electrode moment signal data to be identified of the target electrode according to the EEG signal to be identified; Generate a plurality of continuous time-domain position diagrams of initial EEG signals to be identified according to the target electrode signal data to be identified and the target electrode position; The time domain position map of the initial EEG signal to be identified is processed by linear interpolation to obtain the time domain position map of the EEG signal to be identified; Using the time domain position diagram of each of the to-be-identified EEG signals within a preset time period as the time domain position diagram of the to-be-identified EEG signals; The target electrode moment signal data to be identified is the electrode reading to be identified of the target electrode at a specific moment within the preset time period; Wherein, the model input data generation module is specifically used for: determining a target electrode in the electrode position image data and a target electrode position of the target electrode in the electrode position image data; Determine the target electrode moment signal data to be identified of the target electrode according to the EEG signal to be identified; Generate target electrode moment frequency domain signal data of the target electrode according to the target electrode moment to-be-identified signal data by discrete short-time Fourier transform; Generate a plurality of continuous time-frequency domain position graphs of the EEG signals to be identified according to the time-frequency domain signal data of the target electrode and the position of the target electrode; The frequency domain position map of each of the to-be-identified EEG signals within a preset time period is used as the frequency domain position map of the to-be-identified EEG signals; The user identification module is specifically used for: Inputting the time domain position map of the EEG signal to be identified into the first target convolutional neural network of the target EEG signal recognition model, and inputting the frequency domain position map of the EEG signal to be identified into the second target convolutional neural network of the target EEG signal recognition model, so as to extract the time domain features of the EEG signal to be identified of the time domain position map of the EEG signal to be identified through the first target convolutional neural network, and extract the frequency domain features of the EEG signal to be identified of the frequency domain position map of the EEG signal to be identified through the second target convolutional neural network; The time domain features of the EEG signal to be identified and the frequency domain features of the EEG signal to be identified are concatenated and fused to obtain the fused features of the EEG signal to be identified; Input the fusion features of the EEG signal to be identified into the target recurrent neural network of the target EEG signal recognition model to obtain the hidden layer information of the EEG signal to be identified; The linear classifier of the target EEG signal recognition model is used to classify and recognize the hidden layer information of the EEG signal to be recognized, and the user identity recognition result of the EEG signal recognition model input data is obtained to recognize the user identity of the target user.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the EEG signal recognition model training method described in any one of claims 1-2, or execute the EEG signal recognition method described in claim 3.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the EEG signal recognition model training method described in any one of claims 1-2, or the EEG signal recognition method described in claim 3 when executed.
