CN117648538A - Training and application method, device, equipment and medium of electroencephalogram signal denoising model - Google Patents

Training and application method, device, equipment and medium of electroencephalogram signal denoising model Download PDF

Info

Publication number
CN117648538A
CN117648538A CN202410116135.8A CN202410116135A CN117648538A CN 117648538 A CN117648538 A CN 117648538A CN 202410116135 A CN202410116135 A CN 202410116135A CN 117648538 A CN117648538 A CN 117648538A
Authority
CN
China
Prior art keywords
vector
vectors
electroencephalogram
key
target
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.)
Granted
Application number
CN202410116135.8A
Other languages
Chinese (zh)
Other versions
CN117648538B (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 CN202410116135.8A priority Critical patent/CN117648538B/en
Publication of CN117648538A publication Critical patent/CN117648538A/en
Application granted granted Critical
Publication of CN117648538B publication Critical patent/CN117648538B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)

Abstract

The invention belongs to the technical field of electroencephalogram signal processing, and discloses a training and application method, device, equipment and medium of an electroencephalogram signal denoising model. In addition, the invention provides the concepts of a convergence interval and a divergence interval, and describes the dynamic process from the aggregation to the expansion of abnormal electroencephalogram, so that the brand-new view angle can accurately position the starting and the ending of the abnormality, quantitatively evaluate the area range of the abnormal wave, and further analyze the electroencephalogram mechanism.

Description

