Web Service Composition Optimization with the Improved Fireworks Algorithm

Even though the number of services is increasing, a single service can just complete simple tasks. In the face of complex tasks, we require composite multiple services to complete them. For the purpose of improving the e ﬃ ciency of web service composition, we propose a service composition approach based on an improved ﬁ reworks algorithm (FWA++). First, we use the strategy of random selection to keep N − 1 individuals for the next generation, and the purpose is to speed up the convergence speed of the FWA++ and enhance the search ability. Second, we randomize the total number of sparks and maximum amplitude of sparks for each generation. In this way, the search ability and the ability to jump out of the local optimal solution are dynamically balanced throughout the execution of the algorithm. Our experimental results show that compared with other existing approaches, the approach proposed in this paper is more e ﬃ cient and stable.


Introduction
With the emergence of a large number of web services, enterprises and individuals can select multiple services to build enterprise applications and software systems through the technology of service composition [1,2], which is called Service-Oriented Computing (SOC). Service composition is one of the core technologies of SOC, which flexibly aggregates the required resources and realizes service reuse [3]. However, with the convergence of a large number of web services with the same function, quality of service (QoS) has increasingly become an essential factor that needs to be considered in the process of selecting services from these function-equivalent services for composition. Therefore, many QoS-based web service composition methods have been proposed.
Among them, different variants of FWA have been proposed to improve the performance of the traditional FWA. Zheng et al. [13] proposed an Enhanced Fireworks Algorithm (EFWA); in their work, four strategies were utilized to improve the original FWA. First, the minimum explosion amplitude parameter was used to avoid the case of 0 amplitude. Second, the generation strategy of explosion sparks was modified to enhance explosion ability. Third, the generation strategy of Gaussian sparks and mapping rules were modified to avoid the degradation of optimization performance caused by the objective function being far from the origin. Fourth, a random selection strategy was adopted to reduce the algorithm's running time. However, the explosion amplitude is static during the execution of the algorithm, which limits the scope of application of the algorithm. Zheng et al. [14] and Li et al. [15] proposed the Dynamic Search Fireworks Algorithm (dynFWA) and the Adaptive Fireworks Algorithm (AFWA). The two algorithms were enhanced on the basis of the EFWA algorithm and improved the setting of explosion amplitude so that the explosion amplitude can be adaptive in the whole algorithm. Thus, the algorithm can adapt to different optimization objectives and search stages. The IFWA algorithm proposed by Zhang et al. [16] was improved on the aspect of optimization strategies. The strategy has stronger robustness and applicability by using the optimal fireworks to generate sparks instead of the explosion amplitude adjustment method of dynFWA and AFWA. However, the optimal fireworks to mutate reduces the diversity of the population, and the elite selection strategy makes the fireworks population close to the local optimal position. Yu et al. [17] proposed another elite strategy based on EFWA. Each firework and the sparks it produces are used to calculate a gradient-like vector, and then use it to estimate the convergence point, and may replace the worst firework individuals in the next generation.
In addition to improving the operator, the hybrid FWA combined with other metaheuristic algorithms is also an important research direction. Zheng et al. [18] combined the differential evolution (DE) algorithm with the FWA. A feasible solution is generated by the DE operator to the selected individual. If the fitness value of the feasible solution is better than the original individual, the original solution should be replaced. Zhang et al. [19] introduced the biogeographic optimization algorithm (BBO) into the EFWA to form a new algorithm (BBO-FWA), in which BBO provides an idea of cross-migration of firework individuals according to fitness value, and the lower the fitness value, the higher the probability of cross-migration.
What is more, FWA has been widely used in a wide range of real-world problems. Bolaji et al. [20] used FWA to train the parameters of the feedforward neural network and applied it to the classification problem. Zare et al. [21] introduced two effective cross-generation mutation operators into FWA to solve discrete and multiconstrained problems. Furthermore, this method was applied to solve the problem of multiregional economic dispatch. For more information about the applications of the FWA, please refer to the following literature [22,23].
Although the above research has improved the FWA's performance, according to the no free lunch theorem [24], there is no specific metaheuristic algorithm that can positively affect various types of optimization problems. So, it is encouraged to improve and apply the FWA to solve the optimization problems. In addition, the balance between the search ability and the ability to jump out of the local optimum in the FWA has not been well solved. Therefore, we propose the improved fireworks algorithm (FWA++) to solve the optimization problem of service composition. First, we cluster the services with the same function. A WDSL document records a lot of information related to the service, so we extract the service name, port type, information, document, and operation from it and transform them as an embedding. Then, the k-means algorithm is used to cluster multiple services which are transformed as embeddings. Second, we improve the original FWA in two aspects: (1) The selection strategy in the original FWA requires a lot of computation time, so we randomly keep N − 1 individuals to the next generation under the premise of ensuring the optimization direction. It reduces computation time. (2) The algorithm falling into the local optimum was avoided, and strong search ability was kept. In each generation, we randomize the total number of sparks and maximum amplitude of sparks. Finally, we apply the FWA++ to service composition, and the results show that our algorithm is effective.
Our main contributions are as follows: (i) In order to speed up the convergence speed of the FWA++ and enhance the local search ability, we use the strategy of random selection to keep individuals for the next generation (ii) For each generation, randomize the total number of sparks and maximum amplitude of sparks. In this way, the search ability and the ability to jump out of the local optimal solution are dynamically balanced throughout the execution of the algorithm (iii) We experimented with our approach in a real-world data set which includes 9 QoS attribute values of 2500 real web services. The results show that compared with several existing approaches, the performance of our proposed approach is better The rest of this paper is organized as follows: Section 2 summarizes the related work of web service composition. Section 3 presents mathematical modeling for the web service composition problem and a diagram to illustrate the process of service composition. Section 4 introduces the framework of approach and design details. Section 5 introduces simulation experiments and performance evaluation. Section 6 reviews and summarizes this paper.

