Abstract:The advent of cloud computing and big data era has promoted the development of web services. Due to the complexity of user requirements, when a single service cannot meet the requirements, multiple services can be composed to provide solutions. As there are a lot of services in the cloud, it is non-deterministic polynomial hard to find a proper service composition. This paper proposes a method to solve the problem of composition by using the graph database. Through constructing a service composition graph based on a directed bipartite graph, services are pre-composed and stored in a Neo4j graph database,using the least service composition query and Dijkstra search algorithm to find the solution with the least number of services or the best quality of service. In addition, service compositions in the graph database can be added, deleted, and updated according to the availability of services. The experimental results show that the method can find the service composition that meets the user's needs in a short time in the graph database.