Computers, Materials & Continua
DOI:10.32604/cmc.2021.018809
images

Article

Intelligent Microservice Based on Blockchain for Healthcare Applications

Faisal Jamil1, Faiza Qayyum1, Soha Alhelaly2, Farjeel Javed3 and Ammar Muthanna4,5,*

1Department of Computer Engineering, Jeju National University, Jeju-si, 63243, Korea
2College of Computing and Informatics, Saudi Electronic University, Riyadh, Saudi Arabia
3SAP Pakistan Liaison Office, Islamabad, 44010, Pakistan
4Department of Telecommunication Networks and Data Transmission, The Bonch-Bruevich Saint-Petersburg State University of Telecommunications, Saint Petersburg, 193232, Russia
5Peoples’ Friendship University of Russia (RUDN University) 6 Miklukho-Maklaya St, Moscow, Moscow, 117198, Russian Federation
*Corresponding Author: Ammar Muthanna. Email: ammarexpress@gmail.com
Received: 21 March 2021; Accepted: 22 April 2021

Abstract: Nowadays, the blockchain, Internet of Things, and artificial intelligence technology revolutionize the traditional way of data mining with the enhanced data preprocessing, and analytics approaches, including improved service platforms. Nevertheless, one of the main challenges is designing a combined approach that provides the analytics functionality for diverse data and sustains IoT applications with robust and modular blockchain-enabled services in a diverse environment. Improved data analytics model not only provides support insights in IoT data but also fosters process productivity. Designing a robust IoT-based secure analytic model is challenging for several purposes, such as data from diverse sources, increasing data size, and monolithic service designing techniques. This article proposed an intelligent blockchain-enabled microservice to support predictive analytics for personalized fitness data in an IoT environment. The designed system support microservice-based analytic functionalities to provide secure and reliable services for IoT. To demonstrate the proposed model effectiveness, we have used the IoT fitness application as a case study. Based on the designed predictive analytic model, a recommendation model is developed to recommend daily and weekly diet and workout plans for improved body fitness. Moreover, the recommendation model objective is to help trainers make future health decisions of trainees in terms of workout and diet plan. Finally, the proposed model is evaluated using Hyperledger Caliper in terms of latency, throughput, and resource utilization with varying peers and orderer nodes. The experimental result shows that the proposed model is applicable for diverse resource-constrained blockchain-enabled IoT applications and extensible for several IoT scenarios.

Keywords: Internet of things; blockchain; microservice; fitness service

1  Introduction

Internet of Things (IoT) is an emerging field with advanced tools and technologies, including data processing and analysis approaches to improve efficiency and productivity in the IoT environment. In IoT, the sensors and actuators are coupled with information and communication technology in a digital environment where data is extracted, processed, and analyzed to support intelligent IoT applications.

Data analytics play an immense role in multiple dimensions, including healthcare, business, infrastructure handling, energy management, security, safety, etc. [1]. However, due to its huge usage, new challenges are faced in the IoT analytics community. Some of them include complexity faced while processing IoT data streamed from different devices, handling various formats of data, annotating sensor observations in real-time to know about meaning and context, especially using and processing this data along with maintenance-related services instead of unreliable approaches. Such issues have an adverse impact on scalability, efficiency, and reusability in IoT applications. There is a need for such models to overcome the said issues and provide helpful information from IoT data.

The blockchain is designed on distributed ledger technology, which was created to store irreversible financial records. The record of each transaction in a blockchain is secured through allowed participants to sign the transaction. The blockchain comprises a block that includes a digitally encrypted block and signed as a time stamp. At last, the chain is secured and protected using advanced cryptographic algorithms [2]. A blockchain comprises a distributed ledger database containing six layers: network, data, smart contract, consensus, application, and service. The data layer and network layer are typically where data acquisition, authorization, and control are performed [3]. The smart contract, consensus protocol, and incentive structure functionality are deemed part of the smart contract layer and consensus mechanism. Furthermore, a massive amount of computing power and resources are consumed by the blockchain consensus protocol, resulting in lower throughput and latency [4]. The blockchain network’s back-end functionality is managed by the service layer, which is exposed to the application layer. The front end and back end communicate which each other, which is handled by the application layer. Various new blockchain technologies, including permission and privacy mechanisms, consensus algorithms, permission and privacy methods, and smart contracts, have been implemented over the last few years. The blockchain contains public and private blockchains. The network is managed and regulated by the registered users in a private blockchain. Similarly, a registered participant in a permissioned blockchain takes part in the block creation mechanism, whereas anyone in a permissionless blockchain may participate in the consensus and block creation mechanisms. As a result, the permissioned blockchain is considered more scalable, transparent, and customizable [5].

