A Service Recommendation Method Based on Requirements for the Cloud Environment

In the cloud computing environment, there are huge amounts of functionally similar cloud services. Additionally, user requirements can change. Therefore, it is diﬃcult to recommend services that meet users’ requirements. To overcome the problems, a service recommendation method based on requirements is proposed. First, we form user communities by clustering to reduce the recommended range. Second, we use the reported QoS (Quality of Service) values and the evaluated QoS values to predict the QoS requirements of users. Third, based on the requirements, the matching degree of users to services is obtained. Finally, based on the similarity between the target user and the user’s neighbors and the diﬀerence in their matching degree of service and the ratings of services by the neighbors, we can obtain a list of service recommendations for the target user. Compared to the traditional collaborative ﬁltering method and the deviation-based method, our method improves the recommendation accuracy without lowering the eﬃciency.


Introduction
e rapid development of Internet technology gave rise to the emergence of cloud computing, which has rapidly developed into one of the hot research fields. Cloud computing has superpowerful computing power and storage capacity. For example, in the mobile Internet, new service models and mobile applications based on mobile cloud computing show rocketing development trends [1]. Cloud computing utilizes the resource pool based on virtualization technology to provide on-demand services (i.e., cloud infrastructure, development platform, and software), which can be paid for dynamically, can be easily extended, and are fast and flexible. Users can get cloud services at any time and any place from cloud platforms. Faced with a vast amount of cloud services with similar or even identical functions, it is difficult for users, especially ordinary users, to choose the services that truly meet their requirements.
Service recommendation technology has been shown to be a valuable tool. e core idea of service recommendation technology is to identify and predict the needs of users and provide corresponding recommendations to users. Existing popular recommendation methods are roughly divided into several categories: content-based recommendation [2,3], collaborative filtering recommendation [4][5][6][7][8][9][10][11][12], recommendation based on association rules [13][14][15], knowledgebased recommendation [16][17][18], and hybrid recommendation methods [19,20]. Content-based methods recommend similar items to a user according to the items that the user has liked in the past. ese methods can reduce the influence of users' subjective factors and data sparsity on recommendations. Collaborative filtering methods utilize neighbors' known preferences to predict a user's potential preferences for items. ese methods rely too heavily on the evaluations of neighbors and have the cold start and data sparsity problems. Recommendation methods based on association rules count the relationships in which different rules appear based on historical data. Knowledge-based methods recommend items to a user in an interactive manner. Hybrid recommendation methods combine multiple methods to overcome the disadvantages of a single method. e above methods usually make recommendations based on historical circumstances, and it is difficult for these methods to respond to the changing needs of users.
However, in fact, user requirements change over time, for example, a user with no specialist knowledge cannot accurately select services according to his or her requirements in the beginning. As a result, services recommended entirely based on historical records may not be suitable. erefore, we need to predict the requirements of users to accurately recommend services that meet user requirements. In this paper, a service recommendation method based on requirements is proposed. We combine the evaluated QoS values of the users who are in the same community as a target user, the average rating of services evaluated by the target user, and the QoS value reported by the corresponding provider to predict the QoS required or expected by the target user. at is to say, we use the difference in ratings between the target user and similar users to embody the change.
e main contributions are as follows: (1) a method for predicting the user requirements that is based on the reported QoS value and the evaluated QoS value is proposed to better reflect the actual requirements of users, (2) a method for calculating the matching degree of a user to a service that is based on the requirements is proposed to improve the recommendation accuracy, and (3) the construction of community based on similarity can reduce the recommended range to improve the recommendation efficiency. e rest of the paper is organized as follows. Section 2 explores the related works. A service recommendation method based on requirements is presented in Section 3. Section 4 evaluates our method using experiments and complexity analysis. Finally, Section 5 summarizes all of our research.

Related Work
Recently, researchers have proposed many recommendation methods for the cloud environment.

