A Novel Intelligent Recommendation Algorithm Based on Mass Diffusion

Social recommendation algorithm is a common tool for recommending interesting or potentially useful items to users amidst the sea of online information. -e users usually have various relationships, each of which has its unique impact on the recommendation results. It is unlikely to make accurate recommendations solely based on one relationship. Based on user-item bipartite graph, this paper establishes a multisubnet composited complex network (MSCCN) of multiple user relationships and then extends the mass diffusion (MD) algorithm into a novel intelligent recommendation algorithm. Two public online datasets, namely, Epinions and FilmTrust, were selected to verify the effect of the proposed algorithm. -e results show that the proposed intelligent recommendation algorithm with two types of relationships made much more accurate recommendations than that with a single relationship and the traditional MD algorithm.


Introduction
e era of information technology is defined by the explosion of all sorts of information.
e wealth of information not only provides human with more choices but also causes serious information overload [1][2][3][4][5]; amidst the sea of information, it is difficult for users to find the information that they really need. As a result, how to provide users with useful information from massive data has become a research hotspot. To solve information overload, many recommendation systems have been developed to predict user preference based on their historical data and recommend interesting or potentially useful information to them [6][7][8].
e common recommendation methods can be divided into collaborative filtering (CF) recommendation [9], content-based recommendation [10], spectrum analysis recommendation [11,12], and hybrid recommendation [13,14]. e recommendation methods based on user or item similarity are also quite popular, namely, mass diffusion (MD) algorithm and heat spreading (HeatS) algorithm. e MD is a classic algorithm capable of making accurate recommendations of items to users. By the principle of energy distribution, the algorithm spreads energy from the initial items to different items and recommend the items with relatively high energy at a high probability.
After predicting user preference, Bin et al. [15] evaluated the popularity of each item and used it to modify the MD algorithm. Based on mass diffusion and heat spreading in physical kinetics, Hu et al. [16] summarized the mechanism of energy distribution and realized a recommendation mechanism based on the tripartite of user, item, and topic. Li et al. [17] managed to improve recommendation quality through singular value decomposition (SVD) of the recommendation results. e above studies mainly recommend items to users based on the item scores rated by users. However, none of them have considered the influence of multiple social relationships on user preference. In fact, the preference of a user is affected by his/her trusted friends. erefore, this paper constructs a complex network with multiple social relationships. e network incorporates multiple user relationships into the recommendation system, which effectively improves the recommendation accuracy.

Multisubnet Composited Complex Network (MSCCN) Model
ere are various systems that can be modeled in our daily life, such as the urban system, ecosystem, transport system, and recommendation system. In a complex system, each object can be treated as a node, and each relationship between objects can be represented as an edge, turning the system into a complex network [18][19][20].
e MSCCN model [20][21][22][23] can describe multiple relationships among heterogeneous individuals in complex systems. For example, users and items can be considered nodes, while the user relationships and user-item relationships can be regarded as edges in the recommendation system.
By integrating multiple subnets and relationships among complex systems, the MSCCN model can be expressed as a is the set of relationships (r i is a type of relationship; n is the number of relationship types), and F: E ⟶ φ R is the mapping of set E to R by the φ function, reflecting the type of relationship on each edge. e structure of a typical MSCNN model is presented in Figure 1, where R � R 1 × R 2 , R 1 � r 1 , and R 2 � r 2 . As shown in Figure 1, the edges v 1 , v 2 , v 1 , v 3 , and v 2 , v 3 only have R 1 relationship, the edges v 2 , v 5 , v 3 , v 5 , and v 4 , v 5 only have R 2 relationship, and the edge v 3 , v 4 has both R 1 and R 2 relationships.

MD Algorithm Based on MSCCN Model
3.1. MD Algorithm. As proposed by Li et al. [17], the MD algorithm can be implemented as follows: First, a unit of energy is placed on the items selected by the target user. en, the energy spreads from the items to the users who select them. At this time, the energy h i obtained by user u i can be calculated by where k β is the degree of item o β ; n is the number of items; f β is the energy of item o β ; a iβ is the selection variable of items. If item o β is selected by user u i , then a iβ � 1.
Next, the energy that is spread to users is distributed to the items selected by users. After the distribution, the energy f α ′ obtained by item o α can be expressed as where d i is the degree of user u i ; m is the number of users.
Let f → and f → ′ be the initial and final energy of items, respectively. en, the entire diffusion process can be defined as where W M is the state transition matrix. Each element w M αβ of the matrix satisfies After diffusion, the unselected items are arranged in descending order by the resource quantity, forming a recommendation list. is recommendation list is generated solely based on user-item relationships, without considering the social relationships of the target user. e workflow of the MD algorithm is illustrated in

