CN117520925B - Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals - Google Patents

Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals Download PDF

Info

Publication number
CN117520925B
CN117520925B CN202410001239.4A CN202410001239A CN117520925B CN 117520925 B CN117520925 B CN 117520925B CN 202410001239 A CN202410001239 A CN 202410001239A CN 117520925 B CN117520925 B CN 117520925B
Authority
CN
China
Prior art keywords
electroencephalogram
frequency
signal
user
electroencephalogram signal
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.)
Active
Application number
CN202410001239.4A
Other languages
Chinese (zh)
Other versions
CN117520925A (en
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.)
Xiaozhou Technology Co ltd
Original Assignee
Xiaozhou Technology Co ltd
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 Xiaozhou Technology Co ltd filed Critical Xiaozhou Technology Co ltd
Priority to CN202410001239.4A priority Critical patent/CN117520925B/en
Publication of CN117520925A publication Critical patent/CN117520925A/en
Application granted granted Critical
Publication of CN117520925B publication Critical patent/CN117520925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/14Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
    • G06F17/148Wavelet transforms
    • 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/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • G06F3/015Input arrangements based on nervous system activity detection, e.g. brain waves [EEG] detection, electromyograms [EMG] detection, electrodermal response detection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Neurosurgery (AREA)
  • Human Computer Interaction (AREA)
  • Dermatology (AREA)
  • Biomedical Technology (AREA)
  • Neurology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The application is applicable to the technical field of artificial intelligence, and provides a personalized man-machine interaction method, device, equipment and medium based on brain electrical signals, wherein the method comprises the following steps: pre-acquiring a sample data set containing a first user electroencephalogram signal; preprocessing a sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix; collecting a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal; and weighting the second user electroencephalogram signal characteristics of the same type according to the weight matching coefficient corresponding to the first electroencephalogram signal characteristics, and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram signal characteristics.

