Abstract
Hybrid services use different protocols on various networks, such as WIFI networks, Bluetooth networks, 5G communications systems, and wireless sensor networks. Hybrid service compositions can be varied, representing an effective method of integrating into wireless scenarios context-aware applications that can sense mobility via changes in user location and combining services to support target functions. In this article, improved particle swarm optimization is introduced into the quality service evaluation of dynamic service composition to meet the mobility requirements of hybrid networks. First, this work classifies hybrid services into different task groups to generate candidate sets and then interface matching is used to compare the operations of candidate services with user requirements to select the appropriate services. Second, the service composition is determined by the particle swarm optimization simulation process, which aims to identify an optimal plan based on the calculated value from quality of service. Third, considering a change of service repository, when the quality of a composite service is lower than a predefined threshold, the local greedy algorithm and global reconfiguration method are adopted to dynamically restructure composite services. Finally, a set of experiments is conducted to demonstrate the effectiveness of the proposed method for determining the dynamic service composition, particularly when the scale of hybrid services is large. The method provides a technical reference for engineering practice that will fulfill mobile computing needs.
Keywords
Introduction
A hybrid network consists of various sensors and wireless communication methods for supporting data transmission and message interaction, and these networks represent an important infrastructure for the Internet of things (IoT) and mobile computing. For example, the new model of hybrid service uses sensors, 5G communication systems, and Web services to quickly identify a solution that meets the requirements of mobile application integration. As a bridge, sensors can receive and send service data wirelessly, which represents a flexible method of achieving human–computer interactions at different locations. Applications are encapsulated into services to facilitate the seamless integration of networking software that can wirelessly interact with end devices. Ultimately, hybrid services represent a promising method of providing personalized services in the next generation of intelligent computing.
In general, a service interface is a platform-independent application used by software system components; these interfaces occur in the form of plug-ins, which perform the functions of business processes. However, the diversity and complexity of user requirements cannot be implemented by a single service,1–3 and a dynamic composition of services technology is required to respond to a changing market and maximize business benefits. 4 Although networks can help users use and combine target services in certain cases, this process is passive and requires users to connect to the Internet. A hybrid network emphasizes wireless communication, and mobile devices represent an important component. For a hybrid network, sensors have the capacity to provide different sensing services based on the environment, collecting temperature, humidity, light intensity, and so on. All of these services are special function modules. However, the wireless signal may differ significantly, thereby leading to uncertainty in the performance of each hybrid service and variations in the quality of service (QoS), which can have a serious effect on public safety or personal privacy. Link failures and unreachable service are problems often encountered in highly hybrid wireless environments when the user moves to different locations with different networks. Thus, organizing services according to abstract workflows should match functional behaviors and meet non-functional constraints.5,6 In practice, different solutions with different compositions of dynamic services will feature different non-functional features and performance, thus increasing the difficulty of achieving a dynamic service composition under a hybrid network to generate a reliable composition for the user. To guarantee the overall QoS of composite services, many researchers have proposed methods of selecting services to achieve a dynamic service composition,7–9 including business modeling, service verification,10,11 service testing, and service evolution. The core idea underlying these methods includes determining how to automatically discover, select, and compose multiple individual services into a composite service. 12 For hybrid service composition, the most challenging task is determining how to select the component services 13 from candidate services and evaluate the quality of composite service to perform the tasks of business processes. 14
Users often want to purchase services that are fast and robust at low cost. Dynamic service composition should consider these factors. Thus, this process involves a multi-objective optimization problem because certain non-functional elements may conflict with each other. For example, a short service response time will cost more, which leads to low but robust performance. To reach the optimal solution, the particle swarm optimization (PSO) algorithm 15 has been used for the multi-objective optimization problem in many application fields.9,16–21 These methods use the concept of a particle to identify all possible solutions under multi-objective demands when problems are abstracted as a particle swarm. Thus, the PSO algorithm is used to solve the service selection problem when abstract business processes are defined, particularly in the context of hybrid networks. In this article, PSO is improved to evaluate the QoS of composition plans for the service selection problem, and three coefficients are employed and revised to control particle swarm movement: inertia weight (ω), which is used to set the movement direction for the particle swarm; cognition coefficient (c1), which is used to indicate the individual best status; and social coefficient (c2), which is used to indicate the global optimum. The searching results using the improved particle swarm optimization (IPSO) method for service composition will indicate an optimal solution for abstracting business processes.
However, the uncertainty of the Internet increases the vulnerability of service components, such as during service upgrades and application crashes. Thus, methods addressing the failure risk of a hybrid service composition should consider changes in the service repository to dynamically adjust or restructure component services. Most service compositions are static and cannot manage the dynamic update problem of the service repository.22–24 Therefore, two application conditions are considered. First, if the quality of the component service is lower than a critical value, then the local greedy algorithm is used to replace the “bad” service to make the current solution available for use. Second, if the quality of the composite service is lower than a critical value, then the global IPSO is used to restructure the composite service, which will select new services as composition solutions to prevent service failure.
In this article, a novel approach to identifying dynamic service compositions for a hybrid network is proposed, using the IPSO technique and focusing on calculating the QoS. This research focuses on service selection to assign services to activities of the business process; the optimal service composition will be returned as a solution to the required tasks, and complex business processes are implemented in a wireless environment. This method involves two steps: generation of the service composition and managing changes in the service:
During service composition generation, composite services are generated by the IPSO method. User demands are abstracted into service tasks and business processes. Then, a service group is defined to identify similar-function services for each concrete activity task. The optimal composite service is recommended to the user, during which the QoS of the service composition is calculated by the IPSO algorithm to evaluate the performance of the composition plan.
During the handling of service changes, services will be recomposed by the local greedy algorithm and the global reconfiguration method. The local greedy algorithm is used to select new services to replace low-quality services, whereas the global reconfiguration method based on the IPSO is employed to rebuild composition plans when the total quality of the service composition is lower than the expected value of the user demands.
The remainder of this article is organized as follows. Section “Motivation” provides an example of the motivation scenarios. Section “Preliminaries” provides background knowledge and formal definitions. Section “IPSO-based dynamic service composition” proposes an IPSO algorithm for dynamic service composition. Section “Experiment and results analysis” presents the experimental results and analyses. Section “Related work” reviews related work. Section “Conclusion and future works” summarizes the paper and discusses future directions.
Motivation
New Internet technologies have expanded hybrid services used in the business and scientific communities. In this section, Figure 1 illustrates an example of the related features of the problem of dynamic service composition in a hybrid network. Various sensors are deployed in a room to collect user information and application requests, and the sensors return the corresponding data to the user through a wireless network.

