Keywords

1 Introduction

Initial research on such recommendation systems in social networks such as online social network, the blog sphere, social bookmarking applications do not incorporate the “trust” in the suggestions. Calculation of such kind of trust worthy recommendation is somewhat difficult because trust is personalized and also it is subjective and affected by each user’s personal thoughts and beliefs, as well as those of members whom the user trust and respects, and this is the bottle neck problem. The main goal and challenge of the system is recommending personalized users to another user by matching their profiles as well as considering trust between them.

The goal of this research is to design a web-based recommender system in social network that will provide suggestions to the users by analyzing the behaviour of each user in the social network as well as filtering out the similar users from the network. Literature survey is the first step towards the goal. The survey will focus on the requirements. The next step is to plan the project. To make the system platform independent, JAVA language is used. To handle a large database of social network, MySQL database engine is used. To test the system, the standard dataset of Epinions which is a large product review community site, is used. In order to give suggestions based on profile matching concept, generation of the users’ profiles is done.

2 Related Work

The content and links analysis in social networks has increased the research in the related fields [1]. The largest body of work that considered positive trust and/or its propagation in the recommender systems focused mainly on item recommendations [25]. Walter et al. has introduced Time dynamics. The trust propagation is employed through transitivity and, similarly to this proposed recommender system, discounting takes place by multiplying trust values along paths. Making new connections, according to personalized preferences is an important service in social networking, where an initiating user can search matching users from a group of users in physical proximity of the user. According to the work in [6], FindU, a privacy-preserving profile matching scheme is proposed. In FindU, an initiating user can find the one whose profile best matches with user, from a group of users; to limit the risk of exposing privacy, only necessary and minimal information regarding the private attributes belonging to the profile of participating users is exchanged, by preserving the privacy of users. The task of providing personalized recommendations requires the ability of predicting the items. Such a prediction is typically based on (1) content—recommending items with content similar to content of items which users have already consumed; (2) social networks—providing items related to users who are related to other users either by explicit connection, or by some kind of similarity.

It has been shown that considering social network relationships and respective opinions/ratings improve the prediction and in turn the recommendation process [7, 8]. A similar type of work focused on content ranking, which is consequently employed to recommend the top-ranked items to users. A more generic model has been presented in the previous work [9], which can be applied to any social medium. To recommend users in social media, work defined local metrics and global metrics. But, in that work, the notion of negative trust among users was not incorporated. Recently, negative trust has been introduced for user recommendations in social networks [10, 11]. In this model, the trust of any user to another user considers personalized reputation rating. This rating uses information of explicit connections among users and implicit connections that are inferred from the interactions among users of the social network. Social networking sites help users to articulate their social networks by adding other users to their “friend lists” [8]. Leskovec et al. [12] tried to predict negative and positive links in social networks by the use of machine-learning framework and ideas, which are drawn from sociology, have derived opposite results. Recommendations are based on aggregated social network information from various sources across the organization [13]. Trust is nothing but the belief of user in the behaviour of other user to act reliably and honestly unlike of distrust [14]. The previous work done mainly focused on the item and user recommendation without considering the trust relationship between them. Because of this, the security of user to user connection might be disturbed. Thus, we propose a trust-aware system for providing users recommendations in order to make connections of social network trustworthy by giving positive and negative recommendations to the users while matching their profiles for strong connection.

3 Proposed System

The proposed recommender system is based on reputation mechanism which gives rating to the participants using observations, their past experiences and other user’s view/opinion about them. For computing reputation of each member, the properties of trust such as transitivity, personalization and context are adopted. Also, to address the social network dynamics, the element of time has been included in the proposed system. To this direction, suggestion is given that reputation varies with time. Hence, value of the positive or negative reputation of a user tends to zero unless and until new explicit or implicit trust/distrust statements are added frequently. Finally, we assume that the trust context is same among members of the community. Specifically, after processing information posted on the network, both explicit and implicit connections are formed that bear trust statements between network members (stage 1), estimation of reputation ratings are done (stage 2) and personalized recommendations (considering both positive and negative trust) are generated (stage 3). Before providing recommendations, profile matching is done to filter out the results. (Contribution)

Stage 1: User Connection Formation

The proposed system considers the difference between explicit trust or distrust connections amongst users that have strong trust semantics and implicit trust statements that have more transient connections between users in the network. These user connection formation or trust bonds can be categorized as follows:

  1. (A)

    Explicit user-to-user connection: A user can directly relate to other user by making trust or distrust connections. These connections express permanent bonds between users of a network.

  2. (B)

    Explicit user-to-item connection: In this type, the user gives a like/dislike statement to a particular item posted by other user.

  3. (C)

    Implicit user-to-item connection: In this each content item posted by a user has a timestamp and unique identifier. Preference to an item is given implicitly.

  4. (D)

    Implicit user-to-user connection: In this connection, the information of user-to-item connection is mapped to the user-to-user level, which is aggregated for providing a single implicit connection between two users.

Stage 2: Reputation Rating Estimation