Description

Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a personalized man-machine interaction method, device, equipment and medium based on brain electrical signals.
Background
With the development of technology, brain-computer interface technology has been widely used in various fields. Judging the intention of the user based on the brain-computer signal is one of important research directions of the brain-computer interface. At present, a common model is mostly adopted in the technology for judging the intention of the user based on the electroencephalogram signals, a general feature extraction and classification device is established according to large sample data, and a unified strategy is adopted for judging all users. However, it has been found that there are significant individual differences in the activation patterns of different brain regions due to differences in age, sex, physical condition, etc. of the users. The public model method cannot be optimized for individual differences, so that accuracy of judging intention of a specific user is low. Aiming at the problems, a judging method capable of analyzing the electroencephalogram signals in a personalized way is designed to improve the accuracy of judging the intention of a specific user, and the judging method becomes one of the key points and the difficulties of the current research.
Disclosure of Invention
The embodiment of the application provides a personalized man-machine interaction method, device, equipment and medium based on brain electrical signals, which can solve the problem that the accuracy of judging the intention of a specific user is not high because the activation modes of different brain areas have obvious individual differences due to the differences of the ages, sexes, physical conditions and the like of the users, and the public model method cannot be optimized aiming at the individual differences.
In a first aspect, an embodiment of the present application provides a personalized man-machine interaction method based on an electroencephalogram signal, including:
a sample data set containing first user electroencephalogram signals is collected in advance, wherein the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics;
preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix;
collecting a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal;
and weighting the second user electroencephalogram characteristics of the same type according to the weight matching coefficient corresponding to the first electroencephalogram characteristics, and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics.
In a second aspect, an embodiment of the present application provides a personalized human-computer interaction device based on an electroencephalogram signal, including:
The system comprises a pre-acquisition module, a pre-acquisition module and a storage module, wherein the pre-acquisition module is used for pre-acquiring a sample data set containing first user electroencephalogram signals, the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics;
the preprocessing module is used for preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix;
the real-time acquisition module is used for acquiring a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal;
and the classification module is used for weighting the second user electroencephalogram characteristics of the same type according to the weight matching coefficient corresponding to the first electroencephalogram characteristics and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics.
In a third aspect, an embodiment of the present invention further provides a terminal device, where the terminal device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for implementing connection communication between the processor and the memory, where the computer program, when executed by the processor, implements the steps of any of the personalized human-computer interaction methods based on electroencephalogram signals provided in the specification of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a storage medium, for storing a computer readable storage, where the storage medium stores one or more programs, where the one or more programs are executable by one or more processors to implement the steps of any of the personalized human-computer interaction methods based on electroencephalogram signals provided in the specification of the present invention.
Compared with the prior art, the embodiment of the application has the beneficial effects that: a plurality of first electroencephalogram signal features corresponding to each first user electroencephalogram signal are collected in advance, and a weight matching coefficient corresponding to each first electroencephalogram signal feature is determined; when a plurality of second user electroencephalogram characteristics corresponding to the second user electroencephalogram signals are obtained, the second user electroencephalogram characteristics of the same type can be weighted according to the weight matching coefficient corresponding to the first electroencephalogram characteristics, and then an electroencephalogram intention classification result is obtained according to the weighted second user electroencephalogram characteristics. Before the electroencephalogram intention classification result corresponding to the electroencephalogram signal of the second user is obtained, the personalized feature weight of the user can be obtained, so that the recognition and weighting of the attention features of the user are realized, the contribution of the key features to the classification result is improved, and the support is provided for the follow-up improvement of the accuracy of the intention classification result. The method solves the problem that the accuracy of judging the intention of a specific user is not high because the common model method cannot optimize the individual differences due to the differences of the users in age, sex, physical condition and the like in the related technology and the obvious individual differences exist in the activation modes of different brain areas, and improves the accuracy of judging the intention of the user.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a personalized man-machine interaction method based on an electroencephalogram signal according to an embodiment of the present application;
fig. 2 is a flow chart of substep S103 of the personalized human-computer interaction method based on electroencephalogram signals in fig. 1;
fig. 3 is a schematic block diagram of a personalized man-machine interaction device based on an electroencephalogram signal according to an embodiment of the present invention;
Fig. 4 is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used merely to distinguish between descriptions and are not to be construed as indicating or implying relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Referring to fig. 1, fig. 1 is a flow chart of a personalized man-machine interaction method based on an electroencephalogram signal according to an embodiment of the present invention.
As shown in fig. 1, the personalized man-machine interaction method based on the electroencephalogram signal comprises steps S101 to S104.
Step S101, a sample data set containing first user brain electrical signals is collected in advance, the sample data set contains the first user brain electrical signals, and each first user brain electrical signal corresponds to a plurality of first brain electrical signal characteristics.
The first electroencephalogram signals comprise electroencephalogram signals corresponding to various user intention types, and the acquired first electroencephalogram signals are subjected to information extraction to obtain a plurality of first electroencephalogram signal characteristics corresponding to each first user electroencephalogram signal.
For example, a first user brain electrical signal is acquired using a brain electrical head loop device. The electroencephalogram head rings are positioned at corresponding reference points of the scalp of a user according to an international 10-20 system standard, 32 leads are arranged in total, and electroencephalogram activities in the range of 0.5-100Hz of each direction of the scalp can be comprehensively acquired. The reference electrode is arranged at the symmetrical point of the two ears so as to reduce common mode interference. In addition, the user is required to maintain mental focus while collecting the sample data set, and to perform intelligent device control related mental activities.
Optionally, the electroencephalogram signal acquisition mode is not particularly limited, and a user can select the electroencephalogram signal acquisition mode according to actual requirements.
For example, when a user uses an intelligent home, and a first electroencephalogram signal corresponding to the user is acquired, the user firstly performs voice control on the intelligent home, and when a control voice command is sent out, beta waves (14-30 Hz) appear, so that the user is highly concentrated in spirit; in the voice recognition process, delta wave (0.5-4 Hz) appears to represent voice information matching judgment; when judging the execution effect of the voice command, low-amplitude gamma waves (30-60 Hz) appear, representing advanced cognitive judgment. So that the corresponding first electroencephalogram signals of the user in different scenes when the intelligent home is used are obtained.
Or when a user controls the unmanned aerial vehicle, and the first electroencephalogram signal corresponding to the user is collected, the user controls the unmanned aerial vehicle through gestures, theta waves (4-7 Hz) can appear before gesture control is prepared, and the preparation of attention is represented; when a gesture is sent out, controlling the unmanned plane to take off, and generating alpha waves (8-13 Hz) which represent basic brain electrical rhythms; when the execution effect of the unmanned aerial vehicle is confirmed after operation, delta waves (0.5-4 Hz) occur, representing a confirmation judging process; when controlling the steering or height adjustment of the drone, high amplitude beta waves (14-30 Hz) are detected, indicating a high concentration.
Or when the user performs automatic driving of the intelligent vehicle, collecting a first electroencephalogram signal corresponding to the user, enabling the user to perform automatic driving simulation of the intelligent vehicle, enabling a theta wave preparation state to appear before starting, enabling driving to appear an alpha wave basic electroencephalogram rhythm, and enabling delta waves (0.5-4 Hz) to appear when monitoring the running state of the vehicle, so as to represent an information comprehensive judging process; beta waves and low-amplitude gamma waves can appear when the steering or obstacle avoidance is encountered. Finally, the alpha wave is collected when the eyes are closed and still sitting.
For example, the first electroencephalogram signals corresponding to the user in different control states under different scenes are obtained, and the corresponding electroencephalogram signals in each state can be collected for 5 minutes to obtain the corresponding first electroencephalogram signals, so that a sample data set is obtained.
Optionally, the user electroencephalogram signal acquisition scene can be a scene that a user uses an intelligent home, a user controls an unmanned aerial vehicle, and the user performs automatic driving of an intelligent vehicle, and the like, and the user can select according to actual demands without specific limitation. In addition, the electroencephalogram signal acquisition time length of each state of the user in each scene is not particularly limited, and the user can select according to actual requirements.
Step S102, preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix.
The method comprises the steps of carrying out normalization processing on each first user electroencephalogram signal in a sample data set to obtain a normalization result corresponding to the first user electroencephalogram signal, inputting the normalization result into a vector characterization model, further obtaining a vector expression result corresponding to each first user electroencephalogram signal in the normalization result, and further determining a sample data set matrix according to the vector expression result.
The method comprises the steps of carrying out vector expression on first electroencephalogram characteristics to obtain characteristic vectors corresponding to each first electroencephalogram characteristic, and carrying out vector weighting on all the characteristic vectors to obtain a predicted sample data set matrix; when the predicted sample data set matrix approaches the real sample data set matrix, corresponding weighting coefficients are determined as the weight matching coefficients corresponding to each first electroencephalogram signal feature.
In some embodiments, preprocessing the sample dataset to obtain a sample dataset matrix, including: filtering the first user electroencephalogram signal in the sample data set; performing time window segmentation on the filtered first user electroencephalogram signal by utilizing a wavelet transformation algorithm to obtain a plurality of electroencephalogram signal sample fragments; and carrying out feature detection and feature labeling on each electroencephalogram signal sample fragment to obtain a sample data set matrix.
Illustratively, after the sample data set is obtained, filtering the first user electroencephalogram signal in the sample data set to remove noise in the first user electroencephalogram signal, so that the signal quality of the first user electroencephalogram signal is improved to provide support for subsequently obtaining a high-quality sample data set matrix.
For example, the first user electroencephalogram signal is subjected to filtering processing, a finite impulse response filter is adopted, the design of the filter follows a least square method, and coefficients of each order of the filter are determined through an optimization algorithm, so that the mean square error of the filtered signal is minimized. The transfer function of the filter is in the form of an FIR system, and the length of the coefficient sequence is set to 256, namely a 256-order FIR filter is adopted. The filter frequency response is designed to be of band-stop characteristic, the passband is set to be 0.5-40Hz, various slow fluctuation artifacts lower than 0.5Hz and noise interference higher than 40Hz can be effectively restrained through adjusting coefficient combination, and effective delta, theta, alpha, beta, gamma and other characteristic brain waves are reserved. Meanwhile, a trap is superimposed for 50Hz power frequency noise to inhibit.
Specifically, after the first user electroencephalogram signal is processed by the filter, the quality of the acquired first user electroencephalogram signal can be effectively improved, and clear and available electroencephalogram data samples are provided for subsequent feature extraction and modeling.
The time window segmentation is performed on the filtered first user electroencephalogram signal by using a wavelet transformation algorithm to extract classification features, so as to obtain a plurality of electroencephalogram signal sample fragments.
For example, wavelet transforms employ Daubechies4 wavelets for 4-layer continuous wavelet transforms, each layer of transform using low-pass filtering and high-pass filtering for subband decomposition. After the layer 4 transformation, an approximate component of the brain wave signal is precipitated from the low frequency part, which mainly reflects the effective brain wave of 0-60 Hz. Then, the approximation component is divided at intervals of 2 seconds, and an electroencephalogram signal segment 1 second long is divided each time. The whole electroencephalogram signal is sequentially segmented in time sequence, and a large number of electroencephalogram sample fragments with the length of 1 second are finally obtained. The segments retain the effective components and the time sequence information in the first user electroencephalogram signal subjected to filtering processing and can be used for extracting classification features. A plurality of electroencephalogram signal sample fragments are obtained through wavelet transformation and timing segmentation, and can represent electroencephalogram characteristic samples with different intentions and states.
The first user electroencephalogram signal is subjected to filtering and wavelet transformation to obtain a plurality of electroencephalogram signal sample fragments, and feature detection and labeling are adopted on the plurality of electroencephalogram signal sample fragments, so that a sample data set matrix is obtained.
For example, the time position of the peak value in each 1 second electroencephalogram signal sample segment and the corresponding amplitude value are detected, and the number, distribution and range of the peak value in each electroencephalogram signal sample segment are analyzed. Then, the total energy, i.e. the sum of squares, of each electroencephalogram signal sample segment is calculated. And judging the type of the brain wave mainly contained in the sample based on the peak distribution range in the sample, wherein the alpha wave crest value range is generally 50-100 mu V. Meanwhile, the main frequency band composition of the sample is judged according to the energy, for example, the energy of the alpha wave sample is generally 10-30 mu V2. And finally, determining specific brain wave categories contained in the brain wave sample fragments according to the peak range judgment and the energy judgment, and labeling each brain wave sample fragment to finish sample labeling according to the characteristic types. The marked user intention information reflected by each electroencephalogram signal sample fragment can be clarified.
The first user electroencephalogram signal is preprocessed through three steps of filtering, noise reduction, time window segmentation and feature labeling, and a sample data set corresponding to the electroencephalogram features which can be used for personalized modeling is obtained.
Illustratively, the preprocessed sample dataset is sorted according to its feature type, and a sample dataset matrix can be constructed.
For example, the rows of the sample dataset matrix represent each electroencephalogram signal sample segment and the columns represent delta, theta, alpha, beta, gamma, etc. features. Assuming a total of 100 electroencephalogram signal sample fragments, 5 feature types, a sample dataset matrix of 100 rows by 5 columns is constructed.
In some embodiments, determining a weight matching coefficient corresponding to each first electroencephalogram signal feature according to the sample dataset matrix includes: analyzing the preprocessed sample data set matrix, and determining the feature coordinate position of each extracted first electroencephalogram signal feature in the data set matrix; according to the characteristic coordinate information, defining an initial calculation range of each first electroencephalogram signal characteristic in a sample data set matrix; reading time sequence data corresponding to each first electroencephalogram signal feature from a sample data set matrix according to the initial calculation range of each first electroencephalogram signal feature to form an initial calculation matrix containing complete feature information; and adopting a preset coefficient matching algorithm, taking the characteristic initial calculation matrix as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix, and obtaining the weight matching coefficient corresponding to each first electroencephalogram signal characteristic.
Illustratively, the preprocessed sample dataset is sorted according to its feature type, and a sample dataset matrix can be constructed. It is desirable to define the meaning of the features represented by each column of the sample dataset matrix, e.g., column 1 represents the delta wave, column 2 represents the theta wave, etc. This information can be obtained from a prior step or can be determined by analyzing the value distribution range of the statistical matrix array data. Then, a row index, e.g., 1-100, is generated from the number of rows of the sample dataset matrix, representing the sequence number information for each row of samples. This index can be matched to each line of samples for locating the number of lines in which the signature signal is located.
Further, the first user electroencephalogram signals corresponding to each row and each column of the sample data set matrix are traversed and read. Detecting the value range of each data point, and judging the type of the brain electrical characteristic corresponding to each data point in the sample data set matrix according to the threshold value. And repeatedly detecting all data points in the sample data set matrix to obtain the corresponding brain electrical characteristic type. For example, 50 to 100. Mu.V is determined as an alpha wave, 8 to 13Hz is determined as a beta wave, etc.
Through the detection, the line number of each electroencephalogram characteristic signal can be counted, namely the sample index of the characteristic appears. The coordinate area of the feature signal in the matrix can be determined from the range of the line numbers. For example, the alpha wave occurs at line numbers 1-60, then its coordinate range is 1:60. Similarly, the above operation is repeated, the data of all rows and columns in the detection matrix are traversed, the feature types contained in the data are judged, and the line number range of each feature is counted, so that the feature coordinate range corresponding to the feature category like the result that the alpha wave is 1:60 and the beta wave is 61:90 is obtained in the matrix. Finally, according to the coordinate ranges of all the features, a data set matrix structure diagram can be drawn, and feature coordinate positions of each feature category are marked in the diagram. Thus, the coordinate determination of each classified electroencephalogram characteristic signal contained in the sample matrix is completed.
Illustratively, the coordinate range of the alpha wave feature is taken out, for example, in 1-60 rows. On the blank matrix diagram, a red rectangular area is formed by drawing a rectangular frame with red lines starting from the upper left corner coordinates (1, 1) and ending at the lower right corner coordinates (60, 4). The coordinate range of the alpha wave feature is outlined with a red frame. The coordinate range of the beta wave feature is then taken out, for example, lines 61-90. Likewise, a rectangular frame is drawn with blue lines from the upper left corner (61,1) to the lower right corner (90,4), and a spatial region of the β -wave characteristic is marked. And sequentially taking out the coordinate range of other features such as theta waves, and drawing a rectangular frame by using lines with corresponding colors. Finally, a color rectangular box representing each feature region is outlined on the blank matrix diagram. These rectangular boxes are generated strictly according to the coordinate range of the feature line number, and accurately contain all sample data points under the feature. An initial calculation range of each characteristic signal is formed. In the small range, algorithm analysis such as feature extraction, feature selection and the like can be performed, and the operation efficiency is improved.
Illustratively, according to the initial calculation range of each first electroencephalogram signal feature, time series data corresponding to the first electroencephalogram signal feature is read from the sample data set matrix to form an initial calculation matrix containing complete feature information.
For example, first, according to the coordinate range of the alpha wave feature, the rows and columns in the range are positioned in the sample dataset matrix, for example, 1-60 rows, and the data of all columns in the 60 rows are read, so that 60 alpha wave samples are extracted in total, and each sample may be time series data consisting of a plurality of data points. The alpha wave samples are then combined to form a feature matrix A1, where each column represents a point in time and each row represents an alpha wave sample. Similarly, the initial calculation range of the beta wave is found, such as 61-90 rows, the corresponding row data is extracted from the sample dataset matrix, and the beta wave characteristic matrix A2 is generated by combining. The line data in its initial range is read from the sample dataset matrix as well for other features θ, δ, etc., forming feature matrices A3, A4, etc. Finally, all the feature matrixes A1, A2 and A3 are spliced in the horizontal direction according to the feature sequence to form a large matrix containing all the feature sample data, and the construction of the initial calculation matrix A is completed. The matrix A contains complete information of all first user electroencephalogram signals, each column represents an acquisition time point, and each row represents a sample under one characteristic.
The method includes the steps of taking initial calculation matrixes as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix by adopting a coefficient matching algorithm, and obtaining weight matching coefficients corresponding to the characteristics of the first electroencephalogram signals.
For example, an initial weight vector w0= [ W01, W02, ]. W0n ] is defined, where n is the number of features and W0i is initialized to 1, indicating that the current weights of the features are equal. In the initial calculation matrix a, a column vector representing the i-th feature Fi is taken, for example, the first column representing the α -wave is taken. Then sequentially taking out each row of vectors sj of the initial calculation matrix A, namely sequentially taking out each piece of electroencephalogram sample data of the user, for example, the first row s1 represents an electroencephalogram signal of a first acquisition time period. The sample s1 and the column vector F1 of the current characteristic α wave are subjected to inner product calculation to obtain a reaction value v11=f1·s1. Next, taking the second row vector s2, the inner product is calculated similarly to F1, and the reaction value v12=f1·s2 is obtained. And by analogy, all sample vectors are taken out, and an inner product reaction value v1j is calculated with the current feature F1. Finally, a set of response values of the feature F1 to all samples [ v11, v12,..v1j ] is obtained. The average value μ1 represents the average intensity of the user's reaction to the feature F1. The calculation formula is μ1= (v11+v12+) + v1j)/m, where m is the number of samples.
Similarly, the second column F2 in the initial calculation matrix a is taken out, representing the β -wave characteristics. Each row of sample vectors sj (j=1, 2,..m) is taken in the same order. And calculating an inner product of F2 and each sample vector sj one by one to obtain a reaction value v2j (j=1, 2,..m) of the sample to the beta wave characteristic. The average value mu 2 of all v2j is obtained, and the overall reaction intensity of the user brain electrical signal to the beta wave characteristic F2 is represented. Repeating the above steps, sequentially taking out other eigenvectors Fi (i=3, 4,..n), and calculating an inner product reaction value vij with the sample vector sj. The mean values of the responses μi (i=1, 2,..n) corresponding to all features were determined. The average set of response intensities for the user to each electroencephalogram feature matrix is finally obtained [ μ1, μ2, ]. All μi are averaged to give μ_avg. Comparing each μi to μ_avg, if μi > μ_avg, indicating that the user is highly sensitive to the feature, wi=w0i (μi/μ_avg); if μi < μ_avg, wi=w0i (μ_avg/μi). And finally obtaining a final weight vector W= [ W1, W2, ] showing the sensitivity degree of the user to each feature matrix. And obtaining a weight matching coefficient W= [ W1, W2, ] corresponding to each first electroencephalogram signal characteristic.
Step S103, collecting a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal.
The method comprises the steps of collecting a second user electroencephalogram corresponding to a user to be subjected to intent analysis, extracting low-frequency signals and high-frequency signals from the second user electroencephalogram to obtain the low-frequency electroencephalogram and the high-frequency electroencephalogram corresponding to the second user electroencephalogram, carrying out weighted summation on the low-frequency electroencephalogram and the high-frequency electroencephalogram to obtain a third user electroencephalogram, and further obtaining a plurality of characteristics of the second user electroencephalogram from the third user electroencephalogram by utilizing a characteristic extraction model.
Optionally, the feature extraction model may be a neural network model, and the specific network result is not specifically limited and the user may set the feature extraction model according to the actual requirement.
In the method, when a plurality of second user electroencephalogram characteristics in the third user electroencephalogram are extracted, characteristics such as a peak range, energy magnitude, main power spectrum and the like of the electroencephalogram are analyzed for each time window of the third user electroencephalogram. Detecting the main peak range and energy of delta wave, judging the matching degree of speech, and judging the attention preparation of theta wave peak position and variance. The alpha wave energy and the spectrum flatness represent basic brain electrical rhythms, and the beta wave energy and the root mean square calculate mental concentration. Low gamma wave variance evaluates low-level cognitive decisions, gaobo entropy magnitude determines high-level cognitive activities. Repeating the steps to finally form a multidimensional time domain and frequency domain feature matrix aiming at the third user electroencephalogram signal, wherein the vector Fi comprises n features, and a plurality of second user electroencephalogram signal features in the third user electroencephalogram signal are obtained.
For example, a filtering method may be used for a method of separating the low frequency brain electrical signal and the high frequency brain electrical signal. First a digital filter needs to be designed. Here, an FIR filter may be selected, which has a linear phase characteristic, to ensure that the filtered signal waveform is not distorted. A low-pass FIR filter is designed, length is taken 81, and a hamming window is selected to optimize the frequency response by means of a window design method. The passband cut-off frequency is set to be 4Hz, the stopband cut-off frequency is set to be 8Hz, the passband ripple is set to be 0.01dB, and the stopband attenuation is set to be 60dB. The MATLAB design function fir1 can yield the coefficients of the filter. In the same way, a high-pass FIR filter is designed, the length is 121, and a window method adopts a black man window. The passband cut-off frequency is 30Hz, the stopband cut-off frequency is 25Hz, and other parameters are consistent with the low pass filter. Resulting in high pass filter coefficients. And then the preprocessed second electroencephalogram signal sample is read into MATLAB at a certain sampling rate, for example, 200Hz. And then, inputting a difference equation corresponding to the low-pass filter for filtering, and retaining low-frequency components such as delta, theta and the like which are lower than 4 Hz. The filtered data is the low-frequency electroencephalogram signal, and a plurality of samples are aggregated to form low-frequency data. And inputting the sample into a high-pass filter equation for high-pass filtering, retaining alpha, beta and gamma high-frequency components higher than 30Hz, and collecting to obtain high-frequency electroencephalogram signals.
In some embodiments, a third user electroencephalogram signal is obtained according to the low-frequency electroencephalogram signal and the high-frequency electroencephalogram signal, referring to fig. 2, step S103 includes: substep S1031 to substep S1032.
And step S1031, calculating a gain coefficient of the high-frequency brain electrical signal based on the signal characteristics of the low-frequency brain electrical signal.
For example, a second user electroencephalogram signal corresponding to a user to be subjected to intent analysis separates out electroencephalograms signals in two frequency bands, namely a low frequency band and a high frequency band according to frequency. And calculating a gain coefficient corresponding to the high-frequency electroencephalogram signal based on the time domain characteristics of the low-frequency electroencephalogram signal.
In some embodiments, calculating a gain coefficient of the high frequency brain electrical signal based on the signal characteristics of the low frequency brain electrical signal includes: analyzing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals; comparing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient; and constructing the gain coefficient of the high-frequency electroencephalogram signal according to the global gain coefficient and the local gain coefficient.
The method comprises the steps of capturing two parts of the low-frequency electroencephalogram signals, determining the two parts as two sections of the low-frequency electroencephalogram signals, analyzing time domain features and frequency domain features of the two sections of the low-frequency electroencephalogram signals, and comparing the time domain features and the frequency domain features of the two sections of the low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient.
For example, the second user electroencephalogram signal x (N) contains N sampling points, divides x (N) into two segments of signals, x1 (N) and x2 (N), each containing N/2 points. For x1 (n), a digital filter is used to separate the low frequency component x1_low (n) and the high frequency component x1_high (n). For x2 (n), the low frequency component x2_low (n) and the high frequency component x2_high (n) are separated similarly. The time domain statistical characteristics, such as mean value, variance, extremum and the like, of the two sections of low-frequency signals x1_low (n) and x2_low (n) are analyzed, frequency domain characteristics are calculated, namely, a power spectrum is obtained through fast Fourier transformation, energy distribution of different brain wave frequency bands is calculated through integration, the time domain statistical characteristics and the frequency domain statistical characteristics of the two sections of low-frequency signals are compared in detail, and if the two sections of low-frequency signals have obvious differences, the corresponding brain states are changed.
For example, when the time domain and frequency domain statistics of two segments of low frequency signals are similar: and calculating total energy of the two sections of high-frequency electroencephalogram signals, and designing a unified global gain coefficient u. U is respectively applied to two sections of high-frequency brain electrical signals to obtain enhanced high-frequency signals x1_high '(n) and x2_high' (n). The first full-band signal x1 '(n) is obtained by adding x1_high' (n) and x1_low (n), and the second full-band signal x2 '(n) is obtained by adding x2_high' (n) and x2_low (n). Finally, connecting x1 '(n) and x2' (n), outputting a signal y (n) to obtain a third electroencephalogram signal.
For example, if the theta wave energy of the first segment of the low frequency signal is relatively small, the theta wave energy of the second segment is increased by 30%, which indicates that fluctuations in brain function activity may occur. In this case, two high frequency signals may be compared, and the energy magnitudes of specific frequency bands such as α, β waves. If the high frequency energy of the first segment is relatively small and the high frequency energy of the second segment is large, it is indicated that global boosting of the high frequency component of the first segment is required, i.e. a low global gain factor u1 is set. For the second segment, a higher local gain coefficient u2 may be set, only for certain specific bands. Finally, a gain function is constructed from the global gain u1 and the local gain u 2.
In some embodiments, the gain factor u (n) is expressed as:
u(n) = {u1(n), 1<= n<= N/2
u2(n), N/2<n<= N };
where u1 (N) represents a global gain coefficient, u2 (N) represents a local gain coefficient, N represents a sampling point index on the time axis, n=1, 2,..n.
Illustratively, the global gain factor is to uniformly boost the energy level of all high frequency components in a certain segment of the signal. When the high-frequency electroencephalogram signal is weak as a whole, a lower global gain is required to be applied for mild enhancement so as to improve the integral characteristics of the signal. And the local gain coefficients are to selectively amplify only a specific frequency band. When the high frequency components are mainly distributed in some narrow ranges, only these bands can be enhanced with higher local gain. This can avoid unnecessary boosting to bring about characteristic distortion. Compared with single gain, the segmentation applies the strategy of global gain and local gain respectively, so that high-frequency components with different time periods can be processed more flexibly and effectively. The method can enhance the overall characteristics and avoid the problems caused by excessive amplification.
For example, assume that a segment of the preprocessed second electroencephalogram signal x (n) containing 1000 sampling points is taken out. It is first divided equally into two segments x1 (n) and x2 (n), each containing 500 points. The low-pass and high-pass filtering is performed on x1 (n) to extract a low-frequency signal x1_low (n) and a high-frequency signal x1_high (n), respectively. The energy of the beta band (13-30 Hz) was observed to be 4 μV 2 by performing a fast Fourier transform on x1_high (n). The low-pass and high-pass filtering is also performed on x2 (n), resulting in x2_low (n) and x2_high (n). By performing a Fourier transform on x2_high (n), it is observed that the energy of the beta band is greatly increased to 10 μV 2, by 150%. In x1_low (n), a steady rise in mean value from 2.2 μV to 3.0 μV and an increase in standard deviation from 1.1 μV to 1.8 μV is observed. After Fourier transformation, the energy of the theta wave band is gradually increased from 7 mu V2 to 15 mu V2. This indicates that the anterior segment brain state produces progressively more activity. Correspondingly, the mean value of x1_high (n) steadily increased from 1.8 μV to 2.3 μV, and the standard deviation increased from 0.9 μV to 1.5 μV, with a slight increase. When x2_low (n) is entered, the mean value drops rapidly to 2.5 μV, the standard deviation drops back to 1.3 μV, the θ wave energy decays to 9 μV 2, reflecting the activity degradation. At this point x2_high (n) was significantly enhanced, the mean increased to 3.5 μV and the standard deviation increased to 2.3 μV. The first segment x1_high (n) is observed to grow less than the second segment x2_high (n). This means that the overall energy of x1_high (n) needs to be lifted. The global gain factor u1=1.3 may be set. Whereas the beta wave in x2_high (n) increases maximally up to 150%, the burst feature can be enhanced by enhancing the beta wave. The x 2-high (n) is subjected to band-pass filtering to extract a beta wave component x 2-beta (n), and a local gain coefficient u2=2.2 can be set for enhancement. The following gain coefficients were constructed:
u(n)={1.3,n=1,2,...,500;2.2,n=501,...,1000}
If the characteristics of the two sections of low-frequency brain signals are similar, the corresponding brain state is not obviously changed in the two sections of time. A unified global gain coefficient u is directly set for the two sections of high-frequency components x1_high (n) and x2_high (n), and the whole and same-amplitude amplification is carried out on all frequency bands. The global gain factor u may be designed by selecting a suitable value according to the total energy of the two high frequency signals after preprocessing, for example, u=2 if the energy is weak and u=1.5 if the energy is general. In this way, basic equalization promotion can be provided for the two sections of high-frequency components, so that the characteristics of the second electroencephalogram signal can be optimized in a targeted manner.
When the time domain and frequency domain statistical characteristics of certain two sections of signals in the low-frequency electroencephalogram signals are obviously different, the method comprises the following steps: it can be applied to the amplification of the high frequency signal according to a gain function u (n) = {1.3, n=1, 2,..500; 2.2, n=501,..1000 }, multiplying u (n) by x1_high (n) to obtain an enhanced first-stage high frequency signal x1_high' (n) =u (n) ·x1_high (n), n=1, 2,..500. Similarly, u (n) is multiplied by the extracted beta wave signal x2_beta (n) to obtain an enhanced second-segment high-frequency signal x2_high ' (n) =u (n) ·x2_beta (n), n=501, 1000, the enhanced high-frequency electroencephalogram signal is recombined with the corresponding low-frequency electroencephalogram signal to construct a full-band enhanced signal x1' (n) =x1_low (n) +x1_high ' (n), n=1, 2, 500 x2' (n) =x2_low (n) +x2_high ' (n), n=501, 1000; and connecting x1 '(n) with x2' (n) to obtain the final enhanced third user brain electrical signal, and keeping the integrity of full-band signal information.
Specifically, a hyperbolic tangent nonlinear function tanh (), a first full-band signal x1 '(N) and a second full-band signal x2' (N) are selected as inputs, and a final output signal y (N): y (N) =a×tanh (b×1 '(N))+c×tanh (d×2' (N)), where n=1, 2. The hyperbolic tangent function may introduce a certain nonlinear mapping relationship. a. b, c and d are adjustable parameters and control the nonlinearity degree of the signals of the first section and the second section. Through parameter adjustment, an ideal nonlinear transformation effect can be obtained, and smooth connection of two sections of signals is realized.
And S1032, selectively amplifying the high-frequency electroencephalogram signal by utilizing a gain coefficient obtained by the high-frequency electroencephalogram signal to obtain an enhanced high-frequency electroencephalogram signal, and recombining the enhanced high-frequency electroencephalogram signal with the low-frequency electroencephalogram signal to obtain a third full-band enhanced electroencephalogram signal.
The high frequency electroencephalogram signal is selectively amplified by the gain coefficient after the gain coefficient is obtained by the high frequency electroencephalogram signal, the enhanced high frequency electroencephalogram signal is obtained, and the enhanced high frequency electroencephalogram signal and the low frequency electroencephalogram signal are recombined to obtain the third user electroencephalogram signal.
And step S104, weighting the same type of the second user electroencephalogram characteristics according to the weight matching coefficient corresponding to the first electroencephalogram characteristics, and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics.
Illustratively, a weight matching coefficient corresponding to a first electroencephalogram feature of the same type as the second user electroencephalogram is obtained from the sample dataset, and the first electroencephalogram feature is weighted by the weight matching coefficient. Weight matching coefficient w= [ W1, W2,..wn ]. Each element wi in W represents a matching coefficient of the electroencephalogram signal characteristic of the second user corresponding to the user. Wi-weighting the electroencephalogram signal characteristics Fi of each second user, wherein Fi_new=Fi. Weighting highlights the sensitivity of the user to the specific features and obtaining the personalized feature matrix.
The electroencephalogram intention classification is performed on the personalized feature matrix by using an intention classification model, so that an electroencephalogram intention classification result corresponding to the electroencephalogram signal of the second user is obtained.
In some embodiments, obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram signal features includes: and inputting the weighted second user electroencephalogram signal characteristics into a preset classifier to obtain an electroencephalogram intention classification result.
The weighted personalized feature matrix is input into a preset classifier to obtain an electroencephalogram intention classification result.
Optionally, the preset classifier may select algorithm models such as nearest neighbor method, support vector machine, random forest, etc. And selecting proper model parameters, such as a kernel function, a regularization coefficient and the like in the SVM, and performing model optimization. The application is not particularly limited, and the user can set the device according to actual requirements.
In addition, the preset classifier needs to be trained and constructed based on the user-personalized training set. And then inputting the weighted feature matrix of the test set sample into a classification model, and judging the final class output by calculating the similarity distance or inner product of the sample feature and the training sample set. Repeatedly classifying and judging each test sample to obtain a series of brain electricity intention recognition results, wherein the results can be various voice-related intentions, such as mental concentration states when voice instructions are sent out, matching judgment states when voice recognition is carried out, advanced cognition states when voice execution effects are judged and the like; the method can be used for controlling various limb movements, such as a concentration state before preparation control, a basic brain electrical rhythm state when an actual control instruction is sent, a highly concentrated control state of spirit and the like; the intention related to the performance of the effect evaluation, such as the brain electrical state when the voice or limb control effect is confirmed and judged; it may be an intention related to the control operation of the system, such as an electroencephalogram mode when automatic driving is started, a mode when the state of the system is monitored in the process, and the like. By judging which type of intention the test sample belongs to, an electroencephalogram signal recognition result sequence containing different intentions of voice, limb control, effect evaluation, system operation and the like can be obtained.
The following technical effects can be achieved in the embodiment of the application:
1. feature coordinates are extracted in stages, a high-dimensional acquisition signal matrix is simplified into a feature submatrix, a calculation range is determined in a targeted mode, interference of an irrelevant area is reduced, subsequent calculation amount is reduced, and calculation efficiency is improved.
2. And calculating the personalized feature weight of the user, realizing the identification and weighting of the user attention features, and improving the contribution of the key features to the classification result.
3. And designing a frequency band gain coefficient, selectively amplifying the frequency band of interest, improving the resolvable property of key features in the enhancement signal, and realizing the self-adaptive enhancement of high-frequency details.
4. The technical route of the dual-band joint analysis is adopted to separate and combine the electroencephalogram signals of the low frequency band and the high frequency band, so that global information is provided, rich classification characteristics are reserved, and the accuracy and the completeness of judgment are considered.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Corresponding to the personalized man-machine interaction method based on the electroencephalogram signal described in the above embodiments, fig. 3 shows a block diagram of the personalized man-machine interaction device 200 based on the electroencephalogram signal provided in the embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
Referring to fig. 3, the apparatus 200 includes: the device comprises a pre-acquisition module 201, a preprocessing module 202, a real-time acquisition module 203 and a classification module 204, wherein the pre-acquisition module 201 is used for pre-acquiring a sample data set containing first user electroencephalogram signals, the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics; the preprocessing module 202 is configured to preprocess the sample dataset to obtain a sample dataset matrix, and determine a weight matching coefficient corresponding to each first electroencephalogram signal feature according to the sample dataset matrix; the real-time acquisition module 203 is configured to acquire a second user electroencephalogram in real time, separate a low-frequency electroencephalogram and a high-frequency electroencephalogram from the second user electroencephalogram, obtain a third user electroencephalogram according to the low-frequency electroencephalogram and the high-frequency electroencephalogram, and extract a plurality of second user electroencephalogram features in the third user electroencephalogram; the classification module 204 is configured to weight the second electroencephalogram signal features of the same type according to the weight matching coefficient corresponding to the first electroencephalogram signal feature, and obtain an electroencephalogram intention classification result according to the weighted second electroencephalogram signal features.
In some embodiments, the preprocessing module 202 performs, in preprocessing the sample dataset to obtain a sample dataset matrix:
filtering the first user electroencephalogram signal in the sample data set;
performing time window segmentation on the filtered first user electroencephalogram signal by utilizing a wavelet transformation algorithm to obtain a plurality of electroencephalogram signal sample fragments;
and carrying out feature detection and feature labeling on each electroencephalogram signal sample fragment to obtain a sample data set matrix.
In some embodiments, the preprocessing module 202 performs, in determining the weight matching coefficient corresponding to each first electroencephalogram signal feature according to the sample dataset matrix:
analyzing the preprocessed sample data set matrix, and determining the feature coordinate position of each extracted first electroencephalogram signal feature in the data set matrix;
according to the characteristic coordinate information, defining an initial calculation range of each first electroencephalogram signal characteristic in a sample data set matrix;
reading time sequence data corresponding to each first electroencephalogram signal feature from a sample data set matrix according to the initial calculation range of each first electroencephalogram signal feature to form an initial calculation matrix containing complete feature information;
And adopting a preset coefficient matching algorithm, taking the characteristic initial calculation matrix as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix, and obtaining the weight matching coefficient corresponding to each first electroencephalogram signal characteristic.
In some embodiments, the real-time acquisition module 203 performs, in the process of obtaining the third electroencephalogram signal from the low-frequency electroencephalogram signal and the high-frequency electroencephalogram signal:
based on the signal characteristics of the low-frequency electroencephalogram signals, calculating and obtaining gain coefficients of the high-frequency electroencephalogram signals;
and selectively amplifying the high-frequency electroencephalogram signal by utilizing a gain coefficient obtained by the high-frequency electroencephalogram signal to obtain an enhanced high-frequency electroencephalogram signal, and recombining the enhanced high-frequency electroencephalogram signal with the low-frequency electroencephalogram signal to obtain a third user electroencephalogram signal enhanced in full frequency band.
In some embodiments, the real-time acquisition module 203 performs, in calculating the gain coefficient of the high-frequency electroencephalogram signal based on the signal characteristics of the low-frequency electroencephalogram signal:
analyzing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals;
comparing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient;
And constructing the gain coefficient of the high-frequency electroencephalogram signal according to the global gain coefficient and the local gain coefficient.
In some embodiments, the gain factor u (n) is expressed as:
u(n) = {u1(n), 1<= n<= N/2
u2(n), N/2<n<= N };
where u1 (N) represents a global gain coefficient, u2 (N) represents a local gain coefficient, N represents a sampling point index on the time axis, n=1, 2,..n.
In some embodiments, the classification module 204 performs, in obtaining the electroencephalogram intention classification result according to the weighted electroencephalogram signal characteristics of the second user:
and inputting the weighted second user electroencephalogram signal characteristics into a preset classifier to obtain an electroencephalogram intention classification result.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
Referring to fig. 4, fig. 4 is a schematic block diagram of a structure of a terminal device according to an embodiment of the present invention.
As shown in fig. 4, the terminal device 300 includes a processor 301 and a memory 302, the processor 301 and the memory 302 being connected by a bus 303, such as an I2C (Inter-integrated Circuit) bus.
In particular, the processor 301 is used to provide computing and control capabilities, supporting the operation of the entire terminal device. The processor 301 may be a central processing unit (Central Processing Unit, CPU), the processor 301 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Specifically, the Memory 302 may be a Flash chip, a Read-Only Memory (ROM) disk, an optical disk, a U-disk, a removable hard disk, or the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 4 is merely a block diagram of a portion of the structure related to the embodiment of the present invention, and does not constitute a limitation of the terminal device to which the embodiment of the present invention is applied, and that a specific server may include more or less components than those shown in the drawings, or may combine some components, or have a different arrangement of components.
The processor is used for running a computer program stored in the memory, and realizing any one of the personalized man-machine interaction method based on the electroencephalogram signals provided by the embodiment of the invention when the computer program is executed.
In an embodiment, the processor is configured to run a computer program stored in a memory and to implement the following steps when executing the computer program:
a sample data set containing first user electroencephalogram signals is collected in advance, wherein the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics;
preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix;
collecting a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal;
And weighting the second user electroencephalogram characteristics of the same type according to the weight matching coefficient corresponding to the first electroencephalogram characteristics, and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics.
In some embodiments, the processor 301 performs, in preprocessing the sample dataset to obtain a sample dataset matrix:
filtering the first user electroencephalogram signal in the sample data set;
performing time window segmentation on the filtered first user electroencephalogram signal by utilizing a wavelet transformation algorithm to obtain a plurality of electroencephalogram signal sample fragments;
and carrying out feature detection and feature labeling on each electroencephalogram signal sample fragment to obtain a sample data set matrix.
In some embodiments, the processor 301 performs, in determining the weight matching coefficient corresponding to each first electroencephalogram signal feature according to the sample dataset matrix:
analyzing the preprocessed sample data set matrix, and determining the feature coordinate position of each extracted first electroencephalogram signal feature in the data set matrix;
according to the characteristic coordinate information, defining an initial calculation range of each first electroencephalogram signal characteristic in a sample data set matrix;
Reading time sequence data corresponding to each first electroencephalogram signal feature from a sample data set matrix according to the initial calculation range of each first electroencephalogram signal feature to form an initial calculation matrix containing complete feature information;
and adopting a preset coefficient matching algorithm, taking the characteristic initial calculation matrix as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix, and obtaining the weight matching coefficient corresponding to each first electroencephalogram signal characteristic.
In some embodiments, the processor 301 performs, in obtaining a third electroencephalogram signal from the low-frequency electroencephalogram signal and the high-frequency electroencephalogram signal:
based on the signal characteristics of the low-frequency electroencephalogram signals, calculating and obtaining gain coefficients of the high-frequency electroencephalogram signals;
and selectively amplifying the high-frequency electroencephalogram signal by utilizing a gain coefficient obtained by the high-frequency electroencephalogram signal to obtain an enhanced high-frequency electroencephalogram signal, and recombining the enhanced high-frequency electroencephalogram signal with the low-frequency electroencephalogram signal to obtain a third user electroencephalogram signal enhanced in full frequency band.
In some embodiments, the processor 301 performs, in calculating the gain coefficient of the high-frequency electroencephalogram signal based on the signal characteristics of the low-frequency electroencephalogram signal:
Analyzing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals;
comparing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient;
and constructing the gain coefficient of the high-frequency electroencephalogram signal according to the global gain coefficient and the local gain coefficient.
In some embodiments, the gain factor u (n) is expressed as:
u(n) = {u1(n), 1<= n<= N/2
u2(n), N/2<n<= N };
where u1 (N) represents a global gain coefficient, u2 (N) represents a local gain coefficient, N represents a sampling point index on the time axis, n=1, 2,..n.
In some embodiments, the processor 301 performs, in obtaining the electroencephalogram intention classification result according to the weighted electroencephalogram signal characteristics of the second user:
and inputting the weighted second user electroencephalogram signal characteristics into a preset classifier to obtain an electroencephalogram intention classification result.
It should be noted that, for convenience and brevity of description, a person skilled in the art may clearly understand that, in the specific working process of the terminal device described above, reference may be made to a corresponding process in the foregoing embodiment of the personalized man-machine interaction method based on electroencephalogram signals, which is not described herein again.
The embodiment of the invention also provides a storage medium for computer readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the steps of any personalized human-computer interaction method based on the electroencephalogram signals.
The storage medium may be an internal storage unit of the terminal device according to the foregoing embodiment, for example, a hard disk or a memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device.

