Security provisions in smart edge computing devices using blockchain and machine learning algorithms: a novel approach

It is difficult to manage massive amounts of data in an overlying environment with a single server. Therefore, it is necessary to comprehend the security provisions for erratic data in a dynamic environment. The authors are concerned about the security risk of vulnerable data in a Mobile Edge based distributive environment. As a result, edge computing appears to be an excellent perspective in which training can be done in an Edge-based environment. The combination of Edge computing and consensus approach of Blockchain in conjunction with machine learning techniques can further improve data security, mitigate the possibility of exposed data, and it reduces the risk of a data breach. As a result, the concept of federated learning provides a path for training the shared data. A dataset was collected that contained several vulnerable, exposed, recovered, and secured data and data security was precepted under the surveillance of two-factor authentication. This paper discusses the evolution of data and security flaws and their corresponding solutions in smart edge computing devices. The proposed model incorporates data security using consensus approach of Blockchain and machine learning techniques that include several classifiers and optimization techniques. Further, the authors applied the proposed algorithms in an edge computing environment by distributing several batches of data to different clients. As a result, the client privacy was maintained by using Blockchain servers. Furthermore, the authors segregated the client data into batches that were trained using the federated learning technique. The results obtained in this paper demonstrate the implementation of a Blockchain-based training model in an edge-based computing environment.


Introduction
The fourth major paradigm shift in modern computing is edge computing. It is processing data closer to the point where this is generated. With the digital revolution, it is now possible to reduce the latency of client-server architecture, particularly on a large scale. Edge computing is a distributed information technology architecture that processes client statistics at the network's edge. It is based on the idea that instead of bringing data closer to the computer, we bring the computer closer to the data. Edge computing relocates some storage and compute resources away from the central data center and closer to the data source. The three pillars of edge computing, namely autonomy, edge device security, and data sovereignty, are among its most significant advantages [1,2]. While the disadvantages of the edge computing could be summarized in its low redundancy, potential loss as well as data poisoning, longer outrage time. Mobile edge computing (MEC) devices are now widely used to solve artificial intelligence (AI) problems. Traditionally, AI requires a central server with powerful processing power for Machine Learning. This approach has several drawbacks, including communication overheads (CO) and data privacy issues (DPI) [3].
Federated learning is a machine learning technique that trains algorithms across multiple devices (edge/mobile) without exchanging or accumulating them in a single server [4]. Unlike traditional machine learning, which requires data sets to be brought to a single location, federated learning promotes trust in machine learning (ML) processes by keeping the data at the source and directing the model toward it [5]. Each device has its own set of local data ready to be trained on. In a single epoch, the weights are calculated and returned to the MEC. The MEC finetunes the model before sending it out for iteration [6,7]. This process is repeated until the desired level of accuracy is obtained. In the current Federated Learning system, users must trust the MEC system for model aggregation. What started out as a benefit may turn out to be a disadvantage. Figure 1 depicts the classical federated learning architecture.
The interconnection having Mobile Edge Computing (MEC) servers, aggregation and global data at one end and Internet of Things (IoT) devices, phones at other end are given in Fig. 1. It fosters the model training at local and global levels. While the model is being trained at some of the devices, it is simultaneously being tested at other devices. The model trained here is further improved at the global level with added noise and some improvements. This keeps the check and balance on the model accuracy. Further, it provides us with a faster and more accurate model. But along with the given advantages, it paves a way for high security risk of several attacks such as data poisoning attacks, susceptible data breaching attack, etc.
Blockchain aptly is a decentralized database. The transactions being managed by chain are the backbone of the technology. The blocks of data distributed are secured using the crypto-graphical methods. After a new block is merged into the chain, it is believed that the new block can interact the all the other blocks in the chain. Proof of Work (PoW) is one of the methods used for merging blocks by adding the hash function in the current block and then mines it. PoW provides a simple algorithm with a complete centralization as well as it procures a node free access. But along with the advantages, it is lucid that there is a waste of energy.
Transmission of learning parameters is highly vulnerable to attacks when travelling between nodes. The MEC server can be a single point of failure in an attack, and this model has scalability issues. Hence, a consensus approach of Blockchain based Federated Learning system may have following advantages over others [8,9]: Advantage 1 : It is using decentralized approach. Hence, it has the advantages in terms of security and privacy.
Advantage 2 : It does not allow a single point of failure attacks. Advantage 3 :It is highly scalable. The biggest reason for slowed progress is the unavailability of data.
Differential privacy (DP) is a technique that protects user privacy by adding random noise to the data. It requires the output of a query to be the same when a user is removed from the original dataset [10]. The disadvantage with the differential privacy is that the picking of outliers such as max, sum can alter the meaning of the data and can provide random inferences. Along with this, the addition of the noise must be done at every level of queries leading towards the data breaches.
In local differential privacy (LDP), the noise is added directly to the data by the individual data owners. In the global differential privacy (GDP), the noise is added by the complete dataset owner to the output of a query on the database [11]. Figure 2 defines a schematic representation of local differential privacy and global differential privacy in association to the mobile edge computing servers.
The contributions of this paper are as follows: i. Data security is established with susceptible data, recoverable data in an edge computing environment using two-level-architecture. ii. Proper security provisions for several breached data as well as susceptible data using differential privacy using data stored in blockchain based storage. iii. Addition of noise in the blocks of data securing anonymity of the data in the local differential privacy and further exaggerated in a global differential privacy. iv. Implementation of machine learning techniques for training the data from individual blocks with ensemble techniques procuring a locally asymptotic stability and further training the model in a federated edge-based environment for obtaining the global asymptotic stability of the data. v. Mitigate the risk of poisoning attack by segregating the data using consensus approach of blockchains. Further, differential privacy techniques are implemented in order to hinder the malicious user reaching out to the highly susceptible data.