Related Work
In this section, we will refer to some literature to describe the related work of service composition. Generally, to solve the optimization problems of service composition, heuristic and metaheuristic algorithms are mainly used. Nevertheless, the metaheuristic algorithms are the essential solution, so we will focus on them in this section.
The heuristic algorithms are constructed through the experience of specific optimization problems [25]. Klein et al. [26] presented a method based on hill climbing to find the best solution. In this method, the search space is limited. So, the algorithm's time complexity is much less than that of the linear problem when finding an optimal solution. Liu et al. [27] proposed a service composition method based on a branch constraint execution plan. The algorithm is divided into two stages: in the first stage, the composite service state is transformed into a state transition graph; then, the dynamic process of composite service execution can be analyzed. The second stage uses the web service execution language to find the best solution. Lin et al. [28] presented a relaxable QoS-based service composition approach. In this approach, the optimal solution is subject to local and global constraints. Although the heuristic algorithm can get an approximate solution in a reasonable time and data scale, the designs of the heuristic algorithms mainly depend on the experience of specific optimization problems, so this limits its scope of application. Moreover, when dealing with the problem of large-scale data, the effect is often not guaranteed.
The metaheuristic algorithms are also approximation algorithms. They are no longer designed for specific optimization problems and have the characteristics of a good optimization effect and less time consumption. Many scholars used metaheuristics to solve service composition problems. Canfora et al. [29] tackled the service composition problem by the genetic algorithm (GA). Although GA is slower than integer programming, it is an effective method to handle service composition optimization. Furthermore, Tang and Ai [30] proposed a hybrid genetic algorithm for the optimal web service composition problem, which performs better than other algorithms. However, when service-oriented applications are complex, GA is not suitable. Ludwig [31] addressed the problem of service composition by introducing particle swarm optimization (PSO). The results show that it performs very well. However, the problem of premature convergence of PSO needs to be solved.
Chandra and Niyogi [32] proposed a modified artificial bee colony (mABC) algorithm. In this algorithm, a chaotic-based opposition learning method is used to initialize the population, and differential evolution (DE) is used to enhance exploitation. mABC has robust scalability and high convergence speed. However, service composition is a discrete optimization problem; mABC may fall into the local optimum. Xu et al. [33] proposed an approach based on artificial bee colony (ABC) algorithms for the service composition problem. In this approach, the author improved the neighborhood search of the ABC algorithm to adapt to the discretization of service composition. At the same time, three algorithms are proposed to maintain the performance and simplicity of the approach. The results show that this approach has high accuracy and avoids local optimization. However, it is time-consuming when this approach replaces multiple component services at the same time.
Li et al. [34] introduced an elite evolutionary strategy (EES). Furthermore, it was applied to HHO to improve the convergence speed and capacity of jumping out of the local optimum. Moreover, a hybrid algorithm that combined EES and HHO was presented. This algorithm has a fast convergence speed and strong robustness. However, this approach may fall into the local optimum because service composition is a discrete optimization problem. Li et al. [35] presented a novel approach CHHO to find an optimal solution by incorporating logical chaotic sequence into the Harris Hawks Optimization (HHO) algorithm. In this approach, the neighborhood relations of concrete services were constructed to form a continuous space, which avoids CHHO falling into the local optimum. Chaotic sequences have ergodic and chaotic features, which help CHHO improve the capacity to jump out of local optimization. In large-scale scenarios, CHHO has less computation time.
However, CHHO's performance will not be good when the QoS attributes are not independent.

