Against the background of energy restriction and environmental pollution, in recent years, new energy electric vehicles have developed rapidly with their advantages of energy saving and environmental protection. To realize the benign interaction between electric vehicle charging and switching power stations and power grid, and the demand-side management of electric vehicle charging and switching power stations, the Monte Carlo random sampling method is used to collect the battery-charged state of batteries in one day. Considering the constraints of charging and discharging times of charging stations, the operation model of charging and switching stations for electric vehicles is established, and the interior point optimization method is used to solve the model; thus, the optimal orderly charging and discharging strategy for electric vehicles can be obtained. Finally, simulation results show that the optimized charging mode can effectively reduce the peak-valley difference of the system load and improve the stability of the system compared with the stochastic charging mode. In addition, this mode of charging can effectively develop the economic potential of the electric-vehicle batteries without affecting the use needs of the owners, and it has good prospects for engineering popularization.