A classification prediction method and device for spike potential information
By constructing a neural network model to train historical EEG signals, the automated classification prediction of current EEG signals is solved, and the problem of low efficiency in the classification of center potential in the existing technology is solved, the classification accuracy is improved and manual intervention is reduced.
Patent Information
- Application Number
- CN202310615419.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2043-05-29
AI Technical Summary
The classification process of existing front potential classification software relies on clustering algorithms such as waveform similarity, which leads to the generation of new numbers for multiple sets of data of the same neuron each clustering, requiring a large amount of manual intervention to find the front potential signal of the same neuron, which is inefficient.
By obtaining the set of historical EEG signals, classifying and processing based on the front potential classification method, building a neural network model to train historical data, realizing automatic classification prediction of the current EEG signal, and combining the main channel position information of the historical EEG potential signal to determine whether the current front potential signal comes from the same neuron.
It significantly improves the efficiency of front potential classification, reduces the time of manual intervention, and realizes long-term tracking of front potential signals generated by a single neuron.
Smart Images

Figure CN116712087B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electroencephalogram signal processing, and in particular to a classification prediction method and device for spike potential information. Background Art
[0002] In neuroscience research, neurons are the basic functional units of the nervous system. Understanding the activity characteristics of neurons can help us understand the functions of the nervous system and the information transmission process. By analyzing the discharge activities of neurons, we can better understand how neurons respond to stimuli, how they coordinate activities, and how they participate in high-level cognitive functions such as behavioral control and memory, as well as study the functional abnormalities and disease mechanisms of the nervous system in various situations.
[0003] By tracking the spike potential of a single neuron over a long period of time, we can observe how neurons respond to different types of stimuli and signals, and further study the neuron's coding mechanism; as well as study the behavior of neurons at different time scales, for example, whether the neuron's response to specific information changes over time. Therefore, long-term monitoring of neuronal spike potential is of great significance for understanding the behavior of neurons.
[0004] The existing long-term spike potential tracking methods have the following technical problems: the classification process of common spike potential classification software mostly uses clustering algorithms such as waveform similarity, which belongs to unsupervised learning. For multiple sets of data from the same individual, each clustering will generate a new number. When the amount of data is large, finding the data of the same neuron requires a lot of manual intervention, which is inefficient.
[0005] Therefore, it is necessary to provide a spike potential information classification prediction method that utilizes historical spike potential signal classification information to complete the classification prediction of future spike potential signals and combines the position information of electrode channels to assist in determining whether future spike potential signals come from neurons that generate historical spike potential signals to improve the classification prediction accuracy to solve the above technical problems. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a classification prediction method for spike potential information. The method solves the technical problem that when the spike potential classification process in the prior art adopts a clustering algorithm such as waveform similarity, each clustering of multiple groups of data of the same individual will generate a new number, resulting in a large amount of manual intervention required to find the spike potential signal of the same neuron.
[0007] The technical effects of the present invention are achieved as follows:
[0008] A classification prediction method for spike potential information, comprising:
[0009] Get a collection of historical EEG signals;
[0010] Classify the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes a spike potential signal and first coordinate information of a main channel for collecting the spike potential signal;
[0011] Slicing the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets;
[0012] Constructing a spike potential classification model based on the neural network and the original data set;
[0013] Get the current EEG signal set;
[0014] A spike potential signal set after classification prediction is obtained according to the spike potential classification model and the current EEG signal set.
[0015] Furthermore, the historical EEG signal set is classified based on the spike potential classification method to obtain a historical spike potential signal set, including:
[0016] Obtaining the spike potential collected by each channel and the EEG signal collected by the neighboring channel corresponding to the current channel according to the historical EEG signal set, wherein the neighboring channel corresponding to the current channel is determined by the coordinate information of each channel;
[0017] Determine a main channel and its corresponding neurons according to the spike potential collected by the current channel and the EEG signal collected by the neighboring channel;
[0018] The spike potential signals collected by all the main channels are acquired to obtain a set of historical spike potential signals.
[0019] Further, the historical EEG signal set is classified based on the spike potential classification method to obtain a historical spike potential signal set, which then includes:
[0020] The historical spike potential signal set is expanded based on a data enhancement method to obtain an expanded historical spike potential signal set.
[0021] Furthermore, the historical spike signal set is sliced and processed based on a preset sampling period to obtain a plurality of original data sets, including:
[0022] Obtaining a time parameter corresponding to the spike signal;
[0023] The historical spike signal set is sliced based on the time parameter to obtain a plurality of original data sets.
[0024] Furthermore, a spike potential classification model is constructed based on the neural network and the original data set, including:
[0025] Establish a spike potential classification model based on neural network;
[0026] Selecting a portion from the original data set to obtain a training sequence;
[0027] The spike potential classification model is trained based on the training sequence to obtain a trained spike potential classification model.
[0028] Furthermore, constructing a spike classification model based on the neural network and the original data set also includes:
[0029] Selecting a portion from the original data set to obtain a test sequence, wherein the intersection of the test sequence and the training sequence is empty;
[0030] Testing the trained spike potential classification model based on the test sequence to obtain a loss value and an accuracy rate of the spike potential classification model;
[0031] When the loss value and the accuracy meet the training criteria, the spike potential classification model is used as the final spike potential classification model. By using a single long-term historical EEG signal and its spike potential classification results as a training set and adopting a deep learning method to construct a spike potential classification model, the spike potential classification can be automatically completed after the real-time EEG signal is input into the spike potential classification model, which significantly improves the efficiency of spike potential classification and reduces the time of manual intervention classification.
[0032] Furthermore, a spike potential signal set after classification prediction is obtained according to the spike potential classification model and the current EEG signal set, including:
[0033] Inputting the current EEG signal set into the spike potential classification model;
[0034] Based on the spike potential classification model, the current EEG signal set is classified and predicted to obtain the current spike potential signal set;
[0035] An updated spike potential signal set is obtained according to the historical spike potential signal set and the current spike potential signal set.
[0036] Further, obtaining an updated spike signal set according to the historical spike signal set and the current spike signal set includes:
[0037] Acquire second coordinate information of a main channel that collects all spike potential signals in the current spike potential signal set;
[0038] Obtaining the distance between the main channels corresponding to the first coordinate information and the second coordinate information respectively;
[0039] Determine whether the distance is greater than a preset distance;
[0040] If so, all spike potential signals corresponding to the distance greater than the preset distance are collected through the main channel corresponding to the new neuron, and all spike potential signals corresponding to the distance greater than the preset distance are added to the historical spike potential signal set.
[0041] Further, it is determined whether the distance is greater than a preset distance, and then the method further includes:
[0042] If not, it is determined that the main channel of all spike potential signals in the current spike potential signal set and the main channel corresponding to the first coordinate information are the main channels corresponding to the same neuron. The spike potential classification model is constructed by completing the historical EEG signal classification to classify and predict the currently collected EEG signal, and the position information of the main channel corresponding to the historical spike potential signal is combined to determine whether the spike potential signal obtained by the current classification prediction comes from the neuron that generated the historical spike potential signal, so as to achieve long-term tracking of the spike potential signal generated by a single neuron.
[0043] In addition, a classification prediction device for spike potential information is also provided, comprising:
[0044] The first acquisition module: used to acquire a set of historical EEG signals;
[0045] A historical spike potential acquisition module is used to classify the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes a spike potential signal and first coordinate information of a main channel for collecting the spike potential signal;
[0046] A data set processing module: used for slicing the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets;
[0047] Classification model building module: used to build a spike potential classification model based on the neural network and the original data set;
[0048] The second acquisition module: used to acquire the current EEG signal set;
[0049] Classification prediction module: used to obtain a spike potential signal set after classification prediction based on the spike potential classification model and the current EEG signal set.
[0050] As described above, the present invention has the following beneficial effects:
[0051] 1) By completing the historical EEG signal classification of spike potential signals, a spike potential classification model is constructed to classify and predict the currently collected EEG signal. Combined with the position information of the main channel corresponding to the historical spike potential signal, it is determined whether the spike potential signal obtained by the current classification prediction comes from the neuron that generated the historical spike potential signal, thereby realizing long-term tracking of the spike potential signal generated by a single neuron.
[0052] 2) By using a single long-term historical EEG signal and its spike potential classification results as a training set and adopting a deep learning method to construct a spike potential classification model, the spike potential classification can be automatically completed after the real-time EEG signal is input into the spike potential classification model, which significantly improves the efficiency of spike potential classification and reduces the time of manual intervention in classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments or prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0054] Figure 1 A flow chart of a classification prediction method for spike potential information provided in an embodiment of this specification;
[0055] Figure 2 A block diagram of a device for classifying and predicting spike potential information provided in an embodiment of this specification. DETAILED DESCRIPTION
[0056] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. 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 that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0058] Embodiment 1:
[0059] like Figure 1 As shown, the embodiment of this specification provides a classification prediction method for spike potential information, including:
[0060] S100: Acquire a historical EEG signal set;
[0061] S200: Classifying the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes a spike potential signal and first coordinate information of a main channel from which the spike potential signal is collected;
[0062] In a specific implementation manner, step S200 classifies the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, including:
[0063] Obtaining the spike potential collected by each channel and the EEG signal collected by the neighboring channel corresponding to the current channel according to the historical EEG signal set, wherein the neighboring channel corresponding to the current channel is determined by the coordinate information of each channel;
[0064] Determine a main channel and its corresponding neurons according to the spike potential collected by the current channel and the EEG signal collected by the neighboring channel;
[0065] The spike potential signals collected by all the main channels are acquired to obtain a set of historical spike potential signals.
[0066] Specifically, based on the data in the historical EEG signal set collected by the high-throughput flexible electrode, the method of obtaining the spike potential collected by the current channel is as follows:
[0067] The data of the current channel is detected, and the EEG signals corresponding to all time points that meet the following two conditions are marked as a spike potential.
[0068] 1) Selecting any first time marker and second time marker in the continuous time period; wherein the first time marker and the second time marker are both within the continuous time period; and the first time marker is earlier than the second time marker.
[0069] 2) acquiring a first potential collected by the current channel at the first time mark; acquiring a second potential collected by the current channel at the second time mark; when the absolute value of the first potential is greater than a potential threshold, and under the condition that the absolute value of the difference between the first time mark and the second time mark is less than or equal to the minimum allowed time difference, and the first potential is always greater than the second potential, the first potential is the spike potential of the neuron collected by the current channel.
[0070] In this embodiment, when the two conditions are met at the same time: |Y(t0)|>threshold and |Y(t0)|>|Y(t1)| is met under the condition of |t0-t1|≤τ, then Y(t0) is a spike signal detected by the current channel.
[0071] Wherein, Y(t) is the EEG signal data collected by the current channel, threshold is the potential threshold, and its calculation formula is threshold=mean(Y)+μ*std(Y), that is, the average value of all data Y(t) plus μ times the standard deviation of all data Y(t); where, τ is the minimum time interval allowed between two detected spike potential signals, that is, in the [t0-τ, t0+τ] time period with a length of 2τ centered on t0, it is considered that there is at most one spike potential signal. Assuming that multiple Y(t) are detected to meet the condition of Y(t)>threshold, only the Y(t0) with the largest amplitude is retained and other signals are discarded. μ can be selected by a technician in this field in the range of 1-10. In this embodiment, μ is 3.5.
[0072] Specifically, during the time period corresponding to the spike signal collected by the current channel, the method of obtaining the EEG signal collected by the neighboring channel is as follows:
[0073] A first time period is obtained by taking preset intervals before and after the center point based on the first time marker; and the potential of the electroencephalogram signal collected by the neighboring channel within the first time period is obtained.
[0074] In this embodiment, based on the time point t0 of each spike potential signal detected by the current channel as the center, the time intervals before and after it are the first time periods τ respectively, and a time period T with a length of two first time periods τ is obtained, and the potential of the EEG signal collected by the neighboring channel in this time period is obtained.
[0075] It should be noted that in most cases, a neuron will send the largest signal on a single channel, the main channel, while the peak signal on the adjacent channel is lower. Therefore, the channel corresponding to the maximum potential within a specific time period within the current channel and its corresponding neighborhood is selected as the main channel for detecting the spike potential of a single neuron.
[0076] Therefore, the judgment process of determining the main channel corresponding to the target neuron according to the spike potential collected by the current channel and the EEG signal collected by the neighboring channel is as follows:
[0077] Check the potential data in each neighboring channel during the time period to find the maximum potential. If the maximum potential is less than or equal to the spike potential signal Y(t0) in the current channel, temporarily mark the current channel corresponding to the spike potential signal as the main channel.
[0078] If the maximum potential is greater than the spike signal Y(t0) in the current channel, the neighbor channel corresponding to the maximum potential is temporarily marked as the main channel.
[0079] In a specific implementation, step S200 classifies the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, and then includes:
[0080] The historical spike potential signal set is expanded based on a data enhancement method to obtain an expanded historical spike potential signal set.
[0081] It should be noted that the data set composed of the main channel signal of each neuron obtained after spike potential classification processing, that is, the historical spike potential signal set, may be too small to meet the data set requirements for training the neural network model. Therefore, data enhancement processing is required based on the original data set.
[0082] Assuming that the waveform size of the main channel of a single neuron is a 1*180 vector, and assuming that a single spike potential classification obtains data from 15 neurons, then the initial data set size is 15*180. In addition, a 15*1 label array is generated, and the 1*180 data of a single neuron are numbered starting from 0.
[0083] The default expansion adopted by this application is to expand the data set to 10 times the original size, that is, 150*180. The specific data enhancement method is as follows:
[0084] According to the expansion multiple, a single vector in the data set is copied 10 times, and the following operations are performed on each copied vector:
[0085] 1) Translation. Randomly select a translation amount for each sample in the initial data set 15*180. Assuming that the maximum translation amount is 5, take a random number between [-5,5] for each sample to translate. A positive number represents a rightward translation, and a negative number represents a leftward translation.
[0086] 2) Flip. For each sample that has been translated, randomly choose whether to flip it.
[0087] After the above operations, the data set is expanded to 10 times. After copying a single vector and performing data augmentation operations, the label corresponding to the new data is still the label of the copied vector, that is, it corresponds to the neuron that corresponds one-to-one to the copied vector.
[0088] S300: Slicing the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets;
[0089] In a specific implementation manner, step S300 slices the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets, including:
[0090] Obtaining a time parameter corresponding to the spike signal;
[0091] The historical spike signal set is sliced based on the time parameter to obtain a plurality of original data sets.
[0092] Specifically, EEG signals are collected by implanting high-throughput flexible electrodes in the intracranial cortex of a living being. The flexible electrodes support multi-channel simultaneous collection of EEG signals from neurons.
[0093] In this embodiment, the acquisition frequency of the high-throughput flexible electrode for EEG signals is 30KHz, and Y(t) is acquired based on the acquisition frequency. Therefore, t is the acquisition time point corresponding to each acquisition cycle, that is, Y(t) corresponds to the EEG signal data collected in the corresponding t-th acquisition cycle, and an amplitude is intercepted in each acquisition cycle within the acquisition time 2τ as the spike signal data.
[0094] In this embodiment, the entire acquisition time corresponding to the spike classification is set to 6ms, and one amplitude is intercepted in each acquisition cycle as a historical spike signal set. That is, for the same individual, a single spike classification is performed to obtain the main channel data of N neurons, including: an N*180 spike signal array, an N*1 main channel array, and an N*1 neuron label array.
[0095] The labels of the neuron label array correspond one-to-one to the first coordinate information of the main channel corresponding to the spike potential signal obtained based on the spike potential classification method.
[0096] The historical spike signal set is divided into a training set and a test set according to a preset ratio, the spike classification model is trained with the divided training set, and the classification prediction performance of the spike classification model is tested with the test set. The training set and the test set together constitute the original data set in this application.
[0097] In this embodiment, the preset ratio between the training set and the test set is 8:2.
[0098] S400: constructing a spike potential classification model based on the neural network and the original data set;
[0099] In a specific implementation, step S400 constructs a spike classification model based on a neural network and the original data set, including:
[0100] Establish a spike potential classification model based on neural network;
[0101] Selecting a portion from the original data set to obtain a training sequence;
[0102] The spike potential classification model is trained based on the training sequence to obtain a trained spike potential classification model.
[0103] In a specific implementation, step S400 constructs a spike classification model based on a neural network and the original data set, and further includes:
[0104] Selecting a portion from the original data set to obtain a test sequence, wherein the intersection of the test sequence and the training sequence is empty;
[0105] Testing the trained spike potential classification model based on the test sequence to obtain a loss value and an accuracy rate of the spike potential classification model;
[0106] When the loss value and the accuracy rate meet the training criteria, the spike potential classification model is used as the final spike potential classification model.
[0107] The neural network model in this application is generally a one-dimensional convolutional neural network (1DCNN). A one-dimensional convolutional neural network generally needs to include the following main components: one-dimensional convolution layer (Conv1d), activation function (such as ReLU), pooling layer (such as MaxPooling1d), batch normalization layer (BatchNorm1d), fully connected layer (Linear), Dropout layer.
[0108] 1DCNN can effectively capture local patterns and features in one-dimensional data. At the same time, through the combination of convolutional layers and pooling layers, 1DCNN can extract key features in the data. 1DCNN uses parameter sharing in the convolution process, which greatly reduces the number of model parameters. This makes 1DCNN have fewer parameters and computational costs when processing one-dimensional data, and can maintain good model generalization capabilities.
[0109] By stacking multiple convolutional layers and pooling layers, 1DCNN can automatically learn multi-level feature representations in the data. This automatic feature learning capability enables 1DCNN to discover abstract features in the data and provide more accurate predictions in classification, regression or other tasks.
[0110] Through multiple data test results, this application finally uses three convolutional neural network blocks and one fully connected neural network layer to build a neural network model, which can be trained according to the original data set of this application to obtain the best effect. The three convolutional neural network blocks in this article are superimposed applications of the above main components, with the aim of increasing the depth of the entire network and improving the complexity of the network.
[0111] The output of each convolutional neural network block is the input of the next layer, and the output after three convolutional neural network blocks is used as the input of the fully connected neural network layer. The output after the fully connected neural network layer is the final predicted classification result, which corresponds to one of the labels in the label array. This application takes the initial input data size of 1*180 as an example for explanation.
[0112] The first convolutional neural network block is constructed as follows:
[0113] 1) One-dimensional convolution layer (Conv1d). Since the initial input is one-dimensional data, the input channel (in_channels) size of this one-dimensional convolution layer is 1, the output channel (out_channels) size is 16, the convolution kernel (kernel_size) size is 3, and the stride (stride) is 1.
[0114] The core of 1DCNN is convolution. The purpose of convolution is to better extract features. The input channel and output channel here refer to the dimensions of input and output data.
[0115] Taking 1*180 data as an example, 1 represents dimension and 180 represents data length. After this convolution layer, the data dimension becomes 16 and the data length becomes 178, which is equivalent to the data changing from 1*180 to 16*178.
[0116] This is the technical purpose of the one-dimensional convolutional layer in the first convolutional neural network block: increasing the number of channels can increase the network's sensitivity to multiple features and improve the network's expressiveness, thereby better capturing information and patterns in the data.
[0117] 2) Batch Normalization Layer (BatchNorm1d): It is used to normalize the output of the one-dimensional convolutional layer. The number of input features (num_features) is the size of the output channel in the previous step.
[0118] 3) Activation function (such as ReLU). It is used to introduce nonlinear factors, convert negative values to zero, and retain positive values.
[0119] 4) Pooling layer (such as MaxPooling1d). It is used to reduce the spatial dimension of the feature map, reduce the number of parameters and extract the most significant features. The pooling window size is 2 (kernel_size=2) and the stride is 2.
[0120] 5) Regularization technology (Dropout layer). It is used to randomly discard the output of some neurons to reduce the risk of overfitting. In this embodiment, the dropout rate is 0.25, which means that the output of the neuron is discarded with a probability of 25%.
[0121] At the same time, the composition of the second convolutional neural network block and the third convolutional neural network block is consistent with the second convolutional neural network block, only the number of input and output channels of the one-dimensional convolutional layer and the parameters of the one-dimensional normalization operation change.
[0122] Among them, the number of input and output channels of the one-dimensional convolutional layer corresponding to the second convolutional neural network block is 16 and 32 respectively, and the parameter of the one-dimensional normalization operation is 32.
[0123] The number of input and output channels of the one-dimensional convolutional layer corresponding to the third convolutional neural network block is 32 and 64 respectively, and the parameter of the one-dimensional normalization operation is 64.
[0124] Each time the one-dimensional data is input, the sequence_length is 180. When it passes through the convolution layer of the first convolutional neural network block, the data length will change. The calculation formula is:
[0125] (sequence_length-kernel_size+2*padding) / stride+1
[0126] The initial sequence_length is 180. After the convolution layer, the sequence_length becomes (180-3+2*0) / 1+1=178. After the one-dimensional maximum pooling operation, the sequence_length is halved to 89. The remaining operations do not change the data length.
[0127] After three convolutional neural network blocks, the dimension of the data obtained is 64, and the data length of each dimension is 20, that is, the data changes from 1*180 to 64*20.
[0128] The ultimate goal of the network is to make classification predictions, that is, given a 1*180 data, a classification label needs to be output.
[0129] To achieve this goal, the 64*20 data from the previous step needs to be mapped to one of the 15 categories. Therefore, a fully connected neural network layer needs to be set after the output of the third convolutional neural network block.
[0130] Therefore, after passing through the second convolutional neural network block and the third convolutional neural network block, the final data length is 20 according to the same calculation method as above.
[0131] The structure of the fully connected neural network layer is as follows:
[0132] 1) The first linear layer (Linear1). It is used to map the features of the data after passing through the convolutional neural network block to a smaller number of features.
[0133] The feature quantity calculation method is output channel number * data length, and the feature quantity obtained after the above steps is 64 * 20 = 1280. The linear layer of the present application maps it to a 512-dimensional feature representation.
[0134] 2) Activation function (such as ReLU): It is used to perform nonlinear transformation on the output of the linear layer, introduce nonlinear relationships, and enhance the expressiveness of the model.
[0135] 3) Regularization technology (Dropout layer): Randomly set the input to zero with a probability of 0.5 to reduce overfitting.
[0136] 4) The second linear layer (Linear2) is used to map the 512-dimensional features mapped by the first linear layer to the final num_classes. Num_classes is the number of categories, that is, the number of neurons, the length of the label array. Taking the data obtained in the above embodiment as an example, num_classes is 15.
[0137] The fully connected layer used in this application does not directly map from 1280 to 15, but uses the first linear layer and the second linear layer to map from 1280 to 512 and then from 512 to 15. The purpose of this is to reduce the complexity of the model, extract more representative features, avoid overfitting, and improve the generalization ability and training efficiency of the model.
[0138] It should be noted that the above steps are all part of the process of building a model, and the parameters in this process are all set manually, such as the channel size, the number of convolutional neural network blocks, and the parameters in each step are set manually by technicians. The training process does not involve the above parameters, and the above steps are only to show the structure of the neural network constructed in this application.
[0139] Get the training set and test set data, and start training after the model is built. The final input and output of the entire model are a single waveform and its corresponding label.
[0140] The training process is to input a single data into the neural network to see whether its final output is consistent with its original label. The parameter used to measure whether it is consistent is the loss value.
[0141] The loss value is used to measure the difference between the model prediction result and the actual label. This application uses the cross entropy loss function (CrossEntropyLoss) for calculation.
[0142] During the training process, the model's predictions are calculated through forward propagation, and then compared with the actual labels to calculate the loss value. Next, the gradient is calculated through backpropagation and the model's parameters are updated, with the goal of minimizing the loss value.
[0143] During the training process, you can use optimization algorithms (such as gradient descent) to continuously optimize the model parameters so that the loss value of the model on the training data gradually decreases. This process is automatically completed by the neural network.
[0144] Accuracy is used to measure the classification accuracy of the model in the classification task. Accuracy refers to the ratio between the number of samples correctly classified by the model and the total number of samples. The higher the accuracy, the better the classification ability of the model, and the more accurately it can classify samples into different categories.
[0145] During testing, the accuracy of the model can be calculated by comparing the model's predictions with the actual labels, counting the number of samples that were correctly predicted and dividing by the total number of samples.
[0146] For the neural network and data constructed in this application, the network model with a loss value less than 0.1 and an accuracy greater than 97% will be retained, otherwise it is considered that the model does not meet the requirements and the parameters are readjusted for training.
[0147] S500: Acquire the current EEG signal set;
[0148] S600: Obtaining a spike potential signal set after classification prediction according to the spike potential classification model and the current EEG signal set.
[0149] In a specific implementation, step S600 obtains a classified and predicted spike signal set according to the spike classification model and the current EEG signal set, including:
[0150] S610: Inputting the current EEG signal set into the spike potential classification model;
[0151] S620: Classify and predict the current EEG signal set based on the spike potential classification model to obtain a current spike potential signal set;
[0152] S630: Obtaining an updated spike potential signal set according to the historical spike potential signal set and the current spike potential signal set.
[0153] In a specific implementation manner, step S630 obtains an updated spike signal set according to the historical spike signal set and the current spike signal set, including:
[0154] Acquire second coordinate information of a main channel that collects all spike potential signals in the current spike potential signal set;
[0155] Obtaining the distance between the main channels corresponding to the first coordinate information and the second coordinate information respectively;
[0156] Determine whether the distance is greater than a preset distance;
[0157] If so, all spike potential signals corresponding to the distance greater than the preset distance are collected through the main channel corresponding to the new neuron, and all spike potential signals corresponding to the distance greater than the preset distance are added to the historical spike potential signal set.
[0158] In a specific implementation manner, it is determined whether the distance is greater than a preset distance, and then the following step is further included:
[0159] If not, it is determined that the main channel for collecting all spike potential signals in the current spike potential signal set and the main channel corresponding to the first coordinate information are the main channel corresponding to the same neuron.
[0160] The coordinates of the main channel of the spike potential signal obtained by the spike potential classification model based on the classification prediction of the currently collected EEG signal data are compared with the coordinates of the main channel corresponding to the historical spike potential signal.
[0161] If the two coordinates are the same or the distance between the two coordinates is less than or equal to the preset distance, it is considered that the current spike potential signal is generated by the neuron that generated the historical spike potential signal, and the current spike potential signal is incorporated into the spike potential signal data set collected by the main channel corresponding to the neuron label.
[0162] If the distance between the two coordinates is greater than the preset distance, it is considered that the current spike potential signal is not generated by the neuron that generated the historical spike potential signal, that is, it is generated by a new neuron. The current spike potential signal and its corresponding main channel and neuron label are listed as a new spike potential signal data set and added to the historical spike potential signal set to retrain the spike potential classification model and update the current spike potential classification model.
[0163] In this embodiment, the preset distance is 100 μm.
[0164] like Figure 2 As shown, the embodiment of this specification provides a classification prediction device for spike potential information, including:
[0165] The first acquisition module 201 is used to acquire a set of historical EEG signals;
[0166] The historical spike potential acquisition module 202 is used to classify the historical EEG signal set based on the spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes the spike potential signal and the first coordinate information of the main channel where the spike potential signal is collected;
[0167] The data set processing module 203 is used to slice the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets;
[0168] Classification model building module 204: used to build a spike classification model based on the neural network and the original data set;
[0169] The second acquisition module 205 is used to acquire the current EEG signal set;
[0170] Classification prediction module 206: used to obtain a classified predicted spike signal set according to the spike classification model and the current EEG signal set.
[0171] Although the present invention has been described through preferred embodiments, the present invention is not limited to the embodiments described herein but includes various changes and modifications that may be made without departing from the scope of the present invention.
[0172] In the absence of conflict, the above embodiments and features in the embodiments can be combined with each other.
[0173] The above disclosure is only a preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A classification prediction method for spike potential information, characterized in that: include: Get a collection of historical EEG signals; Classify the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes a spike potential signal and first coordinate information of a main channel for collecting the spike potential signal; Slicing the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets; Constructing a spike potential classification model based on the neural network and the original data set; Get the current EEG signal set; Obtaining a spike potential signal set after classification prediction according to the spike potential classification model and the current EEG signal set; Among them, obtaining a spike potential signal set after classification and prediction according to the spike potential classification model and the current EEG signal set includes: inputting the current EEG signal set into the spike potential classification model; classifying and predicting the current EEG signal set based on the spike potential classification model to obtain the current spike potential signal set; acquiring the second coordinate information of the main channel that collects all the spike potential signals in the current spike potential signal set; obtaining the distance between the main channels corresponding to each of them according to the first coordinate information and the second coordinate information; judging whether the distance is greater than a preset distance; if so, collecting all the spike potential signals corresponding to the distance greater than the preset distance through the main channel corresponding to the new neuron, and adding all the spike potential signals corresponding to the distance greater than the preset distance to the historical spike potential signal set.
2. The classification prediction method of spike potential information according to claim 1, characterized in that: The historical EEG signal set is classified and processed based on the spike potential classification method to obtain a historical spike potential signal set, including: Obtaining the spike potential collected by each channel and the EEG signal collected by the neighboring channel corresponding to the current channel according to the historical EEG signal set, wherein the neighboring channel corresponding to the current channel is determined by the coordinate information of each channel; Determine a main channel and its corresponding neurons according to the spike potential collected by the current channel and the EEG signal collected by the neighboring channel; The spike potential signals collected by all the main channels are acquired to obtain a set of historical spike potential signals.
3. The classification prediction method of the spike potential information according to claim 1 or 2, characterized in that: The historical EEG signal set is classified based on the spike potential classification method to obtain a historical spike potential signal set, and then includes: The historical spike potential signal set is expanded based on a data enhancement method to obtain an expanded historical spike potential signal set.
4. The classification prediction method of spike potential information according to claim 1, characterized in that: The historical spike signal set is sliced and processed based on a preset sampling period to obtain several original data sets, including: Obtaining a time parameter corresponding to the spike signal; The historical spike signal set is sliced based on the time parameter to obtain a plurality of original data sets.
5. The classification prediction method of spike potential information according to claim 4, characterized in that: A spike potential classification model is constructed based on the neural network and the original data set, including: Establish a spike potential classification model based on neural network; Selecting a portion from the original data set to obtain a training sequence; The spike potential classification model is trained based on the training sequence to obtain a trained spike potential classification model.
6. The classification prediction method of spike potential information according to claim 5, characterized in that: Constructing a spike potential classification model based on the neural network and the original data set also includes: Selecting a portion from the original data set to obtain a test sequence, wherein the intersection of the test sequence and the training sequence is empty; Testing the trained spike potential classification model based on the test sequence to obtain a loss value and an accuracy rate of the spike potential classification model; When the loss value and the accuracy rate meet the training criteria, the spike potential classification model is used as the final spike potential classification model.
7. The classification prediction method of spike potential information according to claim 1, characterized in that: Determining whether the distance is greater than a preset distance, and then further comprising: If not, it is determined that the main channel for collecting all spike potential signals in the current spike potential signal set and the main channel corresponding to the first coordinate information are the main channel corresponding to the same neuron.
8. A classification prediction device for spike potential information, characterized in that: include: The first acquisition module: used to acquire a set of historical EEG signals; A historical spike potential acquisition module is used to classify the historical EEG signal set based on a spike potential classification method to obtain a historical spike potential signal set, wherein the historical spike potential signal set includes a spike potential signal and first coordinate information of a main channel for collecting the spike potential signal; A data set processing module: used for slicing the historical spike signal set based on a preset sampling period to obtain a plurality of original data sets; Classification model building module: used to build a spike potential classification model based on the neural network and the original data set; The second acquisition module: used to acquire the current EEG signal set; Classification prediction module: used for obtaining a classified and predicted spike signal set according to the spike classification model and the current EEG signal set; Among them, obtaining a spike potential signal set after classification and prediction according to the spike potential classification model and the current EEG signal set includes: inputting the current EEG signal set into the spike potential classification model; classifying and predicting the current EEG signal set based on the spike potential classification model to obtain the current spike potential signal set; acquiring the second coordinate information of the main channel that collects all the spike potential signals in the current spike potential signal set; obtaining the distance between the main channels corresponding to each of them according to the first coordinate information and the second coordinate information; judging whether the distance is greater than a preset distance; if so, collecting all the spike potential signals corresponding to the distance greater than the preset distance through the main channel corresponding to the new neuron, and adding all the spike potential signals corresponding to the distance greater than the preset distance to the historical spike potential signal set.