An Identity Recognition Method Based on Improved Residual Shrinking Network
By improving the residual shrinkage network, the problem of accurate identification of ECG signals in noisy environments was solved, achieving high identification accuracy and fast identification, and improving the model's adaptability and generalization ability.
Patent Information
- Application Number
- CN202310241627.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-03-07
AI Technical Summary
Existing ECG signal recognition technologies struggle to accurately extract reference points in portable devices due to noise interference, leading to a decrease in identity recognition accuracy. Furthermore, traditional methods are susceptible to spoofing attacks in complex environments.
An improved residual shrinkage network is adopted, which constructs an improved residual module, convolutional layer, dropout layer, batch normalization layer and fully connected layer, and combines attention mechanism and soft thresholding to achieve adaptive noise resistance and feature extraction, and build a lightweight network to improve recognition accuracy.
High recognition accuracy and fast recognition were achieved in noisy environments, improving the model's adaptability and generalization ability while reducing model complexity.
Smart Images

Figure CN116305048B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of electrocardiogram signal processing technology and relates to an identity recognition method based on an improved residual contraction network. Background Technology
[0002] With the rapid development of the information society, traditional identification methods such as ID cards and passwords are no longer suitable for high-security living and working environments. The ubiquitous smart sensor devices and the development and application of advanced signal processing and deep learning technologies have led to an explosive growth in biometric authentication technologies, playing a vital role in many fields, such as fingerprint and facial recognition for smartphones and watches, and iris recognition and voice authentication for security doors. However, the rise of artificial intelligence has brought uncertainties to these authentication methods with technologies such as AI face-swapping, fingerprint replication, and speech synthesis. Therefore, exploring a technology that can further leverage the high security and privacy advantages of biometric identification is particularly important.
[0003] As a biological biometric feature, electrocardiogram (ECG) signals are generated through complex mechanisms, making them difficult to steal or forge, and unlikely to be forgotten or lost. Their universality, uniqueness, stability, and measurability fully meet the basic requirements for identity verification. With the continuous exploration and research in the field of biometric identification technology by scholars both domestically and internationally, a biometric identification technology based on ECG signals has rapidly become a research hotspot due to its high anti-counterfeiting, high security, and high privacy characteristics. Many scholars at home and abroad consider it the biometric identification technology with the greatest potential for high security.
[0004] In 2001, Biel et al. first completed a study on the classification and recognition of ECG signals in individuals by using reference point features in the time and frequency domains of ECG signals as extracted information. In 2005, Israel et al. extracted 15 attributes from a 20-second ECG sample, including the time intervals between P, Q, R, S, and T waves of the heartbeat waveform, as well as the start and offset points of the corresponding waveforms, achieving a recognition rate of 98%. Considering the significant drawback of the reference point feature extraction method, namely the need to pre-locate the reference point in the ECG signal waveform, and the fact that ECG signals in portable acquisition devices used in daily life often contain a lot of noise, making it difficult to locate the reference point, in 2005, Saechia S et al. pioneered the application of Fourier transform to the entire cardiac cycle, and applied it to the P, QRS, and T segments respectively. Non-reference point methods that utilize the entire or partial ECG signal to extract waveform morphology-related features began to enter the researchers' field of vision, and corresponding signal processing methods such as Fourier transform, wavelet transform, and discrete cosine transform were widely used in ECG signals. In 2011, F. Sufi et al. converted multiple heartbeat segments into two-dimensional images, applying two-dimensional feature extraction from image analysis to ECG identification and classification. In recent years, thanks to the continuous development of deep learning, techniques such as data augmentation, optimization, and transfer learning have enhanced the application capabilities of model recognition. In 2019, Hou et al. established a neural network autoencoder model based on long short-term memory neural networks and autoencoders, achieving a classification accuracy of 99.74% on abnormal heartbeats. In 2021, Liu Xin achieved deep feature classification based on low-dimensional ECG signal representation using a scale-feature long short-term memory neural network.
[0005] This invention focuses on the study of raw electrocardiogram (ECG) signal samples without excessive preprocessing, and selects a suitable identity recognition model from aspects such as sample data quality assessment, network model improvement, and comparison of identity recognition models. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies by providing an identity recognition method based on an improved residual shrinkage network.
[0007] Firstly, an identity recognition method based on an improved residual shrinking network is provided, comprising the following steps:
[0008] Step (1): Obtain labeled one-dimensional electrocardiogram signals, the labels being yes or no, as a dataset; split the dataset into a training set and a test set according to a certain ratio;
[0009] Step (2): Construct an improved residual network MRSN, with one-dimensional electrocardiogram signal as input and identity recognition result as output; and train and test it.
[0010] The improved residual shrinkage network includes, in sequence, six residual modules, a convolutional layer, a Dropout layer, a batch normalization layer (BN), a Flatten layer, a first fully connected layer, and a second fully connected layer.
[0011] The architecture of the first through sixth residual modules is the same. Each residual module includes a main path, branch paths, and a first fusion layer.
[0012] The main path includes a first convolutional module, a second convolutional module, a soft thresholding processing submodule based on an attention mechanism, and a scale layer. The one-dimensional ECG signal received by the first convolutional module is pre-activated by activation functions ReLU and BN (batch normalization), then features are extracted through convolution, and the features are output to the second convolutional module and the branch. The second convolutional module receives the features processed by the first convolutional module, pre-activates them by activation functions ReLU and BN (batch normalization), extracts features through convolution, and finally outputs the features to the soft thresholding processing submodule based on an attention mechanism and the scale layer.
[0013] The attention-based soft thresholding submodule includes a max pooling layer, a first fully connected layer, a batch normalization (BN) layer, a Leaky ReLU activation function, a second fully connected layer, a Sigmoid activation function, and a second fusion layer; specifically:
[0014] The max pooling layer uses the max pooling function (GMP) to extract sampling point features that highlight the ECG signal characteristics from the features processed by the second convolutional module. The first fully connected layer performs fully connected (FC) processing on the sampling point features extracted by the max pooling layer, and then learns a soft threshold for the features through batch normalization (BN) and the LeakyReLU activation function. The second fully connected layer performs FC processing on the soft threshold of the learned features, and then generates coefficients α through the Sigmoid activation function. c The fusion layer calculates the coefficient α from the sampling point features extracted by the max pooling layer and the Sigmoid activation function coefficients. c Multiply the results to obtain the adaptive threshold λ;
[0015] The Scale layer denoises the output of the second convolutional module using a threshold.
[0016] The branch includes a max pooling layer and a zero-fill operation layer connected in series to perform signal dimension matching on a one-dimensional electrocardiogram signal.
[0017] The first fusion layer merges the outputs of the main path and the branch path;
[0018] Step (3): Use the trained and tested improved residual network MRSN to perform identity recognition on the acquired raw one-dimensional electrocardiogram signal;
[0019] In a second aspect, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method described thereon.
[0020] Thirdly, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method.
[0021] The beneficial effects of this invention are:
[0022] This invention proposes an identity recognition technology based on one-dimensional electrocardiogram (ECG) signals. Focusing on noisy, unprocessed ECG signals, it conducts in-depth research from three aspects: sample data quality assessment, network model improvement, and comparison of identity recognition models. ECG signal quality assessment effectively filters qualified ECG signals from the original dataset. For unqualified data samples, only basic preprocessing such as segmentation and classification is performed without adding other denoising methods, thus testing the automatic noise reduction function of the improved residual shrinking network. Through improvements to the residual shrinking network, it is adapted to one-dimensional ECG signals, exhibiting strong adaptability and high recognition accuracy. This invention improves the model's recognition speed and generalization ability while maintaining a high recognition rate by employing lightweight networks or model pruning methods. Attached Figure Description
[0023] Figure 1 Architecture diagram for improving the residual shrinkage network MRSN;
[0024] Figure 2 This is the architecture diagram of the residual module;
[0025] Figure 3 For the quality assessment effect, (a) represents qualified data and (b) represents unqualified data;
[0026] Figure 4 Let be the confusion matrix of the convolutional neural network model, where (a) is the training set and (b) is the test set;
[0027] Figure 5 To improve the confusion matrix of the residual shrinkage network model, where (a) is the training set and (b) is the test set;
[0028] Figure 6 The figures show the accuracy curves, where (a) is the accuracy curve of the convolutional neural network and (b) is the accuracy curve of the improved residual shrinkage network.
[0029] Figure 7The figures show the loss curves, where (a) is the loss curve of the convolutional neural network and (b) is the loss curve of the improved residual shrinkage network. Detailed Implementation
[0030] The present invention will be further analyzed below with reference to the accompanying drawings and specific embodiments.
[0031] An identity recognition method based on an improved residual shrinking network includes the following steps:
[0032] Step (1): Obtain labeled one-dimensional electrocardiogram signals, the labels being yes or no, as a dataset; split the dataset into a training set and a test set according to a certain ratio;
[0033] The one-dimensional electrocardiogram (ECG) signal includes ECG signals with quality level assessment results of qualified and unqualified. The indicators for assessing the quality of ECG signals are divided into three categories, which are analyzed from the perspectives of frequency distribution, power spectrum magnitude, and RR period signal characteristics of the ECG waveform. The quality level assessment process specifically involves calculating six signal quality assessment indices (SQIs) and using these six SQIs as input to a random forest classifier to classify the quality of the ECG signals and assess whether they are qualified or unqualified.
[0034] Six quality characteristic indices that can reflect the quality level of electrocardiogram (ECG) signals are as follows:
[0035] (1) Signal frequency skewness s_sqi. Skewness measures the asymmetry of a signal distribution around its average value. In ECG signals, when excessive noise causes uneven waveform distribution, the calculated skewness value will be larger. The formula is:
[0036]
[0037] In the formula μ x Let x be the average value of the electrocardiogram signal, and σ be the variance of the signal x.
[0038] (2) Signal kurtosis k_sqi. Kurtosis is an indicator used to characterize the peak value of a signal at its average value; in a signal waveform, it is represented by the sharpness of the peak. The formula is:
[0039]
[0040] (3) Frequency Spectrum Distribution Index p_sqi. The frequency spectrum distribution index calculates the frequency spectrum distribution of the QRS complex in the ECG signal. The QRS complex, as the energy center frequency band of the ECG signal, carries important energy characteristics of this signal segment. Its power spectral density is compared with the power of the entire ECG signal frequency band. The formula is:
[0041]
[0042] (4) Baseline Power Spectrum Index (bas_sqi). The baseline power spectrum index calculates the ratio of the baseline power to the overall ECG signal power. The baseline power range in ECG signals is typically 0–1 Hz, while the overall ECG signal power ranges from 0–40 Hz. When baseline drift exists in the ECG signal, the value of bas_sqi will decrease; without baseline drift, bas_sqi will be close to 1. The formula is:
[0043]
[0044] (5) RR Interval Variability Index c_sqi. This performance evaluation index is mainly based on the RR interval variability of the ECG signal. This is primarily manifested in the fact that when artifacts exist, the QRS interval may have missing R peaks or misidentify noise peaks as R peaks, leading to high variability in the RR interval distribution. In other words, the stability of the interval is measured by the variation index of the identified R peaks.
[0045] The formula is:
[0046]
[0047] In the formula and c_sqi represents the standard deviation and mean of the ECG signal within the RR interval, respectively. A larger c_sqi indicates higher variability within the RR interval and a more unstable signal.
[0048] (6) R-peak matching index q_sqi. Two different R-peak matching algorithms are used. The matching degree of the R-peaks identified by the two algorithms is calculated respectively. The formula is:
[0049]
[0050] In the formula, R1, R2, and matched R These represent the number of R-peaks detected by R-peak identification algorithm 1, the number of R-peaks detected by R-peak identification algorithm 1, and the number of identical R-peaks detected by the two R-peak detection algorithms, respectively.
[0051] Using the SQI criteria listed above as input, a random forest classifier is used to divide the data samples into two main categories: acceptable quality and unacceptable quality. For example... Figure 3 As shown.
[0052] Step (2): Construction Figure 1 Improve the residual network MRSN, and train and test it;
[0053] The improved residual shrinking network MRSN is a variant of the convolutional neural network, with one-dimensional electrocardiogram signals as input and identity recognition results as output.
[0054] The improved residual shrinkage network includes, in sequence, the first to sixth residual modules, a convolutional layer, a Dropout layer, a batch normalization layer (BN), a Flatten layer, a first fully connected layer, and a second fully connected layer;
[0055] The architecture of the first to sixth residual modules is the same, such as Figure 2 Each residual module includes a main path, branch paths, and a first fusion layer.
[0056] The main path includes a first convolutional module, a second convolutional module, a soft thresholding processing submodule based on an attention mechanism, and a scale layer. The one-dimensional ECG signal received by the first convolutional module is pre-activated by activation functions ReLU and BN (batch normalization), then features are extracted through convolution, and the features are output to the second convolutional module and the branch. The second convolutional module receives the features processed by the first convolutional module, pre-activates them by activation functions ReLU and BN (batch normalization), extracts features through convolution, and finally outputs the features to the soft thresholding processing submodule based on an attention mechanism and the scale layer.
[0057] The attention-based soft thresholding submodule includes a max pooling layer, a first fully connected layer, a batch normalization (BN) layer, a Leaky ReLU activation function, a second fully connected layer, a Sigmoid activation function, and a second fusion layer; specifically:
[0058] The max pooling layer uses the max pooling function (GMP) to extract sampling point features that highlight the ECG signal characteristics from the features processed by the second convolutional module. The first fully connected layer performs fully connected (FC) processing on the sampling point features extracted by the max pooling layer, and then learns a soft threshold for the features through batch normalization (BN) and the LeakyReLU activation function. The second fully connected layer performs FC processing on the soft threshold of the learned features, and then generates coefficients α through the Sigmoid activation function. c The fusion layer calculates the coefficient α from the sampling point features extracted by the max pooling layer and the Sigmoid activation function coefficients. c Perform multiplication.
[0059] The adaptive threshold λ is obtained;
[0060] In the formula, λ represents the adaptive threshold. This represents the absolute value of the average value of the output feature vector, where i, j, and c represent the dimensions of the feature vector.
[0061] The Scale layer denoises the output of the second convolutional module using a threshold.
[0062] The branch includes a max pooling layer and a zero-fill operation layer connected in series to perform signal dimension matching on a one-dimensional electrocardiogram signal.
[0063] The first fusion layer merges the outputs of the main path and the branch path; specifically:
[0064] y l =h(x l )+F(x l W l )
[0065] In the formula y l x is the output after residual fusion. l h(x) is the input to the model. l ) represents the branch output; F(x) l W l ) is the main output, W l Convolution operations on the main path;
[0066] Max pooling function calculation formula:
[0067]
[0068] Where kernel_size represents the window size for max pooling; stride represents the stride of the max pooling window, with a default value of kernel_size; padding represents the number of layers to pad each edge with zeros; dilation represents a parameter that controls the stride of elements in the window; L in Indicates the input signal; L out This represents the output after pooling;
[0069] LeakyReLU activation function formula:
[0070]
[0071] Where X represents the input signal, x represents the horizontal coordinate of the signal, and α represents the coefficient, which is typically taken as 0.01;
[0072] During training, cross-entropy was used as the loss function to calculate the loss value between the output identity label and the target identity label of the improved residual network MRSN model. The rmsprop optimization algorithm was selected as the optimization algorithm, and the learning rate was set to 0.001. The model training was completed after 200 iterations.
[0073] Cross-entropy loss function formula: In the formula, N represents the sample size, and f(x) i ) represents the real label, y i This represents the probability predicted by the model;
[0074] rmsprop optimization algorithm:
[0075] Take m samples {x1, x2, ..., xn} from the training set. m The small batch size corresponds to the target y. i
[0076] Calculate the gradient:
[0077] Cumulative squared gradient: r←ρr+(1-ρ)g⊙g
[0078] Calculation parameter update:
[0079] Application update: θ←θ+Δθ
[0080] Step (3): Use the trained and tested improved residual network MRSN to perform identity recognition on the acquired raw one-dimensional electrocardiogram signal;
[0081] The experimental data used in this invention comes from ECG one-dimensional electrocardiogram data samples collected by MIT-BIH. The number of samples in each training set is N=10500, the number of iterations is M=200, and the learning rate is set to 0.001. After one-hot encoding, the test set and training set are split in a 1:3 ratio, and the accuracy (Acc) and F1 score are used as indicators to evaluate the model performance.
[0082] Based on the performance metrics proposed above, performance experiments were conducted on a one-dimensional convolutional neural network and the improved residual shrinkage network MRSN of this invention, resulting in two main types of confusion matrices. Figure 4 , Figure 5 As shown in the confusion matrix, even when data samples with quality assessments of qualified and unqualified are used as input to the improved residual shrinkage network model, effective data features can still be obtained after passing through a sub-network with soft thresholding and attention mechanism, and its classification performance is very good.
[0083] A comparative evaluation of the network structure and performance of a one-dimensional convolutional neural network (CNN) and the improved residual shrinkage network (MRSN) of this invention was conducted. The one-dimensional CNN used for comparison in the experimental study employed only two fully connected layers for data computation. Computation within fully connected layers increases the network's feature extraction capability, compensating for the limitation on adding too many convolutional layers for information extraction, while avoiding the large number of network parameters and long recognition time caused by an excessive number of fully connected layers. Furthermore, each convolutional layer was followed by a Dropout layer and a BN layer to reduce overfitting and gradient vanishing. The comparative residual shrinkage network alleviated the aforementioned problems caused by network structure through skip connections. However, due to its more complex network structure, primarily manifested in the addition of an extra residual path and the introduction of a soft-thresholding attention mechanism, the network complexity is higher, resulting in a significantly larger number of network parameters compared to the CNN. The specific number of model parameters is shown in Table 2 below.
[0084] Table 2 Parameter Quantities of Two Network Models
[0085]
[0086] As shown in the table above, the improved residual shrinking network has more network model parameters than the convolutional neural network. However, we don't need to worry that this increased number of parameters will significantly impact the model's generalization ability or lead to overfitting. This is because the number of network parameters is not significantly larger than the order of magnitude of the training samples. On the contrary, it brings more data features to the residual shrinking network, resulting in higher accuracy on the test set. The accuracy and loss curves of the different network models are shown above. Figure 6 , Figure 7 As shown in the figure, the two parameters, loss and accuracy, need to be closely monitored during network training. Loss reflects the difference between the network's training result and the true value, while accuracy reflects the model's recognition ability. With increasing iterations, these two curves help to check for overfitting during training and whether the learning rate is appropriate. A continuously decreasing loss value indicates that the network is converging towards its minimum, and continuously increasing accuracy indicates that the network's convergence direction is correct. As can be seen from the figure, after a certain number of iterations, the loss value no longer decreases, and the accuracy no longer increases, gradually flattening out. Comparing the two models, we can see that on the loss curve, the improved residual shrinking network decreases faster and more significantly after fewer iterations, indicating that this network model is trained better and has a lower loss value. The accuracy curve also shows that the improved residual shrinking network converges faster and then flattens out, outperforming the convolutional neural network in recognition accuracy. To better compare the performance of the two types of models, Table 3 below lists three performance metrics for comparison.
[0087] Table 3 Performance Comparison of the Two Models
[0088]
Claims
1. An identity recognition method based on an improved residual shrinking network, characterized in that... Includes the following steps: Step (1): Obtain labeled one-dimensional electrocardiogram signals, the labels being yes or no, as a dataset; split the dataset into a training set and a test set according to a certain ratio; Step (2): Construct an improved residual network MRSN, with one-dimensional electrocardiogram signal as input and identity recognition result as output; and train and test it. The improved residual shrinkage network includes, in sequence, six residual modules, a convolutional layer, a Dropout layer, a batch normalization layer (BN), a Flatten layer, a first fully connected layer, and a second fully connected layer. The architecture of the first through sixth residual modules is the same. Each residual module includes a main path, branch paths, and a first fusion layer. The main path includes a first convolutional module, a second convolutional module, a soft thresholding processing submodule based on an attention mechanism, and a scale layer. The one-dimensional electrocardiogram signal received by the first convolutional module is pre-activated by activation functions ReLU and BN, and then features are extracted through convolution. The features are then output to the second convolutional module and the branch. The second convolutional module receives the features processed by the first convolutional module, pre-activates them by activation functions ReLU and BN, extracts features through convolution, and finally outputs the features to the soft thresholding processing submodule based on an attention mechanism and the scale layer. The attention-based soft thresholding submodule includes a max pooling layer, a first fully connected layer, a batch normalization (BN) layer, a Leaky ReLU activation function, a second fully connected layer, a Sigmoid activation function, and a second fusion layer; specifically: The max pooling layer extracts sampling point features that highlight the ECG signal characteristics from the features processed by the second convolution module using the max pooling function; the first fully connected layer processes the sampling point features extracted by the max pooling layer using full-joint (FC) processing, and then learns the soft threshold of the features using BN and the Leaky ReLU activation function. The second fully connected layer performs soft-thresholding processing on the learned features, and then generates coefficients α using the Sigmoid activation function. c The second fusion layer calculates the coefficient α from the sampling point features extracted by the max pooling layer and the Sigmoid activation function coefficients. c Multiply the results to obtain the adaptive threshold λ; The Scale layer denoises the output of the second convolutional module using a threshold. The branch includes a max pooling layer and a zero-fill operation layer connected in series to perform signal dimension matching on a one-dimensional electrocardiogram signal. The first fusion layer merges the outputs of the main path and the branch path; Step (3): Use the trained and tested improved residual network MRSN to perform identity recognition on the acquired raw one-dimensional electrocardiogram signal.
2. The method according to claim 1, characterized in that... Step (1) The one-dimensional ECG signal includes ECG signals with quality level assessment results of qualified and unqualified; the quality level assessment process specifically involves calculating six signal quality assessment indices (SQIs), using the above six signal quality assessment indices (SQIs) as input to a random forest classifier to complete the quality classification of the ECG signal, so as to assess qualified and unqualified ECG signals; the six signal quality assessment indices (SQIs) include signal frequency skewness (s_sqi), signal kurtosis (k_sqi), frequency spectrum distribution index (p_sqi), baseline power spectrum index (bas_sqi), RR interval variability index (c_sqi), and R peak matching index (q_sqi).
3. The method according to claim 1, characterized in that... The second fusion layer specifically satisfies the following formula: In the formula, λ represents the adaptive threshold. This represents the absolute value of the average value of the output feature vector, where i, j, and c represent the dimensions of the feature vector.
4. The method according to claim 1, characterized in that... The first fusion layer is specifically: y l =h(x l )+F(x l ,W l ) In the formula y l x is the output after residual fusion. l h(x) is the input to the model. l ) represents the branch output; F(x) l W l ) is the main output, W l Convolution operations on the main path.
5. The method according to claim 1, characterized in that... Max pooling function calculation formula: Where kernel_size represents the window size for max pooling; stride represents the stride of the max pooling window, with a default value of kernel_size; padding represents the number of layers to pad each edge with zeros; dilation represents a parameter that controls the stride of elements in the window; L in Indicates the input signal; L out This represents the output after pooling.
6. The method according to claim 1, characterized in that... LeakyReLU activation function formula: Where X represents the input signal, x represents the horizontal coordinate of the signal, and α represents the coefficient.
7. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to perform the method of any one of claims 1-6.
8. A computing device comprising a memory and a processor, wherein the memory stores executable code, and the processor, when executing the executable code, implements the method of any one of claims 1-6.
Citation Information
Patent Citations
High-generalization electrocardiosignal identity authentication method
CN110008674A
Network abnormal flow detection method, model and system
CN112784881A