Monitoring and Recognition of Heart Health using Heartbeat Classification with Deep Learning and IoT

– The advancement and innovations in the field of science and technology paved way for various advanced treatments in the field of medicine. They are implemented using sensors, and computer-aided designs with artificial intelligence techniques. This helps in the detection of serious health constraints at an earlier stage with appropriate treatments using decision-making techniques. One of the important health concerns that are increasing rapidly is cardiovascular disorders. This includes Arrhythmia and Myocardial Infarction. Earlier prediction and classification can protect them from serious constraints. They are diagnosed using the Electrocardiogram (ECG). To obtain accurate results, artificial intelligence techniques are implemented to extract the optimum output. The proposed system includes the detection and classification using deep learning techniques with the Internet of Things (IoT). The existing heartbeat detection system is overcome using a deep convolutional neural network. This helps in the implementation of automatic heartbeat detection and identification of abnormalities. The ECG signals are pre-processed with segmentation and feature extraction techniques. The classification and identification of constraints in the functioning of the heart are identified using optimization algorithms. The proposed system is trained, tested, and evaluated using the MIT-BIH arrhythmia database. The accuracy and efficiency of the proposed system are 99.98% using the MIT-BIH dataset.


I. INTRODUCTION
The heart is the fundamental organ of the circulatory system that pumps blood through the body. The functioning of the heart is directed through the nervous system. Any deviation in the functioning of the heart leads to various cardiovascular diseases. In today's modern world, the rate of cardiovascular disease is increasing rapidly due to an unhealthy lifestyle with an imbalance in nutrients. The world health organization provides a report that nearly 12.9 million people suffer from cardiovascular disease around the world.
This cardiovascular disease if identified and treated at an early stage can reduce numerous complications. This identification of heart health is obtained using Electrocardiogram (ECG). It is the signal that is used to measure the electrical activity of the heart. This is an important diagnostic tool used in the analysis and detection of myocardial infarction and the functioning of the heart. Thus the automatic detection of heart health is obtained using deep learning techniques with the internet of things. In the recent decade, there is an enormous growth in Information and Communication Technologies in diverse fields. They provide a prominent impact on economic aspects. Various research has been adopted in detecting the physical and mental health of an individual. It plays a prominent role in the field of medicine, gamification, and communicable and non-communicable diseases by making the environments as much smarter. The ancient practice of detecting cardiac arrest was done by placing the ear on the chest and recognizing the flow of blood. This was first done in the 4 th century. They further proceeded through the implementation of the stethoscope. This helps to listen to the cardiac sounds to detect the presence of malfunctioning and cardiac blocks. Nowadays, due to the enhancement of advanced technology, cardiac sounds are recorded through electrical waves by implementing image processing techniques. This is done through the platform of Artificial Intelligence (AI).
The ideology of artificial intelligence came into existence in 1956 in the United States of America. Today the rise of artificial intelligence is rising enormously in various fields. The important factor for the implementation of artificial intelligence in medical fields is due to higher accuracy with precise results. They are implemented with various computational algorithms that help to fetch the exact results from numerous inputs. They are performed by extracting the natural performance that is fed to machines to perform similar functioning to adopt decision-making techniques. This helps to save computational time with the precise outcome that helps to save lives. It gave rise to the internet of things which provides wearable and non-wearable sensor devices to monitor and control physical parameters. They are implemented with enhancing the computational accuracy of computers. In medicine, various sensors are accompanied to monitor and detect the health of patients with real-time implementation. This gave rise to the development of ECG (Electrocardiogram) and PPG (Photoplethysmography) to record the volumetric changes in heartbeat and blood circulation.
The phonocardiogram test is performed to detect and observe the heart sound. They are accurately done through sensors accompanied by artificial intelligence techniques. Thus any constraints in the functioning of the heart can be detected through sensors and artificial intelligence. This is done through the electrocardiogram. It is a diagnostic tool used to detect the heartbeat with an electrophysiological pattern. This helps the cardiologist to predict cardiac arrest with precise information. The information must be obtained with higher accuracy because cardiac arrest is a serious concern and may lead to fatal. The two dangerous cardiac arrests that lead to fatal if not predicted at an earlier stage are Arrhythmia and Myocardial Infarction. Arrhythmia is a rhythmic constraint that causes the heart to beat irregularly. They are caused by the electrical pulse. The reasons for arrhythmia include fluctuations in blood pressure and various changes in heart muscles. The myocardial infarction is similar to the myocardium. It is simply a blockage of the blood supply suddenly. The detection of these two major constraints is done using ECG.
Myocardial infarction is one of the communal cardiovascular diseases that result in various complications. It is commonly known as a heart attack that results in a blockage of blood flow to the heart. It is the slow process of forming atherosclerotic plaque in the coronary artery that forms a thrombus in the artery that blocks the flow of blood as shown in Fig 1. This leads to damaging the heart muscles and results in fatal. The symptoms of myocardial infarction include chest pain, nausea, sweat, and tiredness. The various reasons include higher blood pressure, obesity, diabetes, and increased level of cholesterol. The World Health Organization (WHO) reports that approximately 8 million deaths occur annually across the world due to myocardial infarction.