Collaborative Filtering Methods.
Considering the frequent changes in cloud service quality over time, Ding et al. [8] proposed a time-aware cloud service recommendation method using similarity-enhanced collaborative filtering and the autoregressive integrated moving average model to obtain the time feature of the user similarity, address the data sparsity, and predict the QoS values. To improve the prediction accuracy and recommendation efficiency, Afify et al. [9] proposed a hybrid collaborative filtering method based on the model and memory that uses user statistics, service ratings, and user interests to measure the similarity. Liu et al. [10] proposed a web recommendation method based on the locations of users and services to improve the prediction accuracy and computational efficiency. In [11], a service recommendation method based on keywords was proposed to meet users' personalized requirements, which can improve the accuracy and scalability. Zheng et al. [12] proposed a collaborative filtering recommendation method based on the Spearman coefficient to predict the QoS of the active user for an unrated item, which can get more reliable rankings than the method based on the Pearson coefficient. Liu et al. [21] used similarity-enhanced collaborative filtering for QoS prediction, which considers the personalized influence of similar users and services. Chen et al. [22] proposed a modelbased service QoS prediction method, which uses the known QoS values to learn a predictive model.

Association Rules Methods.
Zhang et al. [14] proposed a frequent pattern growth association rules algorithm and a multilevel FP-Tree based on the association rules to extract the higher-level relationships and then combined user interests with the improved clustering algorithm to improve the accuracy of cloud service recommendation. Ming et al. [15] proposed a service recommendation method based on multitag and association rules, which can recommend services that are close to users' potential interests.

Knowledge-Based
Methods. Vera-del-Campo et al. [17] proposed a recommendation system that focuses on the protection of all participants against attacks. In the system, the recommenders use the intermediate nodes to recommend services to users. Amin et al. [18] proposed a recommendation method for cloud infrastructures based on a software approach to achieve an energy-efficient cloud platform.

Trust-Based Methods.
Deng et al. [23] proposed a service recommendation method based on a social network. It considers users' historic behaviors, users' preferences, the trust relationships among users in a social network, and users' comments.
e results show that this method can improve the recall rate and precision. Considering the impact of trust on the recommendation accuracy, Yin et al. [24] proposed a cloud service recommendation method based on the trust path model and loop trust model, and the results show that this method improves both the MEA and RMSE by 2%. Due to the existence of unreliable QoS data, Su et al. [25] proposed a trust-based method for reliable personalized QoS prediction to recommend services to users.

Other Methods.
Ding et al. [26] proposed two modified cloud service recommendation algorithms that simultaneously consider the accuracy and diversity by viewing service recommendation as a multiobjective optimization problem, which can improve prediction accuracy and guarantee greater diversity. Zhang et al. [27] proposed a realtime QoS-aware decision-making technique based on the analytic hierarchy process method, which is suitable for selecting infrastructure services for users according to the design time and real-time QoS constraints defined by users.
is method acquires the best-fit combinations of cloud services using the matching degree between the constraints and the knowledge base. Considering the historical userservice quality data on multiple platforms, Qi et al. [28] proposed a distributed cloud service recommendation approach based on locality-sensitive hashing, which can improve recommendation accuracy, scalability, and privacy preservation. Karthikeyan et al. [29] proposed a cloud service recommendation system based on semantic technologies, which uses a natural language processing method to parse the cloud service description documents and process the user queries. Wu et al. [30] proposed a QoS prediction method based on the deviation for cloud and IoT services, which can improve the accuracy and overcome the existing difficulties of heuristic collaborative filtering methods.
However, most of the cloud service recommendation methods do not consider the following fact: the requirements of users change. In particular, a user with no specialist knowledge can hardly accurately select satisfactory services according to his or her requirements at the beginning. erefore, in this paper, we propose a service recommendation method based on requirements, which can improve the recommendation accuracy without lowering the efficiency.

