Introduction

Innovations in Edge and Fog Computing for Enhanced Medical Analysis have the potential to radically alter the healthcare system [1]. This area, however, has its own set of difficulties typical of new technologies. Privacy and security of personal information is a major issue. Information of a medical nature is especially delicate and must be guarded carefully [2]. While edge and fog computing’s real-time processing capabilities are attractive, their decentralized nature raises security risks [3]. It might be difficult to ensure smooth operation of the healthcare system when integrating new edge and fog devices and systems. It is a problem to ensure that these technologies and electronic health records (EHRs) can communicate and share data without any hitches [4]. Another issue is scalability, as the size of healthcare facilities can vary greatly. Edge and fog systems must be designed to be flexible enough to meet the needs of various healthcare practitioners [5]. Furthermore, in medical applications, where downtime can have fatal effects, reliability and availability of edge and fog computing systems are of the utmost importance [6]. High availability and fault tolerance in systems is a perennial challenge. Finally, healthcare workers need extensive training and instruction to make the most of these technologies in their work [7]. For edge and fog computing to reach their full potential in healthcare, the existing knowledge gap must be closed and appropriate training must be made available [8]. With the purpose of fully realize the potential of improved medical analysis enabled by edge and fog computing, the industry must continue to investigate and address these obstacles [9].

Edge and Fog Computing advancements have provided revolutionary possibilities for medical analysis [10]. There are a number of methods currently in use to unlock the potential of these technologies, each with their own set of difficulties [11]. One method that stands out is the use of wearables and other forms of remote monitoring and sensor technology to gather real-time patient data [12]. Continuous monitoring of vital signs and other medical indicators is made possible by these devices, which aids in the early detection of sickness and gives medical practitioners insight into when to intervene [13]. Fog computing, which brings some of the cloud’s processing power to the periphery, is another important strategy. By processing and storing data locally, latency can be reduced and quicker treatment and diagnosis decisions can be made [14]. This enables the edge of the network to execute complex algorithms for image processing, AI-driven diagnostics, and predictive modelling in the context of medical analysis. The healthcare industry is working to establish interoperability standards that would allow for the smooth transfer of data between different systems and devices [15]. The ability to combine data from various sources into a unified patient record is greatly aided by these standards [16]. Although progress has been made, there are still certain obstacles to overcome. In the medical industry, data security and privacy are of the utmost importance due to the delicate nature of patient information [17]. There may be legal and ethical ramifications for failing to adequately protect data at the edge and in transit. Since healthcare facilities range in size and have varying data processing requirements, scalability is another obstacle. Systems that can easily adjust to these varying needs must be carefully crafted. Constant uptime is a must for medical analysis; therefore, reliability and availability are major factors. Any disruption to the system could have serious consequences for patient care. It is critical to build in redundancy and fault tolerance into edge and fog computing systems. Significant educational and implementation problems arise from ensuring healthcare personnel are adept with using these technologies and integrating them into the existing healthcare infrastructure. Finally, the existing methods in advanced Edge and Fog Computing for improved medical analysis show much promise in radically altering the healthcare system [18]. To fully leverage their promise in bettering patient care and outcomes, however, it is necessary to overcome the accompanying difficulties, particularly those related to security, scalability, reliability, interoperability and integration. A few the difficulties with fog computing are the increased security and privacy concerns caused by the dispersed nature of the infrastructure. Important responsibilities in fog computing settings include channel protection, data integrity, protection against unwanted access, and privacy.

A. Contributions of this research:

  • Design and Development of edge and fog computing's to accelerating, optimizing and enhancing the quality of medical data analysis.

  • Improving the latency and privacy concerns inherent in current cloud-centric methodologies using AHE-FCD to propel medical analysis modelling.

  • Development, AHE-FCD, to address issues plaguing edge and fog computing deployments in healthcare.

  • Validating AHE-FCD through distributed data processing in real-time medical analysis is made easier for effective resource utilization, data confidentiality and privacy are guaranteed, and processing flexibility.

  • Focused on Real-time, low-latency data processing at the edge and fog computing layers is essential to optimize patient care, medical research, and overall healthcare process efficiency.

This paper’s remaining content is structured as follows: The state of the art and research gaps are highlighted in Section II’s literature analysis on Edge and Fog Computing for Improved Medical Analysis. The AHE-FCD is described in detail in Section III. Experiment results, discussions, and comparisons to previous methods are presented in Section IV. The conclusion is shown in Chapter 5.

Literature review

Fog computing-based healthcare data optimization

Fog and Edge Computing have emerged as revolutionary innovations in the ever-changing computing landscape, with enormous potential in many fields, including healthcare. Issues are tackled, optimization tactics are investigated, and new ground is broken in areas like privacy, healthcare, and security according to these methods.

Abdali, T. A. N et al., suggested an approach which incorporates a number of critical phases that together address the current issues in Fog Computing (FC) [19] and maximize its performance. To begin, FC technology is thoroughly examined so that its design, capabilities, and potential uses can be grasped. The results of this examination will serve as a starting point for future inquiries. A systematic literature review on the security issues within the Fog Computing System (F-CS) [20] was proposed by Yakubu, J. et al. This survey provided a comprehensive overview of the existing designs that aim to improve security in fog settings. To further distinguish this research from other reviews, taxonomy is developed to classify the many security approaches used, such as machine learning, cryptography methods, and computational intelligence. This study aims to accomplish two goals. Another survey by Mutlag, A. A et al., [21] carefully examines academic papers from 2007 to 2017 in terms of their architecture, applications, and performance evaluation. There are three main types of literature included in this overview: frameworks and models; systems (implemented or architectural); and reviews and surveys.

