Electric vehicles are gaining popularity among consumers and governments due to their environmentally friendly nature, efficiency, and energy-saving capabilities. With the popularity of electric vehicles, charging piles, as their important supporting facilities, are also facing huge market demand. However, there is currently a mismatch between the number and distribution of charging piles and the charging needs of electric vehicles, which has led to problems such as uneven utilization of charging piles, long waiting times for charging, and excessive load on the power grid. These problems not only affect the travel experience and satisfaction of electric vehicle users, but also pose security and stability challenges to the power system. Therefore, how to effectively predict and optimize the orderly charging needs of charging piles has become an urgent problem to be solved. In order to solve this problem, this paper studies the application of machine learning in the orderly charging demand prediction and scheduling optimization of charging piles. Machine learning is a technology that enables artificial intelligence and automated decision-making through data analysis and model building. In the field of intelligent transportation, machine learning has broad application prospects and can help improve transportation efficiency, safety, and environmental friendliness. This article proposes a solution based on the ensemble learning algorithm BPNB model. By combining the Adaboost algorithm with the BP neural network, this model addresses the limitations of the BP neural network. The BPNB model is a comprehensive learning approach that integrates the Adaboost algorithm and BP neural network algorithm, enhancing the generalization capability and stability of the BP neural network. The study presented in this article introduces a fresh perspective and methodology for the application of machine learning in intelligent transportation. Furthermore, it offers an effective solution to the challenges of predicting orderly charging demand and optimizing the dispatch of charging piles.