Fig 1. Myocardial Infarction
The electrocardiogram is a device consisting of 12 lead configurations accompanied by pressurized limb leads, fringe, and thorax leads. The heartbeat was initiated and recorded through sinusoidal waves through depolarization and repolarization of arteries and ventricles. The articular and ventricular depolarization helps to obtain the P waves and the T waves are obtained through ventricular hyperpolarization. There are two stages in the detection of ECG waves. The first one includes the process of extracting the ECG waves and the second stage involves the classification through retrieved parameters. The heartbeat is classified into the following categories such as follows      Thus the electrocardiogram accompanied by deep learning techniques paved way for accurate prediction at an earlier stage with automatic detection. This is integrated due to the ECG waves do not appear in a short duration of time and hence this causes the cardiologist to have many constraints. For an acute myocardial infarction, the recovery can be maximized if the patient can obtain coronary revascularization within 3 hours of indication. Thus the automatic electrocardiogram is implemented using deep learning techniques to obtain accurate results even at home. The deep learning techniques include image processing and feature extraction techniques with computational algorithms. The proposed system is implemented with deep learning techniques accompanied by the convolutional neural network.
II. LITERATURE SURVEY The deep neural network was significantly used by various researchers to predict arrhythmia and its classification. They are implemented through the internet of things which helps to collect the data and transferred it to the server. The author proposed the classification of a heartbeat into four classes through training and testing with the MIT-BIH ECG arrhythmia database system [1].
This includes the segmentation of the heartbeat with classification stages. The wavelet transform and Fourier transform with various filters are involved in the removal of noise parameters. The convolutional neural network model is implemented in the classification of a heartbeat. This includes the involvement of spacial and spectral feature maps. Hyperopt library provides optimization techniques for hyper parameters [2]. The author proposes a 1D convolutional neural network for the detection and classification of electrocardiogram signals. It provides the five layers in the CNN model [3]. Multimodal fusion is involved in the detection of a heartbeat. In this work, the author classifies multimodal fusion into two categories such as multimodal image and multimodal feature fusion to classify the heartbeat. This includes the conversion of raw ECG images. They concluded to obtain the optimization using a support vector machine to obtain the classification of a heartbeat. The author uses the AAMI EC57 protocols for the classification of myocardial infarction [4].
A computer-aided diagnostic tool is implemented to obtain accuracy in results. The classification is based on the adversarial domain based on deep learning techniques. The diversity of the extracted data is obtained using three modules. This helps to adopt the classification of heartbeat based upon a multi-scale model. The accuracy of the proposed system is 92.3 [5]. The author proposes an innovative portable ECG for monitoring patients' health. It involves the automatic detection of arrhythmia using a computational algorithm. This is done through three stages which include the segmentation process for a heartbeat, overcoming various constraints in data imbalance, and integration of traditional sampling. The classification of data and validation output is extracted using deep learning techniques [6].
The classification of the electrocardiogram is implemented using machine learning techniques. The author proposed the system in Scala language. The key challenge is to maintain the irregularities in the ECG signals [7]. The author proposes an integrated approach to the detection of cardiac arrhythmia involving deep learning with bidirectional longterm memory. The classification of heartbeat is done through five different divisions. The proposed system provides validation, testing, and training accuracy. It is based on the MIT-BIT dataset [8]. The author proposes a novel algorithm for the segmentation of the heartbeat with real-time implementation. This is done using the convolutional neural network. The classification of the data is done using seven layers convolutional neural network. The pomtompkin algorithm is used to evaluate the feasibility of the proposed system. The comparison purpose is done using the third-party algorithm [9]. The various classification of heartbeat is evaluated based on the standards of AAMI-EC57. The Physionet's MIT-BIH dataset is used for the evaluation and performance of the proposed model. This includes the classification of the heartbeat as shown in figure 8. The author proposes that artificial intelligence techniques such as deep learning and machine learning are implemented for the classification and segmentation process [10].

