Abstract
While it is well understood that the emerging Social Internet of Things offers the capability of effectively integrating and managing massive heterogeneous IoT objects, it also presents new challenges for suggesting useful objects with certain service for users due to complex relationships in Social Internet of Things, such as user’s object usage pattern and various social relationships among Social Internet of Things objects. In this study, we focus on the problem of service recommendation in Social Internet of Things, which is very important for many applications such as urban computing, smart cities, and health care. We propose a graph-based service recommendation framework by jointly considering social relationships of heterogeneous objects in Social Internet of Things and user’s preferences. More exactly, we learn user’s preference from his or her object usage events with a latent variable model. Then, we model users, objects, and their relationships with a knowledge graph and regard Social Internet of Things service recommendation as a knowledge graph completion problem, where the “like” property that connects users to services needs to be predicted. To demonstrate the utility of the proposed model, we have built a Social Internet of Things testbed to validate our approach and the experimental results demonstrate its feasibility and effectiveness.
Introduction
With the rapid development and popularization of low-cost embedded sensing devices and mobile computing technologies, numerous physical things are being interconnected to form an Internet of Things (IoT). The physical things are embedded with sensing, communication, and computing capabilities, such as microwaves, furniture, and smart electromechanical devices. The IoT will gradually transform people’s work and living environment into an intelligent space, providing the ability to integrate the physical world and the cyber world, and also promote the emergence of many new applications (e.g. things search,1,2 semantic annotation, 3 anomaly detection, 4 and indoor localization 5 ). While the IoT promises to be a source of great benefits to our lives, it still faces a few significant challenges with increasing heterogeneous things participate in sensing and communicating, such as effectively sensing and transmitting data, 6 safely discovering services and objects based on user’s preference, 7 and context-aware browsing and caching. 8 For example, numerous smart objects are required to register their information in a centralized server before searching, and the search process cannot benefit from the information about the objects’ context relationships. Obviously, these challenges caused by the extremely high complexity of the IoT environments cannot be solved by even very smart objects singularly. Recently, a few studies9,10 proposed a new paradigm named Social Internet of Things (SIoT) by integrating social networks and IoT, which applies the theory of social networks into different levels of the IoT and provides new opportunities to address these challenges. Given the increasing number of heterogeneous IoT objects, the SIoT make the world of trillions of objects manageable when facing service and information discovery and lay the ground for autonomous interactions among objects for the benefit of the human user, thus can facilitate a few valuable services, 11 such as (1) are able to interact with other objects autonomously with respect to the owners; (2) can easily crawl the IoT made of billions of objects to discover services and information in a trust-oriented way; and (3) can advertise their presence to provide services to the rest of the network.
SIoT adopts a service-oriented architecture where heterogeneous IoT objects can offer or request autonomous services and collaborate in terms of their relationships. Therefore, recommending useful objects with specific services to better meet user’s requests in SIoT environment is a fundamental research challenge for many applications (e.g. urban computing, smart cities, and health care), and attracts more and more attention.12,13 However, SIoT service recommendation is more spontaneous, context-dependence, and monopolistic compared with traditional web service recommendations due to a few unique characteristics:
Complex social relationships: According to Atzori et al.,9,11 the SIoT includes five basic social relationships, that is, parental object relationship, co-location object relationship, co-work object relationship, ownership object relationship, and social object relationship. Without considering these complex social relationships and interdependencies among SIoT, objects may result in inappropriate recommendation results.
Heterogeneous SIoT objects: In SIoT, objects are heterogeneous in terms of functionality, and attributes thus cannot be represented in a uniform feature space. Besides, the text descriptions of objects are usually incompleted. As a result, both the feature-based method and text-based method cannot be utilized to measure an object’s similarity or find an object with a specific service when recommending SIoT service.
Implicit user preferences: For a traditional recommendation system such as recommending clothes or music, the usefulness of a product or service is generally represented by a “rating,” which indicates how much a given user likes a particular item. Thus, content-based filtering and collaborative filtering based on the user’s rating can be used to recommend clothes or music. However, user’s ratings or preference for services are usually implicit in SIoT, which is a major challenge for SIoT service recommendation.
In light of the preceding challenges, we present a graph-based service recommendation framework to address the service recommendation problem in SIoT. As shown in Figure 1, to fuse information from heterogeneous SIoT objects and their complex social relationships, we represent users and SIoT objects as entities of a knowledge graph. Then we model the SIoT service recommendation problem as a knowledge graph completion problem, where the “like” property depends on the user’s preference, which connects users to a specific service that they like, has to be predicted. However, unlike e-commerce sites or location-based social network, the “like” property between users and objects is implicit is SIoT. Fortunately, user’s object usage events can be easily recorded and obtained using ubiquitous sensing technologies, such as Radio-frequency identification (RFID) and sensor readings. These object usage events, which embedded with rich spatial-temporal information and implicitly imply the regularities of users, provide rich information to uncover user’s preference.10,14,15 For example, how frequently and how long a user uses an object with a specific service can reflect their preference to some extent. For predicting missing “like” relations in knowledge graph, existing graph-based methods16,17 may suffer from robustness caused by the incompleteness of the graphs. To address these challenges, we utilize recent advances in graph embedding learning techniques and propose a novel framework Specifically, we first jointly embed users, objects, services, and their corresponding relations into a shared lower-dimensional space. Then, we decompose the SIoT service recommendation into a link prediction process while considering the user’s preference and object’s social relationships. In a nutshell, the contributions of our research are three-fold:
We uncover the “like” property between user and service by modeling the user’s preference toward an object as the hidden factor of his or her object usage events with a latent variable model.
We construct a knowledge graph to capture complex social relationships of SIoT objects and the “like” property between users and services. Then we model the SIoT service recommendation problem as a knowledge graph completion problem and propose a graph embedding–based SIoT service recommendation approach.
We evaluate our approach based on three real-world data sets and a synthetic data set, which are collected by 242 SIoT objects and more than 500 users. The results show the advantages of our approach beyond multiple baseline algorithms.

