CN117493779B - SSVEP signal processing method, device, equipment and medium for reducing visual fatigue - Google Patents

SSVEP signal processing method, device, equipment and medium for reducing visual fatigue Download PDF

Info

Publication number
CN117493779B
CN117493779B CN202410005326.7A CN202410005326A CN117493779B CN 117493779 B CN117493779 B CN 117493779B CN 202410005326 A CN202410005326 A CN 202410005326A CN 117493779 B CN117493779 B CN 117493779B
Authority
CN
China
Prior art keywords
visual fatigue
type
electroencephalogram
fatigue
characteristic data
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
CN202410005326.7A
Other languages
Chinese (zh)
Other versions
CN117493779A (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 CN202410005326.7A priority Critical patent/CN117493779B/en
Publication of CN117493779A publication Critical patent/CN117493779A/en
Application granted granted Critical
Publication of CN117493779B publication Critical patent/CN117493779B/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/10Pre-processing; Data cleansing
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/377Electroencephalography [EEG] using evoked responses
    • 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
    • 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
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/27Regression, e.g. linear or logistic regression
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Molecular Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Psychiatry (AREA)
  • Psychology (AREA)
  • Pathology (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Medical Informatics (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (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 particularly relates to an SSVEP signal processing method, device, equipment and medium for reducing visual fatigue, wherein the method comprises the following steps: acquiring brain electrical signals generated by a user under a plurality of coding stimulus sources, and performing visual fatigue recognition on the preprocessed brain electrical characteristic data according to a brain electrical signal recognition model; if the visual fatigue recognition result is ON type visual fatigue or OFF type visual fatigue, executing corresponding visual fatigue reduction operation according to the visual fatigue type; and if the visual fatigue recognition result is in a non-fatigue state, performing spectrum analysis on the original characteristic data to judge the gazing direction of the user. Therefore, the brain electricity is intelligently judged by applying the convolutional neural network, different visual fatigue types can be detected in a targeted manner, and the coding stimulus source is correspondingly controlled to inhibit fatigue, so that the visual fatigue phenomenon caused by long-time staring stimulus is reduced, and the practicability of the technology is improved.

Description

SSVEP signal processing method, device, equipment and medium for reducing visual fatigue
Technical Field
The application relates to the technical field of artificial intelligence, in particular to an SSVEP signal processing method, an SSVEP signal processing device, SSVEP signal processing equipment and an SSVEP signal processing medium for reducing visual fatigue.
Background
With the development of brain-computer interface technology, various interactive systems relying on visual fixation of users are being vigorous, such as intelligent control based on gaze tracking, fixation input and the like. Most of the technologies are constructed on the basis of inducing specific electroencephalogram response by using visual stimulus, and the sight direction of a user is judged by analyzing the electroencephalogram signals. However, currently, the mainstream electroencephalogram analysis method based on steady-state visual evoked potential (SSVEP) has a certain problem. The first problem is that long-term gaze stimulation can lead to severe visual fatigue, severely affecting the practicality of the technique. Conventional SSVEP coding often uses low frequency (1-15 Hz) rectangular flickering stimuli, which can cause strong visual accommodation changes, leading to visual fatigue. In recent years, high frequency scintillation stimulation has been used to encode SSVEP. But simple rectangular flicker still presents visual fatigue problems. This is because the visual system includes ON pathways enriched for ON cells and OFF pathways lacking OFF cells. The simple blinking activates only the ON-path, resulting in rapid adaptation and fatigue of the ON-path. The current research mainly adopts methods of improving the stimulus presentation frequency or modulating the duty ratio and the like to relieve visual fatigue, but the effect is very limited. Another problem is that the spectrum analysis range is narrow, and the typical frequency template obtained by training in advance is relied on, so that individual differences cannot be processed, and the discrimination accuracy is reduced. There is also a problem that the discrimination judgment of different types of visual fatigue is lacking, and the suppression of a better coding mode cannot be applied in a targeted manner. These problems restrict the application and popularization of the current SSVEP technology in more complex environments, and new and better solutions are urgently needed.
Disclosure of Invention
The embodiment of the application provides an SSVEP signal processing method, device, equipment and medium for reducing visual fatigue, which can solve the technical problems that the long-time staring stimulation of an electroencephalogram analysis method based on steady-state visual evoked potential in the prior art can cause serious visual fatigue and seriously affect the technical practicability.
In a first aspect, an embodiment of the present application provides a method for processing an SSVEP signal for reducing visual fatigue, including:
acquiring brain electrical signals generated by a user under a plurality of coding stimulus sources, and performing feature processing on the brain electrical signals to obtain original feature data;
preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data;
performing visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state;
if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue, corresponding visual fatigue reduction operation is executed according to the visual fatigue type;
and if the visual fatigue recognition result is in a non-fatigue state, performing spectrum analysis on the original characteristic data to judge the gazing direction of the user.
In a possible implementation manner of the first aspect, before the identifying, according to an electroencephalogram signal identification model, the visual fatigue type corresponding to the preprocessed electroencephalogram feature data further includes:
acquiring electroencephalogram sample data and a label type corresponding to each electroencephalogram sample data; wherein the tag type includes an ON-type visual fatigue, an OFF-type visual fatigue, and a non-fatigue state;
constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer;
optimizing initial weight parameters of the mixed classification regression model based on the convolutional neural network according to the electroencephalogram sample data and the label type corresponding to each electroencephalogram sample data based on the minimized loss function;
summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization;
and forming an electroencephalogram signal identification model according to the mixed classification regression model based on the convolutional neural network and the target weight parameter.
In one possible implementation manner of the first aspect, the operation for reducing visual fatigue is a first operation for suppressing visual fatigue corresponding to the ON-type visual fatigue;
performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an OFF type coding stimulation mode according to the ON type visual fatigue, and executing a first visual fatigue suppression operation.
In a possible implementation manner of the first aspect, the operation for reducing visual fatigue is a second operation for suppressing visual fatigue corresponding to the OFF-type visual fatigue;
performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an ON type coding stimulation mode according to the OFF type visual fatigue, and executing a second visual fatigue suppression operation.
In a possible implementation manner of the first aspect, performing a spectral analysis on the raw feature data to determine a user gaze direction includes:
acquiring target electroencephalogram characteristic data in the original characteristic data, determining the signal position of the target electroencephalogram characteristic data, and performing frequency analysis on the target electroencephalogram characteristic data to acquire a main frequency component;
determining a specific frequency range of spectrum analysis according to the main frequency component and a preset spectrum range, taking the signal position of the target electroencephalogram characteristic data as a center, taking the specific frequency range as a matrix range, and taking out an initial matrix to be operated from the target electroencephalogram characteristic data;
Generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, performing spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source stared by the user, and judging the sight direction of the user according to the coding stimulus source stared by the user.
In a second aspect, embodiments of the present application provide an SSVEP signal processing apparatus for reducing visual fatigue, including:
the first acquisition module is used for acquiring electroencephalogram signals generated by a user under a plurality of coding stimulus sources, and carrying out low-pass filtering and amplification processing on the acquired electroencephalogram signals to obtain original characteristic data;
the preprocessing module is used for preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data;
the recognition module is used for carrying out visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state;
the first operation module is used for executing corresponding operation for reducing visual fatigue according to the visual fatigue type if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue;
And the second operation module is used for carrying out spectrum analysis on the original characteristic data to judge the gazing direction of the user if the visual fatigue recognition result is in a non-fatigue state.
In a possible implementation manner of the second aspect, the apparatus further includes:
the second acquisition module is used for acquiring the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data; wherein the tag type includes an ON-type visual fatigue, an OFF-type visual fatigue, and a non-fatigue state;
the construction module is used for constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer;
the first optimizing module is used for optimizing initial weight parameters of the mixed classification regression model based on the convolutional neural network according to the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data based on the minimized loss function;
the second optimization module is used for summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization;
And the forming module is used for forming an electroencephalogram signal identification model according to the mixed classification regression model based on the convolutional neural network and the target weight parameter.
In one possible implementation manner of the second aspect, the operation for reducing visual fatigue is a first operation for suppressing visual fatigue corresponding to the ON-type visual fatigue;
the first operation module comprises:
and the first operation submodule is used for selecting an OFF type coding stimulation mode according to the first fatigue degree value corresponding to the ON type visual fatigue and executing a first visual fatigue inhibition operation.
In one possible implementation manner of the second aspect, the operation for reducing visual fatigue is a second operation for suppressing visual fatigue corresponding to the OFF-type visual fatigue;
the first operation module comprises:
and the second operation submodule is used for selecting an ON type coding stimulation mode according to the second fatigue degree value corresponding to the OFF type visual fatigue and executing a second visual fatigue inhibition operation.
In a possible implementation manner of the second aspect, the second operation module includes:
the acquisition sub-module is used for acquiring target electroencephalogram characteristic data in the original characteristic data, determining the signal position of the target electroencephalogram characteristic data, and carrying out frequency analysis on the target electroencephalogram characteristic data to acquire a main frequency component;
The extraction submodule is used for determining a specific frequency range of spectrum analysis according to the main frequency component and a preset spectrum range, taking the specific frequency range as a matrix range by taking the signal position of the target electroencephalogram characteristic data as the center, and taking out an initial matrix to be operated from the target electroencephalogram characteristic data;
and the judging sub-module is used for generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, carrying out spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source stared by the user, and judging the sight direction of the user according to the coding stimulus source stared by the user.
In a third aspect, embodiments of the present application provide a terminal device, including a processor and a memory for storing a computer program, which when executed by the processor implements a method as described in the first aspect above
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program which, when executed by a processor, implements a method as described in the first aspect above.
Compared with the prior art, the embodiment of the application has the beneficial effects that:
In the embodiment of the application, the electroencephalogram signals generated by a user under a plurality of coding stimulus sources are obtained, and the electroencephalogram signals are subjected to characteristic processing to obtain original characteristic data; preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data; performing visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state; if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue, corresponding visual fatigue reduction operation is executed according to the visual fatigue type; and if the visual fatigue recognition result is in a non-fatigue state, performing spectrum analysis on the original characteristic data to judge the gazing direction of the user. Therefore, the embodiment of the application can detect different visual fatigue types in a targeted way by intelligently judging the brain electricity through the convolutional neural network and correspondingly control the coding stimulus source to inhibit fatigue, which is beneficial to reducing the visual fatigue phenomenon caused by long-time staring stimulus and improving the practicability of the technology; the spectrum analysis matrix expansion technology is adopted, so that richer frequency domain information can be contained, and the judgment accuracy and stability are greatly improved; and a mapping between the coding parameters and the space position is established, so that accurate line-of-sight tracking based on brain electricity is realized.
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.
FIG. 1 is a schematic flow chart of an SSVEP signal processing method for reducing visual fatigue according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an SSVEP signal processing device for reducing visual fatigue according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
Referring to fig. 1, a schematic flowchart of an SSVEP signal processing method for reducing visual fatigue is provided in an embodiment of the present application, and the method may be applied to a computer device, and includes steps S101 to S105, specifically includes the following steps:
step S101, acquiring brain electrical signals generated by a user under a plurality of coding stimulus sources, and performing feature processing on the brain electrical signals to obtain original feature data.
In this embodiment, before acquiring the electroencephalogram signals generated by the user under the plurality of encoding stimulus sources, a high-frequency stimulus source is set: firstly, the number N of stimulus sources is determined, setting is carried out according to the actual visual fatigue detection requirement, and generally 2-10 different stimulus source values are selected, so that enough coding information can be provided without being excessively complex. Next, 20-60Hz is selected as the stimulation frequency range, as the high frequency of this range is effective to excite the brain electrical activity of the visual cortex region, with less than 20Hz responses and more than 60Hz producing significantly more visible electrical artifact interference, and 20-60Hz providing a strong and clear brain electrical response. Then N groups of stimulation frequencies are calculated within the determined 20-60Hz range, the calculation method is to list all integers in the range, extract prime numbers such as 23, 29, 31, 37 and the like, select N mutually different prime number combinations as values of the stimulation frequencies, and simultaneously control the difference between any two frequency values to be larger than 5Hz, so that the problem of aliasing caused by harmonic waves can be avoided. After the frequency combination is obtained, a microprocessor such as a singlechip is adopted to build a digital signal source, a numerical control crystal oscillation circuit is configured, a program is written to generate sine wave basic signals with different stimulation frequencies f 1-fN, the frequency precision is controlled to be more than 0.1Hz, the stable output is ensured, and the main frequency of the microprocessor is selected to be more than 80-100 MHz. Finally, the sinusoidal base signal is encoded, here using pulse width modulation techniques, which is a method of modulating the waveform by varying the duty cycle of a square wave signal. The method comprises the steps of modulating a continuous sine basic signal by using a short-period square wave signal (pulse), outputting a sine wave when the square wave signal is at a high level, and outputting a zero level when the square wave signal is at a low level. The pulse width modulation duty ratio range of 10% -90% is adopted, the modulation frequency is 2 times greater than the maximum stimulation frequency, complex time domain waveforms can be formed, and the coding effect is improved.
In some embodiments, performing feature processing on the electroencephalogram signal to obtain original feature data, including:
first, multiple sets of parametric visual stimulus sources encoded with different frequencies and modulation modes need to be prepared, which can appear on the display screen in the form of a flashing lattice or pattern sequence. The tested person (i.e. user) sits still in front of the screen to watch the prompts of the stimulus sources, and the distance between the eyes of the tested person and the display screen is about 80 cm. Then, according to the electroencephalogram signal acquisition requirement, a plurality of paths of electroencephalogram detection electrodes are arranged in advance at vision related areas determined by the scalp of a tested person, the commonly selected electrode coordinate positions are a occipital lobe area, a parietal lobe area and the like, and the coordinate points of the electrodes are accurately determined according to an international general 10-20 system calibration method. The electrode material can be a metal hard electrode or a flexible polymer electrode, but the scalp of a tested person is cleaned sufficiently, the fatty oil on the skin is removed by using a solution such as alcohol, so that the skin resistance is reduced, the acquisition impedance of the electrode is controlled to be below 5 kiloohms, and the influence of the human body impedance change caused by movement on signals can be reduced. Then, tiny brain electrophysiological voltage signals are collected through arranged electrodes and then transmitted, but the signal strength is only in the microvolts, and the signals can be detected only by filtering and amplifying. Firstly, the acquired brain electrical signals enter a 0.1-50 Hz analog low-pass filter for filtering, so that the influence of high-frequency noise can be effectively removed, and the signal waveform is clearer. And then connecting a biological signal amplifier with adjustable bandwidth, and amplifying the filtered brain electric weak signal by 1000-2000 times generally to enable the signal to reach the detectable millivolt level. The amplified brain electricity analog signal is digitally sampled by an analog-digital converter and converted into the original brain electricity characteristic data in the digital domain. The parameter setting is to note that the sampling frequency is more than 2 times higher than the frequency of the stimulus signal, so as to prevent spectrum aliasing.
The original digital characteristic data of the brain electrical response of the tested person (namely the user) under different stimulation modes can be obtained through the processes of manufacturing the coding stimulation source, positioning electrode acquisition, filtering amplification, analog-digital conversion and the like.
It can be understood that a tested person (i.e. a user) views different coding stimulus sources, acquires the electroencephalogram signals generated under a plurality of coding stimulus sources, and performs low-pass filtering and amplification processing on the acquired electroencephalogram signals to obtain original characteristic data.
Step S102, preprocessing the original characteristic data to obtain preprocessed brain electricity characteristic data.
In this embodiment, the data collected originally needs to be digitally filtered, a band-pass filter is designed, an electroencephalogram characteristic frequency band related to visual stimulus coding is selected, for example, an α wave is 8-13 hz, a β wave is 14-30 hz, a butterworth or elliptic digital filter with 4-6 th order parameters is set as the filter, and irrelevant slow fluctuation below 0.5 hz and high-frequency noise above 60 hz are filtered. Then carrying out trending treatment, and fitting DC trend items in the data by using a linear regression model or a polynomial curve fitting method, and eliminating the DC trend items from the original data, so that the data fluctuation caused by baseline drift can be reduced, and the stability of the signal is improved. And then, carrying out data segmentation on the signals subjected to the trend removal by filtering, and dividing the data into a plurality of data segments according to the time periodicity of visual coding stimulation, wherein each data segment corresponds to one stimulation coding period, and the length of the segmented data segments can be set to be 0.5-1 second. And then checking the waveform of each data segment, setting an amplitude threshold value, and eliminating abnormal data segments with overlarge waveform distortion. Finally, the average value of the first 200 milliseconds of each data segment is calculated as a baseline level, and then the corresponding baseline level is subtracted from the data segment, so that the baselines of the data segments are zeroed and aligned, and the consistency among different data segments can be improved.
The original electroencephalogram data is preprocessed through the steps of digital filtering, trend removal processing, data segmentation, abnormal data rejection, baseline correction and the like, so that electroencephalogram data which is higher in quality and can reflect visual coding stimulation characteristics can be extracted.
Step S103, performing visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result includes ON-type visual fatigue, OFF-type visual fatigue, and a non-fatigue state.
In some embodiments, the electroencephalogram identification model may also output values in the range of 0-1 representing the degree of visual fatigue of the ON-type and OFF-type in order to calculate the corresponding suppression parameters.
In some embodiments, the step S103 further includes steps S201 to S205 before the step S103, specifically as follows:
step S201, acquiring electroencephalogram sample data and a label type corresponding to each electroencephalogram sample data; wherein the tag type includes ON-type visual fatigue, OFF-type visual fatigue, and a non-fatigue state.
It is understood that in the samples where visual fatigue exists, labeling is performed according to the retinal ganglion cell type, and is classified into ON type and OFF type. And meanwhile, collecting an electroencephalogram sample of the tested person (namely the user) in a non-fatigue state, and marking the electroencephalogram sample as a non-fatigue type.
Meanwhile, the obtained ON type and OFF type visual fatigue samples need to be extracted with energy or proportion characteristics of alpha waves, beta waves and theta waves, and normalization processing is carried out to obtain visual fatigue degree values in the range of 0-1, and the visual fatigue degree values are used as additional sample labels.
Step S202, constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer.
In this embodiment, a hybrid classification regression model based on a convolutional neural network is constructed, and the input layer is an electroencephalogram signal. The number of the convolution layers is set to be 2-3 layers, the convolution kernel is as 3*3, the activation function adopts ReLU, the pooling layer parameters are pooled as 2 x 2, the number of nodes of the full-connection layer is 100-200, the output layer comprises 3 category nodes which output corresponding category prediction probabilities in ON type visual fatigue, OFF type visual fatigue and non-fatigue states, and two real value nodes which represent the ON type visual fatigue and OFF type visual fatigue degrees.
Step S203, optimizing initial weight parameters of the mixed classification regression model according to the electroencephalogram sample data and the label type corresponding to each electroencephalogram sample data based on the minimized loss function.
The minimum loss function is a cross entropy loss function, and the initial weight parameter represents all trainable parameters of the model based on the convolutional neural network, including weights and offsets of a convolutional layer and a full-connection layer.
In the optimization process, the model needs to be trained by using a complete sample containing the visual fatigue classification label and the degree value label, so that the model can learn classification and also can learn a predicted degree value.
And S204, summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization.
The preset stopping condition is that training is stopped when the total loss is smaller than a set threshold value or iterated to a preset number of times; the target weight parameter is the initial weight parameter after re-optimization as the target weight parameter.
In the optimization process, it is necessary to calculate the loss function and to perform the back propagation update parameters using sample data containing the complete visual fatigue classification and the magnitude value signature.
Step S205, an electroencephalogram signal identification model is formed according to the mixed classification regression model based on the convolutional neural network and the target weight parameters.
For example, assuming that the number of training data is m, the input samples are x= { X1, X2,..xm }, the labels are y= { Y1, Y2,..ym }, the hybrid classification regression model based on convolutional neural network is aimed at learning the feature extraction function F and the classification, regression function F, so that F (X)) can accurately predict the visual fatigue type and degree.
The mixed classification regression model based on the convolutional neural network can optimize an initial weight parameter W through iterative training, wherein W represents all trainable parameters of the model, including weights, offsets and the like of a convolutional layer and a full-connection layer. The goal of the training is to minimize the loss function L (W), here the cross entropy loss function is employed. For each training sample xl, calculating cross entropy loss = -yl (a (fl (xl))), wherein fl (xl) represents a mapping function of a hybrid classification regression model based ON a convolutional neural network based ON an initial weight parameter W to input xl, generally a network forward calculation result, a represents a softmax function, fl (xl) is mapped into probability distribution, namely a (fl (xl)) is a probability predicted by the hybrid classification regression model based ON the convolutional neural network, yl is a real class label of the sample xl, onehot codes such as [1,0] represent ON type, and ln is a natural logarithmic function.
Meanwhile, in order to train the regression prediction fatigue degree, a regression mean square error loss function is calculated for each sample:
(yl_reg - a_reg(fl(xl)))^2;
Where yl_reg is the true fatigue level of the sample and a_reg (fl (xl)) is the level of model prediction. The loss function of the regression section optimizes the parameters of the model by minimizing the difference between the predicted and actual values.
The losses of all training samples are summed to give a total loss L (W). The total loss L (W) is calculated by gradient descent method optimization, namely calculating gradient grad (W) of the total loss L (W) relative to the initial weight parameter W, and updating the parameter to reduce the total loss. The process is repeated, the total loss is continuously reduced through a plurality of iterations, and the initial weight parameter W is optimized. When the loss function value is smaller than the set threshold value or iterates to a preset number of times, training is stopped, and the initial weight parameter W after re-optimization is obtained as a target weight parameter. Finally, an electroencephalogram identification model which can map the input xl to the visual fatigue type classification result a (fl (xl))/the fatigue degree regression result a_reg (fl (xl)) is obtained.
It can be understood that by constructing a mixed classification regression model based ON a convolutional neural network and training by adopting multi-person electroencephalogram data marked with ON-type, OFF-type visual fatigue and non-fatigue states, a general visual fatigue type recognition model can be obtained, and a tested person (namely a user) can be judged.
And step S104, if the visual fatigue identification result is the ON type visual fatigue or the OFF type visual fatigue, executing corresponding operation for reducing the visual fatigue according to the visual fatigue type.
It can be appreciated that the embodiments of the present application determine the suppression method to use based on the identified visual fatigue type.
In some embodiments, the visual fatigue reduction operation is a first visual fatigue suppression operation corresponding to the ON-type visual fatigue;
performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an OFF type coding stimulation mode according to the first fatigue degree value corresponding to the ON type visual fatigue, and executing a first visual fatigue suppression operation.
In some embodiments, the visual fatigue reduction operation is a second visual fatigue suppression operation corresponding to the OFF-type visual fatigue;
performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an ON type coding stimulation mode according to a second fatigue degree value corresponding to the OFF type visual fatigue, and executing a second visual fatigue suppression operation.
Illustratively, if the recognition result is ON-type visual fatigue, the predicted fatigue level value thereof is 0.8 (full 1 minute), that is, the first fatigue level value corresponding to ON-type visual fatigue, the OFF-type coding stimulus mode is selected, and the first visual fatigue suppression operation is performed.
The period t_off of the OFF-type stimulus is first set to 10 seconds. Then, according to the predicted ON-type visual fatigue degree value a_reg (fl (xl)) which is assumed to be 0.8, calculating to obtain an optimal duty ratio k_off through a duty ratio adjusting function:
k_off = k_min + (k_max-k_min)*(1-a_reg(fl(xl)));
wherein the duty ratio k represents the proportion of the on-time in one cycle. In this example, k corresponds to the ratio of the off time to the entire period. In order to adjust the intensity of the black field stimulation, the range of the duty ratio k is set between [ k_min, k_max ], and when the fatigue degree is higher, the value of k is closer to k_min, and the longer the black field time is, the stronger the stimulation intensity is. Where k_max and k_min represent the maximum and minimum values of the duty cycle adjustment, respectively. It can be generally set that k_min=0.1, meaning that the off time is maximally 10% of the period.
k_max=0.9, representing the shortest off-time accounting for 90% of the period. The calculated optimal duty cycle k_off=0.1+ (0.9-0.1) ×1-0.8=0.18. Next, k_off=0.18 is passed to the controller, which switches the energization of the coded light source at intervals of 8.2 seconds on with k_off=1.8 seconds off, forming a black field stimulation code. Meanwhile, the controller supplies power to the coded light source according to the working voltage of 12 volts and the frequency of 50 Hz so as to generate visual stimulus, excite the OFF type retinal ganglion cells, inhibit the activity of the ON type cells, achieve the purpose of regulating the cell activation mode and reduce the ON type visual fatigue.
If the identification result is the OFF type visual fatigue, the predicted fatigue degree value is 0.7 (full 1 minute), and the predicted fatigue degree value is the second fatigue degree value corresponding to the OFF type visual fatigue, the ON type coding stimulation mode is selected, and the second visual fatigue suppression operation is executed.
The period t_on of the ON-type stimulus was first set to 10 seconds. Then, an optimal duty ratio k_on is calculated by a duty ratio adjustment function on the assumption that the predicted OFF-type visual fatigue level value a_reg (fl (xl)) is 0.7:
k_on=k_min+(k_max-k_min)*(1-a_reg(fl(xl)));
where k_max=0.9 and k_min=0.1 are the maximum and minimum values of the duty cycle adjustment, respectively. The optimal duty cycle k_on=0.1+ (0.9-0.1) ×1-0.7=0.27.
K_on=0.27 is sent to the controller with a corresponding off time of 0.27×10=2.7 seconds and on time of 0.73×10=7.3 seconds.
The controller controls the power-ON switch of the coding light source according to the time to form bright field stimulation codes so as to excite ON type retina cells and inhibit OFF type retina cells, thereby achieving the purposes of regulating the cell activation mode and reducing the OFF type visual fatigue.
It will be appreciated that the first type of ON visual fatigue uses an OFF-type coded stimulus, which requires a continuous supply of operating voltage to ensure that the coded light source is turned ON quickly. While also requiring a stimulation frequency of 50Hz to excite OFF-type cells. This is because OFF-type coded stimulation relies primarily on rapid light source turn-on to produce a pop-up stimulus. So that a continuous power supply is required during the off phase to ensure that the light source can be lit instantaneously. Furthermore, OFF-type retinal cells are particularly sensitive to sudden stimuli, requiring a relatively high frequency of pulsed stimuli to stimulate their activity. The second type of OFF visual fatigue uses ON-type coded stimuli that rely primarily ON controlling the proportion of ON-time to suppress OFF-type cells, without requiring a continuous operating voltage, nor without requiring a stimulus frequency. This is because ON-type coded stimulation produces smooth sustained stimulation by adjusting the bright field duty cycle, and does not require rapid lighting, so power is not required when turned off. Meanwhile, ON-type retinal cells are more sensitive to sustained light stimulation, without the need for high frequency pulse stimulation.
In the embodiment of the application, the parameters for inhibiting the stimulation can be dynamically calculated according to the fatigue degree real value predicted by the model, and personalized, dynamic and accurate adjustment of the inhibition strength can be realized. Different optimal inhibition parameters can be calculated according to the difference of fatigue degrees of different crowds, and a personalized customized inhibition scheme is realized. Meanwhile, along with the change of the fatigue degree, parameters can be optimized in real time, so that the stimulation suppression strength is reasonable, and the excessive strength and the excessive weakness are avoided. Compared with the unified use of a certain fixed parameter value, the dynamic adjustment can ensure the inhibition effect and improve the inhibition adaptability.
Step S105, if the visual fatigue recognition result is a non-fatigue state, performing spectrum analysis on the original feature data to determine a user gazing direction.
It will be appreciated that if visual fatigue is not identified, the location of visually relevant brain electrical signals is determined and the raw feature data is subjected to spectral analysis to determine the direction of user gaze.
In some embodiments, the step S105 includes steps S1051 to S1053, and specifically includes:
step S1051, acquiring target electroencephalogram feature data in the original feature data, determining a signal position of the target electroencephalogram feature data, and performing frequency analysis on the target electroencephalogram feature data to acquire a main frequency component.
The target electroencephalogram characteristic data in the original characteristic data is data of O1 and O2 electrodes selected from multichannel signals of the original characteristic data, and the data are used as electroencephalogram characteristic signals related to visual tasks.
In some embodiments, acquiring target electroencephalogram feature data in the original feature data, and determining a signal position of the target electroencephalogram feature data includes:
according to the scalp chart of the 10-20 system, the visual cortex area corresponds to occipital lobes, and the electrode coordinates of the occipital lobes are O1 and O2 which are used as the signal positions of the target electroencephalogram characteristic data, so that the data of the O1 and O2 electrodes are selected from the multichannel signals of the target electroencephalogram characteristic data in the original characteristic data and are used as the electroencephalogram characteristic signals related to visual tasks.
In some embodiments, performing frequency analysis on the target electroencephalogram characteristic data to obtain a main frequency component includes:
short-time fourier transform is used to analyze the distribution characteristics of the target electroencephalogram characteristic data in the time domain and the frequency domain. The short-time Fourier transform cuts the signal into a plurality of overlapped small time windows at equal intervals for analysis, so that the non-statics of the signal can be well captured in the time dimension, and the time-frequency distribution information is provided.
The specific operation is that firstly, the whole target brain electrical characteristic data is cut into a plurality of small windows with the length of 256 data points (about 0.5 seconds) at equal intervals. The data points within each small window are then discrete cosine transformed or fast fourier transformed to convert the data to a frequency domain representation. Here, a fourier transform of 128 points length is used, so the frequency resolution is 1 hz. After Fourier transformation calculation, a frequency power spectrum density matrix from 0 to 64 Hz is obtained, and the relative relation of the signal intensity in the time window under different frequencies is recorded. And further averaging the frequency spectrums of all the windows, and reducing the difference between the discrete windows to obtain an average frequency response curve of the whole section of signal on a time axis. By analyzing the response curve, it is possible to obtain in which frequency band the signal main component is present. If the alpha band (8-13 Hz) and the beta band (14-30 Hz) are significantly higher than other frequencies on the curve, then the alpha beta band can be primarily determined to be the main frequency component of the signal, i.e., the main frequency component.
Step S1052, determining a specific frequency range of the spectrum analysis according to the main frequency component and the preset spectrum range, centering on the signal position of the target electroencephalogram feature data, taking the specific frequency range as a matrix range, and taking out an initial matrix to be operated from the target electroencephalogram feature data.
In some embodiments, determining a specific frequency range of the spectral analysis from the primary frequency component and the preset spectral range comprises: after Fourier acquisition of the frequency characteristics of the electroencephalogram signals, the frequency characteristics of different waves, such as alpha waves, beta waves, theta waves, gamma waves and the like, are extracted by setting corresponding band-pass filters in frequency intervals. For example, if the frequency range of the alpha wave is 8-13Hz and the frequency range of the beta wave is 13-30Hz, band-pass filters of 8-13Hz and 13-30Hz can be designed, and the total energy value in each frequency band is calculated after the filtering, so that the intensity of the brain wave is represented. Besides the conventional fixed waveform frequency band design, finer frequency band division can be performed, for example, the alpha wave is divided into three subintervals of 8-10Hz,10-12Hz and 12-13Hz, and richer frequency characteristics can be obtained. After the energy characteristics of all the frequency bins are obtained, normalization processing may be performed, that is, the energy of each frequency band is divided by the sum of the energy of all the frequency bands, so that the energy of each frequency band becomes a relative intensity value. And then analyzing the relative intensities of different frequency components, and determining main frequency components with strong force, wherein the main frequency components reflect the frequency characteristics of the current electroencephalogram signal. In addition, an empirical range is also preset prior to spectral analysis for guiding the frequency bin selection for spectral analysis. The preset spectral range may be obtained from early statistics, such as setting the center frequency and bandwidth parameters of the range. When the spectrum analysis is actually executed, the known main frequency components and the preset experience spectrum range are combined to determine the specific frequency interval actually adopted at the present time. The determination principle is to consider the characteristics of the signal itself and the experience range of optimization, and determine on the basis of the combination of the two. For example, if the main frequency components are an α wave and a β wave, the range is 8-30Hz, and the preset range has a center frequency of 15Hz and a bandwidth of 10Hz, the actual spectrum analysis range determined this time may be set to 10-20Hz by integrating the two. Thus, the main frequency component is contained, and the preset range is met.
In some embodiments, taking the specific frequency range as a matrix range with the signal position of the target electroencephalogram feature data as the center, and taking out an initial matrix to be operated from the target electroencephalogram feature data, including: firstly, data segmentation is carried out on a time domain, the preprocessed continuous signals are segmented and intercepted at equal intervals, and each 1 second length is taken as one data segment, so that the time resolution of the subsequent frequency domain analysis can be enhanced. Next, a time window waveform 2 seconds long is selected from the original electroencephalogram signal expansion area with each truncated data segment time point as the center. Thus, each data segment has time domain information with larger range of 0.5 seconds before and after each data segment, and the spectrum analysis effect can be improved. Then, according to the frequency range of the spectrum analysis set in the previous step of 10-20Hz, an 11 multiplied by 2 frequency domain matrix is constructed, which shows that in 10-20Hz, a point is taken every 1Hz to form 11 frequency points, and 2 columns correspond to two channels O1 and O2. Thus, a null frequency domain information matrix is created. Next, the previously extracted 2 seconds time domain waveform data is mapped to the frequency domain matrix coordinate, and the element part corresponding to the matrix is cut out from the waveform data to a new matrix through index subscript selection to be used as the initial frequency domain matrix to be operated on of the data segment. Finally, the process is repeated, and the initial frequency domain matrix of all the divided data segments is extracted. The original continuous electroencephalogram time domain signals are all converted into a series of connected small-range frequency domain matrices. The matrixes take the time point of the data segment as a reference, contain the spectrum information of the key part of the brain electricity, not only keep the time domain characteristics, but also construct the frequency domain structure, and can be used as the input of the coding recognition algorithm for carrying out the spectrum analysis.
Step S1053, generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, performing spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source gazing by the user, and judging the sight direction of the user according to the coding stimulus source gazing by the user.
In some embodiments, generating a complete matrix of spectral analysis to be operated on from the initial matrix of operation to be operated on includes: reading an initial to-be-operated matrix from a spectrum analysis cache storage array to generate a complete to-be-operated spectrum analysis matrix, wherein the address of each position in the storage array is determined when the initial to-be-operated matrix is read, and data are read according to the address and filled into the matrix to generate the complete to-be-operated spectrum analysis matrix.
It will be appreciated that in the preceding steps, the initial spectral matrices to be calculated have been extracted from the pre-processed electroencephalogram feature data, these matrices containing limited range time and frequency domain information of the critical electroencephalogram sites. However, the effect of directly performing spectral analysis on these initial matrices may be limited. To adequately perform code recognition, a larger range of spectral information needs to be acquired to expand the initial matrix. Therefore, more peripheral data are read from the spectrum analysis cache memory array, and a complete spectrum analysis matrix to be operated is generated.
Specifically, it is first necessary to set the full matrix size required for spectrum analysis. For example, to analyze an alpha wave, the frequency range is 8-13Hz, taking a point every 0.5Hz, 10 frequency points are needed. The time frame takes 4 seconds, one point every 0.5 seconds, 8 points are required. There are 2 more channels and thus a 10 x 8 x 2 three-dimensional complete matrix can be constructed. The previously acquired initial matrix to be operated upon is then mapped directly into a sub-region of the complete matrix. For example, an initial matrix size of 11 x 2, a frequency of 10-20Hz, may be mapped to lines 5-15 of the complete matrix (since 10-20Hz corresponds to 5-15 points). Can be mapped to the middle 2 second region in time. The initial matrix core data is thus in the complete matrix. But the peripheral area also needs to be extended by reading more data.
The spectrum analysis is used to provide a greater range of information to the cache memory array. The storage array organizes the whole time domain brain electrical signals after pretreatment in a three-dimensional matrix, the dimension can be set to 64 multiplied by 1024 multiplied by 2, the frequency range of 0-64Hz is represented, and each 0.5 second is provided with a time point and 2 channels. For each initial matrix, a specific coordinate position of the initial matrix in the complete matrix is calculated, then an address range which needs to be read from the storage array is deduced according to the position, for example, 5 rows on the upper and lower frequency axes of the initial matrix, 4 columns of data on the front and rear sides of the time axis are respectively calculated, and then the row and column numbers are converted into specific data addresses in the storage array, which is the process of index calculation. After the index calculation is completed, the address range calculated in the storage array can be directly accessed, the original data stored in the address units are sequentially read, and the read data are transmitted to the program variables for storage. After the reading is completed, the read data needs to be subjected to format conversion, the read data is converted into frequency domain characteristics from a time domain waveform, the conversion process can be realized by applying fast Fourier transform, and the frequency domain characteristic data matched with a frequency spectrum matrix structure can be extracted by setting parameters of Fourier transform (namely, fourier is performed aiming at a quasi-filling matrix). After the format conversion is completed, the converted frequency domain feature matrix is directly filled into corresponding positions around the initial matrix of the complete spectrum analysis matrix, such as an upper frequency region or a left time region and a right time region, and the expansion of the initial matrix is realized after the filling is completed.
For example, assume an initial matrix size of 11X 2, frequency range 10-20Hz. It is located in the complete spectrum analysis matrix from line 5 to line 15 (since 10-20Hz corresponds to 5-15 points of the complete matrix). Located in the middle 2 seconds, such as 3-5 seconds. The initial matrix is first copied directly to this location. And then calculating the data ranges of an upper frequency axis, a lower frequency axis and a front time axis and a rear time axis which need to be expanded, accessing the storage array to read the peripheral data, and filling the peripheral data into the corresponding positions of the complete matrix after conversion to complete the expansion.
By the method for acquiring the peripheral information from the storage array, the initial matrix at each time point can be effectively expanded, and a complete spectrum analysis matrix with sufficient range to be operated is generated. This both preserves the initial spectral information of critical brain locations and provides a greater range of frequency domain data support through the storage array. The generated complete matrix can be used for further analysis and identification of the frequency of the coded stimulus source. The whole process integrates the advantages of the initial matrix guarantee and the storage array to provide richer information, so that the spectrum analysis is more accurate and effective.
In some embodiments, performing spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, and determining the coding stimulus source of the gaze of the user, including: first a fast fourier transform is applied to the complete spectrum matrix, which fourier transforms the time domain sample points in the matrix to the frequency domain. After transformation, a complex matrix is obtained, the rows of which represent sample points in the time dimension, the columns represent frequency points in the frequency dimension, and the complex values in the matrix reflect the amplitude and phase information of the signals on the frequency points at the moment. This is the so-called complex matrix containing time-frequency domain information. After the matrix is obtained, the square of the complex absolute value of all time domain sample points on each frequency point is calculated for each frequency point, and then the average value is taken, so that the average intensity of the signal power on the frequency point can be obtained, and the integral intensity of the frequency component is reflected. Repeating this calculation, the power spectrum of the signal at each frequency point in the matrix can be obtained. The set of power spectra reflects the intensity distribution of the different frequencies in the segment of the brain electrical signal. According to the set frequency parameters of the coding stimulus source, the corresponding frequency points in the matrix can be directly positioned, for example, the source A uses 20Hz coding, and the 20Hz frequency points in the matrix are found. The power spectrum intensity value at the point is read, and if the power spectrum intensity value is obviously larger than other frequency points, the detection of the stimulation source of 20Hz can be judged.
For example, assume that 3 coded stimulus sources are provided, wherein stimulus source A has a coding frequency of 20Hz, B has a coding frequency of 30Hz, and C has a coding frequency of 25Hz. Then a power spectrum matrix in the range of 0-60Hz can be obtained after fourier transformation of the complete spectrum matrix. Looking at the power spectrum intensity values at three frequency points of 20Hz, 25Hz and 30Hz in the matrix, and assuming that the power spectrum at 20Hz is 156.7; the power spectrum at 25Hz is 23.6; power spectrum 198.2 at 30Hz because the intensity is highest at 30Hz, up to 198.2, it can be determined that the user is gazing at stimulus B containing a coding frequency of 30 Hz.
By carrying out Fourier transformation on the frequency spectrum analysis matrix, extracting power spectrum information of coding frequency, comparing energy intensities of different frequency components, the frequency components of the stimulus source contained in the electroencephalogram data of the user can be analyzed, the coding stimulus source of the staring gaze of the user is determined, and the inference of the sight direction is completed.
In some embodiments, determining the user gaze direction from the encoded stimulus source of the user gaze comprises: firstly, searching a stimulation source parameter table according to a coding frequency result, wherein unique coding frequencies used by different stimulation sources can be preset in the parameter table, so that the stimulation sources using the coding frequencies can be found in a one-to-one correspondence. Secondly, the spatial position information of the stimulus source is ascertained, the position information of the stimulus source is also preset in a parameter table, and the angle coordinates of the stimulus source are determined. And mapping the coding frequency and the position of the stimulus source again, and determining the stimulus source according to the coding frequency, namely locking the sight of the user in the direction, so that the sight direction of the user can be determined. And then quantifying, measuring the numerical value of the spatial position angle of the stimulus source, and assigning a value to the judged user sight line direction according to the mapping relation, so that the user sight line direction can be represented by an accurate angle value. Finally, by analyzing the duration of the coding frequency in the electroencephalogram signal, the time length of the user for maintaining the gaze in the direction can be counted, so that the sight state of the user can be completely described. The above comprehensive judging processes of the sight direction depend on the mapping relation between the frequency and the position provided by the preset stimulus parameter table, so that the sight direction can be calculated from the coding frequency. For example, assume that the parameters table is preset with stimulus A at 45 degrees and 25Hz encoding and stimulus B at 130 degrees and 32Hz encoding. Then after analysis of the 32Hz code frequency, the user's line of sight direction can be determined to be 130 degrees, i.e. the direction of the stimulus source B. Therefore, the sight angle and time are further quantitatively judged through table lookup mapping, and the judgment of the sight direction of the user can be completed.
In the embodiment of the application, the electroencephalogram signals generated by a user under a plurality of coding stimulus sources are obtained, and the electroencephalogram signals are subjected to characteristic processing to obtain original characteristic data; preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data; performing visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state; if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue, corresponding visual fatigue reduction operation is executed according to the visual fatigue type; and if the visual fatigue recognition result is in a non-fatigue state, performing spectrum analysis on the original characteristic data to judge the gazing direction of the user. Therefore, the embodiment of the application can detect different visual fatigue types in a targeted way by intelligently judging the brain electricity through the convolutional neural network and correspondingly control the coding stimulus source to inhibit fatigue, which is beneficial to reducing the visual fatigue phenomenon caused by long-time staring stimulus and improving the practicability of the technology; the spectrum analysis matrix expansion technology is adopted, so that richer frequency domain information can be contained, and the judgment accuracy and stability are greatly improved; and a mapping between the coding parameters and the space position is established, so that accurate line-of-sight tracking based on brain electricity is realized.
Corresponding to the SSVEP signal processing method for reducing visual fatigue described in the above embodiments, fig. 2 shows a block diagram of the SSVEP signal processing apparatus for reducing visual fatigue provided in the embodiment of the application, and for convenience of explanation, only the portions related to the embodiment of the application are shown.
Referring to fig. 2, the apparatus includes:
a first obtaining module 21, configured to obtain electroencephalogram signals generated by a user under a plurality of encoding stimulus sources, and perform low-pass filtering and amplification processing on the collected electroencephalogram signals to obtain original characteristic data;
a preprocessing module 22, configured to preprocess the raw feature data to obtain preprocessed electroencephalogram feature data;
the recognition module 23 is used for carrying out visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state;
a first operation module 24, configured to execute a corresponding operation for reducing visual fatigue according to the visual fatigue type if the visual fatigue recognition result is ON-type visual fatigue or OFF-type visual fatigue;
and the second operation module 25 is configured to perform spectral analysis on the raw feature data to determine a user gazing direction if the visual fatigue recognition result is in a non-fatigue state.
In one possible implementation manner, the apparatus further includes:
the second acquisition module is used for acquiring the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data; wherein the tag type includes an ON-type visual fatigue, an OFF-type visual fatigue, and a non-fatigue state;
the construction module is used for constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer;
the first optimizing module is used for optimizing initial weight parameters of the mixed classification regression model based on the convolutional neural network according to the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data based on the minimized loss function;
the second optimization module is used for summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization;
and the forming module is used for forming an electroencephalogram signal identification model according to the mixed classification regression model based on the convolutional neural network and the target weight parameter.
In one possible implementation, the operation of reducing visual fatigue is a first operation of suppressing visual fatigue corresponding to the ON-type visual fatigue;
the first operation module 24 includes:
and the first operation submodule is used for selecting an OFF type coding stimulation mode according to the first fatigue degree value corresponding to the ON type visual fatigue and executing a first visual fatigue inhibition operation.
In one possible implementation, the operation of reducing visual fatigue is a second operation of suppressing visual fatigue corresponding to the OFF-type visual fatigue;
the first operation module 24 includes:
and the second operation submodule is used for selecting an ON type coding stimulation mode according to the second fatigue degree value corresponding to the OFF type visual fatigue and executing a second visual fatigue inhibition operation.
In one possible implementation, the second operation module 25 includes:
the acquisition sub-module is used for acquiring target electroencephalogram characteristic data in the original characteristic data, determining the signal position of the target electroencephalogram characteristic data, and carrying out frequency analysis on the target electroencephalogram characteristic data to acquire a main frequency component;
the extraction submodule is used for determining a specific frequency range of spectrum analysis according to the main frequency component and a preset spectrum range, taking the specific frequency range as a matrix range by taking the signal position of the target electroencephalogram characteristic data as the center, and taking out an initial matrix to be operated from the target electroencephalogram characteristic data;
And the judging sub-module is used for generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, carrying out spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source stared by the user, and judging the sight direction of the user according to the coding stimulus source stared by the user.
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.
Fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 3, the computer device 3 of this embodiment includes: at least one processor 30 (only one is shown in fig. 3), a memory 31 and a computer program 32 stored in the memory 31 and executable on the at least one processor 30, the processor 30 implementing the steps in any of the method embodiments described above when executing the computer program 32.
The computer device 3 may be a smart phone, a tablet computer, a desktop computer, a cloud server, or other computing devices. The computer device may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the computer device 3 and is not meant to be limiting as the computer device 3, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 30 may be a central processing unit (Central Processing Unit, CPU), the processor 30 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf 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. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may in some embodiments be an internal storage unit of the computer device 3, such as a hard disk or a memory of the computer device 3. The memory 31 may in other embodiments also be an external storage device of the computer device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the computer device 3. The memory 31 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs etc., such as program codes of the computer program etc. The memory 31 may also be used for temporarily storing data that has been output or is to be output.
In addition, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the steps in any of the above-mentioned method embodiments.
The present embodiments provide a computer program product which, when run on a computer device, causes the computer device to perform the steps of the method embodiments described above.
In several embodiments provided herein, it will be understood that each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device to perform all or part of the steps of the method described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing embodiments have been provided for the purpose of illustrating the objects, technical solutions and advantages of the present application in further detail, and it should be understood that the foregoing embodiments are merely examples of the present application and are not intended to limit the scope of the present application. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art, which are within the spirit and principles of the present application, are intended to be included within the scope of the present application.

Claims (7)

1. An SSVEP signal processing method for reducing visual fatigue, comprising:
acquiring brain electrical signals generated by a user under a plurality of coding stimulus sources, and performing feature processing on the brain electrical signals to obtain original feature data;
preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data;
performing visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state;
if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue, corresponding visual fatigue reduction operation is executed according to the visual fatigue type;
If the visual fatigue recognition result is in a non-fatigue state, performing spectrum analysis on the original characteristic data to judge the gazing direction of the user;
before the visual fatigue type corresponding to the preprocessed brain electrical characteristic data is identified according to the brain electrical signal identification model, the method further comprises the following steps:
acquiring electroencephalogram sample data and a label type corresponding to each electroencephalogram sample data; wherein the tag type includes an ON-type visual fatigue, an OFF-type visual fatigue, and a non-fatigue state;
constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer;
optimizing initial weight parameters of the mixed classification regression model based on the convolutional neural network according to the electroencephalogram sample data and the label type corresponding to each electroencephalogram sample data based on the minimized loss function;
summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization;
Forming an electroencephalogram signal identification model according to the mixed classification regression model based on the convolutional neural network and the target weight parameter;
performing spectral analysis on the raw feature data to determine a user gaze direction, including:
acquiring target electroencephalogram characteristic data in the original characteristic data, determining the signal position of the target electroencephalogram characteristic data, and performing frequency analysis on the target electroencephalogram characteristic data to acquire a main frequency component;
determining a specific frequency range of spectrum analysis according to the main frequency component and a preset spectrum range, taking the signal position of the target electroencephalogram characteristic data as a center, taking the specific frequency range as a matrix range, and taking out an initial matrix to be operated from the target electroencephalogram characteristic data;
generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, performing spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source stared by the user, and judging the sight direction of the user according to the coding stimulus source stared by the user.
2. The SSVEP signal processing method for reducing visual fatigue according to claim 1, wherein the visual fatigue reducing operation is a first visual fatigue suppressing operation corresponding to the ON-type visual fatigue;
Performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an OFF type coding stimulation mode according to the first fatigue degree value corresponding to the ON type visual fatigue, and executing a first visual fatigue suppression operation.
3. The SSVEP signal processing method for reducing visual fatigue according to claim 1, wherein the visual fatigue reducing operation is a second visual fatigue suppressing operation corresponding to the OFF-type visual fatigue;
performing a corresponding operation of reducing visual fatigue according to the visual fatigue type, including:
and selecting an ON type coding stimulation mode according to a second fatigue degree value corresponding to the OFF type visual fatigue, and executing a second visual fatigue suppression operation.
4. An SSVEP signal processing apparatus for reducing visual fatigue, comprising:
the first acquisition module is used for acquiring electroencephalogram signals generated by a user under a plurality of coding stimulus sources, and carrying out low-pass filtering and amplification processing on the acquired electroencephalogram signals to obtain original characteristic data;
the preprocessing module is used for preprocessing the original characteristic data to obtain preprocessed electroencephalogram characteristic data;
the recognition module is used for carrying out visual fatigue recognition on the preprocessed electroencephalogram characteristic data according to an electroencephalogram signal recognition model; the visual fatigue recognition result comprises ON type visual fatigue, OFF type visual fatigue and a non-fatigue state;
The first operation module is used for executing corresponding operation for reducing visual fatigue according to the visual fatigue type if the visual fatigue identification result is ON type visual fatigue or OFF type visual fatigue;
the second operation module is used for carrying out spectrum analysis on the original characteristic data to judge the gazing direction of the user if the visual fatigue recognition result is in a non-fatigue state;
the device further comprises:
the second acquisition module is used for acquiring the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data; wherein the tag type includes an ON-type visual fatigue, an OFF-type visual fatigue, and a non-fatigue state;
the construction module is used for constructing a mixed classification regression model based on a convolutional neural network; the mixed classification regression model based on the convolutional neural network comprises an input layer, a middle layer and an output layer;
the first optimizing module is used for optimizing initial weight parameters of the mixed classification regression model based on the convolutional neural network according to the electroencephalogram characteristic sample data and the label type corresponding to each electroencephalogram characteristic sample data based on the minimized loss function;
the second optimization module is used for summing the losses of all the electroencephalogram characteristic sample data to obtain total losses, optimizing the total losses based on a gradient descent method, and stopping training when the total losses reach a preset stopping condition to obtain target weight parameters after re-optimization;
The forming module is used for forming an electroencephalogram signal identification model according to the mixed classification regression model based on the convolutional neural network and the target weight parameter;
the second operation module includes:
the acquisition sub-module is used for acquiring target electroencephalogram characteristic data in the original characteristic data, determining the signal position of the target electroencephalogram characteristic data, and carrying out frequency analysis on the target electroencephalogram characteristic data to acquire a main frequency component;
the extraction submodule is used for determining a specific frequency range of spectrum analysis according to the main frequency component and a preset spectrum range, taking the specific frequency range as a matrix range by taking the signal position of the target electroencephalogram characteristic data as the center, and taking out an initial matrix to be operated from the target electroencephalogram characteristic data;
and the judging sub-module is used for generating a complete spectrum analysis matrix to be operated according to the initial matrix to be operated, carrying out spectrum analysis on the spectrum analysis matrix to be operated, extracting frequency information of the coding stimulus source, determining the coding stimulus source stared by the user, and judging the sight direction of the user according to the coding stimulus source stared by the user.
5. The visual fatigue reduction SSVEP signal processing device of claim 4, wherein the visual fatigue reduction operation is a first visual fatigue suppression operation corresponding to the ON-type visual fatigue;
The first operation module comprises:
and the first operation submodule is used for selecting an OFF type coding stimulation mode according to the ON type visual fatigue and executing a first visual fatigue inhibition operation.
6. A computer device comprising a processor and a memory for storing a computer program which when executed by the processor implements the SSVEP signal processing method of reducing visual fatigue of any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the SSVEP signal processing method of reducing visual fatigue according to any one of claims 1 to 3.
CN202410005326.7A 2024-01-03 2024-01-03 SSVEP signal processing method, device, equipment and medium for reducing visual fatigue Active CN117493779B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410005326.7A CN117493779B (en) 2024-01-03 2024-01-03 SSVEP signal processing method, device, equipment and medium for reducing visual fatigue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410005326.7A CN117493779B (en) 2024-01-03 2024-01-03 SSVEP signal processing method, device, equipment and medium for reducing visual fatigue

Publications (2)

Publication Number Publication Date
CN117493779A CN117493779A (en) 2024-02-02
CN117493779B true CN117493779B (en) 2024-03-15

Family

ID=89674820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410005326.7A Active CN117493779B (en) 2024-01-03 2024-01-03 SSVEP signal processing method, device, equipment and medium for reducing visual fatigue

Country Status (1)

Country Link
CN (1) CN117493779B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108919947A (en) * 2018-06-20 2018-11-30 北京航空航天大学 A kind of brain machine interface system realized by visual evoked potential and method
CN111580643A (en) * 2020-04-10 2020-08-25 天津大学 Brain-computer interface method based on steady-state asymmetric visual evoked potential
CN111631848A (en) * 2020-05-31 2020-09-08 天津大学 Mind control artificial limb system based on brain-computer hybrid intelligence
CN114305454A (en) * 2021-11-22 2022-04-12 广东电网有限责任公司 Fatigue state identification method and device based on domain confrontation neural network
CN115857701A (en) * 2023-02-15 2023-03-28 季华实验室 SSVEP electroencephalogram signal processing method and related equipment
CN117204865A (en) * 2023-10-30 2023-12-12 西安交通大学 Steady-state visual evoked potential visual fatigue quantification method based on underdamped second-order stochastic resonance

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108919947A (en) * 2018-06-20 2018-11-30 北京航空航天大学 A kind of brain machine interface system realized by visual evoked potential and method
CN111580643A (en) * 2020-04-10 2020-08-25 天津大学 Brain-computer interface method based on steady-state asymmetric visual evoked potential
CN111631848A (en) * 2020-05-31 2020-09-08 天津大学 Mind control artificial limb system based on brain-computer hybrid intelligence
CN114305454A (en) * 2021-11-22 2022-04-12 广东电网有限责任公司 Fatigue state identification method and device based on domain confrontation neural network
CN115857701A (en) * 2023-02-15 2023-03-28 季华实验室 SSVEP electroencephalogram signal processing method and related equipment
CN117204865A (en) * 2023-10-30 2023-12-12 西安交通大学 Steady-state visual evoked potential visual fatigue quantification method based on underdamped second-order stochastic resonance

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Development of Flicker Visual Stimulus by Mixing Fundamental and Its Harmonie Frequencies for SSVEP-based Brain-Computer Interface;Nannaphat Siribunyaphat;《2021 18th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON)》;20210618;第1113-1116页 *
基于脑电实验的虚拟现实环境全景绿视率对人体愉悦度的影响研究;聂玮等;《景观设计学(中英文)》;20220430;第10卷(第02期);第36-51页 *
脑机接口中高频稳态视觉诱发电位的识别研究;罗睿心等;《生物医学工程学杂志》;20230831;第40卷(第04期);第683-691页 *

Also Published As

Publication number Publication date
CN117493779A (en) 2024-02-02

Similar Documents

Publication Publication Date Title
Miao et al. A spatial-frequency-temporal optimized feature sparse representation-based classification method for motor imagery EEG pattern recognition
CN109299751B (en) EMD data enhancement-based SSVEP electroencephalogram classification method of convolutional neural model
CN108960182A (en) A kind of P300 event related potential classifying identification method based on deep learning
CN109671500A (en) Schizophrenia auxiliary diagnosis classification method based on electroencephalogram time domain data
CN110720900B (en) Brain state monitoring and regulating device, method, processor and terminal equipment
CN101382837B (en) Computer mouse control device of compound motion mode
Zhou et al. Predicting neuronal dynamics with a delayed gain control model
CN114190953A (en) Training method and system of electroencephalogram signal noise reduction model for electroencephalogram acquisition equipment
CN113662560A (en) Method for detecting seizure-like discharge between attacks, storage medium and device
CN109009098A (en) A kind of EEG signals characteristic recognition method under Mental imagery state
CN117493779B (en) SSVEP signal processing method, device, equipment and medium for reducing visual fatigue
Azami et al. Automatic signal segmentation based on singular spectrum analysis and imperialist competitive algorithm
CN111407231B (en) Method and device for detecting risk of Alzheimer's disease and terminal equipment
CN116870360A (en) Evaluation method of transcranial electrical stimulation effect
Regev et al. Context sensitivity across multiple time scales with a flexible frequency bandwidth
CN111772629A (en) Brain cognitive skill transplantation method
Fauzi et al. Automatic energy extraction methods for EEG channel selection
Senk et al. Reconciliation of weak pairwise spike-train correlations and highly coherent local field potentials across space
Xu et al. Decode brain system: A dynamic adaptive convolutional quorum voting approach for variable-length EEG data
CN113343798A (en) Training method, device, equipment and medium for brain-computer interface classification model
CN117562542B (en) Emotion recognition method based on electroencephalogram signals, computer equipment and storage medium
CN116392087B (en) Sleep stability quantification and adjustment method, system and device based on modal decomposition
Yang et al. Decoding of visual-related information from the human eeg using an end-to-end deep learning approach
CN113827256B (en) Fatigue detection method, device, terminal and storage medium based on brain electrical micro state
Shojaedini et al. Sparse Representation-Based Classification (SRC): A Novel Method to Improve the Performance of Convolutional Neural Networks in Detecting P300 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