Training and application method, device, equipment and medium of electroencephalogram signal denoising model
Technical Field
The invention belongs to the technical field of electroencephalogram signal processing, and particularly relates to a training and application method, device, equipment and storage medium of an electroencephalogram signal denoising model.
Background
The brain electrical signal has important functions and application value in recording and reflecting human brain activities, and can be used for clinical auxiliary diagnosis of various brain diseases and mental diseases, and research of cognitive science, man-machine interaction and the like. However, the electroencephalogram signals often mix with various noises, which severely restricts the analysis and utilization of the electroencephalogram signals. The main noise sources are physiological noise, environmental noise and measurement noise. The physiological noise is noise generated by a human body such as electrooculogram, myoelectricity and the like, has randomness and wide spectrum distribution, and causes serious interference to the identification and analysis of the electroencephalogram signals; environmental noise such as power frequency noise, mobile communication signals, etc., such noise energy being more concentrated in a particular frequency band; and measuring noise such as lead mismatch, electrode imbalance and other technical noise. The effective signal denoising is important to improving the quality of the brain electrical signal and further improving the analysis and utilization effects.
The current common denoising method comprises the steps of filtering noise in a specific frequency band by adopting a digital filter, wherein useful information is easy to lose; separation of source signals using blind source separation techniques, but requires a large number of samples; decomposing the signal by wavelet transformation to inhibit noise coefficient, but the effect depends on parameter selection; the deep learning feature expression is also used for denoising the signal, but theoretical explanation is lacking, so that the denoising effect is not good enough.
Disclosure of Invention
The invention aims to provide a training and application method, device, equipment and storage medium of an electroencephalogram signal denoising model, which can automatically learn the intrinsic characteristics of abnormal signals, has theoretical interpretation, does not need to manually set noise parameters, has better self-adaptability and expansibility, and further improves the denoising effect.
The first aspect of the invention discloses a training method of an electroencephalogram signal denoising model, which comprises the following steps:
collecting an original electroencephalogram signal containing noise;
extracting the characteristics of the original electroencephalogram signals to obtain original characteristic vectors;
comparing the original feature vector with normal electroencephalogram features, and identifying to obtain an abnormal signal segment in the original electroencephalogram signals;
constructing a vector field of the abnormal signal segment; determining a plurality of key vectors from all intra-field vectors included in the vector field;
taking a preset distance threshold as a radius, taking each key vector as a center, determining a local neighborhood space of each key vector in the vector field, marking intra-field vectors which are mutually pointed with the key vectors in the local neighborhood space as convergence vectors, and marking intra-field vectors which are not mutually pointed with the key vectors in the local neighborhood space as divergence vectors;
Forming a convergence interval according to a convergence vector positioned in a first minimum circumscribing circle of each key vector, and forming a divergence interval according to a divergence vector positioned in a second minimum circumscribing circle of each key vector;
extracting features according to the convergence interval and the divergence interval of all the key vectors to obtain an abnormal feature matrix corresponding to the original electroencephalogram signals;
and training the deep learning neural network by taking the original electroencephalogram signals and the abnormal feature matrix corresponding to the original electroencephalogram signals as input and taking denoising signals corresponding to the original electroencephalogram signals as labels to obtain a denoising model.
The second aspect of the invention discloses a denoising method for an electroencephalogram signal, and the denoising method comprises the following steps of:
collecting an electroencephalogram signal to be processed;
extracting the characteristics of the electroencephalogram signals to be processed to obtain target characteristic vectors;
comparing the target feature vector with normal electroencephalogram features, and identifying to obtain a target abnormal signal segment in the electroencephalogram signals to be processed;
constructing a target vector field of the target abnormal signal segment;
determining a plurality of target key vectors from all intra-field vectors included in the target vector field;
Taking a preset distance threshold as a radius, taking each target key vector as a center, determining a target local neighborhood space of each target key vector in the target vector field, marking in-field vectors which are mutually pointed with the target key vectors in the target local neighborhood space as target convergence vectors, and marking in-field vectors which are not mutually pointed with the target key vectors in the target local neighborhood space as target divergence vectors;
forming a target convergence interval according to target convergence vectors positioned in a first minimum circumscribing circle of each target key vector, and forming a target divergence interval according to target divergence vectors positioned in a second minimum circumscribing circle of each target key vector;
extracting features according to target convergence intervals and target divergence intervals of all the target key vectors to obtain a target abnormal feature matrix corresponding to the electroencephalogram signals to be processed;
and inputting the electroencephalogram signals to be processed and the corresponding target abnormal feature matrixes thereof into the denoising model, and obtaining target denoising signals according to the output of the denoising model.
The third aspect of the invention discloses a training device for an electroencephalogram signal denoising model, which comprises:
The acquisition unit is used for acquiring original electroencephalogram signals containing noise;
the first extraction unit is used for carrying out feature extraction on the original electroencephalogram signals to obtain original feature vectors;
the identification unit is used for comparing the original feature vector with normal electroencephalogram features and identifying to obtain an abnormal signal segment in the original electroencephalogram signals;
a construction unit for constructing a vector field of the abnormal signal segment;
a first determining unit, configured to determine a plurality of key vectors from all intra-field vectors included in the vector field;
the second determining unit is used for determining a local neighborhood space of each key vector in the vector field by taking a preset distance threshold value as a radius and taking each key vector as a center, marking intra-field vectors which are mutually pointed with the key vectors in the local neighborhood space as convergence vectors, and marking intra-field vectors which are not mutually pointed with the key vectors in the local neighborhood space as divergence vectors;
the third determining unit is used for forming a convergence interval according to the convergence vector positioned in the first minimum circumscribing circle of each key vector, and forming a divergence interval according to the divergence vector positioned in the second minimum circumscribing circle of each key vector;
The second extraction unit is used for extracting features according to the convergence interval and the divergence interval of all the key vectors to obtain an abnormal feature matrix corresponding to the original electroencephalogram signals;
the training unit is used for training the deep learning neural network to obtain a denoising model by taking the original electroencephalogram signal and the abnormal feature matrix corresponding to the original electroencephalogram signal as input and taking the denoising signal corresponding to the original electroencephalogram signal as a label.
In a fourth aspect, the invention discloses an electronic device comprising a memory storing executable program code and a processor coupled to the memory; the processor invokes the executable program code stored in the memory for executing the training method of the electroencephalogram signal denoising model disclosed in the first aspect.
A fifth aspect of the present invention discloses a computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the training method of the electroencephalogram signal denoising model disclosed in the first aspect.
The method has the advantages that original characteristic vectors and normal electroencephalogram characteristics are obtained through characteristic extraction by collecting original electroencephalograms containing noise, abnormal signal segments in the original electroencephalograms are obtained through identification, vector fields of the abnormal signal segments are constructed, a plurality of key vectors are determined from vectors in all fields, a local neighborhood space of each key vector is determined by taking a preset distance threshold as a radius and taking each key vector as a center, vectors in the fields in which the local neighborhood space and the key vectors are mutually directed are marked as convergence vectors, vectors in the fields in which the local neighborhood space and the key vectors are not mutually directed are marked as divergence vectors, convergence intervals are formed according to the convergence vectors located in a first minimum circumcircle of each key vector, divergence intervals are formed according to the divergence vectors located in a second minimum circumcircle of each key vector, and characteristic extraction is carried out according to the convergence intervals and the divergence intervals of all key vectors, so that abnormal characteristic matrixes corresponding to the original electroencephalograms are obtained; finally, the original electroencephalogram signals and the corresponding abnormal feature matrixes are used as input, the denoising signals corresponding to the original electroencephalogram signals are used as labels to perform model training, so that the characteristics of the electroencephalogram signals are comprehensively analyzed from multiple angles such as vector expression, key vector extraction and the like by constructing a vector field analysis framework, the change of the abnormal electroencephalogram signals can be reflected more intuitively and stereoscopically, and the inherent mechanism of the signals is revealed deeply. In addition, the invention provides the concepts of a convergence interval and a divergence interval, and describes the dynamic process from the aggregation to the expansion of abnormal electroencephalogram, so that the brand-new view angle can accurately position the starting and the ending of the abnormality, quantitatively evaluate the area range of the abnormal wave, and further analyze the electroencephalogram mechanism.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles and effects of the invention.
Unless specifically stated or otherwise defined, the same reference numerals in different drawings denote the same or similar technical features, and different reference numerals may be used for the same or similar technical features.
FIG. 1 is a flowchart of a training method of an electroencephalogram signal denoising model, which is disclosed in an embodiment of the invention;
fig. 2 is a schematic structural diagram of a training device for an electroencephalogram signal denoising model according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Reference numerals illustrate:
201. an acquisition unit; 202. a first extraction unit; 203. an identification unit; 204. a construction unit; 205. a first determination unit; 206. a second determination unit; 207. a third determination unit; 208. a second extraction unit; 209. a training unit; 301. a memory; 302. a processor.
Detailed Description
Unless defined otherwise or otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. In the context of a realistic scenario in connection with the technical solution of the invention, all technical and scientific terms used herein may also have meanings corresponding to the purpose of the technical solution of the invention. The terms "first and second …" are used herein merely for distinguishing between names and not for describing a particular number or order. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
It will be understood that when an element is referred to as being "fixed" to another element, it can be directly fixed to the other element or intervening elements may also be present; when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present; when an element is referred to as being "mounted to" another element, it can be directly mounted to the other element or intervening elements may also be present. When an element is referred to as being "disposed on" another element, it can be directly on the other element or intervening elements may also be present.
As used herein, unless specifically stated or otherwise defined, "the" means that the feature or technical content mentioned or described before in the corresponding position may be the same or similar to the feature or technical content mentioned. Furthermore, the terms "comprising," "including," and "having," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The embodiment of the invention discloses a training method of an electroencephalogram signal denoising model, which can be realized through computer programming. The execution main body of the method can be electronic equipment such as a computer, a notebook computer, a tablet computer and the like, or a training device of an electroencephalogram signal denoising model embedded in the electronic equipment, and the invention is not limited to the above. In order that the invention may be readily understood, a more particular description of specific embodiments thereof will be rendered by reference to specific embodiments that are illustrated in the appended drawings.
As shown in FIG. 1, the method comprises the following steps 110-190:
110. an original brain electrical signal containing noise is acquired.
In the embodiment of the invention, the brain electrical activity of the test object is acquired through the brain electrical acquisition equipment, and the original brain electrical signal containing noise is acquired, wherein the signal contains useful information of the brain and various externally introduced noise. Optionally, an electroencephalogram detection head ring for a non-invasive brain-computer interface can be selected for electroencephalogram signal acquisition, 6 detection electrodes are arranged in the head ring, the positions of the detection electrodes comprise Fp1 and Fp2 of forehead lobes, C3 and C4 of a central area and P3 and P4 of top lobes according to an international 10-20 system layout, and main brain functional areas such as forehead lobes, top lobes and central grooves can be covered. The inner ring of the head ring is made of soft materials, and the outer shell is made of ABS, so that wearing comfort is ensured. When the scalp care device is worn, the position of the head ring is adjusted to enable the electrode to be completely attached to the scalp, and conductive adhesive and the like can be used for enhancing the contact between the skin and the electrode and reducing the contact impedance, and the contact impedance is usually controlled below 5k omega. The small electroencephalogram biological amplifier is integrated on the head ring, the bandwidth range of the amplifier is 0.5-50Hz, and the main components of the electroencephalogram signals can be covered; the input impedance is more than 5MΩ, so that the influence of the contact resistance of the head ring and the skin on the signal can be reduced. The amplifier comprises a Sigma-Delta analog-to-digital converter with a sampling frequency of 250Hz and a conversion resolution of 16 bits, and the frequency response parameters of the amplifier are corrected by performing a static calibration. The test object is required to be in a calm and relaxed state, and the influence of large-amplitude movements such as eyeballs, heads and the like on signals is avoided. Starting a signal detector, continuously collecting and storing multi-lead original brain electrical signals for 5-10 minutes. The acquired original electroencephalogram signals comprise electroencephalogram rhythms such as alpha, beta, theta and the like, but physiological noise caused by electrooculography, electrocardio, myoelectricity and the like, exogenous noise such as linear interference from environment and the like, technical noise caused by an electroencephalogram acquisition system such as lead mismatch, electrode imbalance and instrument noise and false signals caused by the movement of a test object such as eyeballs and head movements are mixed. These raw brain electrical signals will be input for subsequent signal analysis and processing. The original electroencephalogram signals are represented by a matrix X, wherein each row in the matrix X represents a multi-lead electroencephalogram vector at one moment.
120. And extracting the characteristics of the original electroencephalogram signals to obtain original characteristic vectors.
In order to analyze useful information of an electroencephalogram signal, it is necessary to extract time-frequency domain features of an original electroencephalogram signal and obtain an original feature vector f (X) for representing time-frequency distribution characteristics of the signal. Specifically, the feature expression may be directly learned using a deep learning model. Firstly, constructing a network model architecture comprising a plurality of groups of convolution pooling layers, inputting an original channel electroencephalogram signal sequence, carrying out convolution operation by using two-dimensional check signals with different sizes through the convolution layers, wherein the core size can be designed to be 33, 55 and the like, each size extracts a time domain or frequency domain characteristic with a specific range, for example, 33 cores can detect a dense peak distribution in the time domain, 55 cores can extract a rhythmicity characteristic with lower frequency, each convolution core can be regarded as a characteristic extractor, the parallel operation can allow the network to learn and extract a plurality of different types of time-frequency characteristics through a plurality of groups of convolution cores, such as 32 or 64 cores, the convolution step size can be set to be 1 so as to densely capture the characteristics, and the input boundary is filled to realize output size and input matching, and then a nonlinear activation function, such as a ReLU function, the method comprises the steps of performing nonlinear transformation, converting output from linear mapping into a multidimensional feature map, performing downsampling through a convergence layer, for example, performing maximum pooling, achieving feature map reduction and compression by taking the maximum value of a receptive field, obtaining stable feature expression and reducing parameters, selecting pooling kernels with different sizes and step sizes to control the sampling degree of the feature map, performing multi-group convolution kernel extraction and pooling, capturing the feature map in a segmented manner in the time and frequency directions, finally converting the two-dimensional (time domain and frequency domain) feature map into an original feature vector f (X) through a full-connection layer, serving as advanced feature expression representing different electroencephalogram states, training model parameters through an end-to-end reverse propagation algorithm, enabling the feature expression to have a strong degree of differentiation on the electroencephalogram states, and finishing mapping from signals to feature spaces.
As another alternative implementation manner, wavelet transformation and expansion thereof can be also adopted to extract various time-frequency characteristics of the original electroencephalogram signals, such as wavelet energy, wavelet entropy and the like under different scales. Alternatively, the envelope and edge spectrum of the signal may be obtained by Hilbert (Hilbert) transform for time-frequency analysis. The invention is not limited.
130. And comparing the original feature vector with normal brain electrical features, and identifying to obtain an abnormal signal segment in the original brain electrical signals.
The normal electroencephalogram feature may be obtained first before the step 130 is executed, the normal electroencephalogram feature is learned based on an electroencephalogram sample of a normal person, and by comparing an original feature vector extracted from an original electroencephalogram with the normal electroencephalogram feature, an abnormal signal segment in the original electroencephalogram which does not conform to a normal mode may be identified, and the abnormal signal segment may possibly contain noise.
For example, the method for obtaining the normal electroencephalogram features may include the following steps S11 to S12, which are not illustrated:
s11, acquiring a plurality of electroencephalogram signal samples of a normal person, and extracting a feature vector sample of each electroencephalogram signal sample.
Collecting brain signal sample set of normal person, and recording as { X ] 1 ,X 2 ,...,X N The number of samples N needs to be large enough to represent the range of normal person populations. Each sample X i For sampling continuous brain signals of a period of time at a sampling frequency fs, a discrete sequence of length L, i.e. X i ={x i (1),x i (2),...,x i (L) }. All the electroencephalogram signal samples in the sample set are sequentially input into a previously trained convolutional neural network, the previously trained convolutional neural network structure comprises a convolutional layer, a pooling layer and a full-connection layer, and multi-level time-frequency characteristics can be automatically extracted from the electroencephalogram signal samples. The full connection layer converts the extracted time-frequency characteristics into K-dimensional characteristic vector samples, and the ith sample X i The network outputs its K-dimensional eigenvector samples f (X i )={f 1 (X i ),f 2 (X i ),...,f K (X i ) And this reflects the deep-level feature expression of the normal sample. All N samples are processed in this way to obtain a set of eigenvector samples { f (X) 1 ),f(X 2 ),...,f(X N )}。
S12, calculating a normal mean value vector and a covariance matrix according to the feature vector samples of the electroencephalogram signal samples, and obtaining normal electroencephalogram features according to the normal mean value vector and the covariance matrix.
Considering that the electroencephalogram signals of different individuals can have certain difference, the normal mean value vector mu= { mu ] is calculated by using the feature vector samples of all the samples 1 ,μ 2 ,...,μ k Sum-of-covariance matrix Σ, where Σ reflects the covariance relationship of the feature dimensions. So that the brain electrical characteristics of the whole normal sample can be represented by multi-dimensional Gaussian distribution N (mu, sigma), namely the normal brain electrical characteristics are obtained, and the brain electrical signal deep layer of the whole normal crowd is constructedAnd (5) a feature statistical model.
Specifically, step 130 may include the following steps 1301-1302, not shown:
1301. dividing the original feature vector into a plurality of segments to be detected, and calculating the mahalanobis distance between each segment to be detected and the normal brain electrical features.
Illustratively, the mahalanobis distance between the original feature vector f (X) extracted from the original electroencephalogram and the normal electroencephalogram feature can be calculated by the following formula (1):
(1)
where (f (X) - μ) is a difference vector between the original feature vector f (X) and the normal mean vector μ in the normal electroencephalogram feature,is the inverse of the covariance matrix Σ, and the inverse is calculated to eliminate the correlation between the feature dimensions and obtain a diagonal matrix; t represents the transposed symbol of the matrix or vector, (f (X) - μ) T Is a transpose of the difference vector (f (X) - μ), since f (X) and μ are both column vectors of K dimensions (size k×1): f (X) = [ f 1 , f 2 ,...,f K ],μ = [μ 1 ,μ 2 ,...,μ K ]The difference vector obtained by f (X) - μ is still a column vector of size k×1; in order to multiply (f (X) - μ) by the matrix Σ, the column vector (f (X) - μ) needs to be transposed into a row vector of 1×k to satisfy the operation requirement of matrix multiplication, i.e., the row vector is multiplied by the matrix. Wherein the transposed formula is shown in the following formula (2):
(2)
1302. If the mahalanobis distance of the fragment to be detected is larger than the set distance threshold, judging that the fragment to be detected is an abnormal signal fragment.
Wherein, the mahalanobis distance reflects the total deviation of the fragment to be detected in terms of the characteristic expression. If the calculated mahalanobis distance d is larger than the set distance threshold, the deep characteristic of the segment to be detected is greatly different from the overall characteristic distribution of the normal human brain electric signal, and the segment to be detected can be judged to be an abnormal signal segment, and noise or heterogeneous information is likely to be contained.
140. A vector field of abnormal signal segments is constructed.
For example, the step 140 may include the following steps 1401 to 1406, which are not shown:
1401. sampling points with a plurality of intervals are taken for the abnormal signal segments, and the time domain gradient of each sampling point is calculated.
First, the abnormal signal segments need to be digitally sampled and quantized. Specifically, the abnormal signal segment f (t) is sampled by an a/D converter, and N sampling points are obtained: f (nTs), n=1, 2,..n. Wherein the sampling frequency Fs should satisfy the nyquist sampling theorem, the sampling interval ts=1/Fs. After sampling, each sampling point is mapped to a value by a quantizer, obtaining a discrete sequence of quantization steps Q, for example: . Where f (nTs) represents the nth sample point and f (n) represents the quantized signal value of the nth sample point.
The time domain gradient g_t (n) is then calculated, which can be calculated by a differential formula between two adjacent points, for example:
1402. the frequency domain gradient for each sample point is calculated.
For the anomaly signal segment f (t), a short-time Fourier transform may be employed to analyze its local spectral features. Specifically, the abnormal signal segment f (T) is split into a plurality of short-period signals f at a certain time interval T 1 (t), f 2 (t),...,f n (t). For each short period signal f n (t) performing Fourier transform to obtain a transform result DFT { f n (t) }, and then taking the value of the transformation result according to different frequency points w, so as to calculate and obtain the frequency spectrum amplitude F (n, w) on the corresponding frequency point w: f (n, w) =dft { F n (t)}(w)。Wherein w represents frequency points corresponding to sampling points one by one, and the range is 0 to Fs/2 (Fs is sampling frequency); DFT { f n (t) } represents performing discrete fourier transform on the nth short period signal. This results in a localized spectral signature for each short-period signal. Then, calculating the difference of the frequency spectrum amplitude values between the adjacent frequency points to be used as the approximation of the frequency domain gradient:. Where w_k represents the kth frequency bin, g_f (n, w_k) is the frequency domain gradient at the frequency bin w_k, and the frequency domain gradient reflects the rate of change of the local frequency spectrum of the signal.
1403. And taking the time domain gradient and the frequency domain gradient as two components to construct a gradient vector of each sampling point.
To construct the gradient vector, it is necessary to make the time domain component and the frequency domain component correspond to sampling points at the same time. That is, the time domain gradient g_t (n) of the sampling point needs to be paired with the frequency domain gradient g_f (n, w_k) at the frequency point w_k to form a vector. The method can be realized in the following way:
correspondingly pairing the time domain gradient g_t (n) of each sampling point and the frequency domain gradient g_f (n, w_k) of each frequency point as two components of a vector to form a gradient vector: v (n) = [ g_t (n), g_f (n, w_k) ]. Repeating the steps, and constructing corresponding gradient vectors for each sampling point in sequence to finally obtain a gradient vector sequence representing the local time-frequency characteristics of the abnormal signal segment: v (1), V (2), V (N).
In this way, the correspondence between the time domain and the frequency domain gradients can be established, so that the time domain and the frequency domain gradients become vector expressions describing the local characteristics of the signals, and the frequency domain components with proper frequencies are selected to be combined with the time domain components, so that more targeted vector expressions can be formed.
1404. And calculating the vector direction of the gradient vector of each sampling point according to the time domain gradient and the frequency domain gradient.
For the time domain gradient g_t (n), the positive and negative are judged to determine the time domain gradient direction. That is, if g_t (n) >0, the time domain gradient direction is set to θ_t (n) =1; if g_t (n) <0, the time domain gradient direction is set to θ_t (n) = -1.
For the frequency domain gradient g_f (n, w_k), it is necessary to determine from the fourier transformed spectral values: taking + -L frequency points around the frequency point w_k, and calculating the local slope k of the Fourier spectrum near the frequency point w_k: k= (F (n, w_k+l) -F (n, w_k-L))/(2L. If the local slope k >0, indicating that the band signal has an increasing trend, the frequency domain gradient direction is set to θ_f (n, w_k) =1; if the local slope k <0 indicates that the band signal has a decreasing trend, the frequency domain gradient direction is set to θ_f (n, w_k) = -1.
Then, the time domain gradient direction and the frequency domain gradient direction are combined to form a vector direction θ (n) of the gradient vector: θ (n) = [ θ_t (n), θ_f (n, w_k) ]. Repeating the above calculation for each sampling point, a numerical expression of the vector direction of the gradient vector of each sampling point can be obtained.
1405. And constructing an intra-field vector of each sampling point according to the gradient vector of each sampling point and the vector direction of the gradient vector.
Specifically, the modulo length M (n) = |v (n) |=sqrt [ g_t (n) of the gradient vector is calculated from two components of the gradient vector V (n) at each sampling point 2 + g_f(n,w_k) 2 ]Then, according to the vector direction θ (n) = [ θ_t (n), θ_f (n, w_k) of the gradient vector of each sampling point]The direction angle phi (n) =arctan [ theta_f (n, w_k)/theta_t (n) of each gradient vector is calculated]. Finally, constructing an in-field vector of each sampling point according to the modular length and the direction angle of each gradient vector:
1406. and constructing a vector field of the abnormal signal segment according to the intra-field vectors of all the sampling points.
And drawing the intra-field vector v (n) on all the sampling points on a two-dimensional coordinate system to obtain the vector field representation of the abnormal signal segment.
150. A plurality of key vectors is determined from all intra-field vectors comprised by the vector field.
For example, the step 150 may include the following steps 1501 to 1504, which are not illustrated:
1501. numerical similarity between pairwise combinations of vectors in all fields in the vector field is calculated.
Firstly, establishing a vector matrix V for N intra-field vectors V (N) in a vector field, and then calculating the inner products of any two intra-field vectors V (i) and V (j) in the vector matrix to serve as two-dimensional vectors, wherein the inner product calculation can be adoptedFormula (v) where v x And v y The x and y components of the in-field vectors, respectively, and the modulo length |v (i) | of each in-field vector is calculated simultaneously, and |v (i) |=sqrt [ v ] can be used x (i) 2y (i) 2 ]Is calculated according to the formula of the vector in the field, and then the numerical similarity between the two vectors in the field is obtained according to the inner product of the vectors in the field divided by the modular length of the vectors in the fieldAnd repeatedly calculating S (i, j) between every two combinations of the intra-field vectors in the vector field as matrix elements, so as to obtain a similarity matrix S.
1502. And determining the two in-field vectors with the numerical similarity larger than the association threshold value as a strong association relation.
And then, carrying out threshold processing on the similarity matrix to filter unimportant weak association, setting an association threshold T, comparing the magnitude relation between each matrix element S (i, j) in the matrix S and the association threshold T, if S (i, j) > T, considering that the two intra-field vectors have strong association relation, constructing an association matrix A, juxtaposing an association value A (i, j) =1, if S (i, j) < T, considering that the two intra-field vectors are uncorrelated, setting the association value A (i, j) =0, and finally obtaining a 0/1 association matrix A which reflects the association degree between all intra-field vectors in the vector field, so that key vectors which represent remarkable abnormal signal fragments can be effectively determined by calculating the similarity of the intra-field vectors and setting the threshold to extract the intra-field vectors with strong association.
1503. And counting the number of other intra-field vectors with strong association relation in each intra-field vector and the vector field, and obtaining the association total number of each intra-field vector.
Specifically, the total number of associations C (i) between each intra-field vector v (i) in the vector field and all other intra-field vectors can be counted, the ith row of an association matrix a corresponding to the intra-field vector v (i) is traversed, a (i, j) =1 indicates that v (i) is associated with v (j), a (i, j) =0 indicates that v (i) is not associated, the association values a (i, j) of v (i) and all v (j) are accumulated, the total number of associations C (i) between the vector v (i) and other intra-field vectors in the vector field can be obtained, the total number of associations C (i) between each intra-field vector v (i) and all other intra-field vectors in the vector field can be obtained by repeating the calculation, the size of the total number of associations C (i) directly reflects the action degree and influence of the intra-field vector v (i) on the whole vector field, the more other vectors in the vector field are associated with one vector field, and the more dominant degree of association C (i) is more effective on the aspect that the vector is more dominant.
1504. And determining the first appointed number of intra-field vectors with larger association total number as key vectors.
Ordering the total number of correlations C (I) by using an argsort algorithm, obtaining an ordered sequence I of vector indexes after ordering, and selecting the first K elements of the sequence I to obtain indexes of K intra-field vectors with larger total number of correlations, wherein the K intra-field vectors are key vectors with the strongest effects in a vector field and the largest contribution to the expression of abnormal signal fragments. The designated number K of the key vectors needs to be carefully selected, some important vectors may be omitted when the K is too small, but some vectors which are not relevant enough may be introduced when the K is too large, and in practice, 10% to 20% of the total number of the orientation quantities can be used as the value of K, so that the Top-K key vectors which have the greatest influence on the characteristics representing the abnormal part can be automatically extracted from the vector field in a sequencing statistical mode, and the key vectors with high association degree reflect the main time-frequency components in the abnormal signal fragments.
160. And determining a local neighborhood space of each key vector in a vector field by taking a preset distance threshold as a radius and taking each key vector as a center, marking intra-field vectors which are mutually pointed with the key vector in the local neighborhood space as convergence vectors, and marking intra-field vectors which are not mutually pointed with the key vector in the local neighborhood space as divergence vectors.
Firstly, defining a local neighborhood space of each key vector, and drawing a hypersphere area in a vector field by taking the key vector as a central point and a preset distance threshold epsilon as a radius to obtain the local neighborhood space which can be used as an observation neighborhood range. And then analyzing and observing other vectors one by one in the local neighborhood space, determining each other in-field vector in the local neighborhood space as an observation vector one by one, and judging the direction relation of the observation vector relative to the key vector. The cosine value of the included angle between the two vectors can be calculated, and the key vector is v k The observation vector is v i The two-vector inner product is defined asRepresenting the product accumulation of the x and y components of the two vectors. The modular length of the two vectors is |v k I and |v i I, can be expressed as |v|=sqrt (v x 2y 2 ) And (5) calculating. The cosine value of the included angle of the two vectors cos theta is as follows:
Judging whether the two vectors point to each other according to the positive and negative of the cosine value: if cos theta>0, i.e. 0<θ<90 degrees v i Pointing v k Marking the observation vector as a convergence vector; if cos theta<0, i.e. 90<θ<180 degrees v i Away from v k The observation vector is marked as a divergent vector. Repeating the calculation discrimination can obtain a convergence vector group and a divergence vector group near the key vector. And traversing the local neighborhood space of all the key vectors, and finally counting all convergence vectors and divergence vectors in the whole vector field, wherein the convergence vectors and the divergence vectors are used as important intra-field vectors, so that the dynamic evolution process from aggregation to diffusion of the abnormal signal segments can be intuitively reflected.
170. The convergence interval is formed according to the convergence vector in the first minimum circumscribing circle of each key vector, and the divergence interval is formed according to the divergence vector in the second minimum circumscribing circle of each key vector.
For example, step 170 may include the following steps 1701 to 1702, not shown:
1701. and calculating Euclidean distances for all the convergence vectors in a pairwise combination manner, determining a first minimum circumscribing circle taking each key vector as a sphere center by taking the maximum Euclidean distance as a radius, and forming the convergence interval by the convergence vectors in the first minimum circumscribing circle of each key vector.
Specifically, first, the Euclidean distance is calculated for all the convergence vectors in the convergence vector set in pairs to determine the spatial relationship between the convergence vectors, and two convergence vectors are set as r respectively i =[x 1 ,y 1 ]、r j =[x 2 ,y 2 ]The euclidean distance between the two convergence vectors is then formulated as d=sqrt ((x) 1 -x 2 ) 2 +(y 1 -y 2 ) 2 ) And repeatedly calculating Euclidean distances d of the convergence vector pairwise combinations in the convergence vector set.
Then with each key vector r k The maximum Euclidean distance max (d) between two points in the convergence vector set is taken as the radius to draw a circle as the center of the sphere, and the convergence vector in the circle reaches the center of the sphere r k The distance of (d) is smaller than max (d), so that the circle is circumscribed by the convergence vector, and a first minimum circumscribed circle which takes the key vector as the center and contains all convergence vectors in the local area is formed, namely, a convergence interval near the key vector is determined.
1702. And calculating Euclidean distance for all the combinations of the divergent vectors, determining a second minimum circumscribing circle centering on each key vector by taking the maximum Euclidean distance as a radius, and forming the divergent vector of the second minimum circumscribing circle positioned on each key vector into a divergent interval.
In the same method, euclidean distances of all combinations of the divergent vectors in the divergent vector set can be calculated, a circle is drawn by taking the largest Euclidean distance as a radius, a second minimum circumcircle taking each key vector as a center is obtained, and then a divergent interval near each key vector is determined.
The convergence interval and the divergence interval reflect the aggregation and diffusion ranges of abnormal signal fragments, the convergence interval corresponds to the critical space of signal convergence, the divergence interval corresponds to the boundary of outward signal propagation, the convergence interval and the divergence interval together describe the dynamic evolution process of the abnormal signal fragments from aggregation to expansion, the influence range of abnormal activities can be estimated through the interval range, and important references are provided for accurately positioning the source region of the abnormal signal.
180. And extracting features according to the convergence interval and the divergence interval of all the key vectors to obtain an abnormal feature matrix corresponding to the original electroencephalogram signal.
For example, the step 180 may include the following steps 1801 to 1803, which are not illustrated:
1801. and merging the convergence intervals of all the key vectors to obtain a convergence interval set, and merging the divergence intervals of all the key vectors to obtain a divergence interval set.
Combining the convergence intervals of all the key vectors to obtain a convergence interval set R= { R reflecting the aggregation of abnormal signal fragments 1 ,r 2 ,...,r n Combining the divergent intervals of all key vectors to obtain a divergent interval set D= { D reflecting the diffusion of abnormal signal fragments 1 ,d 2 ,...,d m }, where vector ri= (xr) i ,yr i ) Represents the i-th convergence vector in the convergence interval set R, vector d j =(xd j ,yd j ) Represents the j-th divergent vector in the divergent interval set D, and the two types of interval vectors together reflect the key time-frequency information of the abnormal part.
1802. Constructing a matrix representation of the convergence interval set to obtain a convergence interval matrix, and constructing a matrix representation of the divergence interval set to obtain a divergence interval matrix.
The convergence section and the divergence section represent important characteristic information in the abnormal portion. To refine its main features, a matrix representation of the interval vector set is first constructed, i.e., a converging interval matrix rr= [ r 1 ,r 2 ,...,r n ]Wherein each column is a convergence vector within a set of convergence intervals R; divergence interval matrix rd= [ d ] 1 ,d 2 ,...,d m ]Each column is a divergence vector within a set D of divergence intervals.
1803. And inputting the convergent interval matrix and the divergent interval matrix into a maximum pooling layer, and extracting to obtain an abnormal characteristic matrix corresponding to the original electroencephalogram signal.
Then, the two matrices RR and RD are input to the maximum pooling layer for downsampling and concentration, and the main features are extracted. The maximum pooling operation is in the perception domain V k Internally selecting as output a maximum value, where V k A local region representing a pooled core, typically consisting of several adjacent vector points. For example, suppose the kth pooling core V k Comprising 4 adjacent vectors r i ,r j ,r x ,r y R is then k ' = max{r i ,r j ,r x ,r y }. I.e. the max pooling layer outputs the maximum value r in the vector in this region k ' this allows down-sampling of the interval vector while preserving the most significant features within the region.
Repeating the pooling calculation, extracting main features in RR and RD, and generating a compressed interval vector set RR 'and RD'. Finally, splicing the compression interval features, and constructing a new feature expression, namely an abnormal feature matrix RF=concat (RR ', RD'), as a simplified feature expression of the abnormal signal segment. For example: RR' = [ r 1 ',r 2 ',r 3 '](3 eigenvectors), RD' = [ d 1 ',d 2 '](2 feature vectors), then: rf=concat (RR ', RD')= [ r 1 ',r 2 ',r 3 ',d 1 ',d 2 ']. The main features can be extracted from the complex interval vectors through the downsampling and concentration of the maximum pooling layer, fewer vector points are used, key information is reserved, and the extraction and compression of the time-frequency features of the abnormal part are realized.
It should be noted that, considering that the abnormal signal is a dynamic generation and evolution process, a convergence interval and a divergence interval are constructed, and feature extraction is performed separately, and the two represent different stages in the abnormal signal segment evolution process based on the following considerations, the convergence interval corresponds to signal aggregation, the divergence interval corresponds to signal expansion, and the distinction can make feature learning more targeted. Secondly, the range of the collecting and scattering interval and the vector distribution are also different to a certain extent, and the pooling layer can learn the specific characteristics of the abnormal signals more intensively by independent processing. Thirdly, the features are extracted from the two-stage intervals, so that the subsequent construction of detection and identification models is facilitated, for example, early warning of abnormal initiation is judged based on the features of the convergence interval; while the divergent characteristics can be used to evaluate the anomaly sweep and the range of influence. Fourth, the difference between the two types of intervals in terms of vector structure, key point distribution and the like can be conveniently compared by separate processing, and the rule of abnormal formation and evolution can be evaluated. Fifthly, finally, the two are connected and integrated, so that the panoramic feature extraction of the whole abnormal process can be obtained.
190. Taking the original electroencephalogram signals and the abnormal feature matrix corresponding to the original electroencephalogram signals as input, taking denoising signals corresponding to the original electroencephalogram signals as labels, and training the deep learning neural network to obtain a denoising model.
110-180, extracting abnormal feature matrixes RF corresponding to original electroencephalogram signals of a plurality of test objects, wherein each abnormal feature matrix is organized into a multi-row vector structure representing feature sequences according to time axes; traversing the original electroencephalogram signals X and the corresponding abnormal characteristic matrixes RF of each test object, and respectively merging and splicing the original electroencephalogram signals X and the abnormal characteristic matrixes RF of each test object together, namely embedding the matrixes RF into an original electroencephalogram sample space to form an integrated joint matrix for processing. The uniformly constructed large-scale joint matrix is used as the integral input of the deep learning neural network end-to-end.
In the embodiment of the invention, a framework for setting a deep learning neural network is as follows: firstly, the set size of an input layer is matched with the joint matrix constructed before, three groups of two-dimensional convolution kernels with different sizes can be configured to slide in the two axial directions of a time domain and a frequency domain, the sensing range is expanded in stages, and the time-frequency characteristics of low-level to high-level layers are extracted. For example, the first set of convolution kernels is sized 3×3, primarily identifying local short-term effects; the second set of convolution kernels is sized 5 x 5 for capturing relatively smooth low frequency rhythmic components; the third group of convolution kernels is 11×11, which can cover longer time domain relations, and the three groups of kernels cooperate with characteristic modes in the multi-scale learning joint matrix. And carrying out sliding window sampling on the joint matrix on time and frequency domains through each convolution kernel with different sizes, and obtaining a two-dimensional feature map which is expressed as H (i, j, k), wherein i, j corresponds to time and frequency domain index coordinates of the feature map, and k represents a kth convolution kernel. Then, a Batch Normalization (BN) layer is accessed to perform feature regularization, the BN layer performs data normalization according to channels independently, a normalized feature hat { H (i, j, k) } is obtained by dividing a mean value of each two-dimensional feature graph H (i, j, k) by a standard deviation, a learnable proportion parameter and an offset are added to map to obtain BN feature output BN (H (i, j, k)), so that adjustment of an input data distribution range is realized, BN statistical parameters are optimized continuously and iteratively, feature distribution is stable, and network calculation overflow caused by excessive offset is avoided. And finally realizing the final regression mapping through a full-connection layer, namely converting from a feature space to an original signal space, wherein the full-connection layer parameter matrix can be expressed as W, and the bias is b, and then the denoising signal of the output layer is hat { Y } = f (W.BN (H (i, j, k)) +b), the activation function f realizes nonlinear transformation, and the predicted denoising processing result is output.
After the deep learning neural network structure is built, a joint matrix of the original brain electrical signals prepared before and the corresponding abnormal feature matrix is used as sample input, corresponding denoising signals are configured as labels, a training sample set is built, mean square error is defined as a loss function, deviation degree of a denoising processing result of network prediction output and the labels is reflected, parameters such as a convolution kernel, a full connection layer and the like in the deep learning neural network are iteratively updated according to the loss function by adopting a gradient descent algorithm, the network gradually and internally grasps distinguishing boundaries of abnormal feature modes and real components through learning of corresponding relations between a large number of noisy original brain electrical signals and the corresponding denoising signals, interference of the abnormal components on the output result is automatically reduced in the test process, and effective denoising signal prediction on the noisy input is realized.
In summary, by implementing the embodiment of the invention, the characteristics of the electroencephalogram signals are comprehensively analyzed from multiple angles such as vector expression, key vector extraction and the like by constructing the vector field analysis framework, so that the time domain evolution and the frequency domain change of the abnormal electroencephalogram signals can be reflected more intuitively and stereoscopically, the inherent mechanism of the signals is revealed deeply, and the end-to-end deep learning framework is constructed to realize denoising and restoration of the electroencephalogram signals.
In addition, the invention provides the concepts of a convergence interval and a divergence interval, and describes the dynamic process from the aggregation to the expansion of abnormal electroencephalogram, so that the brand-new view angle can accurately position the starting and the ending of the abnormality, quantitatively evaluate the area range of the abnormal wave, and further analyze the electroencephalogram mechanism. In addition, the interval vector feature extraction and compression scheme provided by the embodiment of the invention can effectively simplify complex interval vectors and reduce the dimension from hundreds to tens through the downsampling operation of the maximum pooling layer, so that the main time-frequency features are concentrated, the subsequent processing burden is reduced, and the weak feature learning is more efficient.
The embodiment of the invention also discloses an electroencephalogram signal denoising method, which applies the denoising model obtained by training, and comprises the following steps 191-199 which are not shown in the figures:
191. and collecting the brain electrical signals to be processed.
192. And extracting the characteristics of the electroencephalogram signal to be processed to obtain a target characteristic vector.
193. And comparing the target feature vector with the normal electroencephalogram features, and identifying to obtain a target abnormal signal segment in the electroencephalogram signals to be processed.
194. And constructing a target vector field of the target abnormal signal segment.
195. A plurality of target key vectors are determined from all intra-field vectors included in the target vector field.
196. And determining a target local neighborhood space of each target key vector in a vector field by taking a preset distance threshold as a radius and taking each target key vector as a center, marking in-field vectors which are mutually pointed by the target key vector in the target local neighborhood space as target convergence vectors, and marking in-field vectors which are not mutually pointed by the target key vector in the target local neighborhood space as target divergence vectors.
197. And forming a target convergence interval according to the target convergence vector positioned in the first minimum circumscribing circle of each target key vector, and forming a target divergence interval according to the target divergence vector positioned in the second minimum circumscribing circle of each target key vector.
198. And extracting features according to the target convergence interval and the target divergence interval of all the target key vectors to obtain a target abnormal feature matrix corresponding to the electroencephalogram signals to be processed.
199. And inputting the electroencephalogram signals to be processed and the corresponding target abnormal feature matrixes thereof into a denoising model, and obtaining target denoising signals according to the output of the denoising model.
In practical applications, steps 191 to 198 refer to the detailed descriptions of steps 110 to 180, and the present invention is not described herein. In step 199, the to-be-processed electroencephalogram signal is directly input into the trained denoising model without acquiring a label, so that effective denoising can be realized.
As shown in fig. 2, the embodiment of the invention discloses a training device for an electroencephalogram signal denoising model, which comprises an acquisition unit 201, a first extraction unit 202, an identification unit 203, a construction unit 204, a first determination unit 205, a second determination unit 206, a third determination unit 207, a second extraction unit 208 and a training unit 209, wherein,
an acquisition unit 201, configured to acquire an original electroencephalogram signal including noise;
a first extraction unit 202, configured to perform feature extraction on an original electroencephalogram signal to obtain an original feature vector;
the identifying unit 203 is configured to compare the original feature vector with a normal electroencephalogram feature, and identify an abnormal signal segment in the original electroencephalogram signal;
a construction unit 204 for constructing a vector field of abnormal signal segments;
a first determining unit 205, configured to determine a plurality of key vectors from all intra-field vectors included in the vector field;
a second determining unit 206, configured to determine, in the vector field, a local neighborhood space of each key vector with a preset distance threshold as a radius and with each key vector as a center, mark intra-field vectors in the local neighborhood space that are mutually directed with the key vector as convergence vectors, and mark intra-field vectors in the local neighborhood space that are not mutually directed with the key vector as divergence vectors;
A third determining unit 207, configured to form a convergence interval according to the convergence vector located in the first minimum circumscribing circle of each key vector, and form a divergence interval according to the divergence vector located in the second minimum circumscribing circle of each key vector;
the second extraction unit 208 is configured to perform feature extraction according to the convergence interval and the divergence interval of all the key vectors, so as to obtain an abnormal feature matrix corresponding to the original electroencephalogram signal;
the training unit 209 is configured to train the deep learning neural network to obtain a denoising model by taking the original electroencephalogram signal and the abnormal feature matrix corresponding to the original electroencephalogram signal as input and the denoising signal corresponding to the original electroencephalogram signal as a label.
As an optional implementation manner, the training device of the electroencephalogram denoising model further includes a normal sample obtaining unit, not shown, for obtaining a plurality of electroencephalogram samples of a normal person, and extracting a feature vector sample of each electroencephalogram sample; and calculating a normal mean value vector and a covariance matrix according to the feature vector samples of the electroencephalogram signal samples, and obtaining normal electroencephalogram features according to the normal mean value vector and the covariance matrix.
The above-described identification unit 203 includes, for example, the following sub-units not shown:
The dividing subunit is used for dividing the original feature vector into a plurality of segments to be detected;
the calculating subunit is used for calculating the mahalanobis distance between each fragment to be detected and the normal electroencephalogram characteristics;
and the judging subunit is used for judging the fragment to be detected as an abnormal signal fragment when the mahalanobis distance of the fragment to be detected is greater than a set distance threshold value.
Illustratively, the constructing unit 204 is specifically configured to take a plurality of spaced sampling points for the abnormal signal segment, calculate a time domain gradient of each sampling point, and calculate a frequency domain gradient of each sampling point; taking the time domain gradient and the frequency domain gradient as two components, and constructing a gradient vector of each sampling point; calculating the vector direction of the gradient vector of each sampling point according to the time domain gradient and the frequency domain gradient; constructing an intra-field vector of each sampling point according to the gradient vector and the vector direction of each sampling point; and constructing a vector field of the abnormal signal segment according to the intra-field vectors of all the sampling points.
The first determining unit 205 is specifically configured to calculate a numerical similarity between two-by-two combinations of vectors in all the vector fields; determining two in-field vectors with the numerical similarity larger than the association threshold value as a strong association relationship; counting the number of other intra-field vectors with strong association relation in each intra-field vector and the vector field to obtain the association total number of each intra-field vector; and determining the first appointed number of intra-field vectors with larger association total number as key vectors.
The third determining unit 207 is specifically configured to calculate euclidean distances for all combinations of the convergence vectors, determine a first minimum circumcircle with each key vector as a center of sphere by using the largest euclidean distance as a radius, and form the convergence interval from the convergence vectors located in the first minimum circumcircle of each key vector; and calculating Euclidean distances for all the divergent vectors in a pairwise combination mode, determining a second minimum circumscribing circle taking each key vector as a center by taking the maximum Euclidean distance as a radius, and forming the divergent vectors of the second minimum circumscribing circle positioned on each key vector into a divergent interval.
The second extracting unit 208 is specifically configured to combine the convergence intervals of all the key vectors to obtain a convergence interval set, and combine the divergence intervals of all the key vectors to obtain a divergence interval set; constructing a matrix representation of a convergence interval set to obtain a convergence interval matrix, and constructing a matrix representation of a divergence interval set to obtain a divergence interval matrix; and inputting the convergent interval matrix and the divergent interval matrix into a maximum pooling layer, and extracting to obtain an abnormal characteristic matrix corresponding to the original electroencephalogram signal.
As shown in fig. 3, an embodiment of the present invention discloses an electronic device comprising a memory 301 storing executable program code and a processor 302 coupled to the memory 301;
the processor 302 invokes the executable program code stored in the memory 301 to execute the training method of the electroencephalogram signal denoising model described in the above embodiments.
The embodiment of the invention also discloses a computer readable storage medium storing a computer program, wherein the computer program causes a computer to execute the training method of the electroencephalogram signal denoising model described in the above embodiments.
The foregoing embodiments are provided for the purpose of exemplary reproduction and deduction of the technical solution of the present invention, and are used for fully describing the technical solution, the purpose and the effects of the present invention, and are used for enabling the public to understand the disclosure of the present invention more thoroughly and comprehensively, and are not used for limiting the protection scope of the present invention.
The above examples are also not an exhaustive list based on the invention, and there may be a number of other embodiments not listed. Any substitutions and modifications made without departing from the spirit of the invention are within the scope of the invention.

