A Robust Service Selection Method Based on Uncertain QoS

,


Introduction
With the wide use of the Web service in various fields, more and more services have been developed rapidly.But single service can only implement single function; service composition becomes the primary measure to provide user with a high-quality and personalized complex service.And the Web service selection is the foundation and precondition of service composition.With the number of Web services increasing gradually, a key issue arises immediately; there are many services providing same functions but differing in the Quality of Service (QoS).Therefore, in the process of service composition, we need to select service, not only depending on the functions but also according to the user's QoS requirement.
Web service selection based on QoS is a combinatorial optimization problem.Traditional QoS-based Web service selection algorithms mainly use linear programming [1] and Greedy Algorithm [2].Currently more popular service selection algorithms are mainly using smart algorithms, such as Genetic Algorithms [3], Particle Swarm Optimization [4], and Ant Colony Optimization Algorithm [5].These algorithms are often designed for certain QoS attributes and assumed that, after the service provider has provided services, the services would run as the described state without change.
But in fact, this ideal situation does not exist.Web service is provided as a distributed, loosely coupling API on the Web, so QoS is uncertain factor; for example, the response time would fluctuate with the change of the network.It will fluctuate the QoS of the composed services which are solved by the deterministic algorithms at the running time and cannot satisfy the QoS requirements of users or is unusable.Therefore, when dealing with the service selection problem, the uncertain factors must be considered.
Uncertainty is the most important factor that the requirements of users cannot be satisfied.We consider that the uncertainty of the service composition is mainly caused by the following reasons: (1) QoS information is incomplete.The Web service description emphasizes more on functional information, so the description of QoS attributes is not accurate enough.(2) There is no unified QoS metric of Web services, and only one way can gain service QoS value from service providers.Due to the fuzziness of the natural language, there may be divergence between the service providers and the users even about the same attributes.For example, there is one attribute called throughput, one definition is the number of requests for a service successfully executed, and the other is the average rate of successful message size delivery over a communication channel per second.
(3) Internet environment cannot be repeated.When services are used on the Internet, some attributes of QoS of the Web services are influenced by the running state of the Internet, such as security and response time.The real situation of service cannot be described by the QoS obtained from once request.
Because of the existing uncertainties, the composite service could hardly be accomplished in the dynamic execution process.These uncertainties also affect the individual requirements of users.When the QoS deviation occurs, we must replan and compose services; otherwise it would cause a lot of problems.But the replanning will lead to the waste of computing resources, so this paper studies how to ensure that service composition is feasible with the uncertain conditions, thus avoiding the replanning of composited service.For the uncertainty of the QoS properties, this paper combined the uncertain optimization theory, described the uncertainty by using the "interval," modeled a service composition model based on workflow (order, circulation, choice, and parallel), proposed the service selection model under the conditions with uncertain QoS, put forward the corresponding normalization and aggregation function, and ensured that when the change occurred in the part of QoS attributes, the obtained solution can adapt to the most cases and close to the optimal.
The rest of the sections are organized as follows.Section 2 describes related works.Section 3 details the robust optimization method used in service selection model based on the uncertain QoS.Section 4 presents the experiment and analysis result.Finally, Section 5 draws some conclusions.

