QoS-Ledger: Smart Contracts and Metaheuristic for Secure Quality-of-Service and Cost-Efﬁcient Scheduling of Medical-Data Processing

: Quality-of-service (QoS) is the term used to evaluate the overall performance of a service. In healthcare applications, efﬁcient computation of QoS is one of the mandatory requirements during the processing of medical records through smart measurement methods. Medical services often involve the transmission of demanding information. Thus, there are stringent requirements for secure, intelligent, public-network quality-of-service. This paper contributes to three different aspects. First, we propose a novel metaheuristic approach for medical cost-efﬁcient task schedules, where an intelligent scheduler manages the tasks, such as the rate of service schedule, and lists items utilized by users during the data processing and computation through the fog node. Second, the QoS efﬁcient-computation algorithm, which effectively monitors performance according to the indicator (parameter) with the analysis mechanism of quality-of-experience (QoE), has been developed. Third, a framework of blockchain-distributed technology-enabled QoS (QoS-ledger) computation in healthcare applications is proposed in a permissionless public peer-to-peer (P2P) network, which stores medical processed information in a distributed ledger. We have designed and deployed smart contracts for secure medical-data transmission and processing in serverless peering networks and handled overall node-protected interactions and preserved logs in a blockchain distributed ledger. The simulation result shows that QoS is computed on the blockchain public network with transmission power = average of − 10 to − 17 dBm, jitter = 34 ms, delay = average of 87 to 95 ms, throughput = 185 bytes, duty cycle = 8%, route of delivery and response back variable. Thus, the proposed QoS-ledger is a potential candidate for the computation of quality-of-service that is not limited to e-healthcare distributed applications.


