Developing and Evaluating A Real-time and Cost-Efficient Architecture for COVID-19 Using Internet of Health Things

— Coronavirus is spreading an outbreak in the world and the medical staffs have been coming under further strain with increasing in patients referring to the hospital. Real-time health monitoring systems play a critical role in prevention, control the pandemic disease, and enhance the entire health care service delivery in real-time, and influence on visiting the hospital visiting the hospital. In this paper, a hierarchical architecture for the Internet of Things is improved using resource and task management techniques for reducing emergency response time and enhanced the patients’ quality of experiences considering energy consumption, network delay, cost of execution in the cloud and network usage. In this proposed scenario, the task is divided into subtasks and processes depending on their functions with different execution times. This method also has led to improving the fog architecture. This proposed method is modeled are evaluated in terms of the specified parameters, using the iFogsim toolkit. The results showed an improvement of 80 percent in their parameters such as cost of execution, total network usage, and average delays, compared to the cloud and other common architecture.


I. Introduction
Throughout the world, the novel coronavirus diseases are humanity's worst crisis since World War II. Globally, more than one million people since March 2020 have been infected and nearly 3000 people per day died caused by this pandemic virus. A large percentage of people have been infected due to the coronavirus widespread outbreak and different levels of symptoms from mild to severe and critical [1]. The increase in the cost of healthcare services and spreading the infection to other people must be considered for the development of the Remote Monitoring System for Health Care to overcome health care challenges [2].
The quality of care for patients for pandemic diseases such as COronaVIrus Disease (COVID-19), H5N1 influenza virus, and severe acute respiratory syndrome (SARS)-associated coronavirus is generally improved by these systems [3].
Internet of Things (IoT) solutions are used to create and deliver effective healthcare emergency services. The health monitoring systems are enriched with the Internet of Things technology that blurs the distinction between sensors and networks as health services to participate in the patient's treatment [4]. IoT acts as an enabler to help improve remote healthcare systems by using features such as ubiquitous and context aware intelligence. Patients' data are transmitted continuously from health sensors to the outer processing layers for further processing [5].
However, the concept of Internet of Things Health (IoHT) comes from embracing IoT technology and the healthcare industry. This concept, investment strategies, and healthcare market research will be used to improve the quality of life and cost-effectiveness for patients with underlying health condition in Primary Care, and also create a healthy economy [6].
As we know, IoT applications have different requirements caused by the domains of utilization. Quality of experience (QoE) is one of the key trends for measuring patients' satisfaction in e-health and m-health. It is worth mentioning, the specific QoE evaluation model for IoT applications does not exist due to the lack of standard IoT architecture [7]. User perception, expectations, and experience of the healthcare services are all about QoE and depend on a number of factors including the patient's devices, application, and network-level QoS parameters, and healthcare delivery services. So, the QoE can be improved by available, real-time, and scalable emergency services provisioning [8].
QoE-aware applications are used to optimize the power and costs in the health monitoring system using application placement techniques. The metrics such as response time, cost, network bandwidth, and power consumption have been using to improve the quality of patients' experiences in network and processing devices. Emergency health care services are using contextaware and priority based systems improving response time [9].
We model and evaluate QoE-aware application placement policy in the IoT and fog computing environment using iFogSim simulator considering the Sense-Process-Actuate model of the relevant application [10].
The main contributions of this paper are summarized as follows: 3 1) Proposing an architecture for agile service deployment on monitoring centers build on existing infrastructure. 2) Using the remote health monitoring system for in confronting with pandemic diseases and adapting to the COVID-19 crisis. 3) An investigation on the impact of different application placement policies in a hierarchical, scalable IoT architecture and evaluating some policies that may affect Quality of experience's metrics. 4) Suggesting an architecture with the capability to collect, transmit, and analyze the information to help produce vaccines, drugs to pandemics diseases and reduce infection and cost. The rest of the paper is organized as follows: In Section II, we describe the background and presents the related works in this area. In Section III we discusses the system overview and assumptions. Section IV, presents simulation environment and the performance evaluation. We conclude and discuss the paper in Section V, VI.

