# Deep Learning-Based ECG Abnormality Identification Prediction and Analysis

Authors: Weiqian Liang
Journal: Journal of Sensors
 (2022)

---

## Abstract

In recent years, China’s economy has been developing rapidly, and people’s life and quality of life have been improving; more importantly, people’s habits and living habits have also developed from the previous “unhygienic” and “not very careful” to the current “Healthier, more hygienic, greener and more sophisticated” direction. In the process of this development, due to the rapid development of the economy and the industrialization of cities, the incidence of heart disease is also increasing year by year. According to relevant studies, China’s urbanization process has been unprecedented, the number of urbanized people in China has exploded in recent years, and the ratio of urban to rural population has increased from about 20 percent to about 75 percent today. The effects of the population and the urbanization of urban architecture are affecting people’s physical and mental health, both consciously and unconsciously, causing both positive and negative physical and mental effects on the psychological and physical levels. In this paper, the concept of deep learning is fully utilized to train the CNN neural network model and apply it to the ECG abnormality recognition and prediction examination. In order to fully validate the application and significance of deep learning in ECG abnormality identification and prediction, the whole project was completed through subjective and objective experiments. The experimental results show that, from the subjective aspect, the ECG examination has been accepted by most people for different age groups, and the analysis results of the ECG examination with the deep learning model in this paper are more satisfactory; from the objective aspect, the CNN-ECG abnormality recognition prediction network model trained in this paper has high. The accuracy of the model for ECG abnormality recognition prediction can reach 86% when the learning rate is set to 0.0001 and the batch size is set to 120, and the model can reduce the burden of medical personnel to a certain extent.


---

## Body

## 1. Introduction

The heart is a very important component of our human organism [1]. According to related studies, the incidence of major diseases is much higher in first-tier cities than in smaller cities [2]. There are many reasons for this phenomenon, one of which is the urban pollution and the fact that in the process of urbanization, only economic development is emphasized without paying attention to the human factor, and a large number of tall buildings are erected but the construction of urban greenery is neglected; all these factors lead to the aggravation of urban pollution, and more importantly, people live in a depressing environment without humanistic care for a long time, which greatly affects the human body. This can lead to depression and boredom and lack of emotional release and healing, which is also one of the important factors that lead to the emergence of physical health [3].The heart, as the “source of everything” in the human body, not only controls the operation of the whole body but also acts as the “commander-in-chief” and “master controller” of blood circulation; so, many diseases in the human body may be related to the heart. Therefore, many diseases in the human body may be related to the healthy operation of the heart, such as coronary heart disease, chest tightness and shortness of breath, and cardiac arrhythmia [4]. According to a study [5], some patients suffer from stomach problems for years, and then during the treatment process, they have been taking medicines that harmonize the stomach and promote digestion and absorption, and after a period of treatment, the patient’s stomach disease improved, but pathological phenomena such as chest tightness and shortness of breath and arrhythmias appeared. After deducing that the patient’s stomach disease was probably a “minor illness” and a distress signal sent by the heart through the stomach, the doctor arranged for the patient to be hospitalized and undergo an electrocardiogram (ECG). The doctor later arranged for the patient to have a 24-hour ambulatory electrocardiogram and a cardiogram and finally deduced that the patient had unintentionally developed symptoms of coronary artery blockage but eventually got better after the corresponding treatment. Through the above case study, it is known that in real life, many diseases are likely to be related to the heart; so, regular cardiac examination is worthy of attention as well as essential [6].And ECG, as a very common way to check the health of the heart, plays a very important role in the process of confirming many diseases [7]. The research on ECG abnormalities is also advancing year by year, such as a research scholar specifically for the analysis of ECG abnormalities in the elderly population [8]; in the paper, the authors firstly analyzed the relevant basic data and clarified the criteria to be used and the determination of the index observation and then used the method of organizing and analyzing the data through statistical methods. The final results of the experiment showed that the number of people with abnormal ECG results was about 1800 out of 3,000 elderly medical examinations, accounting for more than 60%, which shows that ECG examination is extremely important for the safety of human health. In addition, some researchers have conducted ECG abnormalities in different age groups of pregnant women, and the authors firstly analyzed the data and methods implemented in the ECG examination of pregnant women and performed ECG abnormalities in all pregnant women using the conventional 18-lead tracing method. It was found that the ECG of pregnant women at different ages had more or less problems, especially in the middle and late stages of pregnancy, and this study has a positive meaning and reference significance for both pregnant women and fetuses, because pregnant women with ECG abnormalities can receive timely attention and effective treatment.In summary, due to the continuous development and expansion of social economy, people’s lifestyle has also undergone radical changes, the process of urbanization has also been promoted unprecedentedly due to the rapid expansion of the economy, and it is due to the influence of the abovementioned factors that many cities do not want “green and natural harmony” ecological construction as long as the economic development. Long-term life in the lack of green health will lead to a depressed mood, which will lead to human health problems. As a result of the above analysis, the diagnosis of many diseases is ultimately related to the health of the heart; so, the study of ECG abnormalities is one of the most important academic research on human health and life [9].However, most of the studies and methods on ECG abnormalities nowadays are focused on specific populations or specific drugs, and these studies generally select certain target populations as the subject of investigation and research, then perform ECG examinations on them, and then discuss and analyze the examination results through corresponding statistical techniques. The results of such studies have a certain target audience and are to some extent one-sided. Because heart problems are not only age-related but also related to other factors such as regional environment, the study of ECG abnormalities should be more comprehensive and have more target audiences, and secondly, the identification and prediction of ECG abnormalities in the general population are an important tool for the prevention of heart problems.


## 2. Background of the Study

### 2.1. Modes of Cardiac Screening and Its Importance

