Electric vehicle (EV) is a kind of mobile micro-grid. With the gradual increase of EV owners, the layout and planning of charging stations are gradually highlighted. Considering the travel habits of urban residents, the load distribution of electric vehicles is predicted by Monte Carlo sampling from the perspective of predicting users' travel routes. The AP algorithm is used to find the clustering center from multiple alternative locations and determine the optimal construction location of the charging station. This method fully considers the driving demand of electric vehicles and the actual situation of planning cities. Finally, an example is given to plan the charging station in the city, and good results are obtained from load forecasting to clustering out the charging station construction.