In the smart cities, sharing electric vehicles have many advantages such as environmental protection, low carbon emission, and high efficiency, which will greatly facilitate human life. However, whether the shared electric vehicle can be charged in time directly affects the users' experience. Based on this fact, we study that how to deploy the charging piles in the parking station of the shared electric vehicle, and propose a charging pile deployment model. First, the number of shared electric vehicles that check out from parking stations is predicted based on the random forest algorithm. Then, a mobile model of the shared electric vehicle is established. Based on the mobile model, the number of shared electric vehicles that check in within the target period is calculated and whether they reach the starvation state are determined. After that, the number of charging piles to be deployed is determined. Finally, the effects of hunger rate, battery capacity and the distance between parking stations on the number of charging piles were simulated by experiments. The experimental results verify the validity and feasibility of the proposed model. The prediction model proposed in this paper can provide a certain decision basis for the sharing of electric vehicle charging pile planning.