Problem Statement
Before proposing our approach, we will provide a diagram to illustrate the process of service composition and the mathematical modeling for the web service composition problem. Figure 1 shows the process of service composition by using the integer coding method and the sequential combination pattern. First, input a composite service S = fT 1 , T 2 , ⋯, T n g. Here, each task corresponds to an abstract service, for example, T 1 corresponds to abstract service S 1 . And each abstract service has m number of concrete services; for example, S 1 has m number of concrete services with the same function. Second, select n number of concrete services from the corresponding abstract service as a composite service. In theory, there are Q n i=1 m i number of composite services. Calculate the QoS value of the composite services to obtain an optimal value that reaches the minimal objective value of Equation (3). Finally, output an optimal composite service.
In this mathematical modeling, response time and price are negative attributes; the smaller the better. Reputation and availability are positive attributes; the larger the better. Therefore, in order to unify metrics and calculations, it is necessary to normalize the QoS values. The normalization methods of QoS value are defined as follows: q max i and q min i are the maximum value and minimum value of the ith QoS attribute of composite services, respectively; Equation (1) is used to normalize the negative attributes, such as response time and price; Equation (2) is used to normalize the positive attributes, such as reputation and availability.
We model the service composition problem as a minimization problem, and the optimization model is formulated as follows: In a composite service, r and l are the numbers of negative and positive QoS attributes of each service, respectively. w k and w j represent the weights of the kth negative and jth positive attributes, respectively. q agg k is the sum of value of the k th negative attribute of each service, and q agg j is the sum of value of the jth positive attribute of each service.

Proposed Approach
In this section, we will introduce the overall framework of the approach then explain the details of our approach.
4.1. The Whole Framework. The framework of our approach is shown in Figure 2, which consists of two parts: (1) Data preparation: first, the document model is used to process WSDL documents to generate the corresponding embeddings. Then, we use the k-means algorithm to cluster embeddings. Finally, they are divided into four clusters as the input data of the following algorithm. (2) Primary algorithm processing: first, FWA++ initializes firework population N randomly and evaluates their fitness values to find the current best solution. Second, FWA++ enters into the iterations: (a) Calculate the number of explosion sparks and the amplitude of the explosion for each firework according to the fitness value and then generate explosion sparks. (b) Perform Gaussian mutation to generate Gaussian sparks. Furthermore, map the unsatisfied sparks back to the feasible space. (c) According to the selection strategy, keep the current optimal solution and randomly select N − 1 individuals from the current sparks and fireworks for the next new generation. Finally, the algorithm termination condition is met and output the optimal solution.

