CN113907770B - Ratchet composite wave detection and identification method and system based on feature fusion - Google Patents

Ratchet composite wave detection and identification method and system based on feature fusion Download PDF

Info

Publication number
CN113907770B
CN113907770B CN202111225879.6A CN202111225879A CN113907770B CN 113907770 B CN113907770 B CN 113907770B CN 202111225879 A CN202111225879 A CN 202111225879A CN 113907770 B CN113907770 B CN 113907770B
Authority
CN
China
Prior art keywords
wave
slow
spike
waveform
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
CN202111225879.6A
Other languages
Chinese (zh)
Other versions
CN113907770A (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.)
CETC 38 Research Institute
Original Assignee
CETC 38 Research Institute
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 CETC 38 Research Institute filed Critical CETC 38 Research Institute
Priority to CN202111225879.6A priority Critical patent/CN113907770B/en
Publication of CN113907770A publication Critical patent/CN113907770A/en
Application granted granted Critical
Publication of CN113907770B publication Critical patent/CN113907770B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/24Detecting, measuring or recording bioelectric or biomagnetic signals of the body or parts thereof
    • A61B5/316Modalities, i.e. specific diagnostic methods
    • A61B5/369Electroencephalography [EEG]
    • A61B5/372Analysis of electroencephalograms
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7203Signal processing specially adapted for physiological signals or for diagnostic purposes for noise prevention, reduction or removal
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7225Details of analog processing, e.g. isolation amplifier, gain or sensitivity adjustment, filtering, baseline or drift compensation
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/72Signal processing specially adapted for physiological signals or for diagnostic purposes
    • A61B5/7235Details of waveform analysis
    • A61B5/7264Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides a characteristic fusion-based ratchet composite wave detection and identification method, which comprises the following steps of 1, extracting time-frequency domain characteristics according to sample data of a marked ratchet composite wave database and a normal brain wave database, estimating distance characteristics by using the ratchet composite wave database, the normal brain wave database and a ratchet composite wave template database, establishing a ratchet composite wave characteristic database and a normal waveform characteristic database through the characteristics, and further training a classification model; step 2, estimating the distance between the effective unknown type brain wave data and the spike and slow composite wave template data by using a DTW algorithm; and step 3, extracting time-frequency domain features of the brain wave data of the unknown type, fusing the time-frequency domain features with the distance features as typical features, sending the typical features into a classifier, and outputting a result of classifying the brain wave types. In addition, the accuracy and the robustness of the recognition algorithm can be greatly improved by carrying out normalization processing on input brain wave data of unknown type and detecting the effective waveform end points based on short-time energy and structural characteristics of the spike-slow composite wave.

Description