In [22], the authors examined the approach used in fog and edge computing (F-EC) related to healthcare informatics in detail. They have classified a wide range of applications, provided a list of application-centric tasks well-suited for F-EC, and identified the network levels at which these computations can be executed. The research delves into the function of Edge and Fog computing in improving security algorithms, highlights privacy and reliability concerns in healthcare computation, and tackles the potential of higher network tiers to overcome limits of wireless devices. Hartmann et al. explore the use of Edge Computing Architectures (ECA) [23] in healthcare, focusing on various devices and addressing challenges related to latency and power consumption. Their research emphasizes the potential applications of edge computing in health data analysis, including vital signs monitoring and fall detection. The review underscores the benefits of employing edge computing in healthcare while acknowledging challenges in privacy and data reduction. The researchers propose future directions for edge computing in healthcare to enhance patient quality of life and advance the sophistication of the healthcare system.

Javad Dogani et.al [24], reported that the Fog and edge computing are relatively new additions to cloud networks; they bridge the gap between the cloud and Internet of Things (IoT) devices by placing networking, computation, data management, and storage on network nodes close to IoT devices. This research provides an all-inclusive taxonomy for articles, grouping them according to essential criteria including auto-scaling methods, experiments, workloads, and metrics, among others. We present an in-depth examination of the findings, shedding light on the remaining questions and pointing the way toward fruitful avenues for further study.

Abhishek Hazra et al. [25], proposed Fog computing as a distributed computing model that extends edge computing and storage to cope with the aforementioned problems. Using a collection of resource-constrained fog/edge devices, a distributed fog framework may enable latency-sensitive Internet of Things applications with reduced energy use and latency compared to a centralized cloud architecture. In addition, this research provided an Internet of Things (IoT) use case scenario to illustrate the offloading of fog data and provisioning of resources in heterogeneous vehicular fog networks. Finally, we discuss some of the difficulties and possible solutions for making fog networks suitable for future Internet of Things applications that need standardized methods of communication and computing.

Makanyadevi, K et al. (2019) determined a healthcare application is considered, and a new fog-based cloud storage system, Intelligent Fog based Cloud Strategy using Edge Devices (IFCSED), is designed, in that Fog Computing process provides an efficient health data storage structure to the cloud server in effect to maintain high priority records with regard for regular and non-prioritized records [26]. The backups provide data safety and integrity on the storage media, and the suggested IFCSED technique avoids processing delays with estimating time complexity. Regarding the advantages of cloud storage and efficiency increases, all raise concerns about efficacy and privacy. To prevent this problem, numerous academics devised a variety of solutions, including different cloud server locations and local cloud farm fixation.

AI Technologies-based healthcare data optimization

Mohammed S Atoum et.al, [27] reported human illness remains a significant obstacle on the path to more definitive research. Here the health care data is processed based on the use of data fusion techniques and adaptive machine learning (ML) approaches on various medical management datasets. Healthcare data problems are correctly identified and suggested by a healthcare monitoring suggestion system. The proposed method outperformed the other five classifiers on the fused dataset, especially when using stacking as an ensemble classifier for the five different ML methods. Using concepts from Fog computing, this research may rapidly and remotely diagnose cardiac patients with low latency and little energy use.

Maryam Songhorabadi et al. [28] proposed newer computing paradigms which are essential for modern smart city development because of the importance of location-aware, latency-sensitive, and security-critical applications like fire alarms, patient health monitoring, and real-time production. Due to its proximity to the end-devices, cloud computing’s powerful companion, fog computing, plays a starring role in this scenario. This research provides a study for the state-of-the-art fog-based techniques in smart cities to overcome the limits of cloud and associated computing paradigms like edge computing. First and foremost, by considering a wide range of viewpoints, a framework is presented that classifies emerging trends and difficulties into actionable sub-categories, so providing a complete and unique set of open questions and obstacles.

Vasilios et.al [29] determined the best place for each job based on needs like processing power, storage space, and network bandwidth, and responding to the ever-changing structure of the network are the primary difficulties in task allocation. Centralized, decentralized, hybrid, and machine learning algorithms are just some of the methods out there for dividing up work. Thus, task allocation in edge computing is a difficult, multifaceted issue that requires a delicate balancing act between competing goals, such as those related to energy efficiency, data privacy, security, latency, and quality of service (QoS). The present state of the art in job allocation has been documented in a number of survey studies; this study, however, compares and contrasts various task allocation approaches, optimization algorithms, and the most common network topologies utilized in edge computing systems.

Symvoulidis, C., et al. (2023) detailed the causal-aware Deep Learning network (DLN), people divide users into several mobility classes: static, local, and mobile [30]. The main problem is determining the appropriate data location for data-intensive applications and, in general, applications needing high amounts of data transfer. Edge computing has emerged as a popular solution for mobile applications and data management due to its ability to significantly reduce data transmission costs and analyse data with fewer computing resources, as the analysis occurs lower data volumes and without the need to relocate data to centralized infrastructures. The information can be utilized to improve data placement using data placement and retrieval algorithms tailored to each mobility class.

Farshad Firouzi et al. (2021) discussed the complex interaction between edge, fog, and cloud IoT in healthcare applications, this paper lays forth a comprehensive strategy and reference architecture [31]. To further divide the load across edge, fog, and cloud, a Reinforcement Learning (RL) based offloading approach is also described. Resolving the primary issues with Cloud-based IoT solutions, acting on real-time data necessitates a shift towards edge/fog technologies to fulfil the stringent computing time requirement. Healthcare services are actually more accessible, personalized, precise, and affordable because to the widespread use of wearables and the Internet of Things.