In recent years, the Internet of Things (IoT) has brought immense changes in human lives [6,7]. Several thousand devices make up the Internet of Things, which monitors the environment, gathers sensory data, and sends it to a central location. Healthcare is one of the most rapidly growing areas among the various applications [7–10]. Besides, some IoT-enabled fitness devices provide trainee safety by overcoming muscle imbalance, monitoring workout plans, and alerting trainees when taking rest [7]. During training, each trainer’s activity is tracked by these fitness embedded devices. The Internet of Things (IoT) provides practical mechanisms for maximizing production in a variety of fields. Despite its vast capabilities, the Internet of Things is plagued by many problems currently being researched by scientists. Big data analytics, connectivity, centralization, security, hardware capacities, GIS visualization user data privacy are just a few of the issues that need to be addressed [8].

Machine learning that learns, infers the knowledge, and complies with the processed data, is another eminent domain currently gaining attention. Similarly, by regulating and wielding raw data, blockchain technology plays a significant role in computer science [9]. One of the greatest challenges the data science community faces is incorporating noisy IoT sensor data, such as missing data records, inaccurate data format, and redundancy [10]. The data can be conveniently checked for data analytics with the aid of a blockchain-based smart contract.

The following are the principal contributions of this paper:

•   For IoT applications, we present a Blockchain-based Intelligent Microservice to assist Predictive Analytics for Personalized Fitness Data. We present the main characteristics of predictive analytics before developing and deploying them as microservices. As a result, each autonomous microservice is responsible for analytic functionality and is composed of other microservices that are part of the containerized environment to meet the service’s goals.

•   The proposed models assemble both the mechanisms (i.e., knowledge-based and data-driven models) to process and analyze IoT data. Semantic web and machine learning technologies have been considered in this perspective.

•   The proposed system is a permissioned blockchain model, which ensures that the IOT device’s information is secured. The system logs and transaction history are accessed by authorized users only.

•   The proposed Blockchain-Based Intelligent Microservice enabled Predictive Analytics model is a simple solution in which the interactive client application communicates with the blockchain network via a RESTful API. The addition of a RESTful API boosts system performance by allowing for data offloading and computing.

•   Besides, intelligent fitness service is provided via creating a prototype application, demonstrating the proposed IoT blockchain architecture.

•   The intelligent fitness service analyses the fitness data of a trainee and recommends a plan for workout and diet.

•   Finally, the Hyperledger Caliper is used to assess the intelligent fitness service’s efficiency and robustness in the context of latency, resource utilization, and throughput. The outcomes validate the usefulness of the proposed model.

2  Literature Review

In this section, we’ll go over some of the existing blockchain-related work that’s been combined with AI and IoT. Modern technology, including a combination of artificial intelligence and blockchain, is transforming the Internet of Things [11–19].

A decentralized and distributed platform is provided by blockchain technology. On the other hand, artificial intelligence is used in IoT-based applications to process and analyze data and provide decision-making capabilities and intelligence to the device. A plethora of electronic devices has aided mankind in digitizing, sharing, digitizing, and delivering data pertaining to fitness for both trainees and trainers in recent years. This section encompasses details regarding existing blockchain-based fitness applications.

Elliott et al. [20] demonstrated an incentive-based app that motivates engagement in physical activity. This project aims to show and measure changes in the physical activity of a user, like counting of steps taken in a day. Derlyatka et al. [21] suggested a sweatcoin, a digital currency that provides an incentive for users to engage in physical activity. This approach aims to harness physical data of a user in the form of count for taken steps and provide a reward in the form of sweatcoin. In 2018, Joseph Anthony, the founder of a startup in Switzerland, created an app that tracks users’ physical activity. Run2Play is a startup that aims to motivate people to engage in physical activity [22]. Martin introduced the Movement app, an Ethereum startup, in 2017 to incentivize people for physical activities like treadmill running, jogging, and any other outdoor physical activity. The study also created a marketplace where users of the movement app may utilize their tokens to purchase nutrition items and fitness equipment. Furthermore, the app also provides a facility for other cryptocurrencies [23]. Jaroslav created a fitness app in 2016 with the goal of teaching people how to exercise properly. Truegym, an Ethereum-based startup, uses machine learning strategies to examine fitness data collected from devices and trainers in order to suggest training plans to each user [24]. Drake created The Hustle, a fitness application, in 2018. The Hustle is a blockchain application based on Ethereum that focuses on encouraging fitness, wellness, and well-being while incentivizing people to remain healthy. The company creates an Ethereum token that is given to users who engage in fitness-related activities. Each user is given a built-in wallet in which HUSL token is transferred, where it can be readily exchanged for other currencies like ETH, BTC, or USD [25–33].

