# A Service Chain Discovery and Recommendation Scheme Using Complex Network Theory

Authors: Guoqi Liu; Yuli Zhao; Zhuang Wang; Ying Liu
Journal: Mathematical Problems in Engineering
 (2014)

---

## Abstract

Service chain discovery and recommendation are significant in services composition. A complex network module based algorithm using services invocable relations is proposed to search useful service chains on the network. Furthermore, a new scheme for discovering composite services processes automatically and recommending service chains by ranking their QoS is provided. Simulations are carried out and the results indicate that some useful service chains in the dataset provided by the WSC2009 can be found by the new algorithm.


---

## Body

## 1. 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–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 Section4, 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 Figure1. 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.Figure 1
The recommendation process of web service chain.The rest of this paper is organized as follows. In Section2, 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.


## 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 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 setV of nodes and a set E of edges, connected together as a graph denoted G
=
(
V
,
E
); each edge e
∈
E is connected to one pair of web services, one at each end.The process of constructing the complex network module is shown in Figure2.Figure 2
The process of constructing network model.LetT represent the input attribute set of ith node and let B be the output attribute set of jth node. Base on the invocable relations between the set of nodes, an adjacency matrix A with N rows and N columns is defined as follows:
(1)
G
=
[
0
0
1
⋯
0
1
0
0
⋯
1
0
⋯
⋯
⋯
1
⋮
⋱
⋱
⋱
⋮
1
⋯
0
1
0
]
,
where A
i
j denotes the (i
,
j) entry of A. If |
T
∩
B
|
/
|
B
|
>
θ (0
<
θ
≤
1), A
i
j
=
1, which represents a connection between the ith node and jth node; otherwise, A
i
j
=
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 small-world and scale-free feature of complex network model [11, 12], two datasets are used in the experiments, as Table 1 shows.Table 1
Some average measures of the complex network models corresponding to the dataset Net-1 and Net-2.
Net
Numberof nodes
Numberof edges
Averagepath length
Clusteringcoefficient
θ
1
500
10323
3.1929
0.2348
0.01
2
1000
25549
3.4746
0.1870
0.01We defined theθ
=
0.01 when we constructed the network module.The network model of the dataset Net-1 shown in Figure3(a) is a medium-scale network, and it satisfies the feature of small world as it has 500 nodes and 10323 edges, with the small average path length being 3.1929 and greater clustering coefficient being 0.2348.(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.
(a)
(b)In Figure3(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 Figure4(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.(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.
(a)
(b)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.


## 3. The Discovery of Service Chain

In this section, web service chains can be discovered according to the complex network model defined in Section2. 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 setW
i. An invocable service set is described as W
i
=
〈
S
,
V
i
〉, where S is the name of the ith service in complex network model; V
i represents the set of services, which can invoke service S; that is, A
j
i
=
1, j
∈
[
1
,
N
], in the adjacency matrix A.Step 2.
Find the driven set denoted byD
S
i. Suppose W
i
=
〈
S
,
V
i
〉 is the invocable service set of S
i, where V
i
=
{
S
i
1
,
S
i
2
,
…
,
S
i
n
}; Γ
k is contained in V
i, and B
k
j is the output attributes set of the kth service in Γ
k. Then the driven set of the ith service can be denoted as follows. 							(2)
D
S
i
=
{
Γ
k
∣
B
i
⊆
∪
T
j
}
,
where Γ
k is the redundant minimal subset and B
i is the input attributes set of service S
i.Step 3.
Find the service chainCh. Assume a sequence of n services Ch is composed of S
1
,
S
2
,
…
,
S
i
,
S
i
+
1
,
…
,
S
n, i
∈
[
1
,
N
]. Sequence Ch is a service chain if and only if S
j
∈
D
S
i, where D
S
i is the driven set of S
i and i
<
j.


## 4. Structured Service Chain and Its Recommendation

### 4.1. Structured Service Chain

In Section3, 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.SupposeCh
=
{
S
1
,
…
,
S
n
} is a service chain. Let B
i represent the input attribute set of service S
i and A
1
,
…
,
A
n denote the output attribute set of service S
1
,
…
,
S
n. Then, there exists a parallel relationship among all the services  S
j in set T
=
{
S
j
∣
B
i
⊆
∪
A
j
,
j
<
i
}. If the number of set T 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 Figure5.Figure 5
The structured service chain constructed by 9 web services.In Figure5, structured node pairs (and, /and) and (oR, /oR) indicate parallel relationship and selective relationship, respectively.


### 4.2.  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. Q
(
t
i
) represents the response time of service S
i, and Q
(
c
i
) represents the throughput of service S
i. The equation of QoS calculation in parallel relationship is shown as follows:
(3)
Q
(
t
)
=
Max
⁡
{
Q
(
t
i
)
}
,
Q
(
c
)
=
Min
⁡
{
Q
(
c
i
)
}
.
The equation of QoS calculation in selective relationship is shown as follows:
(4)
Q
(
t
)
=
Min
⁡
{
Q
(
t
i
)
}
,
Q
(
c
)
=
Max
⁡
{
Q
(
c
i
)
}
.
The equation of QoS calculation in serial relationship is shown as follows, where n represents the number of services in serial relationship:
(5)
Q
(
t
)
=
∑
i
=
1
n
‍
Q
(
t
i
)
,
Q
(
c
)
=
Min
⁡
{
Q
(
c
i
)
}
.
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:
(6)
Q
=
ω
1
Q
(
t
)
+
ω
2
Q
(
c
)
.ω
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.


## 4.1. Structured Service Chain

In Section3, 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.SupposeCh
=
{
S
1
,
…
,
S
n
} is a service chain. Let B
i represent the input attribute set of service S
i and A
1
,
…
,
A
n denote the output attribute set of service S
1
,
…
,
S
n. Then, there exists a parallel relationship among all the services  S
j in set T
=
{
S
j
∣
B
i
⊆
∪
A
j
,
j
<
i
}. If the number of set T 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 Figure5.Figure 5
The structured service chain constructed by 9 web services.In Figure5, structured node pairs (and, /and) and (oR, /oR) indicate parallel relationship and selective relationship, respectively.


## 4.2.  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. Q
(
t
i
) represents the response time of service S
i, and Q
(
c
i
) represents the throughput of service S
i. The equation of QoS calculation in parallel relationship is shown as follows:
(3)
Q
(
t
)
=
Max
⁡
{
Q
(
t
i
)
}
,
Q
(
c
)
=
Min
⁡
{
Q
(
c
i
)
}
.
The equation of QoS calculation in selective relationship is shown as follows:
(4)
Q
(
t
)
=
Min
⁡
{
Q
(
t
i
)
}
,
Q
(
c
)
=
Max
⁡
{
Q
(
c
i
)
}
.
The equation of QoS calculation in serial relationship is shown as follows, where n represents the number of services in serial relationship:
(5)
Q
(
t
)
=
∑
i
=
1
n
‍
Q
(
t
i
)
,
Q
(
c
)
=
Min
⁡
{
Q
(
c
i
)
}
.
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:
(6)
Q
=
ω
1
Q
(
t
)
+
ω
2
Q
(
c
)
.ω
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.


## 5. 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 Figure6.Figure 6
The complex network representing the service chain discovered from 1000 web services.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 Figure7.Figure 7
The structured service chain found from the complex network shown in Figure6.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.


## 6. 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.In the future, we will further consider the evolution problems of the constructed complex networks taken by dynamic services and improve the accuracy and efficiency problems in the discovery and recommending of service chain.



---

*Source: 157085-2014-01-16.xml*