Electroencephalogram-like signal generation method and equipment

By converting multi-channel EEG signals into time series signals and using deep learning models to generate EEG signals, the problem of high cost of multi-channel acquisition equipment is solved, and the device structure is simplified and the EEG signals and EEG signals are realized. Improved similarity.

CN119157553APending Publication Date: 2024-12-20FORETHOUGHT (SHANGHAI) MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411196134.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Multi-channel EEG signal acquisition equipment has high cost and complex equipment structure, making it difficult to simplify.

Method used

Multi-channel EEG signals are converted into time series signals, and time series signals are generated through deep learning model training, and finally converted into EEG signals, as a supplement to EEG signals, reducing acquisition costs and simplifying the device structure.

Benefits of technology

Generating EEG-like signals similar to EEG signals through deep learning models reduces the cost of multi-channel acquisition, simplifies the structure of EEG-like acquisition devices, and improves the similarity between EEG-like signals and EEG signals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119157553A_ABST
    Figure CN119157553A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of electroencephalogram signal generation, in particular to an electroencephalogram-like signal generation method and equipment. The method comprises the following steps: converting a multi-channel electroencephalogram signal into a corresponding multi-channel time sequence signal; inputting the multi-channel time sequence signal into a deep learning model, and training the deep learning model according to data distribution and time characteristics of the multi-channel time sequence signal, so that the deep learning model generates a time sequence-like signal; when the deep learning model cannot distinguish the multi-channel time sequence signal and the time-series-like signal, outputting the time-series-like signal through the deep learning model; and converting the time series-like signals into corresponding electroencephalogram-like signals. According to the method, the electroencephalogram signals are converted into the time sequence signals, and the time sequence signals are input into the deep learning model for training, so that the electroencephalogram-like signals similar to the electroencephalogram signals are obtained, and the cost of collecting the electroencephalogram signals through multiple channels is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electroencephalogram (EEG) signal generation, and further to a method and device for generating quasi-EEG signals. Background Art

[0002] In the modern medical field, disease detection based on EEG signals has become an important diagnostic method. At present, EEG acquisition equipment commonly used in hospital clinics is usually equipped with 64 channels or 128 channels to ensure that rich EEG signal data can be collected. These high-channel devices play an important role in disease diagnosis and have been widely verified in clinical practice. However, this multi-channel EEG signal acquisition method also brings some challenges, such as high acquisition costs. Summary of the invention

[0003] In order to solve the above technical problems, the present application provides a method and device for generating EEG-like signals, which reduces the cost of multi-channel EEG signal acquisition.

[0004] In a first aspect, the present application provides a method for generating EEG-like signals, comprising: converting a multi-channel EEG signal into a corresponding multi-channel time series signal; inputting the multi-channel time series signal into a deep learning model, and training the deep learning model according to the data distribution and time characteristics of the multi-channel time series signal, so that the deep learning model generates a time series-like signal; when the deep learning model cannot distinguish between the multi-channel time series signal and the time series-like signal, outputting the time series-like signal through the deep learning model; and converting the time series-like signal into a corresponding EEG-like signal.

[0005] The above-mentioned EEG-like signal generation method converts EEG signals into time series signals and inputs the time series signals into a deep learning model for training, thereby obtaining EEG-like signals similar to EEG signals. Thus, the EEG-like signals can be used as a supplement to EEG signals, reducing the cost of multi-channel EEG signal acquisition, and at the same time, can reduce the number of channels of EEG acquisition equipment, thereby simplifying the structure of EEG acquisition equipment.

[0006] In one implementation, the converting of the multi-channel EEG signal into a multi-channel time series signal specifically includes: filtering the multi-channel EEG signal, and sampling the filtered multi-channel EEG signal at a preset sampling frequency; and using the sampled multi-channel EEG signal as the multi-channel time series signal.

[0007] The above-mentioned EEG-like signal generation method can obtain a clean time series signal by filtering and sampling the EEG signal, and makes the data distribution and time characteristics acquired by the deep learning model more accurate, thereby further improving the similarity between the EEG-like signal and the EEG signal.

[0008] In one implementation, the multi-channel time series signal includes a first channel time series signal; the multi-channel time series signal is input into a deep learning model, and the deep learning model is trained according to the data distribution and time characteristics of the multi-channel time series signal so that the deep learning model generates a quasi-time series signal, specifically including: constructing a real sample data set in a low-dimensional latent vector space according to the embedding module in the deep learning model and the first channel time series signal; generating a forged sample data set in a low-dimensional latent vector space through a generation module in the deep learning model, and obtaining a supervision loss; inputting the real sample data set and the forged sample data set into a discriminant module in the deep learning model for identification and classification, and obtaining an adversarial loss; when the sum of the supervision loss and the adversarial loss is not less than a first preset value, updating the parameters of the generation module according to the supervision loss and the adversarial loss; repeatedly performing the steps of generating the forged sample data set, obtaining the supervision loss, obtaining the adversarial loss, and updating the parameters of the generation module until the sum of the supervision loss and the adversarial loss is less than a first preset value, converting the forged sample data set into the quasi-time series signal through the recovery module.