As previously stated, these blockchain-based platforms are open-source or permissioned ones, making it impossible for the average user to update or alter the existing system to suit their needs. Furthermore, most of the techniques discussed in the literature review pertaining to blockchain and IoT, and they either reward users with a token for providing fitness data or incentivize users with a token. However, none of these approaches harness a permissioned blockchain platform, termed as Hyperledger fabric, to drive body composition functions using a blockchain-enabled predictive analytics-based microservice. Furthermore, most of the contemporary fitness-related applications employ system’s built-in crypto-currency, lowering the system’s performance in terms of computing power during the transaction. As per the authors’ knowledge, there have been no functional approaches that use blockchain-based microservice-enabled predictive analytics to determine body composition.

3  System Model

The designed intelligent, personalized fitness data safety management comprises five layers, i.e., physical layer, communication layer, prediction analytics micro-service layer, blockchain layer, and application layer, as presented in Fig. 1. The proposed system’s physical layer contains the IoT fitness devices such as dynamometer, muscular dynamometer, left refractometer, spirometer, wireless heart rate monitor, wireless treadmill, wireless fitness belt, wireless weight machine, etc. The data is acquired from all the IoT fitness devices and passed to the communication layer via Message Queuing Telemetry Transport (MQTT) protocol. In the communication layer, the IoT gateway received the fitness data acquired from the IoT fitness devices passed to the IoT server. The IoT server is responsible for data preprocessing and filtering in order to reduce the data volume for storing and detailed preprocessing. The IoT server also sends a control command to the physical layers via the gateway to execute commands such as change the mode of the fitness devices, device settings, treadmill speed, etc. The control application dispatch commands to the IoT fitness devices, which is beneficial in monitoring the state of the fitness devices such as in case of device failure, the notification is sent to the staff. The control application also validates the commands send to the IoT fitness devices to avoid network attacks such as DNS attacks or other security breaches. The control application is based on rules defined by the fitness specialist, admin, and manager of the fitness center. Moreover, the control application provides better management of the IoT fitness devices and trigger notifications based on the rules defined in the business logic. Similarly, the cloud gateway provides secure data transmission and compression facilities between the IoT server and gateway. Afterward, the data is passed to the predictive analytic micro-service layer where predictive analytics and service support function is defined for micro-services. The predicted data is then stored in the blockchain through RESTful API. The designed system is based on Hyperledger Fabric which is used to construct the blockchain network containing four peers and orderer node compressed as an image running in a docker container. Each peer in the network contains the smart contracts used to write transactions in the ledger. The peer also includes data storage which is couch DB, also known as state database, used to define rich queries and provide smart contract modeling as JavaScript Notation. The CouchDB is a JSON formatted document that provides rich queries functionalities to retrieve data efficiently. Similarly, the composer rest server supports the REST API to expose the client application’s backend functionally. Finally, the google remote procedure call (gRPC) is used by the fabric client to establish communication with the fabric client.

Figure 1: Proposed blockchain-based intelligent micro-service to support predictive analytics for personalized fitness data safety platform

3.1 Data Transformation and Preprocessing

In data transformation and preprocessing, the collection of IoT data acquired from the IoT fitness devices is prepared for analytic procedures. The data preprocessor receives the IoT fitness data via IoT gateway based on MQTT interface. Multiple data preprocessing functions such as data cleaning, integration, and normalization are applied to the data to make data consistent. Data cleaning removes noise from the data and fills missing values using the data imputation approach. In data integration, the data acquired from multiple IoT fitness devices are gathered into a unified structure. Data normalization is used to aggregate and transform the data in the normalized range to make data consistent.

3.2 Service Support Functions for Micro-Services

The service support function provides micro-services functionality for the proposed intelligent, personalized fitness data safety management system. The support function provides services which include management and configuration, discovery, and handling micro-services template. The micro-service registry is used to mapped instances and identifiers using the search capabilities in the discovery function. Similarly, in the management support function, the analytic and identification micro-service is selected in response to the service requests. Furthermore, the management function also provides support such as configuration settings for every micro-service. In micro-service template management, information related to each template is stored and retrieved through an interface. Moreover, the data-controlled access is also provided by the service support function in analytics micro-services. The micro-service also contains references of repository and registry with service templates. Furthermore, some additional functions are also included, such as micro-service adaption, observer, and orchestration management. In the micro-service observer, the data and log of failure operation are analyzed and validate the remote calls and protect the operation from failure. The micro-service orchestration is used to integrate and preserve various micro-service operations output, which is later combined in the form of result. Finally, the micro-service adaption management is responsible for managing the adaption rule, which influences the micro-services according to the environment. The adaption management sole duty is to trigger new scripts are described in the rule based on the type and condition of micro-service.