Tran Anh Khoa et al. illustrated the healthcare industry has had success in training a Federated Learning (FL) model on vast volumes of user personal data [32]. Immediate access to patients’ medical records has grown possible with the help of smart devices made possible with the fast growth of cloud-edge networks. To begin, the high communication cost in the cloud-edge network is a direct outcome of the complicated computational parameters used in FL models. Further customization is taken into account, the models still fail to provide realistic ways to adjust parameters for more precise health monitoring performance prediction.

Sarah Shafqat et al. examined the case of healthcare, the current system is being moved to the cloud with the integration of the Internet of Things (IoT), that includes all smart devices, Wearable Body Sensors and Mobile networks (WBSMN) [33]. The healthcare community cloud can be the first step toward providing context-aware services to patients at home or at the site of a medical emergency. The context-aware platform based on the cloud and IoT-integrated infrastructure can save money and time in getting to the hospital while likewise assuring the availability of skilled professionals. In the employment, research can simulate a healthcare community cloud that is aware of the patients’ visible medical state.

Farzana Shafqat et al. (2021) introduced the opportunity has arisen to integrate big data analytics for achieving ambience in the cloud for all sectors, including the healthcare community, in effects to find trends and patterns by mapping the Electronic Health Records (EHRs) into a universal data model to provide improved individualized care available in real time, saving lives at a lower cost via shared resources over the cloud [34]. Patients who get smart e-health ambient services at home can be moved to cloud and IoT infrastructure to improve communication with physicians. The medical industry is becoming inundated by heterogeneous big data of varying pace and format.

Sarah Shafqat et al. prepared the cloud analytical models are presented and verified on unified corpora, and second, utilizing Deep Multi-label Distribution Learning (DMDL), the maximum probable illnesses unique to a single or many patients are identified with accuracy [35]. Heterogeneous and massive health data health that moves into the cloud necessitates structural considerations for interoperability and generalizability for broad usage and analysis. Healthcare automation is fast growing, reflected with the current popularity of e-health or digital health systems.

Sarah Shafqat et al. discussed the quest for medical context learning solutions revealed that unified corpora labelled with medical terminology were lacking to train the analytics for diagnosis and their comorbidities [36]. As a result, learning contextual Named Entity Recognition (NER) embedding for semantic intelligence is considerably aided by a unified medical knowledge base. The search for potential solutions for medical scenario learning revealed that there were neither unified corpora labelled with medical phrases to train the analytics for diagnostics.

Sarah Shafqat et al. illustrated the cloud which computes the social network of mobile devices based on interests and location, allowing them to exchange and download data directly over Radio Access Networks (RAN) [37, 38]. They developed an innovative cellular communication architecture that combines the energy-conscious cloud computing with socially aware device-to-device communication. The suggested architecture promises to be energy efficient in terms of energy application.

Lakhan et al., [39] created a metaheuristic paradigm called lightweight secure efficient offloading scheduling (LSEOS). The offloading and scheduling techniques that make up LSEOS are lightweight, secure, and have a shorter execution offloading latency than other techniques. LSEOS aims to reduce system latency and security risk by executing workflow applications on other nodes. The following elements make up the metaheuristic LSEOS: sorting, scheduling with neighborhood search algorithms, and adaptive deadlines.

In a fog computing environment, Shukla et al., [40] proposed a hybrid fuzzy-based reinforcement learning method and an analytical model. Reducing excessive latency between cloud servers, end users, and healthcare IoTs is the objective. For data packet allocation and selection in an Internet of Things–Fibre Channel (IoT–FC) context, the suggested intelligent FC analytical model and algorithm integrate a fuzzy inference system with reinforcement learning and neural network evolution methodologies.

Although each method is distinct and well-suited to a particular field, when taken together they demonstrate the extraordinary promise of Fog and Edge Computing. Enhanced performance, security, privacy, healthcare quality, and a better quality of life for users are all possible attributable to the Fog and Edge Computing presented methodologies in AHE-FCD. The persuasiveness of these methods attests to the growing importance of Fog and Edge Computing in the industry.

A main obstacle in edge computing is establishing and maintaining dependable network connection at the edge. Problems arise due to things like spotty service, slow connections, insufficient bandwidth, and the need of a solid network infrastructure. The drawbacks of big data on health care services include security and privacy concerns. However, the security and privacy threats related with massive data in healthcare include data breaches in portable physical area networks, unlawful transfer of patients’ sensitive information, and hacked nodes.

Adaptive heuristic edge assisted fog computing design

Focusing on advances in Edge and Fog Computing, an age of healthcare characterized by the convergence of modern technology and medical research has arrived. The basis of this innovation is the Adaptive Health Edge and Fog Computing design, a novel strategy that has a chance to completely change the healthcare sector. As a way to improve accurate diagnoses as well as therapy efficacy, health care professionals are able to profit from real-time processing and analysis of data by combining edge and fog computing technologies. Employing distributed computer power, this technology enhances the transfer of information and safety while decreasing delays in life-or-death procedures in medicine.

The features of Health-IoT systems can be systematized in such a dispersed manner across the three layers as shown in Fig. 1, demonstrating their potential utility in smart hospitals. Among these groups, implanted sensors record relevant information about the patient’s health, allowing for personalized, in-home tracking of many factors. Date, location, time, temperature, etc., can all be used to improve the quality of this health information. Awareness of context enables the recognition of a usual pattern and the development of more precise judgments about the circumstances. Medical imaging technologies such as computed tomography (CT) and magnetic resonance imaging (MRI) can be linked to other machines to share data.