An example for generating SIoT knowledge graph with various social relationships.
The remainder of the article is organized as follows: section “Related work” surveys related work on service recommendation in SIoT. Section “Problem definition” presents the problem definition of SIoT service recommendation. Section “The proposed service recommendation model in SIoT” describes the proposed service recommendation model in SIoT. Section “Experiment evaluation” reports and discusses the experimental results. Finally, we present our conclusion and future work in section “Conclusion.”
Related work
In this section, we first survey related work on services recommendation in SIoT and then discuss how these works differ from our work.
A few studies18–20 have been proposed to perform SIoT service recommendation using semantic web technologies. The idea of semantic-based service recommendation is that first define a metadata model to describe characteristics (e.g. geophysical, functional, and non-functional) of an object, then find services that meet the user’s requirement via semantic similarity computation. For example, Rasch 18 and Hussein et al. 19 presented smart assistance via recommending services in smart homes by considering user’s context information (e.g. current situation, requirements, preferences, and habits). Through exploiting user’s interests and preferences from multi-modal information (e.g. travel sequence, actions, motivations, opinions, and demographic information), the study 20 proposed a health-centric recommendation system in IoT based on the ontological knowledge base and tailored filtering mechanisms.
To recommend services among various SIoT applications, AGILE 21 proposed two recommendation models for IoT edge devices with specific services, which utilize collaborative recommendation approach for suggesting additional applications for the current gateway and content-based recommendation. However, the proposed recommendation framework needs to figure out the contexts it makes sense to provide basic recommendation functionalities for the gateway. Based on RESTful principles and ontologies, Beltran et al. 22 first proposed a system to manage SIoT service’s profile and interconnect the service with the rest of the knowledge database, then recommended possible automatic actions to users using the service’s ontology database and actual data. Mashal et al. 23 introduced an undirected tripartite graph–based model with weight spreading to recommend services in loT, which generates recommendation list by jointly considering information of services and ambient resource. While these semantic-based service recommendation models are effective in scenarios that are pre-programmed by domain experts, they will suffer a few limitations in SIoT environment, such as (1) new services need to be discovered across diverse and rapidly changing environments; (2) the challenge to model the usage and temporal changes of a SIoT service using predefined information.
To model the usage and temporal changes of an SIoT service, several literatures15,24,25 focus on SIoT service recommendation based on the user–object interaction behaviors. SIoT objects with specific services are discrete without explicit connection with users, but users and objects will interact in daily activities, and these interactions can provide rich information (e.g. activity, location, and time) for uncovering the regularities of users. For instance, Jeong et al. 24 proposed a rule-based service recommendation system by analyzing both object’s usage patterns of a user and the common usage patterns of the user who is living in a similar context. However, the model lacks quality of services such as the service price and trust value. To combine object’s properties when making service recommendation, Wang et al. 26 proposed an IoT service recommendation model based on mass diffusion dynamic tag tripartite graph, which constructs the tripartite graph by extracting user’s habit features by regarding the SIoT service as the dynamic tag. The recommendation list is generated by first calculating the resource value of the service with positive, then performs backward mass diffusion on the tripartite graph, and finally jointly measures the energy state, the user similarity, the bearing capacity and the service resource value of the mass diffusion results. For modeling various interaction relationships in IoT entities, Yao et al. 15 further proposed a unified probabilistic factor–based framework for IoT recommendation by fusing relations across heterogeneous entities of IoT, such as user–object relations, user–user relations, and object–object relations. However, these methods generate SIoT service recommendation without considering various social relationships in SIoT, which is important for selecting services to better meet user’s requirement.
To our best knowledge, only few studies27–29 addressed the problem of service recommendation in SIoT with considering object’s social relationships. For example, Saleem et al. 27 utilized people–objects relationship and objects–objects relationship in SIoT to recommend services among various IoT applications. For QoS-aware service recommendation for IoT Mashup applications, Cao et al. 28 captured the relationships among mashup, services, and their links with relational topic model and exploited factorization machines to train the latent topics for recommending services. Since user groups’ preferences for IoT-based services differ significantly from individual users, Lee et al. 29 proposed a service recommendation using user-based collaborative filtering, which determines neighbor user groups by considering several member organization–based group similarity metrics such as the group size–based, common member–based, and member preference–based metrics. Khelloufi et al. 30 proposed a service recommendation system by considering the social relationships between device owners, as incorporating user’s social features can enable context-aware recommendation and increase the efficiency of the recommended services. To fuse multiple types of service data and their logical relations for personalized service recommendation methods, Wang et al. 31 proposed domain-oriented user and service interaction knowledge graph. As privacy-preserving schemes are very important for service recommendation in SIoT, Ferrag et al. 32 surveyed recent research literatures on research trends in privacy-preserving schemes for ad hoc social networks. However, user’s ratings or preference for SIoT services are usually implicit, thus traditional recommendation models (such as content-based filtering and collaborative filtering) based on user’s rating or preference cannot be used to service recommendation in SIoT.
Our proposed approach differs from existing works in the following two aspects: (1) we consider that both the usage frequency and usage duration of an object to characterize user’s preference, then model the “like” property between user and service with a latent variable model and (2) we perform service recommendation in SIoT by using a knowledge graph to capture complex social relationships of heterogeneous SIoT objects and user’s “like” property.
Problem definition
In this section, we first define the key data structures and notations then present the problem definition of service recommendation in SIoT.
Object
Example 1
Considering an object

