Premature beat recognition method based on improved convolutional neural network

By improving the convolutional neural network model and combining the SimAM attention mechanism, the problem of low accuracy of manual extraction features is solved, high-accuracy premature beat recognition is achieved, and the recognition effect of electrocardiogram pathological information is improved.

CN114886436BInactive Publication Date: 2024-11-22GUANGXI NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210507194.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2024-11-22
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing premature beat recognition methods have low accuracy by manually extracting features, especially for features with smaller amplitude in the electrocardiogram, which are susceptible to high-frequency noise, affecting subsequent classification performance.

Method used

Adopt an improved convolutional neural network model, including convolutional layer, maximum pooling layer, residual unit block and global average pooling layer, combined with SimAM attention mechanism, reduce the depth and width of the model, enhance the feature extraction ability, and avoid manual extraction Deficiencies in characteristics.

Benefits of technology

The accuracy of premature beat recognition is improved, and the sensitivity, specificity and accuracy rate are more than 90%, which improves the accurate reflection of electrocardiogram pathological information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114886436B_ABST
    Figure CN114886436B_ABST
Patent Text Reader

Abstract

The present invention discloses a premature beat recognition method based on an improved convolutional neural network, and proposes a premature beat recognition model based on an improved convolutional neural network. First, a constructed ventricular premature beat recognition model is trained using training samples, and then the predicted samples are sent to the trained ventricular premature beat recognition model to achieve the classification of the electrocardiogram to be classified. The present invention improves the original ResNet34 model from the depth and width of the model, and then integrates the SimAM attention mechanism into the improved ResNet model, so as to improve the accuracy of premature beat recognition by using this model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of premature beat recognition, and in particular to a premature beat recognition method based on an improved convolutional neural network. Background Art

[0002] Arrhythmia is a common cardiovascular disease in clinic, and premature beats are the most common arrhythmia. By introducing computer-assisted premature beat analysis technology, doctors can carry out effective medical intervention as early as possible, which plays a very important role in the prevention and treatment of diseases. It can also solve the problem of scarce medical resources in remote mountainous areas and the inability to enjoy basic medical services to a certain extent.

[0003] Traditional premature beat recognition methods such as traditional neural networks, support vector machines, and rule-based reasoning all require manual extraction of electrocardiogram (ECG) features before classification. The accuracy of feature extraction is a key factor affecting the performance of traditional premature beat classification methods. However, features with smaller amplitudes in the ECG, such as P waves, T waves, and QRS wave boundary points, are easily affected by high-frequency noise. The extraction accuracy of such features is relatively low, resulting in the inability of manually extracted features to accurately reflect the pathological information of the ECG itself, thereby affecting the subsequent classification performance. Summary of the invention

[0004] The present invention aims to solve the problem that the existing premature beat recognition method adopts the method of manually extracting features and cannot accurately reflect the pathological information of ECG itself, thereby affecting the subsequent classification performance, and provides a premature beat recognition method based on an improved convolutional neural network.

[0005] To solve the above problems, the present invention is achieved through the following technical solutions:

[0006] The premature beat recognition method based on the improved convolutional neural network includes the following steps:

[0007] Step 1: Construct a premature beat recognition model;

[0008] The above-mentioned premature beat recognition model consists of 1 convolution layer, 1 maximum pooling layer, 4 residual unit blocks and 1 global average pooling layer; the input of the convolution layer is used as the input of the premature beat recognition model, the output of the convolution layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first residual unit block, the output of the first residual unit block is connected to the input of the second residual unit block, the output of the second residual unit block is connected to the input of the third residual unit block, the output of the third residual unit block is connected to the input of the fourth residual unit block, the output of the fourth residual unit block is connected to the input of the global average pooling layer, and the output of the global average pooling layer is used as the output of the premature beat recognition model;

[0009] Step 2: pre-process the labeled and classified electrocardiograms as training samples, and use the training samples to train the premature beat recognition model constructed in step 1 to obtain a trained premature beat recognition model;

[0010] Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.