Claims (10)

1. The training method of the brain electrical signal denoising model is characterized by comprising the following steps of:
collecting an original electroencephalogram signal containing noise;
extracting the characteristics of the original electroencephalogram signals to obtain original characteristic vectors;
comparing the original feature vector with normal electroencephalogram features, and identifying to obtain an abnormal signal segment in the original electroencephalogram signals;
constructing a vector field of the abnormal signal segment; determining a plurality of key vectors from all intra-field vectors included in the vector field;
taking a preset distance threshold as a radius, taking each key vector as a center, determining a local neighborhood space of each key vector in the vector field, marking intra-field vectors which are mutually pointed with the key vectors in the local neighborhood space as convergence vectors, and marking intra-field vectors which are not mutually pointed with the key vectors in the local neighborhood space as divergence vectors;
forming a convergence interval according to a convergence vector positioned in a first minimum circumscribing circle of each key vector, and forming a divergence interval according to a divergence vector positioned in a second minimum circumscribing circle of each key vector;
extracting features according to the convergence interval and the divergence interval of all the key vectors to obtain an abnormal feature matrix corresponding to the original electroencephalogram signals;
And training the deep learning neural network by taking the original electroencephalogram signals and the abnormal feature matrix corresponding to the original electroencephalogram signals as input and taking denoising signals corresponding to the original electroencephalogram signals as labels to obtain a denoising model.
2. The method for training an electroencephalogram denoising model according to claim 1, wherein the method further comprises, before comparing the original feature vector with a normal electroencephalogram feature and identifying an abnormal signal segment in the original electroencephalogram signal:
acquiring a plurality of electroencephalogram signal samples of a normal person, and extracting a feature vector sample of each electroencephalogram signal sample;
and calculating a normal mean value vector and a covariance matrix according to the feature vector samples of the electroencephalogram signal samples, and obtaining normal electroencephalogram features according to the normal mean value vector and the covariance matrix.
3. The method for training an electroencephalogram denoising model according to claim 1, wherein comparing the original feature vector with normal electroencephalogram features, and identifying abnormal signal segments in the original electroencephalogram signals comprises:
dividing the original feature vector into a plurality of segments to be detected;
calculating the mahalanobis distance between each fragment to be detected and the normal electroencephalogram characteristics;
And if the mahalanobis distance of the fragment to be detected is greater than the set distance threshold, judging that the fragment to be detected is an abnormal signal fragment.
4. The training method of an electroencephalogram denoising model according to claim 1, wherein constructing a vector field of the abnormal signal segment comprises:
sampling points at intervals are taken for the abnormal signal segments, the time domain gradient of each sampling point is calculated, and the frequency domain gradient of each sampling point is calculated;
taking the time domain gradient and the frequency domain gradient as two components to construct a gradient vector of each sampling point;
calculating the vector direction of the gradient vector of each sampling point according to the time domain gradient and the frequency domain gradient;
constructing an in-field vector of each sampling point according to the gradient vector and the vector direction of each sampling point;
and constructing a vector field of the abnormal signal segment according to the intra-field vectors of all the sampling points.
5. The method for training an electroencephalogram denoising model according to any one of claims 1 to 4, wherein determining a plurality of key vectors from all intra-field vectors included in the vector field comprises:
calculating the numerical similarity between every two combinations of vectors in all the vector fields;
Determining the two in-field vectors with the numerical similarity larger than the association threshold value as a strong association relationship;
counting the number of other intra-field vectors with strong association relation in each intra-field vector and vector field, and obtaining the association total number of each intra-field vector;
and determining the first appointed number of intra-field vectors with larger association total number as key vectors.
6. The method for training an electroencephalogram denoising model according to any one of claims 1 to 4, wherein forming a convergence interval from a convergence vector located within a first minimum circumcircle of each of the key vectors and forming a divergence interval from a divergence vector located within a second minimum circumcircle of each of the key vectors, comprises:
calculating Euclidean distances for all the convergence vectors in a pairwise combination mode, determining a first minimum circumscribing circle taking each key vector as a sphere center by taking the maximum Euclidean distance as a radius, and forming the convergence interval by the convergence vectors in the first minimum circumscribing circle of each key vector;
and calculating Euclidean distance for all the combinations of the divergent vectors, determining a second minimum circumscribing circle taking each key vector as a center by taking the maximum Euclidean distance as a radius, and forming the divergent interval by the divergent vector of the second minimum circumscribing circle of each key vector.
7. An electroencephalogram denoising method applying the denoising model according to any one of claims 1 to 6, characterized in that the denoising method comprises:
collecting an electroencephalogram signal to be processed;
extracting the characteristics of the electroencephalogram signals to be processed to obtain target characteristic vectors;
comparing the target feature vector with normal electroencephalogram features, and identifying to obtain a target abnormal signal segment in the electroencephalogram signals to be processed;
constructing a target vector field of the target abnormal signal segment;
determining a plurality of target key vectors from all intra-field vectors included in the target vector field;
taking a preset distance threshold as a radius, taking each target key vector as a center, determining a target local neighborhood space of each target key vector in the target vector field, marking in-field vectors which are mutually pointed with the target key vectors in the target local neighborhood space as target convergence vectors, and marking in-field vectors which are not mutually pointed with the target key vectors in the target local neighborhood space as target divergence vectors;
forming a target convergence interval according to target convergence vectors positioned in a first minimum circumscribing circle of each target key vector, and forming a target divergence interval according to target divergence vectors positioned in a second minimum circumscribing circle of each target key vector;
Extracting features according to target convergence intervals and target divergence intervals of all the target key vectors to obtain a target abnormal feature matrix corresponding to the electroencephalogram signals to be processed;
and inputting the electroencephalogram signals to be processed and the corresponding target abnormal feature matrixes thereof into the denoising model, and obtaining target denoising signals according to the output of the denoising model.
8. The utility model provides a training device of brain electrical signal denoising model which characterized in that includes:
the acquisition unit is used for acquiring original electroencephalogram signals containing noise;
the first extraction unit is used for carrying out feature extraction on the original electroencephalogram signals to obtain original feature vectors;
the identification unit is used for comparing the original feature vector with normal electroencephalogram features and identifying to obtain an abnormal signal segment in the original electroencephalogram signals;
a construction unit for constructing a vector field of the abnormal signal segment;
a first determining unit, configured to determine a plurality of key vectors from all intra-field vectors included in the vector field;
the second determining unit is used for determining a local neighborhood space of each key vector in the vector field by taking a preset distance threshold value as a radius and taking each key vector as a center, marking intra-field vectors which are mutually pointed with the key vectors in the local neighborhood space as convergence vectors, and marking intra-field vectors which are not mutually pointed with the key vectors in the local neighborhood space as divergence vectors;
The third determining unit is used for forming a convergence interval according to the convergence vector positioned in the first minimum circumscribing circle of each key vector, and forming a divergence interval according to the divergence vector positioned in the second minimum circumscribing circle of each key vector;
the second extraction unit is used for extracting features according to the convergence interval and the divergence interval of all the key vectors to obtain an abnormal feature matrix corresponding to the original electroencephalogram signals;
the training unit is used for training the deep learning neural network to obtain a denoising model by taking the original electroencephalogram signal and the abnormal feature matrix corresponding to the original electroencephalogram signal as input and taking the denoising signal corresponding to the original electroencephalogram signal as a label.
9. An electronic device comprising a memory storing executable program code and a processor coupled to the memory; the processor invokes the executable program code stored in the memory for performing the training method of the brain electrical signal denoising model according to any one of claims 1 to 6.
10. A computer-readable storage medium storing a computer program, wherein the computer program causes a computer to execute the training method of the electroencephalogram signal denoising model according to any one of claims 1 to 6.
CN202410116135.8A 2024-01-29 2024-01-29 Training and application method, device, equipment and medium of electroencephalogram signal denoising model Active CN117648538B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410116135.8A CN117648538B (en) 2024-01-29 2024-01-29 Training and application method, device, equipment and medium of electroencephalogram signal denoising model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410116135.8A CN117648538B (en) 2024-01-29 2024-01-29 Training and application method, device, equipment and medium of electroencephalogram signal denoising model

