Electroencephalogram signal classification method and device, brain-computer interface equipment and storage medium

Through adaptive threshold detection and segmented summing processing, the neural electrical signal is converted into pulse sequences and input to pulse neural networks, which solves the problems of low classification accuracy and high latency of EEG signals in the prior art, and realizes efficient EEG signals Classification and real-time control.

CN118940110APending Publication Date: 2024-11-12CENT FOR EXCELLENCE IN BRAIN SCI & INTELLIGENCE TECH CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410988451.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing brain-computer interface technology has limitations in processing the nonlinear and time-varying characteristics of neural electrical signals, resulting in low accuracy, large data volume, and high algorithm delay, which cannot meet the real-time requirements.

Method used

The adaptive threshold detection algorithm converts the neural electrical signal data into a target pulse sequence, performs segmented summing processing, obtains the target coding sequence, and inputs it to the target pulse neural network to achieve the precise classification of the EEG signals.

Benefits of technology

It improves the accuracy and real-time nature of EEG signal classification, reduces calculation delay, enhances robustness and biorationality, and meets the real-time control needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940110A_ABST
    Figure CN118940110A_ABST
Patent Text Reader

Abstract

The invention discloses an electroencephalogram signal classification method and device, brain-computer interface equipment and a storage medium, and the method comprises the steps: obtaining electroencephalogram signal data generated by brain activity, and converting the electroencephalogram signal data into a target pulse sequence through an adaptive threshold detection algorithm; performing segmented summation processing on the target pulse sequence to obtain a target coding sequence; and inputting the target coding sequence into a target spiking neural network to obtain a target classification result output by the target spiking neural network, the target classification result corresponding to the intention of the brain activity. The problems that an existing electroencephalogram signal classification method is low in precision, a large amount of data needs to be processed, algorithm delay is high, and the real-time requirement cannot be met are solved, and the precision and real-time performance of electroencephalogram signal classification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of brain-computer interface technology, and in particular to a method and device for classifying electroencephalogram (EEG) signals, a brain-computer interface device, and a storage medium. Background Art

[0002] Brain Computer Interface (BCI) technology allows signals to be extracted directly from brain activity to control external devices or communicate. Although traditional BCI systems rely on linear models or traditional neural networks, these methods have limitations in dealing with the nonlinear and time-varying characteristics of neural electrical signals. In particular, they often rely on cumbersome feature extraction and selection processes, which not only increases system complexity but may also limit performance.

[0003] Therefore, the existing neural electrical signal processing method has low accuracy, requires processing a large amount of data, has high algorithm delay, and cannot meet real-time requirements. Summary of the invention

[0004] The present invention provides a method and device for classifying EEG signals, a brain-computer interface device and a storage medium, so as to achieve accurate classification of EEG signals and reduce delay.

[0005] According to one aspect of the present invention, there is provided a method for classifying an electroencephalogram signal, comprising:

[0006] Acquiring neural electrical signal data generated by brain activity, and converting the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm;

[0007] Performing segmented summation processing on the target pulse sequence to obtain a target coding sequence;

[0008] The target coding sequence is input into a target pulse neural network to obtain a target classification result output by the target pulse neural network, wherein the target classification result corresponds to the intention of the brain activity.

[0009] According to another aspect of the present invention, there is provided a device for classifying electroencephalogram signals, comprising:

[0010] A neural signal acquisition module, used to acquire neural electrical signal data generated by brain activity, and convert the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm;

[0011] A coding sequence generating module, used for performing segmented summation processing on the target pulse sequence to obtain a target coding sequence;

[0012] A classification result determination module is used to input the target coding sequence into a target pulse neural network to obtain a target classification result output by the target pulse neural network, wherein the target classification result corresponds to the intention of the brain activity.

