A Heuristic Algorithm for Optimal Service Composition in Complex Manufacturing Networks

Service composition in a CloudManufacturing environment involves the adaptive and optimal assembly of manufacturing services to achieve quick responses to varied manufacturing needs. It is challenged by the inherent heterogeneity and complexity of these services in terms of their diverse and complex functions, qualities of service, execution paths, etc. In this paper, a manufacturing network is constructed to explicitly identify and describe the relationships between individual services based on their attributes. On this basis, the service composition problem can bemodeled as a multiple-constrained optimal path (MCOP) selection problem by taking into account different types of composition, namely, sequence, parallel, selection, and cycle. A novel Dual Heuristic Functions based Optimal Service Composition Path algorithm (DHA OSCP) is proposed to solve the NP-Complete MCOP problem, which involves exploiting the backward search procedure with different search targets to obtain two heuristic functions for the forward search procedure. The proposed algorithm is evaluated through a set of computational experiments in which the proposed algorithm and other popular algorithms such as MFPB HOSTP are applied to the same dataset, and the results obtained show that DHA OSCP can efficiently find the optimal service composition path with better Quality of Service (QoS). The viability of DHA OSCP is further proved in a case study of services composition on a Cloud Manufacturing platform.


Introduction
The rapid development of information technologies such as the Internet of things (IoT) and Cloud Computing has led to substantial changes in the manufacturing industry.To quickly respond to fast-changing market needs and satisfy customers' diverse requirements in terms of product performance and cost, companies begin to seek ways of sharing resources and fulfill needs through collaboration in a manufacturing network.Among various advanced manufacturing modes, Cloud Manufacturing (CMfg) is one of the most comprehensive and widely applied [1][2][3][4].In CMfg, different kinds of manufacturing resources are interconnected, virtualized, and encapsulated as Cloud-based services which are managed by intelligent CMfg platforms.To deal with complex manufacturing tasks, resources with varied functions and different QoS levels are selected and composed on these platforms.Thus, service composition has become a key enabling technology in the technical framework for CMfg.Due to the rapid development of CMfg, research work on manufacturing service composition is rapidly increasing [5].In the process of service composition, functional and nonfunctional attributes are both taken into account to search for the optimal compositions of services for meeting the functional requirements of complex manufacturing tasks with improved satisfaction of the services.Nonfunctional attributes of manufacturing services are usually relative to QoS, such as time latency, price, reliability, availability, and so on.When multiple manufacturing services with the same functional attributes are able to meet the requirements of a manufacturing task, QoS attributes play an important role in resource selection and service composition.
Service composition problem (SCP) is one of the most primary and essential problems for optimally manufacturing resources allocating [6].SCP in CMfg has the characteristics of high heterogeneity and large scale.Traditional service  composition approaches in CMfg usually use the service composition model of Cloud Computing, which are set up based on the QoS values of service nodes.A traditional service composition framework is shown in Figure 1 where {ST 1 , ST 2 , . . ., ST  } is the set of subtasks of manufacturing task T. The service candidate set that are able to execute subtask ST  can be represented as {SC 1 , SC 2 , . . ., SC  }.
Traditional service composition methods focus on selecting appropriate service nodes from each service candidate set to obtain the optimal service composition.This idea is based on the assumption that all manufacturing services in the adjacent service candidate sets can be composed.This assumption is reasonable in the case of composition problem in web services because web services follow the standard access protocol (i.e., SOAP) and registration specifications (i.e., UDDI).This ensures good compatibility between different web services.Moreover, the cost of transportation between different web services is negligible compared to the costs of these web services.However, the composition of adjacent manufacturing services may not be possible in the field of manufacturing, due to the process constraints, partnership constraints, and other factors.If two manufacturing services are geographically far apart, the logistics costs between them cannot be ignored at all.So the manufacturing service composition model should be improved based on Figure 1 and take into account the cooperation relationships between different manufacturing services.Moreover, traditional service composition methods have some limitations when the business process is not well predefined [7].As a consequence, the addressing of these problems requires a more accurate model and a more efficient algorithm.By taking into account the cooperation relationship between different service nodes, a manufacturing service network model is constructed in this paper.In the process of service composition, the constraint of each QoS attribute imposed by a service user is considered and the appropriate manufacturing services are selected to achieve the best composition performance in terms of QoS.To address this issue, the processing method for the complex manufacturing network needs to be put forward first.Compared with traditional processing methods for complex structures, the processing method proposed in this paper takes into account not only the characteristics of a manufacturing service but also the relationship between different manufacturing services.After the preprocessing of complex structures of the manufacturing network such as parallel structure and cyclic structure, the complex manufacturing network is converted into a simple directed graph, and then the problem of manufacturing service composition can be abstracted as a Multi-Constraint Optimal Path (MCOP) selection problem, which is NP-Complete [8].Aiming at solving the MCOP selection problem, some algorithms have been designed.However, the solution quality and time efficiency of these algorithms can be optimized by designing a better heuristic method.This paper precisely aims to put forward a more accurate model and solving the MCOP selection problem in a more efficient way.The main contributions of this work include the following.
(1) A more accurate model for manufacturing service composition problem is proposed to effectively describe both the service nodes and their cooperation relationship based on network architecture.
(2) A processing method for complex process structures (e.g., parallel structure and cyclic structure) based on QoS aggregation, which can model a service composition problem as a standard MCOP formulation.
(3) A novel Dual Heuristic Functions based Optimal Service Composition Path algorithm (DHA OSCP) for solving the MCOP problem with better solution quality and higher time efficiency.
The rest of this paper is organized as follows.Section 2 gives a literature review of related work.Section 3 details the formulation of the mathematical model for the service composition problems in which the cooperation relationships between nodes are taken into account.Section 4 describes a novel improved algorithm for MCOP selection problems based on the service composition model.Section 5 discusses the experimental results of the DHA-OSCP in solving SCP and compares its performance with those of the popular algorithms including the H OSTP algorithm and the MFPB HOSTP algorithm.Section 6 further demonstrates the viability of the proposed model and algorithm with a detailed application example of Cloud Manufacturing.Finally, the conclusions of this work are discussed in Section 7 as well as potential future work.