Data Preparation.
In this part, we will describe the process of data preprocessing in detail.

WSDL to
Embedding. The significant text information of a service, including message, documents, service name, and operations, is recorded in the WSDL (Web Service Description Language) document. For the purpose of getting service function information, we extract message, documents, service name, and operations from the WSDL document. And then, we digitize the extracted text information.
Here, the sentence transformer framework is used to convert text information into embedding. It provides an easy way to calculate dense vector representations of sentences and many models to realize the task of text digitization. We choose the paraphrase-xlm-r-multilingual-v1 model to obtain the embedding. The model is based on transformer networks such as BERT/RoBERTa/XLM-RoBERTa and achieves great performance in the mission. The text information is embedded in the vector space and is close to similar text information. After, each WSDL document is processed by the paraphrase-xlm-r-multilingual-v1 model, which is represented by an embedding. Finally, each service corresponds to an embedding.

Classify Web Services.
The k-means algorithm is an unsupervised clustering algorithm that is relatively easy to implement. And it is widely used for good performance. The idea of the k-means algorithm is simple. A sample set is divided into several clusters according to the distance between the samples, and then, the points in the clusters close and the distance between the clusters is as large as possible. In our approach, we use k-means to cluster embeddings generated by the paraphrase-xlm-r-multilingual-v1 model, where each embedding represents each concrete service. In this way, classifying services according to functions is realized.

Merge Data.
The QoS information corresponding to each service is merged according to the clustering result of the k-means algorithm. After the merger, each abstract service contains several concrete services. And the QoS information of each concrete service includes four attribute values, including cost, response time, reputation, and availability.

Fireworks Algorithm.
The fireworks algorithm (FWA) is inspired by the fireworks explosion and presented by Tan and Zhu [7]. The idea of the algorithm is simple, but the specific implementation is complicated. It is mainly composed of four parts: explosion operator, mutation operator, mapping rule, and selection strategy. In the explosion phase, explosion sparks will be generated. And the basic principle is that if a firework's fitness value is better than that of other fireworks, it will have a smaller explosion range and generate more explosion sparks. The purpose is to speed up the local search ability near the current optimal solution. On the contrary, if a firework's fitness value is relatively poor, it has an extensive explosion range and generates a small number of explosion sparks. The primary purpose is to enhance the diversity of the population. In the mutation phase, Gaussian sparks will be generated and increase the diversity of the spark population. Meanwhile, unsatisfied Gaussian sparks  Mobile Information Systems are mapped to the feasible space by the mapping rule. In the selection phase, the algorithm will refer to the pros and cons of sparks' location and randomly keep a specified number of sparks. The framework of the fireworks algorithm is shown in Figure 3. For each generation of explosion, N number of locations are selected; N fireworks are set off. And then, we obtain the location of sparks and evaluate the quality of the locations. The algorithm stops once the optimal solution is found. On the contrary, we select N other locations from the current fireworks and sparks as the next generation of explosion.

Feasible Solution
Encoding. Before using the algorithm to implement service composition, each concrete service must be coded. The integer coding method is adopted to code them. Here, the concrete service in each abstract service is coded starting from 1. If there are N services in an abstract service, then ½1, 2, 3, 4, ⋯, N is the code of its services, and the remaining abstract services are also used this way. Figure 4 shows a feasible solution [1][2][3]5], which means that service 1 is selected from the first abstract service, service 5 is selected from the second abstract service, service 3 is selected from the third abstract service, and service 2 is selected from the fourth abstract service.

Operator Analysis. Suppose the problem to be optimized is
where Ω is the feasible region of the solution. Below, we will introduce each part in detail.

