As an integrator of distributed energy, microgrid has great potential in promoting the development of clean and low-carbon energy. However, the uncertainty of renewable energy output brings challenges to the management of microgrid, and also brings this uncertainty to the external grid. Based on the real-time market, this paper constructs a microgrid environment including new energy units, traditional units and demand response resources, and adopts a deep deterministic strategy gradient algorithm which can utilize the environmental information. This model free reinforcement learning algorithm helps to make full use of the accumulated data information, and can better adapt to the uncertain environment and improve in the continuous state space and action space. Simulation results show that the proposed algorithm can reduce the operating cost of microgrid while dealing with the uncertain factors effectively.