II. Background and Related works
The healthy life expectancy of people can be improved by advances in technology due for the increasing elderly population. The pandemic disease spread can be monitored to control at an early stage by the Internet of Health Things (IoHT) and eventually lead to better treatment. Health monitoring and primary health care services lead to cost reductions and will also improve the quality of care [11].
The two most important strategies for dealing with this pandemic are mitigation and suppression to reducing the spread of the disease and reversing the epidemic growth of the disease, respectively [12]. In table I, U.S. Centers for Disease Control and Prevention (CDC) present the Hospitalization, intensive care unit (ICU) admission, and case-fatality percentages for reported COVID-19. According to the table I, hospitalization and ICU admission rates increase for patients. Therefore it is obvious that due to the lack of necessary health facilities hospitals and healthcare systems cannot provide the necessary medical services for patients with the infectious diseases caused by COVID-19 and it has been leading to strain the health systems worldwide.
Innovative approaches, such as IoT, in the health area, are used for behavioral tracking, storing, monitoring, education, and communication. Integrating healthcare services and these approaches have significant effects in remote monitoring, diagnosis, and treatment of patients that are enhanced the quality of life and experiences [14].The fine-grained and accurate services must also be considered due to the big health sensor data [8].
It's worth noting that, contributing to the development of more sophisticated methods in remote monitoring, tracking, digital transformation, and robotic healthcare, the Internet of Things (IoT) facilitates mobility and access to treatment and enhances the management and sustainability of healthcare resources and services. In IoT healthcare applications, mobile devices are used to 4 provide concurrent access to medical information and maximize the use of available resources [15].
Medical devices, mobile devices, cloud computing, and ubiquitous sensing are connected through the IoHT. Storage and processing in cloud computing architectures are separated by boundaries. The increasing scale of geographically dispersed systems and real-time applications in IoHT applications are not supported by the cloud computing technology. So the fog and edge computing techniques can be used to address these challenges [16].
Also, edge computing compared with fog computing is defined by running specific applications in a fixed logic location and providing a direct transmission service [17].
Fog and edge computing both mitigate latency issues, lower data transmission costs and reduce network congestion by bringing the process closer to the sources [16]. These two techniques are varied by the parameters below to optimize service quality, performance, energy consumption, and costs. These two techniques have also enhanced scalability by reducing hardware and software dependency, provisioning cross platform and on-demand services as the IoT challenges [18].
As we know, scalability is the important issue of degrading the Quality of Service (QoS) requirements and in turn Quality of Experience (QoE) [19] The Quality of Experience in IoT applications and services evaluation is affected by the lack of a reference model in IoT architecture. It's worth noting that information and resources are the foundation of smart healthcare to improve the quality of the healthcare experience patient's satisfaction level, and emergency services in person oriented IoT application [8].
Some key decisions such as data gathering methods, data processing method and location (edge, fog or cloud), and data transmission frequency have affected efficiency and effective resource provisioning. Energy efficiency is one of the major concerns in mobile cloud resource management and has influenced by the optimization of resource allocations under energy, performance, and QoS constraints. Furthermore, Resource management techniques by determining the placement of modules on each edge of the device are used to minimize latency and maximize throughput [16].
Healthcare monitoring using IoT applications has received considerable attention in recent years. Real-time and critical system considering location-aware, context-aware services have a significant influence on QoE.
In [5], [8], [20], [25], [27], they have presented several approaches for real-time monitoring systems based on IoT architecture combined with cloud or fog and edge-based functionalities. Their proposed ideas have been discussed in IoT applications, such as health care, environmental monitoring, and smart city. In these studies, the authors developed novel systems to enhance availability, accessibility, intelligence, and scalability by considering energy efficiency, response time, and fault tolerance.
Some Authors et al. [7]- [9], [21], [22], modelled a QoE-aware application placement policy and discussed the impact of privacy, reliability, quality, and security of data on QoS and QoE, which guarantee the improvement of these parameters. They have evaluated their approaches in chronic disease, vehicle, and smart surveillance.
In [8], [26], [27], [30], the authors analyzed the impact of emerging technologies such as mobile networks, cloud computing, the Internet of Things (IoT), big data analytics and ubiquitous computing in the healthcare area. Their proposed systems is consisting of devices, fog computing, and cloud computing services. They have analyzed for determining the execution time, response time, cost, expected delay, and power consumption, and addressed the issues of IoT devices such as data management, scalability, regulations, interoperability, device-network-human interfaces, security, and privacy in healthcare services.
In [28], [31], the authors using resource management techniques and proposed various resource management techniques. They discussed the various resource management techniques 5 considered in the cloud and fog/edge environment with resource constrained, heterogeneous, and dynamic features.
Considering the above and other studies [8], real-time responding, efficient resource management, cost of execution in cloud and total network usage are one of the major challenges in remote healthcare monitoring using IoT applications.
We have considered our proposed application placement strategy and these important issues for improving the quality of experiences in IoHT architecture, which is described in the next section.