Explosion Operator.
The explosion operation is essential for the fireworks to generate sparks. Generally, fireworks with better fitness values can generate more sparks in a smaller area; it enhances the algorithm's capability of local search. Conversely, fireworks with poor fitness values can only generate fewer sparks in a larger range; it is aimed at increasing the diversity of sparks and improving the algorithm's global search capability. In the FWA, the explosion amplitude of each firework and the number of explosion sparks are calculated based on its fitness value relative to other fireworks. For a firework x i , the formulas for the explosion amplitude A i and the number of explosion sparks S i are defined as follows: where y min = min ð f ðx i ÞÞ (i = 1, 2, ⋯, N) is the minimum fitness value in the current firework population and y max = max ð f ðx i ÞÞ (i = 1, 2, ⋯, N) is the maximum fitness value in the current firework population.Â is a constant used to adjust the amplitude of the explosion, M is also a constant used to adjust the number of explosion sparks, and ε is the minimum positive constant to avoid division by zero. In order to dynamically balance the search ability and the ability to jump out of the local optimal solution of the FWA++, FWA++ randomizes the total number of spark M and amplitude of sparksÂ in each generation.

Mobile Information Systems
Limit the fireworks with good fitness value to generate too many explosion sparks. At the same time, fireworks with poor fitness value will generate few explosion sparks, and the number of sparks S i is determined by the following formula: where a is lower bound for explosion amplitude, b is upper bound for explosion amplitude, and roundð·Þ is a rounding function based on the rounding principle. When a firework explodes, the sparks can be affected by the explosion in any z direction. The FWA uses a formula to randomly obtain several dimensions affected by the explosion: where d is the dimension of a firework and rand ð0, 1Þ represents a random number function conforming to a uniform distribution on the interval ½0, 1.
Assuming that the ith firework is x i = ðx 1 , x 2 , ⋯, x N Þ, the formula for generating sparks is 4.5.2. Mutation Operator. Many sparks can be generated through the explosion operation, but these sparks are mainly around the original firework and have similar properties to the original firework population. In order to keep the diversity of the sparks, FWA introduces a mutation operator to generate Gaussian sparks. The process of generating Gaussian sparks is as follows: FWA selects a firework x i from the firework population randomly, and then, it randomly selects a certain number of dimensions for the firework to perform Gaussian mutation operation. Performing Gaussian mutation operation on the selected dimension k of a firework x i iŝ where e~n ð1, 1Þ, n ð1, 1Þ represents the Gaussian distribution with a mean value of 1 and variance of 1.    (11): where x UB,k and x LB,k are the upper and lower bounds of the solution space on dimension k, respectively.

Selection Strategy.
In FWA, in order to keep the excellent individuals in the firework population to the next generation population, N individuals need to be selected from the candidate set composed of explosion sparks, Gaussian sparks, and fireworks in the current generation. Suppose that the candidate set is k and the population size is N. The individual with the smallest fitness value in the candidate set will be determinedly selected to the next generation as a firework (elite strategy), and the remaining N − 1 fireworks will be selected from the candidate set. For candidate x i , the calculation formula of the selected probability is as follows: where Rðx i Þ is the sum of the distances between the current individual x i and other individuals in the candidate set. pðx i Þ is the probability of the individual being selected. In the candidate set, if an individual is far away from other individuals, then the probability of it being selected is high. But the above selection strategy is time-consuming, so FWA++ uses the way of random selection to keep N − 1 individuals for the next generation.

Fitness Function.
The utility function is used to evaluate the pros and cons of the composite service. In order to calculate the fitness value of the current composite service, the utility function is constructed as follows: where DðpÞ is the penalty coefficient, t c is the current generation, t m is the maximum generation, w i is the weight of the ith QoS attribute of the composite service, Δq i is related to the positive and negative of QoS attributes, and q i con is the user's constraint on the ith QoS attribute, which is offered by users. The formula for calculating Δq i is as follows.
If the QoS attributes are positive attributes (such as reputation and availability), then If the QoS attributes are negative (such as price and response time), then

