CN117958813A - ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network - Google Patents

ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network Download PDF

Info

Publication number
CN117958813A
CN117958813A CN202410363062.2A CN202410363062A CN117958813A CN 117958813 A CN117958813 A CN 117958813A CN 202410363062 A CN202410363062 A CN 202410363062A CN 117958813 A CN117958813 A CN 117958813A
Authority
CN
China
Prior art keywords
layer
ecg
feature
res2next
attention
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
CN202410363062.2A
Other languages
Chinese (zh)
Other versions
CN117958813B (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.)
University of Science and Technology Beijing USTB
China South Industries Group Automation Research Institute
Original Assignee
University of Science and Technology Beijing USTB
China South Industries Group Automation 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 University of Science and Technology Beijing USTB, China South Industries Group Automation Research Institute filed Critical University of Science and Technology Beijing USTB
Priority to CN202410363062.2A priority Critical patent/CN117958813B/en
Publication of CN117958813A publication Critical patent/CN117958813A/en
Application granted granted Critical
Publication of CN117958813B publication Critical patent/CN117958813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/117Identification of persons
    • 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/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • 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/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/352Detecting R peaks, e.g. for synchronising diagnostic apparatus; Estimating R-R interval
    • 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/318Heart-related electrical modalities, e.g. electrocardiography [ECG]
    • A61B5/346Analysis of electrocardiograms
    • A61B5/349Detecting specific parameters of the electrocardiograph cycle
    • A61B5/366Detecting abnormal QRS complex, e.g. widening
    • 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
    • A61B5/7267Classification of physiological signals or data, e.g. using neural networks, statistical classifiers, expert systems or fuzzy systems involving training the classification device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

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

Abstract

The invention provides an ECG identity recognition method, system and equipment based on an attention depth residual error network, wherein the method comprises the following steps: collecting an original electrocardiosignal, and preprocessing to obtain ECG signal data; the ECG signal data is passed through a feature extraction network to extract final ECG features; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged; and calculating the similarity of the final ECG features and the feature vectors in the ID-feature pair database, and carrying out identity recognition based on a similarity threshold. The scheme realizes the deep extraction of the ECG data characteristics, performs wavelet filtering and 2-dimensional processing on the input data, and greatly improves the recognition precision of the ECG identification system.