Publications (2)

Publication Number Publication Date
CN117648538A true CN117648538A (en) 2024-03-05
CN117648538B CN117648538B (en) 2024-03-29

Family

ID=90045415

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410116135.8A Active CN117648538B (en) 2024-01-29 2024-01-29 Training and application method, device, equipment and medium of electroencephalogram signal denoising model

Country Status (1)

Country Link
CN (1) CN117648538B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100042011A1 (en) * 2005-05-16 2010-02-18 Doidge Mark S Three-dimensional localization, display, recording, and analysis of electrical activity in the cerebral cortex
US20150230721A1 (en) * 2012-07-26 2015-08-20 Yenn-Jiang Lin Accurately indetifying critcal regions in atrial fibrillation by identifying rotors in directional similarity vector field
CN108550147A (en) * 2018-04-13 2018-09-18 华中科技大学苏州脑空间信息研究院 Full cranial nerve beam projected path method for automatic tracking and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100042011A1 (en) * 2005-05-16 2010-02-18 Doidge Mark S Three-dimensional localization, display, recording, and analysis of electrical activity in the cerebral cortex
US20150230721A1 (en) * 2012-07-26 2015-08-20 Yenn-Jiang Lin Accurately indetifying critcal regions in atrial fibrillation by identifying rotors in directional similarity vector field
CN108550147A (en) * 2018-04-13 2018-09-18 华中科技大学苏州脑空间信息研究院 Full cranial nerve beam projected path method for automatic tracking and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
田晓东等: "基于改进梯度向量流形变模型的动目标检测方法", 《测试技术学报》, no. 06, 30 December 2006 (2006-12-30) *