III. System Overview
In the proposed method, patients are classified at different levels based on the severity of disease (Mild, Severe, and Critical). As we know most people have no symptoms when they have COVID-19, so they can recover at home and should avoid coming to the hospital.
Wireless Body Area Networks (WBANs), mobile devices and smart gadgets are used to collect patients' information, such as patients' age, underlying health condition, body temperature, Blood Oxygen Saturation Level (SpO2), and the questionnaire. Then this information is transmitted to the control and reporting centers (table III. Spreading of the disease and eventually exhausting for medical staff are the results of referring these patients to the healthcare centers. The proposed hierarchical architecture is based on local and global cloud computing that collects information, analyzes them and eventually, reports the results to the healthcare centers. The patients are divided into three categories according to their symptoms as follows and seen in table II and receive the health services they need according to their category and priority level [1]. 1) Mild disease: In this category of patients mild symptoms (non-pneumonia and mild pneumonia) associated with fever, respiratory symptoms, like dry cough and body aches usually show up 2 to 20 days after patients are infected and although may take a couple of days. Some symptoms are also occur such as Shortness of breath, aches, and chest pain with Persistent dry cough. This occurred in approximately 80% of patients. Remote health monitoring systems can aid in determining abnormality in patients in this stage of illness in-home or isolated places. 2) Severe disease: Fever more than 37.5 • C with shortness of breath, based on their age and other health conditions will show up in this group of patients. The symptoms of this category are with chills and a feeling that you don't want to or can't get out of bed. Patients' age and underlying health condition must be considered in providing healthcare services and priority level. This occurred in approximately 14% of patients. Remote health monitoring systems can aid in determining abnormality in patients in this stage of illness in the hospital or in-home isolation. 3) Critical disease: COVID-19 involving pneumonia can be life-threatening for patients with a weak immune system and must be hospitalized in isolation. Their symptoms are respiratory failure, septic shock, and/or Multiple Organ Dysfunction (MOD) or Failure (MOF). This occurred in approximately 5% of infectious patients. Remote health monitoring systems can aid in determining abnormality in this stage of illness in the isolation room. Patients with severe disease severity have a higher priority than the first category and need more primary care. Eventually, if symptoms feel worse, they must be taken to the hospital for further medical services, immediately.
Patients fill the table III to detect fever or any of the symptoms such as Cough, Shortness of breath or difficulty breathing, chest pain or etc. in 14 days automatically using smart gadgets or manually with traditional techniques. The patients' health check-up and monitoring should be periodically and their symptoms are analyzed for any abnormality. Eventually, if the symptoms become worse it is detected by the system and they are assigned to hospital.

A. Application Model
In this section we describe the application model for IoT based and hierarchical architecture for context-aware smart health care service provision. The inspiration behind our study comes from previous work in terms of energy consumption, resource management, and quality of experiences in healthcare monitoring systems [8]- [10], [26]. Fig. 1 shows the application model for a patient's monitoring system consisting of four modules to perform processing mobile, preprocess, initial process, final process using iFogSim toolkit. The physiological signals are captured by wearable physiological sensors and the patients' health status is revealed in the display for the service provider, patients, physician, etc.
The modules shown in Fig. 2 are described below.
Mobile process: This module defines as the interface between health sensors such as WBANs, SpO2, questionnaire, and patients to record the physiological data and update the results and notifications. Checking the physiological data and processing for abnormality detection tasks are performed on mobile devices and finally sent to the display module and the appropriate module in the proposed architecture. Preprocessing: This module is used to preprocessing and detect any abnormality, and eventually transmitting and strong the incoming data to the upper modules.
Initial processing: This module is used to perform heavy computational processing and deployed on powerful resources in the fog environment to detect abnormality with the analysis and processing of the patients' data.
Final processing: This module is related to data-intensive and time-consuming processes including checking patients' history, pattern recognition, and abnormality detection, feature extraction, and geographical analysis.