Description

ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network
Technical Field
The invention relates to the field of human behavior data processing and artificial neural networks, in particular to a lightweight human behavior recognition method, system and equipment based on a wearable sensor.
Background
With the development of information technology, the importance of identification is becoming more prominent in today's society. In an increasingly interconnected and frequently-communicated environment, ensuring reliable identity authentication becomes an indispensable link for maintaining security and promoting cooperation. Whether it is network transaction in the digital domain or social interaction in real life, the correct identification and verification of individual identity is a key ring in building a trusted social basis.
The traditional identity verification technology comprises digital passwords, intelligent cards and the like, and the technologies are very simple to use and deploy, but have the defects of easy loss, forgetfulness, copying, theft and the like. In recent years, with the continuous development of technology, the requirement of identity authentication is higher and higher, so that in order to improve the reliability of identity authentication and the security of user data and information, the identity recognition technology is widely valued, and a plurality of methods are sequentially proposed. The identification method based on the biological characteristics is the direction with the most application and the best effect. Compared with the traditional identity recognition mode, the biological characteristic identity recognition mode generally has the advantages of universality, living body, uniqueness, stability, convenience and the like, and the technology which is relatively mature in the current theoretical research and practical application mainly comprises fingerprint recognition, face recognition, iris recognition and the like, but the recognition is greatly influenced by environment and the like, is inconvenient to use, and is easy to forge and the like.
ECG data is a diagnostic tool for recording cardiac electrical signals. The system records the electric activity of the heart activity of the human body, and an electrocardiogram forms one-dimensional signal representation by measuring and recording the voltage difference of the heart activity on the surface of the human body. Through the recording of the electrocardiogram, doctors can know the electrical activity of the heart, thereby diagnosing various heart diseases. Electrocardiogram has important significance for diagnosing cardiac diseases such as arrhythmia, myocardial infarction, cardiomyopathy and the like. In the prior art, there are also schemes for identification using ECG signals, however, in practical applications, there are some significant drawbacks to these existing schemes:
1. most models have insufficient feature extraction on training data, usually only pay attention to time sequence features in heart beat period, and cannot fully utilize features of space among multicycle components in electrocardiosignal;
2. individuals in some electrocardiographic databases are identified, and finally obtained identification results still cannot meet the requirements, and the identification accuracy still needs to be further improved.
Therefore, in order to cope with the continuous improvement of application scene identification requirements, finding a biometric feature identification technology with higher reliability and wider applicability is a problem to be solved.
Disclosure of Invention
In view of the problems existing in the prior art, the invention provides an ECG identity recognition scheme based on an attention depth residual error network, the extraction of ECG depth features is realized through the attention enhanced depth residual error network, and in addition, model training is carried out by combining Arcface loss functions, so that different types of features are separated and similar features are gathered, thereby improving the accuracy of feature matching, and being obviously superior to the prior art in identity recognition accuracy.
Specifically, the invention provides the following technical scheme:
In one aspect, the present invention provides an ECG identification method based on an attention depth residual network, the method comprising:
s1, acquiring an original electrocardiosignal, and preprocessing to obtain ECG signal data;
S2, ECG signal data are subjected to feature extraction through a feature extraction network to extract final ECG features; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged;
S3, calculating the similarity of the final ECG features and the feature vectors in the ID-feature pair database, and carrying out identity recognition based on a similarity threshold.
Preferably, the pretreatment comprises:
s11, rejecting an original electrocardiosignal with signal quality lower than a quality threshold based on a signal quality analysis result;
s12, filtering and reconstructing the original electrocardiosignals meeting the quality threshold to obtain reconstructed electrocardiosignals;
And S13, carrying out R peak detection and heart beat segmentation on the reconstructed electrocardiosignal to obtain ECG signal data.
Preferably, the S12 further includes:
Filtering the original electrocardiosignal by using discrete wavelet variation, wherein the number of decomposition layers is set to be 5;
Setting the first layer high-frequency component, the second layer high-frequency component and the fifth layer low-frequency component to 0, and adopting soft threshold processing for the third layer low-frequency component, the fourth layer low-frequency component and the fifth layer low-frequency component;
reconstructing the five-layer low-frequency components processed as the reconstructed electrocardiosignals.
Preferably, the multi-scale convolution layer comprises a plurality of parallel convolution units with different convolution kernel sizes, and a feature fusion unit, a GeLu activation unit and a maximum pooling unit which are sequentially connected.
Preferably, the number of the convolution units with different parallel convolution kernel sizes is three, and the convolution kernel sizes are 3×3, 5×5, and 7×7 respectively.
Preferably, the stacked Res2NeXt layers consist of four Res2NeXt layers connected in sequence;
the first Res2NeXt layer is formed by connecting 2 Res2NeXt units with 32 channels in series; the second Res2NeXt layer is made up of 4 Res2NeXt units of channel number 64 in series; the third Res2NeXt layer is formed by 6 Res2NeXt units with 128 channels in series; the fourth Res2NeXt layer is formed by a series connection of 2 Res2NeXt units with 256 channels;
A single said Res2NeXt layer is made up of a plurality of juxtaposed Res2Ne blocks.
Preferably, the attention layer is configured to:
Wherein, Representing channel attention mechanisms,/>Representing the spatial attention mechanism,/>Representing a Sigmoid function, x representing an input,/>A convolution operation is represented, whose convolution kernel size is 7 x 7.
The formula of Sigmoid is as follows:
Preferably, the feature output layer comprises an average pooling unit, a full connection unit and a GeLu activation unit which are connected in sequence.
Preferably, the ArcNet layers are calculated in the following manner:
Wherein, For the weight vector/>And feature vector/>Included angle between/>For the weight vector/>And feature vector/>Included angle between/>S represents a given scaling factor, m represents a weight vector/>And feature vector/>Increasing included angle interval between the two, wherein N represents the batch size of the current training, N represents the category number,/>And the true category corresponding to the sample i.
Preferably, the similarityThe calculation method is as follows:
Wherein n is the characteristic dimension, For the ith dimension value of the sample feature vector to be identified,/>For the corresponding dimension value of the feature vector in the ID-feature database,/>Is the distance between the template feature vector to be identified and the feature vector in the ID-feature pair database. The similarity value range is 0-1.
Preferably, the similarity threshold is calculated by: determining a similarity threshold based on the ERR curve:
an ECG signal of the sample is acquired and its corresponding features are extracted, and feature extraction is performed multiple times (e.g., 10 times) for each identified person. Randomly dividing the features of each identified person according to the ratio of 1:1, registering the features to an ID-feature pair database, and performing feature matching on the rest feature data;
Calculating the similarity between the feature pairs matched each time and marking whether the feature pairs are from the same individual or not;
And drawing an ERR curve by using the calculated similarity and the corresponding label, wherein the corresponding abscissa at the intersection point of the curve is the similarity threshold.
Preferably, the training manner of the feature extraction network is as follows: extracting a network by utilizing the disclosed data set training characteristics, wherein the category number of ArcNet layers of training sets is set to be 1000; a adma optimizer is used in the training phase to minimize the loss function, its parameters are set to alpha=0.001, beta1=0.9, beta2=0.999 and epsilon=10e-8; the network super parameter btach _size is set to 256, the epoch is set to 100, the initial learning rate epsilon=0.001, and the learning rate is reduced to 0.2 times of the original learning rate at the 30 th epoch and the 60 th epoch respectively.
In another aspect, the present invention also provides an ECG identification system based on an attention depth residual network, the system comprising:
the signal acquisition module is used for acquiring original electrocardiosignals;
The signal preprocessing module is used for preprocessing based on the original electrocardiosignal to obtain ECG signal data;
The feature extraction module is used for extracting final ECG features from the ECG signal data through a feature extraction network; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged;
and the comparison and identification module is used for calculating the similarity of the final ECG characteristic and the characteristic vector in the ID-characteristic pair database and carrying out identity identification based on a similarity threshold value.
Preferably, the system further comprises a registration module for associating the final ECG features of the user with the user identity ID and storing in an ID-feature pair database, completing the user registration.
In yet another aspect, the present invention also provides an ECG identification device based on an attention depth residual network, the device comprising: an electrocardiosignal collector, a processor and a memory;
the electrocardiosignal collector is used for collecting original electrocardiosignals;
the processor invokes computer instructions stored in the memory to perform the ECG identification method based on the attention depth residual network as described above.
Compared with the prior art, the method aims at the problems that the existing ECG identity recognition system cannot fully utilize data information, has poor feature extraction capability and limited recognition degree, adopts a depth residual error network with enhanced attention, realizes the depth extraction of ECG data features, performs wavelet filtering and 2-dimensional processing on input data, greatly improves the recognition precision of the ECG identity recognition system, and can reach more than 95% on 50 persons through a test model.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an ECG identification process according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a wavelet threshold denoising process according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an electrocardiograph signal decomposition and reconstruction process according to an embodiment of the present invention;
FIG. 4 is an ECG feature extraction network architecture intent of an embodiment of the present invention;
FIG. 5 is a schematic diagram of Res2NetXt layer structure according to an embodiment of the present invention;
Fig. 6 is a block diagram of a system architecture according to an embodiment of the present invention.
Detailed Description
The invention is further elucidated below in connection with the drawings and the specific embodiments. It should be understood that the described embodiments are only some, but not all, of the embodiments of the invention. 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.
It will be appreciated by those of skill in the art that the following specific embodiments or implementations are provided as a series of preferred arrangements of the present invention for further explanation of the specific disclosure, and that the arrangements may be used in conjunction or association with each other, unless it is specifically contemplated that some or some of the specific embodiments or implementations may not be associated or used with other embodiments or implementations. Meanwhile, the following specific examples or embodiments are merely provided as an optimized arrangement, and are not to be construed as limiting the scope of the present invention.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
According to the scheme, the extraction of the ECG depth features is realized through the attention-enhanced depth residual error network, and in addition, model training is performed by combining Arcface loss, so that different types of features are separated and the same type of features are gathered, the accuracy of feature matching is improved, and the accuracy of identity recognition is remarkably superior to that of the prior art.
With reference to fig. 1, the scheme mainly comprises two stages of registration and identification, wherein both stages need to be subjected to data processing and feature extraction. For the registration phase, the extracted features will be placed in an ID-feature pair database for feature matching and identity verification during the identification phase. The following describes in detail a specific implementation manner of the present solution with reference to specific embodiments:
1. Data preprocessing
In this example, we use a fingertip electrocardiograph to collect the original signal, which has a frequency of 100Hz. Illustratively, the data preprocessing includes several steps of signal quality analysis, filtering, R-peak detection, and heart beat segmentation.
Signal quality analysis:
to improve the usability of the scheme, signal quality analysis techniques will be employed for the input ECG signal, rejecting severely distorted signals.
Illustratively, the signal quality may be calculated and analyzed in combination with a signal quality threshold to remove severely distorted signals. The specific method comprises the following steps: calculating different R peak number values by multiple R thin detection methods, for example, R wave detection of the same electrocardiogram signal by using Hilbert and dynamic adaptive threshold values of R wave detection and wavelet transformation, and respectively detecting R peak number as followsAnd/>The correct R peak number of the electrocardiosignal is/>We calculate the degree of matching/>, of the R peakAs signal quality values:
in this example, we reject data with quality below 0.8. The setting of the specific threshold may be adjusted based on signal quality requirements.
And (II) filtering:
Because the noise such as electromyographic signal interference, baseline drift and the like is received simultaneously in the ECG acquisition process, the original signal needs to be filtered by adopting a proper means.
Illustratively, the present embodiment employs wavelet transforms to filter the ECG signal, as shown in FIG. 2. The wavelet decomposition is to decompose the original signal into a high frequency part and a low frequency part, and then reconstruct the low frequency component An and all the high frequency components Di decomposed the last time to obtain the original signal.
The raw signal is illustratively acquired with an electrocardiographic signal at 1000 sampling points (100 hz,10 s). It is wavelet transformed using Discrete Wavelet Transform (DWT) as shown in fig. 3.
In connection with fig. 3, in the wavelet transform, we set the decomposition layer number to 5, and the specific formula of the set wavelet basis function is as follows:
Wherein, Is generally a tightly supported function,/>The filter coefficients, which are wavelet functions, k represents the number of layers and t represents the input signal.
The low-frequency components obtained by decomposition are A1, A2, A3, A4 and A5; the high frequency components are D1, D2, D3, D4, D5. The noise of the high frequency components of the first layer and the second layer and the low frequency components of the fifth layer are set to 0 by adopting a hard threshold method, namely d1=0, d2=0 and a=0. Soft thresholding is applied to D3, D4 and D5 to obtain D3, D4 and D5. And D5, D4, D3, D2 and D1 are multiplied by the corresponding components respectively and then are overlapped to reconstruct the electrocardiosignal.
Illustratively, the soft thresholding set function soft in this scheme is as follows:
d represents the wavelet coefficients and, Representing a threshold.
The reconstructed electrocardiosignal removes low-frequency baseline drift noise and high-frequency myoelectric interference in the original signal, and provides better data input for subsequent feature extraction.
(III) R peak detection
The ECG R peak detection was performed using the Pan-Tompkins algorithm in this protocol. The method comprises the following specific steps:
1. band-pass filter: the ECG signal is preprocessed using a band pass filter to eliminate uncorrelated noise signals, and to emphasize the QRS waveform,
2. Derivative operation: the filtered signal is derivative-operated to enhance the slope and amplitude of the QRS waveform.
3. Square operation: the peak of the QRS waveform is highlighted by squaring the signal.
4. Moving average filtering: and smoothing the signal subjected to the square operation by using a moving average filter so as to reduce the interference of noise on the detection of the QRS waveform.
5. Threshold detection: a threshold of the QRS waveform is determined to detect the start and end positions of the QRS waveform.
6. Detecting a QRS waveform: the start and end positions of the QRS waveform are detected by comparing the amplitude of the signal to a threshold.
Through the steps, the QRS waveform in the ECG signal can be accurately detected, and the R peak is detected.
(IV) heart beat segmentation
The heart beat segmentation takes an R peak as a datum point, the front of the R peak is intercepted for 0.16 seconds, the rear of the R peak is intercepted for 0.41 seconds, and the intercepted heart beats are spliced into a two-dimensional single-channel image sample of 6 multiplied by 0.57 seconds, so that the differentiation information among different heart beats can be extracted. For stitching, in this example, the truncated data are all 1×0.57 second one-dimensional time series signals, now stitched into a 6×0.57 two-dimensional single channel image signal.
After the above steps we have obtained ECG data.
2. ECG feature extraction
For feature extraction of ECG, the present embodiment uses a specially designed attention-enhanced depth residual network for feature extraction. As shown in connection with fig. 4, the network mainly comprises the following parts: parallel multi-scale pre-convolution, stacked Res2NeXt blocks, attention layer, feature output layer, arcNet layers.
1. Parallel multiscale pre-convolution
The parallel multi-scale pre-convolution layer is composed of three different scale convolution units in parallel, and the convolution kernels of the three convolution units can be set to be, for example, 3×3, 5×5, and 7×7. In the processing of ECG signals, if the primary features are extracted by performing convolution operation only once in a conventional manner, the problem of local feature loss may be caused due to the convolution kernel size and the signal complexity. Therefore, in the scheme, a parallel multi-scale convolution unit mode is adopted for pre-convolution processing, so that multi-scale characteristics of the ECG data are obtained.
Firstly, the preprocessed ECG data are respectively subjected to 3×3,5×5 and 7×7 parallel multi-scale convolution to initially extract multi-scale features in the original data. Then, the extracted multi-scale features are spliced through a feature fusion unit, the spliced features are subjected to GeLu activation function treatment, the treated features are subjected to pooling through a maximum pooling layer to reduce the feature size, and the combined multi-scale features are obtained and used for being input into a stacked Res2NeXt layer.
2. Stacked Res2NeXt layers
Thereafter, we set up stacked Res2NeXt layers, and fully extract depth features in ECG by stacking Res2NeXt layers multiple times to elevate network depth. In this embodiment, the stacked Res2NeXt layers include a plurality of Res2NeXt layers sequentially arranged in series, and in this embodiment, 4 Res2NeXt layers are sequentially arranged from top to bottom.
As the number of layers stacked in the conventional residual network ResNet increases, the gradient in the back propagation process may become extremely small, resulting in a problem of gradient extinction, so that network training becomes more difficult, and a problem of network degradation occurs. In the scheme, the concept of ResNeXt segmentation channel reprocessing and the concept of feature segmentation and re-aggregation of Res2Net are integrated by using Res2NeXt, input features are processed by being delivered to a Res2Net block according to channel segmentation, the features are segmented into a plurality of subsets in the Res2Net block and are sequentially convolved, and meanwhile, the subsets are delivered to the next subset, and finally splicing is carried out. The Res2Net block can extract multi-scale characteristics, and meanwhile, the characterization capability of the model can be improved by a ResNeXt method without increasing computational complexity.
The total of 4 layers of Res2NeXt layers stacked is specifically set as follows: the first layer consists of 2 Res2NeXt blocks with 32 channels in series, the second layer consists of 4 Res2NeXt blocks with 64 channels in series, the third layer consists of 6 Res2NeXt blocks with 128 channels in series, and the fourth layer consists of 2 Res2NeXt blocks with 256 channels in series. In this embodiment, on the basis of the multi-layer stacking arrangement, we reduce the number of channels of Res2NeXt blocks per layer, thereby reducing the risk of overfitting. In this embodiment, each Res2NeXt block is composed of 8 parallel Res2Net blocks, as shown in fig. 5, which is a schematic diagram of the Re2NeXt block structure, and is composed of 8 parallel Res2Net blocks.
3. Attention layer
After the stacked Res2NeXt layers (i.e., immediately following Res2NeXt layer 4), in this embodiment, an attention layer is provided, which employs a convolutional block attention layer to enhance the extracted depth features in both channel and space.
The core goal of the convolution block attention layer is to exploit channel attention and spatial attention to enhance the perceptibility of the model without increasing the complexity of the network, thereby enhancing performance. The input features pass through the channel attention mechanism and the spatial attention mechanism in turn.
The specific model of the convolved block attention layer is as follows:
wherein F is an intermediate quantity, Representing channel attention mechanisms,/>The spatial attention mechanism is represented, and the specific formula is as follows:
Representing a convolution operation with a convolution kernel size of 7 x 7,/> Represents a sigmoid activation function, and x represents an input.
4. Feature output layer
The feature output layer is a fully connected layer responsible for converting the data after previous depth convolutions to 1 x 256 features, the output of which can be regarded as the extracted ECG depth features.
In this embodiment, the feature output layer is composed of a three-layer structure, and as shown in fig. 4, sequentially includes an averaging pooling layer, a fully-connected layer (i.e., FC layer), and GeLu activation layers, so as to output the final ECG depth feature.
5. ArcNet layers
The final ECG depth features are input to the subsequent ArcNet layers. ArcNet is realized through Arcface (Additive Angular Margin Loss) loss function, and the loss function can guide the model to train towards the directions of denser similar samples and more scattered heterogeneous samples, so that the accuracy of identity recognition is improved. In this embodiment, arcNet layers are used as classification layers simultaneously, and the extracted features are converted into classification results for model training. In this embodiment, the ArcNet layer calculation formula is as follows:
Wherein, For the weight vector/>And feature vector/>Included angle between/>For the weight vector/>And feature vector/>Included angle between/>S represents a given scaling factor, m represents a weight vector/>And feature vector/>Increasing included angle interval between the two, wherein N represents the batch size of the current training, N represents the category number,/>And the true category corresponding to the sample i.
And the true category corresponding to the sample i. m represents a weight vector/>And feature vector/>The included angle interval is increased.
The ArcNet layer outputs the final ECG features.
3. Feature matching
And carrying out feature extraction on the input ECG data by adopting the model, and calculating the similarity between feature vectors on the extracted final ECG features. And (3) carrying out final identity recognition through similarity calculation. We first build an ID-feature pair database, collect and pre-process the electrocardiographic data, send it to the above-built network to extract ECG features, and associate the identity ID with the extracted ECG features. For the ECG data to be identified, we input the depth residual network described above, extract its corresponding final ECG feature, and then calculate the similarity between the final ECG feature and the feature vectors in the ID-feature pair database, in this embodiment, the similarityThe calculation adopts the following modes:
where d is the distance between the current feature and the template vector in the ID-feature pair database, n is the feature dimension, For the ith dimension value of the sample feature vector to be identified,/>And the dimension value is corresponding to the model feature vector in the database.
And calculating the features closest to all the ID-feature pair data in the feature library, wherein if the similarity is larger than a given threshold value, the matching can be considered to be successful, otherwise, the matching is identified as a stranger. Meanwhile, in order to improve the accuracy of the identity recognition, each person to be recognized can be registered for multiple times, so that the influence of single-time data deviation on the identity recognition is avoided.
The similarity threshold is given empirically before recognition, and when the threshold is set larger, the system is more careful in identity recognition, and the input information is required to be matched with the information in a preset template or database. This helps to reduce the false recognition rate, i.e. the situation where the identities of different persons are incorrectly recognized as the same person. Therefore, in a scenario where high security is required, such as financial transactions, access control systems, etc., it is beneficial to raise the threshold appropriately. However, too large a threshold setting may also present some problems. First, it may result in a reduced recognition rate, i.e., the system may not correctly recognize the true identity. Particularly when there is a slight difference between the entered information and the preset template, the system may refuse to recognize because the threshold is too high. Second, too high a threshold may increase the difficulty and inconvenience of the user's operation.
Illustratively, the compromised similarity threshold may be determined from the ERR curve: the identified electrocardiosignals are collected in advance and the corresponding characteristics are extracted, and each identified person extracts 10 characteristics. Randomly dividing the features of each identified person according to the ratio of 1:1, registering the features in an ID-feature pair database, carrying out feature matching on the rest, calculating the similarity between the feature pairs matched each time, and marking whether the feature pairs are from the same individual or not. And drawing an ERR curve by using the calculated similarity and the corresponding label, wherein the corresponding abscissa at the intersection point of the curve is the threshold value of the compromise, namely the probability that the true sample is judged to be false is the same as the probability that the false sample is judged to be true. And then the threshold value can be adjusted appropriately according to the identification requirement, the threshold value can be improved when the accuracy of identification is required, and the threshold value can be reduced when the identification is required to be fast and convenient.
4. Training of network models
In this embodiment, the optimizer chooses adma to minimize the loss function during the training of the network model, and its parameters are set to alpha=0.001, beta1=0.9, beta2=0.999 and epsilon=10e-8. The network super parameter btach _size is set to 256, the epoch is set to 100, the initial learning rate epsilon=0.001, and the learning rate is reduced to 0.2 times of the original learning rate at the 30 th epoch and the 60 th epoch respectively. And in the early stage of training, a convergence network model is accelerated to be trained by using a larger initial learning rate, and then the learning rate is reduced, so that the network model is optimized and converged. The feature vector dimension of the feature extraction network for extracting the electrocardiosignal is set to 256 dimensions. The loss function is over-parametrized s=64 and m=0.5.
Model training is performed by using the existing network public data set, the output of ArcNet is set to be 1000, namely 1000 classification is performed on training set data to train the model, after full training, the classification result is verified in a test set, when the classification accuracy reaches 99%, the model can be considered to have full feature extraction capability, and the features output by a feature output layer can be used as depth features of input data for subsequent feature matching.
Based on the same test conditions and data objects, the scheme is compared with the existing scheme in an experiment, and the result is as follows:
Therefore, in several schemes for comparison, the scheme has the highest closed set accuracy and open set AUC value, and the identification effect is optimal.
In yet another embodiment, the present solution may also be implemented in a system, and the specific structure of the system is shown in fig. 6. The system comprises:
the signal acquisition module is used for acquiring original electrocardiosignals;
The signal preprocessing module is used for preprocessing based on the original electrocardiosignal to obtain ECG signal data;
The feature extraction module is used for extracting final ECG features from the ECG signal data through a feature extraction network; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged;
and the comparison and identification module is used for calculating the similarity of the final ECG characteristic and the characteristic vector in the ID-characteristic pair database and carrying out identity identification based on a similarity threshold value.
Preferably, the system further comprises a registration module for associating the final ECG features of the user with the user identity ID and storing in an ID-feature pair database, completing the user registration.
Further, the system may also include an output module to output the identification result, for example. The output module can be in a display, printing or other modes, and can also be connected with other user terminals (such as mobile phones, portable computers and the like) in a wired or wireless mode so as to facilitate the viewing of the identification result.
Illustratively, the system may further include a database module to build an ID-feature pair database. The specific database establishment mode can adopt the ID-feature pair acquisition and storage mode used in the previous embodiment. The ID indicates user registration ID information.
The system may further include a network model training module for training the established feature extraction network, where the training mode of the network may be the network model training method as described in the previous embodiment.
In yet another embodiment, the present solution may be implemented by means of an apparatus, which may include corresponding modules performing each or several of the steps in the above embodiments. Thus, each step or several steps of the various embodiments described above may be performed by a respective module, and the electronic device may include one or more of these modules. A module may be one or more hardware modules specifically configured to perform the respective steps, or be implemented by a processor configured to perform the respective steps, or be stored within a computer-readable medium for implementation by a processor, or be implemented by some combination.
The device may be implemented using a bus architecture. The bus architecture may include any number of interconnecting buses and bridges depending on the specific application of the hardware and the overall design constraints. The bus connects together various circuits including one or more processors, memories, and/or hardware modules. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, external antennas, and the like.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiment of the present invention. The processor performs the various methods and processes described above. For example, method embodiments in the present solution may be implemented as a software program tangibly embodied on a machine-readable medium, such as a memory. In some embodiments, part or all of the software program may be loaded and/or installed via memory and/or a communication interface. One or more of the steps of the methods described above may be performed when a software program is loaded into memory and executed by a processor. Alternatively, in other embodiments, the processor may be configured to perform one of the methods described above in any other suitable manner (e.g., by means of firmware).
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random-access Memory (Random Access Memory, RAM), or the like.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any changes or substitutions easily contemplated by those skilled in the art within the scope of the present invention should be included in the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. An ECG identification method based on an attention depth residual network, the method comprising:
s1, acquiring an original electrocardiosignal, and preprocessing to obtain ECG signal data;
S2, ECG signal data are subjected to feature extraction through a feature extraction network to extract final ECG features; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged;
S3, calculating the similarity of the final ECG features and the feature vectors in the ID-feature pair database, and carrying out identity recognition based on a similarity threshold.
2. The method of claim 1, wherein the preprocessing comprises:
s11, rejecting an original electrocardiosignal with signal quality lower than a quality threshold based on a signal quality analysis result;
s12, filtering and reconstructing the original electrocardiosignals meeting the quality threshold to obtain reconstructed electrocardiosignals;
And S13, carrying out R peak detection and heart beat segmentation on the reconstructed electrocardiosignal to obtain ECG signal data.
3. The method according to claim 2, wherein S12 further comprises:
Filtering the original electrocardiosignal by using discrete wavelet variation, wherein the number of decomposition layers is set to be 5;
Setting the first layer high-frequency component, the second layer high-frequency component and the fifth layer low-frequency component to 0, and adopting soft threshold processing for the third layer low-frequency component, the fourth layer low-frequency component and the fifth layer low-frequency component;
reconstructing the five-layer low-frequency components processed as the reconstructed electrocardiosignals.
4. The method of claim 1, wherein the multi-scale convolution layer comprises a plurality of parallel convolution units with different convolution kernel sizes, and a feature fusion unit, geLu activation unit and a max pooling unit connected sequentially.
5. The method of claim 1, wherein the stacked Res2NeXt layers consist of four Res2NeXt layers connected in sequence;
the first Res2NeXt layer is formed by connecting 2 Res2NeXt units with 32 channels in series; the second Res2NeXt layer is made up of 4 Res2NeXt units of channel number 64 in series; the third Res2NeXt layer is formed by 6 Res2NeXt units with 128 channels in series; the fourth Res2NeXt layer is formed by a series connection of 2 Res2NeXt units with 256 channels;
A single said Res2NeXt layer is made up of a plurality of juxtaposed Res2Ne blocks.
6. The method of claim 1, wherein the attention layer is configured to:
Wherein, Representing channel attention mechanisms,/>Representing the spatial attention mechanism,/>Representing a Sigmoid function, x representing an input,/>A convolution operation is represented, whose convolution kernel size is 7 x 7.
7. The method of claim 1, wherein the feature output layer comprises an averaging pooling unit, a full connection unit, and a GeLu activation unit connected in sequence.
8. The method of claim 1, wherein the ArcNet layers are calculated by:
Wherein, For the weight vector/>And feature vector/>Included angle between/>For the weight vector/>And feature vector/>Included angle between/>S represents a given scaling factor, m represents a weight vector/>And feature vector/>Increasing included angle interval between the two, wherein N represents the batch size of the current training, N represents the category number,/>And the true category corresponding to the sample i.
9. An ECG identification system based on an attention depth residual network, the system comprising:
the signal acquisition module is used for acquiring original electrocardiosignals;
The signal preprocessing module is used for preprocessing based on the original electrocardiosignal to obtain ECG signal data;
The feature extraction module is used for extracting final ECG features from the ECG signal data through a feature extraction network; the feature extraction network comprises a parallel multi-scale convolution layer, a stacked Res2NeXt layer, an attention layer, a feature output layer and a ArcNet layer which are sequentially arranged;
and the comparison and identification module is used for calculating the similarity of the final ECG characteristic and the characteristic vector in the ID-characteristic pair database and carrying out identity identification based on a similarity threshold value.
10. An ECG identification device based on an attention depth residual network, the device comprising: an electrocardiosignal collector, a processor and a memory;
the electrocardiosignal collector is used for collecting original electrocardiosignals;
the processor invokes computer instructions stored in the memory to perform the ECG identification method based on the attention depth residual network as claimed in any one of claims 1 to 8.
CN202410363062.2A 2024-03-28 2024-03-28 ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network Active CN117958813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410363062.2A CN117958813B (en) 2024-03-28 2024-03-28 ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410363062.2A CN117958813B (en) 2024-03-28 2024-03-28 ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network