3.3 Prediction Analytics in Micro-Services

The prediction analytics micro-service layer describes the analytic function which is embedded in micro-services. These analytic functions include data pre-processing, feature extraction, selection of new features, and data annotation. The prediction analytic micro-service output is evaluated according to the steps summarized in Fig. 2. Initially, the fitness data is acquired from IoT fitness devices containing missing values, inconsistent structure, and unprocessed. The unprocessed data is denoted as matrix αfitness. The unprocessed fitness devices data matrix αfitness is passed to the data processing micro-service, which enhances the data by recovering the missing values through an imputation approach and improves data inconsistencies for better analytic procedures. Afterward, the pre-processed data matrix αfitness is passed to one step higher for data normalization and transformation, which denotes βfitness matrix. The βfitness matrix also contains data from different heterogeneous sources like smart wrist watch etc. Finally, the normalized data is provided to the orchestration micro-service, which forms a refined data matrix γfitness. The analytic processing micro-service used the γfitness matrix for applying machine learning approaches to compute results.

Figure 2: Proposed micro-service-based predictive analysis for personalized fitness data safety management

The micro-services are fine-grained services where each service is loosely coupled and provide functionalities in an isolated manner. The overall service objective is achieved by combining the functionality of several micro-service. The machine learning development approaches used to support IoT fitness data analytics have become extrusive for many IoT-based intelligent applications. The proposed system includes the following micro-service tasks such as data pre-processing, feature extraction, model selection, and visualization. The proposed prediction analytics micro-service using the Restful micro-service API. The extracted feature using fitness data based on micro-service to improve the performance accuracy. We have carried out some additional statistical approaches on selected features for fitness data to enhance system accuracy. Afterward, the related features are used in the learning process. In the learning process, the appropriate learning model selection is made by micro-services used to train over fitness data and improve the error rate with test data. Lastly, the prediction output generated from the micro-services are used by prediction visualization to get more insight from the fitness data.

3.4 Blockchain-Based Personalized Fitness Data Safety Management

This section will discuss the design of the proposed blockchain-based personalized fitness data safety management platform. The ready data, as presented in Fig. 2 is passed to the blockchain system. The user personal and fitness data acquired from IoT fitness devices are secured and using blockchain-based encrypted mechanisms. The blockchain’s fitness data is stored in the distributed ledger compared to traditional centralized cloud storage. The stored fitness data is shared among the system’s authentic user, who are authorized to access the fitness data with the fitness trainee’s consent. Whenever the trainer or other system users want to access the trainee data, the real-time alert is triggered and delivered to the trainee, requiring a permission grant for data sharing. Furthermore, the ready data is encrypted using blockchain technology, where smart contracts are designed and digital signed by the system’s users. The blockchain based distributed ledger technology provides the tamper-proof and immutable data structure with data transparency, consistency, security, and user privacy. Similarly, the fitness data’s end-user or stack-holder includes trainee, trainer, fitness manager, healthcare providers, fitness center, and insurance companies. Fig. 3 shows the scenario of a blockchain-based fitness data safety management platform.

Figure 3: Blockchain based personalized fitness data safety management

Fig. 4 represents the services exposed by the blockchain-based personalized fitness data safety management platform. We have used Hyperledger Composer to design Restful API, a tool set that allows us to create smart contracts and blockchain applications to solve real-world problems. The Restful API is created us composer-rest-server, which is used to generate the API from the deployed blockchain network and accessed from anywhere through HTTP or REST clients. The proposed Restful API is divided into three components, i.e., action, resource, and verb. The resources are the path where the client sent the request, e.g., apiupdateDietPlan. Similarly, the verb represents the particular action performed on the request, e.g., DELETE, PUT, POST, UPDATE. Lastly, the resources are the functionalities used in the proposed system, e.g., workout plan, trainee appointment, diet plan, equipment management, etc.

Figure 4: Hyperledger Fabric-based business network for the proposed system

3.5 Management in Personalized Fitness Data Safety Management System

The proposed system also supports trainee mobility management (MM) in two scenarios. The MM in the proposed system can be explained as if the trainee wants to change the fitness center from A to B, and then the system will give two options defined in a smart contract, i.e., delete existing ID or create a new ID. The trainee can either delete the current fitness ID before moving from fitness center A to B, or the trainee can use the same fitness ID. The trainee fitness ID is used to keep track of personalized trainee fitness records within the blockchain network. Fig. 5 presents the trainee MM scenario with existing traineeID, in which the trainee shift from fitness A to B with all his previous data.

