A Service Chain Discovery and Recommendation Scheme Using Complex Network Theory

ion Abstraction Match input and output parameters Invocable relation Edge Construct Network model Check Characteristics of complex network Figure 2: The process of constructing network model. should match the parameters of web services. Web services composition can be obtained by getting service chain in the complex network model meeting user requirements and the composite service chain can be formed automatically by adding structural nodes to the service chain. The whole process is shown in Figure 1.The discovered service chain should be sorted by their QoS indexed to reflect the performance of each service chain according to user requirements. After that, some service chains with good performance are provided to the users. Simulation results show that our scheme can reduce the number of services composition and significantly improve recommendation efficiency. The rest of this paper is organized as follows. In Section 2, the complex networkmodel of web service is introduced.The discovery of service chain and the structured service chain are described in Sections 3 and 4, respectively. Simulation results and performance analysis are report in Section 5. A conclusion is drawn in the last section. 2. Web Services Complex Network Model There are many kinds of relations among web services, such as invoking relation, containment relation, and relevance relation [9].The invoking relation includes invocable relation and invoked relation. Invocable relation means that one web service could invoke the other web service. Invoked relation means that one service is sure to invoke the other one. A number of web services combined together complete a certain demand by invoking relation among these web services. These web services get together with invocation relation and form a directed acyclic graph. Usually, identifying the invocable relations is the first step of finding out the invoking relations. For the purpose of finding out the invoking relations between web services, we should construct a complex network module by the invocable relation. The invocable relation between web services is determined by matching the input and output attributes of web services and the complex network model would be set up based on Table 1: Some average measures of the complex network models corresponding to the dataset Net-1 and Net-2. Net Number of nodes Number of edges Average path length Clustering coefficient θ 1 50


Introduction
Web service was widely applied for its outstanding advantages like self-describing, self-containing, and easy deployment.In order to implement complex business flow, composition of existing web services is a common way to solve the problem [1].Web services composition includes a serious of services by service relations and generates a behavior chain to meet user requirements, which is called a web service chain [2].A service chain should not only satisfy the functional requirements of users but also make sure that all of the services in the chain are correct and reliable.Consequently, how to compose web services to discover service chains according to service relations is very crucial.
In web service, the compatibility and integral efficiency of composed services should be considered during the composition procedure of web services.Web services are combined according to the attributes and functions of both services provided and the user requirements [3,4], especially a lot of works have been proposed in this field of quality-driven web services composition [5][6][7].
Recently, some researchers have proposed a lot of algorithms using graph theory to discover service composition [8], in which the services and the relations among them are treated as nodes and edges, respectively.In this kind of methods, the composition of web services is achieved by looking for feasible path among the nodes.The flaw of these schemes is that the research on graph theory tends to be theatrical research rather than the actual situation.As a matter of fact, the web services are distributed on the web servers on the Internet, and the basic structure and characteristics of it are more like a complex network.Therefore, the basic architecture model of web services is complex network rather than a graph.In this paper, we firstly analyze the scale-free and small-world features of the complex network we created, which illustrates the basic structure is a complex network.The traditional graph theory cannot reflect the actual distributed structure of web services.
The compatibility problem of web services can be solved by using a specific complex network model, which is created by matching the input and output interface of each service.However, there are still two problems, the structure and integral quality problems among services.In Section 4, a method for identifying the structure of web services in complex network is proposed, and a recommendation algorithm of high quality service chain is proposed.Therefore, the recommendation scheme of service chain in complex network is shown.
In this paper, a new service chain recommendation scheme based on complex network is proposed, in which web services and the relations among them are treated as the nodes and edges of the network, and both of them  should match the parameters of web services.Web services composition can be obtained by getting service chain in the complex network model meeting user requirements and the composite service chain can be formed automatically by adding structural nodes to the service chain.The whole process is shown in Figure 1.The discovered service chain should be sorted by their QoS indexed to reflect the performance of each service chain according to user requirements.After that, some service chains with good performance are provided to the users.Simulation results show that our scheme can reduce the number of services composition and significantly improve recommendation efficiency.The rest of this paper is organized as follows.In Section 2, the complex network model of web service is introduced.The discovery of service chain and the structured service chain are described in Sections 3 and 4, respectively.Simulation results and performance analysis are report in Section 5. A conclusion is drawn in the last section.

