###### Abstract  
In the modern digital landscape of the Internet of Things (IoT), data interoperability and heterogeneity present critical challenges, particularly with the increasing complexity of IoT systems and networks. Addressing these challenges, while ensuring data security and user trust, is pivotal. This paper proposes a novel Semantic IoT Middleware (SIM) for healthcare. The architecture of this middleware comprises the following main processes: data generation, semantic annotation, security encryption, and semantic operations. The data generation module facilitates seamless data and event sourcing, while the Semantic Annotation Component assigns structured vocabulary for uniformity. SIM adopts blockchain technology to provide enhanced data security, and its layered approach ensures robust interoperability and intuitive user-centric operations for IoT systems. The security encryption module offers data protection, and the semantic operations module underpins data processing and integration. A distinctive feature of this middleware is its proficiency in service integration, leveraging semantic descriptions augmented by user feedback. Additionally, SIM integrates artificial intelligence (AI) feedback mechanisms to continuously refine and optimise the middleware's operational efficiency. Internet of Things (IoT); blockchain; artificial intelligence (AI); semantic annotation; data security; user-centric operations; healthcare +
Footnote †: journal:  
00C0202030  
challenge includes maintaining data quality as the data are typically collected from multiple sources, which include information management systems and healthcare providers. The inconsistencies that may arise because of the integration of data from different sources result in unreliable analysis and decisionmaking. Other challenges associated with medical data include privacy and security concerns. Regulations and laws securing patient privacy, such as the Health Insurance Portability and Accountability Act (HIPAA) [6] in the United States and General Data Protection Regulation (GDPR) [7] in the United Kingdom and European Union, impose strict requirements for storing, managing, handling, and sharing medical information. Any research including non-commercial and commercial projects involving patient data must adhere to these regulations. To address some of the challenges in the IoT domain, our previous work introduced the Internet of Things Management Platform (IoT-MP) [8; 9]. The IoT-MP was developed to tackle the complexities of managing an expansive IoT infrastructure, especially considering the constrained resources of typical IoT devices. This platform supports fundamental management functions necessary for optimal operation, monitoring, and communication. Building on the foundational works of the IoT-MP, subsequent research [10] has introduced a framework for securely authenticating patients and facilitating the secure sharing of biomedical data through cloud computing technologies. Further advancements were achieved with [11], which seamlessly incorporated blockchain into the aforementioned framework. This evolution in our research culminated in the introduction of BioChainReward (BCR), a blockchain-based framework for secure and privacy-preserving biomedical data sharing [12]. BCR stands out by implementing an AI-enabled privacy-preservation sub-layer, adapting its privacy measures depending on the data request's nature and purpose. Despite the progress made with platforms like IoT-MP and BCR, there are still formidable challenges to be addressed. A paramount issue is the heterogeneity of medical data. Data from various sources like hospitals, clinics, and labs come in different formats, each employing unique coding systems and terminologies [13]. Such diversity complicates the task of data integration and analysis. For instance, patient outcome data sourced from various healthcare institutions might differ structurally, impeding meaningful comparisons. Another considerable obstacle lies in the realm of semantic annotations.