An illustrative example of object in SIoT and its service set.
Object usage event
An object usage event between
User-object preference
Denote by an adjacent matrix
SIoT knowledge graph
Denote by
With the aforementioned definitions, the problem of service recommendation in SIoT can be formally stated as follows:
Giving a set of objects and the service set that objects can provide:
The proposed service recommendation model in SIoT
In this study, we regard service recommendation in SIoT as a knowledge graph completion problem by modeling users, objects, and services as entities of a knowledge graph, where the “like” property between users and services has to be predicted. As shown in Figure 3, our proposed recommendation framework produces top-

The framework of the proposed SIoT service recommendation model.
Learning user preference from object usage event
The idea behind our approach is that users’ object usage events imply their preference, as most people have a finite amount of resources, they tend to select service from preferred service providers (i.e. objects). Thus, we learn the user’s preference by the following two steps.
Collect user’s object usage event with ubiquitous sensing technologies
User’s object usage events, which embed with rich spatial-temporal information and implicitly imply behavior habits of a user, provide us a new approach to uncover his or her preference. In addition, object usage events are easy to record and collect using ubiquitous sensing technologies (such as state-change sensors) in SIoT. In our experiment, we utilize state-change sensors to identify and record usage information of service providers and further develop a context-aware service (CoAE) application for recording users’ service usage records. During the study, each participant was given an Android device to run CoAE application and uses the application to record the service what he or she is doing, such as the start and end time of this event.
Figure 4 shows an example of collecting object usage event using the state-change sensors and CoAE application. As shown in Figure 4(a), the starting and ending time of service “make coffee” is recorded by CoAE application. We further extract the participated objects of the service by observing the sensor activations during the service duration (as shown in Figure 4(b)). Finally, we observe the service is completed with five service providers: filter cup, microwave, coffee machine, electronic scale, and kettle, thus consider there is an object usage event between user and each object during this event.