Figure 5: Scenario 1 Trainee mobility from fitness center A to B with existing Trainee-ID

In scenario one, the trainee record and TraineeID will remain the same only fitnessCenterID will be updated as defined in the smart contract. The participant like trainer and manager can easily access the trainee personal fitness record with trainee’s permission through uniquely identified TraineeID defined in the smart contract. Moreover, the trainee can also permit system users to access personal fitness data within the blockchain network.

Similarly, in MM Scenario 2, the TraineeID will be deleted in case of trainee mobility from fitness center A to B. The personal fitness data associated with the specific TraineeID will be removed from the blockchain network as defined in the smart contract. Afterward, the new TraineeID was generated, which uniquely identified the trainee record within the blockchain. The system user can access the trainee’s personal record through the newly generated TraineeID with the trainee’s permission. Fig. 6 illustrated the MM scenario 2 with newly generated TraineeID.

Figure 6: Scenario 2: Trainee mobility from fitness center A to B with new Trainee_ID

4  Implementation Environment

There are five components of the proposed model. These include intelligent fitness blockchain network, IoT gateway, fitness IoT server, fitness blockchain, predictive analytics model, and fitness blockchain front-end development. The proposed platform is implemented and tested on an eighth-generation machine having an Intel Core i-5 CPU, 8 GB of RAM, and Ubuntu Linux 18.04 LTS installed. The docker engine 18.06.1-ce and docker composer 1.13.0 versions are harnessed for blockchain development, and they stipulate the development environment for setting up the docker image and container on the virtual machine. The docker adds the docker engine run-time environment. We employed Hyperledger Fabric, an open-source framework hosted by the Linux Foundation, for client software toolkit (SDK) development utilizing Node 8.11.4. A web interface, composer web-playground that creates smart contracts using a business network archive component (BNA). DBcouch is a database that defines the ledger’s current state and is employed to manage the back-end of the blockchain network. Smart contract management is done through the composer command-line interface (CLI). Finally, the proposed system business logic is known to the front-end GUI through a REST API created by the composer REST server. Likewise, the development environment and the implementation technologies necessitate an IoT fitness device server running on a Raspberry Pi that serves as an IoT gateway. Besides, Android Things has been installed on the Raspberry Pi to support Java programming.

Communication between the device server and IoT server is performed using MQTT, and HTTP is used to communicate between the device server and blockchain. Spirometers, stationary bikes, wireless heart rate meters, treadmills, dynamometers, and fitness watches, among others, are abstracted into MQTT resources as server components. The server assigns a unique URI to each resource. We used various programming languages for the front-end of the blockchain-based intelligent, customized fitness data safety platform, including JavaScript, HTML, and Cascading Style Sheet (CSS). Furthermore, we used those web development toolkits that are open-source like jQuery and Bootstrap. Finally, we employed PyCharm Professional 2020 as an IDE with Python programming language to implement the predictive analysis model. A support vector regressor and deep neural network are used to implement the workout and diet plan forecast. We created a personalized notification for the end-user using the jQuery plug-in Notify.js. End-users may subscribe to blockchain services by submitting a transaction using the HTTP communication protocol via the REST API.

5  Implementation Environment

This section deals with details regarding the usage of IoT fitness data, pre-processing, selection of those features that are highly correlated, and prediction using a variety of well-known prediction algorithms. The Fitness center of Jeju National University in South Korea is considered to take fitness-related data for the experiment. The trainee’s name, along with other personal information, monthly Diet plan, monthly workout plan, and IoT fitness device information like device name, model, device type, model, and so on, are all included in the dataset. Over the last eight years (2013–2020), the purchased IoT fitness dataset contains 100,000 customized fitness records. To maintain fitness trainees’ health profile, a workout and diet plan is suggested based on the following fitness types: average, obese, and athlete.

IoT fitness data collection, its pre-processing and normalization, training and testing of machine learning models, and performance assessment are all stages of the predictive analytic model. The raw data is converted into reliable data in the pre-processing data layer, which is used to uncover knowledge and hidden patterns via harnessing deep learning methods. Data cleaning is the first step in the data pre-processing process, and it involves removing duplicates, blank space, changing text to upper or lower case, and spell-checking. Afterward, data integration is performed which involves combining data from different sources to give the user a unified view of the data and formatting it for pattern mining. The resulting dataset is then subjected to data transformation. Data transformation can be done in various ways, including feature construction, generalization, normalization, and smoothing, among others. We used normalization to normalize parameters between 0 and 1. Normalization takes all of the attributes to the same scale. The Data acquisition process and faulty sampling cause missing values in data. Missing values can lead to erroneous estimates, statistical miscalculations, and even incorrect conclusions. In the proposed system, we use a probabilistic model based on maximum probability to fill in the missing values.