Related Works
In Zeng et al. 's paper [1] QoS was introduced into Web service at the first time; the QoS of Web service was used to distinguish the Web services with similar functions.From then on, service selection based on QoS plays a more and more important role in the Web service composition area.QoSbased service selection methods are mainly divided into two directions: semantic QoS [6] and QoS value.According to the different QoS requirements, the Web service selection strategy can be divided into two kinds, namely, the local optimal strategy and the global optimal strategy.Local optimal strategy selects component services for a single service function, respectively, compares the candidate atomic service set, sorts QoS values for each candidate atomic service, and then selects the best one.The main algorithm is the Greedy Algorithm [2].Global optimal strategy aims to make the global QoS of the composite services to satisfy the given constraints or achieve the desired goals; the main methods are Genetic Algorithm [3], PSO [4], and Ant Colony Algorithm [5].
In recent years, the researchers have also addressed some studies for service selection based on uncertain QoS.Zeng et al. [1] proposed QoS-based service selection; at the same time they proposed that uncertain response time was introduced into the service selection model.They assumed the response time of service subjected to normal distribution and introduced the variance of the normal distribution into the constraints.Alférez and Pelechano [7] leveraged models at runtime to guide the dynamic evolution of context-aware Web service compositions to deal with unexpected events in the open world.In order to manage uncertainty, a model that abstracts the Web service composition self-evolves to preserve requirements.Benouaret et al. [8] represented each QoS attribute of a Web service using a possibility distribution and introduced two skyline extensions on uncertain QoS called pos-dominant skyline and nec-dominant skyline.Wu et al. [9] proposed an "on-demand" strategy for QoS-aware service composition to replace the traditional "best-effort" strategy.Mostafa and Zhang [10] presented two approaches based on the Multiobjective Reinforcement Learning (MORL) to address multiobjective service composition in uncertain and dynamic environments.Wagner et al. [11] developed a new QoS model that helps to predict the resulting QoS of a workflow by considering service failures during the initial selection phase.For each service, a set of possible backup services and the corresponding QoS are computed beforehand.
In recent years, it has been recognized that dealing with uncertain data is a major challenge in optimization.As can be seen from the above literatures, Web service QoS models with uncertainty dispose uncertain data in two ways; one would assume that the data is subject to one kind of distributions to compute the uncertainty of QoS and the other solves the problem by using intelligent algorithms.But the problem of the former method is that the assumption may be not reasonable.In the real world, we could not get the exact distribution of the data.And for the latter method, different intelligent algorithms have different problem, like premature convergence for Genetic Algorithm.And for all intelligent algorithms, they always solve different solutions in different times, even if they use the same data.We need an approach to select service considering all possible situations, but it does not take whether the uncertain data is subject to any distributions into account.
The researches of the traditional optimization problems are mostly about deterministic problems.When solving uncertain optimization problems, researchers mainly focus on the following ways: stochastic programming, fuzzy programming, interval programming, and robust optimization.When solving the uncertain problems, the stochastic programming and fuzzy programming need precise distribution of the parameters, and the precise distribution is difficult to obtain in the real world.When solving these two kinds of programming problems, the commonly used method is the Monte Carlo method, but this method shows slow convergence and low efficiency.Facing more complex constraints, they are only to use approximate method.Interval programming and robust optimization are all converting the uncertain optimization to determine problem for solving.The difference is that the robust optimization considers the worst case; the result may be conservative.And the interval programming eventually provides decision-makers with a range of optimal value; they will have a better space to select [12].When converting the interval programming, upper and lower bounds of uncertainty goals and constraints will become a nested optimization model, so the problem is always a multiobjective optimization problem and difficult to solve.
In the 1973s, Soyster [13] proposed an approach to address data uncertainty named robust optimization.Robust optimization means finding a solution which can deal with all possible realizations of the uncertain data.The first robust optimization method proposed by Soyster considers the maximum uncertainty.That means only considering the worst case, the uncertain programming is converted into the corresponding deterministic model to obtain robust optimal solution.The model only considers the worst case and leads to the very conservative solutions.Conservatism in robust optimization means that the solution ensures a high robustness level but is "far away" from optimality.In other words, a robust solution is not optimal for all realizations of the uncertain data but performs well even for the worst case.Later researches focus on how to keep the optimality and robustness at the same time.At the end of the last century, Ben-Tal and Nemirovski [14] gave an approach that converted the linear programming to the robust counterpart problem with the ellipsoid uncertain set, but the converted problem is a Second-Order Cone Programming (SOCP) and difficult to calculate.In 2003, Bertsimas and Sim [15,16] proposed a new robust approach which obtained the solution considering optimality and robustness and analyzed the probability bounds of constraint violations.Existing researches based on the two approaches used the robust optimization in the field of supply chain planning, network flow, and logistics programming.
In this paper, we propose using robust optimization method to select service.The difference between the existing study and this method is that this method considers all possible situations during the service as invoking.And it is solved by mathematical methods, which means that if the data is constant, the results are constant.

