Abstract
Objectives
Telehealth monitoring applications are latency-sensitive. The current fog-based telehealth monitoring models are mainly focused on the role of the fog computing in improving response time and latency. In this paper, we have introduced a new service called “priority queue” in fog layer, which is programmed to prioritize the events sent by different sources in different environments to assist the cloud layer with reducing response time and latency.
Material and Methods
We analyzed the performance of the proposed model in a fog-enabled cloud environment with the IFogSim toolkit. To provide a comparison of cloud and fog computing environments, three parameters namely response time, latency, and network usage were used. We used the Pima Indian diabetes dataset to evaluate the model.
Result
The fog layer proved to be very effective in improving the response time while handling emergencies using priority queues. The proposed model reduces response time by 25.8%, latency by 36.18%, bandwidth by 28.17%, and network usage time by 41.4% as compared to the cloud.
Conclusion
By combining priority queues, and fog computing in this study, the network usage, latency time, bandwidth, and response time were significantly reduced as compared to cloud computing.
Introduction
The internet of things (IoT) is a network pattern that includes many interconnected tools in this network. These tools are called things. Wearable wireless sensors, and mobile devices are examples of these things. 1 It is estimated that by 2030 the number of IoT devices will exceed the number of people on earth. 2 Due to the increasing number of medical devices, sensors (ingestible sensors, invasive sensors, strip sensors, implantable sensors), and mobile devices that connect via the internet, the IoT has turned its attention to the field of health care. 3 The advent of IoT with low-cost, high-performance sensors has accelerated the use of home healthcare monitoring. 4 Because IoT allows patients and healthcare providers to transfer the treatment process to the patients’ side, it enables patients to manage the disease and receive help from the healthcare team remotely via mobile devices. This technology has been considered a promising solution for the healthcare industry to improve the quality of care. 2 IoT-based healthcare systems improve monitoring efficiency and provide adequate emergency services to patients. 5 Sensors and smart devices used to monitor the patient have computational and storage capacity limitations, so they cannot manage the large amount of data generated. The cloud computing approach has been adopted to address such IoT challenges. 6 The cloud computing model provides the ability to store, process, and manage large volumes of data.7,8 Despite the above advantages, due to the centralized nature of this technology, it is deprived of services with minimal delay, location awareness, and geographical distribution, which is critical for IoT applications.9,10 Because the cloud computing approach requires a constant internet connection 11 at reliable speeds with sufficient bandwidth, 12 in cases where bandwidth is insufficient and network interruptions occur, cloud delays increase. It is not easy to provide health care services. 13 To provide health care services where it is necessary to make decisions and respond to events with minimal delay, another processing model is called fog computing, a generalization of cloud computing. 14 It is introduced by the CISCO company. 15 In this model, sensitive data is analyzed at endpoint IoT devices, and based on the defined policies, part of the data is sent to the cloud layer. This leads to improved use of bandwidth and low latency. 16 Fog computing as a virtual platform built into the edge of the network that provides computing, storage space, and network-based services between endpoint devices and the cloud server. 17 Providing health care services is highly dependent on network connectivity. Network failure may cause interruptions and delays in providing health care services, leading to unpleasant consequences for the patient’s quality of life and even death.
Telemedicine is defined as providing telemedicine services on telecommunications infrastructure. 18 Telemonitoring is a subset of telemedicine. Designing advanced telehealth monitoring systems is an open challenge and still an active research topic. 19 Due to the rapid growth and development of IoT web services, users are facing an information explosion. 20 Therefore, we are witnessing the growth of the development of decision support systems (DSSs) in various fields, such as health care which is named clinical DSSs (CDSSs). 21 CDSSs can improve and enhance the quality of care. 22
Cloud-based CDSS architectures have been developed to process data collected by sensors and telehealth monitoring devices to predict and diagnose acute clinical conditions. These architectures allow real-time data collection analysis minimally and with low latency. 23 Cloud-based DSS architectures suffer from a lack of location awareness, mobility support, and low latency. By performing data processing on the edge of the network, fog computing architectures have improved and enhanced the traditional cloud-based DSS architectures to overcome these limitations. 24
In telehealth monitoring systems, response time is a critical measurement. Fog nodes send all information to the cloud server for processing based on the input time. In the standard models, there is no difference between emergency and non-emergency requests to receive services from the cloud server. In the current fog models, much information is sent to the cloud server for processing since only some of this information is in an emergency and has priority for processing.
In this paper, a telehealth monitoring model based on fog computing with the ability to support CDSS on the cloud layer is developed and evaluated. To maintain the efficiency of the model, we used priority queues as a service on the fog layer, which was considered very effective in improving the response time to emergency requests.
The key contributions of this paper are listed below: • Proposing an innovative model for developing priority queues on fog computing. • Evaluation of the proposed model using CDSS of diabetes disease. • Evaluation of the proposed model regarding network usage, latency time, response time, and bandwidth.
Background
Recently, we have witnessed the development of IoT-based telehealth monitoring architectures and fog computing.2,5,6 These architectures are often divided into three layers: cloud, fog, and edge. 25 The clinical decision-making computing section in these architectures is divided into lightweight computing and heavy computing tasks. 26 According to the servers’ processing capability, lightweight computing task is deployed on the fog server, and heavy computing task is deployed on the cloud server.
Lightweight calculations consist of comparing data collected and sent from sensors with a threshold value to detect abnormal conditions and send an alert about the person being monitored, or the lightweight data mining method is used on the fog server to monitor the health status of patients in real time.
Among the processing and preprocessing used in the fog server in various studies can be cited the encryption of patient data to increase data privacy, feature extraction, normalization of data received from sensors, deletion of noise data received from bio-signals, 27 diagnosis of abnormal conditions, clinical decision making, health status monitoring, disease prediction, 28 data filtering, trimming, data analyzing and reconstruction. 29 According to the results of the study, 30 there are three general categories related to the classification of applications of fog computing in the healthcare industry. These three categories are patient monitoring, environmental monitoring, and education and reference, of which the most common application of fog computing has been identified in patient monitoring. This study also categorizes the features of health solutions based on fog computing into low latency, security, privacy, streaming, and real-time application, reducing the dispatch of information on the network, location awareness, heterogeneity, interoperability, storage, and computing, geographical mobility distribution, energy efficiency, and a large number of nodes wireless access. Among these, low latency and a strong presence of streaming and real-time applications have been identified as the main reasons for using fog calculations in health care. Because patient and environmental monitoring applications are sensitive to latency compared to other domains, the growth of fog computing has occurred in the monitoring domain. 31 Several studies have been conducted to use fog computing to develop efficient health monitoring systems. 31 Home quarantine during a disease pandemic is one of the applications of this technology. Doctors can guide patients with the right decisions by monitoring a person with Coronavirus disease 2019 (COVID-19)in real-time.32,33 For example, El- Rashidy et al. proposed an end-to-end deep-learning framework for monitoring COVID-19 patients in real-time. The proposed system has been declared effective regarding quarantine and remote care of patients with COVID-19. 34 Smart e-Health gateway can be presented with higher-level services such as data processing, local storage, embedded machine learning, and real-time local data processing at the edge of the network. In this regard, Rahmani et al. present an intelligent electronic health gateway based on fog computing. They also implemented an IoT-based early warning score health monitor to demonstrate the effectiveness and relevance of the proposed system in conducting a medical case study. The results of this study show an increase in intelligence, energy efficiency, mobility, performance, interoperability, security, and reliability in the use of fog computing. 35 Verma and Sood used data mining techniques to classify patients’ status, distributed storage and informed on the edge of the network to smart monitor patients at home. Event triggering based data transmission methodology has been used to process patient data in real-time. 36 As another application, machine learning techniques are used in the fog layer to process physiological data. Barik et al. present a mist computing-based architecture that uses deep-learning techniques to analyze physiological data collected by diabetic patients’ smartwatches. The proposed model is based on big medical data processing, and the results of this study showed that mist computing is useful for analyzing big medical data, especially in telehealth monitoring. 37 Liu et al. present the HPCS framework for privacy protection in fog computing decision support systems. In this architecture, a lightweight data mining method is used on the fog server to monitor the health status of patients in real-time. Newly discovered abnormal signals can be sent to the cloud server for more accurate predictions while maintaining privacy. Specifically, they developed a new secure internal outsourcing protocol for fog servers to achieve a lightweight, secure monolayer neural network. Also, a privacy-protection polynomial calculation protocol allows the cloud server to perform activation functions on a multilayer neural network confidently. The evaluation of the study confirms the achievement of real-time and high-accuracy health monitoring goals without compromising privacy. 28 The applications of fog computing are not limited to monitoring chronic diseases. For example, Bandopadhaya et al. have proposed a healthcare monitoring architecture for soldiers deployed in adverse environmental conditions. This architecture implements time-series pattern analysis based on data filtering at the fog layer. 38 Various wireless connectivity solutions are used for health monitoring systems based on fog computing. Kharel et al. presented an intelligent health monitoring system based on fog computing that used low-power wide-area network (LPWAN) technology. This model is suitable for monitoring the condition of patients in places that do not have access to the internet. 39
Heart patient telemonitoring is one of the areas that benefited from the benefits of fog computing to monitor the condition of patients. In Scirè et al. study, data processing and analysis tasks were transferred to the edges of the network to increase the lifespan of wearable devices. In this paper, new, lightweight algorithms are developed to analyze and interpret electrocardiogram (ECG) sensor data that can be implemented in a processor embedded in a wearable device to detect heart rate and arrhythmia classification. 19 Gia et al. proposed a low-cost health monitoring model to collect the health information of heart patients. Additionally, sensor nodes monitor and analyze the ECG in real-time to analyze the heart patient’s data professionally. 27 Gia et al. proposed an IoT-based health monitoring system that has been used in fog computing for the ECG feature extraction system as a lightweight process. The evaluations show that using fog computing in intelligent gateways compared to cloud computing will minimize the transmission delay. 40
Limitations and strengths of related studies.
Methodology
Configuration details of different fog nodes.
Cloudlets were also used to understand patient data and execute requests. To run fog programs, only one host is provided for each node to provide resources. With the help of fog computing, the cloud environment processes the patient’s data on the fog nodes. Due to the closeness of the IoT devices to the fog nodes, this process causes the network bandwidth to be saved and the delay time and response time to be reduced.
Dataset
PIMA data set description.
Proposed model
Figure 1 shows the flow of different entities in the home environment using fog computing. The fog layer can retrieve information about the patient’s health history from the cloud in the intelligent communication mechanism. On the other hand, in conventional communications, updates related to the actions taken by the node are transferred to the cloud along with the patient’s data for future actions. To improve the understanding of the dimensions of the proposed model, we have provided a layering approach to the smart home remote control model based on the fog shown in Figure 1. In this model, by combining different IoT devices, sensors, and other internet-connected hardware devices, a sensor network is formed that can record various patient-centered events efficiently. The main goal of this model is to monitor patients who need special remote care using IoT-based technology. The fog layer consists of fog nodes located at the edge of the network. Proposed model based on fog computing for patient monitoring in smart home.
In addition, fog characteristics such as real-time interactive services and mobility and scalability support can be an optimal choice in the IoT-based telehealth monitoring environment. The layering approach in the proposed model for patient telehealth monitoring based on fog consists of three layers, data acquisition, fog, and cloud. The three layers offer seven services:
(1) Data collection service (2) data pre-processing service (3) event classification service (4) event prioritization service (5) decision-making service (6) cloud storage service (7) update of the fog servers. Each service performs its own defined essential function, which is used as an input to adjacent services. All three layers are described below:
Data acquisition layer
In this layer, data from IoT devices related to the patient’s health status and home environment are widely obtained from various wireless hardware devices embedded in various locations in the home and the sensor network embedded in the patient’s body or wearable sensors. Each sensor node is integrated with biosensors and other medical sensors. Physiological and environmental parameters of a patient are sent to the fog layer in text, graphic, and numerical form.
Fog layer
The data sent by the sensors will be stored in this layer, which is referred to as local storage. Storage is necessary for local processing in the fog layer. Other operations performed on the data stored in the fog layer are data encryption based on size, type, and sensitivity. This service aims to increase the confidentiality of data. Another fog layer service is data standardization based on various health informatics standards. The data filtering service in this layer clears the data before analysis based on various filtering and noise removal techniques. Data fusion service is used to remove additional data, replace new data, and reduce the volume of sensor data. The data analysis service in the fog layer processes the sensor data locally, which reduces response time, sends data to the cloud, and improves system performance.
Compression methods without data loss are used in the data compression service to reduce the amount of data transmitted over the network from the fog layer to the cloud. The physical proximity of the fog layer to the body area network (BAN), sensors, and stimuli allow us to meet the needs of IoT health care. Some of these services are public and useable for any other than the healthcare industry. Figure 2 shows the fog layer services in the proposed model. Proposed model layer services.
In addition to the services mentioned in the fog layer to increase the data transfer speed between the fog and cloud layers, reduce the bandwidth used to send data, and reduce response time, three other services have been proposed.
Pre-processing service
One of the fog node’s tasks is to convert the received data into the appropriate format before sending it to the cloud layer. Also, fog nodes are designed to synchronize all data collected from heterogeneous devices over a universal time stamp. This service provides computing, networking, storage, encryption, compression, filtering, data standardization, and fusion.
Events classification service
The data sent by the sensors is stored in real-time in the fog nodes. The fog layer performs the data evaluation process by interacting with other fog nodes and services in each fog node for analysis. In this process, the data are compared with the normal values range predetermined by physicians. Heterogeneous data collected from different medical devices before classification are converted to the appropriate format. The normal values range of different parameters for classifying events is defined in the fog node. During the classification, the event is placed in one of the two classes: the normal event or abnormal event. The class of abnormal events includes those events that can exacerbate the patient’s health. A sensitive or abnormal event indicates that one or more parameters of a patient’s collected data were not within the normal range. It is a normal event that all the parameters collected are in the normal range and do not harm the patient’s health. Each range of normal values is considered a threshold to classify patient data into two abnormal or normal classes. In this way, only if the threshold is violated will the data be sent to the cloud for review, thus reducing the data sent to the cloud and saving bandwidth consumption.
Queuing service
The priority queue is a specific type of queue. Each queue item has additional information that indicates the priority of that item. Unlike a regular queue, values in the priority queue are listed on a priority basis instead of the first-in-first-out (FIFO).
In Figure 3, A and B, etc. denotes the value of items while 1, 2, etc. denote the priority of items. A priority queue is an extension of a queue that contains the following characteristics: - Every element in a priority queue has a priority value associated with it. - The element with the higher priority will be moved to the top and removed first. - If two elements in a priority queue have the same priority value, they will be arranged using the FIFO principle. Priority queue basics.