[0013] According to another aspect of the present invention, a brain-computer interface device is provided, the brain-computer interface device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for classifying EEG signals described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for classifying EEG signals described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the neural electrical signal data generated by brain activity, converts the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm; and performs segmented summation processing on the target pulse sequence to obtain a target coding sequence. Not only is the neural electrical signal data converted into a data format suitable for pulse neural network processing, but the amount of data is also simplified. Furthermore, the target coding sequence is input into a target pulse neural network with excellent time series data processing capabilities to obtain a target classification result output by the target pulse neural network, which solves the problems of low accuracy of the prior art, the need to process a large amount of data, high algorithm delay, and the inability to meet real-time requirements, thereby improving the accuracy and real-time performance of EEG signal classification.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 A flowchart of a method for classifying EEG signals provided in Embodiment 1 of the present invention;

[0022] Figure 2 A target pulse neural network structure diagram provided in Example 1 of the present invention;

[0023] Figure 3 A flowchart of a method for classifying EEG signals provided in Embodiment 2 of the present invention;

[0024] Figure 4 A classification accuracy graph provided in the second embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the structure of an electroencephalogram signal classification device provided in Embodiment 3 of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of the brain-computer interface device provided in Example 4 of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 creative work should fall within the scope of protection of the present invention.

[0028] 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.

[0029] Embodiment 1

[0030] Figure 1This is a flow chart of a method for classifying EEG signals provided in the first embodiment of the present invention. This embodiment can be applied to classify neural electrical signal data generated by brain activity to determine the intention of brain activity. The method can be executed by an EEG signal classification device, which can be implemented in the form of hardware and / or software, and can be configured in a brain-computer interface device. Figure 1 As shown, the method includes:

[0031] S110, acquiring neural electrical signal data generated by brain activity, and converting the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm.

[0032] The neural electrical signal data may be an electrical signal generated by the activity of neurons in the animal brain, and the neural electrical signal data generally contains information about the intention of brain activity. For example, the neural electrical signal data may be an electroencephalogram (EEG) signal, a magnetoencephalogram (MEG) signal, a local field potential (LFP) signal, etc.

[0033] The adaptive threshold detection algorithm is used to adaptively process neural electrical signal data and convert each electrical signal therein into a pulse signal; the target pulse sequence can be a pulse sequence obtained by converting the neural electrical signal data through the adaptive detection algorithm, in which the presence of a pulse is represented by 1 and the absence of a pulse is represented by 0.

[0034] Specifically, the neural electrical signal data can be collected by a collection device for collecting neural electrical signal data. For example, when the neural electrical signal data is an electroencephalogram signal, it can be collected by an electroencephalogram collection device. In the embodiment of the present invention, the collection process of neural electrical signal data is exemplified, and the collection device itself is not limited.

[0035] After the neural electrical signal data is collected, the neural electrical signal data can be converted into a target pulse sequence through an adaptive detection algorithm, that is, a pulse sequence with a pulse value of 0 or 1. This has the beneficial effect that, through an adaptive threshold detection algorithm, neural electrical signal data in different formats can be converted into a pulse sequence, thereby improving robustness.

[0036] S120, performing segmented summation processing on the target pulse sequence to obtain a target coding sequence.

[0037] It should be noted that spiking neural networks imitate the impulse conduction mechanism of biological neurons, showing excellent ability to process time series data and potential advantages in computational efficiency. Therefore, the application of spiking neural networks in real-time BCI systems has received widespread attention. However, to achieve effective SNN applications, the original neural electrical signals need to be converted into a format suitable for network processing.

[0038] Among them, the target coding sequence can be understood as a coding sequence suitable for the processing format of the pulse neural network.

[0039] Specifically, the target pulse sequence may be segmented and summed, and the target coding sequence may be generated based on the segmented summation result.

[0040] S130, inputting the target coding sequence into a target pulse neural network to obtain a target classification result output by the target pulse neural network.

[0041] The target spiking neural network may be a pre-trained spiking neural network; and the target classification result corresponds to the intention of the brain activity.

[0042] Specifically, the target coding sequence can be input into the target pulse neural network, and the target pulse neural network processes the input target coding sequence and outputs a target classification result, which can include an intent category, for example, intent category can be intent A or intent B. The intent category corresponds to the intent of the brain activity, that is, it represents the real intent of the brain activity. Furthermore, the external device can be controlled according to the real intent.

