Submitted:
03 June 2024
Posted:
05 June 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
- Our work represents a significant contribution by seamlessly integrating techniques from distributed frameworks for AI, cyber-physical systems, and smart blockchain.
- We introduce a novel holistic model, CyberGuard AI, which stands out in its approach to resource allocation in edge/fog computing environments. Unlike existing models, CyberGuard AI takes advantage of the inherent properties of blockchain, such as immutability and decentralization, to establish a trustworthy and open network for monitoring and confirming edge/fog business transactions.
- CyberGuard AI incorporates Trust2Vec, a unique element not commonly found in existing approaches. This integration leverages support vectors to enhance the trust score predictions, thereby improving the decision-making process for resource allocation.
- Our study goes beyond traditional resource allocation methods by employing machine learning approaches for dynamic and efficient resource management. By utilizing massive volumes of data from edge/fog devices, our model adapts to new information and requirements, making the most effective use of available computing power, network bandwidth, and storage space.
- The ensemble model, enhances resource allocation predictions by combining results from multiple machine learning algorithms, including Support Vector Machines (SVM), K-Nearest Neighbors (KNN), and Random Forests. This ensures a more robust and reliable estimation of trust security danger compared to single-model approaches.
- We provide a thorough performance evaluation of our proposed model through rigorous case studies and simulations. The results showcase the efficacy and viability of our approach in various real-world circumstances, demonstrating its superiority in resource allocation within edge/fog computing environments.
2. Related Work
2.1. Blockchain Integration for Trust-Based Resource Allocation
2.2. Machine Learning-Driven Resource Optimization
| Reference | Technique | Outcome |
| [1] | RL, Blockchain | Introduces a trust mechanism using RL and blockchain to address selfish edge attacks in MEC. |
| [2] | Privacy-Preserving Blockchain with Edge Computing | Presents TrustChain, a privacy-preserving blockchain, integrating with edge computing for enhanced trust. |
| [8] | Decentralized blockchain platform for cooperative edge computing | Introduces CoopEdge, a blockchain-based platform for collaborative edge computing. |
| [9] | Survey | Provides a comprehensive survey on orchestration techniques in fog computing. |
| [12] | Blockchain-based banking | Investigates blockchain-based banking solutions. |
| [13] | Blockchain-based resource allocation model in fog computing | Proposes a resource allocation model using blockchain in fog computing. |
| [20] | Federated Learning, Blockchain | investigates the potential and pitfalls of integrating federated learning with blockchain in edge computin. |
| [21] | Blockchain-Based Applications and the Rise of Machine Learning | problems and opportunities for implementing machine learning in blockchain-based smart applications. |
3. Methodology
3.1. Dataset Description
| Feature | Description |
|---|---|
| Device ID | A unique identifier for each edge/fog computing device. |
| Timestamp | The timestamp indicating the date and time of data collection. |
| CPU Usage | The percentage of CPU utilization by the computing device at the given timestamp. |
| Memory Usage | The percentage of memory (RAM) utilization by the computing device at the given timestamp. |
| Network Bandwidth | How many megabits per second (Mbps) were being used by the network at that precise moment in time. |
| Data Locality | A categorical feature indicating the locality of the data processed by the device (e.g., Local, Nearby, Remote). |
| Latency | The latency in milliseconds (ms) for data transmission or processing at the given timestamp. |
| Energy Consumption | The energy consumption in watts (W) by the computing device at the given timestamp. |
| Resource Allocation Decision | A binary feature representing the resource allocation decision (1 for successful allocation, 0 for unsuccessful). |
| Trust Score | A numerical score representing the trustworthiness of the computing device in the network. |
| Block chain Validation Status | A categorical feature indicating the status of block chain validation for the device (e.g., Valid, Invalid). |
| Fog Node Type | A categorical feature indicating the type of fog node (e.g., Fog, Edge) where the device is located. |
| Temperature | The local temperature measured in degrees Celsius where the computer is being used. |
| Humidity | The relative humidity percentage (%) at the location of the computing device. |
| Security Threat Level | A scale from low to high that indicates how secure the edge/fog computing environment is. |
3.2. Data Pre-Processing
3.3. Feature Engineering
3.4. Machine Learning Models
3.4.1. Support Vector Machine (SVM)
- Given a training dataset , where xi is the feature vector and yi is the corresponding class label (-1 or +1).
- Identify the optimum weight the hyperplane that splits the data points into classes and optimizes the margin can be defined by the vector w and the bias term b.
- The objective function is to minimize (to maximize the margin) subject to the constraint for all data points .
- The slack variables are introduced to handle misclassifications, and the C parameter controls the trade-off between maximizing the margin and minimizing the misclassifications.
3.4.2. K-Nearest Neighbours
- As an illustration, consider dataset D, where x stands for a device and y for a type of security risk.
- Calculate the distance between the data points x and d in dataset D using the preferred distance metric.
- Select the K data points that are closest to x as your K nearest neighbors.
- Assign y to x after classifying it as a member of the same group as the majority of its K closest neighbors.
- The optimal way to assign y to x in a regression is to use the mean of the y values of the K nearest neighbors.
3.4.3. Random Forests
- To clarify, we will refer to the "training dataset" as "D," the "input sample" as "x," and the "output class" as "y".
- For each class label c in D, calculate the posterior probability P(y=c|x) using Bayes' theorem and the naive assumption.
- Select the class label c with the highest posterior probability P(y=c|x) as the predicted class for the input sample.
3.4.4. CyberGuard Model
- As an illustration, consider dataset D, where x stands for a device and y for a type of security risk.
- In Cyber Guard, use Grid SearchCV to do hyper parameter tuning to ascertain the ideal values for each algorithm's base model (SVM, KNN, and RF).
- It is recommended to hyperparameter-tune each base model and then train it on dataset D.
- For a given input sample x, the level of security risk is predicted by each base model separately.
- CyberGuard combines the predictions of all base models using voting='hard'.
| Algorithm 1 Mathematical Algorithm for CyberGuard |
|
4. Results and Discussion
4.1. SVM Performance
4.2. KNN Performance
4.3. Random Forests Performance
4.4. CyberGuard Model Performance
4.5. Comparative Performance
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- L. Xiao et al., “A Reinforcement Learning and Blockchain-Based Trust Mechanism for Edge Networks,” IEEE Trans. Commun., vol. 68, no. 9, pp. 5460–5470, 2020. [CrossRef]
- U. Jayasinghe, G. M. Lee, Á. MacDermott, W. S. Rhee, and K. Elgazzar, “TrustChain: A Privacy Preserving Blockchain with Edge Computing,” Wirel. Commun. Mob. Comput., vol. 2019, 2019. [CrossRef]
- Z. Wang and Q. Hu, “Blockchain-based Federated Learning: A Comprehensive Survey,” pp. 1–18, 2021, [Online]. Available: http://arxiv.org/abs/2110.02182.
- E. Moore, A. Imteaj, S. Rezapour, and M. H. Amini, “A Survey on Secure and Private Federated Learning Using Blockchain: Theory and Application in Resource-constrained Computing,” pp. 1–12, 2023, [Online]. Available: http://arxiv.org/abs/2303.13727.
- J. Galvão, J. Sousa, J. Machado, J. Mendonça, T. Machado, and P. V. Silva, “Mechanical design in industry 4.0: Development of a handling system using a modular approach,” Lect. Notes Electr. Eng., vol. 505, no. 3, pp. 508–514, 2019. [CrossRef]
- Z. Rejiba, X. Masip-Bruin, and E. Marín-Tordera, “A survey on mobility-induced service migration in the fog, edge, and related computing paradigms,” ACM Comput. Surv., vol. 52, no. 5, 2019. [CrossRef]
- B. Qian et al., “Orchestrating the Development Lifecycle of Machine Learning-based IoT Applications: A Taxonomy and Survey,” ACM Comput. Surv., vol. 53, no. 4, 2020. [CrossRef]
- L. Yuan et al., “CoopEdge: A decentralized blockchain-based platform for cooperative edge computing,” Web Conf. 2021 - Proc. World Wide Web Conf. WWW 2021, pp. 2245–2257, 2021. [CrossRef]
- B. Costa, J. Bachiega, L. R. De Carvalho, and A. P. F. Araujo, “Orchestration in Fog Computing: A Comprehensive Survey,” ACM Comput. Surv., vol. 55, no. 2, 2023. [CrossRef]
- L. Fotia, F. Delicato, and G. Fortino, “Trust in Edge-based Internet of Things Architectures: State of the Art and Research Challenges,” ACM Comput. Surv., vol. 55, no. 9, 2023. [CrossRef]
- U. Ahmed, J. C.-W. Lin, and G. Srivastava, “Exploring the Potential of Cyber Manufacturing Systems in the Digital Age,” ACM Trans. Internet Technol., 2023. [CrossRef]
- D. Jayasuriya Daluwathumullagamage and A. Sims, “Fantastic Beasts: Blockchain Based Banking,” J. Risk Financ. Manag., vol. 14, no. 4, p. 170, 2021. [CrossRef]
- H. Wang, L. Wang, Z. Zhou, X. Tao, G. Pau, and F. Arena, “Blockchain-based resource allocation model in fog computing,” Appl. Sci., vol. 9, no. 24, 2019. [CrossRef]
- Y. Li, Y. Bao, and W. Chen, “Domain Adaptation Transduction: An Algorithm for Autonomous Training with Applications to Activity Recognition Using Wearable Devices,” Proc. - IEEE 2018 Int. Congr. Cybermatics 2018 IEEE Conf. Internet Things, Green Comput. Commun. Cyber, Phys. Soc. Comput. Smart Data, Blockchain, Comput. Inf. Technol. iThings/Gree, pp. 1821–1828, 2018. [CrossRef]
- W. Li, J. Wu, J. Cao, N. Chen, Q. Zhang, and R. Buyya, Blockchain-based trust management in cloud computing systems: a taxonomy, review and future directions, vol. 10, no. 1. Journal of Cloud Computing, 2021. [CrossRef]
- Y. Wang, H. Zen, M. F. M. Sabri, X. Wang, and L. C. Kho, “Towards Strengthening the Resilience of IoV Networks—A Trust Management Perspective,” Futur. Internet, vol. 14, no. 7, pp. 1–21, 2022. [CrossRef]
- P. Kochovski, S. Gec, V. Stankovski, M. Bajec, and P. D. Drobintsev, “Trust management in a blockchain based fog computing platform with trustless smart oracles,” Futur. Gener. Comput. Syst., vol. 101, pp. 747–759, 2019. [CrossRef]
- W. Zhang, Z. Wu, G. Han, Y. Feng, and L. Shu, “LDC: A lightweight dada consensus algorithm based on the blockchain for the industrial Internet of Things for smart city applications,” Futur. Gener. Comput. Syst., vol. 108, pp. 574–582, 2020. [CrossRef]
- M. A. Ferrag, M. Derdour, M. Mukherjee, A. Derhab, L. Maglaras, and H. Janicke, “Blockchain technologies for the internet of things: Research issues and challenges,” IEEE Internet Things J., vol. 6, no. 2, pp. 2188–2204, 2019. [CrossRef]
- D. C. Nguyen et al., “Federated Learning Meets Blockchain in Edge Computing: Opportunities and Challenges,” IEEE Internet Things J., vol. 8, no. 16, pp. 12806–12825, 2021. [CrossRef]
- S. Tanwar, Q. Bhatia, P. Patel, A. Kumari, P. K. Singh, and W. C. Hong, “Machine Learning Adoption in Blockchain-Based Smart Applications: The Challenges, and a Way Forward,” IEEE Access, vol. 8, no. April, pp. 474–448, 2020. [CrossRef]
- A. Yahyaoui, T. Abdellatif, S. Yangui, and R. Attia, “READ-IoT: Reliable Event and Anomaly Detection Framework for the Internet of Things,” IEEE Access, vol. 9, pp. 24168–24186, 2021. [CrossRef]
- M. I. Khaleel and M. M. Zhu, Adaptive virtual machine migration based on performance-to-power ratio in fog-enabled cloud data centers, vol. 77, no. 10. Springer US, 2021.
- Y. Zhu, W. Zhang, Y. Chen, and H. Gao, “A novel approach to workload prediction using attention-based LSTM encoder-decoder network in cloud environment,” Eurasip J. Wirel. Commun. Netw., vol. 18, no. 1, 2019. [CrossRef]
- S. Velu, O. Mohan, M. Kumar, “Energy-Efficient Task Scheduling and Resource Allocation for Improving the Performance of a Cloud–Fog Environment,” Symmetry, vol. 14, no. 11, 2022. [CrossRef]
























| Model | Accuracy | Precision | Recall | F1-Score |
| SVM | 0.8200 | 0.9182 | 0.9091 | 0.8963 |
| KNN | 0.9455 | 0.9483 | 0.9455 | 0.9464 |
| Random Forests | 0.5636 | 0.7300 | 0.5636 | 0.6325 |
| CyberGuard | 0.9818 | 0.9822 | 0.9818 | 0.9814 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).