Cloud Service Recommendation Method Based on Requirements
3.1. Description. After a service provider registers its services (i.e., items) on the cloud platform, it reports the quality of service (QoS) that can be provided. e quality of service is described using multiple dimensions, such as the response time, network bandwidth, throughput, and failure rate. e user gives a rating for each dimension after a user interacts with a service. e data source of our recommendation system is D � (U, P, Q, R), where U � (u 1 , u 2 , . . . , u n ) is a set of users in the system, P � (p 1 , p 2 , . . . , p m ) is a set of services containing the basic information of services, and Q � (q p 1 , q p 2 , . . . , q p m ) is the QoS value reported for each service at the time of its registration. q p j (j � 1, 2, . . . , m) is a ω-dimensional QoS vector, where q p j � (q 1 p j , q 2 p j , . . . , q ω p j ) and 0 ≤ q x p j ≤ 1 (x � 1, 2, . . . , ω). Each dimension describes the QoS of a service attribute. R is an m × n order matrix (as shown in equation (1)), that is, the user's evaluation matrix for services, as follows: where r u i p j is the rating of user u i for service p j , that is, indicates that the xth dimension QoS of p j completely not meet the requirements of u i ; and when r x u i p j � 1, the x th dimension QoS of p j can completely meet the requirements of u i . e recommended framework is shown in Figure 1. It is mainly composed of four parts. (1) Part one is the construction of community. k user communities are constructed by a k-means clustering algorithm to narrow the recommendation range and improve the service recommendation efficiency (see Section 3.2). (2) Part two is obtaining the neighbors and screening the services (see Section 3.4). (3) Part three is the prediction of the QoS requirement of a target user u i . For the screened services, we combine the evaluated QoS values of users for services, the average rating of services evaluated by u i , and the QoS value reported by the corresponding provider to predict the QoS required or expected by u i (see Section 3.3). (4) Part four is the service recommendation. We calculate the matching degree between the predicted QoS values and the reported QoS values of the screened services. en, we obtain the service recommendation list according to the matching degree, the similarity, and the service ratings by the neighboring users (see Section 3.4).

Construction of Community.
In the construction of community, we first need to determine the number of communities. We select k users with the highest interactions as the centers of the initial k communities C 1 , C 2 , . . . , C k , which can better reduce the isolated points. After that, the center of each community is redetermined in each calculation round until the criterion function converges. e criterion function is shown as follows: where F x is the sum of the squared errors of all ratings in the xth dimension, P u i represents a set of services that user u i interacts with, and r x u (C y ) p j is the x th dimension rating of center u (c y ) of community C y on service p j .
Next, we calculate the similarity between the other users and each center of the k communities. If the similarity between a user u i and the center u (c y ) of community C y is the highest, then u i belongs to community C y . e similarity between user u i and user u (c y ) is calculated as follows: p j ) represent the average values of the xth dimension rating of services evaluated by user u i and u (c y ) , respectively, and P u i u (c y ) represents a set of services that are interacted with by both users u i and u (c y ) , that is, P u i u (c y ) � P u i ∩ P u (c y ) .
Algorithm 1 describes the construction process of user communities. After each round of clustering, the center of each community is redetermined (lines 13-27 in Algorithm 1). For a community C y , we first calculate the average value of each dimension of the service ratings to obtain a vector (r C y : p 1 , r C y : p 2 , . . . , r C y : p m ) (lines 14-16 in Algorithm 1). en, if the evaluation vector (r up 1 , r up 2 , . . . , r up m ) of user u is the closest to the average vector, then we consider user u to be the new center of community C y (lines 17-26 in Algorithm 1).

Prediction of User Requirement.
When users select services, they are unsure of their requirements in the beginning or their requirements are constantly changing.
compute the similarity sim(u i , u (c y ) ) between u i and u (c y ) using (3); (6) if sim(u i , u (c y ) ) ≥ max then (7) max � sim(u i , u (c y ) ); (8) max y � y; //record the center (9) end if (10) end for (11) Add u i to the community C max y ; (12) end for (13) for each C y (y � 1, 2, . . . , k) do//the center of each community is redetermined (14) for each service p j (j � 1, 2, . . . , m) do (15) r C y : p j � (r 1 C y : p j , . . . , r ω C y : p j ) � ((1/|C y |) u∈C y r 1 up j , . . . , (1/|C y |) u∈C y r ω up j ); (16) end for (17) min c � 1; (18) for each user u in C y do (19) ( if d u ≤ min c then (22) min c � d u ; (23) u (c y ) � u; //update the center (24) end if (25) end for (26) end for (27)  However, if the services that users select do not meet their real requirements, then users may give low ratings to the services after they use them. e ratings can reflect the real requirements of users to a certain extent. Users may need to make several selections before obtaining the services that eventually meet users' real requirements.
In this paper, we combine the ratings of users for a service, the average rating of services evaluated by a target user u i , and the QoS value reported by the corresponding provider to compute the QoS value that u i expects or predicts. e xth dimension of the QoS value predicted by u i is calculated as follows: where U p j represents a set of users interacting with p j in the community that includes u i and r x u i is the average rating of the xth dimension QoS of services by u i . We can obtain the QoS requirement vector E u i p j of u i , that is, E u i p j � (e 1 u i p j , e 2 u i p j , . . . , e ω u i p j ).

