An Optimization Method Based on Be-ACO Algorithm in Service Composition Context

With the increasing complexity of users' needs and increasing uncertainty of a single web service in big data environment, service composition becomes more and more difficult. In order to improve the solution accuracy and computing speed of the constrained optimization model, several improvements are raised on ant colony optimization (ACO) and its calculation strategy. We introduce beetle antenna search (BAS) strategy to avoid the danger of falling into local optimization, and a service composition method based on fusing beetle-ant colony optimization algorithm (Be-ACO) is proposed. The model first generates search subspace for ant colony through beetle antenna search strategy and optimization service set by traversing subspace based on ant colony algorithm. Continuously rely on beetle antenna search strategy to generate the next search subspace in global scope for ant colony to traverse and converge to the global optimal solution finally. The experimental results show that compared with the traditional optimization method, the proposed method improves combination optimization convergence performance and solution accuracy greatly.


Introduction
In order to solve the interoperability between network applications better and improve efciency of data sharing and storage, web service composition technology came into being. Due to limited functions provided by individual web service, people began to fexibly and quickly combine existing independent web service platforms to achieve data information mutual exchange and integration to meet the needs of diferent users. With the increasing complexity of users' needs and increasing uncertainty of individual web service in big data environment, service composition becomes more and more difcult. Te requirements of web service composition methods and technologies are becoming higher and higher. Te existing web services composition optimization methods mainly include traditional optimization methods and intelligent optimization methods, two categories. Traditional optimization methods have disadvantages such as poor scalability and low fexibility, and they have been replaced by intelligent optimization algorithms gradually. Te intelligent optimization algorithms have more obvious advantages than traditional optimization algorithms. First, there is no restriction of central control, and individual failure will not afect the solution of whole problem, which ensures that the algorithm has stronger robustness. Second, they are parallel distributed algorithm model and can make full use of multiprocessors. Tird, they have no special requirements for continuity of problem defnition and have strong expansibility. Fourth, the implementation of algorithm is simple. Intelligent optimization algorithms can make use of task resources to fnd service combination optimal solution better and improve algorithm overall performance and resource utilization, for example, common intelligent algorithms include genetic algorithm, ant colony algorithm, simulated annealing algorithm, chaos algorithm, freworks algorithms, and clustering algorithms [1][2][3][4][5][6][7][8][9][10][11][12][13]. Wu et al. [1] proposed an improved genetic algorithm variable neighborhood search to solve hybrid fow shop scheduling problem, and enhance local search ability of genetic algorithm. Previous studies [2,3] combined chaos idea and genetic algorithm to realize population selection and optimization, which improves efciency of service composition. Lu and Kou [5] proposed a genetic algorithm based on ε-dominance multiobjective is used to solve web service composition optimization problem. Te calculation result is a set of compromised Pareto optimal solution, providing users with a variety of options. Zhang et al. [6] improved the particle swarm optimization algorithm and its calculation method and introduced a diversifcation mechanism to avoid the danger of algorithm falling into local optimum. In the study by Zhang et al. [7], a fast and reliable fault-tolerance approach is proposed for service composition in integration networks, that is, an improved particle swarm optimization algorithm is used to implement service compensation when the permanent faults of service arise. Xing et al. [8] proposed a novel mashup service clustering approach integrating K-means and Agnes algorithms (MSCA). Compared with the traditional mashup service clustering approach based on the K-means algorithm, the average precision rate and recall rate of MSCA improved. Huang et al. [9] greatly improved the ability of web service search engines retrieve services by using the K-means algorithm. In the study by Zhang et al. [11], the improved freworks algorithm was frst applied to discrete services combination optimization problem, and Gaussian mutation probability and elite selection strategy were introduced in the modeling process. Zhang and Yang [13] presented Dynamic QoS Data-driven Reliable Web Service Selection (DQoSRSS), which uses mean and standard deviation to portray the beneft and risk of QoS and to improve the accuracy of QoS description. Due to the interference of various uncertain factors such as the complexity, openness, dynamics, and volatility of cloud service loads in Internet environment, a large number of cloud services with the same functionality have appeared on cloud platform. However, most of their quality of service (QoS) is in an uneven state, which cannot meet the needs of users. In order to handle the QoS-aware cloud service composition problem conveniently and efciently, there are many representative cluster cooperative intelligent algorithms proposed by scholars such as the ant colony optimization (ACO) system of simulate real ant colony collaboration to fnd optimized path, genetic algorithm (GA) of mimic biological genetic evolution, particle swarm optimization (PSO) algorithm based on the bird cluster foraging activity model, and so on. Liu et al. [14] proposed a double-elite coevolution algorithm based on three diferent high ftness individuals as the evolutionary core and adopted diferent evolutionary strategies to improve algorithm search ability. Xia et al. [15] proposed a global optimization algorithm for dynamic updating multiple pheromones. Compared with the original ant colony algorithm and genetic algorithm, it has better performance in solving service composition optimization problems. Liu et al. [16] proposed a multiobjective service dynamic selection optimization algorithm based on global QoS constraints, and the optimal noninferior solution set can be obtained by optimizing multiple objective functions. Wong et al. [17] proposed a bee colony optimization algorithm based on frequency allocation, which has been improved in experiment of solving traveling salesman problem. A hybrid ant colony genetic algorithm is proposed in the study by Ciornei and Kyriakides [18], which proves the feasibility of this algorithm in dealing with global complex optimization problems. Although the above research methods can solve service composition problem to a certain extent, they all have their own shortcomings. For example, the genetic algorithm has poor local search capabilities and unstable solution results; ant colony optimization pheromone accumulation takes a long time at algorithm initial stage and easy to fall into local optimum. Xie et al. [19] proposed a new swarm intelligence algorithm (social cognitive optimization, SCO). Although SCO can be used to deal with the optimization problems of complex continuous functions, it cannot be used to solve discrete service composition problems. In addition to above problem, the optimization accuracy of the ant colony algorithm is higher than that of the BAS algorithm [20]. Te BAS algorithm has fewer adjustment parameters and smaller amount of calculation than some traditional heuristic algorithms, and it has strong global optimization ability. We proposed a service composition optimization method that integrates the beetle-ant colony algorithm in this paper. We fuse BAS algorithm idea to reduce the difculty of parameter selection in the ant colony algorithm, which overcomes ant colony algorithm to fall into local optimum and obtains the optimal service combination. We verify the feasibility and accuracy of the Be-ACO algorithm through experiments fnally.

