Keywords

1 Introduction

With the gradual popularity of SOA (Service Oriented Architecture), the available web service number in service communities is becoming increasingly larger. In this situation, many users are apt to find their interested web services through various recommendation techniques, e.g., well-known Collaborative Filtering (i.e., CF; e.g., user-based CF, item-based CF or hybrid CF) [1]. In CF recommendation, through analyzing known user-service rating data (only the subjective rating data is considered in this paper), we can first determine the target user’s similar friends or the target service (i.e., the service preferred by target user)’s similar services, and further recommend appropriate services to the target user.

While due to the inherent sparsity of user-service rating data [2], in certain situations, the target user does not have any similar friend and the target services do not own any similar service. In this situation, traditional CF recommendation approaches cannot deliver an accurate recommendation result, which brings a big challenge for recommendation effect. In view of this challenge, a novel Social Balance Theory [3] (i.e., SBT)-based service recommendation approach, i.e., Rec SBT (Recommendation based on SBT) is put forward in this paper, to help improve the recommendation performance. Different from the traditional CF recommendation approaches, in Rec SBT , we first look for the target user’s “enemy” (i.e., antonym of “friend”), and further determine the target user’s “possible friends” based on Social Balance Theory (e.g., “enemy’s enemy is a friend” rule, “friend’s enemy is an enemy” rule, “enemy’s friend is an enemy” rule); finally, the services preferred by target user’s “possible friends” are recommended to the target user.

The rest of paper is structured as below. In Sect. 2, we formalize the service recommendation problem and clarify the paper motivation. A novel service recommendation approach, i.e., Rec SBT is brought forth in Sect. 3. In Sect. 4, we design a set of experiments to validate the feasibility of Rec SBT . In Sect. 5, we introduce the related works and compare them with our approach. Finally, conclusions are presented in Sect. 6.

2 Formal Specification and Motivation

2.1 Formal Specification

Generally, the service recommendation problem could be formalized with following Web_Ser_Rec (User_set, WS_set, Rating_set, user target ), where

  1. (1)

    User_set = {user 1, …, user m }: user i (1 ≤ i ≤ m) denotes a user in web service community and m is the number of users.

  2. (2)

    WS_set = {ws 1, …, ws n }: ws j (1 ≤ j ≤ n) denotes a service in web service community and n is the number of web services.

  3. (3)

    Rating_set = {r ij | 1 ≤ i ≤ m, 1 ≤ j ≤ n}: r ij denotes user i ’s rating over service ws j . As our previous work [4] did, the popular 1* ~ 5* rating scores are adopted here to depict r ij .

  4. (4)

    user target : target user who requires service recommendation, and user target  ∈ User_set holds here.

With the formal specification, we can clarify the service recommendation problem as below: according to the known user-service rating data (in Rating_set) between users (in User_set) and services (in WS_set), recommend appropriate services from WS_set to the target user user target .

2.2 Motivation

Next, we demonstrate the motivation of our paper with the example presented in Fig. 1. In the example, user set User_set = {John, Lily, Jack} (user target is John) and service sets WS_set = {ws 1, …, ws 6}. The user-service rating data (i.e., Rating_set) is also shown in Fig. 1. As Fig. 1 shows, target user John prefers services ws 1 and ws 2; therefore, ws 1 and ws 2 are called “target services” in the rest of paper.

Fig. 1.
figure 1

Service recommendation scenario: an example

With the known data of User_set, WS_set and Rating_set, we can calculate the similarity between different users by the well-known Pearson Correlation Coefficient (i.e., PCC) [5]. Concretely, similarity Sim (John, Lily) = −1 and Sim (John, Jack) = Null (as John and Jack have not invoked common web services). Likewise, we can also calculate the similarity between target services (i.e., ws 1 and ws 2) and other services (i.e., ws 3, ws 4, ws 5, ws 6). Concretely, Sim (ws 1, ws 3) = Sim (ws 1, ws 4) = Sim (ws 2, ws 3) = Sim (ws 2, ws 4) = −1, while Sim (ws 1, ws 5) = Sim (ws 1, ws 6) = Sim (ws 2, ws 5) = Sim (ws 2, ws 6) = Null.