Web Services Complex Network Model
There are many kinds of relations among web services, such as invoking relation, containment relation, and relevance relation [9].The invoking relation includes invocable relation and invoked relation.Invocable relation means that one web service could invoke the other web service.Invoked relation means that one service is sure to invoke the other one.
A number of web services combined together complete a certain demand by invoking relation among these web services.These web services get together with invocation relation and form a directed acyclic graph.Usually, identifying the invocable relations is the first step of finding out the invoking relations.For the purpose of finding out the invoking relations between web services, we should construct a complex network module by the invocable relation.The invocable relation between web services is determined by matching the input and output attributes of web services and the complex network model would be set up based on The process of constructing the complex network module is shown in Figure 2.
Let  represent the input attribute set of th node and let  be the output attribute set of th node.Base on the invocable relations between the set of nodes, an adjacency matrix  with  rows and  columns is defined as follows: where   denotes the (, ) entry of .If | ∩ |/|| >  (0 <  ≤ 1),   = 1, which represents a connection between the th node and th node; otherwise,   = 0.The scale of the complex network model can be controlled by selecting the value of .
The Web Service Challenge 2009 (WSC2009) is used as the database of the experiment [10].Considering the smallworld and scale-free feature of complex network model [11,12], two datasets are used in the experiments, as Table 1 shows.
We defined the  = 0.01 when we constructed the network module.In Figure 3(b), the degree of most nodes is small and a few number of nodes have large degree, indicating the nodes have the property of heterogeneity.The node-degree distribution follows the power-law distribution, and the network model has scale-free property.Hence, 500 nodes in the dataset Net-1 can build a web services complex network model which is capacity of small-world and scale-free property.
The network model of the dataset Net-2 with 1000 nodes is shown in Figure 4(a).The node-degree distribution of this network model is shown in Figure 4(b).The results indicate that it also satisfies the feature of small world.
Simulation results show that the node-degree distribution follows power-law distribution, and this network model has the scale-free property.
There are two main motivations for the study of the characteristic of both the network modules.The first one is to test and verify the feasibility of constructing network module.The other is to make sure we can discover the web service chain by the module.The feature of small world shows most of the chains in the network are short.And the feature of clustering coefficient shows there are lots of relationships among these web services.

The Discovery of Service Chain
In this section, web service chains can be discovered according to the complex network model defined in Section 2. For discovering service chains, invocable service set and driven set of each service should be found based on the network module at first.Then we can discover the web service chains based on the driven set.Overall, the process of discovering service chains can be described as follows.
Step 1. Find the invocable service set   .An invocable service set is described as   = ⟨,   ⟩, where  is the name of the th service in complex network model;   represents the set of services, which can invoke service ; that is,   = 1,  ∈ [1, ], in the adjacency matrix .
Step 2. Find the driven set denoted by DS  .Suppose   = ⟨,   ⟩ is the invocable service set of   , where   = { 1 ,  2 , . . .,   }; Γ  is contained in   , and   is the output attributes set of the th service in Γ  .Then the driven set of the th service can be denoted as follows.
where Γ  is the redundant minimal subset and   is the input attributes set of service   . Step

Structured Service Chain and Its Recommendation
4.1.Structured Service Chain.In Section 3, we introduced the complex network model formed by matching input and output interfaces, and all the services in the service chain of a specific function can be successfully found using this scheme.However, we did not identify the relations among the services.In general, the relations between adjacent services are selection relation and parallel relation, and in this section, we introduce the way that identifies the relations of services in service chain using complex network model.Although a service chain can satisfy the requirements of users, it cannot be executed in the order defined by a business process.Business Process Execution Language (BPEL) combined with Web Service Chain Language (WSFL) and XLANG provides rich vocabulary to describe business process [13].Therefore, service chain can be defined as a complex business process by BPEL through a series of algorithms.According to the invocable relations in the service chain, two types of relationship among different services can be defined as follows.
Suppose Ch = { 1 , . . .,   } is a service chain.Let   represent the input attribute set of service   and  1 , . . .,   denote the output attribute set of service  1 , . . .,   .Then, there exists a parallel relationship among all the services   in set  = {  |   ⊆ ∪  ,  < }.If the number of set  satisfied the condition just mentioned, larger than 1, there is a selective relationship among these sets.
A structured service chain model can be proposed based on the parallel relationship and the selective relationship.In  this model, there are two types of nodes: one is the service node that represents the web service, and the other is the structured node which represent parallel relationship or the selective relationship.The structured service chain model with 9 service nodes and 4 structured nodes is shown in Figure 5.
In Figure 5, structured node pairs (and, /and) and (oR, /oR) indicate parallel relationship and selective relationship, respectively.