[0009] The above-mentioned EEG-like signal generation method converts the time series signal into a real sample data set through the embedding module in the deep learning model, and uses the generation module to generate a fake sample data set, while calculating the supervision loss and adversarial loss. When the sum of the two losses exceeds the first preset value, the model updates the parameters of the generation module to improve the quality of the fake sample data set. This process is repeated until the sum of the losses is lower than the first preset value, and the recovery module converts the fake sample data set back to a time series-like signal. Finally, the time series-like signal is converted into a corresponding EEG-like signal. The similarity between the EEG-like signal and the EEG signal and the user experience are further improved.

[0010] In one implementation, the construction of a real sample data set in a low-dimensional latent vector space based on the embedding module in the deep learning model and the first channel time series signal specifically includes: extracting static features, time features and sequence lengths of each sub-time series signal in the first channel time series signal; using the static features, time features and sequence length of each sub-time series signal as samples to construct a training data set; converting the static features and time features in the training data set into static features and time features in a low-dimensional latent vector space through the embedding module, and using the converted training data set as the real sample data set.

[0011] In one implementation, it also includes: obtaining a reconstruction loss through the recovery module, the training data set and the real sample data set; when the sum of the supervision loss and the reconstruction loss is not less than a second preset value, updating the parameters of the recovery module and the embedding module according to the supervision loss and the reconstruction loss; repeating the steps of obtaining the reconstruction loss and updating the parameters of the recovery module and the embedding module until the sum of the supervision loss and the reconstruction loss is less than the second preset value.

[0012] The above-mentioned method for generating quasi-EEG signals obtains reconstruction loss through training data sets and real sample data sets, and updates the parameters of the recovery module and the embedding module when the sum of the reconstruction loss and the supervision loss is not less than the second preset value. These processes are repeated continuously until the sum of the reconstruction loss and the supervision loss is less than the second preset value, and the training of the recovery module and the embedding module is completed. The reconstruction effect of the recovery module is improved, and the similarity between the quasi-EEG signals and the EEG signals is further improved.

[0013] In one implementation, the real sample data set includes a first real sample, and the sample in the training data set corresponding to the first real sample is a first training sample; the converting of the static features and time features in the training data set into static features and time features in a low-dimensional latent vector space by the embedding module specifically includes: mapping the static features and time features of the first training sample into static features and time features in the low-dimensional latent vector space by an embedding function; and using the mapped first training sample as the first real sample.

[0014] In one implementation, the reconstruction loss is obtained through the recovery module, the training data set and the real sample data set, specifically including: restoring the static features and time features of the first real sample to corresponding static features and time features in a high-dimensional space through a recovery function; calculating the reconstruction loss based on the restored static features and time features of the first real sample and the static features and time features of the first training sample.

[0015] In one implementation, the forged sample data set includes a first forged sample; the forged sample data set is generated in a low-dimensional latent vector space through a generation module in the deep learning model, and the supervision loss is obtained, specifically including: selecting a static feature random vector and a time feature random vector from the generation module, and inputting the static feature random vector and the time feature random vector into the embedding module; mapping the static feature random vector and the time feature random vector into static features and time features in the low-dimensional latent vector space through a generation function, and constructing the first forged sample; and calculating the supervision loss based on the first forged sample and the first real sample.

[0016] In one implementation, the inputting of the real sample data set and the forged sample data set into the discriminant module in the deep learning model for identification and classification, and obtaining the adversarial loss, specifically includes: calculating a first probability that the first real sample is real data through a discriminant function, and calculating a second probability that the first forged sample is real data; and calculating the adversarial loss based on the first probability and the second probability.

[0017] In a second aspect, the present application also provides an EEG signal generating device for generating EEG signals by implementing any of the EEG signal generating methods described above.

[0018] Compared with the prior art, the present invention has at least one of the following beneficial effects:

[0019] 1. By converting EEG signals into time series signals and inputting the time series signals into the deep learning model for training, EEG-like signals similar to EEG signals are obtained. Thus, EEG-like signals can be used as a supplement to EEG signals, reducing the cost of multi-channel EEG signal acquisition, and at the same time, the number of channels of EEG acquisition equipment can be reduced, thereby simplifying the structure of EEG acquisition equipment.

[0020] 2. By filtering and sampling EEG signals, clean time series signals can be obtained, and the data distribution and time characteristics obtained by the deep learning model are more accurate, thereby further improving the similarity between EEG-like signals and EEG signals.

[0021] 3. The time series signal is converted into a real sample data set through the embedding module in the deep learning model, and the forged sample data set is generated by the generation module, and the supervision loss and adversarial loss are calculated at the same time. When the sum of the two losses exceeds the first preset value, the model updates the parameters of the generation module to improve the quality of the forged sample data set. This process is repeated until the sum of the losses is lower than the first preset value, and the recovery module converts the forged sample data set back to a time series-like signal. Finally, the time series-like signal is converted into the corresponding EEG-like signal. The similarity between the EEG-like signal and the EEG signal and the user experience are further improved.