MD Algorithm Based on MSCCN Network (SMD).
By the MD algorithm, the recommendation list is generated solely based on user-item relationships, failing to consider the social relationships of the target user. To overcome the defect, this paper introduces the social relationship into the recommendation system by setting up a multirelationship network, allowing the initial energy of item nodes to spread along the edges in the network. Let r 1 and r 2 be user-item relationship and user relationship in the multirelationship network, respectively. It is assumed that the weights of the two types of relationship are both 1. en, the proportionality coefficient sf 1 of r 1 and that sf 2 of r 2 satisfy sf 1 + sf 2 � 1. Assuming that sf 1 is p, then sf 2 � 1 − p, pϵ(0, 1). After introducing one type of social relationship, the SMD algorithm can be implemented as follows: (i) Step 1. One unit of energy is distributed to the items selected by the target user, serving as the initial energy of items. Step 2. e initial energy of items spread to the users who have selected them. e energy h i obtained by user u i can be described as where a 1 iβ and a 2 iβ are selection variables of items; k Step 3. e energy spreads to users and items along edges in the composite network. en, the energy h j ′ obtained by user u j and that f α ′ obtained by item o α can be, respectively, described as (iv) Step 4. e energy allocated to the user via r 2 relationship further spreads to the items. en, the energy f α ″ obtained by the item o α can be depicted as us, the total energy g α obtained by item o α can be defined as Next, the unselected items are sorted by the final energy, producing a recommendation list. e diffusion process of the SMD algorithm with one type of relationship (SMD1) is explained by the example in Figure 3, where p � 0.5.
In real social networks, there are usually multiple relationships, each of which has its unique impact on recommendation results. e multiple relationships could be introduced to the MD algorithm through the loading operation of the MSCCN model [20]. Here, another type of relationship denoted as r 3 is imported to the network of Figure 3. Suppose sf 1 � p and 1), and qϵ(0, 1). In this case, the element w M αβ of state transition matrix satisfies (10) Figure 4 shows the process of the SMD algorithm with two types of relationships (SMD2), where p � 0.5 and q � 0.5.  If q � 0 or q � 1, that is, sf 2 � 0 or sf 3 � 0, the SMD2 algorithm degenerates into the SMD1 algorithm.

Experimental Data.
Two public online datasets, Epinions and FilmTrust, were selected to evaluate the performance of the proposed algorithm. e Epinions dataset contains 40,272 users, 139,738 items, 487,182 user relationships, and more than 664,000 item scores rated by users.
e FilmTrust dataset provides 1,050 users, 2,071 items, >1,800 user relationships, and 35,497 item scores rated by users. e original data were preprocessed by removing the relationships of the users that have not selected any items.

Evaluation Indices.
Fivefold cross validation was employed to test the performance of the SMD algorithm. Specifically, the preprocessed data were randomly split into five subsets. For each experiment, a random subset was chosen as the test set, and the remaining subsets were chosen as training sets. Five experiments were conducted to ensure that the SMD algorithm is tested on each subset. e results of the five experiments were averaged to obtain the final result.
en, the mean ranking score (RS) [15] was introduced to evaluate the ranking accuracy of the SMD algorithm, and the Hamming distance [24] was adopted to measure the diversity of recommendation results.
Suppose the target user u i has chosen the item o j in the test set. en, the ranking r ij of item o j in the recommendation list can be calculated. For the mean RS of all the items chosen by the user from the test set, the higher the value of mean RS, the better the accuracy of the recommendation algorithm. e RS of user u i can be calculated by where E P i is the number of items preferred by user u i in test set; iα is the item α preferred by user i in the test set.
e Hamming distance can be defined as where u and t are two users; Q ut (L) is the number of overlapping items in the recommendation lists of the two users; L is the length of the recommendation list. If H ut (L) � 1, the two recommendation lists have no overlapping items; if H ut (L) � 0, the two recommendation lists are identical.