Ratchet composite wave detection and identification method and system based on feature fusion
Technical Field
The invention relates to the technical field of intelligent medical treatment, in particular to a ratchet-slow composite wave detection and identification method and system based on feature fusion.
Background
Clinically, brain wave examination is to record the electrical activity of the brain of a subject through scalp electrodes, and to determine whether or not there is an abnormal discharge phenomenon in the brain of the subject by observing brain wave waveforms. The brain wave examination is used as an important basis for doctors to determine the disease classification of epileptic patients and adjust the treatment scheme, and the detection result has great clinical significance. The doctor determines whether the epileptic seizure potential exists by observing whether abnormal discharge waveforms appear on brain waves of a checked person in the checking time, the spike-slow composite wave is one of the most main abnormal brain wave waveforms of the epileptic patient, the abnormal discharge mechanism of the brain bioelectricity signals of the epileptic patient leads to the waveform structural characteristics of the spike-slow composite wave, the main waveform structural characteristics are that a spike wave of about 20 milliseconds is followed by a slow wave of 200 milliseconds to 500 milliseconds (at most 300 ms), the occurrence of the spike-slow composite wave is an important basis for diagnosing the epileptic of the patient, the conventional brain wave checking is usually about one hour, and under the condition of heavy illness, twenty four hours of brain wave monitoring is usually needed, and the doctor needs to read brain wave data frame by frame in the checking time to observe whether the spike-slow composite wave exists in the brain wave data. In the artificial intelligence era, how to use AI technology to energize the current brain wave interpretation, intelligent automation discerns abnormal waveforms such as ratchet complex, makes doctor's more efficient work, is the pain point of modern medical technology development, also is the problem that needs to solve.
Disclosure of Invention
The invention aims to provide an intelligent automatic identification device for abnormal waveforms such as spike and slow compound waves and the like so as to improve the working efficiency of doctors.
The invention solves the technical problems by the following technical means:
the spike-slow composite wave detection and identification method based on feature fusion comprises the following steps:
step 1, training a classification model, namely establishing a ratchet-slow composite wave database and a normal brain wave shape database by a manual labeling method, extracting time-frequency domain characteristics of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and carrying out dynamic time warping algorithm (DTW, dynamic Time Warping) on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library to estimate distance characteristics, thereby establishing a ratchet-slow composite wave characteristic library and a normal waveform characteristic library, and carrying out classification model training by using the ratchet-slow composite wave characteristic library and the normal wave characteristic library;
step 2, extracting distance features estimated based on a DWT algorithm, and firstly normalizing input brain waves and extracting time-frequency domain features; carrying out effective waveform end point detection (EWED, effective waveform endpoint detection) on the normalized brain wave data, and finally estimating the distance between the clutter-removed effective brain wave data and the spike-slow composite wave template by using a DWT algorithm;
And step 3, fusing the extracted time-frequency domain features and the distance features into feature vectors serving as input features, sending the feature vectors into an off-line trained classification model, and outputting classification results.
And estimating the distance characteristic of the input brain wave and the ratchet composite wave template based on the DTW algorithm by utilizing the time-frequency domain characteristic of the brain wave data, performing characteristic fusion by taking the distance characteristic as a typical characteristic, sending the characteristic fusion into an off-line trained separator, and finally outputting the judged recognition result. In addition, the accuracy and the robustness of the recognition algorithm can be improved by carrying out normalization processing on the input brain wave data and detecting the effective waveform end points based on the short-time energy and the structural characteristics of the spike-slow composite wave. The invention realizes the automatic detection and identification of the spike-slow composite wave and improves the working efficiency of doctors.
Further, the standard feature library establishment method in the step 1 is as follows: selecting a certain amount of typical ratchet composite waves from the ratchet composite wave database as a ratchet composite wave template library;
let XY be the total brain wave data set composed of a normal brain wave database and a ratchet composite wave database, X be the normal brain wave database, and X i One of the samples is n normal brain wave samples; y is a spike and slow complex database, Y i For one of the samples, there are m spike and slow complex data; z is a typical template library of spike and slow compound waves, Z i For one of the samples, there are k typical spike-slow complex samples;
X={x 1 ,x 2 …x n }
Y={y 1 ,y 2 …y m }
Z={z 1 ,z 2 …z k }
for each sample data of the normal brain wave database and the spike-slow composite wave database, carrying out Fourier transformation and numerical statistics of time domain to obtain time-frequency domain characteristic variance and low-frequency energy ratio, so that X is obtained fea1 ,X fea2 For the time-frequency domain characteristics extracted from normal brain wave data, let Y fea1 ,Y fea2 Time-frequency domain features extracted from the spike-slow composite wave database; secondly, performing DTW calculation on each sample data of the brain wave database and the ratchet compound wave database and the data of the ratchet compound wave typical template library, performing DTW calculation on a single sample and the data set of the ratchet compound wave typical template library, and taking the minimum distance degree, thereby obtaining a distance degree characteristic X fea3 、Y fea3
Figure BDA0003314298350000031
Figure BDA0003314298350000032
Thus far, the feature X extracted from the normal brain wave data is obtained fea1 、X fea2 、X fea3 And features Y extracted from the spike-slow complex database fea1 、Y fea2 、Y fea3 The method comprises the steps of carrying out a first treatment on the surface of the When the characteristics are fused, in order to eliminate the dimension influence, the original characteristic distribution is reserved to the maximum extent, and the following three types of characteristics are processed:
Figure BDA0003314298350000033
Figure BDA0003314298350000034
Figure BDA0003314298350000035
is XY fea1 Mean value of->
Figure BDA0003314298350000036
Is XY fea1 Variance of (X ') can be obtained by the same method' fea2 、X' fea3 、Y f ' ea1 、Y f ' ea2 、Y′ fea3 ;/>
Figure BDA0003314298350000037
Figure BDA0003314298350000038
Figure BDA0003314298350000039
Figure BDA00033142983500000310
In order to keep the feature distribution of the on-line recognition input waveform consistent with the off-line modeling feature, the mean and variance of the off-line recognition extraction feature are recorded and respectively recorded as
Figure BDA00033142983500000311
The characteristic X 'of the normal brain wave database is obtained' fea1 、X' fea2 、X' fea3 The three types of features are fused into a feature vector matrix Fea x =[X' fea1 X' fea2 X' fea3 ],Fea x The element of each row is a fused vector; and similarly, obtaining the eigenvector matrix Fea of the ratchet-slow composite wave database y =[Y′ fea1 Y′ fea2 Y′ fea3 ];
From Fea x And Fea y The normal brain wave feature library and the spike and slow compound wave feature library are formed, and the two feature libraries are sent to an SVM trainer, so that a classification model trained under an offline condition can be obtained.
Further, the normalization processing formula in the step 2 is as follows
Figure BDA0003314298350000041
Wherein: max (X) is the maximum value of an X sequence, min (X) is the minimum value of the X sequence, X is an electroencephalogram acquisition sequence of n points, and X n Representing the value of the nth sample point.
Further, the effective waveform endpoint detection method in the step 2 specifically includes:
firstly, the EWED is utilized to effectively solve the influence of a DTW algorithm caused by brain electric data clutter, and the energy calculation formula is as follows:
Figure BDA0003314298350000042
setting a higher energyQuantity threshold T, where D 1 For the first of the X sequences greater than the energy threshold T w Is then found from D 1 Start first less than the energy threshold T w Is denoted as D 2 Point, then from D 2 Begin to find the first one greater than the energy threshold T w Is denoted as D 3 By doing so, a set of endpoints is obtained,
D={D 1 ,D 2 …D n }。
The spike-slow composite wave is a composite wave composed of a spike wave and a slow wave, and the slow wave follows the spike wave strictly according to the spike wave, based on the rule described above, a standard spike-slow composite wave may have the following criteria:
rule 1: at least 4 endpoints are provided, namely a starting endpoint and an ending endpoint of the spike wave, and a starting endpoint and an ending endpoint of the slow wave, and if the starting endpoint and the ending endpoint are lower than the 4 endpoints, the normalized data are integrally used as effective data to carry out distance estimation with templates of a spike-slow composite wave template library;
rule 2: the time distance between the starting end point and the ending end point of the slow wave is longer than that of the spike wave, the time length of the slow wave is theoretically not lower than 100ms, and if the time length of the slow wave is lower than 100ms, the normalized data is used as effective data to carry out distance estimation with a template of a spike-slow composite wave template library;
based on the end point searching method and the rules, the matched end point pair set D is found out from the end point set D set And a length set L between each paired endpoint;
D set ={[D 1_start ,D 1_end ],[D 2_start ,D 2_end ]…[D n_start ,D n_end ]}
L={L 1 ,L 2 ,…L n }
let L be i When =max (L) is the maximum length, the i-th pairing endpoint d= [ D i_start ,D i_end ]The waveform formed is a slow wave which may exist, according to [ D ] i_start ,D i_end ]Calculating slow wave time, theoretically considering that the slow wave time is not lower than 100ms, combining with an energy threshold T w Setting a slow wave timeThreshold T t Due to the energy threshold T w Some errors of slow wave time can be brought, and T is recommended t Is not less than 100ms; when [ D i_start ,D i_end ]The slow wave time of (2) satisfies a threshold T t Under the condition of [ D ] i_start ,D i_end ]The waveform between the paired endpoints is a slow wave, whereby the paired endpoints of the slow wave front [ D ] i-1_start ,D i-1_end ]The waveform formed between the two is a spike wave, so as to find out the effective waveform after EWED processing of the input waveform, and the effective waveform end point is [ D ] i-1_start ,D i_end ];
Because of the energy threshold T w An error of the effective waveform end point is brought, so that the effective waveform end point needs to be corrected, and the waveform start end point D is needed i-1_start Moving to the left data to find the first pole or the end of the waveform starting point, and then considering the first pole or the end of the waveform starting point as the corrected spike-slow composite wave starting point D start For waveform end point D i_end Moving to the right data to find the first pole or waveform ending point, and then considering the first pole or waveform ending point as the corrected spike-slow composite wave ending point D end Finally, the final effective waveform data X is obtained EAD
Figure BDA0003314298350000051
Estimating X using DTW algorithm EAD The distance between the waveform and the typical spike-slow composite wave in the spike-slow composite wave typical template library; so far, the similarity calculated by DTW is obtained by carrying out time-frequency domain feature extraction on the input waveform, low-frequency energy ratio and input waveform and spike-slow composite wave typical template library; fea 1x Representing variance, fea 2x Representing the low frequency energy ratio, fea 3x Representing distance, in order to eliminate dimension influence, maximally keeping original feature distribution and keeping consistent with the extracted features of offline training data, performing the following processing on three types of features:
Figure BDA0003314298350000052
Figure BDA0003314298350000053
Figure BDA0003314298350000054
Figure BDA0003314298350000055
the mean value and the variance of three features in the offline training data are processed to obtain normalized three types of features, and the normalized three types of features are fused into a feature vector [ Fea ]' 1 ,Fea′ 2 ,Fea′ 3 ]The method comprises the steps of carrying out a first treatment on the surface of the And after the fused feature vectors are sent into the recognition model, outputting a judgment model.
Corresponding to the method, the invention also provides a ratchet composite wave detection and identification system based on feature fusion, which comprises the following steps:
the classification model training module is used for establishing a ratchet-slow composite wave database and a normal brain wave shape database through a manual labeling method, extracting time-frequency domain characteristics of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and performing distance characteristics estimated by a DTW algorithm on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library, so that a ratchet-slow composite wave characteristic library and a normal waveform characteristic library are established, and classification model training is performed by using the ratchet-slow composite wave characteristic library and the normal wave characteristic library;
The distance characteristic calculation module is used for extracting distance characteristics estimated based on a DTW algorithm, and firstly normalizing and extracting time-frequency domain characteristics of input brain waves; carrying out effective waveform endpoint detection on the normalized brain wave data, and finally estimating the distance between the clutter-removed effective brain wave data and the spike-slow composite wave template by using a DTW algorithm;
and the classification module is used for fusing the extracted time-frequency domain features and the distance features into feature vectors as input features, sending the feature vectors into an off-line trained classification model and outputting classification results.
Further, the standard feature library establishment method in the classification model training module comprises the following steps: selecting a certain amount of typical ratchet composite waves from the ratchet composite wave database as a ratchet composite wave template library;
let XY be the total brain wave data set composed of a normal brain wave database and a ratchet composite wave database, X be the normal brain wave database, and X i One of the samples is n normal brain wave samples; y is a spike and slow complex database, Y i For one of the samples, there are m spike and slow complex data; z is a typical template library of spike and slow compound waves, Z i For one of the samples, there are k typical spike-slow complex samples;
X={x 1 ,x 2 …x n }
Y={y 1 ,y 2 …y m }
Z={z 1 ,z 2 …z k }
For each sample data of the normal brain wave database and the spike-slow composite wave database, carrying out Fourier transformation and numerical statistics of time domain to obtain time-frequency domain characteristic variance and low-frequency energy ratio, so that X is obtained fea1 ,X fea2 For the time-frequency domain characteristics extracted from normal brain wave data, let Y fea1 ,Y fea2 Time-frequency domain features extracted from the spike-slow composite wave database; secondly, performing DTW calculation on each sample data of the brain wave database and the ratchet compound wave database and the data of the ratchet compound wave typical template library, performing DTW calculation on a single sample and the data set of the ratchet compound wave typical template library, and taking the minimum distance degree, thereby obtaining a distance degree characteristic X fea3 、Y fea3
Figure BDA0003314298350000071
Figure BDA0003314298350000072
Thus far, the feature X extracted from the normal brain wave data is obtained fea1 、X fea2 、X fea3 And features Y extracted from the spike-slow complex database fea1 、Y fea2 、Y fea3 The method comprises the steps of carrying out a first treatment on the surface of the When the characteristics are fused, in order to eliminate the dimension influence, the original characteristic distribution is reserved to the maximum extent, and the following three types of characteristics are processed:
Figure BDA0003314298350000073
Figure BDA0003314298350000074
Figure BDA0003314298350000075
is XY fea1 Mean value of->
Figure BDA0003314298350000076
Is XY fea1 Variance of (X ') can be obtained by the same method' fea2 、X′ fea3 、Y′ fea1 、Y′ fea2 、Y′ fea3 ;/>
Figure BDA0003314298350000077
Figure BDA0003314298350000078
Figure BDA0003314298350000079
Figure BDA00033142983500000710
In order to keep the feature distribution of the on-line recognition input waveform consistent with the off-line modeling feature, the mean and variance of the off-line recognition extraction feature are recorded and respectively recorded as
Figure BDA00033142983500000711
The characteristic X 'of the normal brain wave database is obtained' fea1 、X' fea2 、X' fea3 The three types of features are fused into a feature vector matrix Fea x =[X' fea1 X' fea2 X' fea3 ],Fea x The element of each row is a fused vector; and similarly, obtaining the eigenvector matrix Fea of the ratchet-slow composite wave database y =[Y′ fea1 Y′ fea2 Y′ fea3 ]。
From Fea x And Fea y The normal brain wave feature library and the spike and slow compound wave feature library are formed, and the two feature libraries are sent to an SVM trainer, so that a classification model trained under an offline condition can be obtained.
Further, the normalization processing formula in the distance characteristic calculation module is as follows
Figure BDA0003314298350000081
Wherein: max (X) is the maximum value of an X sequence, min (X) is the minimum value of the X sequence, X is an electroencephalogram acquisition sequence of n points, and X n Representing the value of the nth sample point.
Further, the effective waveform endpoint detection method in the distance characteristic calculation module specifically comprises the following steps:
firstly, the EWED is utilized to effectively solve the influence of a DTW algorithm caused by brain electric data clutter, and the energy calculation formula is as follows:
Figure BDA0003314298350000082
setting a higher energy threshold T, D 1 For the first of the X sequences greater than the energy threshold T w Is then found from D 1 Start first less than the energy threshold T w Is denoted as D 2 Point, then from D 2 Begin to find the first one greater than the energy threshold T w Is denoted as D 3 By doing so, a set of endpoints is obtained,
D={D 1 ,D 2 …D n }。
The spike-slow composite wave is a composite wave composed of a spike wave and a slow wave, and the slow wave follows the spike wave strictly according to the spike wave, based on the rule described above, a standard spike-slow composite wave may have the following criteria:
rule 1: at least 4 endpoints are provided, namely a starting endpoint and an ending endpoint of the spike wave, and a starting endpoint and an ending endpoint of the slow wave, and if the starting endpoint and the ending endpoint are lower than the 4 endpoints, the normalized data are integrally used as effective data to carry out distance estimation with templates of a spike-slow composite wave template library;
rule 2: the time distance between the starting end point and the ending end point of the slow wave is longer than that of the spike wave, the time length of the slow wave is theoretically not lower than 100ms, and if the time length of the slow wave is lower than 100ms, the normalized data is used as effective data to carry out distance estimation with a template of a spike-slow composite wave template library;
based on the end point searching method and the rules, the matched end point pair set D is found out from the end point set D set And a length set L between each paired endpoint;
D set ={[D 1_start ,D 1_end ],[D 2_start ,D 2_end ]…[D n_start ,D n_end ]}
L={L 1 ,L 2 ,…L n }
let L be i When =max (L) is the maximum length, the i-th pairing endpoint d= [ D i_start ,D i_end ]The waveform formed is a slow wave which may exist, according to [ D ] i_start ,D i_end ]Calculating the slow wave time, theoretically considering the slow wave time not less than 100ms, Binding energy threshold T w Setting a slow wave time threshold T t Due to the energy threshold T w Some errors of slow wave time can be brought, and T is recommended t Is not less than 100ms; when [ D i_start ,D i_end ]The slow wave time of (2) satisfies a threshold T t Under the condition of [ D ] i_start ,D i_end ]The waveform between the paired endpoints is a slow wave, whereby the paired endpoints of the slow wave front [ D ] i-1_start ,D i-1_end ]The waveform formed between the two is a spike wave, so as to find out the effective waveform after EWED processing of the input waveform, and the effective waveform end point is [ D ] i-1_start ,D i_end ];
Because of the energy threshold T w An error of the effective waveform end point is brought, so that the effective waveform end point needs to be corrected, and the waveform start end point D is needed i-1_start Moving to the left data to find the first pole or the end of the waveform starting point, and then considering the first pole or the end of the waveform starting point as the corrected spike-slow composite wave starting point D start For waveform end point D i_end Moving to the right data to find the first pole or waveform ending point, and then considering the first pole or waveform ending point as the corrected spike-slow composite wave ending point D end Finally, the final effective waveform data X is obtained EAD
Figure BDA0003314298350000091
Estimating X using DTW algorithm EAD The distance between the waveform and the typical spike-slow composite wave in the spike-slow composite wave typical template library; so far, the similarity calculated by DTW is obtained by carrying out time-frequency domain feature extraction on the input waveform, low-frequency energy ratio and input waveform and spike-slow composite wave typical template library; fea 1x Representing variance, fea 2x Representing the low frequency energy ratio, fea 3x Representing distance, in order to eliminate dimension influence, maximally keeping original feature distribution and keeping consistent with the extracted features of offline training data, performing the following processing on three types of features:
Figure BDA0003314298350000092
Figure BDA0003314298350000093
Figure BDA0003314298350000094
Figure BDA0003314298350000101
the mean value and the variance of three features in the offline training data are processed to obtain normalized three types of features, and the normalized three types of features are fused into a feature vector [ Fea ]' 1 ,Fea′ 2 ,Fea′ 3 ]The method comprises the steps of carrying out a first treatment on the surface of the And after the fused feature vectors are sent into the recognition model, outputting a judgment model.
The invention has the advantages that:
and estimating the distance characteristic of the input brain wave and the ratchet composite wave template based on the DTW algorithm by utilizing the time-frequency domain characteristic of the brain wave data, performing characteristic fusion by taking the distance characteristic as a typical characteristic, sending the characteristic fusion into an off-line trained separator, and finally outputting the judged recognition result. In addition, the accuracy and the robustness of the recognition algorithm can be improved by carrying out normalization processing on the input brain wave data and detecting the effective waveform end points based on the short-time energy and the structural characteristics of the spike-slow composite wave. The invention realizes the automatic detection and identification of the spike-slow composite wave and improves the working efficiency of doctors.
Drawings
FIG. 1 is a flow chart of a method for detecting and identifying a fused spike-slow composite wave in an embodiment of the invention;
FIG. 2 is a flow chart of the offline modeling of FIG. 1;
FIG. 3 is a flowchart of offline modeling and online recognition in a fused spike-slow composite detection and recognition method according to an embodiment of the present invention;
FIG. 4 is a flowchart of an online identification method for detecting and identifying a fused ratchet composite wave in an embodiment of the present invention;
FIG. 5 is a diagram of actually acquiring brain electrical data of a patient according to an embodiment of the present invention;
FIG. 6 is the electroencephalogram data normalized to the electroencephalogram data of FIG. 5;
fig. 7 is an energy map of the electroencephalogram data in fig. 6.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described in the following in conjunction with the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of algorithm detection according to an embodiment of the present invention, the system has three main steps,
firstly, data management and feature extraction of an offline modeling module are performed, and a certain number of ratchet-slow complex wave databases and normal brain wave databases are manually marked according to brain wave data. Extracting time-frequency domain features of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and performing distance features estimated by a DTW algorithm on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library, thereby establishing a ratchet-slow composite wave feature library and a normal waveform feature library;
And secondly, extracting the distance degree characteristics estimated based on the DTW algorithm. Firstly, normalizing input brain waves, reducing the influence of amplitude on a dynamic time warping algorithm, carrying out effective waveform endpoint detection on normalized brain wave data, effectively removing clutters in the input brain wave based on short-time energy and waveform rules by the limited waveform endpoint detection based on the short-time energy and waveform rules, reducing the influence of the clutters on the dynamic time warping algorithm, and finally estimating the distance between the clutter-removed effective brain wave data and a spike-slow composite wave template by using a DTW algorithm;
thirdly, in the recognition process of the online recognition module, an unknown waveform is used as input, the time-frequency domain characteristics of the waveform are extracted, the distance between the unknown waveform and the ratchet composite wave template is estimated by using a DTW algorithm, the time-frequency domain characteristics and the distance characteristics form characteristic vectors, and the characteristic vectors are sent to an offline trained SVM classifier to output classification results.
Under the off-line condition, using manual labeling to form a ratchet-slow composite wave database and a normal brain wave database, and then training the classifier to obtain the identification classifier under the off-line condition. Note that when the spike-and-slow composite data is selected, the spike-and-slow composite data with noise is appropriately selected and the noise weight is relatively small, which improves generalization of the detection and recognition method to some extent.
The time-frequency domain characteristics of the brain wave data comprise 9 characteristics of mean value, variance, vector variation coefficient, cross entropy, median value, central moment, kurtosis variation coefficient, low-frequency energy ratio and average median ratio, and the characteristics can measure the brain wave data from the dimension of the characteristics.
The mean value belongs to energy characteristic parameters and describes average energy information of brain wave data:
Figure BDA0003314298350000111
/>
the variance reflects the degree of deviation of the value of a sample from its mathematical expectation:
Figure BDA0003314298350000112
the vector coefficient of variation defines the ratio of standard deviation to mean:
Figure BDA0003314298350000113
center-to-center distance characterization sample value for mathematically desirable distribution characteristics
Figure BDA0003314298350000114
Entropy is an electroencephalogram information quantity measurement, belongs to transformation characteristic parameters and is used for describing uncertainty and disorder. The entropy reflects the distribution of the energy obtained after the Fourier transform of the brain wave data on the frequency domain, and if the energy spectrum is uniformly distributed on the whole frequency domain, the entropy value is larger, otherwise, the entropy value is smaller.
Kurtosis variation coefficients describe the characteristics of the overall density function of brain wave data and also belong to distribution characteristic parameters.
Figure BDA0003314298350000121
The low-frequency energy ratio defines the ratio of the energy of the brain wave energy spectrum near the zero frequency to the total energy, and belongs to the transformation characteristic parameter. The magnitude of the low-frequency energy ratio reflects the distribution of the target energy spectrum, and how the target energy is concentrated near zero frequency, the low-frequency energy is larger, and vice versa.
The median value is the intermediate value of samples after descending order, and the characteristic can represent the value of the samples in the brain wave time sequence to a certain extent.
Average median ratio defines the ratio of average and median:
Figure BDA0003314298350000122
through a large amount of measured data analysis, the spike-slow composite wave has stronger separability with the variance of the normal wave form and the low-frequency energy ratio, and can be used as a typical characteristic for characteristic fusion.
The dynamic time warping algorithm is based on the idea of dynamic programming, can solve the problems of length alignment and corresponding point mapping between time sequences with different lengths and the problem of template matching with different lengths of the sequences, and can be better applied to the recognition of waveforms with specific shapes, such as the recognition of spike and slow composite waves. Therefore, when the input waveform has the structural characteristics of the spike-slow composite wave, the distance between the input waveform and the spike-slow composite wave template is smaller in value, and when the input waveform is a normal waveform, which means that the input waveform does not have the structural characteristics of the spike-slow composite wave, the distance between the input waveform and the spike-slow composite wave template is larger in value, and theoretically, the distance between the input waveform and the spike-slow composite wave template based on dynamic time regularity can be used as a typical characteristic for characteristic fusion.
Firstly introducing an offline modeling module, mainly designing a model for classification in an online recognition module, and fig. 2 is an offline modeling flow chart of an embodiment of the invention, manually selecting a normal electroencephalogram waveform and a ratchet composite waveform from an electroencephalogram data set, establishing a normal electroencephalogram database and a ratchet composite waveform database, and selecting a plurality of typical ratchet composite waves from the ratchet composite waveform database as a ratchet composite wave template library, wherein the ratchet composite wave template library mainly serves as a template to carry out a DTW algorithm to estimate distance degree with an input waveform. The complexity of the DTW algorithm is high, and templates in the ratchet-slow composite wave template library are not too much in order to ensure the real-time performance of the algorithm.
Let XY be the total brain wave data set composed of a normal brain wave database and a ratchet composite wave database, X be the normal brain wave database, and X i One of the samples is n normal brain wave samples. Y is a spike and slow complex database, Y i For one of the samples, there are m spike and slow complex data. Z is a ratchet-slow composite wave template library, Z i For one of the samples, there are k typical spike and slow complex samples.
X={x 1 ,x 2 …x n }
Y={y 1 ,y 2 …y m }
Z={z 1 ,z 2 …z k }
For each sample data of the normal brain wave database and the spike-slow composite wave database, carrying out Fourier transformation and numerical statistics of time domain to obtain time-frequency domain characteristic variance and low-frequency energy ratio, so that X is obtained fea1 ,X fea2 For the time-frequency domain characteristics extracted from normal brain wave data, let Y fea1 ,Y fea2 And (5) extracting time-frequency domain characteristics for the spike-slow composite wave database. Secondly, performing DTW calculation on each sample data of the brain wave database and the ratchet compound wave database and the data of the ratchet compound wave typical template library, performing DTW calculation on a single sample and the data set of the ratchet compound wave typical template library, and taking the minimum distance degree, thereby obtaining a distance degree characteristic X fea3 、Y fea3
Figure BDA0003314298350000131
Figure BDA0003314298350000132
So far we get the feature X extracted from normal brain wave data fea1 、X fea2 、X fea3 And features Y extracted from the spike-slow complex database fea1 、Y fea2 、Y fea3 . When the characteristics are fused, in order to eliminate the dimension influence, the original characteristic distribution is reserved to the maximum extent, and the following three types of characteristics are processed:
Figure BDA0003314298350000133
Figure BDA0003314298350000134
Figure BDA0003314298350000135
is XY fea1 Mean value of->
Figure BDA0003314298350000136
Is XY fea1 Variance of (X ') can be obtained by the same method' fea2 、X' fea3 、Y′ fea1 、Y′ fea2 、Y′ fea3
Figure BDA0003314298350000137
Figure BDA0003314298350000138
Figure BDA0003314298350000141
/>
Figure BDA0003314298350000142
In order to keep the feature distribution of the on-line recognition input waveform consistent with the off-line modeling feature, the mean and variance of the off-line recognition extraction feature are recorded and respectively recorded as
Figure BDA0003314298350000143
Above we obtain the characteristic X 'of the normal brain wave database' fea1 、X' fea2 、X' fea3 The three types of features are fused into a feature vector matrix Fea x =[X' fea1 X' fea2 X' fea3 ],Fea x The element of each row is a fused vector, which is a two-dimensional array of n rows. And similarly, obtaining the eigenvector matrix Fea of the ratchet-slow composite wave database y =[Y′ fea1 Y′ fea2 Y′ fea3 ]。
From Fea x And Fea y The normal brain wave feature library and the spike and slow compound wave feature library are formed, and the two feature libraries are sent to an SVM trainer, so that a classification model trained under an offline condition can be obtained.
Fig. 3 and fig. 4 are on-line recognition processing flows, extracting distance features from an unknown waveform, normalizing data of the unknown waveform, eliminating the influence of amplitude on a DTW algorithm, and then processing the normalized data by an EWED algorithm to remove ineffective clutter in brain wave data. And finally, estimating the distance between the clutter removed waveform data and the spike and slow composite wave typical template library by using a DTW algorithm.
And meanwhile, carrying out time-frequency domain statistics on the data of the unknown waveform to obtain two types of characteristics of variance and low-frequency energy ratio. And fusing the three types of features of variance, low-frequency energy ratio and distance into feature vectors, sending the feature vectors into an offline trained classifier, and outputting a classification result.
The DTW algorithm principle shows that the influence of non-uniform amplitude level of the clutter and the waveform contained in the waveform on the estimated distance is huge, and the invention provides a method for removing the influence of non-uniform amplitude level of the clutter by utilizing normalization and EWED.
Generally, the spike-slow composite wave is a spike wave of about 20ms followed by a slow wave of 200 ms-500 ms (300 ms at most), so that the single spike-slow composite wave generally does not exceed 600ms, and the system agrees that the electroencephalogram data of the one-time input algorithm system is the electroencephalogram data of 600ms, and is recorded as follows:
X={x 1 ,x 2 …x n }
Wherein: electroencephalogram acquisition sequence with X being n points and X n The number of points of the electroencephalogram data per second is dependent on the sampling rate per second of the electroencephalogram acquisition hardware device, and the brand of the mainstream electroencephalogram acquisition instrument in the industry, such as Japanese photoelectric, american Nigay and the like, has the sampling rate of 125hz, 500hz and the like. Fig. 5 is typical electroencephalogram abnormal waveform data collected by an electroencephalogram monitoring device of the company nigh, usa, and the sampling rate is set to 125hz, and the time length is 600ms. Because different equipment parameters and the electroencephalogram amplification gain set by a user are different, the amplitude of data is greatly different, in order to eliminate the influence of the amplitude on a dynamic time warping algorithm, a system detection and identification algorithm can be compatible to process the data acquired by different equipment, the input electroencephalogram waveform is firstly subjected to normalization processing, and the normalization processing formula is as follows:
Figure BDA0003314298350000151
wherein: max (X) is the maximum value of the X sequence, min (X) is the minimum value of the X sequence, and the normalized electroencephalogram data effectively reduces the negative influence of amplitude on the algorithm. Fig. 5 shows normalized data, and it can be seen that the waveform structural features are not lost.
The period in which the spike composite wave usually occurs is often about 200ms to 500ms, and the system specifies that the input 600ms electroencephalogram data often has certain clutter, and as can be seen from fig. 6, the effective data is between 140ms and 600ms. Clutter of 1ms to 149ms affects the accuracy of the DTW algorithm.
The occurrence of the spike-slow composite wave often brings fluctuation on waveform energy, and the EWED of the spike-slow composite wave based on short-time energy and waveform rules can effectively solve the influence of a DTW algorithm brought by brain electrical data clutter, and the energy calculation formula is as follows:
Figure BDA0003314298350000152
setting a higher energy threshold T, D 1 For the first of the X sequences greater than the energy threshold T w Is then found from D 1 Start first less than the energy threshold T w Is denoted as D 2 Point, then from D 2 Begin to find the first one greater than the energy threshold T w Is denoted as D 3 By doing so, a set of endpoints is obtained,
D={D 1 ,D 2 …D n }
setting t=0.5, performing electroencephalogram waveform energy calculation based on the data of fig. 6, and finding an endpoint set according to the energy calculation and the threshold rule described above, and the result is shown in fig. 7.
The spike-slow composite wave is a composite wave composed of a spike wave and a slow wave, and the slow wave follows the spike wave strictly according to the spike wave, based on the rule described above, a standard spike-slow composite wave may have the following criteria:
rule 1: at least 4 endpoints are provided, namely a starting endpoint and an ending endpoint of the spike wave, and a starting endpoint and an ending endpoint of the slow wave, and if the starting endpoint and the ending endpoint are lower than the 4 endpoints, the normalized data are integrally used as effective data to carry out distance estimation with templates of a spike-slow composite wave template library;
Rule 2: the time distance between the starting end point and the ending end point of the slow wave is longer than that of the spike wave, the time length of the slow wave is theoretically not lower than 100ms, and if the time length of the slow wave is lower than 100ms, the normalized data is used as effective data to carry out distance estimation with a template of a spike-slow composite wave template library;
based on the end point searching method and the rules, we find a matched end point pair set D in the end point set D set And a set of lengths L between each paired endpoint.
D set ={[D 1_start ,D 1_end ],[D 2_start ,D 2_end ]…[D n_start ,D n_end ]}
L={L 1 ,L 2 ,…L n }
Let L be i When =max (L) is the maximum length, the i-th pairing endpoint d= [ D i_start ,D i_end ]The waveform formed is a slow wave which may exist, according to [ D ] i_start ,D i_end ]Calculating slow wave time, theoretically considering that the slow wave time is not lower than 100ms, combining with an energy threshold T w Setting a slow wave time threshold T t Due to the energy threshold T w Some errors of slow wave time can be brought, and T is recommended t Is not less than 100ms. When [ D i_start ,D i_end ]The slow wave time of (2) satisfies a threshold T t Under the condition, the system recognizes [ D i_start ,D i_end ]The waveform between the paired endpoints is a slow wave, whereby the paired endpoints of the slow wave front [ D ] i-1_start ,D i-1_end ]The waveform formed between the two is a spike wave, so as to find out the effective waveform after EWED processing of the input waveform, and the effective waveform end point is [ D ] i-1_start ,D i_end ]。
Because of the energy threshold T w An error of the effective waveform end point is brought, so that the effective waveform end point needs to be corrected, and the waveform start end point D is needed i-1_start To itThe left data moves to find the first pole or the end of the waveform starting point, and then the first pole or the end of the waveform starting point is regarded as the corrected spike-slow composite starting point D start For waveform end point D i_end Moving to the right data to find the first pole or waveform ending point, and then considering the first pole or waveform ending point as the corrected spike-slow composite wave ending point D end Finally, the final effective waveform data X is obtained EAD
Figure BDA0003314298350000161
Estimating X using DTW algorithm EAD The distance between the waveform and the spike complex template. If a plurality of templates exist in the template library, a plurality of templates and X are taken EAD Minimum value of waveform distance estimation. Adding templates in the ratchet-slow composite wave template library can increase the generalization of the algorithm, but can bring about improvement of computational complexity, influence the instantaneity and are determined by users.
So far, we get the similarity calculated by the variance of the time-frequency domain feature extraction of the input waveform, the low-frequency energy ratio and the DTW of the input waveform and the template library. Fea 1x Representing variance, fea 2x Representing the low frequency energy ratio, fea 3x Representing distance, in order to eliminate dimension influence, maximally keeping original feature distribution and keeping consistent with the extracted features of offline training data, performing the following processing on three types of features:
Figure BDA0003314298350000162
Figure BDA0003314298350000163
Figure BDA0003314298350000171
Figure BDA0003314298350000172
The mean value and the variance of three features in the offline training data are processed to obtain normalized three types of features, and the normalized three types of features are fused into a feature vector [ Fea ]' 1 ,Fea′ 2 ,Fea′ 3 ]. And after the fused feature vectors are sent into the recognition model, outputting a judgment model.
Although the preferred embodiments of the present invention have been disclosed for the purpose of example, the scope of the present invention is not limited to the above examples, because any method of identifying a ratchet complex based on fusion of brain wave time-frequency domain features and DTW algorithm estimated distance features, and a method of improving the accuracy of DTW distance estimation using normalization and EWED are all within the scope of the present invention.
Corresponding to the method, the embodiment also provides a ratchet composite wave detection and identification system based on feature fusion, which is characterized by comprising the following steps:
the classification model training module is used for establishing a ratchet-slow composite wave database and a normal brain wave shape database through a manual labeling method, extracting time-frequency domain characteristics of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and performing distance characteristics estimated by a DTW algorithm on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library, so that a ratchet-slow composite wave characteristic library and a normal waveform characteristic library are established, and classification model training is performed by using the ratchet-slow composite wave characteristic library and the normal wave characteristic library;
The distance characteristic calculation module is used for extracting distance characteristics estimated based on a DTW algorithm, and firstly normalizing and extracting time-frequency domain characteristics of input brain waves; carrying out effective waveform endpoint detection on the normalized brain wave data, and finally estimating the distance between the clutter-removed effective brain wave data and the spike-slow composite wave template by using a DTW algorithm;
and the classification module is used for fusing the extracted time-frequency domain features and the distance features into feature vectors as input features, sending the feature vectors into an off-line trained classification model and outputting classification results.
The execution process of each module is consistent with the method.
The above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. The spike-slow composite wave detection and identification method based on feature fusion is characterized by comprising the following steps of:
Step 1, training a classification model, namely establishing a ratchet-slow composite wave database and a normal brain wave shape database by a manual labeling method, extracting time-frequency domain characteristics of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and performing distance characteristics estimated by a DTW algorithm on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library, thereby establishing a ratchet-slow composite wave characteristic library and a normal waveform characteristic library, and performing classification model training by using the ratchet-slow composite wave characteristic library and the normal wave characteristic library;
step 2, extracting distance features estimated based on a DTW algorithm, and firstly normalizing input brain waves and extracting time-frequency domain features; carrying out effective waveform endpoint detection on the normalized brain wave data, and finally estimating the distance between the clutter-removed effective brain wave data and the spike-slow composite wave template by using a DTW algorithm;
step 3, fusing the extracted time-frequency domain features and distance features into feature vectors as input features, sending the feature vectors into an off-line trained classification model, and outputting classification results;
the establishment method of the spike-slow composite wave typical template library comprises the following steps: selecting a certain amount of typical ratchet composite waves from the ratchet composite wave database as a ratchet composite wave template library;
Let XY be the total brain wave data set composed of a normal brain wave database and a ratchet composite wave database, X be the normal brain wave database, and X i One of the samples is n normal brain wave samples; y is a spike and slow complex database, Y i For one of the samples, there are m spike and slow complex data; z is a typical template library of spike and slow compound waves, Z i For one of the samples, there are k typical spike-slow complex samples;
X={x 1 ,x 2 …x n }
Y={y 1 ,y 2 …y m }
Z={z 1 ,z 2 …z k }
for each sample data of the normal brain wave database and the spike-slow composite wave database, carrying out Fourier transformation and numerical statistics of time domain to obtain time-frequency domain characteristic variance and low-frequency energy ratio, so that X is obtained fea1 ,X fea2 For the time-frequency domain characteristics extracted from normal brain wave data, let Y fea1 ,Y fea2 Time-frequency domain features extracted from the spike-slow composite wave database; secondly, performing DTW calculation on each sample data of the brain wave database and the ratchet compound wave database and the data of the ratchet compound wave typical template library, performing DTW calculation on a single sample and the data set of the ratchet compound wave typical template library, and taking the minimum distance degree, thereby obtaining a distance degree characteristic X fea3 、Y fea3
Figure FDA0004163684600000021
Figure FDA0004163684600000022
Thus far, the feature X extracted from the normal brain wave data is obtained fea1 、X fea2 、X fea3 And features Y extracted from the spike-slow complex database fea1 、Y fea2 、Y fea3 The method comprises the steps of carrying out a first treatment on the surface of the In-process feature fusionIn order to eliminate the dimension influence, the original characteristic distribution is reserved to the maximum extent, and the following three types of characteristics are processed:
Figure FDA0004163684600000023
Figure FDA0004163684600000024
Figure FDA0004163684600000025
is XY fea1 Mean value of->
Figure FDA0004163684600000026
Is XY fea1 Variance of (X ') can be obtained by the same method' fea2 、X′ fea3 、Y′ fea1 、Y′ fea2 、Y′ fea3
Figure FDA0004163684600000027
Figure FDA0004163684600000028
Figure FDA0004163684600000029
Figure FDA00041636846000000210
In order to keep the feature distribution of the on-line recognition input waveform consistent with the off-line modeling feature, the mean and variance of the off-line recognition extracted feature are recordedRecorded as respectively
Figure FDA00041636846000000211
The characteristic X 'of the normal brain wave database is obtained' fea1 、X′ fea2 、X′ fea3 The three types of features are fused into a feature vector matrix Fea x =[X′ fea1 X′ fea2 X′ fea3 ],Fea x The element of each row is a fused vector; and similarly, obtaining the eigenvector matrix Fea of the ratchet-slow composite wave database y =[Y′ fea1 Y′ fea2 Y′ fea3 ];
From Fea x And Fea y The normal brain wave feature library and the spike-slow composite wave feature library are formed, and the two feature libraries are sent to an SVM trainer, so that a classification model trained under an offline condition can be obtained;
the effective waveform endpoint detection method in the step 2 specifically comprises the following steps:
firstly, the DTW algorithm influence caused by the brain electrical data clutter is effectively solved by using the effective waveform endpoint detection, and the energy calculation formula is as follows:
Figure FDA0004163684600000031
setting an energy threshold T, D 1 For the first of the X sequences greater than the energy threshold T w Is then found from D 1 Start first less than the energy threshold T w Is denoted as D 2 Point, then from D 2 Begin to find the first one greater than the energy threshold T w Is denoted as D 3 By doing so, a set of endpoints is obtained,
D={D 1 ,D 2 …D n };
the spike-slow complex is arranged in a regular pattern with the spike wave followed by the slow wave, and a standard spike-slow complex defines the following 2-point criterion:
rule 1: at least 4 endpoints are provided, namely a starting endpoint and an ending endpoint of the spike wave, and a starting endpoint and an ending endpoint of the slow wave, and if the starting endpoint and the ending endpoint are lower than the 4 endpoints, the normalized data are integrally used as effective data to carry out distance estimation with templates of a spike-slow composite wave template library;
rule 2: the time distance between the starting end point and the ending end point of the slow wave is longer than that of the spike wave, the time length of the slow wave is theoretically not lower than 100ms, and if the time length of the slow wave is lower than 100ms, the normalized data is used as effective data to carry out distance estimation with a template of a spike-slow composite wave template library;
based on the rule 1 and the rule 2, finding out a matched endpoint pair set D from the endpoint set D set And a length set L between each paired endpoint;
D set ={[D 1_start ,D 1_end ],[D 2_start ,D 2_end ]…[D n_start ,D n_end ]}
L={L 1 ,L 2 ,…L n }
let L be i When =max (L) is the maximum length, the i-th pairing endpoint d= [ D i_start ,D i_end ]Slow waves present in the waveform formed, according to [ D i_start ,D i_end ]Calculating slow wave time which is not lower than 100ms and is combined with an energy threshold T w Setting a slow wave time threshold T t Due to the energy threshold T w Some errors of slow wave time can be brought, and T is recommended t Is not less than 100ms; when [ D i_start ,D i_end ]The slow wave time of (2) satisfies a threshold T t Under the condition of [ D ] i_start ,D i_end ]The waveform between the paired endpoints is a slow wave, whereby the paired endpoints of the slow wave front [ D ] i-1_start ,D i-1_end ]The waveform formed between the two is a spike wave, so as to find out the effective waveform after EWED processing of the input waveform, and the effective waveform end point is [ D ] i-1_start ,D i_end ];
Because of the energy threshold T w An error of the effective waveform end point is brought, so that the effective waveform end point needs to be corrected, and the waveform start end point D is needed i-1_start To the left of which data is shifted,finding the first pole or ending the waveform start point is regarded as the corrected spike-slow composite start point D start For waveform end point D i_end Moving to the right data to find the first pole or waveform ending point, and then considering the first pole or waveform ending point as the corrected spike-slow composite wave ending point D end Finally, the final effective waveform data X is obtained EAD
Figure FDA0004163684600000041
2. The method for detecting and identifying the ratchet-slow composite wave based on the feature fusion according to claim 1, wherein the normalization processing formula in the step 2 is as follows
Figure FDA0004163684600000042
Wherein: max (X) is the maximum value of an X sequence, min (X) is the minimum value of the X sequence, X is an electroencephalogram acquisition sequence of n points, and X n Representing the value of the nth sample point.
3. The method for detecting and identifying the ratchet-slow composite wave based on the feature fusion according to claim 1, wherein the DTW algorithm is utilized to estimate X EAD The distance between the waveform and the typical spike-slow composite wave in the spike-slow composite wave typical template library; obtaining the similarity calculated by DTW of a variance, a low-frequency energy ratio and a typical template library of the input waveform and the spike-slow composite wave, wherein the variance and the low-frequency energy ratio are extracted from the time-frequency domain characteristics of the input waveform; fea 1x Representing variance, fea 2x Representing the low frequency energy ratio, fea 3x Representing distance, in order to eliminate dimension influence, maximally keeping original feature distribution and keeping consistent with the extracted features of offline training data, performing the following processing on three types of features:
Figure FDA0004163684600000043
Figure FDA0004163684600000044
Figure FDA0004163684600000045
Figure FDA0004163684600000046
the mean value and the variance of three features in the offline training data are processed to obtain normalized three types of features, and the normalized three types of features are fused into a feature vector [ Fea ]' 1 ,Fea′ 2 ,Fea′ 3 ]The method comprises the steps of carrying out a first treatment on the surface of the And after the fused feature vectors are sent into the recognition model, outputting a judgment model.
4. Ratchet composite wave detection and identification system based on feature fusion, which is characterized by comprising:
The classification model training module is used for establishing a ratchet-slow composite wave database and a normal brain wave shape database through a manual labeling method, extracting time-frequency domain characteristics of waveforms according to sample data of the ratchet-slow composite wave database and the normal brain wave database, and performing distance characteristics estimated by a DTW algorithm on samples of the ratchet-slow composite wave database and the normal brain wave database and samples of a ratchet-slow composite wave typical template library, so that a ratchet-slow composite wave characteristic library and a normal waveform characteristic library are established, and classification model training is performed by using the ratchet-slow composite wave characteristic library and the normal wave characteristic library;
the distance characteristic calculation module is used for extracting distance characteristics estimated based on a DTW algorithm, and firstly normalizing and extracting time-frequency domain characteristics of input brain waves; carrying out effective waveform endpoint detection on the normalized brain wave data, and finally estimating the distance between the clutter-removed effective brain wave data and the spike-slow composite wave template by using a DTW algorithm;
the classification module is used for fusing the extracted time-frequency domain features and the extracted distance features into feature vectors as input features, sending the feature vectors into an off-line trained classification model and outputting classification results;
the establishment method of the spike-slow composite wave typical template library comprises the following steps: selecting a certain amount of typical ratchet composite waves from the ratchet composite wave database as a ratchet composite wave template library;
Let XY be the total brain wave data set composed of a normal brain wave database and a ratchet composite wave database, X be the normal brain wave database, and X i One of the samples is n normal brain wave samples; y is a spike and slow complex database, Y i For one of the samples, there are m spike and slow complex data; z is a typical template library of spike and slow compound waves, Z i For one of the samples, there are k typical spike-slow complex samples;
X={x 1 ,x 2 …x n }
Y={y 1 ,y 2 …y m }
Z={z 1 ,z 2 …z k }
for each sample data of the normal brain wave database and the spike-slow composite wave database, carrying out Fourier transformation and numerical statistics of time domain to obtain time-frequency domain characteristic variance and low-frequency energy ratio, so that X is obtained fea1 ,X fea2 For the time-frequency domain characteristics extracted from normal brain wave data, let Y fea1 ,Y fea2 Time-frequency domain features extracted from the spike-slow composite wave database; secondly, performing DTW calculation on each sample data of the brain wave database and the ratchet compound wave database and the data of the ratchet compound wave typical template library, performing DTW calculation on a single sample and the data set of the ratchet compound wave typical template library, and taking the minimum distance degree, thereby obtaining a distance degree characteristic X fea3 、Y fea3
Figure FDA0004163684600000061
Figure FDA0004163684600000062
Thus far, the feature X extracted from the normal brain wave data is obtained fea1 、X fea2 、X fea3 And features Y extracted from the spike-slow complex database fea1 、Y fea2 、Y fea3 The method comprises the steps of carrying out a first treatment on the surface of the When the characteristics are fused, in order to eliminate the dimension influence, the original characteristic distribution is reserved to the maximum extent, and the following three types of characteristics are processed:
Figure FDA0004163684600000063
Figure FDA0004163684600000064
Figure FDA0004163684600000065
is XY fea1 Mean value of->
Figure FDA0004163684600000066
Is XY fea1 Variance of (X ') can be obtained by the same method' fea2 、X′ fea3 、Y′ fea1 、Y′ fea2 、Y′ fea3
Figure FDA0004163684600000067
Figure FDA0004163684600000068
Figure FDA0004163684600000069
Figure FDA00041636846000000610
In order to keep the feature distribution of the on-line recognition input waveform consistent with the off-line modeling feature, the mean and variance of the off-line recognition extraction feature are recorded and respectively recorded as
Figure FDA00041636846000000611
The characteristic X 'of the normal brain wave database is obtained' fea1 、X′ fea2 、X′ fea3 The three types of features are fused into a feature vector matrix Fea x =[X′ fea1 X′ fea2 X′ fea3 ],Fea x The element of each row is a fused vector; and similarly, obtaining the eigenvector matrix Fea of the ratchet-slow composite wave database y =[Y′ fea1 Y′ fea2 Y′ fea3 ];
From Fea x And Fea y The normal brain wave feature library and the spike-slow composite wave feature library are formed, and the two feature libraries are sent to an SVM trainer, so that a classification model trained under an offline condition can be obtained;
the effective waveform endpoint detection method in the distance characteristic calculation module specifically comprises the following steps:
firstly, the DTW algorithm influence caused by the brain electrical data clutter is effectively solved by using the effective waveform endpoint detection, and the energy calculation formula is as follows:
Figure FDA0004163684600000071
setting an energy threshold T, D 1 For the first of the X sequences greater than the energy threshold T w Is then found from D 1 Start first less than the energy threshold T w Is denoted as D 2 Point, then from D 2 Begin to findFirst is greater than the energy threshold T w Is denoted as D 3 By doing so, a set of endpoints is obtained,
D={D 1 ,D 2 …D n };
the spike-slow complex is arranged in a regular pattern with the spike wave followed by the slow wave, and a standard spike-slow complex defines the following 2-point criterion:
rule 1: at least 4 endpoints are provided, namely a starting endpoint and an ending endpoint of the spike wave, and a starting endpoint and an ending endpoint of the slow wave, and if the starting endpoint and the ending endpoint are lower than the 4 endpoints, the normalized data are integrally used as effective data to carry out distance estimation with templates of a spike-slow composite wave template library;
rule 2: the time distance between the starting end point and the ending end point of the slow wave is longer than that of the spike wave, the time length of the slow wave is theoretically not lower than 100ms, and if the time length of the slow wave is lower than 100ms, the normalized data is used as effective data to carry out distance estimation with a template of a spike-slow composite wave template library;
based on the rule 1 and the rule 2, finding out a matched endpoint pair set D from the endpoint set D set And a length set L between each paired endpoint;
D set ={[D 1_start ,D 1_end ],[D 2_start ,D 2_end ]…[D n_start ,D n_end ]}
L={L 1 ,L 2 ,…L n }
let L be i When =max (L) is the maximum length, the i-th pairing endpoint d= [ D i_start ,D i_end ]Slow waves present in the waveform formed, according to [ D i_start ,D i_end ]Calculating slow wave time which is not lower than 100ms and is combined with an energy threshold T w Setting a slow wave time threshold T t Due to the energy threshold T w Some errors of slow wave time can be brought, and T is recommended t Is not less than 100ms; when [ D i_start ,D i_end ]The slow wave time of (2) satisfies a threshold T t Under the condition of [ D ] i_start ,D i_end ]The waveform between the paired endpoints is a slow wave, whereby the paired endpoints of the slow wave front [ D ] i-1_start ,D i-1_end ]The waveform formed between the two is a spike wave, so as to find out the effective waveform after EWED processing of the input waveform, and the effective waveform end point is [ D ] i-1_start ,D i_end ];
Because of the energy threshold T w An error of the effective waveform end point is brought, so that the effective waveform end point needs to be corrected, and the waveform start end point D is needed i-1_start Moving to the left data to find the first pole or the end of the waveform starting point, and then considering the first pole or the end of the waveform starting point as the corrected spike-slow composite wave starting point D start For waveform end point D i_end Moving to the right data to find the first pole or waveform ending point, and then considering the first pole or waveform ending point as the corrected spike-slow composite wave ending point D end Finally, the final effective waveform data X is obtained EAD
Figure FDA0004163684600000081
5. The system for detecting and identifying a ratchet-slow composite wave based on feature fusion according to claim 4, wherein the normalization processing formula in the distance feature calculation module is as follows
Figure FDA0004163684600000082
Wherein: max (X) is the maximum value of an X sequence, min (X) is the minimum value of the X sequence, X is an electroencephalogram acquisition sequence of n points, and X n Representing the value of the nth sample point.
6. The system for detecting and identifying the spike and slow complex based on feature fusion according to claim 4, wherein the specific calculation process of estimating the distance between the effective brain wave shape data with clutter removed and the spike and slow complex template by using a DWT algorithm in the distance feature calculation module is as follows:
by DTW algorithm estimates X EAD The distance between the waveform and the typical spike-slow composite wave in the spike-slow composite wave typical template library; so far, the similarity calculated by DTW is obtained by carrying out time-frequency domain feature extraction on the input waveform, low-frequency energy ratio and input waveform and spike-slow composite wave typical template library; fea 1x Representing variance, fea 2x Representing the low frequency energy ratio, fea 3x Representing distance, in order to eliminate dimension influence, maximally keeping original feature distribution and keeping consistent with the extracted features of offline training data, performing the following processing on three types of features:
Figure FDA0004163684600000083
Figure FDA0004163684600000084
Figure FDA0004163684600000085
Figure FDA0004163684600000086
the mean value and the variance of three features in the offline training data are processed to obtain normalized three types of features, and the normalized three types of features are fused into a feature vector [ Fea ] 1 ',Fea' 2 ,Fea' 3 ]The method comprises the steps of carrying out a first treatment on the surface of the And after the fused feature vectors are sent into the recognition model, outputting a judgment model. />
CN202111225879.6A 2021-10-21 2021-10-21 Ratchet composite wave detection and identification method and system based on feature fusion Active CN113907770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111225879.6A CN113907770B (en) 2021-10-21 2021-10-21 Ratchet composite wave detection and identification method and system based on feature fusion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111225879.6A CN113907770B (en) 2021-10-21 2021-10-21 Ratchet composite wave detection and identification method and system based on feature fusion