[0043] For example, in the field of medical rehabilitation, based on the above process, a robotic arm can be controlled according to the neural electrical signal data of a disabled person so that the robotic arm can complete a grasping action.

[0044] On the basis of the above technical solution, the target pulse neural network is a pulse multilayer perceptron structure, and the target pulse neural network includes an input layer, a hidden layer and an output layer;

[0045] Figure 2 This is a target pulse neural network structure diagram provided in Example 1 of the present invention. Figure 2 As shown, pulse neuron connections are connected between the output layer and the hidden layer, between the hidden layer and the output layer, and the output end of the output layer;

[0046] Wherein, the expression of the pulse neuron is:

[0047]

[0048] Among them, τ m is the membrane time constant, V restrepresents the resting potential, R m , I represent the impedance of the cell membrane and the input current, respectively. represents the differential of membrane potential with respect to time, and V represents the membrane potential.

[0049] In the embodiment of the present invention, a spiking multilayer perceptron composed of leaky integrate-and-fire (LIF) neurons is used to decode the coded sequence, and finally the category with the highest spiking rate is output as the final decoding classification result.

[0050] In the embodiment of the present invention, the neural electrical signal is converted into a pulse sequence through an adaptive threshold detection algorithm and adaptive sum coding, and sequences of different lengths are unified. The use of the target pulse neural network improves the decoding accuracy and real-time performance of the BCI system, providing users with more precise control capabilities. This method is proposed to address the deficiencies of traditional BCI systems in nonlinear signal processing and real-time decoding.

[0051] In an embodiment of the present invention, preferably, before inputting the target coding sequence into the target pulse neural network, sample neural electrical signal data can also be obtained, and the sample neural electrical signal data can be processed by an adaptive threshold detection algorithm to obtain a sample pulse sequence, and the sample pulse sequence can be processed by adaptive sum coding to obtain a sample coding sequence; the sample coding sequence is input into the pulse neural network to be trained to obtain a classification result to be used; and according to the classification result to be used and the actual classification result corresponding to the sample neural electrical signal, the network parameters of the pulse neural network to be trained are corrected to obtain the target pulse neural network.

[0052] Specifically, a large amount of sample neural electrical signal data can be collected, and the sample neural electrical signal data can correspond to different brain activities. Further, the sample neural electrical signal data is converted into a sample pulse sequence through an adaptive threshold detection algorithm, and then the sample pulse sequence is segmented and summed to obtain a sample coding sequence. Then, the processed sample coding sequence is passed as input to the pulse neural network to be trained, and the pulse neural network to be trained will process the input sample coding sequence and output the classification result to be used. The classification result to be used is compared with the actual classification result corresponding to the sample neural electrical signal, and the loss is calculated. The network parameters of the pulse neural network to be trained are corrected according to the loss to reduce future classification errors. After multiple iterations of training and parameter correction, the pulse neural network to be trained will gradually converge, and the trained network can be used as the target pulse neural network. Among them, the classification result to be used and the actual classification result both contain intent categories.

[0053] The technical solution of the embodiment of the present invention obtains the neural electrical signal data generated by brain activity, converts the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm; and performs segmented summation processing on the target pulse sequence to obtain a target coding sequence. Not only is the neural electrical signal data converted into a data format suitable for pulse neural network processing, but the amount of data is also simplified. Furthermore, the target coding sequence is input into a target pulse neural network with excellent time series data processing capabilities to obtain a target classification result output by the target pulse neural network, which solves the problems of low accuracy of the prior art, the need to process a large amount of data, high algorithm delay, and the inability to meet real-time requirements, thereby improving the accuracy and real-time performance of EEG signal classification.

[0054] Embodiment 2

[0055] Figure 3 This is a flowchart of a method for classifying EEG signals provided in the second embodiment of the present invention. This embodiment is based on the above embodiment and describes in detail the conversion and encoding process of neural electrical signal data. The specific implementation method can be found in the technical solution of this embodiment. The technical terms that are the same or corresponding to the above embodiment are not repeated here. Figure 3 As shown, the method includes:

[0056] S210, obtaining neural electrical signal data generated by brain activity, determining a sequence length corresponding to the neural electrical signal data, determining a total number of first windows based on the sequence length, a preset sliding window size, and a preset sliding step size, and dividing the neural electrical signal data into a first to-be-processed window of the total number of the first windows.

[0057] The neural electrical signal data includes the sampling time and the potential value corresponding to the sampling time, the sequence length of the neural electrical signal data can be the total number of samples, the preset sliding window size can be the size of the sliding window when the adaptive threshold detection algorithm is used, the preset sliding step size can be the step size of each sliding of the sliding window, the preset sliding window size can be represented by the number of samples, and the preset sliding step size can be represented by the number of samples. The total number of first windows refers to the total number of first windows to be processed.

[0058] Specifically, the total length L of the neural electrical signal data sequence can be determined, and the sliding window size l and the sliding step size s can be set. Then, the total number of the first window can be obtained by subtracting the window size l from the sequence length L, dividing it by the sliding step size s, and then rounding up.

[0059] S220: For a single first window to be processed, determine an adaptive threshold corresponding to the first window to be processed.

[0060] Based on the above technical solution, determining the adaptive threshold corresponding to the first window to be processed includes: determining the adaptive threshold of the first window to be processed based on the sum of the potential values ​​in the first window to be processed, the preset sliding window size and the preset gain value.

[0061] Specifically, the potential values ​​corresponding to all sampling moments in the first window to be processed can be extracted, and the absolute value sum of the potentials at all moments in the first window to be processed, that is, the sum of the potential values, can be calculated. Then, the sum of the potential values ​​is divided by the sliding window size, and then multiplied by the preset gain value to obtain the adaptive threshold in the first window to be processed.

[0062] On the basis of the above technical solution, preferably, the adaptive threshold of the first window to be processed is calculated by the following formula:

[0063]

[0064] Among them, the sequence length of the neural electrical signal data is L, the preset sliding window size is l, the preset sliding step size is s, the preset fixed gain value is g, N is the total number of first windows corresponding to the neural electrical signal data, i is the window sequence number, Wi is the identifier of the i-th first window to be processed, j is the sampling time in the i-th first window to be processed, vij is the potential value corresponding to the sampling time j in the i-th first window to be processed, ni is the absolute value sum of the potential values ​​at all sampling times in the i-th first window to be processed, and Ti is the adaptive threshold in the i-th first window to be processed.

[0065] S230, determining the pulse value corresponding to each sampling moment based on the potential value corresponding to each sampling moment in the first window to be processed and the adaptive threshold; and determining the target pulse sequence based on multiple pulse values.

[0066] Specifically, after the sliding window slides on the neural electrical signal sequence, the adaptive threshold Ti of the i-th first window to be processed is obtained, and the potential value corresponding to each sampling moment in the first window to be processed is traversed. If the potential value at time j is greater than the adaptive threshold Ti, and the potential value at time j-1 is less than or equal to the potential value at time j, and the potential value at time j is greater than the potential value at time j+1, then the pulse value corresponding to the potential value at time j is 1, otherwise the pulse value corresponding to the potential value at time j is 0. In this way, after the pulse value corresponding to each sampling moment is determined, multiple pulse values ​​form a target pulse sequence.

[0067] It is understandable that the potential values ​​of neural electrical signals at different sampling times vary greatly. The local threshold can be determined through an adaptive threshold detection algorithm, and then the potential value at the sampling time can be converted into a pulse value with less data according to the local threshold, thereby reducing the complexity of the algorithm, reducing latency, and realizing real-time control of BCI over external devices.

[0068] S240, determining a sequence length of the target pulse sequence, determining a total number of second windows based on the sequence length of the target pulse sequence and a preset coding sequence length; and dividing the target pulse sequence into second windows to be processed having the total number of the second windows.

[0069] The sequence length of the target pulse sequence may be the total number of pulse values ​​in the target pulse sequence, and the preset coding sequence length may be a pre-set length or may be represented by the number of pulse values.

[0070] Specifically, the total number of second windows may be determined by dividing the pulse sequence length L by the adaptive sum coding sequence length l.

