This paper discussed the optimal control problem on dynamic continuous systems. A two-level optimal control algorithm is proposed. It first converts the original problem into the parameters optimal control problem, and then, the optimal control to the original problem is selected from the set of solutions of parameters optimal control. Theoretical base of the algorithm is established. Simulation results show that the algorithm is effective.