In this paper, a dual-solver framework based on model predictive control (MPC) is proposed, E-solver and L-solver. The economic scheduling problem is formulated using mixed-integer linear programming (MILP), which can be solved in an efficient way by using commercial solver (E-solver). While the transmission loss problem is formulated using non-linear programming (NLP), which can be solved in the interior point method, namely L-solver. The E-solver provides an economic priority power scheduling plan for the L-solver, and the L-solver solves the entire microgrid accurate power flow scheduling plan. The proposed planning model decomposition technique aims to solve the planning model in a time-sharing manner and combines the characteristics of the two optimizers with a reasonable matching algorithm to achieve economic, efficient, and fast real-time control. A case study of a DC microgrid is employed to assess the performance of the online optimization-based control strategy. Simulations based on eight-node DC microgrid show that the method reduces the operating cost by 12.10\% and increases the calculation speed by 80.18\% compared with the traditional interior point method. With a shorter delay, the proposed optimization method will facilitate the implementation of real-time control and optimization.