The invention provides a multi-stage scheduling method and
system supporting multiple time periods. The method comprises the following steps: setting the number of queues and the cache size according to configuration; judging whether a secondary
virtual queue needs to be set or not, if so, setting the secondary
virtual queue according to configuration, and setting a contained primary
queue; if not,
queue parameters including a time period T corresponding to the
queue, a counter C, an overturning mark R and a message state E are set; starting a
timer; if the second-level queue exists, scheduling is carried out from the second-level queue, and the second-level queue which is scheduled preferentially is selected; starting scheduling according to the T / R / E parameters of the first-level queue contained in the second-level queue which is being scheduled; c / R / E is brushed by the
timer at intervals. The method is suitable for coexistence of multiple time periods, does not require the period size to have a fixed 2
power relationship, and can group different periods to form multi-stage scheduling groups to jointly perform queue scheduling.