An electroencephalogram signal classification method, device and equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-06-23
Smart Images

Figure CN122270757A_ABST
Abstract
Description
A method, apparatus and device for classifying electroencephalogram (EEG) signals Technical Field
[0001] This application belongs to the fields of neural networks and integrated circuit design, and more specifically, relates to a method, device and equipment for classifying electroencephalogram (EEG) signals. Background Technology
[0002] Electroencephalography (EEG) signals, or signals recorded by an electroencephalogram (EEG), are a comprehensive reflection of the electrophysiological activity of brain nerve cells on the surface of the cerebral cortex or scalp. Their applications are very broad, including medicine, brain-computer interfaces, scientific research, and education. In the application of EEG signals in medicine and scientific research, it is essential to classify the recorded EEG signals in order to analyze the information they reflect. For example, in clinical practice, in the adjunctive treatment of epilepsy, schizophrenia, and other mental illnesses, or in medical research, it is often necessary to identify the signal characteristics of the recorded EEG signals to analyze the pathological information of the patient represented by these signal characteristics.
[0003] Existing technologies use neural network systems built on the von Neumann architecture to classify EEG signals, thereby improving the efficiency of parallel multiply-accumulate operations in deep neural networks and thus enhancing the efficiency of EEG signal classification. However, this approach also increases the energy consumption per EEG signal classification cycle. Therefore, how to improve the efficiency of EEG signal classification while reducing its energy consumption has become an urgent problem to be solved.
[0004] Summary of the Invention
[0005] In view of this, the purpose of this application is to provide a method, apparatus, and device for classifying electroencephalogram (EEG) signals, which improves the efficiency of EEG signal classification while reducing the energy consumption of EEG signal classification. The technical solution is as follows:
[0006] The first aspect of this application provides a method for classifying electroencephalogram (EEG) signals, applied to a first resistive variable memory (RVM) of a resistive variable memory array. The RVM array further includes a second RVM. The first RVM stores a target computation program for classifying EEG signals using a neural network, and a first weight value corresponding to each signal abnormality type. The second RVM stores a second weight value corresponding to each of the signal abnormality types.
[0007] The electroencephalogram (EEG) signal classification method includes:
[0008] The first resistive random access memory acquires the EEG signal to be classified;
[0009] Extract the signal features of the EEG signal to be classified;
[0010] Determine the similarity between the signal features and preset normal EEG signal features;
[0011] If the similarity is not greater than a preset threshold, the target operation program and the target weight value corresponding to each signal abnormality type are called to process the EEG signal to be classified, and the current feature value corresponding to each target weight value is obtained. The target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type.
[0012] The signal abnormality type corresponding to the largest current characteristic value among all the current characteristic values is determined as the target signal abnormality type of the EEG signal to be classified.
[0013] If the similarity is greater than the preset threshold, the EEG signal to be classified is determined to be a normal EEG signal.
[0014] In one possible implementation, extracting the signal features of the EEG signal to be classified includes:
[0015] The EEG signal to be classified is filtered at a preset cutoff frequency to obtain the target EEG signal;
[0016] The mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal are extracted, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
[0017] In one possible implementation, determining the similarity between the signal features and preset normal EEG signal features includes:
[0018] Determine the cosine similarity between the signal features and preset normal EEG signal features.
[0019] In one possible implementation, the step of invoking the target computation program and the target weight value corresponding to each of the signal abnormality types to process the EEG signal to be classified, and obtaining the current feature value corresponding to each of the target weight values, includes:
[0020] Obtain the voltage characteristics of the EEG signal to be classified;
[0021] The target calculation program is invoked to sequentially perform convolution multiplication on the voltage feature and the target weight value to obtain the current feature value corresponding to each target weight value. The convolution multiplication process is as follows:
[0022] I j =∑w j ×V BLj
[0023] Among them, I jw represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the EEG signal to be classified.
[0024] The second aspect of this application provides an electroencephalogram (EEG) signal classification device, which is applied to a first resistive variable memory in a resistive variable memory array. The resistive variable memory array further includes a second resistive variable memory. The first resistive variable memory stores a target computation program for classifying EEG signals using a neural network, and a first weight value corresponding to each signal abnormality type. The second resistive variable memory stores a second weight value corresponding to each of the signal abnormality types.
[0025] The electroencephalogram (EEG) signal classification device includes:
[0026] The signal acquisition unit is used by the first resistive random access memory to acquire the EEG signal to be classified.
[0027] The feature extraction unit is used to extract the signal features of the EEG signal to be classified;
[0028] A similarity determination unit is used to determine the similarity between the signal features and preset normal EEG signal features;
[0029] The program calling unit is used to call the target operation program and the target weight value corresponding to each of the signal abnormality types when the similarity is not greater than a preset threshold, to process the EEG signal to be classified, and obtain the current feature value corresponding to each of the target weight values, wherein the target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type.
[0030] An abnormality type determination unit is used to determine the signal abnormality type corresponding to the largest current characteristic value among all the current characteristic values as the target signal abnormality type of the EEG signal to be classified.
[0031] A normal signal determination unit is used to determine that the EEG signal to be classified is a normal EEG signal when the similarity is greater than the preset threshold.
[0032] In one possible implementation, the feature extraction unit includes:
[0033] The signal filtering subunit is used to filter the EEG signal to be classified at a preset cutoff frequency to obtain the target EEG signal.
[0034] The feature extraction subunit is used to extract the mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
[0035] In one possible implementation, the similarity determination unit includes:
[0036] The cosine similarity determination subunit is used to determine the cosine similarity between the signal features and preset normal EEG signal features.
[0037] In one possible implementation, the program calling unit includes:
[0038] A voltage feature acquisition subunit is used to acquire the voltage features of the EEG signal to be classified.
[0039] The program calling subunit is used to call the target calculation program to sequentially perform convolution multiplication on the voltage feature with the target weight value to obtain the current feature value corresponding to each target weight value. The convolution multiplication process is as follows:
[0040] I j =∑w j ×V BLj
[0041] Among them, I j w represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the EEG signal to be classified.
[0042] A third aspect of this application provides an electroencephalogram (EEG) signal classification device, comprising: a controller and a resistive variable memory array, wherein the resistive variable memory array comprises: a first resistive variable memory and a second resistive variable memory, wherein the first resistive variable memory stores a target computation program for classifying EEG signals using a neural network, and a first weight value corresponding to each signal abnormality type, and the second resistive variable memory stores a second weight value corresponding to each of the signal abnormality types.
[0043] The first resistive random access memory is used to implement any one of the EEG signal classification methods described above.
[0044] Compared to existing technologies, this application considers that only abnormal signals in EEG signals are considered valid information for testing personnel. Therefore, this application first identifies the signal characteristics of the EEG signal to be classified to determine whether the EEG signal is normal. If it is normal, there is no need to activate the neural network for classification. However, if the EEG signal is abnormal, the neural network algorithm and target weight values are invoked to classify the abnormal signal and identify the valid information of the EEG signal. Based on this, the data processing volume and power consumption of the neural network are effectively reduced, and the classification efficiency is improved.
[0045] The resistive random access memory used in this application embodiment can simultaneously realize storage function and neural network operation function. Compared with the prior art, it eliminates the power consumption caused by frequent data transfer between the memory and the processor that implements the neural network algorithm. Furthermore, due to the integration of storage and computing, it also greatly improves the data transmission speed, shortens the classification process time, and further improves the efficiency of EEG signal classification. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 is a flowchart illustrating the implementation of the EEG signal classification method provided in an embodiment of this application;
[0048] Figure 2 is a schematic diagram of the mapping of the convolutional neural network on the resistive random access memory provided in the embodiment of this application;
[0049] Figure 3 is a schematic diagram of the system testing platform provided in an embodiment of this application;
[0050] Figure 4 is an example diagram of power consumption ratio provided in the embodiments of this application;
[0051] Figure 5 is an application example of the EEG signal classification method provided in the embodiments of this application;
[0052] Figure 6 is a schematic diagram of the structure of an electroencephalogram (EEG) signal classification device provided in an embodiment of this application. Detailed Implementation
[0053] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0054] With in-depth research into EEG signals, machine learning methods such as neural networks and deep learning have been proposed and applied to EEG signal classification to improve the automation and accuracy of classification. Meanwhile, existing technologies aim to improve the efficiency of EEG signal classification. Accelerators based on the von Neumann architecture can enhance the efficiency of parallel multiply-accumulate operations in deep neural networks, thereby accelerating matrix-vector multiplication and improving classification efficiency. However, the performance bottleneck of these von Neumann architecture-based accelerators lies in storage bandwidth limitations. When the amount of EEG signal data processed reaches a certain level, it affects the data transmission speed, which in turn affects the classification efficiency. Furthermore, DRAM (Dynamic Random Access Memory) in the von Neumann architecture consumes more than 100 times more energy than on-chip storage using RRAM (Resistive Random-Access Memory) and SRAM (Static Random Access Memory).
[0055] Based on this, the inventors considered retaining the neural network's method for classifying EEG signals while structurally addressing the drawbacks of traditional hardware systems and dedicated neural network chip architectures. Specifically, they attempted to improve memory performance while integrating more high-performance SRAM storage resources around computing resources to increase bandwidth and reduce power consumption. However, data transfer between SRAMs became a new bottleneck, affecting data transfer speed, and accessing multiple SRAMs resulted in high power consumption. Therefore, the inventors determined a neural network design for RRAM, utilizing the excellent analog characteristics of resistive random access memory (RRAM) to combine convolutional neural networks with RRAM for EEG signal classification.
[0056] Specifically, this application provides an EEG signal classification device, including: a controller and a resistive variable memory array. The resistive variable memory array includes: a first resistive variable memory and a second resistive variable memory. The first resistive variable memory stores a target computation program for classifying EEG signals using a neural network, and a first weight value corresponding to each signal abnormality type. The second resistive variable memory stores a second weight value corresponding to each of the signal abnormality types.
[0057] In this embodiment, the convolutional neural network is implemented using resistive random access memory (RRAM). Since the weight values of the neural network can be positive or negative, but the resistance value of the RRAM is an absolute value and cannot represent positive or negative values, this embodiment selects two columns of RRAM to represent positive weight values and negative weight values respectively. That is, the weight values in the first and second RRAMs in the RRAM array represent positive weight values and negative weight values respectively.
[0058] For example, the first weight value, w+1, w+2, ... w+9, representing positive weight values, is mapped to the first resistive random access memory (RRAM), and the second weight value, w-1, w-2, ... w-9, representing negative weight values, is mapped to the second RRAM. In fact, both the first and second weight values are positive. The current values of the two RRAMs are output with signs, and the difference between the weight values of the two RRAMs is calculated, i.e., "positive weight - positive weight", which can be regarded as "positive weight + negative weight". This represents the positive or negative weight value of the convolutional neural network.
[0059] Furthermore, the classification of EEG signals is realized in the in-memory computing resistive variable memory array. In this embodiment, the first resistive variable memory of the resistive variable memory array carries the operation program of the convolutional neural network. Therefore, the process of classifying EEG signals using the first resistive variable memory as an example is used to explain the process of classifying EEG signals.
[0060] Referring to Figure 1, a flowchart illustrating the implementation of the EEG signal classification method provided in this embodiment of the application includes the following steps:
[0061] Step S110: Obtain the EEG signal to be classified.
[0062] Step S120: Extract the signal features of the EEG signal to be classified.
[0063] Electroencephalogram (EEG) signals are curves obtained by amplifying and recording weak spontaneous bioelectric potentials in the brain from the scalp using an electroencephalogram (EEG) recorder. Optionally, EEG signal acquisition devices such as digital EEG topography instruments and EEG machines can be used to acquire EEG signals to be classified in real time; or EEG signal research samples can be obtained as EEG signals to be classified.
[0064] In one possible implementation, the EEG signal classification method is applied to the scenario of classifying epileptic EEG signals. The signal to be classified can be the Bonn Dataset, an EEG signal dataset primarily used for research on epileptic EEG signals. Each subset contains 100 data segments, each with a duration of 23.6 seconds, a sampling frequency of 173.61 Hz, a resolution of 12 bits, and 4097 data points, which can be denoted as x1, x2…x n .
[0065] Furthermore, signal features are extracted from the EEG signals to be classified, and these features are used as the basis for signal recognition and classification. Optionally, a preset waveform analysis method can be used to extract the amplitude, period, waveform, and occurrence mode of the EEG signals to be classified. Alternatively, frequency domain analysis and time series analysis can be performed on the signal graph of the EEG signals to be classified to obtain frequency domain features and time domain features.
[0066] In one possible implementation, the process of extracting signal features from the EEG signal to be classified may include: filtering the EEG signal to be classified at a preset cutoff frequency to obtain the target EEG signal; and extracting the mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
[0067] First, the EEG signal to be classified is filtered at a preset cutoff frequency to remove impurity signals and improve the accuracy of signal features. Next, features are extracted from the filtered target EEG signal. Based on the feature algorithm corresponding to each feature and the known data features in the target EEG signal, feature information is calculated.
[0068] Specifically, the mean of the target EEG signal can be calculated using the following formula (1):
[0069] The standard deviation of the target EEG signal can be calculated using the following formula (2):
[0070] The attenuation of the target EEG signal can be calculated using the following formula (3):
[0071] Where dataWindow is the target EEG signal, i is the acquisition time, mean is the mean of the target EEG signal, L is the standard deviation of the target EEG signal, decay is the decay of the target EEG signal, and S(i) is the amplitude of the target EEG signal at time i.
[0072] Additionally, the average number of zero-crossings of the target EEG signal can be obtained by referring to the code below. The logic for calculating the number of zero-crossings of the target EEG signal can be edited as follows:
[0073] Optionally, a feature extraction model can be constructed based on the above signal feature extraction algorithm. The target EEG signal is input into the feature extraction model, and the output feature information is received.
[0074] Step S130: Determine the similarity between the signal features and the preset normal EEG signal features.
[0075] Step S140: Determine whether the similarity is greater than a preset threshold. If the determination result is no, that is, the similarity is not greater than the preset threshold, proceed to steps S150 and S151; if the determination result is yes, that is, the similarity is greater than the preset threshold, proceed to step S160.
[0076] Step S160: Determine that the EEG signal to be classified is a normal EEG signal.
[0077] Understandably, electroencephalogram (EEG) signals contain a wealth of physiological and disease information, serving as a crucial basis for research in medicine, neuroscience, and artificial intelligence. However, abnormal signals within the EEG typically reveal physiological and disease information. If a neural network model is used to classify a large volume of normal EEG signals, the resulting classification will not yield effective results related to physiological and disease information. For instance, in the detection of EEG signals in epilepsy, signals from non-epileptic states constitute a higher proportion of the EEG signal compared to those from epileptic seizures. Typically, a 48-hour history of epileptic seizures in an epileptic patient's EEG signal only includes 3-10 seizure signals, each lasting from a few seconds to tens of seconds. Given this situation, continuously activating a large neural network to distinguish between epileptic and non-epileptic seizure states would result in significant power consumption.
[0078] Therefore, in this embodiment, based on the signal characteristics of the EEG signal to be classified, a general classification is performed in advance to determine whether the EEG signal to be classified is a normal signal. If it is an abnormal signal, the neural network is then called to perform a more detailed classification, thereby reducing power consumption loss.
[0079] Among them, the characteristics of normal EEG signals can be the characteristics of EEG signals collected in advance from subjects without brain diseases, or the characteristics of EEG signals that meet a certain detection standard. For example, the characteristics of all non-epileptic seizure signals can be statistically analyzed as a basis for pre-identifying whether the EEG signal to be classified is an epileptic seizure signal.
[0080] To determine the similarity between the signal features of the EEG signal to be classified and the features of the normal EEG signal, one possible implementation is to use cosine similarity to measure the similarity between the signal features of the EEG signal to be classified and the features of the normal EEG signal.
[0081] A higher similarity indicates that the EEG signal to be classified is more like a normal EEG signal, while a lower similarity indicates that the EEG signal to be classified is more likely to be an abnormal EEG signal. In this embodiment, the similarity is compared with a preset threshold. If the similarity is not greater than the preset threshold, a convolutional neural network is invoked to classify the EEG signal to be classified. If the similarity is greater than the preset threshold, the EEG signal to be classified is determined to be a normal EEG signal, and the convolutional neural network is not used for further classification.
[0082] Step S150: Call the target calculation program and the target weight value corresponding to each signal abnormality type to process the EEG signal to be classified and obtain the current feature value corresponding to each target weight value.
[0083] Step S151: Determine the signal abnormality type corresponding to the largest current feature value among all current feature values as the target signal abnormality type of the EEG signal to be classified.
[0084] The target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type. Referring to Figure 2, a schematic diagram of the mapping of the convolutional neural network on the resistive random access memory (RRAM) provided in this embodiment of the application is shown. V1, V2, ..., V9 are voltage signals obtained after quantizing the EEG signal to be classified, which are used as the input signals of the convolutional neural network. The input signals are applied to two columns of RRAM, and matrices V1 to V9 are applied as a vector to inputs BL0 to BL8. w+1 to w+9 represent positive weights mapped to one column of RRAM, which in this embodiment is mapped to the first RRAM. w-1 to w-9 represent negative weights mapped to the other column of RRAM, i.e., the second RRAM.
[0085] As shown in Figure 2, the currents of the first and second resistive switching memories are converged to obtain the target weight values I1 to I9 obtained by comprehensively mapping each positive and negative weight. The current of the target weight values and the voltage of the EEG signal to be classified are processed in BL0 to BL8 to obtain the converged current of each CSA output, i.e., the current characteristic value. Based on the relationship between the current characteristic values of each CSA output, the type of EEG signal to be classified is determined.
[0086] Specifically, the data processing procedure combining the target weight value and the EEG signal to be classified may include: obtaining the voltage features of the EEG signal to be classified; calling the target calculation program to perform convolution multiplication on the voltage features with the target weight value in sequence to obtain the current feature value corresponding to each target weight value, wherein the convolution multiplication process refers to the following formula (4):
[0087] I j =∑w j ×V BLj ...............................(4)
[0088] Among them, I j w represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the input EEG signal to be classified.
[0089] In Figure 2, the CSA output result Out0 is the current characteristic value obtained by processing with one row of RRAM, and so on, the second CSA output result Out1 is the current characteristic value obtained by processing with two rows of RRAM. Based on this, when performing the first CSA operation, w in the above equation (4) j In the second CSA operation, w represents w+1 to w+9 or w-1 to w-9. j This represents the target weight value. In the embodiments of this application, in the case of two RRAMs, the classification result can be obtained using only the outputs of the two CSAs.
[0090] If it is a binary classification of EEG signals, the first current characteristic value (CSA) corresponds to the current characteristic value (A) of signal abnormality type A, and the second current CSA corresponds to the current characteristic value (B) of signal abnormality type B. By comparing the current characteristic value (A) and the current characteristic value (B), the signal abnormality type corresponding to the larger current characteristic value is the classification result, i.e., the target signal abnormality type.
[0091] In summary, compared with existing technologies, this application's embodiments consider that only abnormal signals in EEG signals are considered valid information for testing personnel. Therefore, this application first identifies the signal characteristics of the EEG signal to be classified to determine whether it is a normal EEG signal. If it is a normal EEG signal, there is no need to activate the neural network for classification. However, if the EEG signal to be classified is abnormal, the neural network algorithm and target weight value are invoked to classify the abnormal signal in the EEG signal to be classified, thereby identifying the valid information of the EEG signal to be classified. Based on this, the data processing volume and power consumption of the neural network are effectively reduced, and the classification efficiency is improved.
[0092] The resistive random access memory used in this application embodiment can simultaneously realize storage function and neural network operation function. Compared with the prior art, it eliminates the power consumption caused by frequent data transfer between the memory and the processor that implements the neural network algorithm. Furthermore, due to the integration of storage and computing, it also greatly improves the data transmission speed, shortens the classification process time, and further improves the efficiency of EEG signal classification.
[0093] Next, possible methods for implementing the above-described EEG signal classification method will be described by way of example. Referring to Figure 3, a schematic diagram of the system test platform provided in this embodiment of the application is shown. The system test platform includes a terminal, an FPGA controller, and a resistive random access memory (RRAM) array.
[0094] The RRAM array is fabricated using a 40nm CMOS process. This chip is connected to the PCB via a chip-on-board (COB) connection and tested on an FPGA-based test platform. The terminal writes the test code, along with pre-classification logic and a convolutional neural network model, into the FPGA controller and the RRAM array, respectively.
[0095] A complete CNN forward inference operation was implemented in the memristor array acceleration module using the MNSIM simulation platform. The accuracy of the CNN model on the Born dataset containing EEG signals on the GPU (97.7%) was not significantly different from that on the memristor array acceleration module (94.2%), and the loss range was acceptable. After using the event-driven structure, the power consumption was reduced by 14% due to the reduction in the activation frequency of the CNN, while the accuracy was only reduced by 1.5%, which was also acceptable.
[0096] Referring to Figure 4, an example diagram of power consumption percentage provided in this application embodiment, power consumption is mainly consumed by the DAC and ADC, accounting for approximately 87.3% of the accelerator module's power consumption, while the power consumption of the horizontal bars containing the read / write buffer accounts for approximately 10%. If the total system power consumption is 0.308W, the memristor array power consumption is only 1.98mW. The remaining power consumption is the power consumption of the accelerator module's decoder, adder unit, and other digital circuits. Memristors are a possible technical approach for implementing RRAM; therefore, using an RRAM array can reduce the power consumption for EEG signal classification.
[0097] Referring to Figure 5, an application example diagram of the EEG signal classification method provided in this application embodiment is shown. Based on the logic of steps S120-140 above, a pre-classification module is constructed to determine whether the EEG signal to be classified is a normal EEG signal. Specifically, taking the classification of epileptic EEG signals as an example, using the Born dataset as input data, the x1...x... of the pre-classification module in the figure... n The data points representing the Bonn dataset are processed using counters, logical operations, and other methods, such as "+", "-", " / " and counters in the figure, to obtain the mean, standard deviation, zero-crossing point, and signal attenuation characteristics of the EEG signal to be classified, based on the amplitude range of the EEG signal to be classified.
[0098] By calculating the cosine distance between the signal features and the convolution activation signal and comparing the threshold, where the convolution activation signal can be the signal features of a preset activation signal, such as the signal features of a low-complexity signal or the signal features of a normal signal, it is determined whether the EEG signal to be classified meets the EEG signal feature conditions of convolution activation, or whether the EEG signal to be classified is a normal EEG signal. If it is not a normal EEG signal, the memristor-based convolution classification module is activated to classify the EEG signal.
[0099] The EEG signal, i.e. the EEG signal to be classified, is input to the memristor array. The memristor array determines and outputs the classification result of the EEG signal to be classified, i.e., "normal" or "onset", according to the operating logic of the convolutional neural network running in the memristor array as described in the upper half of the "memristor-based convolutional classification module" (i.e., referring to steps S150-151 described above).
[0100] The following describes the EEG signal classification device provided in the embodiments of this application. The EEG signal classification device described below can be referred to in correspondence with the EEG signal classification method described above.
[0101] First, referring to Figure 6, the EEG signal classification device applied to the first resistive switching memory array will be introduced. As shown in Figure 6, the EEG signal classification device may include:
[0102] The signal acquisition unit 100 is used to acquire the EEG signal to be classified from the first resistive random access memory.
[0103] Feature extraction unit 200 is used to extract signal features of the EEG signal to be classified;
[0104] The similarity determination unit 300 is used to determine the similarity between the signal features and preset normal EEG signal features;
[0105] The program calling unit 400 is used to call the target operation program and the target weight value corresponding to each of the signal abnormality types when the similarity is not greater than a preset threshold, to process the EEG signal to be classified, and obtain the current feature value corresponding to each of the target weight values. The target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type.
[0106] The abnormality type determination unit 500 is used to determine the signal abnormality type corresponding to the largest current characteristic value among all the current characteristic values as the target signal abnormality type of the EEG signal to be classified.
[0107] The normal signal determination unit 600 is used to determine the EEG signal to be classified as a normal EEG signal when the similarity is greater than the preset threshold.
[0108] In summary, compared with existing technologies, this application considers that only abnormal signals in EEG signals are valid information for testing personnel. Therefore, this application first identifies the signal characteristics of the EEG signal to be classified to determine whether the EEG signal is normal. If it is normal, there is no need to activate the neural network for classification. However, if the EEG signal to be classified is abnormal, the neural network algorithm and target weight values are invoked to classify the abnormal signal and identify the valid information of the EEG signal. Based on this, the data processing volume and power consumption of the neural network are effectively reduced, and the classification efficiency is improved.
[0109] The resistive random access memory used in this application embodiment can simultaneously realize storage function and neural network operation function. Compared with the prior art, it eliminates the power consumption caused by frequent data transfer between the memory and the processor that implements the neural network algorithm. Furthermore, due to the integration of storage and computing, it also greatly improves the data transmission speed, shortens the classification process time, and further improves the efficiency of EEG signal classification.
[0110] In one possible implementation, the feature extraction unit 200 includes:
[0111] The signal filtering subunit is used to filter the EEG signal to be classified at a preset cutoff frequency to obtain the target EEG signal.
[0112] The feature extraction subunit is used to extract the mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
[0113] In one possible implementation, the similarity determination unit 300 includes:
[0114] The cosine similarity determination subunit is used to determine the cosine similarity between the signal features and preset normal EEG signal features.
[0115] In one possible implementation, the program calling unit 400 includes:
[0116] A voltage feature acquisition subunit is used to acquire the voltage features of the EEG signal to be classified.
[0117] The program calling subunit is used to call the target calculation program to sequentially perform convolution multiplication on the voltage feature with the target weight value to obtain the current feature value corresponding to each target weight value. The convolution multiplication process is as follows:
[0118] I j =∑w j ×V BLj
[0119] Among them, I j w represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the EEG signal to be classified.
[0120] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0121] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0122] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for classifying electroencephalogram (EEG) signals, characterized in that, A first resistive random access memory (RRAM) is applied to a resistive random access memory array, the RRAM further comprising: a second resistive random access memory, the first RRAM storing a target computation program for classifying electroencephalogram (EEG) signals using a neural network, and a first weight value corresponding to each signal abnormality type, the second RRAM storing a second weight value corresponding to each of the signal abnormality types. The electroencephalogram (EEG) signal classification method includes: The first resistive random access memory acquires the EEG signal to be classified; Extract the signal features of the EEG signal to be classified; Determine the similarity between the signal features and preset normal EEG signal features; If the similarity is not greater than a preset threshold, the target operation program and the target weight value corresponding to each signal abnormality type are called to process the EEG signal to be classified, and the current feature value corresponding to each target weight value is obtained. The target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type. The signal abnormality type corresponding to the largest current characteristic value among all the current characteristic values is determined as the target signal abnormality type of the EEG signal to be classified. If the similarity is greater than the preset threshold, the EEG signal to be classified is determined to be a normal EEG signal.
2. The EEG signal classification method according to claim 1, characterized in that, The extraction of signal features from the EEG signal to be classified includes: The EEG signal to be classified is filtered at a preset cutoff frequency to obtain the target EEG signal; The mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal are extracted, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
3. The EEG signal classification method according to claim 1, characterized in that, Determining the similarity between the signal features and preset normal EEG signal features includes: Determine the cosine similarity between the signal features and preset normal EEG signal features.
4. The EEG signal classification method according to claim 1, characterized in that, The step of calling the target computation program and the target weight value corresponding to each of the signal abnormality types to process the EEG signal to be classified, and obtaining the current feature value corresponding to each of the target weight values, includes: Obtain the voltage characteristics of the EEG signal to be classified; The target calculation program is invoked to sequentially perform convolution multiplication on the voltage feature with the target weight value to obtain the current feature value corresponding to each target weight value, wherein the convolution multiplication is as follows: I j =∑w j ×V BLj Among them, I j w represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the EEG signal to be classified.
5. A brainwave signal classification device, characterized in that, A first resistive random access memory (RRAM) is applied to a resistive random access memory array, the RRAM further comprising: a second resistive random access memory, the first RRAM storing a target computation program for classifying electroencephalogram (EEG) signals using a neural network, and a first weight value corresponding to each signal abnormality type, the second RRAM storing a second weight value corresponding to each of the signal abnormality types. The electroencephalogram (EEG) signal classification device includes: The signal acquisition unit is used by the first resistive random access memory to acquire the EEG signal to be classified. The feature extraction unit is used to extract the signal features of the EEG signal to be classified; A similarity determination unit is used to determine the similarity between the signal features and preset normal EEG signal features; The program calling unit is used to call the target operation program and the target weight value corresponding to each of the signal abnormality types when the similarity is not greater than a preset threshold, to process the EEG signal to be classified, and obtain the current feature value corresponding to each of the target weight values, wherein the target weight value is the difference between the first weight value and the second weight value corresponding to the signal abnormality type. An abnormality type determination unit is used to determine the signal abnormality type corresponding to the largest current characteristic value among all the current characteristic values as the target signal abnormality type of the EEG signal to be classified. A normal signal determination unit is used to determine that the EEG signal to be classified is a normal EEG signal when the similarity is greater than the preset threshold.
6. The EEG signal classification device according to claim 5, characterized in that, The feature extraction unit includes: The signal filtering subunit is used to filter the EEG signal to be classified at a preset cutoff frequency to obtain the target EEG signal. The feature extraction subunit is used to extract the mean, standard deviation, number of zero crossings, and attenuation of the target EEG signal, wherein the number of zero crossings is the total number of times the target EEG signal crosses zero.
7. The EEG signal classification device according to claim 5, characterized in that, The similarity determination unit includes: The cosine similarity determination subunit is used to determine the cosine similarity between the signal features and preset normal EEG signal features.
8. The EEG signal classification device according to claim 5, characterized in that, The program calling unit includes: A voltage feature acquisition subunit is used to acquire the voltage features of the EEG signal to be classified. The program calling subunit is used to call the target calculation program to sequentially perform convolution multiplication on the voltage feature and the target weight value to obtain the current feature value corresponding to each target weight value, wherein the convolution multiplication is as follows: I j =∑w j ×V BLj Among them, I j w represents the current characteristic value corresponding to the j-th target weight value. j V represents the weight value of the j-th objective. BLj This represents the j-th voltage feature of the EEG signal to be classified.
9. A brainwave signal classification device, characterized in that, include: The controller and the resistive variable memory array, the resistive variable memory array including: a first resistive variable memory and a second resistive variable memory, the first resistive variable memory storing a target operation program for classifying EEG signals using a neural network, and a first weight value corresponding to each signal abnormality type, the second resistive variable memory storing a second weight value corresponding to each of the signal abnormality types. The first resistive random access memory is used to implement the EEG signal classification method as described in any one of claims 1-4.