The importance of the heart to human health in life cannot be overstated, and regular medical examination of the heart is one of the most important ways to focus on the health and safety of life. There are many ways to examine the heart, and one of the most common and routine ways is the electrocardiogram. It is often used to find out whether a patient has arrhythmia or myocardial ischemia and is one of the most widely used cardiac examinations for clinical diagnosis in major hospitals. There are various forms of ECG, including cardiac ultrasound, 24-hour ambulatory ECG, exercise panel test, and coronary CT [10].The first is the cardiac ultrasound, which is also known as color Doppler echocardiography; in the diagnosis of patients first by using an ultrasound probe to scan the patient’s chest, which in turn can obtain images of heart sections in different directions of the same patient’s heart, and not only that, the operator can also obtain parameters related to the patient’s heart function through the device, and in combination with the above images and based on these images and parameters, a comprehensive evaluation of the patient’s heart can be performed to determine whether there are any abnormalities in the heart function and to provide a reference basis for the subsequent treatment [11]. After obtaining an ultrasound image of the heart, the clinician can also analyze in detail whether the blood flow distribution in the heart is normal and whether the echogenic signal of the heart is within a reasonable range to obtain a comprehensive assessment of the patient’s heart function [12]. Among them, cardiac ultrasound not only helps physicians to determine the patient’s condition more rationally but also to determine more accurately whether there is myocardial insufficiency and other complications caused by myocardial problems in the patient’s heart.The second is the 24-hour ambulatory electrocardiogram. A 24-hour ECG is performed by wearing a special recorder for 24 hours, which is used to record all changes in the activity of the heart and in the quiet state, in order to check all indicators of the heart. With the help of 24-hour ambulatory ECG, all changes that occur in the patient’s heart over a 24-hour period can be recorded to capture in great detail the various abnormalities that occur in the heart and also to record the changes in the relevant indicators when the abnormalities occur, providing a certain medical basis for the subsequent diagnosis and treatment of abnormal heart problems [13].The third modality is the routine ECG examination. Routine ECG is a very common and basic item in the body’s own examination program, it can quickly respond to obvious abnormalities in the heart, such as arrhythmia or myocardial ischemia, but it is more difficult to detect some abnormalities that are not obvious, and some patients’ heart abnormalities are likely to be intermittent; so, when routine ECG is done, heart abnormalities are not always detected [13].The last type is the exercise plate test. As shown in the test, the patient has to walk on a treadmill-like plate, but unlike a normal treadmill, the speed and gradient of the exercise plate can be adjusted, so that the physician can test the patient’s exercise load by using the device with the appropriate walking speed and different gradients, and the patient’s heart rate, blood pressure, and heart rate can be measured during or after the exercise [14]. The patient’s heart rate, blood pressure, and ECG changes are observed during and after exercise [15].


### 2.2. Significance of ECG Abnormality Identification for Human Health

The heart is known to be a very important organ in the human body, and it is also extremely fragile, and if it is not cared for in a timely manner and checked regularly, then heart problems can easily lead to sudden death [16]. In addition, the heart is closely related to the quality of human life, as every beat of the heart is working for blood. The heart is the “pump” that allows nutrients and oxygen from the blood vessels to reach all parts of the body easily, so that the human body can maintain normal operation. An electrocardiogram is a common clinical test for heart disease. It is an important way to measure and diagnose the presence of abnormalities in the heart. Therefore, the prediction and analysis of ECG abnormality identification are a meaningful study in itself and are able to provide some medical basis for the development of ECG examination as a program [17].In summary, in this paper, a specific dataset will be formed by collecting ECG data related to the study subject and then using deep learning methods to estimate and predict and analyze the accuracy of the collected dataset.


## 2.1. Modes of Cardiac Screening and Its Importance

The importance of the heart to human health in life cannot be overstated, and regular medical examination of the heart is one of the most important ways to focus on the health and safety of life. There are many ways to examine the heart, and one of the most common and routine ways is the electrocardiogram. It is often used to find out whether a patient has arrhythmia or myocardial ischemia and is one of the most widely used cardiac examinations for clinical diagnosis in major hospitals. There are various forms of ECG, including cardiac ultrasound, 24-hour ambulatory ECG, exercise panel test, and coronary CT [10].The first is the cardiac ultrasound, which is also known as color Doppler echocardiography; in the diagnosis of patients first by using an ultrasound probe to scan the patient’s chest, which in turn can obtain images of heart sections in different directions of the same patient’s heart, and not only that, the operator can also obtain parameters related to the patient’s heart function through the device, and in combination with the above images and based on these images and parameters, a comprehensive evaluation of the patient’s heart can be performed to determine whether there are any abnormalities in the heart function and to provide a reference basis for the subsequent treatment [11]. After obtaining an ultrasound image of the heart, the clinician can also analyze in detail whether the blood flow distribution in the heart is normal and whether the echogenic signal of the heart is within a reasonable range to obtain a comprehensive assessment of the patient’s heart function [12]. Among them, cardiac ultrasound not only helps physicians to determine the patient’s condition more rationally but also to determine more accurately whether there is myocardial insufficiency and other complications caused by myocardial problems in the patient’s heart.The second is the 24-hour ambulatory electrocardiogram. A 24-hour ECG is performed by wearing a special recorder for 24 hours, which is used to record all changes in the activity of the heart and in the quiet state, in order to check all indicators of the heart. With the help of 24-hour ambulatory ECG, all changes that occur in the patient’s heart over a 24-hour period can be recorded to capture in great detail the various abnormalities that occur in the heart and also to record the changes in the relevant indicators when the abnormalities occur, providing a certain medical basis for the subsequent diagnosis and treatment of abnormal heart problems [13].The third modality is the routine ECG examination. Routine ECG is a very common and basic item in the body’s own examination program, it can quickly respond to obvious abnormalities in the heart, such as arrhythmia or myocardial ischemia, but it is more difficult to detect some abnormalities that are not obvious, and some patients’ heart abnormalities are likely to be intermittent; so, when routine ECG is done, heart abnormalities are not always detected [13].The last type is the exercise plate test. As shown in the test, the patient has to walk on a treadmill-like plate, but unlike a normal treadmill, the speed and gradient of the exercise plate can be adjusted, so that the physician can test the patient’s exercise load by using the device with the appropriate walking speed and different gradients, and the patient’s heart rate, blood pressure, and heart rate can be measured during or after the exercise [14]. The patient’s heart rate, blood pressure, and ECG changes are observed during and after exercise [15].