Fig. 1
figure 1

Intelligent e-health surveillance system

Among the various defined fogs, computing has the additional benefit of local data management, which is implemented to provide intelligence by which streaming data is analysed locally at the gateway. Fog layer, in accordance with the machine’s architecture, necessitates the continuous processing of a vast amount of sensory data within a condensed timeframe and the ability to appropriately respond to various environmental conditions. The utilization of a local processing device for data filtering, compression of data, data integration, and data analysis within the framework of an intelligent gateway is illustrated in Fig. 2. Data fusion has three parts. They are cooperative, complementary, and competitive. Two sensors provide the body-neighboring temperature difference at every time.

Fig. 2
figure 2

System architecture for intelligent e-health gateways

Competitive data integration is used to improve precision and stability in sensor failures by combining data from different sources. Collective data fusion benefits the edge by allowing intelligent gateways to gather new data from multiple sources. Implementing localized data examination at the edge helps improve machine reactivity. It could help the machine delete and predict alarming circumstances. To detect the collapse of an elderly individual, the layer of fog could regionally send data to a cloud and wait for responses. Fog computing allows all machine functions to be nearby. Giving out discoveries in a localised repository in the layer of fog and rescuing sensory data after harmonizing it with the Cloud and linking it afterwards when it is running again are possible.

Numerous application domains implement the Internet of Things (IoT) paradigm, including remote healthcare, smart devices, smart residences, and smart environment management. Few of the application domains has been discussed as follows:

  • These architectures rely heavily on networks of wireless intelligent sensors and actuators to collect and transmit a variety of data to the data processing and decision-making systems. The proliferation of IoT devices presents an array of novel security concerns [41].

  • As the dimensions of IoT devices continue to decrease, the challenges associated with “constrained devices” emerge. By employing fog computing architecture, logistical demands and the associated costs of medical care and hospitals can be diminished [8].

  • By implementing fog architecture, certain limitations of WSNs could be mitigated and data routing and aggregation issues [42] could be resolved. Fog computing possesses numerous benefits and is well-suited for real-time critical applications that demand prompt responses and exhibit minimal latency, specifically in the domain of healthcare based on encryption and decryption standard [43].

There have been numerous investigations on this topic from various technological vantage points based on health care data. In scenarios where lossy network infrastructure is prevalent and block-wise protocol transmission is the norm, the Self-Authenticating, Secure Data transmission Protocol excels. A lightweight secure communications protocol that offers authentication and secrecy to user data is Self-Authenticating and supports secure data Transfer. Securing a network in the periphery, and more specifically, where the end user generates and stores data inside a wider network, is referred to as edge security. That is essential for that kind of perimeter security in edge computing settings. Since edge computing requires use of a distributed system, that in turn includes a greater number of devices, it is imperative that these devices be adequately protected from dangers. The whole network might be at risk if even a single Internet of Things device was susceptible. Decentralized and rarely longer housed in traditional datacentres, edge security is a subset of corporate security architecture. Unlike cloud-based or centrally centralized systems, that operates at the “edge” of a company’s network.

Figure 3 shows the devices constitute Wireless Body Area Networks (WBANs) and Wireless Medical Sensor Networks (MSNs) in healthcare applications. Edge devices are limited in memory, processing power, and energy resources, the frequently utilize constrained wireless connections (lossy, with limited the bandwidth, etc.). Numerous contemporary security solutions are constructed with the primary objective of safeguarding networks for big businesses, data centres, and select consumer products while operating on the traditional Internet [3, 33].

Fig. 3
figure 3

A Self-Authenticating, Secure Data Transfer Protocol for the Edge Cloud

Task scheduling in edge-fog computing platform

Let us assume x and y be the coordinates of the axis in healthcare datasets.

$$SO\left(x,y\right)= Gr \left(x,y\right)- TGR (x,y)$$
(1)

From the above Eq. (1), the difference between health care data Gr (\(x,y\)) has been calculated, which is processed in cloud platform and TGR (\(x,y\)) is transcript signal and signal output \(SO(x,y)\). Security is highly maintained in the cloud platform for reliability.

$$P\left(x,y\right)=\text{RS}* log (\left(x,y\right)+PCA-SO(x,y) )$$
(2)

Equation (2) denotes the \(P\left(x,y\right)\) which is the security factor of the healthcare data, \(\text{RS}\) be the restoration factor, x and y be the coordinates of the axis in healthcare datasets on cloud storage.