Pseudocode of FWA++ and Computational Complexity.
The pseudocode of FWA++ is reported in Algorithm 1.
Meanwhile, in the FWA++, each generation consists of initialization operation, explosion operation, mutation operation, and selection operation. The initialization operation includes initializing the population size and calculating the fitness values, and the computational complexity is OðNÞ and OðNÞ, respectively. N is the population size. The explosion operation includes calculating the explosion amplitude, calculating the number of explosion sparks, generating the number of explosion sparks, and calculating the fitness values, and the computational complexity is OðNÞ, OðNÞ, OðŜ i Þ, and OðŜ i Þ, respectively.Ŝ i is the number of explosion sparks. The mutation operation includes generating Gaussian sparks and calculating fitness values, and the computational complexity is OðM g Þ and OðM g Þ, respectively. The select operation chooses N sparks from fireworks, explosion sparks, and Gaussian sparks for the next generation, and the computational complexity is OðN + M g +Ŝ i Þ. M g is the number of Gaussian sparks in each generation. Therefore, with the maximum number of generations T, the computational complexity of FWA++ is OðT × ð5N + 3M g + 3Ŝ i ÞÞ.

Experiments and Evaluation
All algorithms were developed in Python, and all experiments were run on a PC equipped with AMD Ryzen 7 5800H CPU, 16 GB memory, and Windows 10 OS.

Data Set.
In order to verify the effectiveness of our approach, we use QWS2.0 real-world data provided by [36]. The data set includes 9 QoS attributes of 2500 real web services. Since the data set does not include the price attribute of services, the attribute value of the service price is generated in a certain range (0.01-1.00) through a random algorithm.

Baseline Approaches.
In this paper, we select the following well-known metaheuristic optimization algorithms to compare with our algorithm: (1) Fireworks Algorithm (FWA) [36]. FWA is a global optimization algorithm inspired by exploding fireworks. It has advantages in convergence speed and global solution accuracy.

Mobile Information Systems
(2) Particle Swarm Optimization with Corrective Procedure (CPSO) [38]. In this approach, the corrective procedure was introduced to upgrade particles effectively. The results show that it greatly improves the problems of premature convergence and local optima.
(3) Modified Artificial Bee Colony (mABC) Algorithm [32]. In this algorithm, a chaotic-based opposition learning method is used to initialize the population, and differential evolution (DE) is used to enhance exploitation. mABC has robust scalability and high convergence speed.

Parameter Settings.
The following parameter settings were used in our experiments: For fitness function, user preference q c con , q t con , q r con , and q a con for four QoS attributes are set to 0.50, 0.  30; the maximum number of iterations is set to 500. For mABC, the population size N is set to 30, the maximum number of iterations is set to 500, μ = 4, and limit = DXN/2 (D is the dimension size).

