A Cloud and IoT-enabled Workload-aware Healthcare Framework using Ant Colony Optimization Algorithm

—In recent years, smart cities have gained in popularity due to their potential to improve the quality of life for urban residents. In many smart city services, particularly those in the field of smart healthcare, big healthcare data is analyzed, processed, and shared in real time. Products and services related to healthcare are essential to the industry's current state, which increases its viability for all parties involved. With the increasing popularity of cloud-based services, it is imperative to develop new approaches for discovering and selecting these services. This paper follows a two-stage process. The first step involves designing and implementing an Internet-enabled healthcare system incorporating wearable devices. A new load-balancing algorithm is presented in the second stage, based on Ant Colony Optimization (ACO). ACO distributes tasks across virtual machines to maximize resource utilization and minimize makespan time. In terms of both makespan time and processing time, the proposed method appears to be more efficient than previous approaches based on statistical analysis.


I. INTRODUCTION
Recent advancements in Internet of Things (IoT) [1,2], Blockchain [3], 5G connectivity [4,5], cloud computing [6], smart grids [7], optical networks [8,9], machine learning [10], and artificial intelligence [11,12] have resulted in exponential growth in data usage across a wide variety of engineering and commerce fields. Embedded systems and Internet-enabled devices have given rise to a new technology called the IoT [13]. IoT allows physical objects, data, and virtual environments to interact. In a prosperous digital society, IoT is used in various applications for data acquisition, such as smart communications, smart healthcare, and smart cities [14]. IoTenabled medical sensors and tools pose several potential research opportunities in medical and health care [15]. There is a mutual dependency between IoT and cloud computing. By combining both, they provide real-time health data to medical professionals and caregivers at the remote site [16]. Cloud resources and capabilities enable IoT to overcome technological limitations. In contrast, IoT can benefit the cloud by adding real-life items to its scope and distributing and dynamically delivering many new services [17].
Smart environments can be extended to develop new applications and services using IoT-centric-cloud architectures. Combining cloud computing with IoT technology is far more efficient than regular cloud-based applications. This combination of technologies can be used in emerging medical, military, and banking applications [18]. Cloud-based IoT is particularly useful in medical applications that require tracking and remote access to records [19]. IoTdriven healthcare applications collect data on frequent changes in health parameters and continuously update their severity. The IoT devices and sensor readings associated with medical parameters will also be used to diagnose diseases on time before they become severe [20]. There is an increasing amount of data being created and stored for a long period of time today [21].
IoT plays a vital role in healthcare applications. Three phases are included in this criterion: treatment, monitoring remotely, and awareness of context. Patients in the hospital, especially those in intensive care, require constant monitoring and close attention to respond to potential crises and save lives. Physiological data is collected using sensors, analyzed in the cloud, and sent to caregivers (parents, nurses) for further analysis [22]. The sensors collect and analyze the flow of data collected by many health professionals to examine patients according to their specialties. This makes identifying the emergency conditions of patients at risk (Urgent or emergent surgery patients, cardiac patients, etc.) much easier [23]. Many real-world applications rely on remote monitoring. People worldwide are currently suffering from the lack of effective healthcare monitoring. People with chronic illnesses, such as the elderly and children, must be examined almost daily. Remote monitoring eliminates the need to make rounds to the hospital for checkups. Caregivers can diagnose early and intervene earlier with remote access sensors. Healthcare IoT applications require context awareness as a key criterion. As it can determine the condition of the patient and the environment, this technology is extremely useful in comprehending changes in the health status of these patients. Furthermore, changing the patient's physical state could increase his/her vulnerability to diseases and lead to health deterioration [24].
The paper is divided into two stages. In the first stage, an Internet-based healthcare model is designed and implemented, which involves wearable devices attached to the patients' bodies. The second stage proposes a new method based on Ant Colony Optimization (ACO) algorithm to solve the load balancing problem. In order to maximize resource utilization and minimize makespan time, the ACO distributes tasks over www.ijacsa.thesai.org the available virtual machines. IoT provides a basis for nextgeneration applications and services by supporting and developing foundational technologies. Likewise, cloud computing provides the potential to support these applications, allowing for broad network connectivity, distributed computation, and real-time data sharing. Using cloud computing and IoT together provides enhanced performance and security. Still, they could also be used to develop innovative new applications. Cloud computing allocates tasks to virtual machines (VMs) with varying lengths, launch times, and processing times. A key factor in this process is balancing the loads among VMs. Cloud computing presents a number of challenges concerning load balancing. Since cloud workloads can fluctuate depending on users' requirements, it is difficult to arrange these resources in the cloud. By using task scheduling, load balancing allows the requests to be split between different machines so that more jobs are processed in less time, and the VMs' performance can be monitored. A key goal of load balancing is to reduce makespan times and increase cloud resource utilization. The rest of the paper is arranged in the following manner. Related works are reviewed in Section II. Section III gives a background of the problem. Section IV presents the proposed method. Section V concludes the paper.

