CN116942180A - Multi-feature weighted fusion electroencephalogram classification method and device - Google Patents

Multi-feature weighted fusion electroencephalogram classification method and device Download PDF

Info

Publication number
CN116942180A
CN116942180A CN202310929261.0A CN202310929261A CN116942180A CN 116942180 A CN116942180 A CN 116942180A CN 202310929261 A CN202310929261 A CN 202310929261A CN 116942180 A CN116942180 A CN 116942180A
Authority
CN
China
Prior art keywords
electroencephalogram
data
frequency band
sample
classification model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310929261.0A
Other languages
Chinese (zh)
Inventor
朱世强
崔正哲
谢安桓
宋伟
郑涛
傅向向
万小姣
李鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202310929261.0A priority Critical patent/CN116942180A/en
Publication of CN116942180A publication Critical patent/CN116942180A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • A61B5/374Detecting the frequency distribution of signals, e.g. detecting delta, theta, alpha, beta or gamma waves
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/725Details of waveform analysis using specific filters therefor, e.g. Kalman or adaptive filters
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/10Pre-processing; Data cleansing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • General Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Biomedical Technology (AREA)
  • Pathology (AREA)
  • Psychiatry (AREA)
  • Medical Informatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physiology (AREA)
  • Signal Processing (AREA)
  • Mathematical Physics (AREA)
  • Psychology (AREA)
  • Fuzzy Systems (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The specification discloses a multi-feature weighted fusion electroencephalogram classification method and device, wherein an electroencephalogram sample can be obtained through collected electroencephalogram data, the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery state, alpha, beta and gamma frequency bands of the electroencephalogram sample are extracted to obtain electroencephalogram data of the electroencephalogram sample, the electroencephalogram features of the frequency bands are weighted and fused according to weights corresponding to the frequency bands respectively to obtain fused electroencephalogram features, and then the fused electroencephalogram features are input into a preset classification model, the difference between a classification result output by the classification model and the actual classification of the electroencephalogram sample is minimized to serve as an optimization target, the classification model is trained, and the electroencephalogram data of a user collected in real time is classified through the trained classification model, so that the accuracy of electroencephalogram data classification is improved.

Description

Multi-feature weighted fusion electroencephalogram classification method and device
Technical Field
The specification relates to the technical field of brain electrolysis, in particular to an electroencephalogram classification method and device based on multi-feature weighted fusion.
Background
Currently, the brain-computer interface can be applied to various service scenes, and the acquired brain-computer data needs to be classified in the brain-computer interface so as to support the subsequent function performed through the brain-computer data. For example, in the field of rehabilitation therapy, brain-computer interface (Brain Computer Interface, BCI) rehabilitation systems based on Motor Imagery (MI) have been widely studied and used. For those suffering from neuronal communication disorders (e.g., stroke, spinal cord injury, etc.), the motor control signals cannot be effectively transmitted to the motor area. However, the MI-based BCI rehabilitation system can provide an external exercise information output channel for patients, and its application in rehabilitation is of great importance for such patients.
In the prior art, the acquired electroencephalogram data can be classified, but the classifying effect is not necessarily accurate, so that how to improve the accuracy of classifying the electroencephalogram data is a problem to be solved urgently.
Disclosure of Invention
The specification provides an electroencephalogram classification method and device with multi-feature weighted fusion, which are used for partially solving the problems existing in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides an electroencephalogram classification method with multi-feature weighted fusion, which comprises the following steps:
acquiring acquired electroencephalogram data, wherein the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state;
preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples;
performing wavelet packet decomposition on each electroencephalogram sample to extract electroencephalogram data of each frequency band in the electroencephalogram sample, and performing weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights respectively corresponding to the frequency bands to obtain fused electroencephalogram characteristics, wherein each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band;
inputting the fused electroencephalogram characteristics into a preset classification model, taking the difference between the classification result output by the minimized classification model and the actual category of the electroencephalogram sample as an optimization target, and training the classification model so as to classify the electroencephalogram data of the user acquired in real time through the trained classification model.
Optionally, preprocessing the electroencephalogram data specifically includes:
filtering the electroencephalogram data through a Notch filter to obtain filtered electroencephalogram data;
dividing the filtered electroencephalogram data into electroencephalogram samples corresponding to each type.
Optionally, preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples, which specifically include:
dividing the electroencephalogram data into a plurality of data segments;
for each data segment, if it is determined that continuous data continuously larger than a preset value or continuously smaller than the preset value exists in the data segment, determining the data length of the continuous data;
determining whether to delete the data segment in the electroencephalogram sample according to the data length;
and regarding each remaining data segment, taking the data segment as an electroencephalogram sample under the corresponding category of the data segment.
Optionally, determining whether to delete the data segment in the electroencephalogram sample according to the data length specifically includes:
determining a longest length of the data lengths of the continuous data in the data segment;
and deleting the data segment in the electroencephalogram sample if the ratio between the longest length and the data length of the data segment is not smaller than a preset threshold value.
Optionally, according to the weights corresponding to the frequency bands, weighting and fusing the electroencephalogram characteristics of the electroencephalogram data of the frequency bands to obtain fused electroencephalogram characteristics, which specifically comprises:
determining the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample;
and weighting and fusing the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample according to the weight corresponding to each frequency band respectively to obtain the fused electroencephalogram characteristics.
Optionally, the method further comprises:
acquiring brain electricity data of a user acquired in real time, and performing Notch filtering on the brain electricity data of the user to obtain filtered brain electricity data;
dividing the filtered electroencephalogram data into a plurality of data segments in a sliding window mode;
carrying out wavelet packet decomposition on each data segment to obtain electroencephalogram data of each frequency band in the data segment, and carrying out weighted fusion on average energy values of the electroencephalogram data of each frequency band in the data segment according to weights respectively corresponding to the frequency bands to obtain fused features corresponding to the data segment;
and inputting the fused features corresponding to the data segments into a trained classification model to obtain a classification result.
Optionally, the classification model is a linear discriminant model LDA.
The specification provides an electroencephalogram classification device with multi-feature weighted fusion, which comprises:
the acquisition module is used for acquiring acquired electroencephalogram data, wherein the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state;
the preprocessing module is used for preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples;
the fusion module is used for carrying out wavelet packet decomposition on each electroencephalogram sample so as to extract and obtain electroencephalogram data of each frequency band in the electroencephalogram sample, and carrying out weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights respectively corresponding to the frequency bands to obtain fused electroencephalogram characteristics, wherein each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band;
the training module is used for inputting the fused electroencephalogram characteristics into a preset classification model, taking the difference between the classification result output by the minimized classification model and the actual category of the electroencephalogram sample as an optimization target, and training the classification model so as to classify the electroencephalogram data of the user acquired in real time through the trained classification model.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the above multi-feature weighted fusion electroencephalogram classification method.
The specification provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the multi-feature weighted fusion electroencephalogram classification method.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
according to the multi-feature weighted fusion electroencephalogram classification method, acquired electroencephalogram data can be obtained, the electroencephalogram data comprise data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state, then the electroencephalogram data are preprocessed to obtain a plurality of electroencephalogram samples, wavelet packet decomposition is carried out on each electroencephalogram sample to extract electroencephalogram data of each frequency band in the electroencephalogram sample, weighted fusion is carried out on electroencephalogram features of the electroencephalogram data of each frequency band according to weights corresponding to each frequency band to obtain fused electroencephalogram features, each frequency band is alpha, beta and gamma frequency bands, further, the fused electroencephalogram features are input into a preset classification model, differences between classification results output by the classification model and actual classification of the electroencephalogram samples are used as optimization targets, and the classification model is trained to classify the electroencephalogram data of a user acquired in real time through the trained classification model.
From the above, it can be seen that before classifying the electroencephalogram data, the method can extract electroencephalogram data of three frequency bands of alpha, beta and gamma, respectively calculate corresponding energy values, and perform weighted fusion according to weights respectively corresponding to the three frequency bands, thereby constructing fused electroencephalogram features based on the electroencephalogram data obtained by weighted fusion of features of different frequency bands, and classifying the electroencephalogram data according to the fused electroencephalogram features. According to the method, the characteristics of the electroencephalogram data are extracted by considering the importance of different frequency bands, so that the accuracy of electroencephalogram data classification is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. In the drawings:
fig. 1 is a schematic flow chart of a multi-feature weighted fusion electroencephalogram classification method provided in the present specification;
FIG. 2 is a schematic diagram of a paradigm for collecting brain electrical data for a subject provided herein;
FIG. 3 is a flow chart of classifying electroencephalogram data in real time by using a classification model provided in the present specification;
fig. 4 is a schematic diagram of an electroencephalogram classification device with multi-feature weighted fusion provided in the present specification;
fig. 5 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of an electroencephalogram classification method with multi-feature weighted fusion provided in the present specification, which specifically includes the following steps:
s100: acquiring acquired electroencephalogram data, wherein the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state.
In practical applications, the brain-computer interface system needs to classify the electroencephalogram data, so that subsequent operations are performed according to the obtained classification. For example, in the field of rehabilitation therapy, rehabilitation devices may perform corresponding actions through a brain-computer interface system according to classification results of brain-electrical data of a patient.
Based on the above, the server may acquire the acquired electroencephalogram data, where the electroencephalogram data may include data when the subject is in a resting state and data when the subject is in a preset motor imagery MI state.
It should be noted that, the obtained electroencephalogram data is used to construct a training sample for performing model training subsequently, so that the collected electroencephalogram data may be collected by a plurality of testees in a large amount, and the manner of collecting the electroencephalogram data is not limited here.
An example of acquiring electroencephalogram data is given below, and for a subject, acquisition of electroencephalogram data may be performed in accordance with a normal form, as shown in fig. 2.
Fig. 2 is a schematic diagram of a paradigm of acquiring brain electrical data for a subject provided in the present specification.
In fig. 2, a paradigm of collecting electroencephalogram data of a subject is that electroencephalogram data of the subject in a resting state and electroencephalogram data of the subject in a preset motor imagery (for example, the subject makes a left hand fist or a right hand fist) are collected regularly, and in fig. 2, the paradigm is that: the electroencephalogram data X acquired after the MI experimental paradigm comprises data obtained by M three (experiments), each three comprises 1 motor imagery task of 2-3s (a testee carries out corresponding MI (motor imagery) tasks according to random left and right hand fist prompts) and 1 rest task of 2-3s (the testee is in a relaxed state).
It should be noted that, when acquiring brain electrical data, the subject may wear an brain electrical acquisition cap conforming to the 10-20 system, and the brain electrical acquisition cap should at least contain electrodes of two channels of C3/C4, and the sampling frequency may be Fs.
S102: preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples.
Then, preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples, and specifically, filtering the electroencephalogram data through a Notch filter to obtain filtered electroencephalogram data; and dividing the filtered electroencephalogram data into electroencephalogram samples corresponding to each type.
The purpose of the Notch filter on the electroencephalogram data is to remove power frequency interference, such as environmental noise, on the electroencephalogram data.
The filtered electroencephalogram data may then be separated into various corresponding electroencephalogram samples, with which of the electroencephalogram samples exist being determined by a paradigm specified when the electroencephalogram data is initially acquired to the subject. The categories mentioned herein are not limited, and for example, the electroencephalogram samples of each category may include: the brain electrical sample of the resting type and the brain electrical sample of the motor imagery type can be obtained by imagining a tested person according to a specified motor imagery and collecting brain electrical data of the tested person.
It should be noted that, for a subject, when acquiring the electroencephalogram data of the subject, a section of electroencephalogram data corresponding to multiple categories may be continuously acquired, so that a section of electroencephalogram data may be divided into data sections, each data section corresponds to one category, and thus, one data section may be used as one electroencephalogram sample under the corresponding category.
For each data segment, artifact identification may be performed for each data segment to determine whether the data segment should be deleted.
Specifically, the electroencephalogram data (filtered electroencephalogram data) may be divided into a plurality of data segments, for each data segment, if it is determined that continuous data continuously greater than a preset value or continuously less than the preset value exists in the data segment, the data length of the continuous data may be determined, then, whether to delete the data segment in the electroencephalogram sample may be determined according to the data length of the continuous data, and finally, for each remaining data segment, the data segment may be used as an electroencephalogram sample under the category corresponding to the data segment.
Wherein, the preset value may refer to 0. When there is data continuously smaller than 0 in the data segment, the part of data continuously smaller than 0 may be regarded as one continuous data, and when there is data continuously larger than 0 in the data segment, the part of data continuously larger than 0 may be regarded as one continuous data.
Further, if the continuous data appearing in the data segment is long, it indicates that the data segment may be artifact data, and the data segment may be deleted. Specifically, the longest length of the data length of each continuous data in the data segment may be determined, and if the ratio between the longest length and the data length of the data segment is not less than a preset threshold, the data segment in the electroencephalogram sample may be deleted.
For example, for data segment X i The data segment X can be determined separately i The number Len of data points with the number greater than 0 or less than 0 continuously appears in the brain electrical data of the C3 channel and the C4 channel i Taking Len i Maximum value max (Len i ) And calculates max (Len i ) The ratio to Win, denoted as ratW C3 And ratW C4 The method comprises the steps of carrying out a first treatment on the surface of the If rate W C3 And ratW C4 If one of the data segments is greater than or equal to 0.65 (the preset threshold value is set), the data segment can be considered as interference data, and the data segment is deleted.
S104: and carrying out wavelet packet decomposition on each electroencephalogram sample aiming at each electroencephalogram sample to extract and obtain electroencephalogram data of each frequency band in the electroencephalogram sample, and carrying out weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights respectively corresponding to the frequency bands to obtain fused electroencephalogram characteristics, wherein each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band.
S106: inputting the fused electroencephalogram characteristics into a preset classification model, taking the difference between the classification result output by the minimized classification model and the actual category of the electroencephalogram sample as an optimization target, and training the classification model so as to classify the electroencephalogram data of the user acquired in real time through the trained classification model.
After obtaining a plurality of electroencephalogram samples, carrying out wavelet packet decomposition on each electroencephalogram sample to extract electroencephalogram data of each frequency band in the electroencephalogram samples, and carrying out weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights corresponding to each frequency band to obtain fused electroencephalogram characteristics, wherein each frequency band is alpha, beta and gamma frequency bands. For a frequency band, the electroencephalogram characteristics of the electroencephalogram data of the frequency band are obtained through the electroencephalogram data of the frequency band.
The method comprises the steps of determining average energy values of the electroencephalogram data of each frequency band in the electroencephalogram sample, and carrying out weighted fusion on the average energy values of the electroencephalogram data of each frequency band in the electroencephalogram sample according to weights corresponding to the frequency bands to obtain the fused electroencephalogram characteristics.
That is, for an electroencephalogram sample, the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample can be calculated first, and then the calculated average energy values are weighted and fused according to the weight corresponding to each frequency band, which can be calculated specifically by the following formula:
wherein, in the above formula (1)For the calculated average energy value of the ith brain electricity sample alpha frequency band,for the calculated average energy value in the beta frequency band of the ith brain electrical sample, +.>And calculating the average energy value of the ith brain electricity sample in the gamma frequency band.
Wherein, the liquid crystal display device comprises a liquid crystal display device,for the calculated ith corresponding fused brain electrical characteristics, W a Weight corresponding to alpha frequency band, W b For the weight corresponding to the beta frequency band, W g The weight corresponding to the gamma frequency band.
It should be noted that, the above frequency bands are respectively alpha, beta and gamma frequency bands, and the weight summation corresponding to each frequency band is 1. And since motor imagery is a process involving motor perception, cognition, attention and learning, motor perception is the dominant part, and cognition, attention and learning is less. And wherein the change in alpha band energy is believed to be related to the activity of the sensory-motor region being tested, the change in beta band energy is believed to be related to the cognitive and attention activity being tested, and the change in gamma band energy is believed to be related to the cognitive and learning activity being tested.
Therefore, the weight set for the alpha band may be maximum and the alpha band may be smaller for beta than gamma band. The weight relationship between specific frequency bands can be W a >W b >W g The weights may be manually set to values that satisfy the condition.
Wherein W is a Weight corresponding to alpha frequency band, W b For the weight corresponding to the beta frequency band, W g The weight corresponding to the gamma frequency band.
In order to represent EDR and EDS phenomena in brain electrical data of a tested person, one training sample can contain brain electrical data of C3 and C4 channels, and the brain electrical data corresponding to the C3 and C4 channels respectively can be calculatedAnd corresponding the data segments of the two channels +.>Combining, the combined characteristics are->The characteristics of the brain electricity after fusion of one brain electricity sample are +.>
After the fused electroencephalogram features corresponding to each electroencephalogram sample are obtained, the fused electroencephalogram features can be input into a preset classification model, and the classification model is trained by taking the difference between the classification result output by the minimized classification model and the actual class of the electroencephalogram sample as an optimization target, wherein the classification model can be a linear discrimination model (Linear Discriminant Model, LDA).
After the classification model is trained, the brain electrical data of the user acquired in real time can be classified through the trained classification model. The obtained classification result can express the intention of the user to a certain extent, and the classification result can be used for executing the service associated with the electroencephalogram data.
For example, if the classification model classifies the electroencephalogram data of the user into two types, namely, the resting type electroencephalogram data and the motor imagery type electroencephalogram data, then in the rehabilitation system, real-time electroencephalogram data of the user can be acquired, and a classification result of the electroencephalogram data of the user can be obtained through the classification model.
The above is mainly described in terms of the model training process, and the following description is made in terms of the model application, as shown in fig. 3.
Fig. 3 is a schematic flow chart of classifying electroencephalogram data in real time by using a classification model provided in the present specification, which specifically includes the following steps:
s300: acquiring the brain electricity data of a user acquired in real time, and performing Notch filtering on the brain electricity data of the user to obtain filtered brain electricity data.
S302: dividing the filtered electroencephalogram data into a plurality of data segments according to a sliding window mode.
S304: and carrying out wavelet packet decomposition on each data segment to obtain the electroencephalogram data of each frequency band in the data segment, and carrying out weighted fusion on the average energy value of the electroencephalogram data of each frequency band in the data segment according to the weights respectively corresponding to the frequency bands to obtain the fused characteristics corresponding to the data segment.
S306: and inputting the fused features corresponding to each data segment into a trained classification model to obtain a classification result.
When actually classifying the electroencephalogram data of the user, firstly acquiring the electroencephalogram data of the user acquired in real time, then, carrying out Notch filtering on the electroencephalogram data of the user to obtain filtered electroencephalogram data, and dividing the filtered data into a plurality of data segments in a sliding window mode.
The sliding window mode mentioned herein may refer to that when dividing the completely acquired electroencephalogram data into data segments, the data segments are divided by moving a certain step, for example, the data segments of the first segment are 0-1 ms, the data segments of the second segment may be 0.5-1.5 ms (the step is 0.5 ms), and so on.
Specifically, electroencephalogram data can be acquired according to the sampling rate Fs, and Notch filtering is performed on the real-time electroencephalogram data of the C3 and C4 channels. And selecting a time window with the length of Win and the moving Step length of Step, and dividing the data segments. It should be noted that, this manner of dividing the data segment by the sliding window may also be applied to dividing the data segment of the electroencephalogram sample in the model training phase.
And then, carrying out wavelet packet decomposition on each data segment to obtain the electroencephalogram data of each frequency band in the data segment, and carrying out weighted fusion on the average energy value of the electroencephalogram data of each frequency band in the data segment according to the weight respectively corresponding to each frequency band to obtain the fused characteristic corresponding to the data segment.
Finally, the fused features corresponding to the data segments can be input into the trained classification model to obtain a classification result.
That is, the feature extraction process of the electroencephalogram data of the user acquired in real time is consistent with the feature extraction process of the model training stage, and the feature extraction process is obtained by weighting and fusing the average energy values of the frequency bands through weights respectively corresponding to the frequency bands, and specifically, the feature calculation of the electroencephalogram data of the user acquired in real time can be performed through a formula (1) and a formula (2) and a formula (3).
The above-mentioned fused features corresponding to each data segment are input into the trained classification model, and each data segment may correspond to a classification result, that is, when the electroencephalogram classification is performed through the classification model in real time, the process is a continuous process, and tasks related to the electroencephalogram may be performed through the obtained classification result, such as tasks corresponding to the above-mentioned rehabilitation system.
For convenience of description, the execution body for executing the method will be described as a server, and the execution body may be a desktop computer, a server, a large-sized service platform, or the like, which is not limited herein.
As can be seen from the above, before classifying the electroencephalogram data, the method can perform filtering processing and artifact processing on the electroencephalogram data, divide the electroencephalogram data into a plurality of data segments, extract electroencephalogram data of alpha, beta and gamma frequency bands, respectively calculate corresponding energy values, and perform weighted fusion according to weights respectively corresponding to the three frequency bands, thereby constructing fused electroencephalogram features based on the electroencephalogram data obtained by weighted fusion of features of different frequency bands, and classifying the electroencephalogram data through the fused electroencephalogram features. According to the method, the characteristics of the electroencephalogram data are extracted by considering the importance of different frequency bands, so that the accuracy of electroencephalogram data classification is improved.
The above method for classifying the electroencephalogram by multi-feature weighted fusion provided for one or more embodiments of the present disclosure further provides an electroencephalogram classification device by multi-feature weighted fusion based on the same thought, as shown in fig. 4.
Fig. 4 is a schematic diagram of an electroencephalogram classification device with multi-feature weighted fusion provided in the present specification, including:
the acquisition module 401 is configured to acquire acquired electroencephalogram data, where the electroencephalogram data includes data when a subject is in a resting state and data when the subject is in a preset motor imagery MI state;
a preprocessing module 402, configured to preprocess the electroencephalogram data to obtain a plurality of electroencephalogram samples;
the fusion module 403 is configured to perform wavelet packet decomposition on each electroencephalogram sample to extract electroencephalogram data of each frequency band in the electroencephalogram sample, and perform weighted fusion on electroencephalogram features of the electroencephalogram data of each frequency band according to weights corresponding to the frequency bands to obtain fused electroencephalogram features, where each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band;
the training module 404 is configured to input the fused electroencephalogram feature into a preset classification model, and train the classification model with a difference between a classification result output by the classification model and an actual class of the electroencephalogram sample minimized as an optimization target, so as to classify the electroencephalogram data of the user acquired in real time through the trained classification model.
Optionally, the preprocessing module 402 is specifically configured to perform filtering processing on the electroencephalogram data through a Notch filter to obtain filtered electroencephalogram data; dividing the filtered electroencephalogram data into electroencephalogram samples corresponding to each type.
Optionally, the preprocessing module 402 is further configured to divide the electroencephalogram data into a plurality of data segments; for each data segment, if it is determined that continuous data continuously larger than a preset value or continuously smaller than the preset value exists in the data segment, determining the data length of the continuous data; determining whether to delete the data segment according to the data length; and regarding each remaining data segment, taking the data segment as an electroencephalogram sample under the corresponding category of the data segment.
Optionally, the fusing module 403 is specifically configured to determine a longest length of the data lengths of the continuous data in the data segment; and deleting the data segment in the electroencephalogram sample if the ratio between the longest length and the data length of the data segment is not smaller than a preset threshold value.
Optionally, the fusion module 403 is specifically configured to determine an average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample; and weighting and fusing the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample according to the weight corresponding to each frequency band respectively to obtain the fused electroencephalogram characteristics.
Optionally, the apparatus further comprises:
the classification module 405 is specifically configured to obtain electroencephalogram data of a user acquired in real time, and perform Notch filtering on the electroencephalogram data of the user to obtain filtered electroencephalogram data; dividing the filtered electroencephalogram data into a plurality of data segments; carrying out wavelet packet decomposition on each data segment to obtain electroencephalogram data of each frequency band in the data segment, and carrying out weighted fusion on average energy values of the electroencephalogram data of each frequency band in the data segment according to weights respectively corresponding to the frequency bands to obtain fused features corresponding to the data segment; and inputting the fused features corresponding to the data segments into the trained classification model to obtain a classification result.
Optionally, the classification model is a linear discriminant model LDA.
The present specification also provides a computer readable storage medium storing a computer program operable to perform the above multi-feature weighted fusion electroencephalogram classification method.
The present specification also provides a schematic structural diagram of the electronic device shown in fig. 5. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, as illustrated in fig. 5, although other hardware required by other services may be included. The processor reads the corresponding computer program from the nonvolatile memory to the memory and then runs the computer program to realize the multi-feature weighted fusion electroencephalogram classification method.
Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present description is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present description.

Claims (10)

1. The electroencephalogram classification method based on multi-feature weighted fusion is characterized by comprising the following steps of:
acquiring acquired electroencephalogram data, wherein the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state;
preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples;
performing wavelet packet decomposition on each electroencephalogram sample to extract electroencephalogram data of each frequency band in the electroencephalogram sample, and performing weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights respectively corresponding to the frequency bands to obtain fused electroencephalogram characteristics, wherein each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band;
inputting the fused electroencephalogram characteristics into a preset classification model, taking the difference between the classification result output by the minimized classification model and the actual category of the electroencephalogram sample as an optimization target, and training the classification model so as to classify the electroencephalogram data of the user acquired in real time through the trained classification model.
2. The method according to claim 1, wherein preprocessing the electroencephalogram data specifically comprises:
filtering the electroencephalogram data through a Notch filter to obtain filtered electroencephalogram data;
dividing the filtered electroencephalogram data into electroencephalogram samples corresponding to each type.
3. The method according to claim 1 or 2, wherein preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples specifically comprises:
dividing the electroencephalogram data into a plurality of data segments;
for each data segment, if it is determined that continuous data continuously larger than a preset value or continuously smaller than the preset value exists in the data segment, determining the data length of the continuous data;
determining whether to delete the data segment according to the data length;
and regarding each remaining data segment, taking the data segment as an electroencephalogram sample under the corresponding category of the data segment.
4. The method according to claim 3, wherein determining whether to delete the data segment in the electroencephalogram sample based on the data length comprises:
determining a longest length of the data lengths of the continuous data in the data segment;
and deleting the data segment in the electroencephalogram sample if the ratio between the longest length and the data length of the data segment is not smaller than a preset threshold value.
5. The method of claim 1, wherein weighting and fusing the electroencephalogram features of the electroencephalogram data of each frequency band according to the weights respectively corresponding to each frequency band to obtain fused electroencephalogram features, specifically comprising:
determining the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample;
and weighting and fusing the average energy value of the electroencephalogram data of each frequency band in the electroencephalogram sample according to the weight corresponding to each frequency band respectively to obtain the fused electroencephalogram characteristics.
6. The method of claim 1, wherein the method further comprises:
acquiring brain electricity data of a user acquired in real time, and performing Notch filtering on the brain electricity data of the user to obtain filtered brain electricity data;
dividing the filtered electroencephalogram data into a plurality of data segments in a sliding window mode;
carrying out wavelet packet decomposition on each data segment to obtain electroencephalogram data of each frequency band in the data segment, and carrying out weighted fusion on average energy values of the electroencephalogram data of each frequency band in the data segment according to weights respectively corresponding to the frequency bands to obtain fused features corresponding to the data segment;
and inputting the fused features corresponding to the data segments into the trained classification model to obtain a classification result.
7. The method according to claims 1-6, wherein the classification model is a linear discriminant model LDA.
8. An electroencephalogram classification device with multi-feature weighted fusion is characterized by comprising:
the acquisition module is used for acquiring acquired electroencephalogram data, wherein the electroencephalogram data comprises data when a tested person is in a resting state and data when the tested person is in a preset motor imagery MI state;
the preprocessing module is used for preprocessing the electroencephalogram data to obtain a plurality of electroencephalogram samples;
the fusion module is used for carrying out wavelet packet decomposition on each electroencephalogram sample so as to extract and obtain electroencephalogram data of each frequency band in the electroencephalogram sample, and carrying out weighted fusion on the electroencephalogram characteristics of the electroencephalogram data of each frequency band according to weights respectively corresponding to the frequency bands to obtain fused electroencephalogram characteristics, wherein each frequency band is an alpha frequency band, a beta frequency band and a gamma frequency band;
the training module is used for inputting the fused electroencephalogram characteristics into a preset classification model so as to minimize the difference between the classification result output by the classification model and the actual category of the electroencephalogram sample, training the classification model as an optimization target and classifying the electroencephalogram data of the user acquired in real time through the trained classification model.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-7 when executing the program.
CN202310929261.0A 2023-07-26 2023-07-26 Multi-feature weighted fusion electroencephalogram classification method and device Pending CN116942180A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310929261.0A CN116942180A (en) 2023-07-26 2023-07-26 Multi-feature weighted fusion electroencephalogram classification method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310929261.0A CN116942180A (en) 2023-07-26 2023-07-26 Multi-feature weighted fusion electroencephalogram classification method and device

Publications (1)

Publication Number Publication Date
CN116942180A true CN116942180A (en) 2023-10-27

Family

ID=88447261

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310929261.0A Pending CN116942180A (en) 2023-07-26 2023-07-26 Multi-feature weighted fusion electroencephalogram classification method and device

Country Status (1)

Country Link
CN (1) CN116942180A (en)

Similar Documents

Publication Publication Date Title
CN106108894A (en) A kind of emotion electroencephalogramrecognition recognition method improving Emotion identification model time robustness
CN110555468A (en) Electroencephalogram signal identification method and system combining recursion graph and CNN
Ibrahim et al. A statistical framework for EEG channel selection and seizure prediction on mobile
Acharjee et al. Activity recognition system using inbuilt sensors of smart mobile phone and minimizing feature vectors
CN109658400A (en) A kind of methods of marking and system based on head CT images
Alotaiby et al. Seizure detection with common spatial pattern and support vector machines
CN111671420A (en) Method for extracting features from resting electroencephalogram data and terminal equipment
CN116153522B (en) Model training method and device based on cortical-muscle-cortical network diagram
CN116343314A (en) Expression recognition method and device, storage medium and electronic equipment
CN116942180A (en) Multi-feature weighted fusion electroencephalogram classification method and device
CN114496299B (en) Epidemic prevention information processing method based on deep learning and epidemic prevention service system
CN115721323A (en) Brain-computer interface signal identification method and system and electronic equipment
CN116258679A (en) Information recommendation method and device, storage medium and electronic equipment
CN116595456B (en) Data screening and model training method and device based on brain-computer interface
CN117077013B (en) Sleep spindle wave detection method, electronic equipment and medium
CN111291645A (en) Identity recognition method and device
CN112883855A (en) Electroencephalogram signal emotion recognition based on CNN + data enhancement algorithm Borderline-SMOTE
CN116152246B (en) Image recognition method, device, equipment and storage medium
CN116661609B (en) Cognitive rehabilitation training method and device, storage medium and electronic equipment
Muñoz et al. Automatic detection of epileptic waves in electroencephalograms using bag of visual words and machine learning
Tiwari et al. Comparative Analysis of Semantic Segmentation by Using Deep Learning Models on Retinal Vessel
Yang et al. Decoding of visual-related information from the human eeg using an end-to-end deep learning approach
CN117918801A (en) Method and device for identifying sign signals, storage medium and electronic equipment
Kim et al. An enhanced classification scheme with AdaBoost concept in BCI
Vélez et al. Algorithm for Detection of Raising Eyebrows and Jaw Clenching Artifacts in EEG Signals Using Neurosky Mindwave Headset

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination