The large-scale access to wind power generation and the continuous increase in the demand for electric vehicle charging will cause fundamental changes in the planning and operation characteristics of the distribution network. Therefore, studying the wind and photovoltaic power generation and the capacity allocation of electric vehicle charging stations is of great significance to the stability and economic operation of the distribution network. In this paper, the kernel extreme learning machine is training by using data such as network node voltage and wind and photovoltaic power output, and a capacity selection model based on kernel extreme learning machine is constructed. Give out a capacity allocation scheme that satisfies the total investment cost and network loss; the model accuracy is evaluated by the root mean square error. The IEEE33 node system is used as an example to simulate, and the voltage stability evaluation index is introduced to evaluate the result. The results obtained by support vector machine, genetic algorithm and particle swarm optimization algorithm are compared and analyzed, and the feasibility and effectiveness of the proposed model and method are verified.