Publications (2)

Publication Number Publication Date
CN113907770A CN113907770A (en) 2022-01-11
CN113907770B true CN113907770B (en) 2023-05-09

Family

ID=79242106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111225879.6A Active CN113907770B (en) 2021-10-21 2021-10-21 Ratchet composite wave detection and identification method and system based on feature fusion

Country Status (1)

Country Link
CN (1) CN113907770B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116842471B (en) * 2023-09-04 2023-12-01 南通联拓信息科技有限公司 Abnormal brain wave identification and classification method based on image identification technology

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111528838A (en) * 2020-05-19 2020-08-14 中国电子科技集团公司第三十八研究所 Abnormal electroencephalogram signal detection device and detection method
CN111613338A (en) * 2020-05-19 2020-09-01 中国电子科技集团公司第三十八研究所 Method and system for constructing spike-slow complex wave detection model
CN112022151A (en) * 2020-07-31 2020-12-04 华南师范大学 Method for processing and identifying brain wave spike slow wave
CN112220485A (en) * 2020-09-03 2021-01-15 北京慧脑云计算有限公司 Epilepsia electroencephalogram/magnetoencephalogram abnormal wave automatic detection method and positioning system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050215551A1 (en) * 2004-03-25 2005-09-29 Solvay Pharmaceuticals B.V. 1-[2H-1-benzopyran-2-one-8-yl]- piperazine derivatives for the treatment of movement disorders

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111528838A (en) * 2020-05-19 2020-08-14 中国电子科技集团公司第三十八研究所 Abnormal electroencephalogram signal detection device and detection method
CN111613338A (en) * 2020-05-19 2020-09-01 中国电子科技集团公司第三十八研究所 Method and system for constructing spike-slow complex wave detection model
CN112022151A (en) * 2020-07-31 2020-12-04 华南师范大学 Method for processing and identifying brain wave spike slow wave
CN112220485A (en) * 2020-09-03 2021-01-15 北京慧脑云计算有限公司 Epilepsia electroencephalogram/magnetoencephalogram abnormal wave automatic detection method and positioning system

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
Liu YC, Lin CCK等.Model-Based Spike Detection of Epileptic EEG Data.2013,第第13卷卷(第第9期期),第12536-12547页. *
Study on spike-and-wave detection in epileptic signals using T-location-scale distribution and the K-nearest neighbors classifier;Quintero-Rincon, Antonio.Prendes, Jorge等;《 IEEE URUCON》;第1-4页 *
一种基于改进经验模态分解的癫痫脑电识别新方法;庞春颖,王小甜,孙晓琳;《中国生物医学工程学报》;第第32卷卷(第第6期期);663-669 *
基于EEMD与改进EMD的脑电信号的特征提取方法;霍延;《中国优秀硕士学位论文全文数据库(信息科技辑)》(第第3期期);全文 *
基于深度学习的癫痫脑电信号检测算法研究;林子超;《中国优秀硕士学位论文全文数据库(医药卫生科技辑)》(第第2期期);全文 *
癫痫灶切除术中皮层电刺激在脑皮层功能区定位中的应用;王斌,陶胜忠,刘展等;《山东医药》;第第57卷卷(第第11期期);第55-57页 *
脉冲神经网络监督学习及癫痫脑电识别研究;赵梓伊;《中国优秀硕士学位论文全文数据库(医药卫生科技辑)》(第第1期期);全文 *