Literature review
Throughout the spread of numerous IoT (Internet of Things) devices in the cloud environment, the authors' encountered challenges in meeting the low latency and high bandwidth requirements, creating a void for decentralized computing, this later evolved into edge computing.
Furthermore, edge computing depicts several security threat itineraries. Another issue arises when the central server goes offline for an extended period. In these circumstances, the best approach is to implement the consensus approach of Blockchain, which can be visualized as an actual chain of blocks that operates on the principle of decentralization. It is clear from this that machine learning models like deep learning, deep reinforcement learning, and reinforcement learning are difficult to adapt to IoT and Edge environments. This opens the door to a plethora of potential risks and is one of the most important areas for research enthusiasts. Edge Computing devices are vulnerable in terms of software and resources, allowing them to integrate with a variety of machine learning techniques.
This section will concentrate on several works that have been completed in the respective domain. Nowadays, Blockchain has been homogenized into IoT and cloud environments; Sharma et al. [12] proposed Software-Defined Network (SDN) architecture blended with Blockchain, which is divided into three layers. The first layer is the device layer, which collects data from the devices. The raw data was processed by the second layer, the fog layer, with the help of the SDN controller. Furthermore, the third layer contains all of the received processed data. As a result, they collected, classified, and analyzed the streaming data obtained from IoT. They reduced the cost of end-to-end delay by bringing computational resources to the edge of IoT devices using Pan et al. [13] proposed a work demonstrating the EdgeChain Cluster Computing framework for ensuring Blockchain collaboration in smart contracts. Edge devices collected data that IoT devices could access. Edge Chain's core concept is to combine Blockchains with a coin system, blend them under the IoT framework, and merge the resource pool of edge clouds. They proctored all transactions through Blockchains for security auditing and logging without overburdening the devices. Rahman et al. [14] proposed a Blockchain-based infrastructure that guarantees privacy and security-based spatial-temporal contract services. This infrastructure anchors several fog nodes at the host's edge and integrates them with computational intelligence methods. Further, they proposed a Mobile Edge Computing-based sharing economy system through the off-chain framework and Blockchain implementation to contain immutable ledgers.
Xu et al. [15] discussed how edge computing could meet low latency, high security, and data privacy requirements. With the channel of the short distance between the edge computing devices and the power terminals, low delay is ensured while collecting the gigantic data. They implemented a deep learning mechanism to enchant the real-time data flow using examples such as load balancing in the intelligent energy system, power prices predictions, and many more. The network architecture used through the itineraries of edge computing following the peculiarities of security proved to be much more effective than the cloud computing frameworks implemented beforehand. Still, the security of each node that arises in the edge computing framework makes it strenuous to adept in general use. Thus, to overcome this, they proposed a security architecture named as the physical layer security that involved only end-to-end users constrained by the limits of resources and energy. This paper effectuated many artificial intelligence prototypes for achieving the required efficiency and security under the chain of intelligent grids associated with edge computing.
It is significant to fortify the working of the critical infrastructural system in a society and its economy. The volume of data generated due to expanding IoT devices is turning out to be a hot topic in terms of scalability and security factors. Wu et al. [16] introduced the IoT/IIoT (Industrial Internet of Things) based critical infrastructure in industry 4.0. Moreover, it entered the Blockchain and edge computing paradigms in this reference. They also Cluster Computing worked on a blend of these paradigms and analyzed how they could enter the scalable and secure environment era. They also surveyed state of the art for scalability and security purposes.
One of the most arduous tasks is to provide security and privacy in the Internet of Things environment. Some of the limitations are solved with the introduction of Blockchain as a decentralized ledger. Pajooh et al. [17] presented the advancements of Hyper-ledger Fabric, which serves as a permission Blockchain for protecting edge computing devices in an environment of the locally employed process used in authentication. The proposed model also procured the traceability of data obtained from the IoT devices addressing scalability challenges. The paper encountered the execution of Hyper-ledger Fabric Blockchain framework desegregated with edge computing and the Internet of Things. Then they performed the tests on the VMware Virtual desktops and physical environmental setups such as Raspberry Pi devices. Apart from this, they secured the framework with multi-layered Blockchains with authentication protocols at IoT nodes of every cluster. The aftermath of this turned out to be a remarkable boost in the throughput of IoT applications.
The obstacle behind the popularised usage of edge computing was data storage security, which played an indispensable role in the evolution of intelligent computing. The authors in [18] proposed a mechanism in which they combined Blockchain with the regeneration coding to improve the reliability and security of the stored data through edge computing. They also built global layers of Blockchains in a cloud service. They also formulated local Blockchain at IoT terminals for another pool of verification. The residual nodes then selected the terminal and repaired them with regeneration coding resulting in the development of resources under the umbrella of edge computing.
Kuo et al. [19] further proposed ModelChain, which focuses on training medical health prediction framework. This allowed multiple institutions for the training in the environment of Blockchain using intelligent machine learning techniques and developed a framework for the prediction of medical health. Every site involved here fostered the estimation of model parameters. They applied transactional metadata and therefore integrated privacypreserved models using intelligent computing. Rathore et al. [20] proposed BlockDeepNet, a Blockchain-based Deep Learning model that enlightened the collaborative paradigm of IoT and Deep Learning techniques. They verified the compatibility and feasibility of object detection under the IoT archetype through experimental analysis. However, the proposed model portrayed the need for higher computational resources, and the implementation would be impotent in the low computational machines.
Ferran et al. [21] suggested a deep learning framework based upon BlockChain for the implementation under Smart Grid environment named DeepCoin. It achieved a very high throughput by applying a novel energy system associated with Byzantine fault tolerance. They used hash functions and short signatures using Blockchain technology. They prevented attacks on Smart Grids. Singh et al. [22] proposed a Deep Learning-based IoT-oriented framework under the store of a secure, secure smart city in the domain of Cyber-Physical systems and Software-Defined networking. Further, they compared their model with scalability and latency parameters and evaluated preexisting security and privacy. But, it still suffers from hindrances occurring due to the centralization of the workspace. He et al. [23] studied the implications of edge computing with IoT and the security issues. They proposed a general framework for edge computing based upon a Blockchain environment. Further, they designed a smart contract in the private Blockchain network to fathom the hindrances caused by resource allocation in edge computing, focusing on multiple service subscribers providing good efficiency. They displayed the amalgamation of Artificial Intelligence with the Blockchain. Also, they simulated their model to achieve the accuracy of resource allocation in Edge Computing.
Dai et al. [24] witnessed the implications of Edge empowered intelligent computing for medical prospects against COVID-19. They addressed concerns like the overcentralization of resources on the Internet of Medical Things and the hysteresis of digitalization in medical services, and hindrances in proper security over the medical data. They analyzed that the collaboration of the Internet of Medical things with Blockchain technologies can somehow elixir the severity of COVID-19. However, they had several challenges to overcome, such as the absence of context in this regard, latency, and privacy issues. They presented an architecture based upon the Edge Intelligence working on the sub-domain of Blockchain technologies at the Internet of Medical Things (IoMT) platform. After that, they monitored the initiation of the pandemic and traced the supply chain that must be broken down to hinder the spread of the pandemic virus.
Li et al. [25] integrated the Blockchain and Federated learning system (BCFL) framework. They provided an indepth survey of the framework and further discussed the insights of this new paradigm. They further studied the design of BCFL framework and discussed challenges and issues of this technology. Lastly, they discussed the applications of the framework. The researchers Nguyen et al. [26] presented the fundamental concept of Federated Learning and worked on the opportunities it opens for Mobile edge computing devices. They explored several topics such as incentive mechanisms, communication cost, resource distribution, security and privacy issues. They also surveyed the use of Blockchain based Federated Learning in the case of famous applications in an edge-based network environment which includes edge crowd sensing, edge content caching, and edge-based data sharing. Zhang et al. [27] proposed the architecture for sharing the data in autonomous vehicles in an edge-based environment. The architecture worked on the hybrid of permission-basedblockchain and federated learning systems using a local Directed Acyclic Graph (DAG). Moreover, they adopted Deep Reinforcement Learning (DRL) methods for selecting the significant nodes and further improving the effectiveness.