Service Chain
Recommending.The research on service selection using web service QoS is widely studied [5,6].In this section, we will discuss how to measure the integral QoS of the recommended service chain based on complex network model, and the recommendation scheme of service chain that having higher quality is proposed.
Recommending service chain according to the QoS based on composite service chain essentially calculates QoS of different combinations in service chain, including QoS of services in parallel relationship, selective relationship, and serial relationship.The selection of QoS adopts public QoS attributes that can measure the service performance: response time and throughput [5,14].Response time refers to the time required to complete a service request; throughput refers to quantity of the completed service requests per unit time.A service with superior performance tends to have a shorter response time and high throughput.
In the process of recommending service chain, overall QoS value should be calculated [15].We will not discuss the details of QoS computing in the paper, just hope to verify that we can recommend service chain with QoS information using complex network.(  ) represents the response time of service   , and (c  ) represents the throughput of service   .The equation of QoS calculation in parallel relationship is shown as follows: The equation of QoS calculation in selective relationship is shown as follows: The equation of QoS calculation in serial relationship is shown as follows, where  represents the number of services in serial relationship: QoS calculation of composite service chain is divided into three cases: parallel, selective, and serial.Calculations of the response time and throughput in the three cases are different from each other [16].Both types of QoS attributes should be considered when recommending service chain.The equation of calculating the overall QoS of service chain is as follows: 1 and  2 are weights of the two QoS attributes.By calculating the overall QoS of composite service chain with the equations, we can sort the composite service chains which meet users' needs in QoS value so as to achieve the goal of recommending service chain.

Experimental Results
We discover the service chains in the dataset Net-2; the results are shown as follows.The complex network module representing the service chain discovered from 1000 web services is shown in Figure 6.
According to the results, we can determine the end tags of many structure nodes during discovering the composite services automatically, while the correspondent start tags are less.We choose the appropriate data and set the user-request parameters as "serv658888682" and "serv957918420, " and in simulations with the dataset Net-2, the parameter  1 is 0.7 and  2 is 0.3 when calculating QoS.
Due to the limit of services quantity during the experiment, the data impossibly generate so much complex and complete composite service chains.In the experiment result, it shows that this service chain includes structured nodes.The graph of two service chains we got is shown in Figure 7.
According to the response time of each service, the QoS value of throughput, and the QoS equation of composite service chain in WSC2009, the entire QoS value of the first service chain is 2139 and the second is 3655.
The experiment results indicate that although both of the service chains satisfy the requirement of users, the second one is better.Consequently, the later one is the service chain we recommend.

Conclusions
This paper proposed a new scheme to construct complex network based on web services and analyzed the feature of the network module.Based on the module, we discovered service chains and structured the service chains.At last, we recommended the service chains to user by QoS.We use the dataset provided on public to generate service chain and recommend them to verify our scheme.

Figure 2 :
Figure 2: The process of constructing network model.

Figure 3 :
Figure 3: (a) The graph of network model of the dataset Net-1 with 500 nodes, (b) The node-degree distribution of network model which has 500 node.

Figure 4 :
Figure 4: (a) The graph of network model of the dataset Net-2 with 1000 nodes, (b) The node-degree distribution of network model which has 1000 nodes.

Figure 5 :
Figure 5: The structured service chain constructed by 9 web services.

Figure 6 :
Figure 6: The complex network representing the service chain discovered from 1000 web services.

Figure 7 :
Figure7: The structured service chain found from the complex network shown in Figure6.

Table 1 :
Some average measures of the complex network models corresponding to the dataset Net-1 and Net-2.
the invocable relations.Web services are taken as nodes, and nodes which satisfy invocable relation are linked together in the complex network model.The network module can be presented by a set  of nodes and a set  of edges, connected together as a graph denoted  = (, ); each edge  ∈  is connected to one pair of web services, one at each end.