## 2.2. Significance of ECG Abnormality Identification for Human Health

The heart is known to be a very important organ in the human body, and it is also extremely fragile, and if it is not cared for in a timely manner and checked regularly, then heart problems can easily lead to sudden death [16]. In addition, the heart is closely related to the quality of human life, as every beat of the heart is working for blood. The heart is the “pump” that allows nutrients and oxygen from the blood vessels to reach all parts of the body easily, so that the human body can maintain normal operation. An electrocardiogram is a common clinical test for heart disease. It is an important way to measure and diagnose the presence of abnormalities in the heart. Therefore, the prediction and analysis of ECG abnormality identification are a meaningful study in itself and are able to provide some medical basis for the development of ECG examination as a program [17].In summary, in this paper, a specific dataset will be formed by collecting ECG data related to the study subject and then using deep learning methods to estimate and predict and analyze the accuracy of the collected dataset.


## 3. Materials and Methods

### 3.1. Evaluation Indicators of ECG Abnormalities

In medicine, heart problems can be diagnosed by whether the ECG is abnormal or not. If a human body experiences symptoms such as chest tightness, shortness of breath, chest discomfort, or chest pain, it is generally recommended to have an ECG examination to determine whether there is a problem with the heart. Therefore, ECG examination is of great significance in confirming the diagnosis of whether a patient is suffering from a heart-related disease. And the presence of abnormal ECG problems can be diagnosed by observing the following indicators [18].


#### 3.1.1. Atrial Flutter and Atrial Fibrillation

Atrial flutter and atrial fibrillation are two of the two symptoms that produce abnormalities in the heart. In the case of atrial fibrillation, the most common cause of this symptom is due to arrhythmia, which is manifested on the ECG by the absence of the p-wave that should be present in a normal cardiac examination and the production of an F-wave of a different shape and size instead, where the F-wave, also known medically as a fibrillation wave, is one of the most important indicators to confirm the presence of a heart rate market. In addition, if atrial fibrillation is diagnosed, the QRS waves in the ECG will be of unequal spacing and will be completely irregular and chaotic. In atrial flutter, if the heart rate is as high as 250 to 350 beats per minute, then atrial flutter is judged to be present. Atrial flutter is an arrhythmia of the heart rate, most of which occurs in the atria, and is manifested in the ECG by the absence of P-waves and the presence of flutter waves. Unlike fibrillation waves, flutter waves are also an F-wave, but they appear in the same shape, size, and spacing.(1)
Preexcitation syndrome: it is caused by premature excitation of the ventricular muscle and is manifested on the ECG by a shortened P-R interval and a series of abnormal widened QRS waves(2)
Ventricular tachycardia: this symptom is caused by structural changes in the heart organ and is a serious heart disease. It is characterized by more than three or more premature ventricular beats in the electrocardiogram, and instead of a P-wave, a QRS wave with a width of more than 0.12 s is generated, accompanied by secondary ST-T changes, and the frequency of these changes is between 110 and 200 beats per minute. Another type of ventricular tachycardia is torsional ventricular tachycardia. As the name implies, ventricular tachycardia is obviously associated with arrhythmias, and torsional ventricular tachycardia is caused by various reasons that lead to prolonged ventricular repolarization, which results in a prolonged Q-T interval on the electrocardiogram and a wide frontal P-wave deformity, so that the QRS wave group flips up and down from the baseline(3)
Block: there are many different types of supracardiac block, including double bundle branch block, first degree block, second degree type I AV block, left bundle branch block, right bundle branch block, and complete AV block. Bifascicular block is a condition that affects the conduction of fibers that transmit electrical signals in the subendocardium of the ventricle, resulting in a lack of cardiac function, and is characterized by a significantly higher number of QRS waves than normal on the electrocardiogram, as well as aberrations and slower frequency. Complete atrioventricular block, on the other hand, is caused by the complementary effects of the ventricles and atria working separately. In this case, the most characteristic feature is that the atrial frequency is significantly higher than the ventricular frequency, while the ventricular block is usually below the usual site and the frequency beats between forty and sixty times per minute; so, the ventricular frequency is mostly slow, but the QRS wave groups are basically normal


### 3.2. Deep Learning for ECG Examination

In the last decade, deep learning has gradually developed better and started to play its role and significance in various fields, and it is no less important in the medical field. Deep learning has been developed not only in image processing and target detection but also in the field of medicine, where it has been applied to promote the development of medicine and contribute to the safety of human life. For example, some researchers have applied deep learning methods to medical image analysis [19], in which the authors mainly improved the DenseNet neural network to adapt it to the medical imaging field and introduced the U-Net network to the original DenseNet neural network. The improved DenseNet neural network model is trained by preprocessing the virus data set using the principle of image enhancement, which can be applied to other virus sample data sets with a little processing. It can be seen that the ECG examination with deep learning not only has a certain accuracy but also the portability in deep learning brings a broad prospect for the development and application of ECG examination under deep learning.


### 3.3. Overview of ECG Abnormality Identification and Prediction with Deep Learning