The proposed intelligent fitness service’s scalability and robustness are evaluated using trainee body composition functions. We calculated body composition functions in the proposed system, which include FFM, BFP, BMI, BMR, and WHR, among other parameters. These characteristics are fed into machine learning algorithms that suggest diet and workout plans. The IoT fitness dataset is used in this system, and it contains labels such as diet plan 1 to 3, workout plan 1, workout plan 1 to 3. Tab. 1 shows all of the corresponding diet and work plans.

The fitness data is also used to evaluate various machine learning algorithms, including SVM, DT, K-NN, and LR. The fitness dataset is used to train and test these learning models, with an 80:20 ratio of data distribution for training and testing. The suggested system’s learning models are assessed using ten-fold cross-validation. Various experiments were conducted to evaluate the performance of current machine learning approaches. The outcomes reveal that the SVM model performed better than the LR, K-NN, and DT methods with a 93.1% accuracy, as presented in Tab. 2. Training and testing of classifiers are done using the IoT fitness dataset, and 10-fold cross-validation is employed to assess them.

6  Performance Analysis and Evaluation

Hyperledger Caliper is used to evaluate the proposed intelligent blockchain fitness service. An open-source benchmarking tool named Hyperledger Caliper, a benchmarking tool is utilized to assess blockchain-based platform performance. Evaluation measures such as transaction latency, resource utilization, and Transactions Per Second (TPS) are used to determine the model. Hyperledger Fabric stipulates ordering services with the help of ordering nodes. These nodes manage the ordering of transactions. The proposed case study’s effectiveness and performance were assessed, harnessing three types of ordering services: solo-raft, solo, and raft, each with a different transaction send rate range of 25 TPS–200 TPS. The latency of raft and solo ordering is greater than that of simple solo ordering, as shown in the graph; it is because of enhancement in transport layer security (TLS), which provides more authentication and security between peer nodes.

We conducted several experiments in the proposed system by changing the number of endorser peers in the network. The peer node in charge of endorsing the proposed transaction is known as the endorser peer. Invoking of the endorser peer function is done using chain code. The function is used to endorse each transaction before it is committed. By changing the number of peer nodes in Figs. 7 and 8, we were able to assess the efficiency of the proposed case study for average latency and throughput. It can be seen from the graph that as the number of peer nodes in the network grows, the network’s latency increases. The network’s peer node degrades its performance in terms of traffic volume, resulting in a decrease in network throughput. Fig. 7 shows the effect of changing peer nodes on network latency at transaction send rates of 25–200 TPS. The latency increase is found to be proportional to the number of peers in the network. The increase in the number of peer nodes and the network’s traffic volume also increases, resulting in a decrease in throughput, as shown in Fig. 8.

Figure 7: Effect of changeable peer nodes with different send rate on latency

Figure 8: Effect of changeable peer nodes with different send rate on throughput

Considering varying transaction send rates, Fig. 9 exhibits the least, most, and average latency. Fig. 10 depicts solo, raft, and solo-raft throughput according to least, most, and average throughput. This is due to having a single node that does not demand an additional TLS mechanism, the solo order achieves the highest throughput among other ordering services, according to the graph.

Figure 9: Effect of changeable orderer nodes with different send rate on latency

Figure 10: Effect of changeable orderer nodes with different send rate on throughput

7  Comparison Analysis

Tab. 2 presented a performance evaluation of the proposed model that depicts that the SVM classifier outperformed compared to other classifiers. To assess the effectiveness of the designed model, we further compared it with other existing work. We have contemplated [32,34–36] for assessment with the design model in the context of accuracy. Tab. 3 shows the comparative analysis of the framework with previous models.

8  Conclusion

Recently, IoT analytics has grabbed major attention and provided various opportunities to enhance sensor data performance by discovering hidden patterns. There exists a pool of challenges to effectuate IoT data analytics. The main challenges are: handling heterogeneous IoT data from various sources and analyzing voluminous sensor data with a small number of processors. The IoT fitness case study was used to evaluate the feasibility of the proposed model.

To analyze the proposed blockchain model’s performance, like workout and diet plans for fitness users, we designed an Intelligent Microservice for IoT fitness data by employing a blockchain approach that enables the smart contracting facility store user personalized fitness data and suggest fitness plan accordingly. The developed system uses a permissioned blockchain network to address problems such as data security, scalability, and identity, etc. Besides, a client-facing interactive front-end application is being developed to showcase the fitness services.