B. Organization of Physical network
As mentioned in [8] and modelled in Fig. 2, in the proposed architecture physiological data are sent to the appropriate layers for detecting abnormality due to resource and energy constraints in the mentioned architecture.
In this architecture the cloud infrastructure is divided into dynamic cloudlets to meet the evergrowing computing demands, static cloudlets for further processing and storing, and the federated cloud platform to provide data-intensive processing including feature extraction, pattern recognition, patient history checking, and geographical analysis.

C. Architecture
As we can see in Fig. 2, the physical network topology consists of sensors, display nodes, dynamic cloudlets in the edge layer, static and powerful clouds in the fog layer, and the federated cloud with hubs as a data center. Edge layer: The dynamic cloudlets are deployed on the edge node that helps the SMDs to process the transmitted information without any constraint for the Mobile Device.
Fog layer: The initial process, further processing, and store patients' data can be deployed in this layer due to the availability of resources in process and storage capability.
Federated cloud layer: Data-intensive processing, data integration, heavy processing tasks, and deep analysis are performed in this layer to better responding to the demand of the patients.

IV. Simulation and Results
In this section, we have modelled and simulated different application placement scenarios in the Patient Health Monitoring System. We evaluate the efficiency in terms of network latency, network usage, cost of execution and energy consumption in the proposed application placement strategy and finally, three different placement strategy scenarios have been compared with the proposed one using the iFogSim simulator.
In these evaluations, applications are placed on SMD as either cloud processing mode or fog processing mode. It worth noting that, in order to have a fair comparison in this simulation, we have been considered the ideal situation for all of the application modules. But as will be described in this paper, tasks have different execution time and complexity. 8 The processes are placed at various hierarchical levels to respond to patient requests in real time with the availability and fault tolerance of healthcare services. All the sensors are connected to the SMDs. Each of the six patients' devices is assigned to one dynamic cloudlet and each of the 10 dynamic cloudlets is assigned to one static cloudlet. Each of the ten static cloudlets is hierarchically connected to one hub server in the federated cloud.

A. Evaluation Metrics
Based on the proposed architecture described above, some of the performance evaluation metrics are explained.

1) Cost of execution in cloud:
The computation cost and communication cost are vital in the cloud resources as introduced in Eq. 1 [33].
Computation cost = the cost that is required for utilizing the resources for computation of the I/O requests for the data access (Eq. 2).
Where the cost of running a task Vi is defined as on provider p with VM mj. Communication cost = the cost that is required for utilizing the resources for I/O requests and responses between the data center and the VM for the data access (Eq.3).

= .
(3) Where Da is the GB required for task Vi and is the inbound network traffic prices per GB of the provider p.

2) Emergency Response Time:
The response time in Eq.(4) is based on network latency and processing time. In the proposed architecture, the response time of the servers is reduced by reducing the distance between the patients and the computing nodes based on Eq.(4) : = 2 * ( ) + (4)

3) Network Latency:
Latency introduced by these components in Eq.(5) [8]. It should be noted, due to the importance of End-to-end delay in the real-time application, propagation and queueing delay have a significant effect in response time Eq.(4) [8].

4) Queuing formula:
The aim of this paper is to reduce the waiting times of patients in queues by task management techniques. Adding resources capabilities lead to to reduce the mean service rate (µ). Increasing the Inter-arrival time lead to reducing the mean arrival rate ((λ)) lead to reduce the utilization of the server ((ρ)). The Queuing formulas for the M/M/c queue considered in Eq.(6) [8].