Introduction
Nowadays, there are various emerging trends and practices proposed to monitor and maintain patients' records, and provide all facilities with responses in a given period [1]. At the same time, quality-of-service (QoS) is the most important and descriptive computation problem in a system that runs and manages services concurrently in the medical network. In a two-way response to the quality-of-service and -experience, patients' feedback plays a significant role in the performance analysis of the complete process of healthcare applications during complex medical-data processing [2,3]. In every medical hospital, there is an emergency center that provides education services to elderly patients, including physical health assessment, counseling, checkups, and curative diagnosis and treatment. However, elderly patients with high cholesterol are monitored by a cholesterol meter for the rest of their lives [4]. The cholesterol meter home-test kit contains a lancet, for drawing blood, and test strips [4,5]; today, the portable device is connected wirelessly, via embedded sensors, to the handheld device, allowing the patient to regulate their cholesterol and deliver rapid action by taking gut-acting drugs within 12 h. The complete process can be monitored and managed by their general physician and emergency center staff via the exchange of snap-based (step-by-step) procedures and video clips on multimedia devices, as shown in Figure 1. Figure 1 presents an existing model for QoS in healthcare monitoring and real-time medical-data processing. This model is initiated by a server-based centralized application, while connected to the wireless network (internet), and requests a service manager to utilize medical services. This application request passes through the gateway after verification of device ID/registration. After that, the patient can use medical services, such as physician consultancy, medical reminders, etc. On the other hand, the registered physician receives an alert, according to their expertise, during on-duty time, and then the physician responds as per the requested services (consult, etc.). In this overall scenario, the model evaluator would analyze all requests, create the charges, and share the complete details of utilized services with patients. However, the requirements for medical media and content delivery for elderly healthcare patients present complex problems [6]. Whereas the medical media for healthcare includes text, audio, image, video, hypermedia, etc., this paper only focuses on the visual content of medical services.  [7]. Moreover, multimedia streaming is done over a fifth-generation wireless network (5G), through a multimedia external system, with a large screen for examination and analysis of the scenario. In [8], the authors state that almost 80% of healthcare patients reject services and products due to substandard performance and unsatisfactory and insecure platforms, in accordance with the facet. Thus, it is important to integrate costefficient schedules with both quality-of-service and quality-of-experience. For this purpose, a monitoring system enables the computing performance of an e-healthcare application to subscribe to medical services and process all data accurately and efficiently [9]. With this inclusion, multimedia devices have the potential to handle, manage, and execute the overall processing of an e-healthcare application; especially smartphones and edges. The utilization of multimedia devices and IoT-enabled wireless-sensor technologies provides a great advancement in the e-healthcare environment, with robust performance in terms of QoS, and, accordingly, accurate user demands [10].
The streaming of medical media within the healthcare service domain creates guaranteed patient-perceived quality-of-experience (QoE) services [11]. In a permissionless public P2P blockchain network, the allocation of bandwidth is totally different between individuals, such that extreme emergency cases and regular patients receive the same level of quality-of-experience. However, QoE measures several aspects of the user experience in a healthcare environment; for example, terminal devices, network speed, user systems, and distributed applications (DApps). In healthcare services, a standard QoE evaluation reflects limitations between the current service and patients' expectations and requirements. For instance, most patients are prudent regarding medical services, feel uncomfortable in, and distrust services provided by, healthcare systems [12,13]. Therefore, modeling should rely on examination of the patients' perceived quality-of-experience of health-related media and health assistance services, provided over distributed networks, via user terminal systems.
Several QoS indicators and performance measurements, such as delay, response time, transmission power, power drain, jitter, throughput, duty cycle, and route selection, define the quality-of-service for cost-efficient scheduling of the e-healthcare system during data processing and optimized services [14]. On the opposite side, patients' demands can be calculated through the use of mean opinion score (MOS) quality-of-experience. This measurable structure strongly connects distinct nodes, and makes an assessment according to the quality of the distributed network, using newly adapted tools and emerging practices. The range of the parameters of quality-of-experience is influenced by the QoS, which only depends on the elements of the distributed network [14,15]. Combining the elements of the network leads to event blocking, black-out, and blurriness, degrading the quality level during media streaming. In this regard, health media regulatory and compliance managers are looking for an efficient and effective quality-of-experience, management, and controlling mechanism, which fulfills the requirements and expectations of patients, especially the elderly ones [15].
In a distributed network environment, smart contracts design and create automated services and evaluate the level of satisfaction of an individual patient by using qualityof-service parameters (range) with certain prior analyzed criteria. In fact, the quality-ofexperience control management (QoECM) system reduces associated throughput, jitter, and delay, and improves the overall quality-of-service parameters. The performance of user terminals (multimedia devices for elderly patients) directly impacts the quality-ofexperience in terms of entropy and energy consumption. These constraints are directly proportional to each other.
Quality-of-experience encompasses several features which strongly affect the users' perception of medical media services and the quality of presentation [16]. For instance, the category of digital media and content analysis includes biological signal processing, video analysis, text, audio, and image retrieval. These highlighted domains are under medical multimedia information retrieval. Moreover, while exchanging information, the most important properties are prioritized, such as first exploiting digital signals and then summarizing them by the signal processor. Investigating data sources (for example, biological data signals, video analysis, digital audio, text, images, etc.) in signal processing is a complex problem. This mechanism is also capable of imitating the sensory pattern recognition of people. Recently, most types of medical media provide one-dimensional channels for biological data signals, where the dimension is a timeline [17]. Measuring the correlation of quality-of-service parameters with subjective quantities, such as qualityof-experience, is more difficult. Many other approaches are used to measure subjective quantities, such as MOS, which is capable of merging both QoS and QoE. The formal method of optimizing the quality-of-service mechanism is in line with the patients' qualityof-experience.
This paper discusses an adaptive QoS-and metaheuristic-enabled cost-efficient scheduler, with smart contracts for medical-data processing and service delivery-a metaheuristic approach, such as a genetic algorithm, is used to design an efficient scheduler that monitors and computes patients' medical services, creates lists of utilized and subscribed packages, and preserves all these transactions in the distributed immutable ledger. The main contributions to this paper are as follows: • This paper contributed to three different aspects. First, we proposed a detailed design for a metaheuristic-genetic-algorithm-based cost-efficient scheduler of medical-data processing and optimization of service records in real-time healthcare, accounting for environment-related challenges, scheduler optimization (rate of services) issues, and service delivery lifecycle. • A novel and secure QoS efficient-computation framework is proposed, which effectively monitors QoS-indicator (range of parameter) performance, and provides a better experience to elderly recipients of medical services through applications (e-healthcare).

•
In this paper, we design a blockchain-enabled serverless-distributed-network framework for medical-data transmission, process scheduling, service delivery, and computational task optimization and management. Smart contracts are designed and deployed to automate the execution of events and node transactions in a distributed medical environment. These medical nodes are connected in such a way that they create a chain-like chronological structure. Therefore, the system stores records of individual activities in the protected immutable blockchain storage.