Related Work
. .Composition Using QoS.Much research has been done on the service composition problems and other related problems in networked manufacturing such as service provider selection methods, service network models, service composition algorithms, and manufacturing resource allocation [6,9].For example, Wu et al. [10] proposed a fuzzy-based decisionmaking method to find the best service provider; Ho et al. [11] made a review of multicriteria decision making approaches to the supplier evaluation and selection problem.In these methods, the supplier selection problem is described as a form of resource optimal allocation which is restricted to small scale resource scheduling problems without consideration of the QoS indexes of resources (e.g., cost, reliability, and so on).These models and algorithms are not suitable for dynamic and flexible on-demand service composition optimization problems.Although the construction of a Cloud Manufacturing service composition model can refer to Cloud Computing models, many changes need to be made by taking account of the particular characteristics of manufacturing processes.The previous research on service composition is mostly focused on the framework, indexes, and the optimization of composition algorithms.According to the specific means of problemsolving, the service composition algorithms can be divided into two types, namely, the local optimization approach and the global optimization approach.Specifically, the former chooses services for each subtask, obtains the candidate solution sets, and finally gets the local optimal result through greedy selection.However, it has some limitations such as the satisfaction of the overall QoS constraint, processing of nonlinear QoS index problems, and so on.The latter considers the QoS attributes not only for a single service but also for the composite service so that they can get the global optimal solution.Global optimization algorithms can be divided into three categories: Non-heuristic (Exact) Algorithms, Heuristic Algorithms, and Meta-Heuristic Algorithms.Every optimization problem can be solved by exhaustive search if the time consumption and search space are ignored.The Nonheuristic (Exact) algorithm is an optimized version of the exhaustive search, which can reduce the time consumption of the algorithm to a large extent.Yu et al. [12] modeled the service composition problem as a multichoice knapsack problem which is multidimensional and multiobjective and obtained the best utility function solution when the global QoS constraints are satisfied.Grabrel et al. [13] proposed an algorithm using the dependency graph and 0-1 linear programming to solve the optimal composition problem for transactional web services.Yang et al. [14] solved the dynamic composition problem of web services by proposing a Greedy Quick-hull algorithm.
The objective function is designed to guarantee that the search direction is a sufficient descent direction per round of iteration and the optimal solution can be obtained in a relatively short period of time.Compared with Exact algorithms, the heuristic function has great advantages in reducing time cost and search space.Klein et al. [15] put forward the hill-climbing algorithm and proved that it had a lower time complexity compared with the linear integer programming.Luo et al. [16] proposed a heuristic HCE algorithm for web service composition optimization which also satisfied the end to end QoS constraints.Rodrigues et al. [17] presented an A * algorithm which solves the problem of semantic input-output message structure matching for web service composition.In order to satisfy the overall QoS constraints and reduce the time complexity, several heuristic algorithms [18][19][20] have been proposed to find a near optimal solution for service composition.Heuristic function design is critical to a heuristic search algorithm, which has been extensively researched in the area of heuristic algorithm development and selection.In this paper, a novel dual heuristic functions algorithm is designed to solve the service composition problem based on an improved A * algorithm in which two different heuristic functions are employed by considering both feasibility and quality of the composition results at the same time.
By generating or selecting a heuristic method, the metaheuristic algorithm is designed to provide a sufficiently good solution to a specific optimization problem, which is applicable to a broad range of problems.Some commonly used meta-heuristic algorithms have been improved and adjusted to solve the problem of service composition such as particle swarm optimization (PSO) [21,22], simulated annealing (SA) [23], genetic algorithms (GA) [24][25][26][27], ant colony optimization (ACO) [28], and bee colony algorithms (BA) [29,30].The service composition problem can be formulated as a multiobjective problem and near-optimal solutions can be obtained by employing the meta-heuristic algorithm.In addition, some other methods have also been adopted to solve the problem of service composition.For instance, Bekkouche et al. [31] described a novel approach based on a Harmony Search algorithm that addressed functional requirements and nonfunctional requirements simultaneously through a fitness function, to select the optimal or near-optimal solution in semantic web service composition; Jatoth et al. [32] proposed a novel MapReduce-based Evolutionary Algorithm with Guided Mutation that lead to a better Big service composition with better solution and execution time; Labbaci et al. [33] put forward a deep learning approach for dynamic QoS based service composition which got promising results compared with existing QoS prediction techniques.These pieces of work have shown that the service composition problem is an essential part of the current research on intelligent manufacturing.
Since the Cloud Manufacturing paradigm entails the provision of cloud services by physical manufacturing resources and the transportation of between these resources, the cooperation relationship and logistics cost between these manufacturing resources need to be considered.As such, the network model proposed in this paper is more appropriate to describe the manufacturing service composition problem compared with those proposed in the existing studies.So far, the research of correlation-aware service composition has been focused by only a few studies [34].Unfortunately, the solving methods of these studies are limited to PSO and other meta-heuristic algorithms, which are not intuitive and comprehensive.By preprocessing the complex manufacturing network, the service composition problem based on the improved model is converted to an MCOP problem, which can be solved by pathfinding methods.On this basis, a heuristic pathfinding algorithm for addressing the service composition problems in manufacturing networks is developed by taking into account both service attributes and the relationships between services.
. .Multiple-Constrained Path Selection Method.Existing work has shown that QoS-based service composition can be modeled as a multiple-constrained optimal path selection problem, which has been proved to be NP-Complete [9].This model takes into account not only the QoS indexes of manufacturing service nodes but also the cooperative relationships between different nodes; this makes it more suitable for the actual manufacturing environment.Korkmaz et al. [8] developed a heuristic H MCOP algorithm for solving the multiple-constrained optimal path selection problem in service invocation.Based on this method, Liu et al. proposed the Heuristic Optimal Social Trust Path (H OSTP) algorithm [35] and the Multiple Foreseen Path-Based Heuristic Optimal Social Trust Path (MFPB HOSTP) algorithm [36], which made a two-way search in the trust network based on Dijkstra's shortest path algorithm [37] to get a near optimal solution.These three algorithms will be described in detail in Section 3 of this paper.Before H OSTP, H-MCOP was one of the most promising algorithms for the multiple-constrained optimal path selection problem due to its outstanding performance in terms of both solution quality and algorithm efficiency.The H OSTP algorithm inherited the advantages of the H MCOP algorithm and can achieve better search results and faster search speed by using a better search strategy.Yet, there is a problem of QoS imbalance in H OSTP algorithm.MFPB HOSTP algorithm can solve this problem by calculating the intermediate path, but it brings unbearable time consumption when the imbalance problem occurs frequently.H OSTP and MFPB HOSTP concentrate on the trust network in social networks, which unfortunately ignore the characteristics of manufacturing processes.For a practical manufacturing environment, the DHA-HOSCP algorithm is proposed in this paper, which designs two heuristic functions according to the characteristics of the manufacturing network.It achieves better results and lower time consumption compared with the MFPB HOSTP algorithm [36].

