In recent years, with the rapid development of mobile communication networks, some new services such as cloud virtual reality, holographic communication, and etc. continue to emerge. Service composition has been researched in cloud computing. however, as the fast development of edge clouds, the service components can be deployed on the edge clouds to reduce the composition latency, so the more flexible and intelligent service composition algorithms are urgently need to study. Based on this, we propose a service composition strategy under the multi-cloud environment, and we propose an ant colony optimization algorithm (ACO) based on the multi-pheromone mechanism to optimize the quality of service (QoS). To avoid the occurrence of local optima, we further introduce the mutation operation of the genetic algorithm. Finally, the simulation results show that the proposed algorithm can achieve better QoS parameters such as latency and response time while ensuring the stability of services.