•
The working operations of the proposed QoS-ledger are demonstrated through a sequence diagram. It shows the events of the system's execution in a sequential manner, which creates a better understanding and development of the overall architecture. The authors adopted a blockchain-enabled serverless-distributed P2P permissionless network, since it is an open-source, decentralized platform, employing intelligent smart-contract functionality. • Finally, we evaluate and discuss QoS-ledger implementation-related issues, challenges, and limitations, and mention critical open research areas with potential for future developments.
The remainder of this paper is organized as follows: In Section 2, we discuss general QoS-related articles and the QoS impact on e-healthcare. We also analyze the various gaps in the efficient computation of quality-of-service and cost-efficient scheduling, during medical-data processing, in previous literature, and relevant requirements. Section 3 discusses preliminary steps and problem formulation, in which some standard framework formulation and notations are explained. Furthermore, the proposed smart contracts and metaheuristics for secure QoS and metaheuristic-based cost-efficient scheduling of medical-data-processing-related intelligent healthcare applications are discussed in Section 4. The experimental results are applied to real-time medical-data processing and transmission through a public P2P network of blockchain-enabled serverless structure; analysis compatibility and efficiency are evaluated by comparing it to other state-of-the-art methods. In Section 5, we present the operations of the proposed system, and QoS-ledgerimplementation challenges and limitations are discussed. Finally, we conclude this paper in Section 6.

Related Work
In this section, we study and analyze previous QoS, QoE, and cost-efficient scheduling techniques, as well as metaheuristic algorithms related to literature in the healthcare domain.

Quality-of-Service (QoS) and Cost-Efficient Scheduling
Over the last few years, there has been a lot of interest in QoS, QoE, the internet of medical things (IoMT), and the cost-effective scheduling of medical services [18]. Many QoS approaches have been presented. The requirements of these approaches can be differentiated by the distinct service parameters and measurements of e-healthcare applications. They may involve multimedia conferencing, transmission of physiological parameters, high-resolution medical imaging and image transfer, clinical transmission, and administrative data accessibility [19], shown in Table 1. [20] Edge-enabled WBANs for efficient QoS-provisioning healthcare monitoring: a two-stage potential game-based computation-offloading strategy.
This study focuses on communication networks for the healthcare environment, and provides a required QoS to ensure reliability in data delivery, considerable data rate, and low latency, with accuracy. For this purpose, the authors of this paper introduced a passive optical network based on a new double-per-priority-queue dynamic wavelength and bandwidth allocation algorithm.
The proposed multi-constraint intra-body-area sensor network provides an adoptive QoS aware routing protocol for smooth transactions of sensitive healthcare-data processing and delivery of services.
Less cost-efficient. [22] A QoS-aware service composition mechanism in the internet of things using a Hidden Markov Model-based optimization algorithm.
In this paper, the authors proposed an efficient method, based on the Hidden Markov Model and ant colony optimization, for the enhancement of QoS services and composition issues in real-time.

•
Requires more computational power. • High Complexity. [23] QoS-aware service composition in Fog-IoT computing using multi-population genetic algorithm.
A QoS composition approach presented for healthcare based on the multi-population of genetic algorithm in IoT-fog environment. Mainly focuses on the transport layer and divides the layer into four subparts for medical-data security, storage, pre-processing, and monitoring.
• Dependency of fog nodes. • Event-aware QoS. • Less cost-efficient medical-data scheduling. [24] Customizable assistive plans as the dynamic composition of services with normed-QoS.
The integration of a service-oriented approach, with normative reasoning, to automatically generate assistive tasks. These tasks are customized for distinct users (profiles) of healthcare in the proposed environment.