Modeling of Manufacturing Networks
. .Problem Description.In the execution process of manufacturing services on a CMfg platform, the free manufacturing resources are encapsulated as services with different levels of information granularity relative to their manufacturing capabilities.For instance, machining has a higher level of granularity than cutting and milling.Among these services, the coarse-grained manufacturing services are composed of fine-grained manufacturing services, and there are some atomic services which cannot be further decomposed.Manufacturing service nodes and their relationships will form a complex network of CMfg services.Atomic services are represented as nodes in the network, which have functional attributes and nonfunctional attributes.The cooperation relationships between manufacturing service nodes are represented as the edges of the network, including the degree of cooperation intimacy, logistics cost, and other factors.To better illustrate the idea, the improved model is shown in Figure 2. In this model, not all adjacent manufacturing services can be composed due to uncertain relationships between different services.
The major difference between the manufacturing network model and traditional service composition models is in whether the edges (cooperation, logistics, etc.) between manufacturing service providers are considered.As opposed to a computer network in which the communication time and cost between nodes are negligible compared with the node itself, a manufacturing network involves considerable logistics cost and cooperation relationship between manufacturing service providers.Therefore, both the service providers and the relationships between them should be taken into consideration in model construction and algorithm development.
To accomplish a complex manufacturing task, the demand for orchestrating manufacturing services is decomposed into several atomic tasks, each of which can be completed by a specific atomic service from the candidate set.The information about alternative services and their relationships is retrieved from the Cloud Manufacturing service network and is constructed as a subgraph.Thus the service composition problem is transformed into the problem of selecting a path with the highest global utility value under the condition that the subgraph is covered by this path and the QoS constraints are satisfied.The process of optimal path selection is illustrated in Figure 3, which can be divided into three stages.