[0071] S250. For a single second window to be processed, add the pulse values ​​in the second window to be processed to obtain a pulse sum value corresponding to the second window to be processed; sort the multiple pulse sum values ​​in chronological order to obtain the target coding sequence.

[0072] Specifically, for the second window to be processed, all pulse values ​​in the second window to be processed are added to obtain a pulse sum value. The same process is performed for each second window to be processed to obtain a pulse sum value corresponding to each second window to be processed, and the target coding sequence is obtained by sorting the multiple pulse sum values ​​in chronological order.

[0073] Based on the above technical solution, the pulse sum value is calculated by the following formula:

[0074]

[0075] Among them, the sequence length of the target pulse sequence is x, the preset coding sequence length is y, z is the total number of second windows divided according to x and y for the target pulse sequence, si represents the length of the i-th second window to be processed, j represents the sampling time in the i-th second window to be processed, uij represents the pulse value corresponding to the j-th time in the i-th second window to be processed, and ni represents the sum of pulses in the i-th window to be processed. Traverse all windows and calculate the sum of pulse values ​​in the corresponding windows, and then arrange them in chronological order to obtain an adaptive sum coding sequence.

[0076] S260, inputting the target coding sequence into a target pulse neural network to obtain a target classification result output by the target pulse neural network.

[0077] The embodiment of the present invention selects a 128-channel invasive brain-computer interface from January 26, 2022 to March 9, 2022, a total of 8 days, and a macaque neural signal dataset to verify the four-classification decoding task of the left and right hand grasping and touching paradigm, and uses the above classification learning method to verify the average accuracy. The accuracy is defined as the number of correctly identified samples divided by the total number of samples. Among them, Figure 4 This is a classification accuracy graph provided in Example 2 of the present invention.

[0078] Compared with the prior art, the beneficial effects of the present invention include at least: 1. Low computational delay: Compared with the deep neural network, the pulse neural network model of the present invention uses pulse calculation, which reduces the amount of calculation and the algorithm calculation delay; 2. Strong robustness: The adaptive threshold detection and sum coding in the present invention can unify data of different format dimensions, and the algorithm has good adaptability and strong robustness to different data. 3. Biological rationality: The algorithm network in the present invention simulates the working principle of the biological nervous system, and can more effectively process information in nonlinear, dynamic and noisy environments, making the model design and learning methods more biologically rational.

[0079] Embodiment 3

[0080] Figure 5 This is a schematic diagram of the structure of a device for classifying EEG signals provided in Embodiment 3 of the present invention. Figure 5 As shown, the device comprises:

[0081] A neural signal acquisition module 310 is used to acquire neural electrical signal data generated by brain activity and convert the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm;

[0082] A coding sequence generating module 320 is used to perform segmented summation processing on the target pulse sequence to obtain a target coding sequence;

[0083] The classification result determination module 330 is used to input the target coding sequence into the target pulse neural network to obtain the target classification result output by the target pulse neural network, wherein the target classification result corresponds to the intention of the brain activity.

[0084] The technical solution of the embodiment of the present invention obtains the neural electrical signal data generated by brain activity, converts the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm; and performs segmented summation processing on the target pulse sequence to obtain a target coding sequence. Not only is the neural electrical signal data converted into a data format suitable for pulse neural network processing, but the amount of data is also simplified. Furthermore, the target coding sequence is input into a target pulse neural network with excellent time series data processing capabilities to obtain a target classification result output by the target pulse neural network, which solves the problems of low accuracy of the prior art, the need to process a large amount of data, high algorithm delay, and the inability to meet real-time requirements, thereby improving the accuracy and real-time performance of EEG signal classification.

[0085] On the basis of the above technical solution, the neural electrical signal includes a sampling time and a potential value corresponding to the sampling time, and the coding sequence generation module 320 includes:

[0086] A first to-be-processed window division submodule, used to determine a sequence length corresponding to the neural electrical signal data, determine a total number of first windows based on the sequence length, a preset sliding window size, and a preset sliding step size, and divide the neural electrical signal data into first to-be-processed windows of the total number of the first windows;

[0087] An adaptive threshold determination submodule, used to determine, for a single first window to be processed, an adaptive threshold corresponding to the first window to be processed;

