This paper provides an optimization strategy for flexible operation at the system level, so as to guide the real-time flexible ramping of the power grid. Firstly, the concept of regional power grid flexibility was clarified, and the ramping factor is proposed as a flexibility metric. On this basis, taking the output priority of each node as the objective function and considering constraints such as line flow, power balance, and system flexibility, a mathematical model for regional power grid transmitting flexible power externally is proposed. Compare with the traditional models, this model focuses more on flexibility rather than economy. The case analysis based on the improved IEEE 30-Bus System verifies the feasibility and effectiveness of the proposed strategy and its advantages over the traditional models.