Lastly, Hyperledger caliper is used for testing that evaluates the proposed model’s performance for latency, throughput and resource utilization and amending network parameters. The smart contracts integrated inference engine dramatically improves the model’s performance in the context of resource utilization and throughput. This work can be applied to a variety of fields, including healthcare and smart industries. The designed service model may be further enhanced in terms of ensuring its interoperability with other IoT frameworks. Different consensus and data storage algorithms can also be contemplated when evaluating the transaction data and processing rate’s efficiency.

Acknowledgement: This paper has been supported by the RUDN University Strategic Academic Leadership Program.

Funding Statement: The authors received no specific funding for this study.

Conflicts of Interest: The authors declare that they have no conflicts of interest to report regarding the present study.

References

 1.  C. Perera, A. Zaslavsky, P. Christen and D. Georgakopoulos, “Sensing as a service model for smart cities supported by internet of things,” Transactions on Emerging Telecommunications Technologies, vol. 25, no. 1, pp. 81–93, 2014.

 2.  F. Jamil, L. Hang, K. H. Kim and D. H. Kim, “A novel medical blockchain model for drug supply chain integrity management in a smart hospital,” Electronics, vol. 8, no. 5, pp. 505, 2019.

 3.  P. W. Khan, Y. C. Byun and N. Park, “A data verification system for CCTV surveillance cameras using blockchain technology in smart cities,” Electronics, vol. 9, no. 3, pp. 484, 2020.

 4.  P. W. Khan and Y. C. Byun, “A blockchain-based secure image encryption scheme for the industrial internet of things,” Entropy, vol. 22, no. 2, pp. 175, 2020.

 5.  P. W. Khan, Y. C. Byun and N. Park, “IoT-blockchain enabled optimized provenance system for food industry 4.0 using advanced deep learning,” Sensors, vol. 20, no. 10, pp. 2990, 2020.

 6.  F. Jamil, S. Ahmad, N. Iqbal and D. H. Kim, “Towards a remote monitoring of patient vital signs based on IoT-based blockchain integrity management platforms in smart hospitals,” Sensors, vol. 8, no. 20, pp. 2195, 2020.

 7.  F. Jamil, M. A.Iqbal, R. Amin and D. H. Kim, “Adaptive thermal-aware routing protocol for wireless body area network,” Electronics, vol. 8, no. 1, pp. 47, 2019.

 8.  F. Jamil, N. Iqbal, S. Ahmad and D. H. Kim, “Toward accurate position estimation using learning to prediction algorithm in indoor navigation,” Sensors, vol. 20, no. 16, pp. 4410, 2020.

 9.  F. Jamil and D. H. Kim, “Improving accuracy of the alpha–beta filter algorithm using an ANN-based learning mechanism in indoor navigation system,” Sensors, vol. 19, no. 18, pp. 3946, 2019.

10. N. Iqbal, F. Jamil, S. Ahmad and D. H. Kim, “Toward effective planning and management using predictive analytics based on rental book data of academic libraries,” IEEE Access, vol. 8, pp. 81978–81996, 2020.

11. S. Ahmad, F. Jamil, N. Iqbal and D. H. Kim, “Optimal route recommendation for waste carrier vehicles for efficient waste collection: A step forward towards sustainable cities,” IEEE Access, vol. 8, pp. 77875–77887, 2020.

12. S. Ahmad, F. Jamil, A. Khudoyberdiev and D. H. Kim, “Accident risk prediction and avoidance in intelligent semi-autonomous vehicles based on road safety data and driver biological behaviours,” J. Intell. Fuzzy Syst, vol. 38, no. 4, pp. 4591–4601, 2020.

13. N. Iqbal, F. Jamil, S. Ahmad and D. H. Kim, “A novel blockchain-based integrity and reliable veterinary clinic information management system using predictive analytics for provisioning of quality health services,” IEEE Access, vol. 9, pp. 8069–8098, 2021.

14. F. Jamil, N. Iqbal, S. Ahmad and D. H. Kim, “Peer-to-peer energy trading mechanism based on blockchain and machine learning for sustainable electrical power supply in smart grid,” IEEE Access, vol. 9, pp. 39193–39217, 2021.

15. S. Ahmad, I. Ullah, F. Jamil and D. H. Kim, “Toward the optimal operation of hybrid renewable energy resources in microgrids,” Energies, vol. 13, no. 20, pp. 5482, 2020.

16. F. Jamil and D. H. Kim, “Enhanced kalman filter algorithm using fuzzy inference for improving position estimation in indoor navigation,” Journal of Intelligent & Fuzzy Systems, vol. 40, no. 5, pp. 1–15, 2021.