[0088] A pulse value determination submodule, used to determine the pulse value corresponding to each sampling moment based on the potential value corresponding to each sampling moment in the first to-be-processed window and the adaptive threshold;

[0089] The target pulse sequence determination submodule is used to determine the target pulse sequence based on the multiple pulse values.

[0090] On the basis of the above technical solution, the adaptive threshold determination submodule is specifically used for:

[0091] An adaptive threshold of the first window to be processed is determined based on the sum of the potential values ​​in the first window to be processed, the preset sliding window size, and a preset gain value.

[0092] On the basis of the above technical solution, the adaptive threshold of the first window to be processed is calculated by the following formula:

[0093]

[0094] Among them, the sequence length of the neural electrical signal data is L, the preset sliding window size is l, the preset sliding step size is s, the preset fixed gain value is g, N is the total number of first windows corresponding to the neural electrical signal data, i is the window sequence number, Wi is the identifier of the i-th first window to be processed, j is the sampling time in the i-th first window to be processed, vij is the potential value corresponding to the sampling time j in the i-th first window to be processed, ni is the absolute value sum of the potential values ​​at all sampling times in the i-th first window to be processed, and Ti is the adaptive threshold in the i-th first window to be processed.

[0095] Based on the above technical solution, the coding sequence generation module 320 includes:

[0096] A second window total number determination submodule, used to determine the sequence length of the target pulse sequence, and determine the second window total number based on the sequence length of the target pulse sequence and a preset coding sequence length;

[0097] A second to-be-processed window division submodule, used for dividing the target pulse sequence into second to-be-processed windows of the total number of the second windows;

[0098] a pulse sum value calculation submodule, configured to add the pulse values ​​in the second window to be processed for a single second window to be processed, to obtain the pulse sum value corresponding to the second window to be processed;

[0099] The target coding sequence determination submodule is used to sort the plurality of pulse sum values ​​in time sequence to obtain the target coding sequence.

[0100] Based on the above technical solution, the pulse sum value is calculated by the following formula:

[0101]

[0102] Among them, the sequence length of the target pulse sequence is x, the preset coding sequence length is y, z is the total number of second windows divided into the target pulse sequence according to x and y, si represents the length of the i-th second window to be processed, j represents the sampling time in the i-th second window to be processed, uij represents the pulse value corresponding to the j-th time in the i-th second window to be processed, and ni represents the total value of pulses in the i-th window to be processed.

[0103] On the basis of the above technical solution, the target pulse neural network is a pulse multilayer perceptron structure, and the target pulse neural network includes an input layer, a hidden layer and an output layer;

[0104] Wherein, pulse neuron connections are connected between the output layer and the hidden layer, between the hidden layer and the output layer, and the output end of the output layer;

[0105] Wherein, the expression of the pulse neuron is:

[0106]

[0107] Among them, τ m is the membrane time constant, V rest represents the resting potential, R m , I represent the impedance of the cell membrane and the input current, respectively. represents the differential of membrane potential with respect to time, and V represents the membrane potential.

[0108] The EEG signal classification device provided in the embodiment of the present invention can execute the EEG signal classification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0109] Embodiment 4

[0110] Figure 6 A schematic diagram of the structure of a brain-computer interface device provided for Embodiment 4 of the present invention. The brain-computer interface device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The brain-computer interface device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0111] like Figure 6 As shown, the brain-computer interface device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In RAM 13, various programs and data required for the operation of the brain-computer interface device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0112] Multiple components in the brain-computer interface device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the brain-computer interface device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0113] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the classification method of the EEG signal.

[0114] In some embodiments, the method for classifying EEG signals may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the brain-computer interface device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for classifying EEG signals described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for classifying EEG signals in any other appropriate manner (e.g., by means of firmware).

[0115] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein may be implemented on a brain-computer interface device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball), through which the user can provide input to the brain-computer interface device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0120] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0121] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0122] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for classifying electroencephalogram signals, characterized in that: include: Acquiring neural electrical signal data generated by brain activity, and converting the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm; Performing segmented summation processing on the target pulse sequence to obtain a target coding sequence; The target coding sequence is input into a target pulse neural network to obtain a target classification result output by the target pulse neural network, wherein the target classification result corresponds to the intention of the brain activity.