An illustrative example of collecting object usage event.
Mining user-service preference via latent variable model
The principle of mining User-Service preference is that homophily is ubiquitous in SIoT, which suggests the likelihood that an object usage event will take place relate positively to user’s preference to the object. 33 Clearly, users have a finite amount of resources, they tend to select their favorite service providers. In this way, we model user’s preference toward an object as the hidden factor of his or her object usage event with a latent variable model, details of the modeling process can be found in our previous work.3,14
Generate recommendation list via graph embedding
After modeling users’ service preference from object usage event, we combine the learned user preference and various social relationships among SIoT objects to construct a knowledge graph. Then we formulate the SIoT service recommendation problem as one of knowledge graph completion problem, where the “like” property between users and services needs to be predicted. For predicting missing “like” property in the SIoT knowledge graph, we map entities and various social relationships among SIoT objects to a low-dimensional semantic space by graph embedding.
SIoT knowledge graph embedding
As mentioned earlier, SIoT knowledge graph
The model parameters of TransH are as follows: (1)
where
Service recommendation process
In this subsection, we present how to recommend SIoT service based on the learned embeddings entities and relations of SIoT knowledge graph. The principle is using the negative score assigned to a triple
More exactly, we first split users’ triples set
Experiment evaluation
In this section, we report on the results of a series of experiments conducted to evaluate the performance of the proposed recommendation model. We first describe the settings of experiments including data sets, comparative methods, and evaluation metrics. Then, we report and discuss the experimental results.
Experimental settings
Data sets
We set up a testbed includes one workspace and two smart houses, where 196 objects are tagged with RFID and various state-change sensors for collecting users’ object usage event. This task greatly benefits from our extensive experience in IoT things categorization service, 3 and we have implemented a prototype that users can check and control things real time via an Android application. For obtaining completed event usage information, two types of information need to be recorded: (1) service information. To obtain the service information, each participant utilized a context-aware service application to record the services they are using, including the start time and end time; (2) temporal information. To map the object’s usage time to the corresponding timestamps, we split one day into 24 timestamps with 1 h as an interval. Thirteen volunteers participated in the data collection phase during 1 year, and more than 50,000 object usage events are collected in the experiment. However, the data set collected from our testbed is still small. We augmented our data set with two data sets 35 that published by the AI group in MIT to make the data set big enough for experimental studies (Table 1).
An example of daily activity in MIT data set.
For our collected data set, we extract objects involved in a service according to record information of context-aware service application by time window overlapping (as shown in Figure 4). Note that some objects may involve in different services, for example, oven participates in roast steak and pizza service. Table 2 is a summary of the statistics of the three data sets for SIoT service recommendation. Unfortunately, the 15 users of the augmented data set are still too few for the experiment study. As a consequence, we write a computer program to generate random data set that contains information about users and objects they own and objects usage event they participated. The data set contains 500 users, each user is assigned a different number of object usage events with a minimum of 100 and a maximum of 1000.
Detailed information of the three data sets for SIoT service recommendation.
Comparative methods
We compare the proposed SIoT service recommendation model with the following four state-of-art baselines:
Probabilistic Matrix Factorization–based Service Recommendation Model (PMFR): PMFR
15
was originally proposed to perform smart object recommendation in IoT. This model performs recommendation by fusing various relations across heterogeneous entities of IoT, such as user–object relations, user–user relations, and object–object relations. More exactly, PMFR learns shared latent factors stemming from the probabilistic matrix factorization for fusing heterogeneous entities of IoT. We follow this work to predict the recommendation score of a SIoT service by predicting service usage value
where
Tripartite Graph–based Service Recommendation Model (GraphR): GraphR
26
performs SIoT service recommendation based on the mass diffusion dynamic tag tripartite graph, where the tripartite graph is built by extracting the users’ habit features of using the IoT device service as the dynamic tag. For generating recommendation list, GraphR performs the positive and backward mass diffusion on the tripartite graph, then calculates the energy state, the user similarity, the bearing capacity, and the service resource value of the mass diffusion results. Let
where
Trust-based Service Recommendation Model (TrustR): TrustR 36 generates service recommendation list based on the integrated trust values. User selects one or multiple objects with high trustworthiness according to service requirements and interacts with them. In addition, TrustR estimated the trustworthiness value between user and service by considering high timeliness and corresponds to a precise time point as follows
where
Tensor-based Service Recommendation Model (TensorAR). Wang et al.
37
evaluated the recommendation score of IoT service with user attribute similarity and the attribute correlation of user and IoT service. TensorAR constructs a tensor-based linear regression model to capture the relation among the attributes of IoT services, the attributes of objects and the attributes of users. Let
where
Evaluation metric
Following the work,14,15 we adopt two widely used metrics: mean absolute error (MAE) and Recall @
MAE, which is utilized to measure the accuracy of predicted recommendation score, and the lower the MAE, the better the performance. Specifically, MAE calculates the average of absolute difference between predicted recommendation score and actual recommendation score as the following
where
Recall@k: The calculation process of Recall @
where
Experimental results
In this sub-section, we first study the overall performance of different SIoT service recommendation models. Then we conduct two groups of fine-grained experiments and report their performance to validate the efficiency. The first group aims to evaluate the recommendation performance for all users and cold-start users. The second group investigates the impact of different training data ratios on recommendation performance.
Recommendation effectiveness for all users and cold-start users
We randomly select 70% of users’ object usage events as training set and use the rest of data as the test set. Then we test the performance of different recommendation models by setting the length of recommendation list as 7, and report the MAE in Table 3. From the table, we observe our method and PMFR show better performance consistently than GraphR, TrustR, and TensorAR as they learn user’s preference from object usage events. For instance, the MAE of PMFR is 1.74 while the MAE of TensorAR is 1.79. This clearly demonstrates the effectiveness of mining user’s service preference from interaction behavior between users and objects.
Top-
PMFR: probabilistic matrix factorization–based service recommendation model; MAE: mean absolute error.
We further evaluate Recall@k by varying the number of recommendation list from 1 to 12 in Figure 5, since a greater value of