Service Selection Method Based on Robust Optimization
3.1.QoS of the Candidate Services.Since Zeng et al.
[1] combined Web service with QoS together, there have been a large number of QoS attribute definitions which describe nonfunctional properties of Web services.In many literatures, QoS attributes are using the determinate data to make it clear, but some QoS attributes should be described as uncertain interval data, such as response time.This paper uses the following three kinds of common QoS attributes as a basis for service selection.Defining that response time and throughput are described by the interval data and the reliability is real data.We consider that the value of QoS is not subject to any distribution.
Definition 1 (response time).Response time measures the expected delay in seconds from a request sent to the results which are received [1].It is computed using the expression as follows: where  tran is the transmission time of request and response in the network. proc is the time of processing the request.
In the past literatures, the response time is often using the minimum value or average value of the response time in a period of time, as a certain value to calculate.But the nature of the response time should be uncertain.Due to the different network status, the same service will show different response times.Using traditional QoS models always masks the uncertainty of response time, ignoring the unstable factors.Without considering the uncertainty of response time, the selected service would take a bad response time.For example, the minimum and average response time of service A, respectively, are 0.1 s and 0.2 s and of service B are 0.15 s and 0.22 s.However, the intervals of response time of services A and B, respectively, are [0.1, 1.0] and [0.15, 0.5].From the two intervals, it can be seen that the response time of service B is more stable and robust.Using the traditional service selection method, service A is better than service B. When we use the two services, the response time of service A may be 0.9 s and that of service B may be 0.3.The purpose of this paper is to choose a more robust service.We use interval [ rt ,  rt +Δ rt ] to indicate the uncertainty of response time.
Definition 2 (throughput).For the throughput, one definition is the number of requests for a service successfully executed, and the other is the average rate of successful message size delivery over a communication channel per second.In this paper, we define it as in the second definition.It is also uncertain.So we describe the throughput like response time with [ tp ,  tp + Δ tp ].
Definition 3 (reliability).Reliability of service is the probability of a request that is correctly responded to within the maximum number of total requests.It is computed using the expression as follows: where  re means the number of successful requests in  invocations and  is the total number of service executions.In this paper, the reliability is derived from the service attribute dataset and is a certain value.

Service Composition Based on Workflow. Most of single
Web service is usually providing only a single way to implement a single function, but the composite services can take advantage of many small particle size distributions of the atomic services on the network and combine them to be able to implement complex functions, loosely coupled composite services.
As shown in Figure 1, business logic of each kind of complex application is fixed, which has been divided into service classes by domain experts, and then the service class is advertised.After that, service providers could publish their Web service into registry and point out which certain service class it belongs to.When users' requirement is coming (meaning that user selects a certain business logic), then the proper services should be selected according to users' QoS.In order to solve the problem, a global service selection model based on uncertain QoS was proposed, including the corresponding normalization and aggregation functions, and then a robust optimization model is adopted to transform the model.Techniques of composite services are various.Mainly methods include modeling based on workflow, modeling based on Petri nets, and semantic modeling.This paper focuses on how to select the atomic service to accomplish the function, regardless of the composite modeling techniques; how to choose the specific combination service workflow model is also the key problem.
Workflow model has four basic atomic structures, namely, sequence, selection, loop, and parallel.The flow of composite services can be combined or nested by the basic structures.If we can find a corresponding calculation method of each QoS for each basic structure, we can give the global QoS of composite services.In the traditional QoS-driven service selection algorithms when aggregating the QoS of the services, the algorithms only consider the determined QoS, so that the aggregate formula is simple.But there is uncertainty in the QoS, and we described it by interval numbers, so the traditional function cannot be used for calculating global QoS.In order to solve this problem, we combined the interval number algorithm with the characteristics of response time and throughput and proposed the aggregation formulas of three QoS properties corresponding to each basic structure in Table 1.