With the above calculation, a conclusion could be drawn that the target user (i.e., John) has no similar friends and the target services (i.e., ws 1 and ws 2) own no similar services. In this situation, traditional CF recommendation approaches cannot deliver an accurate recommendation result. In view of this shortcoming, we introduce Social Balance Theory into service recommendation and bring forth a novel recommendation approach Rec SBT in the next section.

3 SBT-Based Service Recommendation

3.1 Social Balance Theory

Social Balance Theory analyzes and formalizes the social relationships among involved three parties, and provides us a new perspective for friend recommendation in social network. Concretely, there are several intuitive rules in Social Balance Theory, e.g., “enemy’s enemy is a friend”, “enemy’s friend is an enemy” and “friend’s enemy is an enemy” (The details of SBT are omitted here due to page limit. Readers who are interested in SBT can turn to work [3] for reference).

3.2 Rec SBT : A Service Recommendation Approach

Next, we introduce a novel service recommendation approach Rec SBT by considering the rules in Social Balance Theory. Concretely, our proposal consists of the following three steps (see Fig. 2).

Fig. 2.
figure 2

Three steps of our proposed recommendation approach Rec SBT

  1. (1)

    Step1: Determine “friend” or “enemy” relationship between different users.

First, for two different users user i and user j (user i, user j  ∈ User_set and i  j), we can calculate their similarity Sim(user i, user j ) based on PCC technique, whose formula is specified in (1). Here, set Common_ser_set denotes the common service set that have been invoked and rated by user i and user j; r ik and r jk denote web service ws k ’s rating scores by user i and user j respectively; \( \overline{{r_{i} }} \) and \( \overline{{r_{j} }} \) represent user i ’s and user j ’s average rating scores over all his invoked services. Specially, if user i and user j have not invoked same services before (i.e., Common_ser_set = Null), then Sim(user i, user j ) = Null holds.

$$ Sim\left( {user_{i} ,user_{j} } \right) \, = \frac{{\sum\limits_{{ws_{k} \in \, Common\_ser\_set}} {(r_{i - k} - \overline{{r_{i} }} )*(r_{j - k} - \overline{{r_{j} }} )} }}{{\sqrt {\sum\limits_{{ws_{k} \in \, Common\_ser\_set}} {(r_{i - k} - \overline{{r_{i} }} )^{2} } } *\sqrt {\sum\limits_{{ws_{k} \in \, Common\_ser\_set}} {(r_{j - k} - \overline{{r_{j} }} )^{2} } } }} $$
(1)

Afterwards, according to the derived similarity Sim(user i, user j ) in (1), we can further determine the “friend” or “enemy” relationship between user i and user j by (2). In (2), Q (0.5 ≤ Q ≤ 1) is a pre-set similarity threshold for “friend” relationship; correspondingly, −Q (−1 ≤ −Q ≤ −0.5) is a pre-set similarity threshold for “enemy” relationship. While Friend_set(user i ) and Enemy_set(user i ) denote friend set and enemy set of user i , respectively.