Hybrid networks scenario in wireless mode.
Suppose that a mobile user moves from room R1001 to R1006 in a museum, sensors use the ZigBee protocol to collect user-related information and employ 5G communications to quickly provide corresponding composite services. The user wants to edit and upload recorded pictures on a mobile device; however, appropriate applications have not been installed on the device. As an optional solution, these functions can be supported by hybrid services in the museum. This objective is difficult to achieve. If one service cannot meet the requirements, then several services can be deployed together to provide the appropriate functionality. For example, three hybrid services can be employed to provide (1) a location service, (2) a picture editing service, and (3) a microblog posting service. Toward that goal, the appropriate service composition is required to provide all requested services.
As shown in Figure 2, the process consists of seven tasks, and each task can be executed by the service provided by the software component deployed via internal service networks or a cloud infrastructure, with different sensors in different rooms used for wireless communication. The architecture contains four layers: a business process layer, a hybrid network layer, a services layer, and a server layer. For example, task 2 uses service 2 hosted on the cloud server via sensor 2 deployed in room 2 under the WIFI protocol, and task 3 uses service 3 hosted on the cloud server via sensor 3 deployed in room 3 under the 5G Access Point. Thus, the hybrid network is important for structuring business processes from a distributed environment for further application.

Sensor-based services composition for dynamic business processes.
However, considering the mobility of the user, the availability of hybrid services may be changed because of wireless transmission distance limitations. The problem of service selection for dynamic service composition under hybrid networks is even more challenging. While traditional QoS-based service composition methods that select component services with the best QoS may not always return the best solution, the hybrid service composition tackles new challenges that traditional composition methods cannot handle; that mobility makes the service performance unpredictable.
First, the signal coverage may be poor indoors. Therefore, the picture editing and uploading functions may take a long time to run or even fail. The new composition method for hybrid services should consider a different status when the user moves and select different hybrid services for different service compositions.
Second, sensors are considered an interface for receiving and sending messages to the end user. The location restricts the useful distance and leads to limited communication among the deployed sensors because obstacles may cause signal attenuation. Thus, the selected hybrid services should be based on the sensor performance, which calls for high reliability.
To minimize the risk of composition failure, hybrid services should be selected with sufficient availability for each service composition. Thus, the IPSO focuses on determining the QoS to provide for dynamic service compositions in a hybrid network.
Preliminaries
To formalize the hybrid service and service composition, the following preliminary definitions are introduced.
Definition 1 (Hybrid service)
Hybrid service is defined as follows
The interface operation is used to exchange data among hybrid services. Thus, the function of each service is formalized by an interface; Id is the identifier of each service, IO represents the input and output of the service interface descriptions, D is the basic information of the service (such as the URL, name and publisher), and qos is the service quality set of non-functional descriptions, such as the cost, reliability, execution time, reputation, and availability.
User requirements take the form of a set of tasks and are denoted as Task, where Task[i] is the ith task. In this study, each element task∈Task is considered a user requirement. The candidate service set is a specific collection of services for supporting the service composition and is denoted by CS, where CS[i] refers to the ith service in the CS. Each element cs∈CS is considered a candidate service that can meet a user-requested task.
Definition 2 (Service group)
Two or more services grouped together to accomplish one task are referred to as an SG. Each SG can be regarded as a small composite service. The QoS of an SG is based on calculating the QoS of all services in the SG
V = {ws1, ws2, …, wsn} is a set of services;
qos = Q(SG) is the QoS of an SG, where Q (SG) represents the QoS value of an SG.
Under a hybrid network, different sensor nodes provide various services. The possible service groups for a target task will display different performances because the connected services may be missing. Based on the service groups, the composite service is a process for selecting the corresponding services according to the workflow as a directed graph, where the vertex is the task and the edge represents a composition relationship from one task to another. In this article, a composite service is defined as follows.
Definition 3 (Composite service)
Composite services are performed to fulfill user requirements and are denoted as C, where C[i] is the ith service in a composite service for supporting task∈Task. According to the different composition plans, composite services are divided into three types.
The composite service C′ is a new composite service, which is based on the original structure of C.
The initial composite service C0 is the starting point. When composition work is initially started, C0 is the first composite service solution to complete the Task.
The composite service set ΔC′ represents a service belonging to C that must be changed.
Definition 4 (Similar-function service set)
To classify services into different partitions, the similar-function service set Sci is proposed to describe similar services and consists of Si and Si+ as follows
where Si is a service set with the same function and Si+ is an SG set with the same function. For the former, the elements are individual services; for the latter, the elements are the service groups that contain different services that work together. Si and Si+ are called similar-function services because these services include the same input and output at the interface level, which means that each service can be replaced by another similar service and that two or more services can be organized to achieve the desired composition.
Algorithm 1 is responsible for generating the similar-function service set for each task specified by the user requirements. The algorithm first fetches the services for the candidate service set CS, and then services Si and Si+ are filtered and combined into Sci, where FindAllServce() is used to find similar-function services from service repository SR and FindAllSG() is used to find similar-function service groups from the SR. Finally, the classification result {Sc1, Sc2 …, Scn} is returned as the output.
Because of the limited energy and transmission scope of communications, the importance of the QoS and the functions used to select the appropriate service is highlighted. For example, if the hybrid service composition for Figure 2 has a lower QoS value, then the related services should be re-selected. Moreover, the local-scope QoS value of Figure 2 should also be considered; for example, if {T2} and {T2, T3, T4} have lower quality, then they should be replaced. Accordingly, the principle associated with the QoS critical value is as follows.
Definition 5 (QoS critical value)
The critical value of the QoS constraints is the value expected by the user, including the maximum spending, maximum waiting time, lowest reputation, and lowest reliability. Two conditions are proposed to determine the composite service or service group:
If the QoS value of composite service C is lower than a critical value, then the user cannot select the current composite service.
If the QoS value of service group SG is lower than a critical value, then the user cannot select the current service group.
IPSO-based dynamic service composition
Method overview
The framework of the dynamic service composition is briefly introduced, and the process of selecting the dynamic service composition using a flow diagram is discussed in this section.
The framework of the dynamic service composition features six parts: service repository, interface matching processing, hybrid service composition requirements, similar-function service selection, IPSO-based QoS computing, and service change management process. As shown in Figure 2, the framework aims to provide an efficient method of executing the dynamic service composition by a hybrid networks over a wireless network.
The service repository stores various hybrid services for the dynamic composition and uses Axis 2 to generate WSDL to describe the service input/output interfaces and functions. The QoS values of the interface are also recorded in a MySQL database when these services are registered to the platform.
Interface matching processing is responsible for checking the input/output interface of the services in the service repository when the hybrid service composition requirements are received. A service discovery platform based on Java is implemented and focuses on function matching checking. The output is regarded as the candidate services for the process in the next step.
Hybrid service composition requirements are responsible for describing the behavioral and data models. For the former, the workflow in the form of BPEL is output as the target behavior. For the latter, the interface set is returned as interface matching data after analyzing the behaviors.
Similar-function service selection is responsible for selecting proper services according to the composition requirements. This selection first tests the atom service and compares it with the composition task to select the candidate services, which are called the service set. Then, this process attempts to assemble certain services and compare their functionality with each task. If there are possible compositions to support specific tasks, then they are marked as service groups. Finally, these two types of sets are output, and they can be used to fulfill tasks of a business process when responding to user requests.
IPSO-based QoS computing is responsible for finding service composition plans to provide an optimal composition plan. The QoS factors include price, execution time, reputation, reliability, and availability. These metrics are calculated and analyzed during particle swarm computing, where the global optimization and individual optimization are considered to achieve multi-objective optimization.
The handling process for service changes is responsible for handling the change of service repository, which considers service reconfigurations to adjust the current service composition plan. The first step is to locate the service change and compare it with the critical value of QoS constraints requested by user demands. This process should consider the local composition scope or the global composition scope, where the local greedy method and IPSO method are employed to generate the dynamic service composition, respectively.
Service classification
To accelerate service retrieval, services in the service repository can be divided into different classes according to their interfaces. An example of a service repository is used to demonstrate the principle of service classification. Suppose that the input set of user requirements is I = {I1, I2, I3}. Figure 3 shows the possible invocation relations among services when a user query is submitted for the service composition. In the assumptions, the user requirements I1, I2, and I3 contain the same function, input and output. In the initial phase, I1, I2, and I3 are grouped into a service group SG. Services A and L are the similar-function services in subsequent steps, and they can implement the functions of the interface operation for I2 and I3, respectively.