( ) Manufacturing Demand Analysis and Task Decomposition.
When a CMfg platform receives a complex task demand (denoted as T), it first decomposes the complex manufacturing task into a combination of atomic tasks according to the specific requirements and manufacturing process constraints.The service composition is usually divided into four types: sequence, parallelism, selection, and cycle [38].The overall QoS requirements for a manufacturing task can be denoted  as Q(T) = {q 1 (T), q 2 (T), . . .q n (T)}, where   (T) is the ith QoS requirement and n is the number of QoS indexes.
( ) Extraction of Candidate Service Subnetwork.The CMfg platform generates a candidate manufacturing service set for each atomic manufacturing task by manufacturing resource selection according to the functional requirements of the atomic manufacturing task.The candidate service set can be denoted as In the above equation, m is the number of atomic manufacturing tasks and n i is the number of candidate services for atomic manufacturing task i. Candidate manufacturing services for the same atomic manufacturing task have the same functional properties but their QoS attributes can be different.These candidate service nodes and their relationships are then extracted from the manufacturing network as a subgraph.
( ) Selection of the Optimal Service Path.After the previous steps are completed, each of the atomic manufacturing tasks has got a set of services that can potentially meet its specific requirements.The optimal service path selection is then used to find out the optimal service execution path that satisfies the QoS constraints of manufacturing tasks and has the best overall utility function.This is an MCOP problem which has been proved to be NP-complete.In the past, the solving method of the manufacturing service composition is based on the idea of web service composition, which does not consider the relationship between different service nodes.According to the location constraints, cooperation constraints, process constraints, and QoS constraints, both the attributes of the candidate manufacturing service nodes and their relationships are taken into consideration so that the actual manufacturing scenario can be better addressed.This paper specifically focuses on the effective model and algorithm for this step.
. .Mathematical Model.The optimal service composition problem can be modeled as an optimal path selection problem with specific QoS constraints.Before the algorithm is detailed, the methods for QoS aggregation, network structure preprocessing, and mathematical model formulation need to be given first.
( ) QoS Attributes of Manufacturing Network.The QoS attributes in Cloud Computing network usually includes response time, bandwidth, computing overhead, and so on.However, in a manufacturing network, the QoS attributes that should be particularly considered are different from those of Cloud Computing.In a manufacturing network, the time and cost it takes to complete the entire manufacturing process are the essential attributes of substantial importance.Moreover, the reliability, usability, credibility, and sustainability are also important QoS attributes in a manufacturing network.In this paper, time, cost, and reliability are applied in the DHA OSCP algorithm as three representative QoS attributes.
( ) QoS Attribute Aggregation.Time.Time refers to the execution period from the time when the demands are submitted to the platform to the final completion time of the manufacturing service.It consists of the time of the nodes and the time of the edges.For a manufacturing service node, Time is the sum of online time and offline time (e.g., resource configuration time, computing time, queue time, and execution time).For the edge of the network, time refers to the logistics time of raw materials and semi-finished products as well as to the delivery time.The time attribute needs to be corrected by the correction factor, so as to modify the evaluation value to indicate the time attribute more accurately.The calculation method of time is given by Costs.Costs also includes both the cost of the node and the cost of the edge.For a manufacturing service node, Costs is the sum of software costs and hardware costs.Software costs are composed of computing costs, transmission costs, and access costs.Hardware costs include management costs, material costs, personnel costs, and execution costs.For the edge of the network, costs refer to the logistics costs of raw materials and semifinished products as well as to the delivery costs.The calculation of costs is given by Reliability.Reliability represents the possibility that the manufacturing service can successfully complete the manufacturing task under certain QoS constraints.Reliability can be expressed by the ratio of the number of manufacturing tasks successfully executed to the total number of tasks received by the service node.F k indicates the number of manufacturing tasks that the service node k failed in the process of service execution.The calculation of reliability is given by Based on the QoS index aggregation method, time and costs are cumulative indexes while reliability is a multiplicative index.Assume that the QoS model contains m manufacturing service nodes and n QoS indexes.The model can be expressed by a three-dimensional matrix.Each "layer" of the three dimensional matrix represents the adjacency matrix of a single QoS index of the manufacturing service network.The matrix element a ii represents the QoS attributes of node i and a i,j represent the QoS of the edge from node i to node j.The QoS 3D model of the manufacturing service network is shown in Figure 4.
( ) Preprocessing of Network Structure.In different manufacturing processes, the completion of a manufacturing task may involve four kinds of process structures, namely, sequence, parallelism, selection, and cycle.In order to apply the heuristic multiconstrained optimal path search method to solve the manufacturing service composition problem, the parallel structure and the cyclic structure need to be preprocessed in the manufacturing service network ascribed to the characteristics of Dijkstra algorithm.Finally, the extracted manufacturing service subnetwork is processed into a weighted directed acyclic graph from the start point to the end point, and the multiconstraint service composition problem is transformed into a multiconstrained optimal path selection problem.Since the service composition model proposed in this paper considers not only the manufacturing service itself but also the relationship between manufacturing services, the preprocessing of the network structure also needs to consider the attributes both of nodes and of edges.
The aggregation functions for QoS attributes of different services composition types are illustrated in Table 1 according to the recursive characteristics [39] of manufacturing services.
( ) e Method of QoS Attributes Aggregation.During the search process, the aggregation method of QoS attributes needs to be determined to support calculation in the algorithm.For time and cost, the algorithm needs to add them up to get the total time and cost of the existing composition.
For reliability, the product of different nodes (edges) is the reliability of the composition service.Therefore, the aggregation methods of different nodes and edges in the manufacturing network are shown below.Time.Time is a cumulative index.Suppose that an optimal manufacturing path has n candidate; then the aggregated time can be calculated using (5), which includes the aggregation of service nodes and the aggregation of edges.