Publications (2)

Publication Number Publication Date
CN117958813A true CN117958813A (en) 2024-05-03
CN117958813B CN117958813B (en) 2024-06-18

Family

ID=90864634

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410363062.2A Active CN117958813B (en) 2024-03-28 2024-03-28 ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network

Country Status (1)

Country Link
CN (1) CN117958813B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110832596A (en) * 2017-10-16 2020-02-21 因美纳有限公司 Deep convolutional neural network training method based on deep learning
CN111488793A (en) * 2020-02-21 2020-08-04 广州视源电子科技股份有限公司 Electrocardiosignal classification method and device, electronic equipment and storage medium
CN112883803A (en) * 2021-01-20 2021-06-01 武汉中旗生物医疗电子有限公司 Deep learning-based electrocardiosignal classification method and device and storage medium
CN115544476A (en) * 2022-09-23 2022-12-30 吉林大学 ECG identity recognition method, device, electronic equipment and storage medium
CN115836330A (en) * 2020-07-10 2023-03-21 Oppo广东移动通信有限公司 Action identification method based on depth residual error network and related product
WO2023097315A1 (en) * 2021-11-29 2023-06-01 Icahn School Of Medicine At Mount Sinai Systems and methods for electrocardiogram deep learning interpretability
CN116305048A (en) * 2023-03-07 2023-06-23 杭州电子科技大学 Identity recognition method based on improved residual error shrinkage network
CN116580278A (en) * 2023-05-18 2023-08-11 内蒙古大学 Lip language identification method, equipment and storage medium based on multi-attention mechanism
CN116883429A (en) * 2023-07-07 2023-10-13 哈尔滨理工大学 Liver and liver tumor segmentation method based on parallel residual attention
CN117132831A (en) * 2023-09-01 2023-11-28 矿业大学(北京)内蒙古研究院 Depth residual error network model for coal gangue identification, coal gangue identification method and system
CN117171634A (en) * 2023-07-31 2023-12-05 吉林大学 ECG (ECG) identity recognition method based on multi-scale feature selection fusion residual error network

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110832596A (en) * 2017-10-16 2020-02-21 因美纳有限公司 Deep convolutional neural network training method based on deep learning
CN111488793A (en) * 2020-02-21 2020-08-04 广州视源电子科技股份有限公司 Electrocardiosignal classification method and device, electronic equipment and storage medium
CN115836330A (en) * 2020-07-10 2023-03-21 Oppo广东移动通信有限公司 Action identification method based on depth residual error network and related product
CN112883803A (en) * 2021-01-20 2021-06-01 武汉中旗生物医疗电子有限公司 Deep learning-based electrocardiosignal classification method and device and storage medium
WO2023097315A1 (en) * 2021-11-29 2023-06-01 Icahn School Of Medicine At Mount Sinai Systems and methods for electrocardiogram deep learning interpretability
CN115544476A (en) * 2022-09-23 2022-12-30 吉林大学 ECG identity recognition method, device, electronic equipment and storage medium
CN116305048A (en) * 2023-03-07 2023-06-23 杭州电子科技大学 Identity recognition method based on improved residual error shrinkage network
CN116580278A (en) * 2023-05-18 2023-08-11 内蒙古大学 Lip language identification method, equipment and storage medium based on multi-attention mechanism
CN116883429A (en) * 2023-07-07 2023-10-13 哈尔滨理工大学 Liver and liver tumor segmentation method based on parallel residual attention
CN117171634A (en) * 2023-07-31 2023-12-05 吉林大学 ECG (ECG) identity recognition method based on multi-scale feature selection fusion residual error network
CN117132831A (en) * 2023-09-01 2023-11-28 矿业大学(北京)内蒙古研究院 Depth residual error network model for coal gangue identification, coal gangue identification method and system