Normalization.
Different QoS attributes always have different dimensions.Some value of QoS attributes is the bigger the better, such as throughput and reliability, and this kind of attributes is called benefit type attribute; some is the smaller the better, such as response time, called cost type attribute.In this case, integrating global QoS of composite service could result in additional cost.In order to easily calculate and compare, data in the decision matrix needs to be normalized into the same dimension.The service selection algorithm based on real number generally used 0-1 normalization method; the attributes' values are converted to interval [0, 1] by linear calculations.However, in this paper, response time and throughput are interval data and cannot use the method of real number to normalize.The researches about normalization methods of interval data are not too many and mainly focused on two ways.One is to convert the interval data into a real number.The other is to use some kinds of normalization functions to directly convert the interval number; the result is still interval number.While the former method will lose the uncertain information which is what this paper focused on, we use the latter method.
Common methods convert interval numbers into standardized interval number including the method based on interval number operation method, vector-based normalization method, method based on a linear scale transformation, and method based on the range transformation [17].These three former methods combine the normalization method of real number with interval number operation method.However, the data obtained by these methods always is out of [0, 1], and these methods are based on nonlinear transformation.There has been a huge impact on the decision results.So we use the method based on the range transformation to normalize response time and throughput.Because the value of the reliability is taken in the range of [0, 1], it does not need to be normalized.
There Assuming that there are  tasks in the workflow, each task has  candidate atomic services, so that the number of all possible composite services is   .We propose a method based on robust optimization (RO), which can select one service with high robustness level from   composite services.In order to implement our approach, firstly we need to formulate a linear programming model.
There are three inputs in linear programming problem: variables, objective function, and constraint conditions, in which the objective function and constraints must be linear.Linear programming is to maximize or minimize the value of objective function by adjusting the value of the variables.The output of linear programming is maximum (or minimum) value of objective function.We assume that the variable is   , which means whether the service   is selected to execute plan or not.If the service   is selected, then the value of the variable   is 1; otherwise it is 0. The objective function of the model is the following formula: where we transformed three QoS attributes into cost type attributes and  rt ,  tp , and  re are global QoS.  is the weight of the QoS, and ∑  =1   = 1,   ∈ [0, 1].We used  rt (  ) to express the response time of service   for task   , so we have the following constraint: Assume that there are  workflow tasks and there is a set of   services that can be provided to the user for each task, but there is only one service selected in each set, so   (  = 0, 1) indicates whether the service is selected.  has the following constraints: For example, there are 100 candidate Web services that can execute the task   ; however, only one of them will be selected to the task, so it is ∑ 100 =1   = 1.We used  tp (  ) to express the throughput of service   .From Table 1, we can see that the aggregate formula of throughput is looking for the minimum throughput in the process as the global throughput.But before the calculation of QoS value, we need to normalize it; the throughput will be converted from the benefit type to the cost type, so the global throughput is the maximum value.The constraint to the throughput is as follows: re (  ) means the reliability of service   .Like throughput, the reliability also needs to be converted, so the global reliability is as follows: However, the constraint of attribute can be introduced into the linear programming problem which is not limited to the defined one in this section.If the aggregate function could be given, it also can be added to the model.
We can propose the following model: Obviously, model ( 10) cannot be solved with the traditional optimization method or intelligent algorithm.In order to be able to consider the uncertainty of QoS in the solution, we used the robust optimization model proposed by Bertsimas to deal with the uncertainty.Due to the uncertainty that only appears in the objective function, we introduce a parameter Γ, which takes value in the interval [0, ], where  is the number of selected services in the model.For one flow, there will be only one composite service selected, so the range of Γ should be [0, 1].So we propose the following service selection model: Γ in objective function (11) is to adjust the robustness of the solution against the level of conservatism of the solution.Γ = 0: the model will completely ignore all uncertain factors, so that the solution is the same as the solution obtained by solving with minimum values  rt (  ) and  tp (  ); this solution is called the optimal solution.Γ = 1: the model will consider all uncertainties, but the solution is too conservative; this solution is called robust solution.If the value of Γ is more close to 1, we say the corresponding solution has a higher level of robustness.So robust solution has the highest level of robustness.In general, a higher value of Γ increases the level of robustness at the expense of higher nominal cost.