B. Case study
As we know that Cloud computing is trending technology and being used in the healthcare industry so, used to investigate in this study [26], [27]. Fog architecture which will investigate in this study is proposed in previous studies to reduce the cost of execution [25], [29], [30]. The hierarchical fog-cloud scenario has been used in DRAM [31] to replicate running services and minimize hardware costs. It is worth mentioning that our solution are proposed in the previous study [8].
We have designed and developed four scenarios to compare different approaches. These is shown in table IV as follows: It should be noted, in this evaluation, all the tasks took the same time to process, hypothetically but as we described earlier in [8] and presented in the following equation it's not the same. This presumptive condition results in has improved the fog architecture parameters.
As shown in Table IV, in the fog scenario, we have been using fog devices to place the application modules. It is noted that in this scenario, the Final processing module will not support the process in these devices.
In the hierarchical fog balancing scenario, the mobile process and preprocessing modules deployed in the fog devices, and other processing modules are performed in the Cloud mode. In the Only cloud scenario, all applications are deployed in the Cloud mode, and the mobile process module will be deployed on the SMDs to ensure quick response for abnormality detection. In our proposed approach, the mobile process module will be deployed in the SMD, and the preprocessing and initial processing modules will be deployed on fog devices as dynamic and static cloudlets, respectively. Eventually, the final processing module is deployed in the Cloud mode.

C. Results
We have summarized our results in tables V, VI and then have explained our findings in the following.

1) Cost of Execution (CoE):
In the fog Scenario, as seen in Fig. 3a, due to the lack of use of cloud environment and execute the processes in the fog devices, the cost of execution (CoE) in the cloud environment is zero based on Eq. 1. Our proposed architecture has improved CoE compared to the other scenarios, except for the fog scenario. The differences between the fog scenario and our proposed approach are arising from the execution of the final processing in cloud nodes due to availability, critical health services, better response time and fault tolerance in healthcare services.
2) Total network usage: As seen in Fig. 3b, in our proposed scenario and the fog scenario the total network usage is less than other scenarios. The differences between the fog scenario and our proposed approach arise from the lack of transmitting patients' data to the federated cloud. In our proposed approach, patients' data is transmitted to the federated cloud for availability, fault tolerance and better response time in healthcare services. There is a significant improvement over total network usage compared to the cloud scenario and hierarchical fog balancing cloud scenario.
3) Average Latency of loop control: As seen in Fig. 4b, the average latency of loop control for each scenario is measured to respond to patients' demands for abnormality detection in real-time. It's worth noting that, due to the variety of critical paths on different healthcare monitoring architectures, the most significant loop control in each scenario is different from the others in terms of average latency. It is worth mentioning that, in our proposed scenario, significant improvement has been achieved to reduce the latency of these critical path based on Eq. 4 and Eq. 6. 4) Energy Consumption: As seen in Fig. 4a, the average energy consumption is measured for each scenario and for SMDs, edge nodes, fog nodes, and the federated cloud.
As seen in Fig. 2, in our proposed scenario, due to the increase in the use of patients' devices (SMDs) for emergency abnormality detection, energy consumption has increased significantly.
As seen in Fig. 4a, due to the execute the preprocessing step in SMD devices instead of dynamic cloudlets in edge nodes, the energy consumption of dynamic cloudlets is reduced compared to the hierarchical fog balancing cloud scenario.  Due to the execution of the initial processing step in static cloudlets, the energy consumption of all scenarios will be the same. Because of the execution of processing tasks in other layers in our proposed scenario and the fog scenario, energy consumption has improved compared to other scenarios.
Also, as seen in Fig. 4b the overall energy consumption in our proposed scenario and the fog scenario on the hierarchical layers are improved compared to other scenarios.

Fig. 4: Energy consumption simulation results
Finally, and mentioned above, there have been different levels of this disease and about 80 percent of the general population is at mild and moderate levels. These two categories do not need to be hospitalized and remote and local diagnosis and vital signs reports for the doctor, nurse, and medical centers can reduce the number of referrals and reduce financial costs. Therefore, according to the above, this proposed scenario can be used to protect health professionals and patients from the risks of infection and eventually lead to reduced infection and prevented Humanto-human transmission (HHT).