Claims (6)

1. The personalized man-machine interaction method based on the electroencephalogram signals is characterized by comprising the following steps of:
a sample data set containing first user electroencephalogram signals is collected in advance, wherein the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics;
preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix;
Collecting a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal;
weighting the second user electroencephalogram characteristics of the same type according to the weight matching coefficient corresponding to the first electroencephalogram characteristics, and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics;
determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample dataset matrix, wherein the weight matching coefficient comprises:
analyzing the preprocessed sample data set matrix, and determining the feature coordinate position of each extracted first electroencephalogram signal feature in the sample data set matrix;
according to the feature coordinate position, defining an initial calculation range of each first electroencephalogram signal feature in a sample data set matrix;
reading time sequence data corresponding to each first electroencephalogram signal feature from a sample data set matrix according to the initial calculation range of each first electroencephalogram signal feature to form an initial calculation matrix containing complete feature information;
Adopting a preset coefficient matching algorithm, taking the initial calculation matrix as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix, and obtaining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic;
obtaining a third user electroencephalogram signal according to the low-frequency electroencephalogram signal and the high-frequency electroencephalogram signal, comprising:
based on the signal characteristics of the low-frequency electroencephalogram signals, calculating and obtaining gain coefficients of the high-frequency electroencephalogram signals;
selectively amplifying the high-frequency electroencephalogram signal by utilizing a gain coefficient obtained by the high-frequency electroencephalogram signal to obtain an enhanced high-frequency electroencephalogram signal, and recombining the enhanced high-frequency electroencephalogram signal with the low-frequency electroencephalogram signal to obtain a third user electroencephalogram signal enhanced in full frequency band;
based on the signal characteristics of the low-frequency electroencephalogram signals, calculating the gain coefficient of the high-frequency electroencephalogram signals comprises the following steps:
analyzing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals;
comparing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient;
constructing a gain coefficient of the high-frequency electroencephalogram signal according to the global gain coefficient and the local gain coefficient;
The expression of the gain coefficient u (n) is:
u(n)={u1(n),1<=n<=N/2
u2(n),N/2<n<=N};
where u1 (N) represents a global gain coefficient, u2 (N) represents a local gain coefficient, N represents a sampling point index on the time axis, n=1, 2.
2. The personalized man-machine interaction method based on electroencephalogram signals according to claim 1, wherein preprocessing the sample data set to obtain a sample data set matrix comprises:
filtering the first user electroencephalogram signal in the sample data set;
performing time window segmentation on the filtered first user electroencephalogram signal by utilizing a wavelet transformation algorithm to obtain a plurality of electroencephalogram signal sample fragments;
and carrying out feature detection and feature labeling on each electroencephalogram signal sample fragment to obtain a sample data set matrix.
3. The personalized human-computer interaction method based on the electroencephalogram signals according to any one of claims 1 or 2, wherein obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram signal features comprises:
and inputting the weighted second user electroencephalogram signal characteristics into a preset classifier to obtain an electroencephalogram intention classification result.
4. An electroencephalogram signal-based personalized man-machine interaction device is characterized by comprising:
The system comprises a pre-acquisition module, a pre-acquisition module and a storage module, wherein the pre-acquisition module is used for pre-acquiring a sample data set containing first user electroencephalogram signals, the sample data set contains the first user electroencephalogram signals, and each first user electroencephalogram signal corresponds to a plurality of first electroencephalogram signal characteristics;
the preprocessing module is used for preprocessing the sample data set to obtain a sample data set matrix, and determining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix;
the real-time acquisition module is used for acquiring a second user brain electrical signal in real time, separating a low-frequency brain electrical signal and a high-frequency brain electrical signal from the second user brain electrical signal, obtaining a third user brain electrical signal according to the low-frequency brain electrical signal and the high-frequency brain electrical signal, and extracting a plurality of second user brain electrical signal characteristics in the third user brain electrical signal;
the classification module is used for weighting the same type of the second user electroencephalogram characteristics according to the weight matching coefficient corresponding to the first electroencephalogram characteristics and obtaining an electroencephalogram intention classification result according to the weighted second user electroencephalogram characteristics;
the preprocessing module executes the following steps in the process of determining the weight matching coefficient corresponding to each first electroencephalogram signal characteristic according to the sample data set matrix:
Analyzing the preprocessed sample data set matrix, and determining the feature coordinate position of each extracted first electroencephalogram signal feature in the sample data set matrix;
according to the feature coordinate position, defining an initial calculation range of each first electroencephalogram signal feature in a sample data set matrix;
reading time sequence data corresponding to each first electroencephalogram signal feature from a sample data set matrix according to the initial calculation range of each first electroencephalogram signal feature to form an initial calculation matrix containing complete feature information;
adopting a preset coefficient matching algorithm, taking the initial calculation matrix as input, analyzing and learning the reaction intensity of the first user electroencephalogram signals on each initial calculation matrix, and obtaining a weight matching coefficient corresponding to each first electroencephalogram signal characteristic;
the real-time acquisition module executes the following steps in the process of obtaining a third electroencephalogram signal according to the low-frequency electroencephalogram signal and the high-frequency electroencephalogram signal:
based on the signal characteristics of the low-frequency electroencephalogram signals, calculating and obtaining gain coefficients of the high-frequency electroencephalogram signals;
selectively amplifying the high-frequency electroencephalogram signal by utilizing a gain coefficient obtained by the high-frequency electroencephalogram signal to obtain an enhanced high-frequency electroencephalogram signal, and recombining the enhanced high-frequency electroencephalogram signal with the low-frequency electroencephalogram signal to obtain a third user electroencephalogram signal enhanced in full frequency band;
The real-time acquisition module performs the following steps in the process of calculating the gain coefficient of the high-frequency electroencephalogram signal based on the signal characteristics of the low-frequency electroencephalogram signal:
analyzing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals;
comparing the time domain characteristics and the frequency domain characteristics of the two sections of low-frequency electroencephalogram signals to obtain a global gain coefficient and a local gain coefficient;
constructing a gain coefficient of the high-frequency electroencephalogram signal according to the global gain coefficient and the local gain coefficient;
the expression of the gain coefficient u (n) is:
u(n)={u1(n),1<=n<=N/2
u2(n),N/2<n<=N};
where u1 (N) represents a global gain coefficient, u2 (N) represents a local gain coefficient, N represents a sampling point index on the time axis, n=1, 2.
5. A computer device comprising a processor and a memory for storing a computer program which, when executed by the processor, implements the personalized human-computer interaction method based on electroencephalogram signals as claimed in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the personalized human-computer interaction method based on electroencephalogram signals as claimed in any one of claims 1 to 3.
CN202410001239.4A 2024-01-02 2024-01-02 Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals Active CN117520925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410001239.4A CN117520925B (en) 2024-01-02 2024-01-02 Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410001239.4A CN117520925B (en) 2024-01-02 2024-01-02 Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals

Publications (2)

Publication Number Publication Date
CN117520925A CN117520925A (en) 2024-02-06
CN117520925B true CN117520925B (en) 2024-04-16

Family

ID=89757009

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410001239.4A Active CN117520925B (en) 2024-01-02 2024-01-02 Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals

Country Status (1)

Country Link
CN (1) CN117520925B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112656431A (en) * 2020-12-15 2021-04-16 中国科学院深圳先进技术研究院 Electroencephalogram-based attention recognition method and device, terminal equipment and storage medium
US11109789B1 (en) * 2012-08-08 2021-09-07 Neurowave Systems Inc. Field deployable brain monitor and method
CN113693613A (en) * 2021-02-26 2021-11-26 腾讯科技(深圳)有限公司 Electroencephalogram signal classification method and device, computer equipment and storage medium
CN114492500A (en) * 2021-12-07 2022-05-13 浙江工业大学 Motor imagery electroencephalogram signal classification method based on one-dimensional convolution kernel
CN115795346A (en) * 2022-12-02 2023-03-14 江苏理工学院 Classification and identification method of human electroencephalogram signals
CN116383696A (en) * 2023-02-24 2023-07-04 哈尔滨工程大学 Electroencephalogram signal classification and identification method and system based on deep learning
CN116392148A (en) * 2023-04-07 2023-07-07 平安科技(深圳)有限公司 Electroencephalogram signal classification method, device, equipment and storage medium
CN117235576A (en) * 2023-09-18 2023-12-15 西安科技大学 Method for classifying motor imagery electroencephalogram intentions based on Riemann space

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11510606B2 (en) * 2016-12-02 2022-11-29 Thomas Jefferson University Signal processing method for distinguishing and characterizing high-frequency oscillations

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11109789B1 (en) * 2012-08-08 2021-09-07 Neurowave Systems Inc. Field deployable brain monitor and method
CN112656431A (en) * 2020-12-15 2021-04-16 中国科学院深圳先进技术研究院 Electroencephalogram-based attention recognition method and device, terminal equipment and storage medium
CN113693613A (en) * 2021-02-26 2021-11-26 腾讯科技(深圳)有限公司 Electroencephalogram signal classification method and device, computer equipment and storage medium
CN114492500A (en) * 2021-12-07 2022-05-13 浙江工业大学 Motor imagery electroencephalogram signal classification method based on one-dimensional convolution kernel
CN115795346A (en) * 2022-12-02 2023-03-14 江苏理工学院 Classification and identification method of human electroencephalogram signals
CN116383696A (en) * 2023-02-24 2023-07-04 哈尔滨工程大学 Electroencephalogram signal classification and identification method and system based on deep learning
CN116392148A (en) * 2023-04-07 2023-07-07 平安科技(深圳)有限公司 Electroencephalogram signal classification method, device, equipment and storage medium
CN117235576A (en) * 2023-09-18 2023-12-15 西安科技大学 Method for classifying motor imagery electroencephalogram intentions based on Riemann space

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向人机交互的运动想象脑电信号感知算法研究;王康 等;无人系统技术;20200131;第3卷(第1期);第31-37页 *