The proposed reputation rating mechanism considers the effect of time by modelling the fact that newly added trust or distrust connections and recently added like/dislike statements should have more value in the evaluation of the overall reputation rating of target user by the evaluator. So, dynamic aspect of social network is taken into consideration and is effectively addressed. Following are the reputation rating systems (A) Local Rating (B) Collaborative Rating (C) Transitivity of Trust (D) Trust aware personalized recommendations [15].

Contribution: The proposed system considers the negative trust between users to help them getting connected to another trustworthy user and to alert them from getting connected to such untrustworthy user. Before providing the list, apart from these filters, we can contribute one more step which is mode of filter, i.e. profile matching of the users. In this mode the proposed system can provide list of friends or enemies using set of privacy-preserving profile matching schemes. In this step, the initiating user can find from group of users the one, whose profile best matches with user [16]. Active user in social network will get suggestions of active users matching profile with each other.

Stage 3: Recommendations Generations

The proposed system generates personalized positive/negative user recommendations that are obtained as a result of the overall reputation ratings of the members of social network estimated by the evaluator user and the result of profile matching. Both positive and negative recommendations could help user to update his trust and distrust network connections. Figure 1 shows the overall architecture of proposed system: [17]

Fig. 1
figure 1

Overall system architecture

In order to provide recommendations to the user, following steps are executed by the system. Let us assume the presence of N users U = {U1, U2, …, U n} in a social network. Every member \( Uj \,\epsilon\, U \), posts several items while in the network. Additionally, Fr (Uj) and En (Uj) represents the friend list and the enemy list of user Uj, respectively.

Step 1: Calculate explicit user-to-user trust/distrust, i.e.

$$ {\text{UserConn}}\left( {{{Uj}} \to {{Ui}},{{Tk}}} \right) $$
(1)

It is assumed that UserConn(Uj → Ui, Tk) lies within the [–1, 1] range, where a value close to 1(–1) indicates that the target Ui is a friend(enemy) of the evaluator user Uj.

Step 2: Calculate explicit user-to-item connection

It corresponds to the explicit user-to-item connections. This factor has been assumed to lie within the [–1, 1] range and is defined as follows.

$$ {\text{ExplConn}}\left( {Uj \to Ui, Tk} \right) = \frac{{{\text{PosExpl}}\left( {Uj \to Ui, Tk} \right){-} {\text{NegExpl}}\left( {Uj \to Ui, Tk} \right)}}{{{\text{PosExpl}}\left( {Uj \to Ui, Tk} \right) + {\text{NegExpl}}\left( {Uj \to Ui, Tk} \right)}} $$
(2)

where, PosExpl(Uj → Ui, Tk) and NegExpl(Uj → Ui, Tk) gives the number of positive and negative user-to-item explicit opinions, respectively as represented by user Uj, at time period Tk on the items posted by user Ui. The denominator represents the total number of opinions expressed by user Uj in time period Tk on any posted item.

Step 3: Calculate implicit user-to-item connection ImplConn(Uj → Ui, Tk)

It corresponds to the implicit user-to-item connections. This factor also lies within the [–1, 1] range and is given by the following equation

$$ {\text{ImplConn}}\left( {Uj \to Ui, Tk} \right) = \frac{{\text{PosImpl}}(Uj \to Ui, Tk) - {\text{NegImpl}}(Uj \to Ui, Tk)}{{\text{PosImpl}}(Uj \to Ui, Tk) + {\text{NegImpl}}(Uj \to Ui, Tk)} $$
(3)

where, PosImpl(Uj → Ui, Tk) and NegImpl(Uj → Ui, Tk) represents the number of positive and negative user-to-item implicit connections, as given by links from the items posted by user Uj at time period Tk on the items posted by user Ui, respectively the denominator represents the total number of links from the items posted by user Uj in time period Tk on any posted item.

Step 4: Calculate Local Rating of User based on explicit user to user, explicit user to item and implicit user to item connection

Here the proposed model assumes that the local rating estimation takes place at consecutive and equally distributed time intervals represented henceforth as Tk, k ϵ N. For this, first we have to calculate the user reputation rating RatingUj → Ui, Tk) of Ui from Uj at time period Tk is given by the following formula,

$$ \begin{aligned} & {\text{Rating}}\left( {Uj \to Ui, Tk} \right) \\ & \quad \quad \quad \quad \quad \quad \quad = {\text{Wuser.UserConn}} \left( {Uj \to Ui, Tk} \right) \\ & \quad \quad \quad \quad \quad \quad \quad + \; {\text{Wexpl.ExplConn}} \left( {Uj \to Ui, Tk} \right) \\ & \quad \quad \quad \quad \quad \quad \quad + \;{\text{Wimpl.ImplConn}} \left( {Uj \to Ui, Tk} \right) \\ \end{aligned} $$
(4)

where, Wuser + Wexpl + Wimpl = 1.

