One of the pathways to more efficiently and economically exploit the proved reserves is to produce oil in a dynamic real-time optimal state under the existing production conditions,which is one of the cores for the intelligent oilfield.The reservoir is recognized as a complex dynamic system,and the optimal object is to maximize the net present value of production in the reservoir optimization.By solving the mathematical model for describing the reservoir production status to determine the real-time control settings,the optimal production schedule can be obtained.Because dynamic production optimization of reservoir is a large-scale complicated optimization problem,an efficient gradient-based algorithm is used to treat the problem.The control gradients are obtained by the maximum principle firstly,and then the line searching method can determine the optimal control settings of each control step.The analysis on the application of above theory in oil reservoir shows that the optimal production scheme is coincident with the actual demand of oilfield.