Framework of the dynamic service composition.
Furthermore, the directed graph relationship in Figure 4 shows a set of invocation sequences. The single service implements the user requirement I3, and services A, D, and F working together can implement the user requirement I2. However, services B, E, D, and F working together can implement other requirements that exceed user requirement I = {I1, I2, I3}. Figure 5 shows the classification results for the relations illustrated in Figure 3, where Sc1 = {I1, I2, I3}, Sc2 = {A, L}, Sc3 = {D}, Sc4 = {F}, and other = {B, E}. Note that the set including B and E should be ignored.

Service repository example.

Classification result example.
Because the service classification process is related to invocation sequences, the following two steps are proposed to implement this process:
Step 1. The candidate service set from SR is generated by the iterative breadth-first searching method, which is based on user inputs, 25 and compares the interface operations. Each possible service is selected when the matched input is removed. Then, the searching process continues until all inputs are matched.
Step 2. The classification scheme is used to generate the similar-function service set according to WSDL descriptions (i.e. function, input, and output). Algorithm 2 is used to classify similar-function services to generate set Si + , which invokes the function FindAllSG() of Algorithm 1.
Search group generation is an iterative searching method that separates the same types of SGs and builds the service set Si+ according to each task∈Task. First, this process selects services from CS that can meet the inputs of task∈Task and then places them into Sin. Second, all other services required to complete the task are removed to ensure that there is no other single service that can satisfy the task. Then, according to the invocation relationship of the service into Sin, services are sorted into different SGs. Third, all SGs are checked to determine whether task can be completed before searching for the next service. If the services of SG reach the critical value of QoS constraints, then they cannot be used in the final results. Thus, these services should be removed from Sin. Possible solutions are placed into Si+ and removed from Sin. The algorithm is repeated until Sin is empty.
IPSO-based dynamic service composition
Extensive research on the PSO algorithm has been published. In general, three parameters of the PSO method are used to control each particle’s movement: inertia weight ω, self-cognitive coefficient c1, and social cognitive coefficient c2. 26 These parameters are adjusted to move the next search for the service composition toward a global optimum, individual optimum, or equilibrium. If c1 is greater than c2 and ω, then one service of the individual optimization solution is used to replace the current solution. If c2 is greater than c1 and ω, then one service of the global optimization solution is used to replace the current solution. If ω is greater than c1 and c2, then the solution is updated by randomly selecting a service in the current solution and replacing it with a similar-function service.
Three variables are defined in the form of <ω, p1*c1, p2*c2> to evaluate the dynamic service composition, where parameters p1 and p2 are random numbers whose values range from 0 to 1. The service composition problem is considered a particle when searching for a possible solution, which includes the global optimal solution Gc, the historical optimal solution Pc, and the current solution C. As shown in Algorithm 3, the service composition problem produces the IPSO-based dynamic service composition. The inputs of the algorithm are tasks (Task) and similar-function service sets {Sc1, Sc2, …, Sc}. The output of the algorithm is the optimal solution Cbest0.
The objective of Algorithm 3 is to randomly obtain a new composite service C′ by using <ω, p1*c1, p2*c2>. To find the best composition C, parameters ω, c1, and c2 are updated and compared according to each particle C[i]. During the task-solving process, three conditions are considered: (1) if ω is maximum, then C[i] is randomly changed to C′[i] by adjusting one service; (2) if p1*c1 is maximum, then the algorithm randomly selects a service of C[i], and a corresponding service from Pc[i] is used to replace it. In this method, the command update Pc[N],Gc is based on QoS metrics. The QoS metrics are used to determine whether the composite service is optimal, and the service is considered a new particle C′[i]. (3) If p2*c2 is maximum, then the algorithm randomly selects a service of C[i], and a corresponding service from Gc is used as the substitute for it, which is considered a new particle C′[i].
The QoS metrics used to check the QoS composition include the service price, execution time, reputation, reliability, and availability. The different structures of business processes are also taken into consideration. The overall QoS of the service compositions is calculated by considering the QoS of the component services and aggregating them. Table 1 shows the QoS calculation method of composite service C, which contains n services or SGs. Note that p[i] is the probability of C[i], and k is the number of iterations.27,28
QoS Computing for different structures.
Based on Table 1, the unified QoS value of the composite service is proposed to quantitatively evaluate the composition as follows
where K1 are K2 are negative values and K3 is a positive value29,30
where symbol n is the number of services in C, CS[i] is the service in CS, m is the number of services in the key path of C, and U is the upper bound of the reputation. For example, if the reputation range is from 0 to 10, then the reputation is set to U = 10.
To rank and compare the composite services based on the value Q(C), the token ≻ is used to define the partial order relation between two composite services. For example, Q (C1) ≻ Q (C2) indicates that the Q(C) value of composite service C1 is better than the Q(C) value of C2. However, one QoS metric value for C1 may be worse than the value for C2.
Algorithm to manage service changes
The risk of service failure may be randomly encountered, which is an important factor in hybrid networks. Thus, the quality of a service composition may change, and dynamic handling of service changes plays a critical role in guaranteeing the reliability of a hybrid service composition.
The first strategy is to focus on components of the local scope or processes. Suppose that the QoS of one or more component services reaches a critical value, the original structure of the composite services is maintained, and the greedy algorithm is used to locally replace the “bad” service. The new solution
Algorithm 4 is proposed to handle the local replacement; the algorithm uses the local greedy method to find the service for each element in ΔC according to the composite service structure. Then, the algorithm dynamically recalculates composite service Cbest.
The second strategy is to recalculate the service composition. In the first situation, a suitable service is not available to replace the failed service in the service repository. In the second situation, the user requirements are changed or the quality of the service composition is less than or equal to the critical value, and then a new composition plan by is designed by the IPSO.
Algorithm 5 is used to rebuild the service composition as follows. The IPSO method is used to identify the service composition according to the value of Cbest0 when a new demand is input. The function UpdatingIsNotNecessary() is used to verify whether the configured plan is optimal. If the function returns a yes value, then the Cbest0 value is considered a solution, and the current plan is recommended as the new service composition.
Experiment and results analysis
In this section, two sets of experiments are conducted to demonstrate the proposed method’s effectiveness for practical applications. The first experiment is performed to evaluate the availability of using our method, which mainly considers the convergence speed when finding suitable services. The second experiment addresses the degree of satisfaction associated with using our method, which mainly considers the optimality ratio.
Experiment preparation
The experiment is conducted on an Intel I7-4710MQ 2.50 GHz CPU with 8 GB of memory running Windows 10. The proposed algorithms are developed using the C++ programming language and Visual Studio 2010. The test data are derived and reorganized from service data collected from the literature;33–35 the associated services are hybrid services.
To specify the QoS for each service, the reliability value is obtained from the test data and other factors are randomly generated. The stochastic intervals for Table 1 and Formulae (1) to (4) are as follows: the price Qp(C) is changed from 0 to 500, the execution time Qt(C) is varied from 0 to 2 with a 0–10 interval for the reputation Qrep(C), and the availability Qa(C) is changed from 0.9 to 1.
Experiment evaluation
The first experiment evaluates availability by configuring different parameters for c1, c2, and ω to observe the optimal value setting, which allows for the convergence speed to be assessed.
Research has noted that ω should be set as a decreasing iteration function rather than a constant. 26 The literature36–38 indicates that improved performance is observed when ω is built as a concave iteration function or a concave decreasing function. In this article, the inertia factor decreases as the iteration number increases. Therefore, ω is proposed as a decreasing function [(T – t)/T] n , where T represents the total number of iterations and t represents the current number of iterations. For self-cognitive and social factors, when c1 is set as a decreasing iteration function and c2 is set as an increasing iteration function, the performance improves.39–41 In these experiments, c1 is set as a decreasing function 1 – (t/T) n and c2 is set as an increasing function (t/T) n . To simulate the process of determining the solution to the service composition, the parameters n and T are varied to observe and analyze the convergence speed.
As shown in Table 2, five control experiments are designed. The first parameter configuration is a fixed value that can be regarded as a general PSO. The second parameter configuration is c1
IPSO Parameters.
IPSO: improved particle swarm optimization.
To explore a better set of parameters, the operational settings are as follows: the population number is 15, the evolution number is 1200 times, and the testing number is 20 times. The simulation process is described as follows. For an abstract business process in a hybrid network, the application scenario is simulated and designed as shown in Figure 1. The service composition must complete 15 nodes of business activity. Each activity has input and output requirements, and the services test data in the service repository are also extended with input and output descriptions. Nearly 100 similar services are configured to each node for the selection. Similar services in the test data indicate input/output behaviors with different QoS values. Finally, experiments are performed to study the effect of parameters and find an optimal composite service under these different conditions.
Figure 6 shows the convergence speed of each control experiment when calculating the QoS for each plan of service composition during the PSO process. The convergence speed reflects the performance of the algorithm. Thus, the running time of the service composition algorithm and the final recommendation results are influenced by the settings of the three parameters ω, c1, and c2. As shown in Figure 6, the iterations from 1 to 1100 are varied with different intervals. Intuitively, control group No. 1 with constant values shows the worst performance. Control group No. 3 shows the best comprehensive performance. When the number of iterations reaches 200 times, control experiment No. 3 indicates that the current composite service is close to the optimal solution, and a better solution may be found during subsequent searching because the QoS trend of No. 3 for identifying a solution is stable and faster than that of the other groups. Based on the search times and accuracy, the parameter settings of No. 3 display stable performance, which is suitable for a dynamic service composition.