Deep learning is a special kind of “machine learning,” which is one of the learning modes included in the field of artificial intelligence. For deep learning, it can represent the world as a nested hierarchy with certain concepts and certain meanings by imitating human learning and thinking behaviors, so that it can obtain a powerful ability and good flexibility to realize the connection of every unknown and known concept: the more abstract concepts and matters through certain “equations. The process of training and connecting every unknown and known concept, and connecting the more abstract concepts and matters through a certain “equation,” which can lead to an ideal model that is more in line with people’s expectations, can be called “deep learning” [20]. And based on this certain “equation,” we can call it an algorithm. One of the deep learning under artificial intelligence is shown in Figure 1.Figure 1
Deep learning under artificial intelligence.For Figure1, we can see that deep learning is based on a branch in the field of artificial intelligence, there is a “connection point” between this branch, and there is a “connection point” we can call “machine learning.” So, what is the difference and connection between machine learning as a “connection point” between AI and deep learning and the deep learning discussed in this paper?Deep learning is a much better neural network approach than machine learning. The most important difference is that deep learning can use algorithms to automatically identify the important features we need to recognize and classify something. For example, in this paper, for ECG abnormality identification and prediction, we use deep learning algorithms to help reduce the workload of health care workers because the trained deep learning models can automatically identify ECGs with abnormalities. So, on this basis, it can reduce some manual input and enable the health care workers to try to spend their most important work elsewhere.The history of deep learning can be traced back to the 1980s, when a new perceptual machine called heuristic neural networks appeared in the early 1980s; by the mid-1980s, a recurrent neural network called RNNs appeared, but the practical application under deep neural networks was finally realized in the 1990s, and such DNNs were not practically applied due to the practical application of such DNNs which was not widely used due to the limitation of hardware. The development of deep learning fell into a bottleneck stage. By the beginning of this century, the concept of deep belief networks was proposed, and the hierarchical pretraining framework was likewise developed, so that deep learning ushered in a larger development and gradually became well known and continuously developed. Therefore, in view of the advantages of deep with strong learning ability, and also strong adaptability and wide coverage, this paper will use the relevant neural network algorithm under deep learning to realize the research on the method of ECG abnormality recognition and prediction, will realize the method of recognizing the ECG abnormality of different target audience groups based on both subjective level and objective level, fully explore the deep learning in medical field, and provide some theoretical basis and practical value for the subsequent deep learning can be used in other aspects of medical field or ECG.


## 3.1. Evaluation Indicators of ECG Abnormalities

In medicine, heart problems can be diagnosed by whether the ECG is abnormal or not. If a human body experiences symptoms such as chest tightness, shortness of breath, chest discomfort, or chest pain, it is generally recommended to have an ECG examination to determine whether there is a problem with the heart. Therefore, ECG examination is of great significance in confirming the diagnosis of whether a patient is suffering from a heart-related disease. And the presence of abnormal ECG problems can be diagnosed by observing the following indicators [18].


### 3.1.1. Atrial Flutter and Atrial Fibrillation

Atrial flutter and atrial fibrillation are two of the two symptoms that produce abnormalities in the heart. In the case of atrial fibrillation, the most common cause of this symptom is due to arrhythmia, which is manifested on the ECG by the absence of the p-wave that should be present in a normal cardiac examination and the production of an F-wave of a different shape and size instead, where the F-wave, also known medically as a fibrillation wave, is one of the most important indicators to confirm the presence of a heart rate market. In addition, if atrial fibrillation is diagnosed, the QRS waves in the ECG will be of unequal spacing and will be completely irregular and chaotic. In atrial flutter, if the heart rate is as high as 250 to 350 beats per minute, then atrial flutter is judged to be present. Atrial flutter is an arrhythmia of the heart rate, most of which occurs in the atria, and is manifested in the ECG by the absence of P-waves and the presence of flutter waves. Unlike fibrillation waves, flutter waves are also an F-wave, but they appear in the same shape, size, and spacing.(1)
Preexcitation syndrome: it is caused by premature excitation of the ventricular muscle and is manifested on the ECG by a shortened P-R interval and a series of abnormal widened QRS waves(2)
Ventricular tachycardia: this symptom is caused by structural changes in the heart organ and is a serious heart disease. It is characterized by more than three or more premature ventricular beats in the electrocardiogram, and instead of a P-wave, a QRS wave with a width of more than 0.12 s is generated, accompanied by secondary ST-T changes, and the frequency of these changes is between 110 and 200 beats per minute. Another type of ventricular tachycardia is torsional ventricular tachycardia. As the name implies, ventricular tachycardia is obviously associated with arrhythmias, and torsional ventricular tachycardia is caused by various reasons that lead to prolonged ventricular repolarization, which results in a prolonged Q-T interval on the electrocardiogram and a wide frontal P-wave deformity, so that the QRS wave group flips up and down from the baseline(3)
Block: there are many different types of supracardiac block, including double bundle branch block, first degree block, second degree type I AV block, left bundle branch block, right bundle branch block, and complete AV block. Bifascicular block is a condition that affects the conduction of fibers that transmit electrical signals in the subendocardium of the ventricle, resulting in a lack of cardiac function, and is characterized by a significantly higher number of QRS waves than normal on the electrocardiogram, as well as aberrations and slower frequency. Complete atrioventricular block, on the other hand, is caused by the complementary effects of the ventricles and atria working separately. In this case, the most characteristic feature is that the atrial frequency is significantly higher than the ventricular frequency, while the ventricular block is usually below the usual site and the frequency beats between forty and sixty times per minute; so, the ventricular frequency is mostly slow, but the QRS wave groups are basically normal


## 3.1.1. Atrial Flutter and Atrial Fibrillation