Also Published As

Publication number Publication date
CN113907770A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
Sangaiah et al. An intelligent learning approach for improving ECG signal classification and arrhythmia analysis
CN109077715B (en) Electrocardiosignal automatic classification method based on single lead
Lewicki A review of methods for spike sorting: the detection and classification of neural action potentials
CN110811609B (en) Epileptic spike intelligent detection device based on self-adaptive template matching and machine learning algorithm fusion
Fraser et al. Automated biosignal quality analysis for electromyography using a one-class support vector machine
Li et al. Robust ECG biometrics using GNMF and sparse representation
Belgacem et al. Person identification system based on electrocardiogram signal using LabVIEW
CN110751131B (en) Arrhythmia detection device
CN112426160A (en) Electrocardiosignal type identification method and device
CN112971795B (en) Electrocardiosignal quality evaluation method
CN114886388A (en) Evaluation method and device for quality of electroencephalogram signal in anesthesia depth monitoring process
CN113907770B (en) Ratchet composite wave detection and identification method and system based on feature fusion
Slama et al. Application of statistical features and multilayer neural network to automatic diagnosis of arrhythmia by ECG signals
Bozkurt et al. Comparison of AR parametric methods with subspace-based methods for EMG signal classification using stand-alone and merged neural network models
Talukdar et al. Motor imagery EEG signal classification scheme based on autoregressive reflection coefficients
CN108470182B (en) Brain-computer interface method for enhancing and identifying asymmetric electroencephalogram characteristics
Ganguly et al. A non-invasive approach for fetal arrhythmia detection and classification from ecg signals
CN114330422A (en) Cross-test migration learning method for estimating electroencephalogram emotional characteristics in real time
Phinyomark et al. Applications of variance fractal dimension: A survey
CN116807496B (en) Method, device, equipment and medium for positioning epileptic interval brain wave abnormal signals
JP6103591B2 (en) Auscultation heart sound signal processing method, auscultation heart sound signal processing apparatus, and program for processing auscultation heart sound signal
Puri et al. Detection of Alcoholism from EEG signals using Spectral and Tsallis Entropy with SVM
Prabhakar et al. EM based non-linear regression and singular value decomposition for epilepsy classification
CN111931578A (en) Electroencephalogram identification method based on minimum spanning tree and regional double-layer network
Dilber et al. EEG based detection of epilepsy by a mixed design approach

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