Situ-Oracle: A Learning-Based Situation Analysis Framework for Blockchain-Based IoT Systems †
Abstract
:1. Introduction
- Given the temporal nature of sensory sequences, we developed Recurrent Neural Network (RNN)-based learning models grounded in the theoretical framework of the Situ model [7,8,9]. This work is the first to offer a detailed formulation and design of three major RNN architectures—Vanilla RNN, Long Short-Term Memory (LSTM), and Gated Recurrent Units (GRUs)—specifically within the context of the Situ framework. We then evaluated and compared these models against several non-learning-based models using an ADL dataset collected from human participants. Our aim is to demonstrate that learning-based approaches are both essential and necessary for achieving situation awareness.
- We propose a novel framework, “Situ-Oracle”, that leverages a computation oracle component [10] in the blockchain ecosystem to provide situation analysis as a service to the BIoT infrastructure. Specifically, we detail the design of the computation oracle node and describe the process of training and deploying RNN-based models for situation prediction within the blockchain network.
- Additionally, we highlight the design of two smart contracts, named Context and Situ. Unlike traditional contract designs, which often utilize threshold-based actuation logic or on-chain machine learning algorithms, these contracts are specifically designed to function as intermediary communication channels between IoT devices and the computational oracle node. This innovative approach aims to mitigate issues related to network consumption and costs.
- We conduct an in-depth analysis of two pre-existing BIoT system architectures, which aim to integrate Artificial Intelligence (AI) and Machine Learning (ML) methods into BIoT systems. This paper details the design and implementation and utilizes them as baseline systems for assessing the feasibility and potential limitations inherent in integrating AI/ML with BIoT systems.
- We evaluate our proposed framework with the baseline systems, examining them from various aspects, such as the accuracy of situation prediction, resource consumption, system throughput, and the latency encountered in service updates. The experimentation setup for our study is grounded in a private blockchain network, which operates using a Proof-of-Authority (PoA) consensus protocol on a collection of physical devices, i.e., Raspberry Pi (RPi) single-chip computers, to demonstrate the effectiveness and applicability of our framework.
2. Related Works
2.1. BIoT: Integration of Blockchain and IoT Systems
2.2. Integration of AI/ML and BIoT Systems
2.3. Situation Awareness and Situ Framework
3. Preliminaries
3.1. System Model
3.2. Baseline-1: Situ-Aware BIoT Based on On-Chain Smart Contracts
Algorithm 1: NB-based-Situ-Training Contract |
Algorithm 2: NB-based-Situ-Prediction Contract |
3.3. Baseline-2: Situ-Aware BIoT Based on Off-Chain Model at Each Authority
Algorithm 3: Off-chain-based Situ Contract |
4. Proposed Framework: Situ-Oracle
4.1. Overview of the Framework
4.2. Situ-Analysis Model Formulation
4.3. Situ-Analysis as a Service to BIoT Systems
4.3.1. Blockchain Network and Smart Contracts
Algorithm 4: Context Contract |
Algorithm 5: Situ Contract |
4.3.2. The Oracle Node
Algorithm 6: Oracle Operation Routine |
4.3.3. Overview of the System Workflow
5. Experiments and Evaluations
5.1. The SIMADL Dataset
- A smart house consists of one bedroom, one living room, one bathroom, one kitchen, and one in-home office.
- A total of 29 sensors were deployed. Each sensor has two states, on (1) and off (0), and two types, passive and active. Passive sensors operate without direct interaction from the participant and automatically respond to the participant’s movements and position. Active sensors require actions from the participant to alter their state, such as opening a door or switching on a light.
- The user intentions incorporated into this dataset include sleep, eating, personal, work, leisure, and others.
- The SIMADL aggregated dataset for each individual participant, each simulated over varying durations, such as 1 or 2 months, with time margins of 0, 5, or 10 min.
5.2. Testbed Configurations
5.3. Situ-Analysis Model Evaluations
5.4. System Performance Evaluations
6. Conclusions and Future Works
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Hou, K.M.; Diao, X.; Shi, H.; Ding, H.; Zhou, H.; de Vaulx, C. Trends and Challenges in AIoT/IIoT/IoT Implementation. Sensors 2023, 23, 5074. [Google Scholar] [CrossRef]
- Kim, D.; Bian, H.; Chang, C.K.; Dong, L.; Margrett, J. In-Home Monitoring Technology for Aging in Place: Scoping Review. Interact. J. Med. Res. 2022, 11, e39005. [Google Scholar] [CrossRef] [PubMed]
- Munir, A.; Aved, A.; Blasch, E. Situational Awareness: Techniques, Challenges, and Prospects. AI 2022, 3, 55–77. [Google Scholar] [CrossRef]
- Karie, N.M.; Sahri, N.M.; Yang, W.; Valli, C.; Kebande, V.R. A Review of Security Standards and Frameworks for IoT-Based Smart Environments. IEEE Access 2021, 9, 121975–121995. [Google Scholar] [CrossRef]
- Buterin, V. A Next Generation Smart Contract & Decentralized Application Platform. Available online: https://finpedia.vn/wp-content/uploads/2022/02/Ethereum_white_paper-a_next_generation_smart_contract_and_decentralized_application_platform-vitalik-buterin.pdf (accessed on 18 May 2024).
- Ngwira, L.; Merlec, M.M.; Lee, Y.K.; In, H.P. Towards Context-Aware Smart Contracts for Blockchain IoT Systems. In Proceedings of the 2021 International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Republic of Korea, 20–22 October 2021; pp. 82–87. [Google Scholar] [CrossRef]
- Chang, C.K.; Jiang, H.y.; Ming, H.; Oyama, K. Situ: A Situation-Theoretic Approach to Context-Aware Service Evolution. IEEE Trans. Serv. Comput. 2009, 2, 261–275. [Google Scholar] [CrossRef]
- Chang, C.K. Situation Analytics: A Foundation for a New Software Engineering Paradigm. Computer 2016, 49, 24–33. [Google Scholar] [CrossRef]
- Chang, C.K. Situation Analytics-at the Dawn of a New Software Engineering Paradigm. Sci. China Inf. Sci. 2018, 61, 050101. [Google Scholar] [CrossRef]
- Antonopoulos, A.M.; Wood, G. Mastering Ethereum: Building Smart Contracts and Dapps; O’reilly Media: Sebastopol, CA, USA, 2018. [Google Scholar]
- Bian, H.; Zhang, W.; Chang, C.K. Situ-Oracle: A Learning-Based Situation Analysis Servicing Framework for BIoT Systems. In Proceedings of the 2023 IEEE International Conference on Software Services Engineering (SSE), Chicago, IL, USA, 2–8 July 2023; pp. 159–169. [Google Scholar] [CrossRef]
- Hao, X.; Ren, W.; Fei, Y.; Zhu, T.; Choo, K.K.R. A Blockchain-Based Cross-Domain and Autonomous Access Control Scheme for Internet of Things. IEEE Trans. Serv. Comput. 2023, 16, 773–786. [Google Scholar] [CrossRef]
- Liu, Y.; Zhang, C.; Yan, Y.; Zhou, X.; Tian, Z.; Zhang, J. A Semi-Centralized Trust Management Model Based on Blockchain for Data Exchange in IoT System. IEEE Trans. Serv. Comput. 2023, 16, 858–871. [Google Scholar] [CrossRef]
- Yin, J.; Xiao, Y.; Pei, Q.; Ju, Y.; Liu, L.; Xiao, M.; Wu, C. SmartDID: A Novel Privacy-Preserving Identity Based on Blockchain for IoT. IEEE Internet Things J. 2023, 10, 6718–6732. [Google Scholar] [CrossRef]
- Wu, T.; Wang, W.; Zhang, C.; Zhang, W.; Zhu, L.; Gai, K.; Wang, H. Blockchain-Based Anonymous Data Sharing with Accountability for Internet of Things. IEEE Internet Things J. 2023, 10, 5461–5475. [Google Scholar] [CrossRef]
- Putra, G.D.; Dedeoglu, V.; Kanhere, S.S.; Jurdak, R. Privacy-Preserving Trust Management for Blockchain-based Resource Sharing in 6G-IoT. In Proceedings of the 2023 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Dubai, United Arab Emirates, 1–5 May 2023; pp. 1–9. [Google Scholar] [CrossRef]
- Yazdinejad, A.; Dehghantanha, A.; Parizi, R.M.; Srivastava, G.; Karimipour, H. Secure Intelligent Fuzzy Blockchain Framework: Effective Threat Detection in IoT Networks. Comput. Ind. 2023, 144, 103801. [Google Scholar] [CrossRef]
- Rabieinejad, E.; Yazdinejad, A.; Parizi, R.M.; Dehghantanha, A. Generative Adversarial Networks for Cyber Threat Hunting in Ethereum Blockchain. Distrib. Ledger Technol. Res. Pract. 2023, 2, 1–19. [Google Scholar] [CrossRef]
- Sanghami, S.V.; Lee, J.J.; Hu, Q. Machine-Learning-Enhanced Blockchain Consensus with Transaction Prioritization for Smart Cities. IEEE Internet Things J. 2023, 10, 6661–6672. [Google Scholar] [CrossRef]
- Lu, Y.; Tang, X.; Liu, L.; Yu, F.R.; Dustdar, S. Speeding at the Edge: An Efficient and Secure Redactable Blockchain for IoT-Based Smart Grid Systems. IEEE Internet Things J. 2023, 10, 12886–12897. [Google Scholar] [CrossRef]
- Lin, X.; Wu, J.; Bashir, A.K.; Li, J.; Yang, W.; Piran, M.J. Blockchain-Based Incentive Energy-Knowledge Trading in IoT: Joint Power Transfer and AI Design. IEEE Internet Things J. 2022, 9, 14685–14698. [Google Scholar] [CrossRef]
- Islam, M.J.; Rahman, A.; Kabir, S.; Karim, M.R.; Acharjee, U.K.; Nasir, M.K.; Band, S.S.; Sookhak, M.; Wu, S. Blockchain-SDN-Based Energy-Aware and Distributed Secure Architecture for IoT in Smart Cities. IEEE Internet Things J. 2022, 9, 3850–3864. [Google Scholar] [CrossRef]
- Khan, A.U.R.; Ahmad, R.W. A Blockchain-Based IoT-Enabled E-Waste Tracking and Tracing System for Smart Cities. IEEE Access 2022, 10, 86256–86269. [Google Scholar] [CrossRef]
- Dharma Putra, G.; Kang, C.; Kanhere, S.S.; Won-Ki Hong, J. DeTRM: Decentralised Trust and Reputation Management for Blockchain-based Supply Chains. In Proceedings of the 2022 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Shanghai, China, 2–5 May 2022; pp. 1–5. [Google Scholar] [CrossRef]
- Yang, Q.; Wang, H. Privacy-Preserving Transactive Energy Management for IoT-Aided Smart Homes via Blockchain. IEEE Internet Things J. 2021, 8, 11463–11475. [Google Scholar] [CrossRef]
- Qashlan, A.; Nanda, P.; He, X.; Mohanty, M. Privacy-Preserving Mechanism in Smart Home Using Blockchain. IEEE Access 2021, 9, 103651–103669. [Google Scholar] [CrossRef]
- Rahman, A.; Nasir, M.K.; Rahman, Z.; Mosavi, A.S.S.; Minaei-Bidgoli, B. DistBlockBuilding: A Distributed Blockchain-Based SDN-IoT Network for Smart Building Management. IEEE Access 2020, 8, 140008–140018. [Google Scholar] [CrossRef]
- Fan, M.; Zhang, X. Consortium Blockchain Based Data Aggregation and Regulation Mechanism for Smart Grid. IEEE Access 2019, 7, 35929–35940. [Google Scholar] [CrossRef]
- Yazdinejad, A.; Dehghantanha, A.; Parizi, R.M.; Hammoudeh, M.; Karimipour, H.; Srivastava, G. Block Hunter: Federated Learning for Cyber Threat Hunting in Blockchain-Based IIoT Networks. IEEE Trans. Ind. Inform. 2022, 18, 8356–8366. [Google Scholar] [CrossRef]
- Gai, K.; Tang, H.; Li, G.; Xie, T.; Wang, S.; Zhu, L.; Choo, K.K.R. Blockchain-Based Privacy-Preserving Positioning Data Sharing for IoT-Enabled Maritime Transportation Systems. IEEE Trans. Intell. Transp. Syst. 2022, 24, 2344–2358. [Google Scholar] [CrossRef]
- Cui, J.; Ouyang, F.; Ying, Z.; Wei, L.; Zhong, H. Secure and Efficient Data Sharing among Vehicles Based on Consortium Blockchain. IEEE Trans. Intell. Transp. Syst. 2022, 23, 8857–8867. [Google Scholar] [CrossRef]
- Ahmed, A.; Abdullah, S.; Iftikhar, S.; Ahmad, I.; Ajmal, S.; Hussain, Q. A Novel Blockchain Based Secured and QoS Aware IoT Vehicular Network in Edge Cloud Computing. IEEE Access 2022, 10, 77707–77722. [Google Scholar] [CrossRef]
- Sharma, P.K.; Kumar, N.; Park, J.H. Blockchain-Based Distributed Framework for Automotive Industry in a Smart City. IEEE Trans. Ind. Inform. 2019, 15, 4197–4205. [Google Scholar] [CrossRef]
- Ren, B.; Yang, L.T.; Zhang, Q.; Feng, J.; Nie, X. Blockchain-Powered Tensor Meta-Learning-Driven Intelligent Healthcare System With IoT Assistance. IEEE Trans. Netw. Sci. Eng. 2023, 10, 2503–2513. [Google Scholar] [CrossRef]
- Li, J.; Li, D.; Zhang, X. A Secure Blockchain-Assisted Access Control Scheme for Smart Healthcare System in Fog Computing. IEEE Internet Things J. 2023, 10, 15980–15989. [Google Scholar] [CrossRef]
- Wang, Y.; Zhang, A.; Zhang, P.; Qu, Y.; Yu, S. Security-Aware and Privacy-Preserving Personal Health Record Sharing Using Consortium Blockchain. IEEE Internet Things J. 2022, 9, 12014–12028. [Google Scholar] [CrossRef]
- Bataineh, M.R.; Mardini, W.; Khamayseh, Y.M.; Yassein, M.M.B. Novel and Secure Blockchain Framework for Health Applications in IoT. IEEE Access 2022, 10, 14914–14926. [Google Scholar] [CrossRef]
- Nguyen, D.C.; Pathirana, P.N.; Ding, M.; Seneviratne, A. A Cooperative Architecture of Data Offloading and Sharing for Smart Healthcare with Blockchain. In Proceedings of the 2021 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Sydney, Australia, 3–6 May 2021; pp. 1–8. [Google Scholar] [CrossRef]
- Zhao, Y.; Qu, Y.; Xiang, Y.; Zhang, Y.; Gao, L. A Lightweight Model-Based Evolutionary Consensus Protocol in Blockchain as a Service for IoT. IEEE Trans. Serv. Comput. 2023, 16, 2343–2358. [Google Scholar] [CrossRef]
- Gadiraju, D.S.; Lalitha, V.; Aggarwal, V. An Optimization Framework Based on Deep Reinforcement Learning Approaches for Prism Blockchain. IEEE Trans. Serv. Comput. 2023, 16, 2451–2461. [Google Scholar] [CrossRef]
- Wang, C.; Jiang, C.; Wang, J.; Shen, S.; Guo, S.; Zhang, P. Blockchain-Aided Network Resource Orchestration in Intelligent Internet of Things. IEEE Internet Things J. 2023, 10, 6151–6163. [Google Scholar] [CrossRef]
- Badruddoja, S.; Dantu, R.; He, Y.; Upadhayay, K.; Thompson, M. Making Smart Contracts Smarter. In Proceedings of the 2021 IEEE International Conference on Blockchain and Cryptocurrency (ICBC), Sydney, Australia, 3–6 May 2021; pp. 1–3. [Google Scholar] [CrossRef]
- Badruddoja, S.; Dantu, R.; He, Y.; Thompson, M.; Salau, A.; Upadhyay, K. Making Smart Contracts Predict and Scale. In Proceedings of the 2022 Fourth International Conference on Blockchain Computing and Applications (BCCA), San Antonio, TX, USA, 5–7 September 2022; pp. 127–134. [Google Scholar] [CrossRef]
- Barwise, J.; Perry, J. The Situation Underground. In Situations and Speech Acts; Barwise, J., Sag, I.A., Eds.; Stanford Working Papers in Semantics, Standford, Cognitive Science Group, Part D; Taylor & Francis: Abingdon, UK, 2016. [Google Scholar]
- Endsley, M.R. Design and Evaluation for Situation Awareness Enhancement. Proc. Hum. Factors Soc. Annu. Meet. 1988, 32, 97–101. [Google Scholar] [CrossRef]
- Schilit, B.; Adams, N.; Want, R. Context-Aware Computing Applications. In Proceedings of the 1994 First Workshop on Mobile Computing Systems and Applications, Santa Cruz, CA, USA, 8–9 December 1994; pp. 85–90. [Google Scholar] [CrossRef]
- Baldauf, M.; Dustdar, S.; Rosenberg, F. A Survey on Context-Aware Systems. Int. J. Hoc Ubiquitous Comput. 2007, 2, 263. [Google Scholar] [CrossRef]
- Moore, P.; Hu, B.; Zhu, X.; Campbell, W.; Ratcliffe, M. A Survey of Context Modeling for Pervasive Cooperative Learning. In Proceedings of the 2007 First IEEE International Symposium on Information Technologies and Applications in Education, Kunming, China, 23–25 November 2007; pp. K5-1–K5-6. [Google Scholar] [CrossRef]
- Ejigu, D.; Scuturici, M.; Brunie, L. An Ontology-Based Approach to Context Modeling and Reasoning in Pervasive Computing. In Proceedings of the Fifth Annual IEEE International Conference on Pervasive Computing and Communications Workshops (PerComW’07), White Plains, NY, USA, 19–23 March 2007; pp. 14–19. [Google Scholar] [CrossRef]
- Sezer, O.B.; Dogdu, E.; Ozbayoglu, A.M. Context-Aware Computing, Learning, and Big Data in Internet of Things: A Survey. IEEE Internet Things J. 2018, 5, 1–27. [Google Scholar] [CrossRef]
- Chen, R.; Wang, X. Situation-Aware Orchestration of Resource Allocation and Task Scheduling for Collaborative Rendering in IoT Visualization. IEEE Trans. Sustain. Comput. 2022, 7, 935–949. [Google Scholar] [CrossRef]
- Hamrouni, A.; Khanfor, A.; Ghazzai, H.; Massoud, Y. Context-Aware Service Discovery: Graph Techniques for IoT Network Learning and Socially Connected Objects. IEEE Access 2022, 10, 107330–107345. [Google Scholar] [CrossRef]
- Chang, C.K.; Ceravolo, P.; Chang, R.N.; Helal, S.; Jin, Z.; Liu, X.; Ming, H. Software Services Engineering Manifesto-A Cross-Cutting Declaration. In Proceedings of the 2021 IEEE International Conference on Web Services (ICWS), Chicago, IL, USA, 5–10 September 2021; pp. 703–709. [Google Scholar] [CrossRef]
- Xie, H.; Yang, J.; Chang, C.K.; Liu, L. A Statistical Analysis Approach to Predict User’s Changing Requirements for Software Service Evolution. J. Syst. Softw. 2017, 132, 147–164. [Google Scholar] [CrossRef]
- Gholami, H.; Chang, C.K.; Aduri, P.; Ma, A.; Rekabdar, B. A Data-Driven Situation-Aware Framework for Predictive Analysis in Smart Environments. J. Intell. Inf. Syst. 2022, 59, 679–704. [Google Scholar] [CrossRef]
- Rumelhart, D.E.; Hinton, G.E.; Williams, R.J. Learning Internal Representations by Error Propagation, Parallel Distributed Processing, Explorations in the Microstructure of Cognition. Biometrika 1986, 71, 599–607. [Google Scholar]
- Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
- Alshammari, N.; Alshammari, T.; Sedky, M.; Champion, J.; Bauer, C. OpenSHS: Open Smart Home Simulator. Sensors 2017, 17, 1003. [Google Scholar] [CrossRef]
- Blender-a 3D Modelling and Rendering Package. Available online: https://www.blender.org/about/ (accessed on 18 May 2024).
- Alshammari, T.; Alshammari, N.; Sedky, M.; Howard, C. SIMADL: Simulated Activities of Daily Living Dataset. Data 2018, 3, 11. [Google Scholar] [CrossRef]
- Szilágyi, P. EIP-225: Clique Proof-of-Authority Consensus Protocol; Ethereum Improvement Proposals, no. 225. [Online Serial]. Available online: https://eips.ethereum.org/EIPS/eip-225 (accessed on 18 May 2024).
Notation | Description |
---|---|
t | The current time instance. |
T | The length of the time window for analysis. |
n | The number of sensors. |
m | The number of smart actuators. |
k | The number of pre-defined user intentions. |
The set of sensory data produced at time t by all the n sensors, where for denotes the sensory data by sensor i. | |
The states of all the m smart actuators at time t, where for denotes the state of smart actuator i. | |
The behavioral context of the user at time t. | |
The environmental context at time t. | |
The user’s intention at t, where for denotes a pre-defined user intention. |
Timestamp | Bathroom Light | Carpet Pressure | … | Couch Pressure | Situ |
---|---|---|---|---|---|
t = 1 | 0 | 0 | … | 1 | WatchTV |
t = 2 | 0 | 0 | … | 1 | WatchTV |
t = 3 | 1 | 1 | … | 0 | Personal |
t = 4 | 1 | 1 | … | 0 | Personal |
t = 5 | 0 | 0 | … | 0 | Sleep |
t = 6 | 0 | 0 | … | 0 | Sleep |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
Training (per Epoch) | Prediction (per Inference) | |
---|---|---|
Baseline-1 | 141,833 | 35,965,460 |
Baseline-2 | not applicable | 175,774 |
Situ-Oracle | not applicable | 31,821 |
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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bian, H.; Zhang, W.; Chang, C.K. Situ-Oracle: A Learning-Based Situation Analysis Framework for Blockchain-Based IoT Systems. Blockchains 2024, 2, 173-194. https://doi.org/10.3390/blockchains2020009
Bian H, Zhang W, Chang CK. Situ-Oracle: A Learning-Based Situation Analysis Framework for Blockchain-Based IoT Systems. Blockchains. 2024; 2(2):173-194. https://doi.org/10.3390/blockchains2020009
Chicago/Turabian StyleBian, Hongyi, Wensheng Zhang, and Carl K. Chang. 2024. "Situ-Oracle: A Learning-Based Situation Analysis Framework for Blockchain-Based IoT Systems" Blockchains 2, no. 2: 173-194. https://doi.org/10.3390/blockchains2020009