Recommendation Algorithm.
e basic strategy of our recommendation method is as follows: (1) We calculate the similarity between u i and the other users in community C (we suppose the target user u i is in C) using equation (3). e N users (u (1) , u (2) , . . . , u (N) ) with higher similarity are the neighboring users of u i . en, we obtain a set P * of services that these neighbor users interact with, that is, P * � ∪ N j�1 P u (j) . If the average rating of a service is lower than the specified threshold, then the service will not appear in the recommendation list to ensure that no low-quality service will be recommended. erefore, according to the ratings of the neighboring users on the services in P * , the services with lower ratings are further screened out and then the set P * * is obtained.
(2) We compute the predicted QoS values of the services in P * * . (3) For each service p (p ∈ P * * ), we calculate its matching degree of the xth dimension QoS according to the following equation: (4) We predict the rating of service p for u i based on the ratings of p from the neighboring users, the similarity between users, and the difference in the matching degree of p between users. erefore, we compute the predicted rating r x u i p of the xth dimension QoS according to the following equation: Input: dataset D Output: a recommendation list including L services (1) Construct k user communities via Algorithm 1; (2) Find the community C that the target user u i belongs to; (3) for each user u (u ≠ u i ) in C do (4) Obtain the similarity sim(u i , u) using (3); (5) end for (6) Obtain N neighboring users with higher similarity from C; (7) P * ←services that the N users interact with; (8) Remove the services with lower ratings from P * to obtain P * * ; (9) for each service p in P * * do (10) Obtain the requirement vectors E u i p and E u (j) p (j � 1, 2, . . . , N) using (4); (11) Calculate the matching degrees Md x up and Md x u (j) p (x � 1, 2, . . . , ω) using (5); (12) Calculate the predicted rating r x u i p of the x th dimension QoS using (6); (13) end for (14) Sort the predicted ratings of all services in P * * in descending order, and select the first L services to form a list of recommendations.
Journal of Control Science and Engineering 5 where r x u i and r x u (j) are the average ratings of the xth dimension QoS of services by u i and u (j) , respectively. (5) Finally, we recommend the L services with the highest predicted ratings to the target user. e specific process is shown in Algorithm 2.