2. The method according to claim 1, characterized in that The neural electrical signal data includes a sampling time and a potential value corresponding to the sampling time, and the neural electrical signal data is converted into a target pulse sequence by an adaptive threshold detection algorithm, including: Determine a sequence length corresponding to the neural electrical signal data, determine a total number of first windows based on the sequence length, a preset sliding window size, and a preset sliding step size, and divide the neural electrical signal data into first windows to be processed of the total number of the first windows; For a single first window to be processed, determining an adaptive threshold corresponding to the first window to be processed; Determine the pulse value corresponding to each sampling moment based on the potential value corresponding to each sampling moment in the first to-be-processed window and the adaptive threshold; The target pulse sequence is determined based on a plurality of the pulse values.

3. The method according to claim 2, characterized in that The determining the adaptive threshold corresponding to the first window to be processed includes: An adaptive threshold of the first window to be processed is determined based on the sum of the potential values ​​in the first window to be processed, the preset sliding window size, and a preset gain value.

4. The method according to claim 3, characterized in that: The adaptive threshold of the first window to be processed is calculated by the following formula: Among them, the sequence length of the neural electrical signal data is L, the preset sliding window size is l, the preset sliding step size is s, the preset fixed gain value is g, N is the total number of first windows corresponding to the neural electrical signal data, i is the window sequence number, Wi is the identifier of the i-th first window to be processed, j is the sampling time in the i-th first window to be processed, vij is the potential value corresponding to the sampling time j in the i-th first window to be processed, ni is the absolute value sum of the potential values ​​at all sampling times in the i-th first window to be processed, and Ti is the adaptive threshold in the i-th first window to be processed.

5. The method according to claim 1, characterized in that The step of performing segmented summation processing on the target pulse sequence to obtain a target coding sequence includes: Determining a sequence length of the target pulse sequence, and determining the total number of second windows based on the sequence length of the target pulse sequence and a preset coding sequence length; dividing the target pulse sequence into second to-be-processed windows of the total number of the second windows; For a single second window to be processed, adding the pulse values ​​in the second window to be processed to obtain a pulse sum value corresponding to the second window to be processed; The plurality of pulse sum values ​​are sorted in time order to obtain the target coding sequence.

6. The method according to claim 5, characterized in that The pulse sum value is calculated by the following formula: Among them, the sequence length of the target pulse sequence is x, the preset coding sequence length is y, z is the total number of second windows divided into the target pulse sequence according to x and y, si represents the length of the i-th second window to be processed, j represents the sampling time in the i-th second window to be processed, uij represents the pulse value corresponding to the j-th time in the i-th second window to be processed, and ni represents the total value of pulses in the i-th window to be processed.

7. The method according to claim 1, characterized in that The target pulse neural network is a pulse multilayer perceptron structure, and the target pulse neural network includes an input layer, a hidden layer and an output layer; Wherein, pulse neuron connections are connected between the output layer and the hidden layer, between the hidden layer and the output layer, and the output end of the output layer; Wherein, the expression of the pulse neuron is: Among them, τ m is the membrane time constant, V rest represents the resting potential, R m , I represent the impedance of the cell membrane and the input current, respectively. represents the differential of membrane potential with respect to time, and V represents the membrane potential.

8. A device for classifying electroencephalogram signals, characterized in that: include: A neural signal acquisition module, used to acquire neural electrical signal data generated by brain activity, and convert the neural electrical signal data into a target pulse sequence through an adaptive threshold detection algorithm; A coding sequence generating module, used for performing segmented summation processing on the target pulse sequence to obtain a target coding sequence; A classification result determination module is used to input the target coding sequence into a target pulse neural network to obtain a target classification result output by the target pulse neural network, wherein the target classification result corresponds to the intention of the brain activity.

9. A brain-computer interface device, characterized in that: The brain-computer interface device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the brain-computer interface decoding method described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the brain-computer interface decoding method according to any one of claims 1 to 7 when executed.