Efficient Computation of Medical-Data Processing and Service Delivery Optimization Solutions in E-healthcare Applications
In recent years, quality-of-service and computation of data processing related to healthcare has become a crucial challenge in several research domains, for example, metaheuristics, machine learning, artificial intelligence, and deep learning using medical data and processed records preserved in hospitals [26,27]. The process of medical-data collection, and design preprocessing set up, in healthcare is an important task, in which the collection of data records is dependent on the three main stages of data flow generated from clinical trials, medical research-related records, and operations of organizational data [28]. Examination and analysis of this collected data for computer-based assistant aids and the creation of real-time platforms (and quality-of-services) have become an advanced development trend of recent smart healthcare [29][30][31].
In [32], the authors discussed an overview of medical-data computation and servicedelivery optimization and analysis in healthcare. The study examines critical healthcare records, such as patients' health trials, prediction of diseases, prevention methods, health guides, and elderly medical assistants, that provide decision-making facilities in accordance with the emergency, cost-efficiency, and increase efficiency. In the current study, various probabilistic and adoptive QoS frameworks, with cost-efficient medical-data scheduling, have been proposed and used in different medical environments [32,33]. For instance, a new method of health analysis and prediction, working with distinct QoS parameters and QoE mechanisms in real-time, has been introduced. Substantially, in [34], the authors proposed IoT-fog enabled multi-route based on medical-data processing and computation, which would also make medical delivery in real-time cost-efficient and manage the logs of health service records optimization [35].
Many researchers have used metaheuristics for the optimization of medical services with multi-channel routes and service delivery through healthcare applications [36]. Zhao and Huang [37] presented a new microservice container fog system-based architecture for running ubiquitous and measuring delays in the transmission of sensitive applications at the lowest possible cost [37,38]. In addition, this study discussed the problems and limitations of cost-efficient task scheduling, such as heterogeneous fog servers [37,39]. For this purpose, many experts have proposed several new adaptive methods. One of the concerning solutions is cost-aware computational offloading and task scheduling architecture, which provides task scheduling solutions in multiple steps, for example, task management and sequencing steps, matching of resources, and scheduling steps [37].

Problem Formulation and Preliminaries
This section discusses some basic preliminaries of the system and formulates the related problems, which are as follows:

Notations and Problem Formulation
The problem initiates by letting a set of 'm' activities with their schedules S = {s1, s2, s3,.., sn}, and a set of infinite processing with their capability P = {p1, p2, p3, . . . }, whereas we examine and analyze the schedules of all 'm' tasks programmed to be performed, the capacity of the medical-data processing in the fog node is not exceeded and idle time is minimized. In a healthcare environment, the number of possible schedules increases rapidly; the difficulty in processing this data is due to the number of utilized services by patients and the large set of activities generated [40]. This whole scenario often causes delays during the task-scheduling process; as a result, the ease of efficient task scheduling is decreased drastically [41]. An example task is appointments for medical consultation.
The most important healthcare cost-efficient application problem is to provide elderly patients' services (such as clinical trials, medicine updates) and data processing schedules in an effective manner. However, as the population growth of patients has increased, the number of different emergency services performed in hospitals has also increased, as shown in Figure 2. This may raise difficulties, especially delays, due to the cost of having to attend to all of the demands of the patients. Healthcare agencies find complexity in efficient and effective scheduling for performing medical-data processing and optimization of delays in service delivery. However, the complex nature of medical data makes finding optimal solutions to the process of task scheduling difficult [40]. In this study, some of the critical aspects of healthcare problems are discussed as follows [40,41]: • Online medical assistant services (emergency medical services task scheduling). • Offline patients' record process scheduling. • Online patients' records process scheduling.

•
Online requesting medical services data scheduling.

