Contextual Modeling and Intelligent Decision-Making for IoT Systems: A Combined Ontology and Machine Learning Approach †
Abstract
1. Introduction
2. Toward a Better Understanding of Context and Context Awareness
- Context perception: collect data from sensors, networked devices, databases, etc.
- Context interpretation: use of artificial intelligence algorithms, logical rules, or ontologies to infer situations from contextual information and analysis.
- Action and adaptation: system behavior adjustment according to the determined context.
3. Related Works
- System Components: Architectures are well detailed, with specialized modules such as reasoning [11], event management [10,13], or user interfaces [15]. Some works [11,14], integrate machine learning (ML) modules and knowledge bases. However, few articles deal with load management or component distribution.
- Advanced technologies: Wide adoption of AI/ML [10,11,14,15], ontologies [13,14], and big data [16] as well as emerging technologies such as multi-agent systems [14], [15] or computer vision [16]. However, no details are provided on the implementation of the models deployed, or on the frameworks or tools used.
4. Context Awareness System Components
4.1. Contextual Data
- User-related data: This data enables the home’s functionalities to be tailored to the needs and preferences of its inhabitants:
- ▪
- Identity: facial recognition, RFID badges.
- ▪
- Presence: motion detection.
- ▪
- Personal preferences: temperature, lighting, music, daily routines.
- ▪
- Current activities: watching TV, cooking, sleeping, working.
- Usage history: frequent settings, devices used at certain times of the day. Environmental data: These enable the home to be adapted to suit climatic conditions and comfort:
- ▪
- Indoor and outdoor temperature;
- ▪
- Air humidity;
- ▪
- Air quality (CO2, COV, fine particles PM2.5);
- ▪
- Ambient brightness;
- ▪
- Rain, wind, external weather conditions;
- ▪
- Smoke and toxic gas detection;
- ▪
- State of windows and doors (open/closed).
- Data from connected devices: They can be used to monitor and control intelligent objects in the home.
- ▪
- Appliance status (on/off, operating mode);
- ▪
- Energy consumed by each appliance;
- ▪
- Light status (intensity).
- Time data:
- ▪
- Day/night cycle (automatic activation of shutters, lights, heating);
- ▪
- Frequency of equipment use (habit detection).
- Security data: This information guarantees the safety of the home and its occupants.
- ▪
- Intrusion detection (cameras, motion sensors, unauthorized door opening);
- ▪
- User authentication (facial recognition, NFC badges);
- ▪
- Fire and gas leak detection;
- ▪
- Alert and notification system (SMS, email, alarm siren).
- ▪
- Data from interactions with the home: This information concerns the occupants’ interactions with the system.
- ▪
- Voice commands;
- ▪
- Interactions via a mobile app or web interface;
- ▪
- Management of pre-programmed scenarios.
4.2. Data Structure
4.3. Event Processing
- Event collection: events from sensors or smart devices are sent to Kafka topics.
- Event processing: Spark Streaming consumes these events from Kafka and processes them in real time to perform specific analyses, filtering, and calculations. For example, determining whether the temperature exceeds a certain threshold, or whether a person is detected by the camera.
- Prediction and decision-making: thanks to its MLlib library, Spark applies artificial intelligence models to predict actions to be taken, such as adjusting the temperature or sending a security alert.
- Results storage: The results of processing, i.e., predictions or decisions, are sent to Kafka Topics to trigger actions in the smart home. Thanks to Kafka Connect, this data is stored in a database such as PostgreSQL or MongoDB for future access.
4.4. Advanced Technologies
5. Discussion and Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Strang, T.; Linnhoff-Popien, C. A Context Modeling Survey. In Proceedings of the Workshop on Advanced Context Modeling, Reasoning, and Management as Part of UbiComp 2004—6th International Conference on Ubiquitous Computing, Nottingham, UK, 7 September 2004. [Google Scholar]
- Colace, F.; Lorusso, A.; Marongiu, F.; Santaniello, D.; Troiano, A.; Valentino, C. An Internet of Things based approach for Smart Home Management. Res. Briefs Inf. Commun. Technol. Evol. 2022, 8, 182–192. [Google Scholar] [CrossRef]
- Li, M.; Wu, Y. Intelligent control system of smart home for context awareness. Int. J. Distrib. Sens. Netw. 2022, 18, 155013292210820. [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. [Google Scholar]
- Perera, C.; Zaslavsky, A.; Christen, P.; Georgakopoulos, D. Context Aware Computing for The Internet of Things: A Survey. IEEE Commun. Surv. Tutor. 2014, 16, 414–454. [Google Scholar] [CrossRef]
- Robles, R.J.; Kim, T.-H. Context Aware Systems, Methods and Trends in Smart Home Technology. In Proceedings of the International Conference on Security-Enriched Urban Computing and Smart Grid, Hualien, Taiwan, 21–23 September 2011. [Google Scholar]
- Cristea, V.; Dobre, C.; Pop, F. Context-Aware Environments for the Internet of Things. In Internet of Things and Inter-Cooperative Computational Technologies for Collective Intelligence; Bessis, N., Xhafa, F., Varvarigou, D., Hill, R., Li, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; Volume 460. [Google Scholar]
- Guermah, H.; Fissaa, T.; Hafiddi, H.; Nassar, M.; Kriouile, A. An Ontology Oriented Architecture for Context Awar.pdf. Available online: https://arxiv.org/pdf/1404.3280 (accessed on 24 May 2024).
- Prasetya Dwi Wibawa, I.; Kallista, M.; Phaijoo, G.R. A Literature Survey of Human Activity Recognition Using Deep Learning and Nonparametric Model with Some Exchanges in Karl Popper’s Viewpoint and Kuhn’s Paradigm in Philosophy of Science. J. Meas. Electron. Commun. Syst. 2022, 9, 18–28. [Google Scholar] [CrossRef]
- Bazan-Muñoz, A.; Ortiz, G.; Augusto, J.; Garcia-de-Prado, A. Taxonomy and software architecture for real-time context-aware collaborative smart environments. Internet Things 2024, 26, 101160. [Google Scholar] [CrossRef]
- Michalakis, K.; Christodoulou, Y.; Caridakis, G.; Voutos, Y.; Mylonas, P. A Context-Aware Middleware for Context Modeling and Reasoning: A Case-Study in Smart Cultural Spaces. Appl. Sci. 2021, 11, 5570. [Google Scholar] [CrossRef]
- Augusto, J.; Giménez-Manuel, J.; Quinde, M.; Oguego, C.; Ali, M.; James-Reynolds, C. A Smart Environments Architecture (Search). Appl. Artif. Intell. 2020, 34, 155–186. [Google Scholar] [CrossRef]
- Elyasaf, A. Context-Oriented Behavioral Programming. Inf. Softw. Technol. 2020, 133, 106504. [Google Scholar] [CrossRef]
- Babli, M.; Onaindia, E. A context-aware knowledge acquisition for planning applications using ontologies. arXiv 2019, arXiv:1904.09845. [Google Scholar] [CrossRef]
- Fahd Al-Mutawa, R.; Albouraey Eassa, F. A Smart Home System based on Internet of Things. Int. J. Adv. Comput. Sci. Appl. (IJACSA) 2020, 11, 260–267. [Google Scholar] [CrossRef]
- Hussain, Z.; Sheng, Q.Z.; Zhang, W.E. A review and categorization of techniques on device-free human activity recognition. J. Netw. Comput. Appl. 2020, 167, 102738. [Google Scholar] [CrossRef]
- Bouroumi, J.E.; Guermah, H.; Nassar, M. Enhancing Business Process Modeling with Context and Ontology. Int. J. Adv. Comput. Sci. Appl. (IJACSA) 2021, 12, 373–380. [Google Scholar] [CrossRef]


| Article | Contextual Data | System Components | Data Structure | Event Processing | Advanced Technologies |
|---|---|---|---|---|---|
| [10] | Person, Place, Environment, Technology, Activity | Event Types, CEP Engine, Semi-Static Databases, REST Services, Actions and Persistent Context | JSON format | Complex event processing engine | Provides for integration of ML |
| [11] | User Data, Environmental Data, Temporality, Activity Data, Derived Data | Context Acquisition, Pre-processing, Reasoning Module, Incertitude Module, Machine Learning Module, Knowledge Base, Applicative Interface | NoSQL database, specifically, MongoDB | Rule-based, if-then type | Hybrid Reasoning, Machine Learning, Fuzzy Logic and Probabilistic Logic |
| [12] | x | Sensors and Actuators, Reasoning Components, User Interfaces, Data Management | x | Rule-based language, a case-based raiser | Provides for ML integration |
| [13] | Physical Entities, Device Status, Users, Contextual Conditions, Requiring and Updating | Contextual Behaviors, Context Model, Architectural Layers | A relational database, managed by a data access layer | Event Arbiter, Effect Functions, Compartmental Threads, Conditional Transitions | Artificial Intelligence, Big data, Ontology, Distributed systems, IoT |
| [14] | User personal data, Environmental data, Specific contextual information, Temporal data, Relationships between entities | Compartmental Threads, Data Access Layer, Context Schema, Events, Effect Functions | Ontologies, data models, NoSQL database, graphs | Reactive event processing, Temporal event scheduling, Use of decision algorithms | Artificial Intelligence, Big data, Ontology, Multi-agent systems |
| [15] | Sensor data, Electronic device data, User data, Safety data Environmental conditions | User Interface, Transmission Mode, Central Controller, Electronic Devices Connection Manager, Notification Module, Web Service, Object Management Module | x | Automatization rules, Order Management Module, Artificial Intelligence and Machine Learning | Artificial Intelligence, Big data, Ontology, Multi-agent systems Facial Recognition and Liveness Detection, Chatbots and Natural Language Processing (NLP), Machine Ap-learning and Artificial Intelligence |
| [16] | Sensor data, Temporal data, Interaction data, Activity history, Personal context, Location data | Sensors, Data collection, Data pre-processing, Machine learning algorithms, User interface, Data storage and management, Feedback system | x | Temporal analysis, Contextual interpretation, Re-action, and adaptive learning | Computer Vision, Artificial Intelligence and Machine Learning, Cloud Computing and Big Data |
| [17] | Location, identity, localization, sensor data, event | Sensors, Context, Contextualized Business Process Model, Ontology of Contextualized Business Process Model, Support Infrastructure | x | Events, Integration of Contextual Elements, Task and Gateway Management, Notification/Alert Systems | Ubiquitous Computing, Iot, Data Analysis |
| Data Type | Recommended Database | Reason |
|---|---|---|
| User-related data | PostgreSQL | Ideal for structured data with complex relations |
| Environmental data | PostgreSQL | Can be used for temporal data (temperature, humidity, air quality) with efficient time-series queries. |
| Data from connected devices | MongoDB | Flexible for semi-structured device data (status, energy consumption). |
| Time data | PostgreSQL | Use time functions to manage day/night cycles and frequency of use. |
| Security data | PostgreSQL | Guarantees secure, structured management of sensitive data (intrusion, authentication) |
| Data from interactions with the home | MongoDB | Adapted to handle a variety of interactions (voice commands, mobile or web interfaces). |
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. |
© 2025 by the author. 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
Mouhim, S. Contextual Modeling and Intelligent Decision-Making for IoT Systems: A Combined Ontology and Machine Learning Approach. Eng. Proc. 2025, 112, 71. https://doi.org/10.3390/engproc2025112071
Mouhim S. Contextual Modeling and Intelligent Decision-Making for IoT Systems: A Combined Ontology and Machine Learning Approach. Engineering Proceedings. 2025; 112(1):71. https://doi.org/10.3390/engproc2025112071
Chicago/Turabian StyleMouhim, Sanaa. 2025. "Contextual Modeling and Intelligent Decision-Making for IoT Systems: A Combined Ontology and Machine Learning Approach" Engineering Proceedings 112, no. 1: 71. https://doi.org/10.3390/engproc2025112071
APA StyleMouhim, S. (2025). Contextual Modeling and Intelligent Decision-Making for IoT Systems: A Combined Ontology and Machine Learning Approach. Engineering Proceedings, 112(1), 71. https://doi.org/10.3390/engproc2025112071