Atrial flutter and atrial fibrillation are two of the two symptoms that produce abnormalities in the heart. In the case of atrial fibrillation, the most common cause of this symptom is due to arrhythmia, which is manifested on the ECG by the absence of the p-wave that should be present in a normal cardiac examination and the production of an F-wave of a different shape and size instead, where the F-wave, also known medically as a fibrillation wave, is one of the most important indicators to confirm the presence of a heart rate market. In addition, if atrial fibrillation is diagnosed, the QRS waves in the ECG will be of unequal spacing and will be completely irregular and chaotic. In atrial flutter, if the heart rate is as high as 250 to 350 beats per minute, then atrial flutter is judged to be present. Atrial flutter is an arrhythmia of the heart rate, most of which occurs in the atria, and is manifested in the ECG by the absence of P-waves and the presence of flutter waves. Unlike fibrillation waves, flutter waves are also an F-wave, but they appear in the same shape, size, and spacing.(1)
Preexcitation syndrome: it is caused by premature excitation of the ventricular muscle and is manifested on the ECG by a shortened P-R interval and a series of abnormal widened QRS waves(2)
Ventricular tachycardia: this symptom is caused by structural changes in the heart organ and is a serious heart disease. It is characterized by more than three or more premature ventricular beats in the electrocardiogram, and instead of a P-wave, a QRS wave with a width of more than 0.12 s is generated, accompanied by secondary ST-T changes, and the frequency of these changes is between 110 and 200 beats per minute. Another type of ventricular tachycardia is torsional ventricular tachycardia. As the name implies, ventricular tachycardia is obviously associated with arrhythmias, and torsional ventricular tachycardia is caused by various reasons that lead to prolonged ventricular repolarization, which results in a prolonged Q-T interval on the electrocardiogram and a wide frontal P-wave deformity, so that the QRS wave group flips up and down from the baseline(3)
Block: there are many different types of supracardiac block, including double bundle branch block, first degree block, second degree type I AV block, left bundle branch block, right bundle branch block, and complete AV block. Bifascicular block is a condition that affects the conduction of fibers that transmit electrical signals in the subendocardium of the ventricle, resulting in a lack of cardiac function, and is characterized by a significantly higher number of QRS waves than normal on the electrocardiogram, as well as aberrations and slower frequency. Complete atrioventricular block, on the other hand, is caused by the complementary effects of the ventricles and atria working separately. In this case, the most characteristic feature is that the atrial frequency is significantly higher than the ventricular frequency, while the ventricular block is usually below the usual site and the frequency beats between forty and sixty times per minute; so, the ventricular frequency is mostly slow, but the QRS wave groups are basically normal


## 3.2. Deep Learning for ECG Examination

In the last decade, deep learning has gradually developed better and started to play its role and significance in various fields, and it is no less important in the medical field. Deep learning has been developed not only in image processing and target detection but also in the field of medicine, where it has been applied to promote the development of medicine and contribute to the safety of human life. For example, some researchers have applied deep learning methods to medical image analysis [19], in which the authors mainly improved the DenseNet neural network to adapt it to the medical imaging field and introduced the U-Net network to the original DenseNet neural network. The improved DenseNet neural network model is trained by preprocessing the virus data set using the principle of image enhancement, which can be applied to other virus sample data sets with a little processing. It can be seen that the ECG examination with deep learning not only has a certain accuracy but also the portability in deep learning brings a broad prospect for the development and application of ECG examination under deep learning.


## 3.3. Overview of ECG Abnormality Identification and Prediction with Deep Learning

Deep learning is a special kind of “machine learning,” which is one of the learning modes included in the field of artificial intelligence. For deep learning, it can represent the world as a nested hierarchy with certain concepts and certain meanings by imitating human learning and thinking behaviors, so that it can obtain a powerful ability and good flexibility to realize the connection of every unknown and known concept: the more abstract concepts and matters through certain “equations. The process of training and connecting every unknown and known concept, and connecting the more abstract concepts and matters through a certain “equation,” which can lead to an ideal model that is more in line with people’s expectations, can be called “deep learning” [20]. And based on this certain “equation,” we can call it an algorithm. One of the deep learning under artificial intelligence is shown in Figure 1.Figure 1
Deep learning under artificial intelligence.For Figure1, we can see that deep learning is based on a branch in the field of artificial intelligence, there is a “connection point” between this branch, and there is a “connection point” we can call “machine learning.” So, what is the difference and connection between machine learning as a “connection point” between AI and deep learning and the deep learning discussed in this paper?Deep learning is a much better neural network approach than machine learning. The most important difference is that deep learning can use algorithms to automatically identify the important features we need to recognize and classify something. For example, in this paper, for ECG abnormality identification and prediction, we use deep learning algorithms to help reduce the workload of health care workers because the trained deep learning models can automatically identify ECGs with abnormalities. So, on this basis, it can reduce some manual input and enable the health care workers to try to spend their most important work elsewhere.The history of deep learning can be traced back to the 1980s, when a new perceptual machine called heuristic neural networks appeared in the early 1980s; by the mid-1980s, a recurrent neural network called RNNs appeared, but the practical application under deep neural networks was finally realized in the 1990s, and such DNNs were not practically applied due to the practical application of such DNNs which was not widely used due to the limitation of hardware. The development of deep learning fell into a bottleneck stage. By the beginning of this century, the concept of deep belief networks was proposed, and the hierarchical pretraining framework was likewise developed, so that deep learning ushered in a larger development and gradually became well known and continuously developed. Therefore, in view of the advantages of deep with strong learning ability, and also strong adaptability and wide coverage, this paper will use the relevant neural network algorithm under deep learning to realize the research on the method of ECG abnormality recognition and prediction, will realize the method of recognizing the ECG abnormality of different target audience groups based on both subjective level and objective level, fully explore the deep learning in medical field, and provide some theoretical basis and practical value for the subsequent deep learning can be used in other aspects of medical field or ECG.


## 4. Results and Discussion

From Section3, it is known that for the abnormal recognition of ECG, it is very important for the assessment and prevention of human health and quality of life; therefore, this paper will make some research and prediction on the abnormal recognition of ECG based on the theory of deep learning, which is indicated above by the deep learning algorithm. However, in this paper, in order to fully consider the human characteristics and the concept of human-oriented medical treatment, we will evaluate the subjective aspects of different target audiences based on the objective aspects mentioned above, i.e., we will conduct research on the abovementioned objectively surveyed people by means of questionnaire star and then organize and analyze the obtained results to realize the objective and subjective analysis of ECG abnormality detection under deep learning in this paper. The objective and subjective analysis of ECG abnormality detection with deep learning is realized.


### 4.1. Prediction of ECG Abnormalities with CNN Networks