17. S. Ahmad, S. Malik, I. Ullah, D. H. Park, K. Kim et al., “Towards the design of a formal verification and evaluation tool of real-time tasks scheduling of IoT applications,” Sustainability, vol. 11, no. 1, pp. 204–226, 2019.

18. S. Ahmad, L. Hang and D. Kim, “Design and implementation of cloud-centric configuration repository for DIY IoT applications,” Sensors, vol. 18, no. 2, pp. 474–494, 2018.

19. S. Ahmad and D. Kim, “A multi-device multi-tasks management and orchestration architecture for the design of enterprise IoT applications,” Future Generation Computer Systems, vol. 106, pp. 482–500, 2020.

20. Y. Cao, S. Chen, P. Hou and D. Brown, “FAST: A fog computing assisted distributed analytics system to monitor fall for stroke mitigation,” in IEEE Int. Conf. on Networking, Architecture and Storage, Boston, MA, USA, pp. 2–11, 2015.

21. N. K. Suryadevara, S. C. Mukhopadhyay, R. Wang and R. K. Rayudu, “Forecasting the behavior of an elderly using wireless sensors data in a smart home,” Engineering Applications of Artificial Intelligence, vol. 26, no. 10, pp. 2641–2652, 2013.

22. Z. Xu, Y. Liu, J. Xuan, H. Chen and L. Mei, “Crowdsourcing based social media data analysis of urban emergency events,” Multimedia Tools and Applications, vol. 76, no. 9, pp. 11567–11584, 2017.

23. A. Mannini and A. M. Sabatini, “Machine learning methods for classifying human physical activity from on-body accelerometers,” Sensors, vol. 10, no. 2, pp. 1154–1175, 2010.

24. F. Sebastiani, “Machine learning in automated text categorization,” ACM Computing Surveys, vol. 34, no. 1, pp. 1–47, 2020.

25. M. Ozay, I. Esnaola, F. T. Y. Vural, S. R. Kulkarni and H. V. Poor, “Machine learning methods for attack detection in the smart grid,” IEEE Transactions on Neural Networks and Learning Systems, vol. 27, no. 8, pp. 1773–1786, 2015.

26. M. Abadi, P. Barham, J. Chen, Z. Chen, A. Davis et al., “Tensorflow: A system for large-scale machine learning,” in 12th USENIX Sym. on Operating Systems Design and Implementation, Savannah, GA, USA, pp. 265–283, 2016.

27. M. Elliott, F. Eck, E. Khmelev, A. Derlyatka and O. Fomenko, “Physical activity behavior change driven by engagement with an incentive-based app: Evaluating the impact of sweatcoin,” JMIR MHealth and UHealth, vol. 7, no. 7, pp. e12445, 2019.

28. S. Landset, T. M. Khoshgoftaar, A. N. Richter and T. Hasanin, “A survey of open source tools for machine learning with big data in the hadoop ecosystem,” Journal of Big Data, vol. 2, no. 1, pp. 1–36, 2015.

29. A. Derlyatka, O. Fomenko, F. Eck, E. Khmelev and M. T. Elliott, “Bright spots, physical activity investments that work: Sweatcoin: A steps generated virtual currency for sustained physical activity behaviour change,” British Journal of Sports Medicine, vol. 53, no. 18, pp. 1195–1196, 2019.

30. J. Anthony, “Run2play,” 2018. [Online]. Available: https://www.run2play.com/wp-content/uploads/2018/06/Run2Play_Whitepaper_June-12-2018.pdf.

31. M. Holt, “Movement app: Perfect app for active lifestyle,” 2017. [Online]. Available: https://icobench.com/ico/movement-app (accessed on 14 August 2020).

32. J. Štreit, “Truegym: Increasing workout effectivity,” 2016. [Online]. Available: https://truegym.io/wp-content/uploads/2018/08/True-Gym-Whitepaper-EN-v2.pdf.

33. D. Blankenship, “The hustle app: Promoting health, fitness and wellness,” 2018. [Online]. Available: https://www.hustletoken.org/read/HUSL-English-Whitepaper4.1.0e.pdf.

34. S. Rathore, B. W. Kwon and J. H. Park, “BlockSecIoTNet: Blockchain-based decentralized security architecture for IoT network,” Journal of Network and Computer Applications, vol. 143, pp. 167–177, 2019.

35. F. Jamil, H. K. Kahng, S. Kim and D. H. Kim. “Towards secure fitness framework based on IoT enabled blockchain network integrated with machine learning algorithms,” Sensors, vol. 21, no. 5, pp. 1640, 2021.

36. P. W. Khan and Y. C. Byun, “Smart contract centric inference engine for intelligent electric vehicle transportation system,” Sensors, vol. 20, no. 15, pp. 4252, 2020.

images
This work is licensed under a Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.