[0022] 4. Obtain the reconstruction loss through the training data set and the real sample data set, and update the parameters of the recovery module and the embedding module when the sum of the reconstruction loss and the supervision loss is not less than the second preset value. Repeat these processes until the sum of the reconstruction loss and the supervision loss is less than the second preset value, and the training of the recovery module and the embedding module is completed. The reconstruction effect of the recovery module is improved, and the similarity between the EEG-like signal and the EEG signal is further improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The preferred implementation modes will be described below in a clear and understandable manner with reference to the accompanying drawings to further illustrate the above-mentioned characteristics, technical features, advantages and implementation methods of the present invention.

[0024] Figure 1 A flow chart of a method for generating a similar EEG signal provided in an embodiment of the present application is shown;

[0025] Figure 2 A framework diagram of a deep learning model provided in an embodiment of the present application is shown;

[0026] Figure 3 A flowchart of a deep learning model training provided by an embodiment of the present application is shown;

[0027] Figure 4 A flowchart of constructing a real sample data set provided by an embodiment of the present application is shown;

[0028] Figure 5 A flowchart of a recovery module training provided by an embodiment of the present application is shown;

[0029] Figure 6 A flowchart of constructing a first real sample provided by an embodiment of the present application is shown;

[0030] Figure 7 A flowchart of obtaining reconstruction loss provided by an embodiment of the present application is shown;

[0031] Figure 8 A flowchart of obtaining supervision loss provided by an embodiment of the present application is shown;

[0032] Fig. 9 A flowchart of obtaining a countermeasure loss provided by an embodiment of the present application is shown;

[0033] Fig.10 A comparison diagram of a type of EEG signal provided in an embodiment of the present application and an EEG signal of a subject is shown. DETAILED DESCRIPTION

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific implementation methods of the present invention will be described below with reference to the accompanying drawings. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings and other implementation methods can be obtained based on these drawings without creative work.

[0035] In order to simplify the drawings, only the parts related to the invention are schematically shown in each figure, and they do not represent the actual structure of the product. In addition, in order to simplify the drawings and facilitate understanding, in some figures, only one of the parts with the same structure or function is schematically drawn or marked. In this article, "one" not only means "only one", but also means "more than one".

[0036] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0037] In this document, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0038] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0039] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

[0040] EEG signal acquisition equipment has evolved from clinical equipment with multiple acquisition channels to wearable equipment. In clinical equipment with multiple acquisition channels, EEG signals are acquired by having subjects wear electrodes corresponding to multiple acquisition channels, such as 64 acquisition channels or 128 acquisition channels.

[0041] In the wearable device, the EEG signal collection is achieved by reducing the number of EEG signal collection channels, for example, 5 collection channels. The wearable device not only simplifies the structure of the EEG signal collection device, but also improves the user experience of the subject due to its portability.

[0042] EEG-like signals are electrical signals that imitate the activity of the brain's neural network and are similar to EEG signals. For example, when the number of channels of the EEG signals collected from the subject is small, the EEG signals can be trained through a variety of algorithms to learn the distribution characteristics and time characteristics of the EEG signals, thereby generating multi-channel EEG-like signals. The various algorithms include but are not limited to convolutional neural networks (CNN), deep learning (DL) algorithms, recurrent neural networks (RNN), time-generated adversarial networks (Time-GAN), etc.

[0043] The embodiment of the present application combines a wearable EEG signal acquisition device with an algorithm to generate EEG-like signals through the algorithm when the number of acquisition channels is small, and uses the EEG-like signals as an expansion of the subject's EEG signals, thereby reducing the cost of acquiring EEG signals through multiple acquisition channels. Figure 1 , which shows a flow chart of a method for generating EEG-like signals provided in an embodiment of the present application.

[0044] like Figure 1 As shown, including:

[0045] S100, converting the multi-channel EEG signal into a corresponding multi-channel time series signal.

[0046] S110, inputting the multi-channel time series signal into the deep learning model, and training the deep learning model according to the data distribution and time characteristics of the multi-channel time series signal, so that the deep learning model generates a time series-like signal.

[0047] S120, when the deep learning model cannot distinguish between the multi-channel time series signal and the quasi-time series signal, output the quasi-time series signal through the deep learning model.

[0048] S130, converting the time series-like signal into a corresponding EEG-like signal.

[0049] The multi-channel EEG signal (for example, it can be a 5-channel EEG signal, which can be set according to user needs) is the original EEG signal of the subject (hereinafter referred to as EEG signal) collected by the electrodes corresponding to the multiple acquisition channels (hereinafter referred to as multi-channels) of the EEG signal acquisition device.

[0050] The multi-channel time series signal is a multi-channel EEG signal in the form of a time series. The multi-channel EEG signal and the multi-channel time series signal correspond one to one. Taking any one of the channel time series signals as an example, the time series signal is composed of multiple sub-time series signals, and the sequence length of each sub-time series signal can be the same or different.