$$P\left(x,y\right)=\text{ RC}* log (\left(x,y\right)+PCA-Gr (x,y)+ TGR (x,y)$$
(3)

By substituting Eq. (3) in Eq. (4), the Eq. (5) is arrived which is the security factor of the system in the healthcare datasets

$${{\text{DE}}_{ }}_{t}-{{EPV}_{ }}_{t}+{\text{EG}}_{ }+{{\text{WE}}_{ }}_{t}=0$$
(4)
$$\text{EG}>0, \text{DE}>0$$
(5)

In Eq. (5), DE represents the energy requirement for processing the data. Let \(\text{EG}\) represent signal processing parameter which is processed in the cloud storage and WE represent energy wasted at time t in data processing in Cloud environment.

$${\text{EE}}_{\text{j},\text{t }}* \frac{\sum_{j=1}^{M}{(\text{ EC}}_{\text{j},\text{t }}- {\text{P}}_{\text{j},\text{t }})}{{\text{P}}_{\text{E }}-{\text{L}}_{\text{E }}}=0$$
(6)

The balanced circulation of energy stores in the database is represented by Eq. (6) above. Here, \({\text{EE}}_{\text{j},\text{t}}\) represents the energy being charged and transferred during health care data processing, while EC (j, t) stands in for the energy being charged at time t. The quantity P (j, t) represents the power held by j at instant t. The energies produced and lost at the core are denoted by \({\text{P}}_{\text{E}}\) and \({L}_{\text{E}}\) respectively. Efficiency is achieved greatly in the above Equation and shown in the algorithm.1.

figure a

Algorithm 1. Effective data processing on Cloud platform

The eHealth architecture based on fog computing can be conceptualized as a three-layer organizational framework involving Cloud-Fog-Edge machines as shown in Fig. 3. The initial stratum of Fog architecture comprises Edge nodes, which comprise a diverse array of IoT-enabled intelligent gadgets (sensors and actuators) employed for data acquisition and environmental control. The initial stratum of the Fog infrastructure is represented by a variety of authors using the terms “End nodes,” “Edge nodes,” “End devices,” “User nodes,” “User devices,” or “Devices.” [44].

Figure 4 shows that there are multiple options for vitals monitoring, including the use of smartphones, wearable sensors, or both. Comparable to real-time health monitoring, emergency monitoring systems will alert medical staff if a patient’s vitals fall below a certain level. Now that living in a world of sophisticated mobile devices, patients have access to diagnostic tools at their fingertips. Many websites offer information about health care, and today patients may access additional resources, including personalized applications for their mobile devices, to learn more about how to take care of themselves, especially while dealing with chronic illnesses. Users provide a higher level of convenience and are commonly utilized in applications requiring detecting falls or, in situations of dementia, for tracking the movements of the elderly. Some specialized ambient sensors can function both indoors and outdoors, while others function indoors. Various classification schemes have been used to organize healthcare software. It has been categorized according to the type of device, the type of data, or the intended purpose. Real-time health surveillance, Emergency management platforms, health-aware mobile devices, and medical information distribution are the key health care classes based on use cases. Multiple systems have been used in conjunction to better track a patient’s health in real time.

Fig. 4
figure 4

Standardized healthcare fog/edge architecture

Figure 5 shows a modern, integrated healthcare system. Telemedicine revolutionizes healthcare by allowing patients to consult doctors remotely. The increasing services and reducing geographical limitations are used to promote healthcare accessibility. The advent of in-home medical consultations and guidance heralds a new age in patient-centred care that is both accessible and convenient. Smart hospitals serve as the centre of the system for medical care and data management. Implementing electronic health record systems and internet of things monitoring devices is a standard practice in these modern hospitals. Health outcomes and medical practices are both improved with various innovations, which simplify the gathering, processing, and exchange of patient data. Through the automation of multiple data management processes, including document processing, health record completion, medical imaging, genomics, and wearable device data, this AHE-FCD architecture significantly contributes to addressing specific healthcare challenges. This suggested approach explores for detecting developments and patterns in medical data to help healthcare providers make better clinical decisions, improve workflows, and increase documentation accuracy.

Fig. 5
figure 5

Current Healthcare Systems’ Data Analytics and Cutting-Edge Technology

Data analytics is another vital healthcare component. Medical data is massive and requires rigorous analysis, processing, and interpretation. Data analytics turns unprocessed information into actionable insights. It aids medical decision-making, improves resource allocation, and discovers patterns and trends that can improve the treatment of patients and healthcare delivery. Healthcare professionals can optimize results and decrease trial-and-error techniques by evaluating patient records, genetic information, and real-time health data to make data-driven choices that match therapies exactly to individual patient requirements. With the use of edge computing sensors in wearable devices, patients can have their whereabouts monitored continuously in the comfort of their own homes. That can enable medical professionals to quickly respond to any changes in their patients’ situations and adjusting their medicines accordingly.

The intensive workloads are redirected to the suitable assets by the edge \(CEC\), which controls and monitors each \(EC\). Information about offloaded tasks is initially sent to the centralized edge controller \((CEC)\) from the \(ECs\) that are embedded in the \(BSs\). The controller then selects the optimal offload scheduling approach. To minimize delays, expenses, and traffic, the proposed system concept merges a centralized cloud data centre \((CDC-RAN)\) and a mobile edge computing \((MEC)\) network. The \(MEC\) is assumed to be a part of the conventional \(BS\). The \(BS\) will be separated into \(EC\) and \(C-RAN\) resources. The functionality of \(EC\) provides the resources to do the offloaded work. When the local \(CEs (Q1)\) lack the capacity to handle the offloaded task, the \(CEC (Q5)\) uses the \(CDC-RAN (Q4),\) the most suitable neighbouring \(EC\), to keep an eye on the environment and handle the offloading. Transmission times for uploading and downloading are calculated as

$${u}_{Q3}^{V}=\frac{{\beta }_{V}}{{M}_{t}^{V}}\left({u}_{Q2}^{V}+{V}_{Q3}+{V}_{Q4}+{V}_{Q5}\right),$$
(7)
$${u}_{Q3}^{V}=\frac{{\beta }_{E}}{{M}_{t}^{E}}\left({u}_{Q2}^{E}+{E}_{Q3}+{E}_{Q4}+{E}_{Q5}\right)$$

In the Eq. (7), \({\beta }_{V}\) and \({\beta }_{E}\) are the relative transmission weights of the uplink and downlink from \(Q2\) to \(Q3\), respectively. For the third, fourth, and fifth points (\(Q3\), \(Q4\), and \(Q5\)), the corresponding upload link bits are \({V}_{Q3}{,V}_{Q4}and {V}_{Q5}\) and Each point (\(Q3\), \(Q4\), and \(Q5\)), corresponds to a different set of bits \({E}_{Q3}, {E}_{Q4} and {E}_{Q5}\) that make up a download connection. The point values (\(Q3\), \(Q4\), and \(Q5\)), for the nth subtask’s download link bits.

Power transmitted between \({u}_{Q3}^{V} and {u}_{Q3}^{E}\) can be calculated using

$${f}_{Q3}^{on}={Q}_{V}\frac{{u}_{Q3}^{V}}{{D}_{Q3}}+{Q}_{E}\frac{{u}_{Q3}^{E}}{{D}_{Q3}}$$
(8)

As inferred from the above Eq. (8), researchers are able to estimate how long it will take for the \(ECs\) to complete the offloaded portion of the computation by using the formula.

$${M}_{n}=\sum_{o\in O}{y}_{on}\left({A}_{on}\left({u}_{Q2}^{V}+{u}_{Q2}^{E}\right)+{A}_{on}\left({u}_{Q3}^{V}+{u}_{Q3}^{E}\right)\right)$$
(9)

where the n \(>\) 0 (9).

The \({M}_{n}\) represents the time it takes for data to travel to and from the offloaded \(ECs.\)

In the above Eq. (9) IoM Enhanced by the \(MEC\) performance metric for comparing the efficacy of \(MEC\) networks in terms of latency, consumption of energy, and cost will be described based on \(DPSO\). Researchers introduce the \(DPSO\)-based design of an offloading module for the \(MEC\) system. Initially, researchers implemented user-side array signal processing using

$${T}_{n}^{V}=C {log}_{2}\left(1+{\rho }^{V}\sum_{l=1}^{L}{\left|i\right|}^{2}\right)$$
(10)

From the above Eq. (10), where \(C\) is the available user-to-\(CE\) bandwidth and \(i\) is the user-to-\(CE\) base station channel parameter. After the user has processed the signals, the best possible transmission can take place among the users and the \(CEs\). The \(DPSO\) technique is used in this research to achieve an effective offloading method.

As many parameters are involved in an optimization problem as there are in the function being optimized. Nodes in the system remember their best positions over time and make decisions about their next action based on this data. With each iteration, the set of nodes is advanced to the subsequent n-dimensional space in an effort to pinpoint the global optimal point. The nodes revise their velocities and placements based on the optimal global and local solutions. To do this, the \(ECC\) nodes examine the availability tables generated by the \(EC\) nodes and make public the most useful ones. Because of this, researchers revise the velocity using the following formula

$${W}_{O}^{N}=\omega {w}_{O}^{N}\left(u-1\right)+{d}_{1}{s}_{1}\left(q {Best}_{O}^{N}-{y}_{O}^{N}\left(u-1\right)\right)+{d}_{2}{s}_{2}\left(h {Best}_{O}^{N}-{y}_{O}^{N}\left(u-1\right)\right)$$
(11)

In the above Eq. (11), where \(\omega \in \left[0.9 to 0.4\right]\) is an inertia weight between zero and five, the Nth particle’s position is found \(q {Best}_{O}^{N}\), the warm finds the best possible global position \(h {Best}_{O}^{N}\), random numbers \({s}_{1}\) and \({s}_{2}\) have a uniform distribution between one and two, and the acceleration coefficients \({d}_{1}\) and \({d}_{2}\) all have the same value \((1.4944).\)

The AHE-FCD is an outstanding instance of the way recent developments in edge and fog computing are altering the healthcare industry. In an effort to improve clinical analysis, this new method combines the advantages of immediate data processing with dispersed computer resources. It has a chance to revolutionize healthcare for patients by reducing down on patient wait times, increasing diagnostic accuracy, and building treatment efficacy. This exciting new area for medical computing improves communication of information and safety, ushering in an excellent period of health care advancement.

Results and discussion

Several crucial analyses are essential for the successful adoption and realization of Edge and Fog Computing for Enhanced Medical Analysis’s disruptive potential in the healthcare business. The proposed method investigates vital factors like latency, data security and privacy, scalability, interoperability, and resource optimization. The results of these studies are crucial to ensuring that Edge and Fog Computing can assist the revolution of healthcare by providing real-time, accurate analysis of medical data shown in the dataset [45].

Latency analysis

The sensors Tier collect data from the people who use them. These detectors are able to collect both external and internal data. Conditions such as weather, topography, and proximity are examples of environmental factors. Wearable sensors can measure a variety of intrinsic properties, such as a patient’s blood pressure, glucose levels, heart rate, and so on. Data entered by the patient on his or her mobile device will be made accessible for analysis. The sensors’ responsibility is to gather this information and relay it to the cloud computing layer.

Data processing and aggregation are carried out at the Fog Computing Tier layer. This layer performs analysis on the collected data and information gathered by the edge devices. This layer plays the role of the host. This layer receives a flood of data in real time from a wide variety of sensors. Massive volumes of data are processed by having the fog layer delegate processing tasks to the numerous edge devices that have connections to the fog layer. An effective task-scheduling algorithm must be used to divide up the processing effort.

Using this formula, researchers may determine the order of computing tasks.

$$pri \left({W}_{j}\right)=\{\frac{\stackrel{-}{x\left({W}_{j}\right)}}{x\left({W}_{j}\right)}+{max}_{{W}_{k}\in succ\left({W}_{j}\right)} \left[d\left({f}_{jk}\right)+pri\left({w}_{k}\right)\right],if {W}_{j}\ne {W}_{exit}, if {W}_{j }={W}_{exit},$$
(12)

After determining their relative importance as mentioned in the above Eq. (12), tasks are distributed to nodes for processing. It is now necessary to determine which nodes should carry out a certain operation. This requires thinking about how long it takes the computer’s processor at each node, as well as how fast it can work. Those calculations will be based on the earliest possible beginning and ending times.

Data will be moved between levels as part of the implementation of cloud computing in health informatics. Data requirements and processing times will vary depending on the specifics of each scenario. Thus, the latency is not uniform. Researchers will use as the time it takes for data to travel to the cloud for analysis and as the time it takes for the results to reach the IoT devices. Therefore, in the aforementioned formulas, represents the time it takes for data to travel from the Internet of Things (IoT) sensors to the fog layer, represents the time it takes for data to travel back to the IoT devices from the fog layer, represents the time it takes for assessment at the edge devices, and represents the time it takes for evaluation in the cloud.

$${M}_{g}={u}_{t}+{u}_{s}+{f}_{g},$$
(13)
$${M}_{f}={u}_{t}+{u}_{s}+{f}_{f}$$
(14)

Therefore, in the aforementioned formulas in the above Eq. (13 & 14),\({u}_{t}\) represents the time it takes for data to travel from the Internet of Things (IoT) sensors to the fog layer, \({u}_{s}\) represents the time it takes for data to travel back to the IoT devices from the fog layer, \({f}_{g}\) represents the time it takes for assessment at the edge devices, and \({f}_{f}\) represents the time it takes for evaluation in the cloud.

Researchers will evaluate the latency times using these two Equations. The instantaneous processing abilities of the internet are crucial to the success of most fog computing applications.

In the above Fig. 6 the analysis of latency and real-time processing is of utmost importance in the field of AHE-FCD for Enhanced Medical Analysis. By locating computational resources closer to the data source, these technologies will enable speedy and accurate medical data analysis and have the potential to completely transform the healthcare industry. Crucial to this shift is the concept of low latency, which describes the shortest possible time between receiving and acting on data. More specifically, it has the potential to save lives in the medical field. Processing medical data in real time allows for immediate collection, analysis, and response to potentially life-saving patient information. The upgrade of hardware is merely part of the solution when it comes to minimizing latency and optimizing real-time processing in AHE-FCD for medical analysis. Together, edge devices and fog nodes facilitate distributed data processing, which in turn enables instantaneous analysis and response. Edge and Fog Computing technologies are ideally suited to improve medical analysis since they reduce latency and prioritize real-time processing. It is hoped that these developments will lead to better patient care, streamlined medical research, and increased healthcare efficiency, all of which will help to expedite and enhance healthcare delivery through more accurate diagnosis and quicker interventions. Faster reaction times are characterized by low latency, while a lengthy wait is indicative of high latency. People that depend on sensor data for real-time operations are particularly vulnerable to the negative effects of network inefficiently, that is inversely proportional to the lag time.

Fig. 6
figure 6

Latency Analysis

Data privacy analysis and Data privacy risk assessment

In a multi-dimensional data privacy assessment paradigm, there is an Equation for determining Privacy Risk (PR):

$$QS=\sum {X}_{j}*\left({\sigma }_{{j}^{2/{\varepsilon }^{2}}}\right)*\sqrt{\left({o}_{j}\right)}$$
(15)

In the above Eq. (15), where, the importance placed on a given data dimension \({X}_{j}\), the dispersion along axis denoted by \({\sigma }_{{j}^{2}}\), the secrecy metric is denoted by \({\varepsilon }^{2}\), and Sample size along axis is denoted by \(\left({o}_{j}\right)\).

Complete formula for Privacy Risk Analysis (PRA) of changing datasets.

$$QSB=\sum \left({DS}_{j}*{ES}_{j}*{US}_{j}*{QS}_{j}*{\text{JS}}_{\text{j}}*{CS}_{j}\right)$$
(16)

In the above Eq. (16), where Confidentiality Risk for the i-th data domain is denoted by \({DS}_{j},\) data Durability in the ith domain is denoted by \({ES}_{j},\) the Threat Rating for the ith domain is denoted by the variable \({US}_{j},\) the Privacy Requirement for the i-th domain is denoted by \({QS}_{j},\) Information Durability in the i-th context is denoted by \({JS}_{j}\), and Business Resilience for the ith sector is denoted by \({CS}_{j}.\)

In the above Fig. 7 data security and privacy are critical issues in the context of Edge and Fog Computing for Enhanced Medical Analysis. These innovations have the potential to radically alter healthcare by facilitating real-time analysis of medical data at their point of origin. However, strict protections are required due to the delicate and secret nature of medical information. Patient records, diagnostic information, and other forms of medical data must be safeguarded to prevent identity theft and other data breaches in the healthcare industry. Contrarily, patients can rest assured that their private information and health records will be protected under privacy policies. While the development of AHE-FCD is promising, it is crucial that data security and privacy be given first priority, with these technologies harmonized to regulatory frameworks and encryption methods put in place to protect sensitive medical information. Maintaining patients’ confidence, safeguarding their health records, and unlocking these technologies’ full potential to enhance medical analysis and care require this method. Edge computing is a distributed computing platform that increases corporate applications closer to data sources like IoT devices or local edge servers. The closeness to data in their source can provide significant advantages, including quicker insights, improved reaction times, and increased bandwidth availability.

Fig. 7
figure 7

Data Security and Privacy Analysis

High-reliability and interoperability analysis

High reliability involves maintaining constant excellence in quality and safety across all services over lengthy periods of time. The high degree of performance, requiring the eradication of severe quality failures, can rather exist in health care currently. The systems with multiple parts and redundancy can be described by the following Reliability Allocation Eq. (17).

$${S}_{sys}=1-\cap \left(1-{S}_{j}\right)+\sum \left[\left({S}_{j}*{S}_{k}\right)\right]$$
(17)

From the above Eq. (17), the overall dependability of a complex system is denoted by \(S_{sys}\), whereas the dependability of its parts is denoted by \(S_J\;and\;S_k\) , etc.

The requirement for data dissemination and accessibility via standardized interfaces represents the most basic level of data interoperability.

In the above Fig. 8 optimizing the usefulness and efficacy of these technologies in healthcare environments requires careful consideration of scalability in the context of Edge and Fog Computing for Better Medical Analysis. With the rise of connected medical devices and the importance placed on real-time data analytics, scalability has become an essential consideration in the healthcare business. The ability of AHE-FCD to handle and analyse data from a wide variety of sources, like as wearables and diagnostic tools, efficiently is essential, as is the system’s scalability to adapt to the changing needs of healthcare providers. Agile and adaptable edge and fog computing solutions can be designed and implemented by healthcare organizations that do thorough scalability analysis. This ensures that these technologies may not adapt to the ever-changing healthcare industry, yet continue to be useful in terms of improving medical analysis, enhancing patient care, and boosting the overall efficiency of the healthcare system.

Fig. 8
figure 8

Scalability Analysis

In the above Fig. 9 implementing Edge and Fog Computing for Better Medical Analysis necessitates careful consideration of interoperability analysis. For these computing systems to be considered interoperable, they must be able to work in tandem with pre-existing elements of the healthcare system such as electronic health records (EHRs), medical devices, and other data sources. The difficulty comes from making sure that all parts of this heterogeneous data ecosystem are compatible and function smoothly. Standardized data exchange protocols and communication mechanisms are developed and implemented in interoperability analysis to facilitate the cooperation of various systems and devices metrics are 97.2%. By resolving issues with interoperability, the healthcare industry can improve the flow of data and guarantee that all doctors have access to the most recent and complete patient records. In addition, interoperability is critical to realizing the full potential of AHE-FCD, which can improve the quality and efficacy of medical analysis and healthcare delivery when used to supplement and augment existing healthcare systems.

Fig. 9
figure 9

Interoperability Analysis

Implementing Edge and Fog Computing for Better Medical Analysis relies heavily on resource optimization analysis. In the above Fig. 10 by processing and analysing medical data closer to the site of generation, these technologies have the potential to change healthcare, however efficient resource allocation is needed to realize this potential. Allocating and utilizing computing and storage resources wisely to meet the various demands of medical analytic applications is what resource optimization implies. Healthcare providers can improve patient care and operational efficiency by allocating processing resources more effectively between the edge and fog layers, thereby speeding up medical analysis and decreasing latency. To realize the full potential of AHE-FCD and to ensure that healthcare systems can provide rapid and accurate medical analysis while successfully managing resources and costs, it is essential to optimize these systems’ use of available resources.

Fig. 10
figure 10

Resource optimization Analysis

To fully grasp the advantages of AHE-FCD for Enhanced Medical Analysis, it is essential to conduct thorough research into latency and real-time processing. These technologies have the potential to save lives in the medical industry because of the reduction in latency they provide and the ability to analyse data in real time. Low latency is very helpful in telemedicine, remote consultations, and the instantaneous availability of vital medical information. Collectively, these studies pave the path for AHE-FCD to improve medical analysis by giving faster and more precise insights, better privacy, scalability, interoperability, and resource efficiency. The layer takes data from the sensors that measure the health of the individual, like their temperature, heart rate, and systolic and diastolic blood pressure. Through either wired or wireless communication methods, the data is that sent to the fog computing devices. One of the biggest problems with edge computing is getting dependable network connection set up and kept up there. Problems arise from things like spotty service, slow connections, insufficient capacity, and the need of a solid network backbone. The proposed work achieves better latency (93.45%), data security and privacy (96.7%), scalability (95.9%), interoperability (97.2%), and resource optimization (30.4%) when compared to other existing methods.

Conclusion

In conclusion, the potential for innovations lin Edge and Fog Computing to revolutionize medical analysis is genuinely ground-breaking and has the possibility of altering the healthcare sector. This investigation aims to address a number of issues plaguing today’s healthcare system, which has become increasingly complex due to its rapid expansion and heavy reliance on real-time medical data. The Adaptive Health Edge and Fog Computing design (AHE-FCD) is a revolutionary architectural framework that aims to actualize this promise. The purpose of AHE-FCD is to address the opportunities and problems that healthcare organizations face while implementing Edge and Fog Computing. A number of key features are highlighted, including data privacy and protection, workload adaptability, resource management, and streamlined data integration. AHE-FCD allows for distributed data processing and analytics by bringing together edge devices and fog nodes, drastically cutting down on analysis time and latency. There is a wide range of potential real-world applications for AHE-FCD, including telemedicine, smart hospitals, and medical study. These tools have the potential to boost healthcare delivery, facilitate medical research, and optimize the industry as a whole. The results of this research are anticipated to lead to more efficient medical analysis with fewer delays, better accuracy, and stricter protection of patient information. The development of AHE-FCD is an encouraging step forward that will hopefully lead to the widespread implementation of sophisticated medical analysis systems. Prompt and well-informed decision-making is not essential within reach, with the possibility to give first-rate care, boost patient outcomes, and propel healthcare into the future. In the future, people can likewise witness the development of eco-wellbeing-edge, a zero-carbon deployment model capable of assessing people’ stress levels and well-being. Finally, the future of edge computing is bright, with more acceptance, higher performance, IoT integration, and enhanced security.