Also Published As

Publication number Publication date
CN117648538B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
CN111657935B (en) Epilepsia electroencephalogram recognition system based on hierarchical graph convolutional neural network, terminal and storage medium
Dodia et al. An efficient EEG based deceit identification test using wavelet packet transform and linear discriminant analysis
Shoaib et al. Signal processing with direct computations on compressively sensed data
CN111310570B (en) Electroencephalogram signal emotion recognition method and system based on VMD and WPD
CN114533086B (en) Motor imagery brain electrolysis code method based on airspace characteristic time-frequency transformation
Tripathi et al. Multilevel classification and detection of cardiac arrhythmias with high-resolution superlet transform and deep convolution neural network
Mustafa et al. The analysis of eeg spectrogram image for brainwave balancing application using ann
Ahmadi et al. Brain-computer interface signal processing algorithms: A computational cost vs. accuracy analysis for wearable computers
CN113010013A (en) Wasserstein distance-based motor imagery electroencephalogram migration learning method
Sahu et al. An efficient method for detection and localization of myocardial infarction
CN115349861A (en) Mental stress detection system and method based on single-channel electroencephalogram signal
Allam et al. A deformable CNN architecture for predicting clinical acceptability of ECG signal
CN113317804B (en) Rehabilitation efficiency prediction method, training device and computer equipment
CN114403897A (en) Human body fatigue detection method and system based on electroencephalogram signals
CN117648538B (en) Training and application method, device, equipment and medium of electroencephalogram signal denoising model
CN111931578B (en) Electroencephalogram identification method based on minimum spanning tree and regional double-layer network
Gupta et al. Atrial fibrillation detection using electrocardiogram signal input to LMD and ensemble classifier
Tian et al. Latency estimation of auditory brainstem response by neural networks
Wang et al. MS-MLP: Multi-scale sampling MLP for ECG classification
CN114521900B (en) Arrhythmia classification and identification method based on transfer learning
Antunes et al. A morphology-based feature set for automated Amyotrophic Lateral Sclerosis diagnosis on surface electromyography
CN114818822A (en) Electroencephalogram migration emotion recognition method combining semi-supervised regression and icon label propagation
CN111601539A (en) Method for automatically diagnosing disease of subject and system for implementing method
Sartipi et al. Subject-independent deep architecture for EEG-based motor imagery classification
Naik et al. SEMG for identifying hand gestures using ICA

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