Convergence speed experiments.
The second experiment evaluates the optimality ratio by comparing our approach IPSO with the traditional method GA (genetic algorithm), PSO and NSA (Negative Selection Algorithm 42 ); this experiment seeks to analyze which method is the most suitable for hybrid networks. GA is a search heuristic algorithm that mimics natural selection. NSA is an immunology algorithm derived from artificial immune systems. In this experiment, the optimality ratio is computed as follows
where ns is the QoS satisfied number of returned services and Ns is the total number of returned services. Thus, the optimality ratio reflects the efficiency of these algorithms.
We set parameter values c1 = 0.992, c2 = 0.008, and ω = 0.8 for IPSO and PSO. Figure 7 shows the optimality ratio between IPSO and PSO as the number of services increases from 20 to 800. The experiments indicate that IPSO is better than PSO, as the service composition is returned by the IPSO method using the unified QoS formula, and the local greedy algorithm and the global reconfiguration method will execute QoS-aware services for service entities. Thus, the method can find new services according to the associated changes. However, PSO only performs this procedure once without the ability to consider service replacement. Thus, even when the QoS is changed, PSO is more suitable for coping with the dynamic nature of hybrid networks.

The optimality ratio experiments for IPSO and PSO.
We then set the parameter values c1 = 0.992, c2 = 0.008, and ω = 0.8 for IPSO, set the parameter values cross rate = 0.8 and mutate rate = 0.2 for GA, and set the parameter values a = 0.1, b = 3, and r = 1 for NSA. The optimality ratio experiments for comparisons among IPSO, GA, and NSA are carried out, in which the number of services still increases from 20 to 800.
Figure 8 shows the optimality ratio. All three methods achieve good performance. However, we observe that our IPSO method, for which the optimality ratio decreases slightly, outperforms the others with increasing service number. As the number of services increases from 100 to 800, the downward trend of IPSO is slower than that of GA and NSA. This trend is observed because services with different QoS that provide more options to dynamic service composition will fail to meet the predefined QoS requirements although the QoS of each single service can be satisfied. On one hand, an increasing number of duplicate services are found during service selection as the number of processes increases. On the other hand, with the increasing number of iterations, IPSO can quickly return new services, as the convergence speed reaches a stable point. The algorithm will stop working and then provide recommendations to the user in advance. However, NSA and GA will continually find all satisfied services, which will not only require more time for the matching task but also lead to different composite plans that may fail to meet the specified requirements, particularly QoS restrictions. Thus, for large-scale services, IPSO can provide effective solutions.