Results
Analysis. e numerical simulation was performed to determine the values of p and q. Figure 5 presents the simulation results of SMD1 on the two datasets with q � 0 and p changing between various values. As shown in Figure 5, the optimal RS value was reached at p � 0.4 on Epinions dataset, indicating that SMD1 has the highest accuracy at p � 0.4. Similarly, it can be inferred that SMD1 has the highest accuracy at p � 0.9 on FilmTrust dataset.
Let O u and O v be the sets of items chosen by users u and v, respectively. e greater the number of overlapping items in the two sets is, the more likely that the two users have the same interests, and the greater they influence each other. e user similarity can be defined as If f uv > 0.2, the two users have similar interests. Figure 6 displays the simulation results of SMD2 with both p and q changing between various values.
As shown in Figure 6, the RS value reached the minimum at p � 0.4 and q � 0.2 on Epinions dataset. is means, on Epinions dataset, the SMD2 has the highest accuracy at p � 0.4 and q � 0.2. Similarly, the SMD2 has the highest accuracy at p � 0.9 and q � 0.9 on FilmTrust dataset. Since r 3 relationship is denser than r 2 relationship, the recommendation accuracy increases as q approaches 1 on FilmTrust dataset.
For comparison, traditional recommendation algorithms, namely, HeatS algorithm and Hybrid algorithm [25], were also applied on Epinions dataset and FilmTrust dataset.
e RS values of the Hybrid algorithm were minimized on the two datasets, when the regularization parameter λ was 0.67 and 0.5, respectively. Table 1 compares the results of the contrastive algorithms at the optimal values of p and q.
As shown in Table 1, SMD2 achieved slightly higher recommendation accuracy than SMD1. e accuracy of the two algorithms was marked higher than that of the traditional algorithms on the two datasets. e results indicate that the recommendation system becomes more accurate, thanks to the introduction of multiple social relationships. e diversity of the recommendation list is also an important indicator of recommendation quality. Figure 7 shows the diversity trends of recommendation list on Epinions dataset and FilmTrust dataset, with the list length changing between various values.
As shown in Figure 7, the length of the recommendation list is positively correlated with the similarity between recommendation lists for different users. On the two datasets, SMD2 and SMD1 had lower recommendation diversity than the MD algorithm. e relatively low diversity is the result of the following: After user relationship(s) is introduced, the recommendation list for a user is affected by his/her historical scores and also the historical scores of the relevant users. In other words, the recommendation list of a user will bear a high resemblance to that of users, who has social relationships with the user. e HeatS algorithm achieved higher recommendation diversity than the MD algorithm because it attracts the historical scores of the user to the less popular items.
In the real world, some users only select very few items. For implicitly, the users who have purchased fewer than 30 Discrete Dynamics in Nature and Society items were defined as small-degree users, and the other users as generous-degree users. e small-degree users generate relatively few data to be used for recommendation. erefore, the recommendation to such users is usually of low accuracy. en, the users with k i ≤ 30 (k i is the degree of user u i ) on the two selected datasets were treated as a smalldegree user group. Figure 8 shows the recommendation results of SMD for this user group on the two datasets, with q � 0 and p changing between various values.
As shown in Figure 8, SMD1 algorithm achieved the minimum RS at p � 0.2 and p � 0.6, respectively, on Epinions and FilmTrust datasets. e p value decreased from the scenario in Figure 5, where SMD1 achieved the highest accuracy at p � 0.4 and p � 0.9, respectively. e p value determines the number of resources that need to be transmitted through the social network to reach the item during the diffusion process. e smaller the p value, the greater the resource demand.  To further explore the relationship between parameters p and k i , the RS values were grouped by user degree. Figure 9 shows the p values corresponding to the optimal RS values on the two datasets.
As shown in Figure 9, the relationships between p and k i exhibited a consistent trend on the two datasets: the smaller the degree of the target user, the smaller the p value for the RS to reach the optimal value. A user with a small degree chooses only a few items and provides limited information for the recommendation algorithm. erefore, the recommendation accuracy for small-degree users needs to be improved based on social network information.
To demonstrate the superiority of SMD in the recommendation for small-degree users, the small-degree users satisfying k i ≤ 30 were grouped by k i , as p and q reached the optimal values on the two datasets. Figure 10 compares the optimal RS values under SMD and MD for small-degree users.
As shown in Figure 10, the highest RS values were achieved by MD algorithm on Epinions dataset, followed in    Discrete Dynamics in Nature and Society turn by SMD1 and SMD2. at is, for small-degree users, SMD outperforms the MD in recommendation accuracy; the advantage increases with the reduction of user degree. e same was observed on FilmTrust dataset. To sum up, SMD is more effective than MD in the recommendation for smalldegree users.

Conclusions
is paper introduces social information to the MSCCN model to create a complex network of multiple relationships.
On this basis, the MD algorithm was improved into the SMD. Experimental results show that the SMD made a highly accurate recommendation to users because it considers the potentially useful items of different users in the social network. It is also learned that SMD2 outperformed SMD1 and MD, indicating that the integration of two types of relationships is better than incorporating only one type of relationship or considering no social relationship. In other words, the recommendation accuracy can be greatly improved by introducing multiple social relationships between users. In addition, the experiments also demonstrated that   Discrete Dynamics in Nature and Society the SMD is highly effective in making accurate recommendations to small-degree users. e future research will discover the implicit social relationships between users and evaluate their impacts on recommendation results.

Data Availability
e basic data used in this paper were downloaded from two public datasets online: the Epinions http://www.trustlet.org/ epinions.html and the FilmTrust https://www.librec.net/ datasets.html.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.