Both deep learning and machine learning are similar for data processing, and CNN network is a kind of neural network under deep learning. In essence, deep learning is also a neuronal model, i.e., it is composed of many basic neurons, each of which is shown in Equation (1).
(1)z=δw1x1+w2x2+⋯+wkxk+b.As can be seen from Equation (1), z denotes the output of a certain neuron model, b denotes the bias value or bias function, δ is the activation function, and w1, w2, ..., wk denote the weights. The basic block diagram of a neuron can be drawn according to Equation (1) as shown in Figure 2.Figure 2
Basic block diagram of neuron.From Figure2, the basic block diagram of a neural network can be composed of three parts: input x1, x2, x3, ..., xn, activation function, and output. The deep learning algorithm is essentially a layer of complex network structure, and this paper is to take the basic block diagram of this neural network as the basic so as to make some extensions to form a more complex deep learning neural network model with acceptable accuracy in the range of ECG abnormality recognition. And in neural networks, different activation functions are generally selected according to different tasks, among which the more common activation functions are as follows.
(2)fx=ex−e−xex+e−x,(3)fx=11+e−x,(4)fx=max0,x.For the above formula, where formula (2) represents the tanh activation function, in the tanh activation function, it is obvious to see that the function is an odd function, setting its value range between negative infinity and positive infinity, but according to the definition of the formula for the function: in the function which can take all the output values of the input in the range between [-1, 1] and the function as an activation function, it can not only realize the nonlinear change of the neural network but also the function curve is smooth and can be derived at every point; so, it can solve certain convergence problems by applying this function to the neural network as an activation function. For Equation (3), it is a specific formula for the sigmoid function. According to the mathematically relevant theory, it can be found that the output values of this function range between (0, 1), i.e., all the output values are integers. Sigmoid activation function and tanh function, the same smooth curve, and any point in the x value can be derived. However, compared to the tanh function, the mean value of the sigmoid function is not 0, and both are prone to the problem of gradient disappearance. The characteristics of their functions will cause the convergence of the neural network to become slow, which is very unfavorable for the medical field in the need for emergency treatment of patients to know certain diagnostic conditions to carry out treatment; so, in this paper, it is not recommended to use the above two functions as the activation function of this paper.For Equation (4), the mathematical formula for the ReLU activation function is expressed. The Chinese name is linear rectification activation function, which is a kind of activation function commonly used in deep neural network models. For the ReLU function, it can be described in two parts: one for the case greater than 0 and one for the case less than 0, where the x value is less than 0, and the output of the ReLU function is 0; at x values greater than 0, the output of the activation function is the input. By looking at the formula in (4), we can see that the activation function does not have a saturation zone like the sigmoid function, which means that it can better overcome the gradient disappearance problem brought by the sigmoid function and tanh function, because due to the characteristics of the function, the gradient is set to 1 in the part greater than 0; so, it effectively has the ability to solve the problem brought by formula (2) and formula (3). The problem of missing gradient is effectively solved by Equation (4). In addition, the activation value of the ReLU function is simple to calculate, and only a reasonable threshold is needed to get the appropriate activation value, which can simplify the problem of calculating the exponential level of the formula like Eq. (2). More importantly, the ReLU function has faster convergence speed and operation speed than the above two functions; so for this paper, the ReLU function will be used as the activation function of this deep neural network.The basic model of the neurons of the deep neural network and the activation function used in this paper are described above, and by comparing the advantages and disadvantages of the three different activation functions, it is finally decided to use the ReLU function as the activation function of the deep neural network in this paper. And in order to get the results of ECG abnormality recognition prediction, this paper decided to use CNN neural network as the basic training model of this paper after comparing different neural network models under deep learning, where the specific block diagram is shown in Figure3.Figure 3
Basic structure of CNN network.From Figure3, it can be seen that the basic model of CNN neural network implemented in this paper for ECG abnormality recognition and prediction can be composed of two convolutional layers, two pooling layers, one output layer, one input layer and one output layer, and one softmax layer. The main function of the pooling layer is to process the high-dimensional features of the ECG obtained from the convolutional layer from high-dimensional to low-dimensional directions, while the convolutional layer is used to extract many high-dimensional features from the ECG by making full use of the convolutional operation and transfer them to the pooling layer in a suitable format for pooling. In this paper, the proper setup and processing of the convolutional operation is one of the key factors for the correct prediction of ECG abnormalities. For a more visual description of the CNN network, the recognition classification results of CNN can be viewed as shown in Figure 4.Figure 4
Abstraction of ECG abnormality recognition prediction under CNN network.As can be seen from Figure4, the box on the left can be abstractly understood as the ECG situation of a certain examinee, and it is not known whether there is any abnormality in the heart when the ECG examination is performed. The two orange dots indicate that there is a certain problem with the heart of the subject, and further examination is needed to determine what the problem is again. Figure 4 is an abstract diagram of ECG abnormality identification prediction under deep learning in this paper. The rightmost dot in the diagram means that there is some problem in the heart of the subject.


### 4.2. Collation and Analysis of Simulation Results and Research Results