Problems with existing federated learning systems
The following are some of the fundamental problems with the existing federated learning system: Some of the existing solutions for above problems (Problem 1 to Problem 6 ) of federated learning system are as follow: Solution 1 : Poisoning attacks can be decreased by increasing the difficulty level of blockchain mining. Solution 2 : Using smart contracts to secure communication and message passing. Solution 3 : Differential Privacy approach to reduce the possibility of individual record identification.

Overview of the proposed approach
The current issues for Blockchain-based federated learning system are attacks like model poisoning and data privacy threats that can make the network vulnerable to outside attacks; there can be attempts to train a model using designed falsie data; and individual record identification; attempt to reconstruct training set from the generated gradient. Therefore, the following steps are needed: Step 1: Increasing the difficulty level of consensus approach based Blockchain mining to decrease poisoning attacks.
Step 2: Using smart contracts to secure communication and message passing.
Step 3: Differential privacy approach to reduce the possibility of individual record identification. Figure 3 represents the addition of noise and the corresponding relation between the raw value, noise, secure data, and queries to retrieve the information. This model propels the idea of data security after the addition of noise. To receive further improvements in existing solutions, the following actions may be implemented: Action 1: Identification of individual records and private raw data, since it is one of the most severe threats that almost defeats the purpose of Federated Learning. Action 2: Study of current solutions using differential privacy concerning local devices. Action 3: Performing experiments to compare the effectiveness of the new consensus approach based Blockchain federated learning architecture with differential privacy-dependent machine learning algorithms.