[0011] In the above scheme, the first residual unit block is composed of two direct jump residual modules; wherein the input of the first direct jump residual module is used as the input of the first residual unit block, the output of the first direct jump residual module is connected to the input of the second direct jump residual module, and the output of the second direct jump residual module is used as the output of the first residual unit block; the second residual unit block is composed of one convolutional jump residual module and one direct jump residual module; wherein the input of the first convolutional jump residual module is used as the input of the second residual unit block, the output of the first convolutional jump residual module is connected to the input of the third direct jump residual module, and the output of the third direct jump residual module is used as the output of the second residual unit block; the third residual unit block is composed of one convolutional jump residual module and one direct jump residual module. The fourth residual unit block is composed of one convolutional jump residual module and one direct jump residual module; the input of the third convolutional jump residual module is used as the input of the fourth residual unit block, the output of the second convolutional jump residual module is connected to the input of the fourth direct jump residual module, the output of the fourth direct jump residual module is connected to the input of the fifth direct jump residual module, and the output of the fifth direct jump residual module is used as the output of the third residual unit block; the fourth residual unit block is composed of one convolutional jump residual module and one direct jump residual module; the input of the third convolutional jump residual module is used as the input of the fourth residual unit block, the output of the third convolutional jump residual module is connected to the input of the sixth direct jump residual module, and the output of the sixth direct jump residual module is used as the output of the fourth residual unit block.

[0012] In the above scheme, the direct skip residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 direct skip branch; the input of the first convolutional layer and the direct skip branch are used as the input of the direct skip residual module, the output of the first convolutional layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the first SimAM attention mechanism layer, and the output of the first SimAM attention mechanism layer and the output of the direct skip branch are added as the output of the direct skip residual module.

[0013] In the above scheme, the convolutional jump residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 convolutional jump branch; the input of the third convolutional layer and the convolutional jump branch are used as the input of the convolutional jump residual module, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, the output of the fourth convolutional layer is connected to the input of the second SimAM attention mechanism layer, and the output of the second SimAM attention mechanism layer and the output of the convolutional jump branch are added as the output of the convolutional jump residual module.

[0014] Compared with the prior art, the present invention improves the original ResNet34 model in terms of the depth and width of the model, and then integrates the SimAM attention mechanism into the improved ResNet model to improve the accuracy of premature beat recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 This is a structural diagram of the premature beat recognition model NewResNet34.

[0016] Figure 2 Schematic diagram of the structure of SimAM’s attention mechanism layer. DETAILED DESCRIPTION

[0017] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific examples.

[0018] A premature beat recognition method based on an improved convolutional neural network comprises the following steps:

[0019] Step 1: Build a premature beat recognition model.

[0020] A deep neural network is an end-to-end learning model that can automatically learn signal features from raw input data, avoiding the traditional method of manually extracting features. Considering that the number of network layers of deep learning is too deep, it may cause serious overfitting of the network model. Therefore, the present invention reduces the number of layers of ResNet34 and the number of feature maps of each convolution module. In addition, considering that SimAM (Parameter-Free Attention Module) is an attention mechanism that does not require additional parameters, is simple in concept and very effective, it can infer 3D weight values ​​from the current neuron, solving the problem that most of the existing attention mechanisms can only refine features in one dimension in the channel or space, and lack flexibility in spaces where channels and spaces change simultaneously. Therefore, the present invention incorporates the SimAM attention mechanism into the improved ResNet model.

[0021] Based on the above analysis, the premature beat recognition model NewResNet34 constructed by the present invention improves the original ResNet34 model in terms of model depth and width, and then integrates the SimAM attention mechanism into the improved ResNet34 model. Figure 1 As shown, the premature beat recognition model NewResNet34 consists of 1 convolution layer (conv), 1 maximum pooling layer (max pool), 4 residual unit blocks and 1 global average pooling layer (avg pool). The input of the convolution layer is used as the input of the premature beat recognition model, the output of the convolution layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first residual unit block, the output of the first residual unit block is connected to the input of the second residual unit block, the output of the second residual unit block is connected to the input of the third residual unit block, the output of the third residual unit block is connected to the input of the fourth residual unit block, the output of the fourth residual unit block is connected to the input of the global average pooling layer, and the output of the global average pooling layer is used as the output of the premature beat recognition model.

[0022] The 4 residual unit blocks are respectively composed of 2, 2, 3, and 2 residual modules connected in series. The first residual unit block is composed of 2 direct jump residual modules; wherein the input of the first direct jump residual module is used as the input of the first residual unit block, the output of the first direct jump residual module is connected to the input of the second direct jump residual module, and the output of the second direct jump residual module is used as the output of the first residual unit block. The second residual unit block is respectively composed of 1 convolutional jump residual module and 1 direct jump residual module; wherein the input of the first convolutional jump residual module is used as the input of the second residual unit block, the output of the first convolutional jump residual module is connected to the input of the third direct jump residual module, and the output of the third direct jump residual module is used as the output of the second residual unit block. The third residual unit block is composed of 1 convolutional jump residual module and 2 direct jump residual modules; wherein the input of the second convolutional jump residual module is used as the input of the third residual unit block, the output of the second convolutional jump residual module is connected to the input of the fourth direct jump residual module, the output of the fourth direct jump residual module is connected to the input of the fifth direct jump residual module, and the output of the fifth direct jump residual module is used as the output of the third residual unit block. The fourth residual unit block is composed of 1 convolutional jump residual module and 1 direct jump residual module; wherein the input of the third convolutional jump residual module is used as the input of the fourth residual unit block, the output of the third convolutional jump residual module is connected to the input of the sixth direct jump residual module, and the output of the sixth direct jump residual module is used as the output of the fourth residual unit block.