$$ user_{j} \left\{ \begin{aligned} & \in Friend\_set\left( {user_{i} } \right){\text{ if }}Sim\left( {user_{i} ,user_{j} } \right) \ge Q \\ & \in Enemy\_set\left( {user_{i} } \right){\text{ if }}Sim\left( {user_{i} ,user_{j} } \right) \le - Q \\ \end{aligned} \right. $$
(2)
  1. (2)

    Step2: Determine “possible friends” of target user based on SBT.

As Fig. 1 shows, our paper only focuses on the service recommendation scenario where target user has no similar friends; so Friend_set(user target ) = Null holds based on (2). Namely, we can (but not definitely) only obtain the enemy set Enemy_set(user target ) of target user. Next, we introduce how to get the “possible friends” of target user, based on the derived set Enemy_set(user target ) (in Step1) and Social Balance Theory. Concretely, Step2 consists of the following two substeps (see Fig. 3).

Fig. 3.
figure 3

Relationships of user target , user x , user y , user z and user k in Step2

Substep2.1: For each user x  ∈ Enemy_set(user target ), determine his enemy user y (i.e., user y  ∈ Enemy_set(user x )) based on (1) and (2). Then according to “enemy’s enemy is a friend” rule in SBT, we can conclude that user y is a candidate “possible friend” of user target and the credibility could be measured by Friend_probability (user target, user y ) in (3). Afterwards, user y is regarded as a qualified “possible friend” (denoted by set Possible_friend_set (user target )) of user target , if condition in (4) holds (here, Q denotes the pre-set user similarity threshold in (2)).

$$ Friend\_probability\left( {user_{target} ,user_{y} } \right) \, = Sim\left( {user_{target} ,user_{x} } \right) \, *Sim\left( {user_{x} ,user_{y} } \right) $$
(3)
$$ Friend\_probability\left( {user_{target} ,user_{y} } \right) \ge Q $$
(4)

Substep2.2: For each user x  ∈ Enemy_set(user target ), determine his friend user z (i.e., user z  ∈ Friend_set(user x )) based on (1) and (2). Then according to “enemy’s friend is an enemy” rule in SBT, we can also infer that user z is a candidate “enemy” of user target and the credibility could be calculated by Enemy_probability (user target, user z ) in (5). Afterwards, if condition in (6) holds, user z is considered as a qualified “enemy” of user target and put in set Enemy_set(user target ). Similarly, for each user y  ∈ Possible_friend_set (user target ), determine his enemy user k (i.e., user k  ∈ Enemy_set(user y )) based on (1)–(2). Then according to “friend’s enemy is an enemy” rule in SBT, we can infer that user k is a candidate “enemy” of user target and the credibility could be calculated by Enemy_probability (user target, user k ) in (7). Afterwards, if condition (8) holds, user k is regarded as a qualified “enemy” of user target and put in Enemy_set(user target ).

$$ Enemy\_probability\left( {user_{target} ,user_{z} } \right) \, = Sim\left( {user_{target} ,user_{x} } \right) \, *Sim\left( {user_{x} ,user_{z} } \right) $$
(5)
$$ Enemy\_probability\left( {user_{target} ,user_{z} } \right) \le - Q $$
(6)
$$ Enemy\_probability\left( {user_{target} ,user_{k} } \right) \, = Friend\_probability\left( {user_{target} ,user_{y} } \right) \, *Sim\left( {user_{y} ,user_{k} } \right) $$
(7)
$$ Enemy\_probability\left( {user_{target} ,user_{k} } \right) \le - Q $$
(8)

Repeat Step1, Substep2.1 and Substep2.2 until the “possible friend” set of target user, i.e., Possible_friend_set (user target ) stays stable. Then we can obtain the target user’s possible friends, i.e., user y  ∈ Possible_friend_set (user target ).

  1. (3)

    Step3: Service recommendation.

After Step1 and Step2, we can obtain the target user’s “possible friend” set Possible_friend_set (user target ). Next, for each user y  ∈ Possible_friend_set (user target ), we select his/her preferred services (e.g., with 4* or 5* rating from user y ) and recommend them to the target user, so as to finish the whole service recommendation process.

4 Experiment Analyses

4.1 Experiment Dataset and Deployment

Our paper aims at the service recommendation problem with subjective user-service rating data. However, the available service rating data is really rare. Therefore, the popular MovieLens-1M [6] dataset is adopted here for simulation. MovieLens-1M contains 1000209 user-movie ratings from 6040 users over 3952 movies.

In our experiments, the service recommendation accuracy (i.e., MAE) and recall are tested respectively (due to the page limit, detailed calculation formula of accuracy and recall is omitted here). Besides, our proposed Rec SBT approach is compared with another two ones, i.e., WSRec [7] and SBT-SR [4]. The experiments are deployed on a Lenovo PC (2.40 GHz CPU, 2.0 GB RAM), and the software configuration environment is: Windows 7 + JAVA 1.5.

4.2 Experiment Results

In our experiments, m is the number of users and Q denotes the user similarity threshold defined in Eq. (2). In the following two experiment profiles, m is varied from 200 to 1000 and Q = 0.5 holds.

  1. (1)

    Profile 1: Service recommendation accuracy

The MAE values of different approaches (i.e., WSRec, SBT-SR and Rec SBT ) are tested respectively, and their execution results are presented in Fig. 4. As shown in Fig. 4, WSRec’s recommendation accuracy is low (i.e., MAE is high), as only the average rating of the services invoked by target user is considered in WSRec. While Rec SBT and SBT-SR achieve better accuracy than WSRec, which is because more social relationship information among different users are considered. Besides, the recommendation accuracy of Rec SBT and SBT-SR are approximate, because the two approaches both consider the “enemy’s enemy is a friend” rule in SBT.

Fig. 4.
figure 4

Accuracy of three approaches

  1. (2)

    Profile 2: Service recommendation recall

The recommendation recall values of three approaches are tested and presented in Fig. 5. It can be seen from Fig. 5 that WSRec’s recommendation recall is low, as the average idea is adopted in WSRec. Besides, the recommendation recall values of Rec SBT and SBT-SR both increase with the growth of m, this is because more “possible friends” of target user could be found when the user number increases. Furthermore, our proposed Rec SBT outperforms SBT-SR in terms of recommendation recall, which is due to the fact that SBT-SR considers “enemy’s enemy is a friend” rule only, while our proposal considers “enemy’s enemy is a friend” rule, “friend’s enemy is an enemy” rule and “enemy’s friend is an enemy” rule simultaneously.

Fig. 5.
figure 5

Recall of three approaches

5 Related Works and Comparison Analyses

Collaborative Filtering (i.e., CF) has been proven a feasible resolution for service recommendation. Many researchers have investigated this recommendation problem and put forward various CF recommendation approaches, e.g., user-based CF [8], item-based CF [9] and hybrid CF [10], as well as their variants [11, 12].

However, the above works often assume that target user has similar friends or target service owns similar services, without considering the exceptional scenarios where neither similar friend (of target user) nor similar service (of target service) exists. In view of this shortcoming, WSRec approach is put forward in [7], where average rating of the services invoked by target user is recruited for service recommendation of target user. However, the recommendation accuracy of WSRec is often not high because of the adopted average idea. To improve the recommendation accuracy, SBT-SR approach is brought forth in our previous work [4], where “enemy’s enemy is a friend” rule is employed for service recommendation. To further improve the recommendation performance, a novel recommendation approach named Rec SBT is introduced in this paper, where more hidden social relationship information is taken into consideration, e.g., “enemy’s enemy is a friend” rule, “friend’s enemy is an enemy” rule and “enemy’s friend is an enemy” rule. Through these social rules, more “possible friends” of target user could be found and correspondingly, more services that may be preferred by target user are recommended to the target user. At last, we validate the feasibility of our Rec SBT approach through a set of simulation experiments deployed on well-known MovieLens-1M dataset.

6 Conclusions

Due to the inherent sparsity of user-service rating data, it is possible that the target user has no similar friends and the target service (i.e., the service preferred by target user) owns no similar services. In this situation, traditional CF recommendation approaches fail to deliver a satisfying recommendation result. In view of this shortcoming, we put forward a novel service recommendation approach Rec SBT based on Social Balance Theory. Finally, a set of simulation experiments are deployed to validate the feasibility of our Rec SBT approach in terms of recommendation accuracy and recall. In the future, we will introduce the time factor into service recommendation, so as to accommodate the dynamic waves of user preference.