Patent ID: 9571413
Date: 2017-02-14
CPC Classifications: H04L

Claim:
1. A method for implementing round robin scheduling performed by a network element, comprising: acquiring, from a queue and by the network element, respective original location information of elements in the queue; performing location mapping processing by the network element on the respective original location information of the elements in the queue based on a set algorithm to obtain respective mapped location information of the elements in the queue, wherein the set algorithm or parameters used by the set algorithm change according to a set rule during each time of round robin scheduling; starting from an element corresponding to a set initial location, performing the round robin scheduling by the network element according to mapped queue sequences corresponding to the respective mapped location information of the elements; and routing data by the network element according to the round robin scheduling, wherein performing the location mapping processing on the respective original location information of the elements in the queue comprises: performing a calculation according to the respective original location information of the elements in the queue by using a random algorithm by the network element, to obtain respective mapped locations corresponding to respective original locations, wherein the respective mapped locations are used as the respective mapped location information of the elements in the queue, wherein performing the calculation according to the respective original location information of the elements in the queue comprises: selecting a random value of round robin scheduling according to the set rule by the network element, wherein the random value has a value range of 0 to (2 calculating respective temporary locations of the elements in the queue according to the random value and the respective original locations of the elements in the queue, by the network element, wherein a calculation formula is: wherein, random is the random value, a _ori_loc is an original location of a queue element, and a_tmp_loc is a temporary location of the queue element; removing the most significant bit in a binary number of the temporary location, with n bits left; and reversing the n-bit binary number of the temporary location of the queue element, to obtain a mapped location of the queue element.