[0023] Each residual module consists of 2 convolutional layers (conv), 1 SimAM attention mechanism layer and 1 skip branch. The SimAM attention mechanism layer is shown in Figure 2As shown. The input vector x of the SimAM attention mechanism layer is passed through the SimAM attention mechanism to obtain the weight value e of each neuron in the output input vector x t Then use the weight value e t Multiplying the input vector x gets the output y of the SimAM attention mechanism layer. There are two types of jump branches: one is represented by a solid line, which is a direct jump branch. The input and output of the direct jump branch are identically mapped, which constitutes a direct jump residual module; the other is represented by a dotted line, which is a convolutional jump branch. The input of the convolutional jump branch passes through a 1*1 convolutional layer to obtain the output of the convolutional jump branch, which constitutes a convolutional jump residual module.

[0024] The direct skip residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 direct skip branch; the input of the first convolutional layer and the direct skip branch are used as the input of the direct skip residual module, the output of the first convolutional layer is connected to the input of the second convolutional layer, the output of the second convolutional layer is connected to the input of the first SimAM attention mechanism layer, and the output of the first SimAM attention mechanism layer and the output of the direct skip branch are added as the output of the direct skip residual module.

[0025] The convolutional jump residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 convolutional jump branch; the input of the third convolutional layer and the convolutional jump branch are used as the input of the convolutional jump residual module, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, the output of the fourth convolutional layer is connected to the input of the second SimAM attention mechanism layer, and the output of the second SimAM attention mechanism layer and the output of the convolutional jump branch are added as the output of the convolutional jump residual module.

[0026] In all convolutional layers and maximum pooling layers, "1*7" or "1*3" indicates the size of the convolution kernel of the convolutional layer, "36", "60", "80" or "128" indicates the number of feature maps of the convolutional layer, and " / 1" or " / 2" indicates the moving step of the convolutional layer.

[0027] Step 2: Preprocess the labeled and classified electrocardiograms as training samples, and use the training samples to train the premature beat recognition model constructed in step 1 to obtain a trained premature beat recognition model.

[0028] The preprocessing process of ECG mainly uses filters to remove noise such as baseline drift and power frequency interference in ECG. The classification marked in the electrocardiogram is premature beat or non-premature beat.

[0029] Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.

[0030] The preprocessing method for the ECG to be classified is the same as the preprocessing method for the ECG with the labeled classification. The output of the prediction sample after the model is the premature beat or non-premature beat class record.

[0031] The performance of the present invention is described below through a specific example:

[0032] The Chinese Cardiovascular Disease Database (CCDD database, http: / / 58.210.56.164 / ccdd / ) was used as the basis, and the ECG records in the database were first denoised by a 0.5-40 Hz bandpass filter.

[0033] Since the premature beat classification of the present invention is a binary classification problem (premature beat or non-premature beat class), sensitivity (Se), specificity (Sp), and accuracy (Acc) can be used to measure the quality of the classification effect. The confusion matrix of the binary classification is shown in Table 1 below.

[0034] Table 1 Confusion matrix

[0035]

[0036]

[0037] The definitions of each indicator are as follows:

[0038] Sensitivity (Se):

[0039] Se=TP / (TP+FN)

[0040] Specificity (Sp):

[0041] Sp=TN / (TN+FP)

[0042] Accuracy (Acc):

[0043] Acc=(TP+TN) / (TP+TN+FP+FN)

[0044] 1) Identification of premature ventricular contractions (PVCs)

[0045] 35840 preprocessed ECG records were used as training samples, including 3112 PVC records. 141046 preprocessed ECG records were used as test samples, including 2148 PVC records. After the NewResNet34 model was trained using the training samples, the results of the trained model on the test samples are shown in Table 2 below, where NPVC represents non-ventricular premature beat records, PVC represents ventricular premature beat records, Se represents sensitivity, Sp represents specificity, and Acc represents accuracy.