After the above discussion and some training of the CNN network model in this paper, a neural network model applicable to the ECG recognition prediction in this paper was obtained. In summary, in order to improve the accuracy of this paper in ECG abnormality recognition, and to achieve the purpose of this paper from both subjective and objective aspects, the simulation results and related research results of this paper are now organized and analyzed. In order to highlight the significance and importance of this paper for the awareness of different target groups for ECG examination, a questionnaire survey was conducted for different age groups for this purpose, and a subjective survey was conducted for the elderly group who are less likely to use cell phones using a questionnaire survey. The results of the survey regarding the basic awareness of ECG and whether it is necessary to conduct ECG examination all year round are shown in Figure5.Figure 5
Survey on the necessity and knowledge of ECG examination among different target audiences.As can be seen from Figure5, a questionnaire survey on the basic knowledge of ECG and the necessity of regular ECG examination was conducted for different age groups and offline questionnaires. The above survey data showed that the survey was divided into five age groups: under 22 years of age, between 23 and 35 years of age, between 35 and 50 years of age, and over 50 years of age, with a total of 20 people in each age group. The above data show that the greatest number of people agreed on the need for ECG screening between 35 and 50 years of age, and the least number agreed between 23 and 35 years of age; again, the greatest number of people agreed on the need for ECG screening between 35 and 50 years of age, but the least number agreed on the need for ECG screening was under 22 years of age. Thus, it is clear that the regularity of ECG screening and the level of knowledge about it are related to different age groups. Based on the above results, this paper uses CNN deep neural network to conduct this free ECG examination for the above respondents, and after the examination, they are sent to the deep learning network model for training.From Figure6, when the batch size is set to 80, the learning rate of a1 is 0.0001, a2 is 0.00001, and a3 is 0.000001. By observing Figure 6, we can get that when the learning rate is at the value of a1, the accuracy of the training of the model is the highest, the average accuracy can reach about 84%, the lowest accuracy is the a2 curve, the accuracy of this curve fluctuates to a large extent, and the average accuracy is only about 80%. In order to make the model reach the optimal value, the accuracy was also tested for different batch size, and the results are shown in Figure 7.Figure 6
Accuracy curve of ECG abnormality recognition under different learning rates.Figure 7
Accuracy curves for different batch sizes.As can be seen from Figure7, the horizontal coordinates represent different batch sizes with values of 20, 80, 120, and 150, respectively. First, fixing the data at the batch size of 120, we can get that the accuracy rate of a1 curve reaches 86%, which is higher than the accuracy rate when the batch size is other values; for a2 curve, we can find that the highest accuracy rate is 84% only when the batch size is 150; fixing the vertical coordinate, we can find that no matter what the value of the accuracy of the a1 curve is, it is higher than that of the a2 curve regardless of the value of batch size, which is about 1.5% higher. It can be seen that the accuracy of the neural network model is the highest when the batch size is 120, and the learning rate is a1, i.e., 0.0001. Meanwhile, in order to more fully demonstrate the comprehensiveness of this paper’s research and consider the spirit of human-centered concept, a survey on the satisfaction after ECG examination was conducted for the abovementioned people of different ages, of which the results are shown in Figure 8.Figure 8
Survey on satisfaction with ECG survey, etc.As can be seen from Figure8, the number of people surveyed was the same as the number of people surveyed above, with 20 people in each age group. The reason for this difference is that most of the people who had heart problems during the ECG examination were between 35 and 50 years old, while the younger age group thought that it is also too early to have regular ECG examinations. The age group that is more willing to have regular ECG examinations in the future is between the ages of 35 and 50 years, which shows the importance of health issues in our country, while other age groups are not resistant to have regular ECG examinations, which fully shows the willingness of different age groups to have regular health examinations in our country.


## 4.1. Prediction of ECG Abnormalities with CNN Networks

Both deep learning and machine learning are similar for data processing, and CNN network is a kind of neural network under deep learning. In essence, deep learning is also a neuronal model, i.e., it is composed of many basic neurons, each of which is shown in Equation (1).
(1)z=δw1x1+w2x2+⋯+wkxk+b.As can be seen from Equation (1), z denotes the output of a certain neuron model, b denotes the bias value or bias function, δ is the activation function, and w1, w2, ..., wk denote the weights. The basic block diagram of a neuron can be drawn according to Equation (1) as shown in Figure 2.Figure 2
Basic block diagram of neuron.From Figure2, the basic block diagram of a neural network can be composed of three parts: input x1, x2, x3, ..., xn, activation function, and output. The deep learning algorithm is essentially a layer of complex network structure, and this paper is to take the basic block diagram of this neural network as the basic so as to make some extensions to form a more complex deep learning neural network model with acceptable accuracy in the range of ECG abnormality recognition. And in neural networks, different activation functions are generally selected according to different tasks, among which the more common activation functions are as follows.
(2)fx=ex−e−xex+e−x,(3)fx=11+e−x,(4)fx=max0,x.For the above formula, where formula (2) represents the tanh activation function, in the tanh activation function, it is obvious to see that the function is an odd function, setting its value range between negative infinity and positive infinity, but according to the definition of the formula for the function: in the function which can take all the output values of the input in the range between [-1, 1] and the function as an activation function, it can not only realize the nonlinear change of the neural network but also the function curve is smooth and can be derived at every point; so, it can solve certain convergence problems by applying this function to the neural network as an activation function. For Equation (3), it is a specific formula for the sigmoid function. According to the mathematically relevant theory, it can be found that the output values of this function range between (0, 1), i.e., all the output values are integers. Sigmoid activation function and tanh function, the same smooth curve, and any point in the x value can be derived. However, compared to the tanh function, the mean value of the sigmoid function is not 0, and both are prone to the problem of gradient disappearance. The characteristics of their functions will cause the convergence of the neural network to become slow, which is very unfavorable for the medical field in the need for emergency treatment of patients to know certain diagnostic conditions to carry out treatment; so, in this paper, it is not recommended to use the above two functions as the activation function of this paper.For Equation (4), the mathematical formula for the ReLU activation function is expressed. The Chinese name is linear rectification activation function, which is a kind of activation function commonly used in deep neural network models. For the ReLU function, it can be described in two parts: one for the case greater than 0 and one for the case less than 0, where the x value is less than 0, and the output of the ReLU function is 0; at x values greater than 0, the output of the activation function is the input. By looking at the formula in (4), we can see that the activation function does not have a saturation zone like the sigmoid function, which means that it can better overcome the gradient disappearance problem brought by the sigmoid function and tanh function, because due to the characteristics of the function, the gradient is set to 1 in the part greater than 0; so, it effectively has the ability to solve the problem brought by formula (2) and formula (3). The problem of missing gradient is effectively solved by Equation (4). In addition, the activation value of the ReLU function is simple to calculate, and only a reasonable threshold is needed to get the appropriate activation value, which can simplify the problem of calculating the exponential level of the formula like Eq. (2). More importantly, the ReLU function has faster convergence speed and operation speed than the above two functions; so for this paper, the ReLU function will be used as the activation function of this deep neural network.The basic model of the neurons of the deep neural network and the activation function used in this paper are described above, and by comparing the advantages and disadvantages of the three different activation functions, it is finally decided to use the ReLU function as the activation function of the deep neural network in this paper. And in order to get the results of ECG abnormality recognition prediction, this paper decided to use CNN neural network as the basic training model of this paper after comparing different neural network models under deep learning, where the specific block diagram is shown in Figure3.Figure 3
Basic structure of CNN network.From Figure3, it can be seen that the basic model of CNN neural network implemented in this paper for ECG abnormality recognition and prediction can be composed of two convolutional layers, two pooling layers, one output layer, one input layer and one output layer, and one softmax layer. The main function of the pooling layer is to process the high-dimensional features of the ECG obtained from the convolutional layer from high-dimensional to low-dimensional directions, while the convolutional layer is used to extract many high-dimensional features from the ECG by making full use of the convolutional operation and transfer them to the pooling layer in a suitable format for pooling. In this paper, the proper setup and processing of the convolutional operation is one of the key factors for the correct prediction of ECG abnormalities. For a more visual description of the CNN network, the recognition classification results of CNN can be viewed as shown in Figure 4.Figure 4
Abstraction of ECG abnormality recognition prediction under CNN network.As can be seen from Figure4, the box on the left can be abstractly understood as the ECG situation of a certain examinee, and it is not known whether there is any abnormality in the heart when the ECG examination is performed. The two orange dots indicate that there is a certain problem with the heart of the subject, and further examination is needed to determine what the problem is again. Figure 4 is an abstract diagram of ECG abnormality identification prediction under deep learning in this paper. The rightmost dot in the diagram means that there is some problem in the heart of the subject.