The optimality ratio experiments among IPSO, GA, and NSA.
Related work
A service-oriented hybrid network is responsible for collecting the surrounding context and environmental information and should respond rapidly to changing markets and user demands; thus, the network requires dynamic service selection and assembly mechanisms for business processes. Studies on the dynamic service composition problem and the primary techniques and methods for addressing the problem that are most closely related to this work are reviewed.
The wireless environment of hybrid networks should consider QoS computing for service composition to generate a reliable composition. Wang 43 proposed a mobility prediction method to achieve dependable service composition. The authors exploited the fact that service providers could predict their stay time in the current environment and used two models to characterize the uncertainty, a probability-free model and a probabilistic model. Groba and Clarke 44 proposed a novel service composition protocol that allocates and invokes service providers opportunistically to minimize the effect of topology changes and to reduce failure. Luo et al. 45 proposed a network-aware algorithm for service composition in which network features such as network availability and delay are considered during the service composition process. These studies show that the hybrid service displays different QoS and requires reliable computing methods during service composition. However, the studies do not consider the optimal QoS service composition.
Thus, many researchers have addressed the optimal service selection problem before integrating the results into specified workflows. We mainly review studies on service selection for traditional service composition, which can be divided into integer programming, multi-objective optimization problem, GA, and PSO research. For example, Liu et al. 46 proposed a model of Web service selection with QoS global optimization and converted this NP-complete problem into a multi-objective optimization problem with constraints. Sun et al. 47 proposed a decomposition-based approach for service composition, in which the utility of a composite service could be computed from the utilities of component services and the constraints of component services could be derived from the constraints of the composite service. Qi et al. 48 proposed a heuristic service composition method, named LOEM (local optimization and enumeration method). The method aimed to filter the candidates of each task to a small number of promising ones by local selection and then enumerated all the composite solutions to pursue a near-optimal one. Luo et al. 49 developed a heuristic algorithm for web service composition with end-to-end QoS constraints using the combinatorial optimization method. These algorithms can solve the service composition problem across a broad range of application areas. Kang et al. 50 proposed the global optimization of dynamic Web service selection based on PSO (PSO-GODSS) algorithm to implement Web service selection with QoS global optimization. Frederico et al. 51 presented an approach for dynamic service compositions that considers the overall composition quality. For service selection, Zhang et al. 9 proposed a method based on discrete particle swarm optimization (DPSO) to select atom services from service repositories to constitute the composite service; the method satisfies military service user requirements for QoS. These studies form the foundation of the research discussed in this article. However, in hybrid networks, future service composition will need to be more flexible and complex.
For the optimization problem in wireless mode, many methods based on the PSO algorithm are widely used, and allocation methods have been proposed. Hossain et al. 52 proposed a big data-driven service composition approach using a parallel clustered PSO algorithm in the mobile environment. PSO and k-means clustering are compiled to develop an algorithm that runs in parallel with MapReduce on the Hadoop platform. Using parallel processing, the optimum service composition is obtained in significantly less time compared with alternative algorithms. Zuo et al. 16 proposed a resource allocation framework in which an IaaS provider can outsource its tasks to external clouds (ECs) when its own resources are not sufficient to meet the demand. The key issue is determining how to allocate user tasks to maximize the profit of the IaaS provider while guaranteeing QoS. This problem is formulated as an integer-programming (IP) model and solved by a self-adaptive learning particle swarm optimization (SLPSO)-based scheduling approach. Guo et al. 53 considered the task allocation problem and proposed an approach to constructing DPSO, which is achieved by adopting a binary matrix encoding form, minimizing task execution time, saving node energy costs, balancing network loads, and defining a fitness function for improving scheduling effectiveness and system reliability. Methods that involve integer programming and neural network computing have also been proposed. Lee et al. 18 considered the multi-robot map-merging problem for multi-robot systems and proposed a multi-hypothesis map-merging algorithm with sonogram-based PSO. Zhan et al. 19 proposed a PSO-based service selection process that considers the personal best and global best. Ludwig 20 introduced two meta-heuristic methods based on PSO to address the optimization service problem. Fong et al. 21 proposed a novel lightweight feature selection method for data streams and mining big data that uses an accelerated particle swarm optimization (APSO) type of swarm search to enhance the analytical accuracy within a reasonable processing time. Wang et al. 17 focused on adaptive fuzzy spiking neural P systems (AFSN P systems) inference algorithms and learning algorithms and built a fault diagnosis model for effective diagnoses. A PSO algorithm is introduced into the learning algorithm of AFSN P systems, thereby improving the convergence speed of diagnosis. Methods of selecting services that involve improved PSO algorithms have also been proposed. Unlike in the abovementioned studies, we formalized the service composition problem in hybrid networks in which it is not easy to apply the traditional methods. This article proposes an IPSO method for identifying a dynamic service composition for hybrid networks. The proposed method can reconfigure the service composition based on QoS evaluation when a change of service repository occurs.
Conclusion and future works
Because of network development, enterprises have adopted wireless services to communicate and cooperate with each other. Risks are involved in service compositions because of the uncertainty of wireless communication, which influences the QoS of composite hybrid services and the ability to obtain optimal results. This article proposes an IPSO method for a dynamic service composition in a hybrid network. First, the candidate service set is classified according to user requirement tasks. Second, the service composition is returned by the IPSO method. Third, when the quality of component services in the composition plan is lower than a critical value, the greedy algorithm is used to replace the services and perform dynamic reorganization. When the service repository is updated, a new service plan will be dynamically reconfigured because the global QoS of the composite service may be lower than the predefined threshold. This two-stage method is used as a monitoring mechanism and can guarantee the availability and reliability of the service composition.
In the future, the candidate service-filtering algorithm will be studied to remove redundant services, and the inverted index method will be employed to provide a better scheme for reducing the response time.
Footnotes
Handling Editor: Gianluigi Ferrari
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This paper was supported by the National Natural Science Foundation of China under Grant Nos. 61502294 and 61173177 and the National Key Technology R&D Program under Grant No. 2015BAH17F02.
