Aiming at the charging power optimization problem of EV charging stations with renewable energy generations, an on-line optimization strategy of charging power in real time is proposed. During the optimization process, a state dependence based decision variables classification method in the initial stage is proposed to reduce the optimized matrix dimensions. In the optimization process, the differential evolution algorithm (DEA) is utilized to optimize the effective decision vector combination and decision vector respectively, by which both the quickness and accuracy can be achieved to optimize the charging plan of each charging pile in the charging station in the next 24 hours. The proposed optimization strategy has a certain reference value for reducing the charging cost and improving load fluctuation caused by EV charging.