Also Published As

Publication number Publication date
CN117958813B (en) 2024-06-18

Similar Documents

Publication Publication Date Title
Hammad et al. A novel two-dimensional ECG feature extraction and classification algorithm based on convolution neural network for human authentication
Chu et al. ECG authentication method based on parallel multi-scale one-dimensional residual network with center and margin loss
CN107980151B (en) Access control system based on electrocardio authentication and authentication method thereof
CN108460318B (en) Identity authentication/identification method and equipment based on electrocardiosignals
CN111481192B (en) Electrocardiosignal R wave detection method based on improved U-Net
CN101828921A (en) Identity identification method based on visual evoked potential (VEP)
El Boujnouni et al. A wavelet-based capsule neural network for ECG biometric identification
Khan et al. Electrocardiogram heartbeat classification using convolutional neural networks for the detection of cardiac Arrhythmia
Bastos et al. Double authentication model based on ppg and ecg signals
Kuila et al. Feature extraction of electrocardiogram signal using machine learning classification
Alajlan et al. Fusion of fingerprint and heartbeat biometrics using fuzzy adaptive genetic algorithm
Zhang et al. Practical human authentication method based on piecewise corrected Electrocardiogram
CN109919050B (en) Identity recognition method and device
CN117958813B (en) ECG (ECG) identity recognition method, system and equipment based on attention depth residual error network
Wu et al. Gram Matrix-Based Convolutional Neural Network for Biometric Identification Using Photoplethysmography Signal
CN112257573B (en) ECG identity recognition method based on t-SNE and Adaboost
Wu et al. Research on personal identity verification based on convolutional neural network
CN116189247A (en) Multi-mode identity authentication system based on multiple pulse waves and veins and authentication method thereof
CN111444489B (en) Double-factor authentication method based on photoplethysmography sensor
Yi et al. ECG Biometrics Based on Attention Enhanced Domain Adaptive Feature Fusion Network
Malepati et al. Portable ECG Device for Remote Monitoring and Detection of Onset of Arrhythmia
Mohan et al. A nature‐inspired meta‐heuristic paradigm for person identification using multimodal biometrics
Zhao et al. Enhancing Electrocardiogram Identity Recognition using Convolutional Neural Networks with a Multi-Similarity Loss Model
Fatimah et al. Analysis of ECG for biometric identification
Mousavi Fusion of ECG and PPG signals in apply to spoof detection and biometric authentication

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