## 4.2. Collation and Analysis of Simulation Results and Research Results

After the above discussion and some training of the CNN network model in this paper, a neural network model applicable to the ECG recognition prediction in this paper was obtained. In summary, in order to improve the accuracy of this paper in ECG abnormality recognition, and to achieve the purpose of this paper from both subjective and objective aspects, the simulation results and related research results of this paper are now organized and analyzed. In order to highlight the significance and importance of this paper for the awareness of different target groups for ECG examination, a questionnaire survey was conducted for different age groups for this purpose, and a subjective survey was conducted for the elderly group who are less likely to use cell phones using a questionnaire survey. The results of the survey regarding the basic awareness of ECG and whether it is necessary to conduct ECG examination all year round are shown in Figure5.Figure 5
Survey on the necessity and knowledge of ECG examination among different target audiences.As can be seen from Figure5, a questionnaire survey on the basic knowledge of ECG and the necessity of regular ECG examination was conducted for different age groups and offline questionnaires. The above survey data showed that the survey was divided into five age groups: under 22 years of age, between 23 and 35 years of age, between 35 and 50 years of age, and over 50 years of age, with a total of 20 people in each age group. The above data show that the greatest number of people agreed on the need for ECG screening between 35 and 50 years of age, and the least number agreed between 23 and 35 years of age; again, the greatest number of people agreed on the need for ECG screening between 35 and 50 years of age, but the least number agreed on the need for ECG screening was under 22 years of age. Thus, it is clear that the regularity of ECG screening and the level of knowledge about it are related to different age groups. Based on the above results, this paper uses CNN deep neural network to conduct this free ECG examination for the above respondents, and after the examination, they are sent to the deep learning network model for training.From Figure6, when the batch size is set to 80, the learning rate of a1 is 0.0001, a2 is 0.00001, and a3 is 0.000001. By observing Figure 6, we can get that when the learning rate is at the value of a1, the accuracy of the training of the model is the highest, the average accuracy can reach about 84%, the lowest accuracy is the a2 curve, the accuracy of this curve fluctuates to a large extent, and the average accuracy is only about 80%. In order to make the model reach the optimal value, the accuracy was also tested for different batch size, and the results are shown in Figure 7.Figure 6
Accuracy curve of ECG abnormality recognition under different learning rates.Figure 7
Accuracy curves for different batch sizes.As can be seen from Figure7, the horizontal coordinates represent different batch sizes with values of 20, 80, 120, and 150, respectively. First, fixing the data at the batch size of 120, we can get that the accuracy rate of a1 curve reaches 86%, which is higher than the accuracy rate when the batch size is other values; for a2 curve, we can find that the highest accuracy rate is 84% only when the batch size is 150; fixing the vertical coordinate, we can find that no matter what the value of the accuracy of the a1 curve is, it is higher than that of the a2 curve regardless of the value of batch size, which is about 1.5% higher. It can be seen that the accuracy of the neural network model is the highest when the batch size is 120, and the learning rate is a1, i.e., 0.0001. Meanwhile, in order to more fully demonstrate the comprehensiveness of this paper’s research and consider the spirit of human-centered concept, a survey on the satisfaction after ECG examination was conducted for the abovementioned people of different ages, of which the results are shown in Figure 8.Figure 8
Survey on satisfaction with ECG survey, etc.As can be seen from Figure8, the number of people surveyed was the same as the number of people surveyed above, with 20 people in each age group. The reason for this difference is that most of the people who had heart problems during the ECG examination were between 35 and 50 years old, while the younger age group thought that it is also too early to have regular ECG examinations. The age group that is more willing to have regular ECG examinations in the future is between the ages of 35 and 50 years, which shows the importance of health issues in our country, while other age groups are not resistant to have regular ECG examinations, which fully shows the willingness of different age groups to have regular health examinations in our country.


## 5. Conclusion

The prediction and analysis of ECG abnormality identification can provide people with a more comprehensive understanding of their health and is also a sign of responsibility for their own life safety. The identification of ECG abnormality is an important way to determine whether the heart is healthy or not, and the subsequent prediction of the heart is also an important initiative for human health. In this paper, we firstly analyze the impact of urbanization and stress on people’s health and even heart, then elaborate different ways of heart examination and related indexes, and complete the construction and training of CNN neural network model by starting from the theory of deep learning, and the final experimental results show that ECG examination is self-evident for people’s health. The final experimental results show that ECG examination is a commonplace for people’s health, and the CNN-ECG abnormality recognition prediction network model proposed in this paper has a high accuracy rate in ECG processing and analysis.



---

*Source: 3466787-2022-10-05.xml*