Experiment Analyses
In order to verify the effectiveness of the proposed method, we developed Web service testing and selection management system in the early study.In the literature, the researchers usually solved deterministic model.The value of QoS they used is from one test result or some random numbers produced in a certain range.This paper is to study and calculate uncertain data, once test result or random numbers cannot describe uncertainty of the service used in the real world.We use the response time and throughput datasets from Zheng et al. 's paper.In the literature [18], about 1.9 million pieces of data were provided by 339 users calling the 5825 atomic services.In this dataset, we found that when users invoked the service, the request may succeed or not, and the values of response time and throughput are always varied.
In this experiment, the workflow is a simple sequence flow with four tasks; each task would invoke in order.Each task has 10 candidate services, so the number of all possible composite services is 10 4 .Set three QoS attributes that have the same weight and calculate the uncertainty QoS interval of composite service through the front of the aggregation function.Table 2 is the QoS value of 40 candidate services.
In Table 2, the data comes from Zheng et al. 's dataset.We find out the maximum and minimum value as the upper and lower bounds of the response time and throughput intervals.In the dataset, −1 means the request is failed, so we calculate the reliability by failure number and total number.
Since Γ > 1, the obtained composite service is the same as when Γ = 1, so in the experiment, Γ takes value in the interval [0, 1].If Γ is an integer, it can only take 0 or 1; in both cases, obtained composite services are, respectively, the optimal solution and the robust solution mentioned in Section 3.2.To validate the method, Γ will be taking decimal to analysis.
When solving (11), we have two ways.The first way is solving the robust counterpart of (11), and the second is using one algorithm.The solving algorithm is as follows: (1) For  = 1, . . .,  + 1, solve the  + 1 nominal problems and let  * be an optimal solution of the corresponding problem.
(2) Let  * = arg min =1,...,+1   . ( Although there are a lot of methods and tools for solving integer programming, it would spend too much time, and the algorithm can quickly find a solution in few seconds.So this experiment uses the above algorithm to solve it.
The experiment is divided into two parts.The first part is to adjust the value of Γ and observe parameter effect on  In order to compare the results of the different methods, this paper will show the global QoS of services which are selected by methods.If the global QoS of the selected composite service is lower, we believe that the optimality of the service is better.If the deviation of service QoS is smaller and the upper QoS is smaller, we believe the robustness of the service is better.In all results of the experiment, the QoS values of all component services are standardized before, except that the total QoS in Table 4 is the result of the standardization and the aggregation.

Effect of Adjusting the Value of Γ.
In the experiment, the value of Γ only can be taken in the interval [0, 1], so choose Γ ∈ {1, 0.8, 0.6, 0.4, 0.2, 0} to solve the proposed model.The specific results are shown in Table 3.
It can be seen from Table 3 that when Γ dropped to 0.4, the atomic services of composite service began to change.In Table 4, we give out the QoS attributes of four composite services.
The global QoS has been normalized and aggregated.When we are calculating the global QoS, first we adjust reliability to cost type attribute (the smaller the better) and then sum the three QoS attributes with weight (weight of three QoS attributes is equal; i.e.,  1 =  2 =  3 = 1/3).
We named the four combination services from CS 1 to CS 4 .It can be seen from Figure 2 that Γ takes value from 1 to 0, and the deviations of global QoS are increasing.If the services are invoked in the real world, we contrast CS 4 and CS 1 ; the former may realize a smaller QoS value, but the latter is more stable and more robust.
The experiment proved that we can take a tradeoff between optimality and robustness by adjusting the value of Γ with user demand.

Contrast RO, LP, and LPURT.
First, respectively, we use three methods for selecting services in the mentioned workflow, obtaining three services called composite services A, B, and C, as shown in Table 5.Among them, when using LP, the response time is the minimum response time of each atomic service, and throughput is the maximum throughput (the best case).As noted above, all of these methods consider  determined values.When using LPURT, the response time is assumed to be subject to a normal distribution in [1], while throughput still is the maximum throughput without uncertainty.
As it is shown in Table 5, there are two different atomic services between composite services A and C.They have the same reliability, but the deviations of response time and throughput of composite service A are smaller.In the best case, composite service B is seen a little better than A and C; however, the deviation is bigger than the other ones.
Then, we select randomly QoS of 40 candidate atomic services invoked by 10 users from dataset and compute global QoS of composite services.Table 6 and Figure 2 show the global QoS of three selected composite services.
We firstly compare composite services A and B. From the data in Figure 3 and Table 6, we can see that response time and throughput of composite service A are obviously better than B. Then compare composite services A and C. From the data, the QoS of composite service A is better than service C, in most cases.From Figure 3, we can see the QoS of the sixth user and response time and throughput of composite service C have an obviously deteriorated case.After checking the QoS of each atomic service, we found that one atomic service of composite service C has a bad case at this user.The reason for this is that LPURT assumed the response time of atomic service subject to normal distribution and introduced the mean and variance to the constraints.While, in the real world, we cannot confirm what the probability distribution of the response time of services is subject to, when we request some services, their quality may be more likely to deteriorate as we have mentioned.Here we could calculate the QoS deviations of the three composite services by 10 users invoked, as shown in Table 7. From Table 7, we can see that the response time and throughput deviations of composite service A are minimal.Influenced by the result of the sixth user, the deviation  of QoS of composite service C is maximum.That means robustness level of service A is higher than B and C. Therefore, the composite service selected by our approach has optimality and robustness.And we can control the tradeoff between optimality and robustness by adjusting the attribute.The proposed method without considering whether the uncertain QoS is subject to some distributions is more suitable for the real network environment.

Conclusions
This paper studies the robust optimization used in the Web service selection based on uncertain QoS.On the basis of certain QoS-based Web service selection method, first we considered the uncertainty of QoS, second established uncertain QoS-based service selection model, and then used robust optimization methods to convert and solve the proposed model.In the end, the experiment verifies that the proposed model and method can deal with uncertain data without obvious distribution.And we compared the composite services obtained by our approach and other two methods; the result showed that the service selected by our approach had higher robustness and optimality levels.
Uncertain QoS-based Web service composition has the following advantages: firstly, for the software developer, paying attention to this can improve users' acceptance, enhance product competitiveness, and corporate reputation.Secondly, for users, paying attention to this can improve users' productivity, reduce training and support costs, improve satisfaction and comfort for users' work, and increase construction investment system efficiency and utilization.Thirdly, service selection study under uncertainty will increase the accuracy of the services provided and give full potential of each service and the effect of cooperating with other services.Finally, the composite services with uncertainty focus on providing continuity of services to ensure that when QoS changes in a certain range, the composite service is robust and minimizes the impact of service errors or failure.
Over the past few years, cloud computing has been more and more attractive as a new computing paradigm due to high flexibility for provisioning on-demand computing resources that are used as services through the Internet [19,20].It is very necessary that cloud users be vigilant while selecting the service providers present in the cloud [21,22].The proposed approach in this paper is valid in cloud service selection.

Figure 2 :
Figure 2: The global QoS range of four composite services.

Figure 3 :
Figure 3: The global QoS of three selected composite services.

Table 1 :
Aggregate formulas of QoS.
where there exists uncertainty in two QoS attributes: response time and throughput.For each entry  rt (  ) is independent and bounded random variable and takes values in ⌊ rt (  ),  rt (  ) + Δ rt (  )⌋.Δ rt (  ) means the deviation of the coefficient  rt (  ).It is the same as throughput, in that, for each entry,  tp (  ) is independent and bounded random variable and takes values in ⌊ tp (  ),  tp (  ) + Δ tp (  )⌋ and Δ tp (  ) means the deviation of the coefficient  tp (  ).

Table 2 :
The QoS value of 40 candidate services.

Table 3 :
Solutions of different values of Γ.

Table 4 :
The QoS attributes of four composite services.

Table 5 :
The results of three methods.

Table 6 :
The global QoS of three selected composite services.

Table 7 :
The QoS fluctuation of combination services.