Weights Wuser; Wexpl and Wimpl provide the relative significance of the three factors user-to-user connections, user-to-item explicit connections and user-to-item implicit connections, respectively. Rating (Uj → Ui, Tk) lies within the [–1, 1] range. Using Rating (Uj → Ui, Tk) we can calculate LocalRating (Uj → Ui, Tc). For the formation of the local user reputation rating at the current time period Tc, the evaluator considers only the r more recent ratings formed by the user. The value of r determines the memory of the system. The local reputation rating LocalRating (Uj → Ui, Tc) of user Ui, as estimated by Uj at time period Tc, is defined as follows:

$$ {\text{LocalRating}}(Uj \to Ui,Tc) = \mathop \sum \limits_{k = c - r + 1, k > 0}^{c} {\text{dfk.Rating}}(Uj \to Ui,Tk) $$
(5)

Step 5: Calculate collaborative rating using Local rating

$$ \begin{aligned} & {\text{CollRating}}\left( {Uj \to Ui,Tc} \right) = {\text{cred}}\left( {Uj \to Uj,Tc} \right).{\text{LocalRating}}\left( {Uj \to Ui,Tc} \right) \\ &+\, \sum\nolimits_{q = 1,q \ne i,j}^{Q} {cred} \left( {Uj \to Uq,Tc} \right).{\text{LocalRating}}\left( {Uj \to Ui,Tc} \right) \\ \end{aligned} $$
(6)

Here, the weight cred(Uj → Ui, Tc) is a measure of the credibility of witness Uq and the respective rating of Ui in the eyes of the evaluator Uj.

4 Experimental Setup

For experimental purpose we have used systems that act as client and server. This proposed system is implemented using JAVA environment. HTML, CSS and JavaScript technologies are used for front end development. This system is client--server architecture. At the server end apache tomcat container is used. For database MySQL is used. We have setup jdk-7, apache tomcat-7 and mysql-5.3 on this system. To test our system functionality we have built experimental setup. In this we use already existing dataset as previous user input to the system. Also the dataset is modified as per the proposed system’s requirement.

5 Results

Epinions is used as dataset [18]. Epinions supports various types of interactions between users, such as explicit user-to-user trust statements and product reviews written by the community members and rated by other members [18]. For Profile dataset we have used online fake profile generator [19]. Using this generator we have generated records with multiple attributes such as: <name, age, gender, city, occupation, address.>

As per the experimental setup, we have used modified dataset which consists of profiles mapped to the users in Epinions dataset. As per our setup user can become the part of our system and send friend request to each other. After establishment of relationship between them user can send comments to each other, user can explicitly like and dislike the comments. User can rate for particular comment. All these data transactions are considered to calculate the local rating; collaborative rating which forms the trust about the user and it is helpful for us to recommend the friends. As part of contribution user profiles are also matched from the list recommended on the basis of collaborative rating.

From the Table 1, it is clear that when we apply profile matching, the number of recommendations is reduced. Though the number is reduced, we get more precise and accurate recommendations.

Table 1 Comparison between collaborative recommendations, recommendations filtered by negative local rating and recommendations filtered by negative local rating and profile matching

6 Performance Evaluation

To evaluate the performance of the proposed system, we can analyze the results from the Table 1. The collaborative recommendations are generated by considering both positive and negative trust of users. Thus we get more number of recommendations. Now when we filter results by negative local rating, the users having negative local rating are removed from the list of recommendations. Again when we apply filter of profile matching, the users having zero percent profile match with the evaluator user are removed from the list of recommendations. Thus we get more accurate and precise list of recommendations.

From the graph shown in Fig. 2, we can analyze the results. The complexity of the system is calculated based on reputation rating estimation and profile matching algorithm. Let ‘n’ be the number of users. To match the profile with every other member we have (n) iterations. Each user in the network is connected with his friends. The reputation rating of every user is computed with respect to ratings provided by his friends. Thus, for reputation rating estimation, the algorithm is executed (n – 1) times. Hence the computation is (n – 1) + (n) = (2 * n) – 1. Thus the time complexity is O(n).

Fig. 2
figure 2

Analysis of result

The generated values are compared with real values by analyzing the dataset. After evaluation we have calculated precision and recall. The analysis is shown in Table 2. In table, ‘A’ is Collaborative Recommendations, ‘B’ is Recommendations filtered by Local Rating and ‘C’ is that filtered by Local rating and profile matching.

Table 2 Performance analysis

7 Conclusion and Future Scope

The previous work done mainly focused on the item and user recommendation without considering the trust relationship between them due to which the security of user connection might be disturbed. Thus, we propose a trust-aware user recommender system to make connections of social network trustworthy by giving positive and negative recommendations to the users while matching their profiles for strong connection. So that, positive recommendations will help in connecting trustworthy users while negative recommendations will alert users not to connect to the untrustworthy users and making aware of the items posted by such user. Profile matching gives more filtered results.

In future, more profile attributes can be added for matching in order to get more efficient and accurate recommendations. Also, for generating recommendations based on local rating and collaborative rating, personal chats can be semantically analyzed along with the comments and posts. The analysis of posted images can be done in order to provide personalized recommendations.