In the actual traffic flow, vehicle driving is affected by many random factors. Gaussian white noise is introduced into the optimization velocity model to describe the random behavior, and a stochastic optimization velocity model is proposed. In order to improve the stability of traffic flow, the velocity difference of two successive vehicles ahead is considered, and a velocity difference feedback control model is established by taking the velocity difference between the vehicle and the target two vehicle as the control signal. Then, the stability conditions of stochastic optimization velocity model and feedback control model are obtained by using the moment stability theory. Last, Monte Carlo simulation is used to simulate the traffic. The results show that considering the random factor will reduce the stability of traffic flow, and the feedback control can effectively improve the stability.