Research on an Algorithm of Service Composition Path Generation and Selection in Service–oriented Manufacturing System

Service composition, which can realize the added value of service, is the core to implement service-oriented manufacturing system. This paper mainly studies the method of service composition path generation and selection drove by the user’s service request. First, the abstract service aggregation algorithm is designed. The partial ordering relation of abstract service is discovered base on the composable correlation among services which can realize aggregation of service. Then complete graph of service composition path is constructed by employing Hasse diagram. Based on the complete graph, an algorithm is designed to select the optimal service composition path.


Introduction
Service-oriented manufacturing is a kind of new business model, production organization manner and operation pattern. When service requester submits complex tasks that single service in service center cannot meet their requirements, and then several services are needed to combine to form more powerful composite service to achieve the purpose of added-value of service, i.e. service composition [1][2][3]. During employ service composition to complete a task, a series of services are needed to be assembled according to certain flow and rule to construct a service composition path to serve the task.
However, for a manufacturing task, if the decomposed granularity of task is different, the forming service composition path is also different. In view of the complexity of manufacturing process, many service composition paths may be generated. If each service composition path is matched with concrete services to construct service composition plan, the number of forming service composition plans will be very huge, which influences on the following service composition optimization. So how to employ the services that task decomposed to generate service composition paths according to a certain flow, and select the best service composition path following the request of users, is a problem to solve.
At present, there exist few researches on the service composition, which can be considered for two kinds. One kind of method is to directly generate service composition plan for task base on concrete services [4][5][6][7][8]. The advantage of this kind of method is that it can immediately carry on service composition and does not need predefined service composition template, which can realize the automation of service composition. But in the practical network, there exist massive concrete services, so this method may limit to the efficiency of service composition. Another kind of method is to match  [9,10]. The limitation of his method is that the construction of service composition template needs human intervention, which reduces the automation of service composition.
Composable correlation means that there is some similarity between input parameters and output parameters of two services [7]. Only services with composable correlation can be composed to construct service composition path. Therefore, this paper considers the above two kinds of method, and transforms the construction of service composition path to the process of interface matching according to the function description among services. Through generate service composition path, according to the user's task request, automatically construct abstract service composition template satisfying user's personalized demand.

The problem description
2.1. The basic concept Definition 1. (Service) It is the functional description (e.g. some performance parameter of service executing), which can be describes as follows:   Figure 1. The basic control structure of service composition Definition3. (The control structure of service composition) It is the execution logic structure, which can be divided to four structures: sequence, parallel, branching and cycle (see Figure 1). The structure of other most service composition is combined by the four structures.  [11] According to the user's requests, the successor service of service request is first found out, and then the successor service of current service is found out, and so on, until the successor node of a service is just output results required by service request. Each service can be denoted by a node in the graph, and the composable correlation among services can be denoted by the directed edge. The weight (0 1) of directed edge is the composable correlation degree of services connected by the directed edge. Then the directed flow structure forming like this is the service composition path graph (see Figure 2). Definition 5. (The complete graph of service composition path) For any service requests R, there may exist many kinds of service composition path meeting the needs of R. If all service composition paths are included in a graph of service composition path, then this graph is the complete graph of service composition path.

The problem description of service composition path generation and selection
During employing service composition to implement the service-oriented manufacturing, complex tasks first need to be broken down to many sub-tasks. Then the sub-tasks are matched the existing atomic services or composite services. Service aggregation will be realized through discovering the composable correlation among services. The different service composition path will be constructed according to the control structure of service composition and descripted by the directed graph, i.e. the graph of service composition path. Then the optimal service composition path will be selected to satisfy the user's demand.

Abstract service aggregation based on composable correction
Given service request R and ordered service set In order to form service composition path, first composable correlation among service set S, i.e. all the possible successor service and precursor service for each service are needed to be found. Here, service request is also regarded as a service with input and output function. The concrete abstract service aggregation algorithm based on composable correlation is in our previous work in reference [8]. The detailed description of this algorithm is not given in details here.

Complete graph of service composition path
In above section, abstract service aggregation has been completed. Here, service request is decomposed to two services  S ,……}, and the relationship among services is denoted by Hassan diagram according to A and R. Then complete graph of service composition path can be obtained. Meantime, two rules are given as follows.
in R and out R must be the first layer and the last layer respectively. Rule 2. When the partial order relationship among services is parallel or branching, the services with parallel or branching relationship are located in the same layer.
Taking the Figure 2 as an example, how to construct the complete graph of service composition path by Hassan diagram is shown as follows.

The algorithm of service composition path selection
After building the complete graph of service composition path, it can be seen that there is more than one service paths from in R to out R . In this section, the algorithm will be designed to find out an optimal path meeting the user's needs from the complete graph of service composition path. According to Definition 4, it is required to find a path to make the average of composable correlation degree of the service composition path reach the maximum, and the method of composable correlation degree can be found in our previous work [7].
The selection process of the service composition path can be also regarded as the searching and reasoning process of the state space. The parallel, branching and cycle structure contained in the service composition path can be transformed into a structure that contains only sequence structure. The complete graph of the service composition path is divided into several layers following the method of above section, which only includes the sequence structure as shown in Figure 3. The weight of the directed edge connecting the two services is the weight of the edge. The basic flow of service composition path selection algorithm is to take out R as a starting point to reverse the reasoning.
First, from the beginning of the first layer out R , the services that exist directed edge pointing to out R are found out in the second layer of the graph of service composition path, and mark the composable correlation degree from these services of the second layer to out R . Then according to composable correlation degree, the longest path is found from each service of the third layer to out R , and mark the path length from these services of the third layer to out R . Repeat this process until the last layer in R . Finally, a number of service composition paths from out R to in R can be obtained. Based on the above process, the average of composable correlation degree of each service composition path will be calculated, of which the path with largest value is the required.
Here, the average of composable correlation degree of each service composition path is obtained through the ratio of sum of the composable correlation degree of all directed edges from out R to in R and the number of directed edges.
For example, composable correlation degree of the path including services 1 S and 12 S is ( 1  + 11  + 15  )/3.

Conclusion
In this paper, the problem of service composition path generation and selection was studies based on composable correlation among services drove by the user's service request in service-oriented manufacturing system. First, the partial ordering relation of abstract service was discovered base on the composable correlation among services which can realize service aggregation. Then the