Top-
To investigate the advantage of the proposed method for SIoT service recommendation, we further compare the recommendation performance of different algorithms for “cold-start” users in Figure 5(b). In this experiment, we regard users whose object usage events are less than 500 records as “cold-start” users. From the figure, we observe: (1) the recommendation performance of different service recommendation methods for cold-start users degrades significantly compares to all users, showing data sparsity caused by few objects usage events bring serious challenge for learning user’s preference. For instance, the Recall@10 of GraphR for “cold-start” users drops 11.85% compare with all users; (2) the proposed method performs much better than baseline algorithms (i.e. GraphR, TrustR, TensorAR, and PMFR), showing the advantage of SIoT service recommendation by capturing various social relationships among users, objects, and services with graph embedding. For instance, the performance of our method improved 5.37% compare with TrustR when k = 10. This is no surprise since our method can present new services and users by the learned vector representations of used records, thus the potential user-service links between cold-start services and users will be captured correspondingly. In other words, the proposed method can leverage not only the user-service links in SIoT Knowledge graph but also various social relationships when recommending cold-start users.
Recommendation effectiveness by using object’s social relationship
To illustrate one can generate better recommendation results by jointly considering both user’s preference and smart object’s social similarity, we compare our method with ItemCF, which generates the recommendation results by only considering the “like” property between user and service by modeling user’s preference toward an object with a latent variable model. Specifically, ItemCF predicts the recommendation score between users and objects without considering both the temporal influence and the object’s social similarity. The recommendation score
where
We investigate the recommendation performance by considering object’s social relationship, the results of Recall