[0051] After receiving the multi-channel time series signal, the deep learning model sets the parameters such as the learning rate, training rounds, and loss function of the deep learning model according to user needs. The deep learning model can obtain the data distribution and time characteristics of the multi-channel time series signal (or the data distribution and time characteristics of the multi-channel EEG signal), and then when the number of channels of the EEG signal is limited, more information and features of the EEG signal can be obtained. Then, corresponding training is performed according to the data distribution and time characteristics. During the training process, the deep learning model will continuously generate class time series signals, and distinguish the generated class time series signals from the multi-channel time series signals. When the deep learning model can distinguish between class time series signals and multi-channel time series signals, the deep learning model regenerates the class time series signal by updating its own parameters and the like (the number of class time series signals of the embodiment of the present application can be multi-channel, and the number of class EEG signals finally obtained is also multi-channel).

[0052] When the deep learning model cannot distinguish between the multi-channel time series signal and the quasi-time series signal, the quasi-time series signal is output. The quasi-time series signal is converted into the corresponding quasi-EEG signal, wherein the quasi-time series signal is an quasi-EEG signal in the form of a time series. The quasi-EEG signal finally obtained can be used as an extension of the subject's EEG signal, and the quasi-EEG signal has similar statistical characteristics to the subject's EEG signal, that is, the similarity between the quasi-EEG signal and the EEG signal is greater than the preset value.

[0053] In the embodiment of the present application, EEG signals are converted into time series signals, and the time series signals are input into a deep learning model for training, thereby obtaining EEG-like signals similar to EEG signals. Thus, the EEG-like signals are used as a supplement to EEG signals, reducing the cost of multi-channel EEG signal acquisition, and at the same time, the number of channels of the EEG acquisition device can be reduced, thereby simplifying the structure of the EEG acquisition device.

[0054] In some embodiments of the present application, converting a multi-channel EEG signal into a multi-channel time series signal specifically includes: filtering the multi-channel EEG signal, sampling the filtered multi-channel EEG signal according to a preset sampling frequency, and using the sampled multi-channel EEG signal as the multi-channel time series signal.

[0055] After obtaining the multi-channel EEG signals of the subject, preprocessing is required. For example, the multi-channel EEG signal distribution can be subjected to notch filtering with a first filter frequency (for example, the first filter frequency can be 50 Hz) and bandpass filtering with a second filter frequency (for example, the second filter frequency can be any value between 0.4 Hz and 60 Hz), thereby removing noise and power frequency interference.

[0056] The process of sampling the filtered multi-channel EEG signal, taking any channel EEG signal as an example, for example, selecting an EEG signal of a preset time length from a channel EEG signal, and then storing the EEG signal of the preset time length as a sub-time series signal according to a preset sampling frequency (for example, the sampling frequency can be 250Hz) (wherein, when the sampling frequency is 250Hz, the data distribution of the sub-time series signal is that there is a data point every 0.04 seconds). Repeating the selection of EEG signals of preset time lengths for multiple times can obtain multiple sub-time series signals. Moreover, multiple sub-time series signals constitute a time series signal corresponding to a channel EEG signal. Similarly, a multi-channel time series signal can be obtained.

[0057] In the embodiment of the present application, by filtering and sampling the EEG signal, a clean time series signal can be obtained, and the data distribution and time characteristics acquired by the deep learning model are made more accurate, thereby further improving the similarity between the EEG-like signal and the EEG signal.

[0058] In the embodiment of the present application, the deep learning model can adopt a time-generated adversarial network (Time-GAN) or other algorithms that can realize the function of the deep learning model of the present application. The following deep learning model is described as an example of a time-generated adversarial network (Time-GAN):

[0059] Reference Figure 2 , which shows a framework diagram of a deep learning model provided by an embodiment of the present application. Figure 2As shown, it includes: an embedding module 100, a recovery module 200, a generation module 300 and a discrimination module 400. Among them, the embedding module 100 is used to map the multi-channel time series signal in the high-dimensional space to the low-dimensional latent vector space. The generation module 300 is used to generate a quasi-time series signal in the low-dimensional latent vector space. The discrimination module 400 is used to distinguish between the quasi-time series signal in the low-dimensional latent vector space and the multi-channel time series signal in the low-dimensional latent vector space. The recovery module 200 is used to restore the quasi-time series signal in the low-dimensional latent vector space to the quasi-time series signal in the high-dimensional space when the discrimination module 400 cannot distinguish between the quasi-time series signal in the low-dimensional latent vector space and the multi-channel time series signal in the low-dimensional latent vector space.

