With the rapid development of wireless network technologies and the growing demand for a high quality of service (QoS), the effective management of network resources has attracted a lot of attention. For example, in a practical scenario, when a network shock occurs, a batch of affected flows needs to be rerouted to respond to the network shock to bring the entire network deployment back to the optimal state, and in the process of rerouting a batch of flows, the entire response time needs to be as short as possible. Specifically, we reduce the time consumed for routing by slicing, but the routing success rate after slicing is reduced compared with the unsliced case. In this context, we propose a two-stage dynamic network resource allocation framework that first makes decisions on the slices to which flows are assigned, and coordinates resources among slices to ensure a comparable routing success rate as in the unsliced case, while taking advantage of the time efficiency gains from slicing.