Also Published As

Publication number Publication date
CN117520925A (en) 2024-02-06

Similar Documents

Publication Publication Date Title
CN111012336B (en) Parallel convolutional network motor imagery electroencephalogram classification method based on spatio-temporal feature fusion
CN110515456B (en) Electroencephalogram signal emotion distinguishing method and device based on attention mechanism
CN110353675B (en) Electroencephalogram signal emotion recognition method and device based on picture generation
CN107844755A (en) A kind of combination DAE and CNN EEG feature extraction and sorting technique
CN110929581A (en) Electroencephalogram signal identification method based on space-time feature weighted convolutional neural network
CN111329474A (en) Electroencephalogram identity recognition method and system based on deep learning and information updating method
CN109325586B (en) System for denoising electroencephalogram signal
CN112465069B (en) Electroencephalogram emotion classification method based on multi-scale convolution kernel CNN
CN114052735A (en) Electroencephalogram emotion recognition method and system based on depth field self-adaption
CN106923824B (en) Electroencephalogram relaxation degree identification method and device based on multi-space signal characteristics
KR102292678B1 (en) System for classificating mental workload using eeg and method thereof
CN112294337A (en) Epilepsy detection system based on linear graph convolution neural network
CN109657646B (en) Method and device for representing and extracting features of physiological time series and storage medium
Katthi et al. Deep canonical correlation analysis for decoding the auditory brain
CN113180659A (en) Electroencephalogram emotion recognition system based on three-dimensional features and cavity full convolution network
Fattah et al. An approach for classifying alcoholic and non-alcoholic persons based on time domain features extracted from EEG signals
Figueiredo et al. SSA of biomedical signals: A linear invariant systems approach
CN114578967A (en) Emotion recognition method and system based on electroencephalogram signals
CN117520925B (en) Personalized man-machine interaction method, device, equipment and medium based on electroencephalogram signals
CN106974648B (en) Electroencephalogram relaxation degree identification method and device based on time domain and frequency domain space
CN116919422A (en) Multi-feature emotion electroencephalogram recognition model establishment method and device based on graph convolution
Imran et al. Motor imagery EEG signal classification scheme based on wavelet domain statistical features
CN116602676A (en) Electroencephalogram emotion recognition method and system based on multi-feature fusion and CLSTN
CN115017960A (en) Electroencephalogram signal classification method based on space-time combined MLP network and application
Javadpour et al. Implementing a smart method to eliminate artifacts of vital signals

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
GR01 Patent grant
GR01 Patent grant