[0060] In the embodiment of the present application, the multi-channel time series in the high-dimensional space is mapped to the low-dimensional latent vector space by the embedding module 100. Then, the multi-channel time series in the low-dimensional latent vector space is reconstructed by the recovery module 200 to obtain the reconstruction loss Among them, the reconstruction loss Used to update the parameters of the recovery module 200. Then, the generation module 300 generates a time series signal in a low-dimensional latent vector space and provides a supervision loss The generation module 300 is helped to learn the distribution characteristics of the multi-channel time series signal in the low-dimensional latent vector space. Further, the quasi-time series signal in the low-dimensional latent vector space and the multi-channel time series signal in the low-dimensional latent vector space are sent to the discrimination module 400 for distinction to obtain the adversarial loss Among them, the loss of resistance It is used to update the parameters of the generation module 300 and the discrimination module 400, so as to further improve the generation quality of the generation module 300. The whole process is continuously iterated until the discrimination module 400 cannot distinguish between the time series-like signal in the low-dimensional latent vector space and the multi-channel time series signal in the low-dimensional latent vector space, and the time series-like signal in the low-dimensional latent vector space is restored to the time series-like signal in the high-dimensional space through the recovery module 200, and then the time series-like signal in the high-dimensional space is converted into the corresponding EEG-like signal.

[0061] The process of each channel time series signal entering the deep learning model training is the same. Taking the first channel time series signal in the multi-channel time series signal as an example, combined with the attached Figure 2 and attached Figure 3 The process of deep learning model training is elaborated in detail. Figure 3 A flowchart of a deep learning model training provided by an embodiment of the present application is shown. Figure 3 As shown, including:

[0062] S300, constructing a real sample data set in a low-dimensional latent vector space according to the embedding module in the deep learning model and the first channel time series signal.

[0063] S310, generating a forged sample data set in a low-dimensional latent vector space through a generation module in a deep learning model, and obtaining a supervision loss.

[0064] S320, input the real sample data set and the forged sample data set into the discriminant module in the deep learning model for identification and classification, and obtain the adversarial loss.

[0065] S330, when the sum of the supervision loss and the adversarial loss is not less than a first preset value, update the parameters of the generation module according to the supervision loss and the adversarial loss.

[0066] S340, repeatedly executing the steps of generating a forged sample data set, obtaining a supervision loss, obtaining an adversarial loss, and updating the parameters of the generation module until the sum of the supervision loss and the adversarial loss is less than a first preset value, and converting the forged sample data set into a quasi-time series signal through a recovery module.

[0067] The first channel time series signal includes a plurality of sub-time series signals. Each sub-time series signal includes a static feature that does not change with time and a time feature that changes with time. The static feature, time feature and sequence length of each sub-time series signal can be used as a sample, that is, each sub-time series signal corresponds to a sample, and these samples constitute the training data set of the first channel time series signal. Before the training data set of the first channel time series signal enters the embedding module 100, its corresponding static feature and time feature are in a high-dimensional space (or feature space). After the data set of the first channel time series signal enters the embedding module 100, the embedding module 100 will map the static feature and time feature of each sample in the training data set of the first channel time series signal to a low-dimensional latent vector space, thereby obtaining a real sample data set.

[0068] When generating a fake sample data set, the generation module 300 does not generate it directly in a high-dimensional space. Instead, it extracts multiple static feature random vectors and multiple time feature random vectors from a vector space with a known distribution and inputs them into the embedding module 100. The embedding module 100 maps the multiple static feature random vectors and multiple time feature random vectors to a low-dimensional latent vector space, thereby obtaining the static features and time features of these random vectors in the low-dimensional latent vector space. Then, the generation module 300 generates a fake sample data set based on the static features and time features of these random vectors in the low-dimensional latent vector space. Based on the real sample data set and the fake sample data set, the supervision loss can be obtained by applying the maximum likelihood method.

[0069] The discrimination module 400 can identify and classify the real sample data set and the forged sample data set, and the output result is the probability that the static features and time features in the real sample data set are real data, and the probability that the static features and time features in the forged sample data set are real data. Among them, the greater the probability, the more difficult it is for the discrimination module 400 to distinguish the forged sample data set from the real sample data set. Then, according to the probability corresponding to the real sample data set and the probability corresponding to the forged sample data set, the adversarial loss can be obtained.

[0070] Getting against loss and monitoring losses After that, the adversarial loss can be and monitoring losses Substitute into the formula When the result obtained by the formula is not less than the first preset value, according to the countermeasure loss and monitoring losses Update the parameters of the generation module 300, and according to the adversarial loss Update the parameters of the discrimination module 400. Where, θ g and θ d They represent the parameters of the generation module 300 and the discrimination module 400 respectively. η≥0 is the balanced adversarial loss and monitoring losses That is, in addition to the unsupervised minimum game on classification accuracy, the generation module 300 also minimizes the supervised loss. By combining the objectives in this way, the deep learning model can simultaneously train encoding (feature vectors), generation (latent representations), and iteration (across time).

[0071] Repeat the above fake sample data set and obtain supervision loss Obtaining adversarial loss And the process of updating the parameters of the generation module 300 and the discrimination module 400 (that is, the generation module 300 and the discrimination module 400 continuously perform adversarial training) until the formula When the result of is less than the first preset value, the forged sample data set is converted into a quasi-time series signal through the recovery module 200, and the quasi-time series signal is further converted into a quasi-EEG signal.