II. RELATED WORKS
Hassan, El Desouky [25] has developed an intelligent and context-aware hybrid model for assisting patients at home under close supervision. Cloud-based systems monitor chronic illness patients at home and store and process massive amounts of data generated by ambient assisted living systems. The local component monitors patients in the event of a cloud system failure or internet disconnect. Real-time health status can be determined using context-aware methods that continuously monitor ambient conditions, physiological signals, and patient behavior. The effectiveness of the model for monitoring and identifying emergencies in an unbalanced dataset has been demonstrated in an experimental case study, including patients with blood pressure disorders. However, the case study only included a small sample size of patients. In order to truly be effective, the local component would need to be tested on a larger, more diverse group of patients. Kumar,Lokesh [26] propose a mobile healthcare IoT and cloud-based application. By combining the medical sensors with the UCI repository dataset, the researchers have created diabetes datasets for predicting people with severe diabetes. Additionally, a new algorithm has been developed that diagnoses and estimates the severity of diseases using fuzzy rule-based neural classifiers. Health records from various hospitals and UCI Repository datasets were used for some experiments. Compared to existing disease prediction systems, the proposed mechanism is more effective. However, there are some potential drawbacks to this system. First, it is reliant on accurate and up-to-date data from both the medical sensors and the UCI repository. If either of these sources is inaccurate or out-of-date, the predictions made by the system will be less accurate. Additionally, the system is only as effective as the algorithms used to make the predictions. If the algorithms are not accurate, the predictions will also be inaccurate.
Using edge-cognitive computing, Chen, Li [27] have developed an intelligent healthcare system. This system monitors and assesses users' physical health using cognitive computing. Using a health risk assessment table, a user's health risk grade is determined under various health statuses and then distributed across the entire edge computing network based on the user's health risk grade. As a result, the network has a deeper cognitive intelligence that is application-aware. Experiments show the proposed method increases patient survival rates in an emergency while improving user experience and maximizing computing resource utilization. However, there are also potential risks associated with this health risk assessment table. For example, if the health risk grade is incorrectly determined, it could lead to devastating consequences for the user. In addition, if the table is not updated frequently, it may not be accurate in predicting health risks.
In addition, Garbhapu and Gopalan [28] have created a device using the IoT to monitor patients simultaneously while wirelessly transmitting data to physicians across the globe. Hub and spoke diagrams illustrate the interaction between the sensor nodes in the instrument, which include a microprocessor MSP430 and a wireless transceiver nRF24L01. The wristband has a sensor that continuously monitors the user's vital signs. Data collected by the MSP430 is stored and wirelessly transmitted for future treatment by doctors. However, there are also potential risks associated with using such technology. For example, if the data collected by the wristband is not properly encrypted, it could be hacked and used to exploit the user's personal information. Additionally, if the wristband malfunctions, it could give false readings that could lead to incorrect diagnosis and treatment by doctors.
An IoT-based mechanism for authenticating health monitoring signals was developed by Hossain and Muhammad [29]. Since ECG monitoring is an essential evaluation tool, it was used as a case study. ECG signals can be constantly monitored by a medical expert to detect illness and prescribe medications to minimize avoidable deaths. ECG signals are captured by a portable ECG recording device and sent via Bluetooth to a smartphone or computer. To ensure security and authentication, the recorded signal is processed with a simple algorithm to remove unwanted noise. After extracting and classifying the temporal and spectral features of the watermarked ECG signal, a one-class support vector machine classifier is used. A suitable healthcare expert evaluates the watermarked ECG and classification decision. The expert then enters a prescription and a conclusion into the cloud server. Eventually, the patient is notified by the cloud. Cloud-based ECG health monitoring experiments and simulations has demonstrated the applicability of this method. However, while this system may be convenient for some, there are also potential privacy concerns that come with storing this sensitive information in the cloud. There is also the potential for system failure or human error that could lead to misdiagnosis or delayed diagnosis.
An overview of ubiquitous and intelligent healthcare systems is provided by Motwani, Shukla [30]. A novel mechanism to monitor and recommend smart patients was www.ijacsa.thesai.org developed using deep learning and cloud-based analytics. The proposed mechanism monitors and forecasts patients' health status using vital signs and activity context, generated by ambient assisted living devices and calls for assistance. The experimental study used an unbalanced dataset compiled from a case study of blood pressure patients and predicted the patients' actual health status. Preventive and therapeutic care can be provided in real-time without Internet access or cloud services. However, the accuracy of the predictions made by the mechanism may not be accurate enough to provide reliable preventive or therapeutic care to patients in real-time.
Using blockchain technology and attribute-based encryption Mubarakali [31] has proposed a method for securely transmitting healthcare data in cloud environments by addressing privacy and security concerns. A centralized healthcare system collects patient data using wearable devices. Patient conditions are observed while sleeping, hearing heartbeats, and walking. Servers in the cloud receive the gathered data. Doctors review the patient's observation report, genetic information, and clinical test results before prescribing the appropriate medicine and precautions to speed up recovery. Based on experimental results, the approach has shown better success rates, execution times, and delay times than previous methods. However, there are also potential privacy concerns that come along with this method of data collection and storage. If patient data is not properly secured, there is a risk that it could be accessed and used without the patient's consent or knowledge. There is also the potential for security breaches that could lead to the release of sensitive patient information.