Fig 8. Classification of Heartbeat
The author provides the implementation of the computational algorithm for obtaining data for automatic decisionmaking techniques. This helps to obtain higher quality and accuracy in the healthcare sectors. The information system is developed to obtain reliability and accuracy in data storage and classification. The author provides an integrated approach to data interpretation using artificial intelligence techniques [11].
The design of the drug and its combination is achieved through artificial intelligence techniques. This helps in the identification and classification of chemical structures and their functional group. This helps in the determination of chemical compounds with biological relationships. The overall system is implemented using deep learning techniques [12].
Arrhythmia can be identified and classified accurately using the automatic electrogram. The author provides automatic classification and detection of arrhythmia using artificial intelligence techniques. They proceeded through the automatic detection of arrhythmia using deep convolutional neural network techniques. The author represents that the overall efficiency of the proposed system is 91.89%. This helps to provide the classification and performance in the interpatient valuation structure [13]. The author provides a detailed study of chronic cardiac arrest and the supply of blood to the heart. The malfunctioning in blood supply and various cardiac arrests is detected and classified using an electrocardiogram. They further proceeded to use the computer-aided design system to obtain accurate results without any computational errors in the system. The author provides sixteen entropies in the proposed system to provide various hidden signals in the ECG signals [14].
The author proposes significant advantages of using deep learning techniques with machine learning algorithms to extract the optimum results using electrocardiograms. This helps to obtain higher accuracy in the detection of cardiac arrest through training and testing using an optimization algorithm. The author provides a detailed study of hyperparameters using artificial intelligence techniques. They also help to detect the shockable and non-shockable rhythms [15]. The author proposes the differentiation of single-lead electrocardiogram signals. The classification is done using the Boltzmann machine. This is used in the detection of ventricular and superventricular heartbeat. The various constraints in the traditional system were replaced using the proposed methodology involving deep learning techniques as shown in figure 9 [16].

Fig 9. Deep Learning
The learning problems are implemented using unsupervised domain adaptations. This includes symmetric architectures. The generalization ability is achieved through the proposed residual transform networks [17]. The author provides a 1D convolutional neural network. This system involves the elimination of low-quality and noisy signals. They are done using a convolutional neural network with heterogeneous network structures. This includes the result of the China Physiological Signal Challenge-2020 dataset to obtain outcomes with reduced complexity in the computational parameter [18]. The author proposes a real-time implementation of electrocardiograms with the classification of heartbeat through a data compression processor with increased accuracy. The filtering of noise is done using wavelet shrinkage.
The proposed system provides a wider ratio of compression [19].

Fusion beat
The firing of two pacemaker cells simultaneously produces a fusion beat.

Unknown beat
The variation in heartbeat forms the unknown beat. Table 1 The author provides an innovative environment for motivating patients to use wearable devices. They are implemented using the internet of things integrated with artificial intelligence techniques. The proposed system provides rehabilitation to patients suffering from limb disabilities [20]. The author proposes the detection of CoA using artificial intelligence techniques. The system provides the implementation of precision medicine that helps in the understanding and evaluation of the disease mechanisms [21]. The classification and detection of arrhythmia were done using deep learning techniques. The data are trained and tested using an optimization algorithm [22]. The electrocardiogram with numerous signal processing techniques is employed for the detection and classification of a heartbeat. Photoplethysmographic data is used for optimization to provide the exact outcome. The classification of data includes binary classification [23].
III. PROPOSED SYSTEM The proposed system involves the detection of myocardial infarction and arrhythmia using artificial intelligence techniques involving deep learning. They are done with sensors with computer-aided designs. Then artificial intelligence techniques are implemented to train and test the data. The categorization of the heartbeat is done using a deep neural network [24]. The classification and prediction are done using the convolutional neural network. The time signals are processed using the LSTM. Thus the CNN and LSTM provide higher detection accuracy when compared to the existing system. Fig 10 demonstrates the functioning of the proposed system. The internet of things plays a prominent role in data storage and analysis. This helps in the storage of data proceeded to a graphical user interface [25]. Fig 11 demonstrates the integration of electrocardiograms with the internet of things.

IV. IMPLEMENTATION OF THE PROPOSED SYSTEM
The proposed system includes four stages in the classification of the heartbeat. They are as shown as follows:

Medical sensor
The biomedical parameters are calculated using the sensors. This helps to provide the accurate measurement of physical parameters. These parameters are further programmed using artificial intelligence to obtain the exact details about the disease [26]. They are obtained through wearable devices. They help to determine heart health and abnormalities in the functioning of the heart. This includes the detection of various diseases and abnormalities through various sensors [27].

Data processing
Data processing includes the collection of data from ECG signals through conductors and electrodes. This includes various noises and must be eliminated to obtain a clear dataset [28]. The noise is eliminated through Discrete Wavelet Transform. This is represented as follows in figure 12,

Fig 12. Filter Examination
The samples tend to pass to low pass filters to obtain the convolutional factor, Then the signal is decomposed using a high-pass filter, The frequency is removed and processed using the Nyquist rule. The decomposition has been reduced to half the obtained parameter. Then the subsampling functional operator is done. The frequency resolution is further improved through decomposition [29]. They are decomposed with the high and low pass filters. This is represented by the binary tree as shown in Fig 13.   Fig 13. Binary Tree Through computing, the wavelet coefficients, and the filter bank of wavelets are obtained. The mother wavelet is represented as follows,

Data classification and data analysis
The data classification and data analysis is done using the convolutional neural network. The convolutional neural network is the subdivision of deep learning techniques [30]. This includes image processing and feature extraction techniques. This is due to the increased ability in the classification of images in the dataset. They are formed using the convolutional layers with weights and biases [31]. The proposed system includes 1D-CNN models for real-time applications. This is composed of a series of various layers used for computation. They are further processed using various filters to obtain the extract outcome [32].  [33]. The sequence labeling is done much easier through this model. The output is extracted using the forward and reverse layers with a collection of the previous and future data to produce the outcome as shown in Fig 17.   Fig 17. Bi-LSTM Mode V. METHODOLOGY The proposed system uses the MIT-BIH arrhythmia dataset. These datasets are largely used to extract the data as shown in Fig 18. The datasets contain the experimental data that are available in PhysioNet [34].

Fig 18. MIT-BIH Arrhythmia Dataset
Here 100 samples of patients are taken for identification and classification of a heartbeat. This includes a binary file, a text header file, and an annotation file. This contains the information of patients with names, classification of disease, recording parameter, and sample output factor [35]. The datasets are used for the process of data balancing and data extraction.

Fig 19. Stages in the Proposed System
The Fig 19 demonstrates the various stages in the proposed system. This includes the model evaluation and extracting the output through the obtained datasets. The dataset is larger in number hence the optimization algorithm is used. Here the convolutional neural network is implemented. The proposed system is obtained through the integration of a convolutional neural network and bi-LSTM [36]. This includes two Con1D layers and two bi-LSTM layers. The integration is done to obtain higher efficiency and accuracy in the detection of cardiovascular diseases. The activation function rectified linear unit is initiated. The pooling layers of size 2 are added to enhance the functioning of the system. The training and testing of the data are done with a validation process to obtain the performance parameter [37]. The performance is evaluated in terms of accuracy, precision, recall, and specificity. The accuracy is defined as the amount of outcome concerning the input factor [38]. It is obtained through, (6) Recall or sensitivity is the process of testing the performance of the patient's health conditions through the test results.
The precision is used to find the accuracy in the output by comparing it with two factors. It is represented as, (8) The process of obtaining true negative results is denoted as specificity. This helps to obtain reliable negative results for the patients with the absence of disease [39], [40]. It is denoted as, (9)  Trainable parameters 76896 10 Non-trainable parameters: 0 Table 2 determines the summary of the integration of the convolutional neural network and bi-LSTM.

VI. SIMULATION RESULTS
The proposed detection of myocardial infarction through the cardiovascular system involving a convolutional neural network is implemented in Matlab to evaluate the overall performance.     Table 3 determines the performance parameter through testing, training, and validating using a convolutional neural network.
VII. CONCLUSION In this proposed system, the detection of myocardial infarction is done through an electrocardiogram integrated with deep learning techniques. They are done through convolutional neural networks to obtain precise and reliable solutions. The traditional system of evaluating through ECG waves are complex for cardiologist and leads to time consumption. Thus to provide faster solutions, the ECG is accumulated with deep learning techniques that help to evaluate and obtain the exact outcome. This provides 99.99% accuracy in detecting myocardial infarction.

Data Availability
No data was used to support this study.

Conflicts of Interests
The author(s) declare(s) that they have no conflicts of interest.

Funding
No funding was received to assist with the preparation of this manuscript.

Ethics Approval and Consent to Participate
The research has consent for Ethical Approval and Consent to participate.