[0072] In the embodiment of the present application, the time series signal is converted into a real sample data set through the embedding module in the deep learning model, and the generation module is used to generate a fake sample data set, and the supervision loss and the adversarial loss are calculated at the same time. When the sum of the two losses exceeds the first preset value, the model updates the parameters of the generation module to improve the quality of the fake sample data set. This process is repeated until the sum of the losses is lower than the first preset value, and the recovery module converts the fake sample data set back to a time series-like signal. Finally, the time series-like signal is converted into a corresponding EEG-like signal. The similarity between the EEG-like signal and the EEG signal and the user experience are further improved.

[0073] Reference Figure 4 , which shows a flow chart of constructing a real sample data set provided by an embodiment of the present application. Figure 4 As shown, including:

[0074] S400, extracting static features, time features and sequence length of each sub-time series signal in the first channel time series signal.

[0075] S410, taking the static features, time features and sequence length of each sub-time series signal as samples to construct a training data set.

[0076] S420, converting the static features and time features in the training data set into static features and time features in a low-dimensional latent vector space through an embedding module, and using the converted training data set as a real sample data set.

[0077] In high-dimensional space, the static eigenvector space can be expressed as The temporal feature vector space is represented as make are all random vectors, which can be represented by specific values ​​as s and x. For example, the static features of each sub-time series signal in the first channel time series signal can be represented as s, the time features of each sub-time series signal in the first channel time series signal can be represented as x, the sequence length of each sub-time series signal in the first channel time series signal can be represented as T, and the number of each sub-time series signal in the first channel time series signal can be represented as N. The training data set can be obtained by taking the static features s, time features x and sequence length T of each sub-time series signal as samples

[0078] in Indicates the number of samples in the training data set, for example When it is 1, the training data set The s1 in the figure represents the static features of the first sample, the training data set x1 in the training dataset represents the time feature of the first sample. T1 in represents the sequence length of the first sample.

[0079] Representation and The corresponding low-dimensional latent vector space is obtained by embedding the embedding function e in the embedding module 100: The static features and temporal features of each sample in the training data set are converted into static features and temporal features in a low-dimensional latent vector space, and then the converted training data set is used as the real sample data set.

[0080] During the training of the deep learning model, the recovery module 200 also obtains the reconstruction loss Reconstruction losses and monitoring losses For updating the parameters of the restoration module 200 and the embedding module 100, so that the time series signal reconstructed by the restoration module 200 is more similar to the multi-channel time series signal of the subject. Figure 5 , which shows a flow chart of a recovery module training provided by an embodiment of the present application. Figure 5 As shown, including:

[0081] S500, obtaining reconstruction loss through the recovery module, the training data set and the real sample data set.

[0082] S510, when the sum of the supervision loss and the reconstruction loss is not less than a second preset value, updating parameters of the recovery module and the embedding module according to the supervision loss and the reconstruction loss.

[0083] S520, repeatedly executing the steps of obtaining the reconstruction loss, updating the parameters of the recovery module and the embedding module, and stopping when the sum of the supervision loss and the reconstruction loss is less than a second preset value.

[0084] The recovery module 200 uses the recovery function r: The static features and time features in the real sample data set are restored to the corresponding static features and time features in the high-dimensional space. Then, based on the restored static features and time features of the real sample data set and the training data set Static features and temporal features of the reconstruction loss are calculated

[0085] In getting reconstruction losses Afterwards, the reconstruction loss can be and monitoring losses Substitute into the formula When the result obtained by the formula is not less than the second preset value, the reconstruction loss and monitoring losses Update the parameters of the recovery module 200 and the embedding module 100. Where, θ e and θ r denote the parameters of the embedding module 100 and the restoration module 200 respectively. λ≥0 is the reconstruction loss and monitoring losses A hyperparameter of supervised loss The addition of enables the embedding module 100 to not only reduce the dimension of the adversarial learning space, but also actively promotes the generation module 300 to learn the temporal relationship from the data.

[0086] In the formula When the result is less than the second preset value, the training of the recovery module 200 is completed, that is, the reconstruction effect of the recovery module 200 is the best at this time. Obtaining adversarial loss The process of updating the parameters of the generation module 300 and the discrimination module 400, and repeatedly obtaining the reconstruction loss The process of updating the parameters of the recovery module 200 and the embedding module 100 is as follows: The result of is less than the first preset value, and the formula When the result of is less than the second preset value, the forged sample data set is converted into a quasi-time series signal through the recovery module 200, and the quasi-time series signal is further converted into a quasi-EEG signal.

[0087] The embodiment of the present application obtains the reconstruction loss through the training data set and the real sample data set, and updates the parameters of the recovery module and the embedding module when the sum of the reconstruction loss and the supervision loss is not less than the second preset value. These processes are repeated continuously until the sum of the reconstruction loss and the supervision loss is less than the second preset value, and the training of the recovery module and the embedding module is completed. The reconstruction effect of the recovery module is improved, and the similarity between the EEG-like signal and the EEG signal is further improved.

[0088] Each sample in the real sample data set of the embodiment of the present application has the same process of participating in the deep learning model training. Therefore, the training process of the deep learning model can be described in detail by selecting any sample. The following is described by taking the example that the real sample data set can include a first real sample, and the sample corresponding to the first real sample in the training data set can be the first training sample:

[0089] Reference Figure 6 , which shows a flow chart of constructing a first real sample provided by an embodiment of the present application. Figure 6 As shown, including:

[0090] S600, mapping the static features and the temporal features of the first training sample into static features and the temporal features in a low-dimensional latent vector space through an embedding function.

[0091] S610: Use the mapped first training sample as a first real sample.

[0092] The first training sample can be (s,x 1:t ), the embedding module 100 embeds the function e: The first training sample (s, x 1:t )’s static and temporal features, embedding their latent codes And the static features and temporal features of the first real sample are obtained through the recursive network: Among them, h S is the static feature of the first real sample, h t is the time feature of the first real sample. is a recursive embedding network of static features, and It is a recursive embedding network of temporal features.

[0093] Reference Figure 7 , which shows a flowchart of obtaining reconstruction loss provided by an embodiment of the present application.

[0094] like Figure 7 As shown, including:

[0095] S700, restoring the static features and time features of the first real sample to corresponding static features and time features in the high-dimensional space through a restoration function.

[0096] S710, calculating the reconstruction loss according to the restored static features and time features of the first real sample and the static features and time features of the first training sample.

[0097] The recovery module 200 uses the recovery function r: Restore the high-dimensional feature representation of the static features (or static latent features) and temporal features (or temporal latent features) of the first real sample By implementing r at each step through the feedforward network, the static and temporal features of the restored first real sample are obtained: in, and They are the restoration networks for static feature and temporal feature embedding respectively.

[0098] Furthermore, by substituting the restored static features and time features of the first real sample and the static features and time features of the first training sample into the formula Reconstruction loss

[0099] Reference Figure 8 , which shows a flowchart of obtaining supervision loss provided by an embodiment of the present application.

[0100] like Figure 8 As shown, including:

[0101] S800, selecting a static feature random vector and a temporal feature random vector from a generation module, and inputting the static feature random vector and the temporal feature random vector into an embedding module.

[0102] S810, mapping the static feature random vector and the temporal feature random vector into static features and temporal features in a low-dimensional latent vector space through a generating function, and constructing a first forged sample.

[0103] S820, calculating the supervision loss according to the first forged sample and the first real sample.

[0104] Similarly, the forged sample data set may also be described by selecting one of the samples. For example, the forged sample data set may include the first forged sample.

[0105] The generation module 300 does not directly generate the first forged sample, but first embeds the static feature random vector and the temporal feature random vector input values ​​into the module 100, and maps them into static features and temporal features in the low-dimensional latent vector space. The specific process is as follows: Represents a vector space with known distribution, from which static feature random vectors and time feature random vectors are extracted as input to generate Then, the generating function g is: Combine static features and temporal features into random vectors to form latent codes The first fake sample is realized by the recurrent network g: in, is a generator network of static features, and is a cyclic generator of temporal features. Static feature random vector The temporal feature random vector z can be sampled from the selected distribution t Following the random process, Gaussian distribution and Wiener process are used here respectively.

[0106] The generation module 300 receives the embedding sequence h before the time point corresponding to the first real sample 1:t-1 (calculated by embedding module 100), generating the next latent vector h t The gradient can now be calculated with respect to the loss, which captures the distribution and According to the latent vector ht And the first fake sample, and apply the maximum likelihood method to get the supervised loss: in, is a sample z t approximate

[0107] Reference Fig. 9 , which shows a flowchart of obtaining anti-loss provided by an embodiment of the present application.

[0108] like Fig. 9 As shown, including:

[0109] S900, calculating a first probability that the first real sample is real data, and calculating a second probability that the first forged sample is real data, by using a discriminant function.

[0110] S910, calculating the adversarial loss according to the first probability and the second probability.

[0111] The discriminant module 400 also starts working from the embedded module 100. That is, the discriminant function d: Receive the static features and time features of the first forged sample and return the classification Indicates true (h * ) or synthesis Embedded; similarly, Represents the real data (y * ) or synthetic data Classification label. Here, a bidirectional recurrent network d with a feedforward output layer is used to obtain the second probability that the static features and time features in the first forged sample are real data:

[0112] in and denote the forward and backward hidden state sequences, respectively, is a recursive function, is the output layer classification function. Similarly, the first probability that the static feature and the time feature in the first real sample are real data can be calculated. Substitute the first probability and the second probability into the formula:

[0113]

[0114] Can get against loss

[0115] The reconstruction loss is obtained by Monitoring loss and combat loss After that, if the formula The result of is less than the first preset value, and the formula When the result of is less than the second preset value, the first forged sample can be converted into a quasi-time series signal through the recovery module 200, and the quasi-time series signal can be further converted into a quasi-EEG signal.

[0116] The EEG signals obtained in the present embodiment have similar statistical characteristics to the EEG signals collected from the subjects. Fig.10 , which shows a comparison diagram of a type of EEG signal provided in an embodiment of the present application and the EEG signal of a subject.

[0117] An embodiment of the present application provides an EEG signal generating device, which is used to generate an EEG signal by using the EEG signal generating method of any of the above embodiments.

