Abstract:Public transportation is not only a significant symbol of the urban modernization,but also an optimal approach of solving urban crowded traffic problem. The bus line search algorithm is the key technical query system. This paper summarizes the algorithm of public transportation optimum route choice of foreign and urban cities, and analyses the realization conditions and influence factors for effective running. The paper introduces the shortest path problem and Dijkstra algorithm and analyzes the drawbacks of its application in bus line query. Then the optimal travel route choice algorithm of mathematical model based on the smallest transfer is proposed, and the implementation of the algorithm is given. Based on the data of the public transportation company Yinchuan, a bus information query system design and development is completed.