Service Composition.
Service composition mainly includes service request, service calculation, service composition, feedback result of request be processed, generating log fle and reporting to cloud service platform, and reporting confrmation. Te common cloud computing service model is shown in Figure 1.
Generally speaking, cloud service composition divided into following several processes: frst, user sends out service request and transmits it to cloud through edge node server; second, cloud control server divides request task into several subtasks and assigns subtasks to diferent cloud node servers; third, cloud node server returns result to cloud central server after accomplishing assigned subtask; lastly, cloud central server summarizes processing results of all node servers and feeds back it from cloud server to user through edge node server.
In this paper, the nonfunctional Qo S attribute indicators are used to evaluate service composition quality. We evaluate and study Qo S attribute indicators from the aspects of service time T, service cost C, availability Av, reliability Rel, and reputation Rep. Te expression is shown in the following formula: Te specifc QoS attribute defnition, quantization expression, and normalization processing are based on 2 Computational Intelligence and Neuroscience reference [20], and we assuming that P is the path of service composition, then Te values of F Seq , F Sel , F Par , and F Cyc depend on structure of actual execution path of edge service, and F Seq + F Sel + F Par + F Cyc � 1. We use relevant technologies to convert parallel, selection, and circular structures into serial structures to form service composition model expression, as shown in the following formula: ,