V. Discussion
The main goal is to explain using the proposed architecture to provide the possibility of collecting information in a timely manner using personal equipment at home and statistical analysis of information, pattern recognition, and analysis of geographical information in pandemic disease cases like COVID-19. It is worth noting that this system by aggregating, merging patients' data at higher layers, and handle it, will help to identify the most common symptoms of this disease and infection patterns. Eventually, as necessary results will send to the institutions in charge of healthcare to the production of vaccines, drugs, and received organized healthcare support and services.
As mentioned in the previous section, IoT-based remote health monitoring systems have improved patients' satisfaction and reduced cost of treatment, thus leading to an improved quality of life. Real-time response and scalability to meet the demands are essential to Safety-critical systems including critical health infrastructure systems, autonomous vehicles, and QoS-critical systems that can result in loss of life, significant property damage or damage to the environment. IoT-based Monitoring and surveillance systems have been improved by using the intelligence process from data collection, to data analysis, and to the realization of business intelligence.
It is worth noting that, the proposed hierarchical architecture compared to fog computing, results in improved scalability and fault tolerance and reducing response time in the healthcare system which is of paramount importance in health emergency services. It should be noted, this study is based on the previous study [8] and has compared different application placement strategies to improve power consumption, critical path delays, network usage, and cost of execution in cloud architecture for IoT. Worth noting that in the proposed architecture scalability, fault tolerance and response time will be guaranteed.
In this proposed model, we present a dynamic application placement in the cloud network and intelligent management dynamic operations, based on task assignments with the different workload and available resources. The iFogSim simulator is used to model and evaluate the different placement scenarios.
As we know fog computing techniques have been used to reduce latency compared to the centralized cloud and other common scenarios, however, data-intensive processing, and scalability issues are not guaranteed. Considering the different level of performing abnormality detection, thus the executing time and resource requirements are also different. In our proposed placement strategy, the urgent processing task executes on patients devices, fog devices edge node, and cloud servers, independently. This strategy leads to improved quality of experiences, energy consumption, and emergency response time due to increasing patients' demands.
As explained in the result section, different application placement strategies have affected overall latency, energy efficiency, cost of cloud execution, and total network usage. As noted earlier, due to the distribution of consumption between layers and to the offload of abnormality detection processes to the patients' devices in the proposed model and the fog model, the power consumption is improved. Also, the hierarchical transmitting method is used to improve availability, reliability, better response and QoE, considering the overall overhead cost. It is worth noting that this overhead can be balanced by adjusting the policies and using compression and encoding techniques.
As the future works, we intend to investigate the security related issues and challenges, optimize abnormally detecting algorithms, and implement new electronic health records solutions based on these architectures.

VI. Conclusion
IoT-based remote healthcare monitoring systems have major impacts on many aspects of the medical care area including acquiring the patient's physiological parameters, reducing-g patients 'daily visits to the hospital and thus improving patients' quality of experiences. In this paper, a context aware and hierarchical architecture that can be useful in pandemic disease are proposed using a QoE-aware health monitoring application placement scenario. We model and evaluate the effect of application placement mechanisms on objective parameters based on different scenarios for real-time abnormality detection using iFogSim simulator. Given the crisis of the COVID-19 pandemic crisis and ensuring optimal use of existing infrastructure, we aim to improve in quality and cost-efficiency of healthcare services, reduce unnecessary visits to the hospital emergency department. In the meantime, it is important to address issues such as scalability, early intervention, and quality of experiences.
It is worth noting that due to the importance of quality experience in healthcare, we implement the context-aware application module placement policy and decide which devices are used to perform processes.
The results of the proposed scenario compared with conventional healthcare scenarios in the hierarchical IoT-based architecture and show a significant improvement in terms of the parameters mentioned. The experimental results show a significant improvement in the energy efficiency, cost of execution in cloud, and network usage using our proposed scenario and fog scenario, considering the availability, scalability, fault tolerance and response time. The response time is also improved compared to other scenarios. *Funding: Not applicable *Conflicts of interest/Competing interests: All authors declare that they have no conflict of interest.
*Availability of data and material (data transparency): Not applicable. *Code availability (software application or custom code): Not applicable. *Authors' contributions: All authors have equal contributions.