𝐴 (𝑇
Cost.Cost is a cumulative index.The aggregated Costs can be calculated using Reliability.Reliability is a multiplicative index.Suppose that optimal manufacturing path has n candidate; then the aggregated reliability can be calculated by max (q i (node)) + max (q j (edge)) ( ) Utility Function.In this model, the utility function describes the overall performance of the optimal service composition path in different QoS aspects.Since different QoS indexes have different scales, the QoS indexes are normalized in the utility function.
The QoS indexes are divided into two kinds: positive indexes and negative indexes.Reliability is a positive multiplicative index, while time and costs are negative cumulative indexes.The utility function is calculated by In the equation, w T , w C , w R are the weights of T, C, R, respectively, with the conditions of w T + w C + w R = 1 and 0 < w T , w C , w R < 1.
( ) Traditional Service Composition Model.In the existing studies, the manufacturing service composition problem can be described as a 0-1 integer constrained multiobjective optimization problem based on the model in Figure 1.The traditional service composition model is formulated as min  (, , ) In these studies, this problem is usually solved using metaheuristic algorithms such as genetic algorithms (GA), particle swarm optimization (PSO), ant colony optimization (ACO), and bee colony algorithms (BA).These methods usually work pretty well.

( ) Multiple Constrained Optimization Path Selection Model.
In the improved model (Figure 2), there are more constraints to ensure the existence of edges between the selected manufacturing service nodes.In summary, the problem of manufacturing service composition can be abstracted as a multiconstrained optimization path selection problem and formulated as (10).In (10), m is the number of subtasks; d i is the number of candidate services in candidate service set j; and x i,j is the decision variable.x i,j equals 1 if the ith manufacturing service in service candidate j is chosen and otherwise it equals 0.
min  (, , ) The meta-heuristic algorithms can also solve the service selection problem with multi-QoS constraints and decision variable constraints.However, [40] proved that they have low efficiencies in finding a near-optimal solution in large-scale networks.Taking GA as an example, with the increase of node scale, the algorithm takes a very long time to obtain the near optimal solution, and it is often unable to obtain the feasible solution within the set upper limit of iteration times.
Compared with meta-heuristic algorithms, the proposed DHA OSCP is a more direct and effective algorithm to solve this problem.This is ascribed to the advantage that the DHA OSCP algorithm can always satisfy the constraints of decision variables in the process of execution.

Service Composition Path Selection Algorithms
In this section, some existing approximation algorithms for the MCOP selection problem are firstly introduced, including H MCOP, H OSTP, and MFPB HOSTP.Then a novel Dual Heuristic Functions based Optimal Service Composition Path algorithm (DHA OSCP) is described in detail.[8] is a heuristic algorithm proposed by Korkmaz and Krunz for the multiple-constrained optimal path selection problem.This algorithm first proposed a method of QoS aggregation which is also the target of the reverse search, as shown in

. . Existing Algorithms ( ) H MCOP. H MCOP
H MCOP first adopts Dijkstra's shortest path algorithm to find the path with the minimum   () and investigates whether there exists a feasible path satisfying all QoS constraints.If the   () of an intermediated node v k is greater than m, it is proved that there is no feasible path from v k to v t .

Complexity
If there exists at least one feasible solution, then this algorithm will search the network from v s to v t in order to identify a feasible path with the minimal cost of services.
Before the H OSTP algorithm [35] was proposed in 2010, H MCOP was one of the most promising algorithms for the MCOP selection problem.It proved to outperform prior existing algorithms in terms of both efficiency and solution quality.
( ) H OSTP. In H OSTP, Liu et al. first proposed the objective function given in ( 12) and adopted the backward search algorithm to identify whether there was a feasible path with the minimal  from v t to v s .If a feasible solution exists, H OSTP then adopts the forward search algorithm to deliver a near-optimal solution.
H OSTP designed a target function (p) which is better than H MCOP for reverse search, and this algorithm can provide an optimal service composition path that is no worse than H MCOP. In addition, through the reverse search strategy, H OSTP can calculate whether the foreseen path is feasible in advance which reduces the search space of the algorithm and improves the efficiency of the algorithm.However, this algorithm has some shortcomings in balancing different QoS attributes.
( ) MFPB HOSTP.In order to solve the imbalance problem of H OPTP, Liu et al. proposed the MFPB HOSTP algorithm [36] in 2013.In addition to selecting (p) as the target to search a network, the algorithm also identifies the optimal paths with the searching target T min , C min , and R max .When the imbalance problem occurs, MFPB-HOSTP determines the QoS index (for example, T) that does not satisfy the constraint.Then the algorithm selects the node of the T min path to replace the node with the best (p) path as the starting point for the next searching stage.At the same time, the algorithm defines the CBLP path sets to prevent the new imbalance problem.By this method, the algorithm can get a near-optimal path that is no worse than H OSTP. The MFPB HOSTP algorithm inherits a lot of advantages from H OSTP and uses the CBLP path sets to solve the imbalance problem that best (p) searching may bring.However, this algorithm will incur a large amount of computation when there are lots of imbalance problems or complex processes in the service network.
. .e DHA OSCP Algorithm ( ) Overview.First of all, some definitions are introduced.
Definition (feasible heuristic path).In a subnetwork from v s to v t , a Feasible Heuristic Path (FHP) is the path from v t to the intermediate node v k , identified by the Delta Backward Search with (13) as the target.

𝛿 (𝑝
Definition (utility heuristic path).In a subnetwork from vs to v t , a Utility Heuristic Path (UHP) is the path from v t to the intermediate node v k , identified by the utility backward search with ( 14) as the target.

𝑢𝑡𝑖 (𝑝 𝑏𝑎𝑐𝑘𝑤𝑎𝑟𝑑𝑢𝑡𝑖
Definition (forward path).In a subnetwork from v s to v t , a Forward Path (FP) is the path from v s node v t , identified by the forward search.The forward path is no worse than the FHP and UHP.
Based on the definitions above, a novel Dual Heuristic Functions based Optimal Service Composition Path algorithm (DHA OSCP) is proposed in this paper, which adopts two heuristic functions and the pruning searching strategy to obtain feasible heuristic path (FHP) and utility heuristic path (UHP).
The DHA OSCP algorithm is divided into two parts, namely, the backward search process determining two heuristic functions and the forward search process confirming the best utility path.In the backward search procedure, the algorithm determines the feasible heuristic path (FHP) from v k to v t (denoted by p backward v k →v t ) by using (12) as the search target.Then the algorithm determines the utility heuristic path (UHP) from v k to v t (denoted by p backwarduti v k →v t ) with (13) as the search target.The overview of DHA OSCP algorithm is shown in Figure 5.

( ) Description.
A more detailed description of the proposed DHA OSCP algorithm is given below.The algorithm is divided into four main steps: the pruning of the manufacturing service network, the feasible backward search, the utility backward search, and the A * forward search.These parts will be introduced in turn.The pseudocode of the proposed DHA OSCP is given in Appendix A.
Step (network pruning).Designing appropriate pruning strategies can effectively reduce the search space and the time complexity of the DHA OSCP algorithm without affecting the quality of the solution.The following two strategies are used to prune the manufacturing service network.
The first strategy is pruning based on the process flow.According to the decomposition of the manufacturing service task, the nodes and the edges of the manufacturing service are extracted so that the manufacturing service network suitable Input() Input the QoS value (T,C,R) of the nodes and edges of manufacturing network.Input the constraints and weights of QoS attributes.

Prune()
Pruning the nodes and edges that do not satisfy the QoS constraints.

Backward_Search()
Carry out backward search procedure twice with ( 12) and ( 13) as the target respectively to obtain feasible heuristic path (FHP) and utility heuristic path (UHP).

Forward_Search()
Carry out forward search procedure twice with FHP and UHP as the heuristic function to find out whether there is a better path than FHP and UHP.

Output()
Output the near optimal path and the utility value.for the task is obtained.In the manufacturing network, the edges caused by other process flows are removed by the pruning strategy.The second strategy is pruning based on QoS constraints.Nodes and edges that cannot satisfy QoS constraints are removed from the network according to (15) where  represents the threshold.
Step (identification of a feasible backward path with minimal delta).In feasible backward search procedure, the DHA OSCP algorithm searches the service network from v t to intermediate v k , to investigate whether there exists a feasible solution in the manufacturing network.Feasible backward search can define the FHP of each intermediate node v k , which is one of the heuristic functions to support the A * forward search procedure.The pseudocode of Delta Backward Search is given in Appendix B. eorem .In the feasible backward search procedure, the search process can successfully find a feasible solution if there is at least one feasible solution that exists in the service network.
The proof of Theorem 4 is given in Appendix C.
Step (identification of a backward path with the best utility).In the utility backward search procedure, the DHA OSCP algorithm searches the service network from V  to each intermediate node V  and identifies the best weighted mean path using a greedy strategy.  V  →V  participates in the A * forward search procedure as another heuristic function.The utility backward search procedure needs to be employed to handle the imbalance problems which may occur in the forward search procedure.For example, the QoS constraints of the service network are (T ≤ 1, C ≤ 1, R ≥ 0.4).The QoS values of the paths from V  to two intermediate nodes V  , V  are (  V  →V  ) = (0.5, 0.1, 0.9) and (  V  →V  ) = (0.45, 0.45, 0.45).Then the feasible backward search procedure will select V  as the next node while the utility backward search procedure will select V  as the next node.Obviously, the node V  has a larger QoS value to spare so that V  is easier to avoid the imbalance problem.Therefore, choosing the dual heuristic function strategy of FHP and UHP can effectively avoid the occurrence of the imbalance problem and generate a chance to deliver a better solution.The pseudocode of utility backward search is given in Appendix D.
Step (identification the near-optimal path based on FHP and UHP).The forward search procedure will investigate whether there is a path   V  →V  that is better in quality than both . The pseudocode of forward search is given in Appendix E. In this procedure, DHA OSCP searches the path with the best utility from V  to V  based on A * algorithm.Assume that V  and V  are selected as the intermediate nodes based on FHP and UHP; then two foreseen paths  + V  →V  →V  and  + V  →V  →V  are formed.According to the feasibility of these two paths, DHA-OSCP uses the following strategies to identify the optimal path.

Case (both 𝑝 𝑓𝑜𝑟𝑤𝑎𝑟𝑑+𝑏𝑎𝑐𝑘𝑤𝑎𝑟𝑑
V  →V  →V  and  + V  →V  →V  are feasible).The DHA-OSCP algorithm calculates the unity values of the two foreseen paths and then continues to search the network.
The forward search procedure based on FHP can continue to search.The forward search procedure based on UHP will search another neighborhood node of V  with the best utility and form a new foreseen path  +  V  →V   →V  .Then the algorithm forms another hybrid foreseen path  + V  →V  →V  based on FHP.The the algorithm moves forward to determine whether these two foreseen paths are feasible and choose the feasible path with higher utility to continue searching.If both of the two paths are infeasible, then the algorithm starts searching the path from V  in the subnetwork without taking link V  → V  into consideration.Then the algorithm forms another hybrid foreseen path  + V  →V  →V  based on UHP.Next the algorithm moves forward to determine whether these two foreseen paths are feasible and choose the feasible path with higher utility to continue searching.If both of the two paths are infeasible, then the algorithm starts searching the path from V  in the subnetwork without taking link V  → V  into consideration.

Case (both 𝑝 𝑓𝑜𝑟𝑤𝑎𝑟𝑑+𝑏𝑎𝑐𝑘𝑤𝑎𝑟𝑑
V  →V  →V  and  + V  →V  →V  are infeasible).The algorithm adopts the two processing methods described in Cases 2 and 3, respectively, when the corresponding path is infeasible.Then four new foreseen paths , and are formed.Then the algorithm moves forward to determine whether these foreseen paths are feasible and choose the feasible path with higher utility to continue searching.If all of these paths are infeasible, then the algorithm starts searching the path from V  in the subnetwork without taking link V  → V  and V  → V  into consideration.
( ) Algorithm Complexity Analysis.Assume that only three QoS attributes (i.e., T, C, and R) are taken into consideration; the time complexity of these three algorithms is shown in Table 2 where N is the number of nodes in the subnetwork between V  and V  , E is the number of the edges in the manufacturing network, and K is the hops between V  and V  .
Below the detailed analysis of these representations is given.Specifically, H OSTP takes twice as much time as Dijkstra's shortest path algorithm.As such, the time complexity of this algorithm is O(2×(N log N + E)) which is equal to O(N log N + E).MFPB HOSTP adopts Dijkstra's shortest path algorithm four times in the Backward Search procedure with the time complexity of O(4×(N log N + E)).In the Forward Search, MFPB HOSTP takes twice as much time as Dijkstra's shortest path algorithm, which means the time complexity for this part is O(2×(N log N + E)).Besides, the time complexity of finding the feasible foreseen paths is O(KE).So the time complexity of MFPB HOSTP is O(N log N+KE).DHA OSCP adopts Dijkstra's shortest path algorithm twice both in the Backward Search procedure and in Forward Search procedure, so its time complexity is O(4×(N log N + E)) which is equal to O(N log N + E).
The analysis above is based on the assumption that only three QoS attributes are taken into account.If M QoS attributes are taken into consideration, the time complexity of MFPB HOSTP will turn into O(M×(N log N + E)+KE) while the time complexity of DHA OSCP is still O(N log N + E), meaning that the proposed algorithm is better for large-scale problems.

Computational Experiments and Discussion
In order to evaluate the performance of the proposed DHA OSCP algorithm, computational experiments are conducted to make various comparisons between DHA OSCP and popular H OSTP and MFPB HOSTP algorithms that have been proved to be effective for service composition problems.
The execution time and the quality of the solution are influenced by the scale and structure of the network and the QoS constraints.In order to study the performance of the proposed heuristic algorithm under varied conditions, the service networks with different scales and structures are randomly generated.Then the qualities of the solutions obtained by the three algorithms are compared in detail.Figure 6 shows the comparisons of results under varied conditions.There are 20 groups of manufacturing networks in the experiments and 20 sets of QoS constraints in each group.Therefore, the results of 400 groups of experiments are shown in each subgraph of Figure 6.QoS preferences regarding the task are chosen as   = 0.5,  = 0.6,  = 0.8 and the initial QoS constraint values are chosen as T constraints = 0.9, C constraints = 0.9 R constraints = 0.2.Then the T, C are increased by 0.01 and the R is reduced by 0.01.
Figure 6 shows that DHA OSCP algorithm has a larger possibility to find a better solution under different network scale and QoS constraints.The X-axis and the Yaxis represent different network scales and QoS constraints, respectively.The Z-axis represents the utility values obtained by the three algorithms.Each point in the figure represents the utility value of the optimal path under certain network scale and QoS constraints.As shown in the figure, if there are no feasible solutions in the network, all of the three algorithms can determine the infeasibility.Moreover, DHA OSCP manages to find feasible solutions for all cases without a utility value worse than that of H OSTP and obtains better results than H OSTP in 12.375% of the total experiments (i.e., 198 of 1600).DHA OSCP also obtains better results than MFPB HOSTP in 10.875% of the total experiments (i.e., 174 of 1600).This validates the effectiveness of the DHA OSCP algorithm in finding a near-optimal solution.The execution times of the algorithms are influenced by the network scale and the number of hops in the network.An additional experiment with details below is then designed to compare the utility values and execution times of the three algorithms.
Seven groups of networks are generated with a node size of 100, 150, 200, 250, 300, 350, and 400, respectively.For each group of networks, 20 sets of QoS constraints are taken and 20 networks are generated for each set of the QoS constraints to carry out the experiment.The sum of utility values and    3-5.
Though the computational experiments were conducted on networks with different scales, structures, and constraints, we can draw the conclusion that on average DHA OSCP can get the path with better utility value than that of MFPB HOSTP at a lower time cost.In terms of mean execution time, DHA OSCP can achieve reduction of time cost by 43.7%, 50.3%, and 40.7%, respectively, for the examples shown in Tables 3-5.Since both DHA OSCP and MFPB HOSTP have measures of addressing the imbalance problem at the cost of execution time, they achieve much better utility values than those of H OSTP but more execution time is incurred.When both quality of result and time cost are considered, DHA OSCP achieves better overall performance compared with MFPB HOSTP and H OSTP, which is important for working with manufacturing service networks.
Additionally, compared with H OSTP, the DHA OSCP algorithm adopts two heuristic functions in the forward search procedure; this turns to ensure that, no matter whether imbalanced problems of QoS attributes exist, it can always get a near-optimal path that is no worse than the one obtained using H OSTP.Although the execution time of DHA OSCP is increased due to taking additional measure for addressing imbalance problems, it achieves the same level of time complexity as that of H OSTP. In summary, DHA OSCP can obtain solutions that are much better than H OSTP at a reasonable time cost.
Both MFPB HOSTP and DHA OSCP can solve the imbalance problem to a great extent.Nonetheless, the time complexity of the DHA OSCP algorithm is lower.The time complexity of MFPB HOSTP would become intolerable if the number of hops in the manufacturing network increased to a large level.Moreover, the DHA OSCP algorithm can get a solution with a much better utility value than that of MFPB HOSTP.This is because the forward search procedure adopts UHP as a heuristic function which takes into account the coefficients of the utility function.This is a better search strategy compared with MFPB HOSTP Complexity

Application to Automobile Manufacturing Service Composition
The CASICloud (www.casicloud.com) is a CMfg platform for registering and accessing manufacturing services, which has a large number of service providers and service users.
In spite of being a popular platform, it can only recommend a single manufacturing service provider for a manufacturing task and the capability of conducting manufacturing service composition for complex tasks is missing.To verify the viability of the proposed model and algorithm, they are implemented and integrated into the platform as an add-on function and are tested using data from service providers obtained from the CASICloud.In this case, an automobile manufacturing process is chosen as an illustrative example.
Figure 7 shows the graphical interface of the additional function of service composition, which also gives detailed information about the service composition task for automobile manufacturing being solved using the proposed model and the DHA OSCP algorithm.Specifically, the task of automobile manufacturing can be decomposed into five subtasks, namely, body stamping, body welding, body painting, automobile assembly, and automobile test.Each subtask has a set of candidate manufacturing services that can be selected to meet the requirements of the subtask.Each candidate service provider can be abstracted as a node in the manufacturing network.The logistics relationship between service providers is recorded as an edge in the manufacturing network.Using the DHA OSCP algorithm, a near-optimal solution can be found from the starting node of the manufacturing network to the end one.The choice of the path takes into account both the QoS attributes of the manufacturing service provider and the logistics QoS between the service providers.In this example of application, a user of the system can specify both the QoS constraints (i.e., T, C, and R) and the coefficients of these constraints.After the values are specified, the algorithm can execute the searching process detailed in the previous sections and deliver a nearoptimal path.At the same time, the QoS of each selected service provider and the logistics QoS between them are also available to the user.The utility function is calculated using (8) with values generated according to the specific result chosen by the user.
This application illustrates the effectiveness of the proposed algorithm in the field of automobile manufacturing service composition.In this application, both the QoS attributes of the service providers and logistics are taken into consideration to choose the optimal service composition, which is more accurate and credible in actual manufacturing scenario than many other algorithms.

Conclusion
In this paper, a new model of manufacturing service composition based on network architecture is proposed.This model not only inherits the advantages of the model based on Cloud Computing but also takes the cooperation relationship between services into account; this makes the service composition process more accurate and closer to actual manufacturing scenarios.To solve the NP-Complete problem of selecting the optimal service composition path with endto-end QoS constraints in the service network, the advantages and disadvantages of the existing efficient H OSTP and MFPB HOSTP algorithms are first analyzed in detail.On this basis, a novel DHA OSCP algorithm is developed to solve the imbalance problem with less cost in terms of computation time.Computational experiments are conducted using various datasets to evaluate the performance of the proposed DHA OSCP algorithm, and the results obtained demonstrate that it outperforms existing methods including MFPB HOSTP and H OSTP in optimal service path selection.Its application to a real-world application of automobile manufacturing further shows that the proposed algorithm is viable in searching for optimal service composition path with excellent performance in terms of both solution quality and execution efficiency.
Based on the work detailed in this paper, a service composition search engine, which can work with more

Figure 1 :
Figure 1: Framework of a traditional service composition process.

Figure 3 :
Figure 3: Process of optimal path selection.

Figure 6 :
Figure 6: Solution quality with different scales of service network.

Figure 7 :
Figure 7: Selection of automobile manufacturing service provider.

Table 1 :
Aggregation Method of Different Process Structures.

Table 2 :
Complexity analysis of the three algorithms.

Table 3 :
Results of Different Node Size.

Table 4 :
Results of Different QoS Constraints.

Table 5 :
Results of Different Coefficient.CBLPs to solve the imbalance problem.With the above discussions, it can be concluded that DHA OSCP outperforms MFPB HOSTP in terms of solution quality and time complexity.