III. BACKGROUNDS
With the rapid growth of the IoT and the popularity of wearable devices, the relationship between healthcare and technology has significantly changed in recent years. This results in personalized healthcare, increasing access to healthcare like never and allowing for customization like never before. IoT-enabled healthcare models require an intensive collaboration with cutting-edge technologies to build a flexible, efficient and secure platform for developing new services. A major objective of IoT in healthcare is to replace the traditional approach with an electronic approach, which means linking the patient and doctor in real-time via a smartphone so that doctors can continuously track the patient's health and provide him with recommendations.
Cloud computing provides a cost-effectively scalable and resilient computing resources, enabling large-scale applications to be deployed quickly and efficiently. Largescale applications handle a large volume of work. There are three types of cloud computing services: infrastructure as a service (IaaS), software as a service (SaaS), and platform as a service (PaaS). SaaS cooperative models allow users to access cloud applications via web browsers on desktops or workstations. Using PaaS, developers can improve, evaluate, and accommodate their applications. The IaaS model enables large-scale applications to be run on an elastic and scalable computing platform.
VMs offer users' preconfigured CPU processors, bandwidth, memory, and storage capacities in a virtualized computing environment. Virtualization solutions are available at various prices to meet customers' varied needs, allowing them to manage computer resources efficiently. IaaS offers end users three primary benefits. Users pay for the infrastructure usage as they would for essential services. Resources can be contracted or increased depending on the needs of the application. Additionally, IaaS cloud computing improves application development by providing direct access to resources. Lastly, according to users' requirements, renting resources is possible anytime and anywhere. In IaaS clouds, finding enough resources to handle a wide range of massivescale tasks is still an open and well-known challenge. The healthcare field can benefit from cloud computing techniques for maintaining patients' records and monitoring health outcomes more efficiently and effectively. Healthcare systems can benefit from cloud computing in the following ways:  Cost reductions: Hardware and operating systems do not have to be monopolized by healthcare systems.
 Security and privacy: Cloud providers must meet several privacy requirements, including the Health Insurance Law and Issue.
 Exchange of health information: Healthcare organizations can exchange information through cloud computing.
 Telemedicine: As technology disperses and technologically advanced devices spread, telemedicine encompasses teleoperations, electronic health records, video conferences, and the provision of health care at home.
 Speed: Patients and healthcare providers can access confidential information quickly via cloud services.
As the number of cloud providers grows and the load on the cloud servers also increases, the scheduling problem in this environment becomes a key issue. Scheduling tasks on VMs may result in some VMs needing more utilization while others are underutilized. An efficient scheduler is needed to organize the scheduling process and balance the server loads. Load balancing has been an efficient way to distribute a system's load among the involved VMs. CPU, memory, and network loads are all possible types of loads. Cloud computing environments rely on the following metrics for load balancing.
 Resource utilization refers to the mechanism's effectiveness in employing resources for the given tasks.
 Throughput: It indicates the number of customer requests handled per unit of time.
 Makespan: It represents the time when the last submitted task was completed.
 Performance: It measures system efficiency after executing a load-balancing algorithm.
 Response time refers to the combined arrival and waiting time in a task queue.
(IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 14, No. 3, 2023 827 | P a g e www.ijacsa.thesai.org IV. PROPOSED MECHANISM Ant Colony Optimization (ACO) is a meta-heuristic used to solve complex combinatorial optimization problems. The basic ACO algorithm relies on laying pheromone trails inspired by how biological ants communicate using pheromones. Artificial ants communicate with each other via artificial pheromones within a colony, similar to the biological example. Pheromone bands induce indirect communication between simple agents called artificial ants. Pheromone traces act as digital and distributed information in ACO that ants use to create solutions to problems to be solved and to adapt to them as a reflection of their search experience during the execution of the algorithm, which is why ACO differs from other construction heuristics in many ways [32,33]. The ACO key steps are described in the following.

A. Initialization
All pheromone variables and parameters are set in this step.

B. Constructing and Solutions
The ants use the pheromone values and other information to solve the problem. Depending on the particular construction mechanism, a partial solution may not be extended and still be feasible, or a complete solution may be constructed that is impossible. If an infeasible solution violates constraint requirements to a greater or lesser extent, it may be penalized. Each step of the construction process involves selecting a solution component based on probabilities. Probability distributions are defined in various ways. The most commonly used rule is described by Eq. 1. (1)

C. Local Search
Using local search algorithms, completed candidate solutions can be further improved. ACO algorithms perform best when coupled with local search algorithms to solve combinatorial optimization problems. The local search operation can be viewed as a daemon activity that performs centralized or problem-specific functions that cannot be handled by an ant individually.

D. Global Pheromone Update
As pheromones are updated, subsequent iterations will be more attracted to good solutions. This goal can be achieved through two mechanisms. Firstly, pheromone deposits boost the pheromone level in selected solution components. It led to making these solution items more appealing to ants in subsequent iterations. Another mechanism is pheromone trail evaporation, which causes the pheromones left behind by previous ants to diminish over time. Practically, pheromone evaporation is necessary to prevent too rapid convergence of the algorithm towards a suboptimal region. It facilitates exploring new search spaces by implementing an effective form of forgetting. Pheromone updates are implemented by Eq. 2.
As illustrated in Fig. 1, two stages are involved in the proposed mechanism: developing an IoT-based healthcare system and solving the cloud load balancing problem using the ACO algorithm. The idea behind it in healthcare is moving from a conventional way of monitoring to a modern way called real-time remote monitoring. To build the health care system, wearable devices (medical sensors) connect to patients' bodies. These devices transfer data throughout the day through a wireless network attached to the patient's body. Servers in a cloud centre have characteristics, and virtual machines with similar characteristics surround them. A key challenge in cloud computing is load balancing, and a new algorithm is proposed to resolve it. In this design, rapid response reduces costs and improves patient care. This mechanism includes the following components:  Doctors: They monitor patients, perform diagnoses and treatments, and prescribe medications for patients.
 VMs: Cloud resources are provisioned to customers through VMs.
 ACO algorithm: It chooses optimal VMs based on their fitness values for load distribution.
 Cloud broker: In a nutshell, it is an intermediary between the ACO algorithm and the VM manager that assigns the VMs to different loads.
 VM manager: The tool extracts tasks from the queue and provides relevant data regarding the machines regarding their activities, efficiency, number of hosts, number of virtual machines, and task counts and lengths.
 Task queue: It is utilized to keep track of the number of tasks that need to be completed by the manager.
 IoT gateway: This device bridges the sensor and the task queue. Gateways transfer data from on-premises to the cloud and vice versa.
 Patients: There are several diseases afflicting a group of patients. Data such as heart rate and temperature are sent to an IoT gateway by sensors attached to patients' bodies.
The gateway receives tasks from sensor devices and sends them to the task queue. The VM manager collects queued tasks and forwards them to the cloud broker once sufficient VMs are available. As a load balancer, the cloud broker allocates tasks to virtual machines based on their fitness values using the ACO algorithm. Each VM is given a fitness value based on the three following criteria:

E. Execution Time
It refers to the amount of time a VM takes to complete the execution of a given task, calculated by Eq. 3, in which U denotes the CPU utilization and V stands for the VM load. The VM load is calculated using Eq. 4, in which M refers to MIPS for the VM, L indicates the task length, and N reflects the number of tasks.

F. Storage Utilization
It is the proportion of occupied storage space versus total storage space, calculated by Eq. 5, in which T, A, and R stand for the total memory of VM, available memory, and the amount of memory remaining before implementing a task in the VM, respectively.

G. CPU Utilization
It refers to the amount of work that a CPU handle using its processing resources, calculated by Eq. 6, where U indicates the CPU usage of a task.
( ⁄ ) (6) The past state of VMs and the task's duration are considered during load distribution. The search space's starting point is the matrix's centre, where each position represents a VM. In each iteration, an ant calculates the fitness value of its present position and neighbors and moves on to the next hope with the highest fitness value. (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 14, No. 3, 2023 829 | P a g e www.ijacsa.thesai.org V. EXPERIMENTAL RESULTS The proposed system was evaluated experimentally and estimated using the CloudSim simulator. Parameters and assumptions are summarized in Table I. VMs differ in their ability (fitness) to execute tasks (Table II). Different VMs and tasks were used to compare the proposed mechanism with other approaches. Fitness (capability) varies from VM to VM. In this situation, load balancing is necessary to achieve the preferred performance. Thus, the ACO algorithm divides workload among virtual machines according to their capability (fitness) and task length, in which longer tasks are assigned to VMs with a high fitness level. VMs selected by the ACO are shown in Fig. 2, along with the shape of their movements, with red representing the ants' starting points and green representing the VMs selected. Table III and Fig. 3 illustrate the VMs selected and the fineness.
For each iteration, the time elapsed can be seen in Table IV. Increasing the number of iterations leads to an increase in time, as shown in Fig. 4. The ACO chooses optimal VMs for the given task based on the VM's status and length in the cloud environment. The ACO reduces makespan time as well as balances the whole system load. Table V compares the makespan time of our mechanism with those of other heuristic algorithms. When the number of tasks increases, the suggested mechanism performs faster than others; this proves that it is more effective than its competitors. As shown in Fig. 5, the proposed algorithm has a shorter makespan time. Eq. 7 calculates the processing time of an algorithm to perform a given task, in which Np represents the number of processors within the current virtual machine. A comparison of the total processing time of the proposed mechanism and recent ones are presented in Table VI. According to Fig. 6, our mechanism outperforms others regarding processing time.
The implementation of a healthcare system to enhance the interactivity between patients and physicians has been enhanced with the integration of IoT with wearable devices. Specifically, the ACO algorithm has been applied to load balance in cloud computing, which assigns tasks based on their length and fitness values to the appropriate VMs. By assigning tasks to the most efficient VMs, the ACO algorithm can ensure that the tasks are completed in a timely manner, while also reducing latency and improving the overall user experience. Furthermore, the use of wearables enables the collection of data that can be used to track and monitor patient progress over time, allowing for more accurate diagnosis and treatment. A primary aim of load balancing is to eliminate the overloaded tasks from VMs and allocate them to underloaded VMs, improve the runtime of loads (tasks), decrease the overall makespan time, maximize resource utilization, and balance the load in each VM.
This study demonstrated that the ACO algorithm is more effective than other meta-heuristic algorithms in providing strong optimal results. In most cases, it provides better solutions, is faster in convergence, and is more computationally efficient than other approaches. When compared to prior work, this work is effective in reducing the makespan time and the processing time. In all cases, resource utilization increases when the number of tasks increases. Furthermore, the degree of imbalance is measured in order to assess the effectiveness of the proposed method. The measurements indicate that the proposed method performs better for a large number of cloudlets, estimated at 177.767.

VI. CONCLUSION
A healthcare system has been implemented by connecting IoT with wearable devices and cloud computing to enhance patient-doctor interaction. Cloud computing load balancing is solved with the ACO algorithm, which assigns tasks to suitable virtual machines based on fitness values and lengths of tasks. Load balancing focuses on eliminating overloaded tasks from the VMs, reallocating them to underloaded VMs, increasing load time (tasks), reducing makespan times, and increasing resource utilization. In comparison to other metaheuristic algorithms, the ACO algorithm provides strong optimal results, provides better solutions, is faster in convergence than other methods, and is more computationally efficient than previous ones. The proposed method may be improved or enhanced in the future by improving the ACO algorithm in order to reduce the search time for candidate VMs and solve the local optimization problem. Moreover, the performance and efficiency of the system can be enhanced by integrating or utilizing other intelligent algorithms. Messages can be given priority based on their importance. Additionally, the proposed method could be extended to incorporate additional constraints such as cost, availability, or energy efficiency. Furthermore, the proposed method could be adapted to work with different types of clouds, such as public, private, and hybrid clouds, to offer even greater scalability and flexibility.