Ant Colony Optimization Algorithm. Ant colony optimization was proposed in 1991 by Italian scholar Marco
Dorigo. It is an intelligent optimization algorithm that imitates ants fnding path process. According to scholars' long-term research on ants' living habits, ants can always fnd a feasible shortest path from the foraging place to ant nest without any external help, and they can search for a new shortest path based on the constantly changing surrounding environment. Te ability of ants to search for the best path is achieved by ants emitting volatile secretion pheromone on the path during the foraging process. Te pheromone concentration will weaken gradually with the passage of time. Te ants will choose a path according to pheromone concentration of each path when they look for path, and the greater the pheromone concentration on path, the more likely the ant will choose the path [21][22][23].
Te ant will select the next hop path according to the size of pheromone concentration on each path. Te following formula represents the state transition probability of the k-th ant from node i to node j at time t.
In formula (4), τ ij (t) and η ij (t), respectively, represent the residual pheromone and heuristic information, allowed k represent the nodes that are allowed to select by the k-th ant at time t, α represents the information heuristic factor, and β Computational Intelligence and Neuroscience represents the expected heuristic factor. Te bigger the information heuristic factor is, the faster the algorithm converges, but it is easy to converge prematurely and fall into local optimal solution and the global optimal solution cannot be obtained. However, the bigger the expected heuristic factor is, the more likely the algorithm is to achieve the global optimization, but the convergence speed of algorithm will decrease. Terefore, the convergence speed of the algorithm and global optimization contradict each other. In order to prevent too much pheromone remaining on the path from making heuristic information inefective, update remaining pheromones on the path after M ants go from starting point to end point. Te amount of pheromone at time t + n can be updated by the following formulas.
In formula (5), ρ represents the volatilization coefcient of pheromone on the path; it is to prevent the pheromone from accumulating continuously and make the algorithm fall into local optimization and miss the better solution. Te value range of ρ is [0, 1), and 1 − ρ represents the pheromone residual coefcient on path. Δτ ij (t) represents the increment of pheromone on path (i, j) after each search is completed, and Δτ ij (t) � 0 at the beginning. ∆τ k ij (t) represents the change of pheromone on path (i, j) after the k-th ant search is complete. Marco Dorigo proposed three diferent pheromone update models based on diferent pheromone update methods. Tey are the ant cycle model, ant quantity model, and ant density model.
With research on the ant colony algorithm, scholars found that the ant colony algorithm can also be used in factory scheduling, multitask matching, image recognition, and other issues. Te efect of all these applications mainly depends on selection of ant colony algorithm parameters. Te parameters of algorithm performance mainly include information heuristic factor, expected heuristic factor, pheromone volatilization coefcient (or pheromone residue coefcient), pheromone strength, and the number of ant, and the setting of these parameters determines algorithm convergence speed, robustness, and efectiveness. Compared with other intelligent optimization algorithms [24][25][26][27] such as the wolf colony algorithm, genetic algorithm, and diferential evolution algorithm, the ant colony algorithm has advantages as follows: frst, the bottom layer of the ant colony algorithm is a parallel search algorithm actually. In search process, each ant is independent of each other, searches forward in parallel, and works together through residual pheromone. Second, the main feature of the ant colony algorithm is positive feedback. Te pheromone left by ants on path can guide following ants to choose the path, which can avoid ants selecting the next hop node blindly. Tird, the ant colony algorithm has strong universality, will not cause it to fail to converge due to a little error, and can be well combined with other intelligent optimization algorithms to get better performance. Te ant colony algorithm has a certain development in diferent felds based on above advantages, but it also has its own shortcomings. On the one hand, the ant colony algorithm is easy to fall into local optimization and miss the global optimal solution when algorithm converges too fast. On the other hand, if randomness of ant colony algorithm is increased, the global optimal solution can be improved, but this will lead to algorithm convergence speed slowly at same time. Last, the ant colony algorithm does not have a complete mathematical analysis and theoretical foundation, and most of the parameters are derived from a large number of experimental summaries [28].