Using priority queues allows higher-priority requests to be received and processed faster than lower-priority requests. Priority queues are helpful in applications that offer different service level agreements to customers. Priority queues are widely used in the real world: - Algorithms: Certain foundational algorithms rely on priority queues, such as Dijkstra’s shortest path algorithm, prim’s algorithm, heap sort algorithm, etc.
42
- Data compression: It is used in data compression techniques like Huffman code.
43
- Operating Systems: Priority queues select the following process, ensuring high-priority tasks run before low-priority ones. It is also applied for load balancing and interrupt handling.
44
- Bandwidth Management: Priority queues are utilized to prioritize the critical data packet, so the network can make sure that those packets reach the destination as quickly as possible.
45
Our study used a priority queue to manage bandwidth and improve patient response time.
According to Figure 3, if a patient’s condition is detected as abnormal by the event classification service, it should be sent to the cloud for decision-making by CDSS, and relevant results should be sent to the target groups (health care team, patient, and patient family) with minimal delay. In some diseases, such as heart disease, responding to the event sent in the shortest time or real-time is necessary.
Response time will be affected when multiple events are sent to the fog node from different patients and environments. Queuing service is responsible for providing events in which one or more patient-related parameters are detected outside the normal range for sending to the cloud layer. However, when the number of these events increases, a queue of ready-to-send events will be formed. The queuing service must prioritize the events based on the critical level. Events in which a patient’s critical condition is detected will be a priority for sending to the cloud layer.
The valuation of abnormal parameters.
For this purpose, by using equation (1), the total value of the abnormal event parameters will be calculated.
Equation (1): Calculating the value of each event based on abnormal parameters
In equation (2), to unify the weight of events containing abnormal parameters, by using equation (2), we will normalize the obtained weights to the range [0, 1].
Equation (2): Calculating the weight of abnormal events
In the following, an example of the application of the proposed approach is explained.
Instance data sent to the fog layer (record #34).
Cloud layer
In the fog layer, the patient’s health status is evaluated. This evaluation shows that the patient is in normal or abnormal status. When a patient’s health status is classified as normal by the fog server, his/her historical data is stored in an electronic health record (EHR) on the cloud layer at regular intervals to control network traffic. On the contrary, when the patient’s health status is assumed to be abnormal, the patient’s data will be sent to the cloud server for decision-making.
Decision-making services
This service is located on the cloud layer. When the patient’s received data is abnormal on the fog server, it is sent to the cloud layer for decision-making. In this layer, the data is delivered to the decision-making service. By using the presented model in this study and placing CDSS of diabetic disease in the decision-making service, it is possible to monitor patients' health status. The CDSS examines the data and reports on the patient’s health status. The report is sent to the healthcare team, the patient, and the patient’s family.
Cloud storage service
This service is important in receiving and storing patients' health data from different fog nodes. The cloud storage service provides the required data when the CDSS requires historical data stored in an EHR. Also, the health care team for the final prescription, in addition to the evaluation results of the CDSS and data received from the patient, the historical data stored in EHR are required, which is provided by this service.
Fog update service
This service is responsible for adding new parameters and editing the value of the parameters set by the medical experts. When a new parameter, such as glucose, needs to be added, the process of defining the parameter and determining its normal range occurs on the cloud layer. This new information should also be applied to fog nodes for use. The fog update service is responsible for updating the fog nodes and the value of the intervals of each parameter. By determining the value of each parameter range by medical experts, it will place in the fog layer for further exploitation.
Results
Model evaluation
Some parts of the patient’s requests.
Figure 4 shows the calculation of network usage time for a different number of patient requests. This figure shows that the amount of network usage time in the fog-based model is significantly lower than in the cloud-based model because the fog-based model reduces patient requests to the cloud layer. Network usage time versus number of patient requests.
According to this result, the fog-based model reduced the network usage time by an average of 41.4% and 29.05 s compared with the cloud-based model. Based on the proposed model, only requests that have one or more patient parameters out of the normal range will be classified in the abnormal class and will be with one or more patient parameters out of the normal range will be classified in the abnormal class and recognized as eligible for network usage by the fog server.
Figure 5 compares latency time in a fog-based model to a cloud-based model with a different number of patient requests. Latency versus number of patient’s requests.
The fog-based model performs better than the cloud-based model in terms of latency. Compared to the cloud-based model, the fog-based model reduced the average latency by 9.1 s (36.18%).
Figure 6 shows the response time comparison in the fog-based model with the cloud-based model with a different number of patient requests. Response time versus number of patient requests.
Since only requests in which the patient’s condition is diagnosed as urgent are sent to the cloud layer, the response time is significantly improved by 9 s (25.8%).
Figure 7 shows a comparison of the bandwidth used in the proposed model and the cloud-based model. The proposed model reduced the use of bandwidth by 28.17%. Ten requests were sent in the first evaluation, from which six were detected with abnormal symptoms. Due to the 29-byte volume of each request, the proposed model used 174 bytes, and the cloud model used 290 bytes of bandwidth to send requests. Bandwidth versus number of patient requests.
This study used CDSS extracted based on the PIMA Indian diabetes dataset in study
46
to evaluate the proposed model. Some of the extracted rules are shown as follows: - R1: If (FP between 4 to 6) AND (OGTT between 78 to 98) AND (DBP between 56 to 76) AND (TSFT between 11 to 31) AND (2HSI between 13 to 33) AND (BMI between 21 to 27) AND (DPF between 0.31 to 0.35) AND (AGE between 28 to 31) Then Non-Diabetes -R2: If (FP between 11 to 14) AND (OGTT between 135 to 155) AND (DBP between 72 to 92) AND (TSFT between 10 to 20) AND (2HSI between 100 to 120) AND (BMI between 20 to 26) AND (DPF between 0.23 to 0225) AND (AGE between 55 to 59) Then Non-Diabetes
After uploading the rules of this CDSS to evaluate the performance, the requests of patients diagnosed abnormal by fog nodes will be sent to the cloud server for review based on priority.
Evaluation of the CDSS accuracy on the cloud layer.
Discussion
In this paper, we have introduced a new service called “priority queue” in the fog layer, which is programmed to prioritize the events sent by different sources in different environments to assist the cloud layer with reducing response time and latency. Priority queue service was considered very effective in improving the response time to emergency requests. Using the proposed model, the incoming events are weighted; those with higher weights indicate a critical health status and require emergency health services to be delivered immediately. Therefore, higher-weight events will have a higher priority in the delivery queue and will receive faster access to medical services. By combining CDSS, priority queues, and fog computing in this study, the network usage time, latency, and response time were reduced by 37.8%, 38.2%, and 25.8% compared to cloud computing.
Comparison of existing fog computing models with the proposed model.
The use of priority queues to identify patients with emergency status has made it possible to provide minimum service delay. In the present study, leveraging priority queues in the fog layer and allocating the required bandwidth between the fog and cloud layers significantly improved response time. As a result, requests of patients with acute conditions were more quickly and effectively handled.
Conclusion
The provision of telehealth services is highly dependent on the network connection. Network failure may lead to interruptions and delays in the provision of health care services and have unpleasant consequences for the patient’s quality of life and even death. Because fog computing develops at the edges of the network, it can provide many features, such as support for user mobility, geographic density distribution, and minimum latency and response time. This technology is essential for providing emergency services sensitive to delay. However, fog computing cannot substitute for the cloud, and interaction and cooperation between them are necessary to analyze large amounts of data and implement distributed health care. The results of this study showed that the use of priority queues improved response time and latency in telehealth monitoring systems. The evaluation of the proposed model is based on file-based input data as a limitation that can be received directly from sensors in the natural environment. Also, the performance of the proposed model was evaluated using the iFogSim tool, which can be evaluated in a natural cloud environment in future works. In this study, the proposed model was evaluated with diabetes data. It is recommended that this model be used for other diseases, such as heart disease which response time is crucial for decision-making.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
Ethical approval
The study protocol was approved by the Shiraz University of Medical Sciences (SUMS) Ethics Board (IR.SUMS.NUMIMG.REC.1400.073). The research ethics committee certificate is available at: https://ethics.research.ac.ir/ProposalCertificateEn.php?id=247842&Print=true&NoPrintHeader=true&NoPrintFooter=true&NoPrintPageBorder=true&LetterPrint=true.