[0118] It should be noted that the above embodiments can be freely combined as needed. The above are only preferred embodiments of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention.

Claims

1. A method for generating an EEG-like signal, characterized in that: include: Convert multi-channel EEG signals into corresponding multi-channel time series signals; Inputting the multi-channel time series signal into a deep learning model, and training the deep learning model according to the data distribution and time characteristics of the multi-channel time series signal, so that the deep learning model generates a quasi-time series signal; When the deep learning model cannot distinguish between the multi-channel time series signal and the quasi-time series signal, outputting the quasi-time series signal through the deep learning model; The time series-like signal is converted into a corresponding EEG-like signal.

2. The method for generating an EEG-like signal according to claim 1, characterized in that: The converting of multi-channel EEG signals into multi-channel time series signals specifically includes: Filtering the multi-channel EEG signal, and sampling the filtered multi-channel EEG signal according to a preset sampling frequency; The sampled multi-channel EEG signal is used as the multi-channel time series signal.

3. The method for generating an EEG-like signal according to claim 1, characterized in that: The multi-channel time series signal includes a first channel time series signal; the multi-channel time series signal is input into a deep learning model, and the deep learning model is trained according to the data distribution and time characteristics of the multi-channel time series signal so that the deep learning model generates a quasi-time series signal, specifically including: Constructing a real sample data set in a low-dimensional latent vector space according to the embedding module in the deep learning model and the first channel time series signal; Generate a forged sample data set in a low-dimensional latent vector space through a generation module in the deep learning model, and obtain a supervision loss; Inputting the real sample data set and the forged sample data set into the discriminant module in the deep learning model for identification and classification, and obtaining adversarial loss; When the sum of the supervision loss and the adversarial loss is not less than a first preset value, updating the parameters of the generation module according to the supervision loss and the adversarial loss; Repeat the steps of generating the forged sample data set, obtaining the supervision loss, obtaining the adversarial loss, and updating the parameters of the generation module until the sum of the supervision loss and the adversarial loss is less than a first preset value, and convert the forged sample data set into the time series-like signal through a recovery module.

4. The method for generating an EEG-like signal according to claim 3, characterized in that: The step of constructing a real sample data set in a low-dimensional latent vector space according to the embedding module in the deep learning model and the first channel time series signal specifically includes: Extracting static features, time features and sequence length of each sub-time series signal in the first channel time series signal; The static features, time features and sequence length of each sub-time series signal are used as samples to construct a training data set; The static features and time features in the training data set are converted into static features and time features in a low-dimensional latent vector space through the embedding module, and the converted training data set is used as the real sample data set.

5. The method for generating an EEG-like signal according to claim 4, characterized in that: Also includes: Obtaining reconstruction loss through the recovery module, the training data set and the real sample data set; When the sum of the supervision loss and the reconstruction loss is not less than a second preset value, updating the parameters of the recovery module and the embedding module according to the supervision loss and the reconstruction loss; Repeat the steps of obtaining the reconstruction loss and updating the parameters of the recovery module and the embedding module until the sum of the supervision loss and the reconstruction loss is less than a second preset value.

6. The method for generating an EEG-like signal according to claim 5, characterized in that: The real sample data set includes a first real sample, and the sample in the training data set corresponding to the first real sample is a first training sample; The converting the static features and time features in the training data set into the static features and time features in the low-dimensional latent vector space through the embedding module specifically includes: Mapping the static features and the temporal features of the first training sample into the static features and the temporal features in the low-dimensional latent vector space through an embedding function; The mapped first training sample is used as the first real sample.

7. The method for generating an EEG-like signal according to claim 6, characterized in that: The obtaining of the reconstruction loss through the recovery module, the training data set and the real sample data set specifically includes: Restoring the static features and time features of the first real sample to corresponding static features and time features in the high-dimensional space through a restoration function; The reconstruction loss is calculated according to the restored static features and temporal features of the first real sample and the static features and temporal features of the first training sample.

8. The method for generating an EEG-like signal according to claim 6, characterized in that: The forged sample data set includes a first forged sample; the forged sample data set is generated in a low-dimensional latent vector space by a generation module in the deep learning model, and the supervision loss is obtained, specifically including: Selecting a static feature random vector and a temporal feature random vector from the generating module, and inputting the static feature random vector and the temporal feature random vector into the embedding module; Mapping the static feature random vector and the temporal feature random vector into static features and temporal features in the low-dimensional latent vector space through a generating function, and constructing the first forged sample; The supervision loss is calculated according to the first forged sample and the first real sample.

9. The method for generating an EEG-like signal according to claim 8, characterized in that: The step of inputting the real sample data set and the forged sample data set into the discriminant module in the deep learning model for identification and classification, and obtaining the adversarial loss, specifically includes: Calculating a first probability that the first real sample is real data and calculating a second probability that the first forged sample is real data by using a discriminant function; The adversarial loss is calculated according to the first probability and the second probability.

10. A device for generating a similar electroencephalogram signal, characterized in that: Used to generate an EEG-like signal by the EEG-like signal generation method described in any one of claims 1-9.