Experimental Environment, Dataset, and Performance
Metrics.
e hardware and software environment of our experiments is as follows: an Intel (R) Core (TM) i7-6500U 2.5 GHz CPU, 8 GB of memory (RAM), the Windows 10 64bit operating system, and Dev C++ as the programming language.
In this paper, we use a public dataset WSDREAM (https:// github.com/wsdream/wsdream-dataset) [31], which includes data on real-world QoS evaluation results from 339 users on 5825 Web services. In this dataset, there are two dimensions to the evaluation results: the response time and throughput. erefore, the value of ω is equal to two. For this dataset, we conduct the following pretreatment: (1) if the response time or throughput of a user on a service is equal to − 1, then we ignore this data pair; and (2) the other data will be normalized by dividing the maximum. In addition, we assume that the reported QoS value for a service is equal to the average of the evaluation values of all users on the service.
We use the MAE and RMSE to assess the predictive accuracy of the predicted ratings produced by the recommendation system. e MAE and RMSE are the mean absolute error and root mean square error, respectively. e smaller the values of the MAE and RMSE are, the higher the accuracy. eir calculation methods are as follows:

Experimental Results and Analysis.
Our method is founded on the user-based collaborative filtering and considers the QoS requirements of users. Hence, to evaluate the performance of our method (abbreviated as RB), we compare it with the following methods: (i) A traditional collaborative filtering method based on users (abbreviated as CF), which only uses the similarity among users to make recommendations (ii) A prediction method based on the deviation (abbreviated as DB) [30], which is based on the principle of collaborative filtering and uses deviations of the services and the users to estimate the QoS value (iii) A collaborative filtering method based on neighbors (abbreviated as NB) [21], which considers the influence of similar users and services (iv) A collaborative filtering method based on model (abbreviated as MB) [22], which applies the overall known QoS values to learn a predictive model for predictions Figure 2 shows the variations in the MAE and RMSE for different numbers of neighbors with rating matrix densities of 2% and 4%. According to Figure 2, the MAEs and RMSEs of the RB method are the lowest. ese results indicate that the accuracy of the RB method is the highest. is is because the RB method removes the services that are given lower ratings by the neighboring users to ensure the recommendation quality and considers the target user's requirement to reduce the impact of data sparsity and improve the accuracy. e CF method uses the user similarity that is calculated by the Pearson correlation coefficient to obtain the predicted ratings. is leads to large errors in datasets with high sparsity. erefore, its accuracy is the lowest. e accuracy of the DB method is higher than that of the CF method, especially when the density is lower. is is because the DB method considers contextual information. When the matrix density is 2% and the number of neighbors is less than 20, the MAEs of the NB and MB methods are slightly lower than those of the RB method. But their RMSEs are still higher than those of our method. e MB method uses the known data to learn a predictive model, and the NB method only employs enhanced similarity to make the prediction. erefore, they still suffer from the data sparsity problem. Figure 3 shows the variations in the MAEs and RMSEs with rating matrix densities of 2%, 4%, 6%, 8%, and 10%. As the matrix density increases, the MAEs and RMSEs of the RB, DB, NB, and MB methods are relatively stable, and those of the CF method have a tendency to decline. is indicates that the RB, DB, NB, and MB methods are more robust. In addition, according to Figure 3, the accuracy of the RB method is obviously higher than those of the other methods under the same matrix density. is is because when predicting the rating of a service, the RB method not only considers the similarity between users but also considers the difference in the matching degrees of a service. e difference in the matching degrees reflects the difference between the requirement of the target user and that of a neighboring user. e smaller the difference in the matching degrees for a service is, the more important the rating given by the neighboring user is when predicting the rating. Figure 4 shows the variations in the MAE with rating matrix densities of 30%, 40%, 50%, 60%, and 70%. According to Figure 4, the MAEs of each method are lower than the values in Figure 3. is is because the sparsity of the rating matrix is reduced. However, when the matrix density is higher than 50%, the MAE values of the DB, MB, and CF methods are slightly increasing, and those of the RB and NB methods are still dropping and starting to level off. In addition, the RB method outperforms the other methods. is further indicates that the RB method is more robust. e main reason for the results is that the RB method considers the service matching degree and the similarity between users. e DB and MB methods are more suitable for the sparse rating matrix. is is because the DB method uses the deviation-based baseline estimate, and the MB method uses the entire training data to learn a model.

Time Complexity Analysis and Execution Time.
For simplicity, we assume that n is the number of users and m is the number of services. For the CF method, the time complexity can be estimated as O(n 2 ). For the DB method,   Figure 5 shows the execution time of each method. e execution time of the RB method is close to that of the CF method, and their execution times are less than those of the DB, MB, and NB methods. From the above results, we see that the RB method can improve the recommendation accuracy without lowering the time efficiency.

Conclusions
is paper proposed a service recommendation method based on requirements. First, user communities are constructed by clustering to reduce the range. Second, the reported QoS values and the evaluation QoS values are used to predict the QoS requirements of users. en, the matching degree of users to services is computed. Finally, service ratings are predicted for the target user to obtain the recommendation list based on the similarity, the difference in their matching degrees, and the ratings of services by the target user's neighbors. In the case of the lower rating matrix densities (2%-10%), the average MAE value (0.28) of our method is less than that of the CF method (0.39), that of the DB method (0.40), that of the NB method (0.31), and that of the MB method (0.34). In addition, the average execution time of our method is less than that of the DB method, that of the NB method, and that of the MB method. erefore, our method can improve the recommendation accuracy without lowering the efficiency.
In future works, we will further improve the requirement prediction method by mining implicit user information from reviews.

Data Availability
e data used to support the findings of this study are available at https://github.com/wsdream/wsdream-dataset.

Conflicts of Interest
e authors declare that they have no conflicts of interest.