Performance Comparison.
In the experiments, the mean value of 20 independent runs of each algorithm was obtained to make a reasonable evaluation. And we fix the number of abstract services to 4 with the same number of candidate services and vary total candidate service from 100 to 500 to verify the effectiveness of FWA++. Figure 5 shows the optimization results of the algorithms that are introduced above where iteration varies from 50 to 500 and the total number of services fixed to 300. We can see that as the iteration increases, the fitness value of the FWA++ is decreasing rapidly. The fitness value of FWA++ is superior to FWA, mABC, and CPSO when iteration reaches 100. The fitness hardly changes when the iteration is between 250 and 500, which means that FWA++ has converged. The result ensures that the performance of FWA++ outperforms other algorithms. Input: N-population size, M-total numbers of sparks generated by the fireworks, A-the maximum explosion amplitude, M g -the number of mutation sparks each generation Output:X best (the best solution) 1: Initialize fireworks population P = X i ði = 1, 2, ⋯, NÞ; 2: Calculate the fitness value of each firework and store them to the 3: candidate set. 4: whileðt ≤ Max number of evolutionsÞdo 5: for each firework X i do 6: //in Eq. (5), A i is dynamic in each generation. 7: //in Eq. (6), M is random in each generation. 8: Calculate the explosion amplitude A i and the numberŜ i of explosion sparks 9: by Eqs. (5), (6), and (7); 10: Obtain locations ofŜ i sparks of the firework X i using Eqs. (6), (7), and (8); 11: Calculate the fitness value of each explosion spark and store them to the 12: candidate set. 13: end for 14: fork = 1 to M g do 15: Randomly select an individual X i from all fireworks; 16: Generate a Gaussian spark for the firework by Eq. (10); 17: Map the sparks exceeding the search range into the search space by Eq. (11); 18: Calculate the fitness value of each Gaussian spark and store them to the 19: candidate set. 20: end for 21: Select the best location and keep it for next explosion generation; 22: Randomly select N − 1 locations from the candidate set (two types of sparks 23: and the current fireworks); 24: t = t + 1; 25: end while 26:Return X best Algorithm 1: The pseudocode of FWA++. 8 Mobile Information Systems From Figure 6, we can observe the optimization results where the total number of candidate services varies from 100 to 500. The fitness values of FWA++ are better than other algorithms in all cases. Meanwhile, all algorithms maintain a certain level of fitness value with the increase of the number of candidate services, which means that the number of candidate services has less influence on the algorithm performance.
From Figure 7, optimization results can be seen obviously where the number of the total candidate service varies   Mobile Information Systems from 100 to 500 and the total number of services fixed to 300. With the increasing number of candidate services, the computation time is maintained at a certain level. What is more, the computation time of FWA++ is least than other algorithms in all of the cases. In addition, FWA needs more computation time for the selection strategy, which is not comparable with other algorithms. 5.5. Sensitivity Analysis of Parameters 5.5.1. Impact of N. The variable N represents the population size, and the population size is the total number of individuals in any generation. Usually, this parameter is artificially set. The population size has an essential influence on the final solution. In order to obtain a more appropriate population     Figure 8; we found that the fitness values are quite different under different population sizes. It shows that the population size greatly influences the experimental results.
And we can observe that the population size is 5; a relatively small fitness value is obtained. So, we set the population size of FWA++ in our experiments to 5.
5.5.2. Impact of M g . M g represents the number of Gaussian sparks. If M g is too small, FWA++ cannot maintain the diversity of the population. And it may fall into the local optimum and is difficult to obtain the optimal solution. Figure 9 shows the optimization results under different M g ; we can see that M g is 11 and the fitness value obtained is the smallest, so we set M g to 11 in our experiments.

Statistical Analysis.
We perform the Friedman test [38][39][40] method and Wilcoxon signed rank test [41] method for statistical analysis to prove that our proposed approach is statistically significant. Table 1 shows the statistical analysis of the FWA++ compared with FWA, mABC, and CPSO, where "NAC" represents the number of abstract services, "MAC" represents the total number of concrete services, p value < 0.05 represents two approaches have distinct differences, and "+" represents that our approach is preferred to another one. It can be seen now that the p values of FWA++ are particularly low in all of the case (NAC = 4, MAC varies from 100 to 500), which demonstrate that FWA++ have distinct differences with FWA, mABC, and CPSO. Furthermore, we can observe from the "performance" index that the FWA++ algorithm has the best performance among these algorithms. Therefore, FWA++ is significantly effective.

Conclusions
Even though the number of services is increasing, it is difficult for a single service to complete complex tasks. Therefore, we need to combine multiple services to complete them. The efficiency of service composition has become a problem to be solved. This paper proposes a service composition approach based on the improved fireworks algorithm (FWA++). We adopt a random selection strategy, which greatly reduces the running time of the algorithm. We balance the search ability and the ability to jump out of the local optimal solution by dynamically adjusting the total number of sparks and maximum amplitude of sparks for each generation. In this way, the optimization results are more accurate. Compared   In the future, we hope to integrate more multidimensional QoS attributes into the model, including waiting time, throughput, and reliability. In addition, we hope that web service composition will be more user-friendly, which can be combined with service recommendations. It can analyze user preferences through historical data and then recommend more personalized composite services to users.

Data Availability
The data used to support the findings of this study are available from the corresponding authors upon request.

Conflicts of Interest
The authors declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this paper.