Beetle Antenna Search Algorithm.
As a novel stochastic optimization algorithm similar to PSO, the beetle antenna search (BAS) algorithm is proposed in 2017 by Jiang and Li [29], which has a more concise search strategy based on beetles' foraging behavior. When the beetle is foraging, if the odor received by left antennae is stronger than that on the right, the beetle moves to left; otherwise, it moves to right. Based on this simple principle, beetle can fnd food easily. We transform beetle antenna search into an optimization problem in n-dimensional space, where x l is the left antenna coordinate, x r is the right antenna coordinate, and d t is the distance from the center of mass to antenna at time t. Since the beetle's head orientation is arbitrary, a standardized random vector can be generated from beetle's right antenna pointing to its left antenna. Te standardized random vector is shown in the following formula.
Te generated random vector (beetle's right antenna pointing to its left antenna) is shown in the following formula, where d 0 is the constant distance and η d is the attenuation coefcient of search distance.
At t moment, if position of beetle is x t , the coordinates of left and right antenna are shown in the following formula.
If odor function is f (x), the value of left and right antenna are shown in the following formula.
At t − 1 moment, if f left > f right , then beetle moving left, and beetle position in next moment is x t � x t− 1 + step * b → ; if f left < f right , then beetle moving right, and beetle position in next moment is x t � x t− 1 − step * b → . According to this rule, we use formula (11) to express beetle moving position in next moment. 4 Computational Intelligence and Neuroscience So, δ t represents the t-th iteration step size, sign(x) represents the symbol function, and η δ is the attenuation coefcient of update step.
Te BAS algorithm has the characteristics of small computation, fast convergence speed, and global optimization high efciency. However, the local optimal solution cannot be solved efectively, so it is possible to further optimize the global optimal solution. Based on the above research and analysis, we introduce the BAS algorithm on the basis of ACO algorithm and propose a service composition method based on fusing beetle-ant colony optimization algorithm (i.e., Be-ACO) in this paper. Te Be-ACO algorithm fully integrates the characteristics of BAS algorithm's global optimization efciency and ant colony algorithm accurate solution, thereby improving algorithm time efciency and solution accuracy.

Be-ACO Algorithm Principle.
During the search process of the Be-ACO algorithm, the search mechanism of beetle's movement direction and position update is the same as that described in Section 2.3, and ant colony search subspace is determined by direction and position of beetle's next hop. As shown in Figure 2, the beetle current position is B, and the positions of previous hop and next hop are A and C, respectively; then, ant colony next search subspace is the number of nodes covered by circumcircle area of points A, B, and C, which is recorded as S aco . S aco does not include node C and nodes have been searched, and S aco � 4 can be seen from Figure 2. Ten determine the search target of ant colony in search subspace, that is, the node closest to the global target in set of S aco is ant colony search target position in subspace and denoted as P best . By analogy, until the search is completed, an ant colony searched optimal path is the global optimal solution generally.
Assume that the beetle's position coordinates are A(x t−1 , y t−1 ), B(x t , y t ), and C(x t+1 , y t+1 ) at moment t − 1, t, and t + 1, respectively. At t + 1 moment, the ant colony search range is a circular area with O(x O , y O ) as the center and R as the radius; there is no need to search the whole space and make the search efciency improved greatly. According to Cramer's rule, the coordinates of circle center O are obtained, as shown in formula (13), and the radius R is updated by formula (14).
A 1 , B 1 , C 1 , A 2 , B 2 , andC 2 in formula (13) satisfy the following equation. Figure 3, and the Be-ACO algorithm main process includes following steps:

Be-ACO Algorithm Process. Te Be-ACO algorithm fow is shown in
① Initialize the algorithm parameters and beetle objective function f(x), the beetle movement step � δ t− 1 (δ is constant), and t � 0; ② Initialize the starting search position of subspace, set the starting coordinate as (x 0 , y 0 ), and beetle position coordinate is (x t , y t ) at t moment; ③ Ten t � t + 1, according to the principle of BAS algorithm in Section 2.3, update the position coordinate of beetle, if t < 2, return step ③; otherwise, go to step ④; ④ Te current position of the beetle is P beetle and f(x t-1 ) < f(x t ), calculate and obtain ant colony search area according to formulas (13) and (14), update the subset size of S aco and the target position P best that the ant colony will reach in subsearch space; go to next step; ⑤ According to ACO algorithm principle, ant colony completes search and reaches the optimal position P best in subspace; if P best is consistent with beetle position P beetle , execute step ⑥; otherwise, return step ③; Computational Intelligence and Neuroscience The distance beetle travels in left whisker direction is step, that is, x=x+step*normal (xl-xr) The distance beetle travels in right whisker direction is step, that is, x=x-step*normal (xl-xr) Determine search area of ant colony according to formulas  and , update the subset size: S aco and P best S aco =S aco +1; P best =P beetle N Figure 3: Flowchart of Be-ACO algorithm.  Computational Intelligence and Neuroscience ⑥ Search is completed, output the global optimal solution.

Experiment Results Analysis.
In this experiment, in order to prove the performance superiority of the Be-ACO algorithm by our proposal, ACO, PSO, and BAS are selected to compare the convergence, solution accuracy, and time performance of algorithms, respectively, in this paper.

Convergence Performance and Solution Accuracy.
Under the same conditions, the convergence comparison between the ACO algorithm and PSO algorithm is shown in Figure 4. It can be seen from fgure that the target value tends to be stable with the increase of iteration times, the convergence speed of ACO algorithm is faster than PSO algorithm, and we can also see the target solution accuracy of the ACO algorithm is higher than that of the PSO algorithm from the convergence curve. As we can see from Figure 5 that the convergence speed of the BAS algorithm is much higher than that of the ACO algorithm, but the solution accuracy of the BAS algorithm is much lower than that of the ACO algorithm.
In order to improve the performance of our algorithm, the design of our Be-ACO algorithm draws on advantage of the fast convergence speed of the BAS algorithm. Te experimental results in Figure 6 show our Be-ACO algorithm's convergence performance (CP) is higher than that of the ACO algorithm under same iterations, that is, CP Be−ACO > CP ACO , Be-ACO algorithm inherits the fast convergence speed of the BAS algorithm, and it uses fewer iterations than that of ACO when they obtain same target value. Te experimental results in Figure 7 show BAS algorithm's convergence performance is higher than our Be-ACO algorithm under the number of iterations is small, but as the number of iterations increases, the solved target value of the Be-ACO algorithm is smaller than BAS, and the solving accuracy (SA) is higher than that of the BAS algorithm, that is, SA Be−ACO > SA BAS . Te Be-ACO algorithm inherits the solving accuracy of the BAS algorithm and it obtains smaller target value than that of BAS.
Trough the experimental comparison between Figures 6 and 7, the Be-ACO proposed in this paper inherits the characteristics of BAS fast convergence speed and ACO high solving accuracy, and it overcomes two algorithms' shortcomings, respectively. In order to further verify performance of the algorithm, we also compared it with the PSO algorithm with good convergence and solution accuracy relatively. Te results are shown in Figure 8. Te experimental results show that when the number of iterations is the same, the target value solved by the Be-ACO algorithm is smaller, that is, the solution accuracy is higher than that of the PSO algorithm. Under the same target value, the Be-ACO algorithm has fewer iteration times, that is, the convergence speed is faster than that of the PSO algorithm.
In order to more intuitively present the performance of the Be-ACO, BAS, ACO, and PSO algorithms in terms of convergence and solution accuracy, the change trends of several algorithms are shown in Figure 9. Te results show that the Be-ACO algorithm has obvious advantages over the three algorithms in terms of convergence and solution accuracy.

Time Performance Analysis.
Te Be-ACO algorithm proposed in this paper, ACO algorithm, and PSO algorithm have a common feature that algorithm convergence speed slows down with the increase of group scale, and the experimental results are shown in Figure 10. Te time cost of ACO and PSO algorithm is greatly afected by group scale, and solution rate decreases signifcantly, while we proposed the Be-ACO algorithm is less afected by group scale relatively, and the solution rate is signifcantly better than that of ACO and PSO algorithm.
Computational Intelligence and Neuroscience

Conclusion
Te existing web services composition optimization methods mainly include traditional optimization methods and intelligent optimization methods. Traditional optimization methods have been replaced by intelligent optimization algorithms gradually because of poor scalability and low fexibility. Te intelligent optimization algorithms have more obvious advantages than traditional optimization algorithms, and it can make use of task resources to fnd service combination optimal solution better and improving algorithm overall performance and resource utilization. Due to the interference of various uncertain factors such as the complexity, openness, dynamics, and volatility of cloud service loads in Internet environment, a large number of cloud services with the same functionality have appeared on cloud platform. However, most of their quality of service is in an uneven state, which cannot meet the needs of users. Based on above problems, this paper proposes a service composition method based on the beetle-ant colony optimization algorithm. Te Be-ACO algorithm combines advantages of BAS and ACO optimization algorithm, while it avoids limitations of their own algorithms. BAS does not consider the connection among groups, but ACO focuses on group infuence and ignoring individual infuence in the search process. Te Be-ACO algorithm proposed by us not only has fast global optimization convergence speed but also has good local optimization efect. In solving the optimal solution of service composition, our method has obvious advantages over BAS, ACO, and PSO intelligent optimization algorithms and methods in terms of convergence and solution accuracy. In future research work, we will optimize this method by combining artifcial intelligence, study its optimization method for home robots to handle complex tasks in smart homes [31], and improve the computational efciency of neural networks; we will also combine convolution neural networks (CNNs) that were applied in the feld of medical imaging diagnosis [32] and explore the work to improve the training speed and optimization of initialization parameters to ensure the accuracy of medical diagnosis.

Data Availability
Te experimental result data used to support the fndings of this study are included within the article.

Conflicts of Interest
Te authors declare that they have no conficts of interest. Computational Intelligence and Neuroscience 9