•
Offline requesting medical consultant services data scheduling. In this section, we describe components of the metaheuristic genetic algorithm for the development of medical cost-efficient task (services) scheduling with optimization. A genetic encoding representation is based on clusters to model a scheduler. For task optimization, gens (genetic algorithms) are used to model the time-spaces in which medical tasks can be scheduled for processing in accordance. Most importantly, there is a fixed length of the population (gen) that cannot be increased. A chromosome contains a cluster of genes, where an individual chromosome represents a schedule of the tasks. In the chromosome representation, the size of each chromosome is different, which may depend on the number of medical services utilized and the demand for medical solutions.
A function (f) has a relative maximum and minimum value (size) during the processing of medical data (a), and the analysis in terms of threshold range (z), if there is no open interval that contains a (processing of medical data), then we can calculate as: Therefore, if there is an open interval that contains processing of medical data, then we can calculate as: where 'z' is the threshold range, and the classification of the range is as follows: (i) low, (ii) medium, and (iii) high. The range can be low = 1-30 ms (no need to process data), medium = 31-60 ms (schedule data for processing), and high = 61 ms or higher (priority schedule). For example, a simple genetic algorithm was applied to find the maximum of one function (R1), and we tuned the parameters of genetic encoding (0.005); then we found the fluctuation in the maximum of the second function (R2), as shown in Equation (2). After that, we examined the difference between R1 and R2 and analyzed the computational cost and the number of scheduled tasks handled in a single iteration and their impact on real-time medical processing by comparing both functions: f(z) = e (0.005 sin (z)−sin k(sin (10.005z)z/2) sin(50.5z) cos(z) + cos(0.3z) The genetic metaheuristic coding model posed, wherefrom an individual interval of medical-data processing, there is a list of (0, 1) that serve as chromosomes: where 'h' belongs to the range of {0, 1} (a number of chromosome genes); for this, we take an example of chromosome size of medical-data processing and scheduling "M = 50". Then, with this result, a value of z is converted at the interval, as shown in Equation (4): There is T-L. = 0, which means the lower limit is equal to zero, and the higher limit, T-H. = 1. The previous Equations (3) and (4) Therefore, (m) h = ( )(t)(P ) (6) where 'P' is the tuned parameter and is the change, The end of the evolution process (stopping condition) is demonstrated in Equation (7), where 't' is the duration of all the tasks to be scheduled, 'a' is the capacity, and 'j' is a control parameter.

System Framework
In the proposed QoS-ledger, we present a collaborative study of smart contracts and metaheuristic algorithms (genetic algorithms) for secure QoS and cost-efficient task and service scheduling, with optimization during medical-data processing in healthcare applications. This adaptive computational framework presented several key aspects, which are important for the efficient allocation of resources during medical-data processing, and to optimize the pathway of healthcare service delivery at the distinct layer. Initially, we collect data through the fog nodes, where the neighborhood fog nodes are connected directly with the edge servers. All the initial data generation is held in these nodes, and the roadside fog nodes handle various requests generated by the patients. The edge gateway manages the medical media services and access requests through the registered multimedia devices, as shown in Figure 3 (1). The elderly patients request different medical services in real-time. A number of medical task schedules and the scheduler of emergency services are engaged for an allocated time frame. As shown in Figure 3 (2), the cost of task scheduling is measured continuously while patients avail services. In the process of task optimization, the individual task gets prioritized by the medical scheduler, which is shown in Figure 3 and then executes the task separately and concurrently with effectiveness. The patients (elderly users) are connected to the four key aspects of QoS monitoring, examination, optimization, and adaptation, associated with the layers. For instance, (i) transmission control, power delivery, and modulation level (physical layer); (ii) duty cycle, routing, and path selection (transport layer); and (iii) network layer for communica-tion and secure transmission. In addition, the proposed QoS is computed fairly while this sensitive healthcare data is transmitted to the defined destination. The main objective of this proposed QoS, with the smart contract, is to satisfy the patient and service provider (physicians/doctors) requirements accordingly, while transferring the processed medical data to the defined destination. There are various resources crucial for the effective and efficient calculation of user-experience QoS in medical applications. Where the QoS adaptive computational algorithm is introduced, this proposed algorithm is used to manage the efficient monitoring of QoS, with QoE indicator parameters, during the health-related data processing and scheduling, in the distributed application, by acquiring the key performance indicator (system indicator) in the serverless blockchain-aware distributed network environment. For instance, we tuned QoS parameters (for the individual patient transaction), such as throughput, delay, power and control transmission, duty cycle, and connectivity. These metrics were taken into account for the examination and analysis of the level of performance, as well as to measure the execution of the overall transaction of the system.
The proposed quality-of-service algorithm has linearly intelligent and strong binds with the elderly patient's demands, such as quality-of-experience. In this scenario, we maintain a QoS trade-off between entities of subjective and system objectives and validate the network performance to its complete characterization in this framework from distinct aspects. While the quality-of-experience is highly dependent on the patient's expectations (level of satisfaction), the calculation of QoS metrics and indicator criteria is discussed as follows: In the proposed distributed healthcare application, there is a mutual and collaborative integration of different nodes of a distributed network that provides strong interaction between the patient's level of stratification and the performance of the system network.
For QoS analysis, the state of the charge (SC) is used to analyze the duty cycle and measure the overall performance of the network.

Smart Contracts
In this section, we design and create blockchain smart-contract enabled QoS chaincode (algorithms) for analysis of real-time medical services and data processing. For this purpose, there are three important contracts developed that perform automatic execution of QoS logs transactions; protection of node data; records preservation; and checks on patients' devices' registration and updates: deviceRegistration(), AddTransactions(), and secureDataPreservation().
The elderly patient device registration contract (deviceRegistration()) is started and created between the QoS-ledger engineer and the healthcare patient to authorize new devices for availing medical services with the secure, cost-efficient node of task optimization. The function deviceRegistration() of the contract is developed to accumulate and execute medical-related services and processing, where the QoS-ledger engineer is responsible for validating each transaction and checking before execution, and recording QoS node transactions (logs) in accordance with the defined consensus policies managed by the Engineer, as shown in Table 2 (Chaincode 1). In addition, this smart contract also records additional information related to the elderly device registration, such as deviceReg(), DID(), patients, physician, name, timestamp (run), and the other active nodes of patient registration. Moreover, the patient device is registered in the P2P serverless distributed network for secure communication and protected QoS-ledger data processing and preservation; for this act, the system initiates the AddTransactions() and secureDataPreservation() contracts, as presented in Table 3 (Chaincode 2): The add-new-healthcare-transactions and update-distributed ledger contract (Ad-dTransactions()) is started and creates the automated system for registering new details of multimedia devices and adding them to the AddTransactions() contract when an event occurs. However, this developed contract is able to preserve records of healthcare-related medical data, services, monitoring information, and records of QoE-based patient experiences; update transactions; and even overall QoS-ledger preservation. The secureDataPreservation() contract is developed to add new records of QoS-ledger node transactions and execute the query of updated information automatically. In addition, this contract also preserves other information related to patient data processing and service utilization, such as QoSLogs(), accessQoSNodeTransactions(), real-time updates of the QoS-ledger, timestamp (run), and the other active state of healthcare information. Moreover, the patient records, including service availability, scheduling medical services, runtime data processing, and dynamic medical consulting and delivery related information, are accumulated on the P2P serverless distributed network and secure information in the immutable ledger, as shown in Table 3 (Chaincode 2).

Simulation Results and Discussion
In this section, we present an extensive experimental analysis and results of a QoSledger simulation on a distributed blockchain-aware serverless network, during the costefficient scheduling of medical services and processing computation and optimization in the e-healthcare distributed application. It has been demonstrated that there is a correlation between the use of quality-of-service and quality-of-experience matrices and recommends an integrated solution for QoS key parameters, for example, transmission required power, level of modulation, delay (response time), throughput, jitter, duty cycle, and others in a distributed network domain as shown in Figure 3.
It was observed that the performance of modulations (a level of modulations) in this proposed QoS-ledger, where the binary and multi-array strategies were examined and analyzed for the fluctuation of modulation levels, to calculate these relationships through the energy bit per noise ratio and bit rate error, as depicted in Figure 4. However, we also observed that there was close coordination between the current QoS and the simulation of the proposed QoS-ledger for tuning the parameters and got results in accordance (Current: 0.075, Simulation: 0.068), shown in Figure 4. Moreover, it was also observed that the values of state-generated error and higher rollback (roll-off) factor reduced the energy dissipation, as discussed in Chaincode 1. These factors are key to dealing with the power of amplification and transceivers in the distribution range of the network. Due to the distributed nature, all the details of patients' devices are shared through the sensors wirelessly. It was very important to extract all the features of the data that were traveling over the wireless channel and hence the transmission power levels. Therefore, the system coordinated linear distance and power drain, respectively.
The relationship between the quality-of-service and time computation for the proposed QoS-ledger and the baseline (there is not limited to) is shown in Figure 5. Its analysis shows that as time increases, the quality-of-service is calculated at low to high because of the constraints and the sensitivity of the delay of the medical sensor (IoT-enabled). However, proper maintenance of the relationship between power allocation and network channel is typically required. We also analyzed the trade-off between the rate of data and the computation of quality-of-service during medical services delivery and data processing and optimization of the proposed QoS-ledger and baseline for distributed e-healthcare applications, shown in Figure 5. Subsequently, the proposed QoS-ledger examined the data rate for performing better and more efficiently, unlike the other state-of-the-art baseline architectures, which need to transmit fewer medical data and exploit more power drain. The trade-off between quality-of-service and quality-of-experience performance indicator (according to the defined parameter) is presented to the QoS-ledger. In addition, the relationship between cost-efficient quality-of-service and quality-ofexperience in accordance with the performance metrics examined and simulated had more throughput, reduced jitter, and less delay, in parallel with transmission power, duty cycle, and route selection, presented in Figure 6.
In this context, we compared the proposed QoS-ledger with the state-of-the-art methods, such as "Blockchain technology and IoT-edge framework for sharing healthcare services" and "Blockchain Technology in Healthcare Industry". S. A. El-Rahman and A. S. Alluhaidan proposed an IoT-edge framework for the purpose of sharing medical information without changing utilizing data processing and blockchain techniques [42]. This proposed system works on the predefined mechanism of blockchain, which is less cost-effective for processing medical records and transmission over the defined network, whereas the QoS-ledger provides a customized blockchain consortium network environment, which creates more reliability between elderly devices connectivity with the secure transmission, shown in Chaincode 1 and 2. The matrix comparison of both the proposed systems is discussed in Table 4.

Research Method
Matrix of the Other State-of-the-Art Methods

Matrix of the Proposed QoS-Ledger References
Blockchain technology and the IoT-edge framework for sharing healthcare services.
The authors presented the details of the proposed system as follows: • Application of blockchain technique to reduce platelet wastage and shortage by forming hospital collaborative networks.
The author of hospital-ledger presented an applicational blockchain infrastructure to reduce platelet wastage and form hospital networks and their collaboration by using multi-criteria culturing techniques. To analyze the proposed applicational model, the author defined some aspects of the investigation that are discussed as follows: •   Figure 7 presents the smart-contract enabled QoS-ledger, a secure, cost-efficient medical task scheduling and service delivery framework that identifies, registers, validates, and verifies the elderly device for medical-data processing. At the initial stage, the medical process is executed between QoS-ledger engineer and smart contract-based QoS with quality-of-experience. Once the customized consensus reaches the point of records (de-viceRegistration()), then it registers the devices, in which all the devices directly interact with the medical services available in the healthcare distributed application and digitally sign with the level of defined security (data encryption), as discussed in Chaincode 2. Substantially, patients submit requests for medical services to the QoS-ledger engineer, who verifies device registration and validates the request with the QoS and QoE smart contracts, which store and share update services after cross-checking the on-chain transaction and storage. After this process, the patient gets notification of updated services and a cost-efficient scheduler for service delivery and process optimization. The smart contract updates the new node transaction of medical services using AddTransactions() and stores logs of updated transactions on the distributed ledger using secureDataPreservation(). The implementation of a QoS-ledger for secure quality-of-service and cost-efficient task scheduling and services delivery executes update secureDataPreservation(), in which the QoS-and QoE-ledger directly trace and track individual service details and logs of service records that are preserved in immutable storage. It helps the QoS-ledger engineer to examine and analyze each utilized medical service by patients, and, by this act, also determines the scope of data and privacy. This engineer also maintains new registration and medical service management and produces overall statistical information related to the costefficient scheduler monitoring and medical-data processing with optimization. Moreover, this proposed scenario collects and analyzes each service log generated by the patient in the distributed application, cost-efficient task and services scheduling information, patients' experience records, and ledger updates, including the meta-records, timestamp, and other affiliated medical-related information and preserves in protected storage.

QoS-Ledger Deployment Limitations and Challenges
In this context, we discuss the proposed QoS-ledger-related implementation challenges and limitations and also highlight the issues in the current healthcare distributed applications.

Cross-Chain Platform Issues
In the distributed network environment, the platform interoperability of QoS-ledger allows multiple nodes to connect (cross chaining) to each other, such as elderly patients' multimedia devices, emergency centers, and the cost-efficient scheduler fog nodes. Through this act, it provides an effective and efficient business service infrastructure for secure QoS and metaheuristic cost-effective scheduling of medical-data processing and service delivery optimization through the distributed application. The patients (end-user) of this platform, and many different users of a distinct medical chain of distributed blockchain architecture, can interact, intercommunicate, manage medical services and proper utilization, and conduct meaningful transactions in healthcare. The current healthcare legacy and service delivery solutions, and the existing smart contract-based serverless environment, create a lack of interoperability. It is difficult to adopt and develop a platform between patients and healthcare service delivery systems due to this disunion and weak connection [46,47].

Medical Sensitive Data-Related Protection and Privacy Challenges
In the proposed QoS-ledger, there is a significant objective of utilizing blockchaindistributed technology to protect critical medical information, data processing, and com-putation organizations, and to gratify particular types of information. This can be stored on the blockchain storage system along with the process of preservation, such as on-chain communication (smart contract) and off-chain communication (QoS with cost-efficient transactions) services available and the rate of utilized healthcare services preservation. In the healthcare system, data are more sensitive and confidential [48]. Therefore, medical data, processing information, service optimization, and computation must be preserved and checked against and analyzed by the blockchain-aware serverless hashes of the distributed QoS-ledger on-chain. The most crucial feature of structured critical medical information is the size and preservation of this data in the secure node of the distributed ledger. In addition, unimportant QoS healthcare patients' data on the network creates unexceptional and more costly transactions, that have a direct impact on the smart contract and metaheuristic performance by means of efficiency and effectiveness.

Security Costs and Scalability Limitations for Medical Data
Smart-contract services and meta heuristic-enabled healthcare solutions are becoming more in demand as a proficient and secure protected environment for several different healthcare organizations. The current healthcare security and quality service solutions are untrusted and unreliable. Furthermore, they cannot provide scalability services, but depend on the high rate of data. This also restricts the direct or continuous processes of medical node transactions on serverless aware networks, transparency of patients' information, domain cost efficiency, size of data, which is inherent in nature, latency, and increased cost of scalability security [48,49]. However, when compared to simply monitoring and analyzing the cost-effective scheduling of medical-data processing and service optimization, the proposed QoS-ledger solution is the most important. By the act of this, the system considers only the QoS performance and solution of medical cost-efficient services, having more powerful system security and high processing execution on the blockchain serverless network as compared to the server-based centralized healthcare systems.

Compliance and Regulation Issues in E-healthcare Systems
Healthcare councils and authorities need to consider, examine, and analyze different medical policies and pathways, according to the smart-contract and metaheuristic-secure QoS, as well as cost-efficient services delivery and optimization implication and ascription, such as protection of medical information, patients' details, and services, and preservation in the blockchain aware serverless distributed network. The Federal Healthcare Authority needs to collaborate with the other private healthcare service delivery organizations and information security providers for secure serverless distributed network transmission. Whereas QoS and metaheuristic-enabled cost-effective scheduling of medical-data processing via e-healthcare DApps that evaluate the healthcare environment to calculate differences and formulate new authoritative policies and objectives [49,50].

Conclusions
This paper discusses the smart-contract and metaheuristic enabling secure QoS and cost-efficient scheduling of medical-data processing and service delivery in the e-healthcare environment, and their related monitoring, QoE investigation, and distributed serverless network transmission challenges and limitations. We proposed a metaheuristic-enabled cost-efficient scheduling approach that investigates real-time control, management of the rate of services available, and the list of items subscribed by the patient in accordance with the cost charged. After that, the QoS efficient-computation algorithm was designed, which monitors the overall performance according to the parameters through a QoS indicator with the collaboration of QoE. Therefore, a blockchain permissionless public P2P distributed serverless network framework is proposed for medical-data transmission and real-time processing and storing health-related information (transactions) in a distributed immutable storage.
In this regard, we have designed and developed different smart contracts for securing QoS and cost-efficient scheduling mechanisms of medical-data processing and service delivery and optimization in the distributed serverless network environment, and the overall record-related services are preserved in the blockchain ledger. The experimental result shows that the QoS-ledger performs impressively better, by running transmission power = average of −10 to −17 dBm, jitter = 34 ms, delay = average of 87-95 ms, throughput = 185 bytes, duty cycle = 8%, and route and response = dynamic on the distributed blockchain public network compared to other state-of-the-art methods. Finally, we discussed the proposed QoS-ledger working operation and presented it through a sequence diagram, which also highlights the critical implementation challenges, limitations, and issues in the current smart contracts and metaheuristic cost-efficient scheduling in e-healthcare applications with open research areas and future direction.