[0046] Table 2 PVC identification results

[0047]

[0048] 2) Identification of premature atrial beats (PAB)

[0049] 44,800 preprocessed ECG records were used as training samples, including more than 4,000 PAB records; 132,087 preprocessed ECG records were used as test samples, including 4,172 PAB records. After the NewResNet34 model was trained using the improved training samples, the results obtained by the trained model on the test samples are shown in Table 2 below, where NAPB represents non-atrial premature beats, APB represents atrial premature beats, Se represents sensitivity, Sp represents specificity, and Acc represents accuracy.

[0050] Table 3 APB recognition results

[0051]

[0052] It can be seen from Tables 2 and 3 that the sensitivity, specificity and accuracy of the premature beat recognition model ResNet34 proposed in the present invention for classifying electrocardiograms all reached more than 90%.

[0053] It should be noted that although the embodiments of the present invention described above are illustrative, they are not intended to limit the present invention, and therefore the present invention is not limited to the above specific embodiments. Without departing from the principles of the present invention, any other embodiments obtained by those skilled in the art under the guidance of the present invention are deemed to be within the protection of the present invention.

Claims

1. The premature beat recognition method based on improved convolutional neural network is characterized by: The steps include: Step 1: Construct a premature beat recognition model; The above-mentioned premature beat recognition model consists of 1 convolution layer, 1 maximum pooling layer, 4 residual unit blocks and 1 global average pooling layer; the input of the convolution layer is used as the input of the premature beat recognition model, the output of the convolution layer is connected to the input of the maximum pooling layer, the output of the maximum pooling layer is connected to the input of the first residual unit block, the output of the first residual unit block is connected to the input of the second residual unit block, the output of the second residual unit block is connected to the input of the third residual unit block, the output of the third residual unit block is connected to the input of the fourth residual unit block, the output of the fourth residual unit block is connected to the input of the global average pooling layer, and the output of the global average pooling layer is used as the output of the premature beat recognition model; The first residual unit block is composed of two direct jump residual modules respectively; wherein the input of the first direct jump residual module is used as the input of the first residual unit block, the output of the first direct jump residual module is connected to the input of the second direct jump residual module, and the output of the second direct jump residual module is used as the output of the first residual unit block; The second residual unit block is composed of one convolutional jump residual module and one direct jump residual module; the input of the first convolutional jump residual module is used as the input of the second residual unit block, the output of the first convolutional jump residual module is connected to the input of the third direct jump residual module, and the output of the third direct jump residual module is used as the output of the second residual unit block; The third residual unit block is composed of one convolutional jump residual module and two direct jump residual modules; the input of the second convolutional jump residual module is used as the input of the third residual unit block, the output of the second convolutional jump residual module is connected to the input of the fourth direct jump residual module, the output of the fourth direct jump residual module is connected to the input of the fifth direct jump residual module, and the output of the fifth direct jump residual module is used as the output of the third residual unit block; The fourth residual unit block is composed of one convolutional jump residual module and one direct jump residual module; wherein the input of the third convolutional jump residual module is used as the input of the fourth residual unit block, the output of the third convolutional jump residual module is connected to the input of the sixth direct jump residual module, and the output of the sixth direct jump residual module is used as the output of the fourth residual unit block; The direct skip residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 direct skip branch. The input of the first convolutional layer and the direct skip branch are used as the input of the direct skip residual module. The output of the first convolutional layer is connected to the input of the second convolutional layer. The output of the second convolutional layer is connected to the input of the first SimAM attention mechanism layer. The output of the first SimAM attention mechanism layer and the output of the direct skip branch are added together as the output of the direct skip residual module. The convolutional skip residual module consists of 2 convolutional layers, 1 SimAM attention mechanism layer and 1 convolutional skip branch; the input of the third convolutional layer and the convolutional skip branch are used as the input of the convolutional skip residual module, the output of the third convolutional layer is connected to the input of the fourth convolutional layer, the output of the fourth convolutional layer is connected to the input of the second SimAM attention mechanism layer, and the output of the second SimAM attention mechanism layer and the output of the convolutional skip branch are added as the output of the convolutional skip residual module; Step 2: pre-process the labeled and classified electrocardiograms as training samples, and use the training samples to train the premature beat recognition model constructed in step 1 to obtain a trained premature beat recognition model; Step 3: Preprocess the electrocardiogram to be classified as a prediction sample, and send the prediction sample to the premature beat recognition model trained in step 2 to classify the electrocardiogram to be classified.