The recommendation performance by considering object’s social relationship (a) all users and (b) cold-start users.
Recommendation effectiveness with different training data ratios
We investigate the impact of different training data ratios to the performance of GraphR, TrustR, TensorAR, PMFR, and our method. As shown in Figure 7, the performance of all service recommendation methods degrade to some extent as the training data ratios decreases. Nevertheless, our method and PMFR show better performance consistently than the other three methods over all training data ratios as they learn user’s preference from object usage events. For example, the Recall@8 of our method is 19.25% when the training data ratios is 40%, while 11.2% of GraphR with the same training data ratios. This clearly demonstrates the effectiveness of modeling user’s service preference from their object usage events. We also observe the proposed method can achieve considerable performance even when the training data ratio is relatively low, while GraphR, TrustR, and TensorAR perform poorly with few samples to train model. For example, the Recall@9 of our method drops 12.6% when the training data ratio decreases from 40% to 20%, while the number is 35.6% of TensorAR with the same condition. This reason is TensorAR requires enough service profiles or obvious user spatial-temporal patterns for training model, while our method can uncover user’s preference from their object usage events. However, the performance improvement by mining user’s preference from object usage events is diverse for our method and PMFR. Taking Recall@5 for example, the performance improvement of PMFR is about 5.14% compare with GraphR when the training data ratio is 40%, while the performance improvement of our method is very obvious (about 9.84%). This is no surprise since PMFR generates service recommendation results by merely considering the user’s preference, leading the advantage can be ignored when users have few object usage events. On the contrary, our method generates service recommendation results by jointly considering user’s preference and object’s various social relationships, and further present new services and users by the learned vector representations of used records, thus the potential user-service relationship will be modeled correspondingly even the user with few object usage events.

Impact of training ratio on different service recommendation methods (a) training ratio 60%, (b) training ratio 40%, and (c) training ratio 20%.
Conclusion
In this article, we propose a novel method to recommend SIoT service for users, especially for the users with few training data. The proposed method first learns user’s preference from objects usage events with a latent variable model. Then, we construct a high-quality knowledge graph by bridging diverse social relationships among SIoT objects and user’s preference. Specifically, the proposed method jointly embeds users, objects, services, and their corresponding relations into a shared lower-dimensional space. Finally, we model SIoT service recommendation as a knowledge graph completion problem, and use the graph embeddings to decompose the SIoT service recommendation into a linked prediction process while considering the user’s objects usage event and object’s social relationships. Extensive experiments on real-world data sets are conducted and the results demonstrate the effectiveness of the proposed method.
In future work, we will improve the SIoT service recommendation accuracy by considering more context information of users, such as the spatio-temporal behavior pattern and the quality of services.
Footnotes
Handling Editor: Yanjiao Chen
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the Young Scientists Fund of the National Natural Science Foundation of China (grant no. 61802343), in part by the Zhejiang Provincial Natural Science Foundation of China (grant nos. LGF19F020019 and LGN20F020003), and in part by the Intelligent Plant Factory of Zhejiang Province Engineering Lab.