Proposed mathematical model
The variables used in mathematical model are presented and described in Table 1. This section aims to formulate a mathematical model regarding the data breaching dynamics under an Edge environment. The authors have provided an approach for minimizing the risk of a data breach in an Edge Computing environment. The proposed mathematical model consists of following hypothesis: H1: We formulate an emphasis on a security model with a random influx rate (B [ 0) and a general security breach rate (g 1 [ 0). H2: Exposed Data has undergone Username and Password-based authentication (b 1 [ 0). H3: Breaching of Username/Password authenticated data at a constant rate of (x [ 0). H4: The susceptible Data is breached through already breached data at a constant rate of (c [ 0). H5: Susceptible data are sent for the authentication at Username/Password-based authentication at a rate of d 1 . H6:: Transfer rate of sensitive data after Username/ Password authentication to secured data after implementing proper security protocols (d 2 [ 0). H7: Already breached data are sent to OTP-based authentication at a constant rate of (x 1 [ 0). H8: OTP authenticated data are secured at a constant rate of (w [ 0). H9: Breached data at level 1, i.e., Username/Password authentication level unable to get recovered at a rate of (g 2 [ 0). H10: Data Breached at level 2, i.e., OTP authentication was unable to get recovered at a constant rate of (g 3 [ 0).
Through the above hypothesis on data breaching at twotier securities, the authors have observed the following equations to be apt as per Fig. 4: Establishing different types of relationships amongst raw value, noise, secure datasets, and queries to retrieve information Cluster Computing

Positivity and boundedness of proposed model
The data and parameters associated with it are assumed to be non-negative. Thus, the rate of alteration in the security factor of the data can be given by: with Now, it can be deduced that whenever there is no security risk, then (F = J = R 2 = 0). Hence, dM dT ¼ B À g 1 M which defined the data size M having the storage of B g 1 as t ! 1.
It further defines the solution of (1) to lie in the g: Due to the positive invariant boundness of the solutions in the region defined by s, the problem is wellformed.

Security breach number (S 0 )
We will implement the next-generation matrix method to define the security breach number at the Level 2 OTPbased authentication. The security breach number is designated as the average number of security breaches at Level 2 authentication, i.e., One Time Password authentication, when data from one breached block enters another block with totally susceptible data. We denote this number as S 0 . We can calculate this using the spectral radius of the GW -1 matrix, which is the most significant absolute value of their Rate of a general security breach, i.e., other than authentication g 2 Rate of a security breach due to breach at Level 1, i.e., User Id/Password authentication g 3 Rate of a security breach due to breach at Level 2, i.e., OTP authentication b 1 Transfer rate of exposed data to susceptible data at Level 1, i.e., User ID/Password b 2 Transfer rate of exposed data to breached data C Per ineffective attack rate d 1 Transfer rate of suspected data to already breached Data d 2 Transfer rate of data from suspected block to another block where suspected data was secured x 1 Rate of transfer of breached data to Vulnerable data after positive security risk x 2 Transfer rate of breached data to recovered data W The recovery rate of breached data after OTP authentication security procedures Eigen values. This is lucidly formed through the linearization of the Eq. (1).
As per the principle of the next-generation matrix, we can deduce the security breach number as the spectral radius of the next generation matrix formed as GW -1 of the system of Eq. (1). Accordingly, Here, in this equation, g i is the rate of appearance of new security attacks in the block and w i is the rate of other transitions between blocks of (i) of and breached blocks, 8i 2 ½1; 5.
The matrix for G and W can be formed as follows: where T 0 ¼ B ; and, Hence Now, we know that W À1 ¼ AdjW W j j Therefore, we can say that our security breach number, as denoted by S 0, is Also, we can say that for the steady-state condition, our system of Eq. (9) becomes: Here, we have discussed the local stability of a risk-free equilibrium and the equilibrium of Security Provisions in Smart Edge Computing Devices with system given in Eq. 12 by scrutinizing the following characteristics equations.
Theorem 1 If S 0 \ 1, the risk-free equilibrium is locally asymptotically stable in the region s 0 for Security Provisions in Smart Edge Computing Devices using consensus approach of Block-chain and Machine Learning Algorithms, otherwise it is unstable.
Proof The Jacobian Matrix (12) formulates as This corresponding Eigen value of J DFE ðs 0 Þ are as follows: Cluster Computing Also, we can get the other three Eigen values through the equation of the cubic polynomial we have obtained. [25,26].
Thus, we can Therefore, by implementing the Routh-Hurwitz criterion, we can deduce that in the region if S 0 \1; J DFE ðs 0 Þ, then it is locally asymptotically stable.

Equilibrium for security provisions in smart edge computing devices using block-chain and ML algorithms
We can obtain the Equilibrium for Security Provisions in Smart Edge Computing Devices using Block-chain and Machine Learning Algorithms with s Ã T Ã ; F Ã ; R Ã 1 ; J Ã ; R Ã 2 ; S Ã À Á ; after solving Eq. (12) simultaneously. Thus, we get the following equations: Local stability of Equilibrium for Security Provisions in Smart Edge Computing Devices using consensus approach of Block-chain and Machine Learning Algorithms: Theorem 2 The Equilibrium for security breaches in a Smart Edge Computing Devices using consensus approach of Block-chain and Machine Learning Algorithms with is locally asymptotically stable when S 0 [ 1; otherwise, it is unstable.

Proof At the Equilibrium for Security Provisions in Smart Edge Computing Devices using Block-chain and Machine
Learning Algorithms with s Ã T Ã ; F Ã ; R Ã 1 ; J Ã ; R Ã 2 ; S Ã À Á , the variation matrix equation (12) becomes.
The corresponding Eigen values are: After solving the fourth-degree polynomial, we can generate the other Eigen values as Through this, we get, Thus, through Routh-Hurwitz criterion, if S 0 [ 1; then the equation for Security Provisions in Smart Edge Computing Devices using Block-chain and Machine Learning Algorithms is locally asymptotically stable. Theorem 1 asserts the risk-free equilibrium if S 0 \1 and Theorem 2 gives an assertion for the equilibrium in the cases of security breaches if S 0 [ 1 in accordance with the Routh Hurwitz criterion. The locally asymptotically stable conditions determine the stability of equilibrium formed in the local block of data stored for mobile edgebased device. The risk-free equilibrium demonstrates that the security is established under the conditions that S 0 \1 and the data must be secured in local edge-based device if the security breach number ðS 0 Þ is greater than 1. The globally asymptotic conditions determine the optimization of security criterion for several blocks forming a consensus approach based blockchain of secured data. The global asymptotic stability signifies that the device is secured under the data connection in a mobile edge based dynamic environment.

Algorithmic representation of proposed steps
In this paper, the algorithmic representation consists of two parts. The First algorithm will perform the classification using several classifiers and model them using metrics such as f1-score, accuracy. On the other hand, the second algorithm uses the federated learning techniques for implementing this model in an edge computing-based smart environment.
Classification is a procedure for labelling the data into distinguished classes. There are several classification models in machine learning, such as Ridge Classifier, XGB Classifier, Logistic Regression, KNN classifier, Decision Tree Classifier, Random Forest Classifier, etc. [28,29]. The authors implemented several standard classification models and found that the K-Neighbour Classification model is apt in terms of metrics such as accuracy and f1-score [30][31][32]. The K-Neighbour algorithm works by storing all the instances of the dataset that has been used in training using dimensional spaces. And using a simple majority approach from the neighbor nodes establishes the classification. Further, the authors considered several optimization algorithms such as S.G.D., Momentum S.G.D., Adam, and RMSprop for generating an optimized loss vs. epoch graph [33,34]. Furthermore, the researchers used a voting classifier to ensemble multiple classifiers for the dataset of several blocks [35,36].
Accuracy ¼ Precisionerror ¼ T P F P þ T P ð25Þ In Eqs. (19) to (26), 'F p R' represents the false-positive ratio, 'F N R' represents the false-negative ratio, 'T p R' represents the true-positive ratio, and 'T N R' represents the true-negative Ratio whereas, 'F P ' represents the number of false-positive cases, 'F N ' represents the number of falsenegative cases, 'T P ' represents the number of true-positive cases, and 'T N ' represents the number of true-negative cases [37,38]. The accuracy, specificity, precision error, and sensitivity values for providing security provisions in smart edge computing devices using consensus approach of blockchain and machine learning algorithms can be obtained using Eqs. (23), (24), (25), and (26) respectively. The algorithmic representation for classification of data blocks using machine learning techniques for providing the security provisions in smart edge computing devices is given in Fig. 5.
Then they share the data with the clients and form the data for the runtime testing under a federated learning technique [38][39][40]. A federated learning technique implements the training of the algorithms over several decentralized edge computing enabled devices containing the blocks of data connected over the Blockchain [41,42]. For the same, the authors implemented the steps given in Fig. 6 to obtain the aftermath in an edge computing-based environment for the security provisions.
The Algorithm 1 as shown in Fig. 5 implements several machine learning techniques on a single block of data and further approaches to determine a risk-free equilibrium for a locally asymptotically stabilized condition for a region s 0 defined by the block of data in an edge computing based mobile devices. The authors in this paper applied the simple training using naïve bayes classification and then improved the optimization using several models as per apt representation for the paper. The Algorithm 2 as shown in Fig. 6 henceforth processes the trained model using the methods proposed in Algorithm 1 for each block of data and hence performed a training using Multi-Layer Perceptron based model and obtained a risk-free equilibrium state in the total region defining the consensus approach based blockchain of data for globally asymptotically stabilized model.

Experiments and result analysis
In a dynamically changing non-linearity, the optimization of risk-free equilibrium can be achieved by solving the differential equations using machine learning in a supervised learning setup. In this paper, the authors considered the dataset having several features such as data vulnerabilities, data inconsistency for people of different ages, sex, location, etc. from various media portals namely press, print media, electronic media, television reports, radio coverage, and other social media such as Facebook, Twitter, LinkedIn, and Instagram. The dataset contains several vulnerable, exposed, recovered, and secured data. The labels were determined using the classification where the data displayed a risk-free equilibrium for locally asymptotic non-linear optimization when the security breach number S 0 is less than 1 i.e., S 0 \1 the data portraying the risk of security breaches when security breach number S 0 is greater than 1 i.e., S 0 [ 1 as per Theorems 1 and 2. Henceforth, minimization of S 0 results in mitigating the security risk in an edge based locally asymptotic regions. Thus, the optimization goal is to minimize S 0 with respect to increase in time.
In this part the authors procured the dataset and classified them using the Naïve Bayes classification method to determine the class probability based upon the observed attributes [43,44]. Further, the acquired data was normalized into the blocks of data with several chunks containing various severities. The re-sampling and approximation algorithms were applied on the blocks while

Algorithm_1 Classification_of_data_blocks_using_MLT( ) {
Step 1: Gather the dataset consisting of data having the risk of security attacks from several media sources such as social media, print, cloud, and edge.
Step 2: Generate the heatmap that represents the data correlation in a block of data using a classifier, Naïve Bayes classifier in this case, and further calculate its accuracy and F1 score by the data using Eq. 19-26.
Step 3: Feed the data from several blocks and resample them with several machine learning classification models.
Step 4: Select the model with the best score from the classification models used in step 3 using metrics such as accuracy, F1 score. Further, draw the ROC (Receiver Operating Characteristics) curve for the aftermaths obtained so far. Concerning this paper, we found that the K Neighbour classification model procured a score of 92%, which marks it better than all the models.
Step 5: Generate a report for precision, recall, f1-score, and support for several optimizers such as SGD (Stochastic Gradient Descent), Momentum SGD (Stochastic Gradient Descent), Adam, RMSprop (Root Mean Square propagation).
Step 6: Plot the loss vs. epoch graph and validation loss vs. epoch graph where loss denotes the loss of data because of a security breach in training data, validation loss represents the loss of data in a security risk for validation data, and epoch represents the years in this case.
Step 7: Use voting classifier and ensemble numerous classifier models to predict output for a model class and plot the same AUC curve securing the locally asymptotic stability.
Step 8: End of the algorithm. } Fig. 5 Algorithmic representation for classification of data blocks using machine learning techniques

Algorithm_2 Data_Security_enhancement_Algorithm( ) {
Step 1: Create the clients that return the clients' names mapped with the data shared amongst them.
Step 2: Generate the Batch Data, which takes the clients' data and creates objects with shared data and its labels.
Step 3: Process and separate the training data into batches for each client-other process and batch the data for the test set.
Step 4: Train the data using a simple Multi-Layer Perceptron and return the model obtained through it.
Step 5: Obtain the global accuracy and global loss across the edge devices from the model.
Step 6: End of the algorithm. } Fig. 6 Algorithmic representation for performing the data security in an edge-based environment Cluster Computing keeping a check on the target class [45,46]. Furthermore, the authors generated a heatmap using the dataset and observed the multiple features of the correlation matrix such as age, sex, cp, etc. Using the correlation matrix, the authors concluded that the Naïve Bayes classifier gave good results for the datasets. They observed aptly correct predictions for true labels tending towards 1.00, as presented in Fig. 7. The evaluation of a classification model is based upon the performance of metrics such as accuracy, precision, recall, F1 Score [47][48][49]. Thus, the authors find the accuracy and the F1 Score for the given classification. The accuracy score gives the fraction of correct predictions in the classification model [50,51]. The F1 Score shows the harmonic mean of precision and recall. In our model, we obtained an accuracy of 86% and an F1 score of 87%, as per Appendix 1. Through these scores, the authors concluded that the model is classified correctly [52][53][54].
The authors appended several models given in Appendix 2, such as K-Neighbours Classifier, Decision Tree Classifier, Random Forest Classifier, MLP Classifier, etc. [55][56][57]. Further, they feed the data from several susceptible and non-susceptible blocks and resample them following the appended machine learning classification models [58][59][60]. The best Score for each model was calculated and compared. According to the dataset, K Neighbours Classifier procured the best results [61,62]. The best Score for K Neighbours was found out to be 93.1% as mentioned in Fig. 8.
Further, the authors generated a receiver operating characteristics curve (ROC curve) plotting the true positive rate vs. the false positive rate for the classification models [63][64][65]. The comparison of the classifiers can perform concerning area under the curve (AUC) [66,67]. The performance of a classifier is directly proportional to the area under the curve in a ROC curve [68,69]. In Fig. 9, the AUC for several classifiers has been depicted and it can be observed that the AUC values for K-Neighbours Classifier is highest, i.e., 0.873. According to the ROC AUC, the second-best classifier for the dataset is the MLP Classifier.
The classification report provides an insight into the behavior of the classifier around the global accuracy masking the multi-class datasets [70][71][72]. The authors analyzed and compared the classification report for several optimization algorithms used in training, such as Stochastic Gradient Descend Optimizer, Momentum Optimizer, Adam Optimizer, and RMSprop Optimizer [73][74][75].
The Stochastic Gradient Descent (SGD) optimizer generates the gradient of the cost function concerning the training dataset [76][77][78]. The authors developed the The momentum optimizer boosts the acceleration of the Stochastic Gradient descend in a particular direction and further stifle the oscillation of the gradient [79][80][81]. The classification report for Momentum Optimizer is presented in Fig. 11 [82,83]. This optimizer suggests that class 0 has a precision of 0.76 and recall of 0.71, further giving an F1 Score of 0.73 with a support of 41 observations. Class 1 has a precision of 0.77 and a recall of 0.82, procuring an F1 Score of 0.80 with a support of 50 observations. The Adaptive Moment Estimation implements the adaptive learning rates for every variable. It works as an amalgamation of AdaGrad and Momentum Optimizers [84][85][86]. The classification report for Adam Optimizer for data used in this paper is presented in Fig. 12 [87,88]. This optimizer presents that class 0 has a precision of 0.74 and recall of 0.71, further giving an F1 Score of 0.72 with a support of 41 observations. Class 1 has a precision of 0.77 and a recall of 0.80, procuring an F1 Score of 0.78 with a support of 50 observations.  The Root Mean Squared Propagation (RMSprop) portrays itself to use the decaying average of partial gradients implemented with the adaptation of step size measured for every parameter [89,90]. The classification report for RMSprop Optimizer for data used in this paper is presented in Fig. 13 [91,92]. This optimizer presents that class 0 has a precision of 0.74 and recall of 0.71, further giving an F1 Score of 0.72 with a support of 41 observations. Class 1 has a precision of 0.77 and a recall of 0.80, procuring the F1 Score of 0.78 with a support of 50 observations. The authors in this paper plot graph for loss which signifies the security breach, vs. Epoch. As per Theorem 1, if the security of the locally asymptotic region decreases significantly with increase in time, then the security of that specific region s 0 defined by the local block of data stored in an edge-based system increases. This stabilizes the Cluster Computing equilibrium conditions of the risk-free state as mentioned in Theorem 1.This phenomenon illustrates time (in years) in x-axis and the minimization loss for the optimization function S 0 in y-axis for multiple optimizers as implemented in this paper [93,94]. Figure 14 bestows a graph that gives the inference that SGD optimizer performs poorly in this model [95]. In the case of momentum of SGD, RMSprop performs significantly well in minimizing the data loss [96,97]. The Adam Optimizer seems to be the best fit optimizer in this paper as we see that the time, the security breach is being minimized.
Then, the authors plot a graph in Fig. 15 between validation losses vs. Epoch, representing the possibility of security breach during the validation in terms of age (in years). The SGD optimizer gives us an insight that the model is under-fitting and needs some alteration in its parameters [98,99]. The Adam Optimizer and RMSprop hint at over-fitting as there is a significant difference between the training and validation losses [100,101]. The Momentum Optimizer gives better results for validation loss as the loss decreases concerning the time [102].The voting classifier implements the aggregation of different classifiers such as Random Forest Classifier, SVC (support vector classifier), Logistic Regression and predicts the class probability for the highest votes [103]. Thus, the authors implemented the ensemble classifier technique and aggregated the aftermaths procured from this model, as shown in Appendix 3 [104,105]. In many cases, the ensemble classifier works better than the best classifier [106].
The Area under the curve with true positive rate vs. false positive rate is plotted in Fig. 16 after the training of the voting classifier and found that the true positive rate is increasing better than individual classifiers [107]. This defined assertion for Theorem 1 which under the risk-free equilibrium of locally asymptotic stability confirms the secured atmosphere for batches of data. As per the optimization methods mentioned in Algorithm 1 depicted in Fig. 5, the ensemble classifier obtains a risk-free equilibrium condition in a locally asymptotic region. The aftermath for ensemble classifier is obtained with an area under curve (AUC) of 92%, which is better than K-Nearest Neighbour and all other classifiers implemented in this paper [108]. This result fostered the implementation of an Ensemble classifier in this model and minimized the security risk with several blocks of data [109].
This paper determines the goal of securing the data over several blocks of the edge-based atmosphere each having locally stable regions s 0 and henceforth generating the combined stability of the data in a fully-fledged global server as per Algorithm 2 mentioned in Fig. 6. This serves the functionality of risk-free equilibrium in a globally asymptotic stabilized region. The results procured in this paper assert the security provisions for edge-based model using intelligent machine learning techniques. The authors   in this paper secured an accuracy of 96% in the globally asymptotic regions. Table 2 describes the performance analysis of different edge-based algorithms synced with Blockchain and other technologies. Many algorithms worked for security in edge computing and Blockchain-based environment. These algorithms are compared on the metrics such as global accuracy, global loss, f1-score, and AUC curve. The proposed model using Edge Computing, consensus approach of Blockchain, and a voting classifier based on K-Neighbours, SVM, Random Forest, Logistic Regression lucidly performs better than the pre-existing algorithmic model. The authors shared the data blocks with several clients mapped with data shared amongst them. The data contained some vulnerable data, susceptible data as shown in Appendices 4 and 5. The influx of data with the clients is taken in the edge-based environment and henceforth trained using Multi-Layered Perceptron (Appendix 6). The global accuracy obtained using the following technique was observed as 96% with a worldwide loss of 1.51 as mentioned in Fig. 17, which gives a deduction that the model can efficiently minimize the risk of data leakage in an edge-based environment when the Data is shared amongst the clients in the form of blocks [110]. The consensus approach of Blockchain bolstered the security of the data in the edge-based environment.

Applications of proposed work
Edge Computing is a computing paradigm shift that paves the way for many modern computing applications. The theory associated with the proposed method can lead to several paths in the security of IoT, or widely used smart devices. As a result, we can say that the paper's applications are diverse and are given below: i. Banking is the first application that aptly defines the behaviour of mobile edge computing, because transactional data can be secured using consensus approach of blockchain and it allows for effective secured lines. ii. Medical wearables can be improved, and data poisoning can be reduced, allowing patient data to be secure and model training to improve in both local and global differential privacy. iii. The approaches used in this paper to build global and local model training frameworks can be obtained by an automated vehicle driving system. As a result, it will improve the driving experience in areas that have been trained for spatial models. iv. Gaming experiences based on cloud computing can be enhanced using the techniques provided, resulting in a secure and risk-free gaming environment. v. The advertisement sector can also benefit from having the noise parameters handy with the dataset in order to improve marketing strategies for specific products and secure their value in a global market. vi. The open networks provide several paths for security breaches. So, the anomaly detection can be performed while the network is sharing an application of the proposed model.

Conclusions
The authors used consensus approach of Blockchain and Machine Learning techniques to improve the security provisions in smart edge computing devices. The authors obtained the dataset, which contained susceptible data, exposed data, and recovered data etc. Further, the authors used several classification techniques, including Naïve Bayes, Random Forest, K-Neighbors, and SVM, and optimized with various optimizers, including SGD, Momentum SGD, RMSprop, and Adam. Furthermore, the authors combined these classifiers using ensemble classification techniques on several blocks of data and they obtained the best results using the ensemble classifier through these implementations. The AUC for the best classifier used in the model, the K-Neighbours Classifier, was 87% whereas the Ensemble classifier increased the accuracy to 92%. After training, the authors initiated the two-factor authentication process and assessed their vulnerability. Furthermore, the authors distributed the data in batches to several clients and carried out the federated learning in an intelligent Edge computing-based environment using a multilayered perceptron model. Finally, the proposed model was trained with a global accuracy of 96% and a global loss of 1.51. The authors used consensus approach of Blockchain to maintain a data flow channel and provided a comparative analysis of machine learning and differential privacy approaches for obtaining secure data while including noise and other datasets in the actual information. The results obtained in this paper have room for improvement by performing the experiments from both the client and server sides using distributed and global differential privacy. Further research could be conducted by comparing stateof-the-art machine learning models with dynamic programming dataset-based algorithms. Experimenting with distributed and global differential privacy can be done on both the client and server sides.