the Semantic Web (SW) and the IoT. Basically, a subset of useful knowledge representation and autonomous reasoning capabilities mutated from the Semantic Web are adapted and optimized for EC contexts. Its mission is to support user goals and provide innovative services by improving the intelligence of embedded objects and autonomic information management in pervasive contexts. Orthogonally, the Social Internet of Things (SIoT) paradigm [4] introduces a layer of social networking principles into the IoT ecosystem to enhance the efficiency, usability, and intelligence of interconnected devices. The benefits of SIoT architectures include:  
* _Dynamic interactions_: smart objects are designed to interact not only based on predefined technical protocols but also through social relationships, akin to human social networks. Relationships mirror human social connections, such as co-location, co-work, friendship, and ownership, and facilitate more intuitive interactions independent from user engagement and from human Social Networking Services (SNSs);
* _Context-aware collaboration_: IoT devices act as autonomous agents building networks of social relationships and exploiting them to share information and services, and perform tasks collaboratively [5]. The social layer adds context and relational data to the interactions, enabling devices to make more informed and context-aware decisions;
* _Resource optimization_: by leveraging social relationships, smart devices can optimize the allocation and negotiate access to shared resources, like network bandwidth or energy power, based on their social standing or priority within the network. SIoT approaches have found significant applications in real-world scenarios, including smart mobility [6], smart building [7], and smart manufacturing [8]. Nevertheless, ensuring interoperability among diverse devices from different manufacturers remains a critical challenge for the seamless functioning of SIoT networks. Monitoring and maintaining social relationships among a large number of devices is a challenging task requiring sophisticated algorithms and frameworks. The analysis in Section 3 highlights the benefits and drawbacks of existing SIoT proposals. Specifically, to overcome these limitations, this paper proposes a comprehensive framework, aiming to combine the best of SWoT and SIoT paradigms for EC-oriented scenarios. SWoT enables knowledge representation and autonomous reasoning at the edge of the network through carefully optimized inference services and engines. Specifically, non-standard inferences for semantic matchmaking are adapted for service/resource discovery, by defining a decentralized collaborative social protocol, through which smart objects can interact with their _friends_ and _followers_ along well-defined patterns in order to search for needed services, based on articulated request descriptions with well-defined semantics. The outcomes of discovery, and particularly the ability (respectively, inability) of an object to provide useful information to another one, contribute to strengthening (resp. weaken) their social links over the course of time, such that low-utility relationships can be dropped and new ones can be formed, based on a fully dynamic model. This allows coping with the volatile nature of IoT networks, where devices and active services can appear or disappear without notice. The main contributions of the paper are as follows:  
* A novel framework combining a SWoT-based distributed collaborative service discovery protocol with a SIoT dynamic relationship and trust management model.