WO2014089779A1 - 用户调度方法及其装置 - Google Patents

用户调度方法及其装置 Download PDF

Info

Publication number
WO2014089779A1
WO2014089779A1 PCT/CN2012/086447 CN2012086447W WO2014089779A1 WO 2014089779 A1 WO2014089779 A1 WO 2014089779A1 CN 2012086447 W CN2012086447 W CN 2012086447W WO 2014089779 A1 WO2014089779 A1 WO 2014089779A1
Authority
WO
WIPO (PCT)
Prior art keywords
user
bit
scheduling
schedulability
queue
Prior art date
Application number
PCT/CN2012/086447
Other languages
English (en)
French (fr)
Inventor
孙艳平
王运富
刘加奎
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201280005075.8A priority Critical patent/CN103547330B/zh
Priority to PCT/CN2012/086447 priority patent/WO2014089779A1/zh
Publication of WO2014089779A1 publication Critical patent/WO2014089779A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a user scheduling method and apparatus therefor. Background technique
  • QoS Network Quality of Service
  • the queue scheduling algorithm is one of the core mechanisms for implementing network QoS control. It is an important content of network resource management. By controlling the use of link bandwidth by different types of packets, different data streams can be serviced at different levels.
  • the methods for implementing Q0S scheduling are mainly leaky buckets and token buckets.
  • the token bucket algorithm is the most commonly used algorithm in network traffic shaping and rate limiting.
  • the token bucket places a token into the bucket at a speed set by the user, and the token bucket has a capacity set by the user. When the amount of the token in the bucket exceeds the capacity of the bucket, the amount of the token does not increase;
  • the packet is processed by the token bucket, if there are enough tokens in the token bucket to send the packet, the packet can pass, and the token amount in the token bucket is corresponding according to the length of the packet. Decrease.
  • the token in the token bucket is too small, the packet is discarded when the packet cannot be sent again.
  • RR scheduling algorithm is the simplest, avoiding local queue starvation through circular service, that is, all users round-robin scheduling, can ensure that each user has a service opportunity, but this scheduling algorithm does not consider
  • the difference between each scheduling unit such as the difference in packet length, is difficult to improve for delay. It is not possible to allocate dedicated queues for low-latency services.
  • the service interval of each queue depends entirely on how many packets in other queues are waiting to be sent during that period. As well as the length of these packets, these variables are difficult to predict accurately, which makes the RR scheduling algorithm prone to delay jitter. Therefore, the RR scheduling algorithm cannot guarantee the allocation of traffic, and only guarantees fair distribution of service opportunities.
  • the WRR scheduling algorithm adds weight to the service based on the RR scheduling algorithm.
  • the DRR scheduling algorithm is an extension of the RR scheduling algorithm, assigning a constant to each queue ( The weight is a proportional time slice) and a variable (difference), which mainly solves the unfairness of the queue service due to different packet lengths of different data streams.
  • the MDRR scheduling algorithm is an improved algorithm of the DRR scheduling algorithm.
  • the MDRR scheduling algorithm sets a low-latency queue in all queues and preferentially schedules low-latency queues.
  • the MDRR scheduling algorithm can provide better services for low-latency and low-jitter services. QoS guarantee.
  • the above scheduling algorithm is relatively complicated and difficult to implement.
  • the patent application with the application number of 200610140475.6 provides a method and device for performing QoS scheduling on multiple users, mainly implementing the MDRR scheduling algorithm by using a token bucket, wherein the scheduling method includes: periodically refreshing the token according to the configured QoS information table. Number of tokens in the bucket; round-robin the user number to be scheduled in the scheduling matrix, where the scheduling matrix is X rows and X columns of RAM, - a total of X * X storage units, corresponding to the scheduling of x * x users Can identify; the round-robin user number issues a scheduling request; after obtaining the last scheduling result feedback, the scheduling request is executed.
  • the scheduling matrix used is a RAM matrix, and the RAM matrix is calculated, which is complicated, and has air conditioning degree, which wastes scheduling opportunities; in addition, due to the scheduling matrix Restricted, the number of supported users is small. Generally, the number of users is thousands (K), for example, several thousand (K) to several tens of thousands (K), and the number of users must be ⁇ * ⁇ . Summary of the invention
  • the purpose of the embodiments of the present invention is to provide a user scheduling method and a device thereof, which are used to solve the problems that the existing scheduling technology is relatively complicated, the degree of air conditioning occurs, and the number of supported users is small.
  • an embodiment of the present invention provides a user scheduling method, configured to perform scheduling operations on a plurality of users and a queue managed by each of the users, where the user scheduling method includes: calculating a schedulability of the current user; And confirming that the calculated schedulability of the current user is schedulable, performing round-robin scheduling on the user schedulability table corresponding to the current user until the user ID is scheduled; the user schedulability table
  • the two sets of user information tables that are scheduled and to be processed are respectively included, wherein any one of the groups of the user information tables adopts a bit chart structure of two or more levels; when the user ID is scheduled, the user who is scheduled is first rotated.
  • the information table then rounds the user information table to be processed; when the user information table of any group is rotated, the scheduling is performed step by step from top to bottom.
  • the calculating the schedulability of the current user includes: confirming, according to the queue ID corresponding to the queue in the data packet of the enqueue, the current user to which the queue belongs, and calculating all queues that are managed by the current user.
  • the calculating the schedulability of the current user for the first time comprises: performing an OR operation on schedulability of all queues under the jurisdiction of the current user.
  • the calculating, by the second time, the schedulability of the current user includes: performing, by using the first calculation, the schedulability of the current user and the token positive and negative signs in the user token bucket. "And" operation.
  • the step of updating the queue information before calculating the schedulability of all the queues of the current user including: verifying the current weight of each queue managed by the current user corresponding to the queue ID; If it is determined that the current weight of all the schedulable queues is "0", the current weights of all the queues managed by the current user are updated to preset configuration weights, and the value of the configuration weights is a positive integer. The higher the value of the configuration weight is, the larger the weight of the queue is, and the more times the subsequent scheduling is performed; otherwise, if it is determined that the current weight of the at least one schedulable queue is "non-zero natural number", then The current weight of all queues under the jurisdiction of the current user is not updated.
  • the user scheduling method further includes the step of updating the user information, including: comparing the "scheduled user information table switching history" in the scheduling process with the stored "user-scheduled user table switching history" If the "scheduled user information table switching history" is not equal to the stored "user-scheduled user table switching history", the current weight of the current user is updated to a preset configuration.
  • the weight of the configuration weight is a positive integer. The higher the value of the configuration weight is, the greater the weight of the user is, and the more times the subsequent scheduling is performed; otherwise, if the "scheduled user information table is obtained by comparison
  • the switching history is equal to the stored user table switching history of the user", and the current weight of the current user is not updated.
  • the method further includes: receiving the scheduled user ID, and scheduling, according to the queues governed by the user ID, the queue weight is “a natural number other than 0” and the schedulability is “ 1 "The next queue.
  • the user information table adopts a three-level bitmap structure, including a first level, a second level, and a third level from top to bottom, and the first level* the second level* the third level is M
  • the first level includes a first data piece, the first data piece is an M bit, and the second level includes M second data pieces, the second data
  • the slice is an N bit
  • the third level includes M*N third data slices
  • the third data slice is an L bit
  • any one of the first data slices governs one of the second levels.
  • any one of the third levels represents schedulability of a user corresponding to the third level, including: indicating that the schedulable schedulability 1 and the representation are not available Schedulability of scheduling 0; any bit in the second level representing the result of an OR operation of all L bits in a third piece of data in the third level it governs; Any bit in the level represents the result of an AND operation of all N bits in a second piece of data in the second level it governs; round-robin scheduling includes: each time a user is scheduled, in turn Scheduling the first level, the second level, and the third level; until one bit in the first stage, one bit in the second level, and one bit in the third level are simultaneously scheduled to be 1 At this time, one of the users in the third level, which is a bit of 1, is the user to be scheduled.
  • the scheduling the user ID from the user schedulability table by using the round-robin scheduling includes: first, starting from the first bit in the first level, performing sequential scheduling in the first level to schedule a bit of 1; if the last bit of the first stage has been scheduled and no bits are allocated to 1, the process ends; if a bit of 1 is scheduled in the first stage, then Suspending the scheduling of the first stage, and proceeding to the next process; the second step, sequentially in all the bits in a second data piece of the second stage under the one bit of the first level in the first stage Scheduling to schedule a bit of 1; if it has been scheduled to the last bit of the second slice in the second stage and has not dispatched to a bit of 1, return to the first step, from the first The next bit after the one bit paused in the level starts to continue to sequentially sequence the next bit of 1; if one of the second pieces of data in the second stage is scheduled to be 1 Bit, then suspend the second level of scheduling, turn Going to the next process; the third step
  • the number of bits in the first level, the second level, and the third level in the three-level bitmap structure are: 128 bit, 128 bit, and 64 bit, respectively, forming a first level* second level *
  • the third level is the user information table of 128 bit* 128 bit*64 bit.
  • the embodiment of the present invention further provides a user scheduling apparatus, which is used for multiple users and each The user-scheduled device performs a scheduling operation
  • the user scheduling device includes: a user computing module, configured to calculate a schedulability of the current user; and a user scheduling module, connected to the user computing module, for obtaining the confirmation If the schedulability of the current user calculated by the user calculation module is schedulable, the user schedulability table corresponding to the current user is scheduled in a round-robin manner until the user ID is scheduled; the user may schedule
  • the characterization table includes two sets of user information tables that are scheduled and to be processed respectively, wherein any one of the sets of the user information tables adopts a bit chart structure of two or more levels; when scheduling the user ID, the first is to be scheduled The user information table then rounds the user information table to be processed; when the user information table of any group is rotated, the scheduling is performed step by step from top to bottom.
  • the user scheduling apparatus further includes: a queue management module and a queue calculation module; the queue management module is configured to acquire a queue ID corresponding to the queue in the data packet when receiving the data packet of the enqueue, Sending the queue ID of the enqueue to the queue calculation module; the queue calculation module is configured to receive the queue ID from the enqueue sent by the queue management module, and confirm the current user to which the queue belongs, Calculating schedulability of all queues managed by the current user, and calculating schedulability of the current user for the first time, and sending the schedulability of the current user calculated by the first calculation to the user calculation module Calculating, by the user calculation module, the schedulability of the current user calculated by the queue calculation module for the first time and the token positive and negative flag in the user token bucket, and calculating the schedulable of the current user for the second time
  • the schedulability of the queue includes: a schedulable schedulability "1" and a queue
  • the current user's schedulability of the first calculation is obtained by ORing the schedulability of all queues under the jurisdiction of the current user.
  • the schedulability of the current user calculated by the second calculation is performed by using the current user's schedulability of the first calculation and the token positive and negative signs in the user token bucket. Obtained by the "and" operation.
  • the queue calculation module further includes: updating the queue information: verifying a current weight of each queue managed by the current user corresponding to the queue ID; if determining that the current weight of all the schedulable queues is "0", the current weight of all queues under the jurisdiction of the current user is updated to a preset configuration weight, the value of the configuration weight is a positive integer, and the higher the value of the configuration weight, the greater the weight of the queue. , the more times the subsequent scheduling is performed; conversely, if it is judged that at least one of them exists The current weight of the scheduled queue is "a natural number other than 0", and the current weight of all queues under the jurisdiction of the current user is not updated.
  • the user calculation module further includes: updating the user information: comparing the “scheduled user information table switching history” in the scheduling process with the stored “user-scheduled user table switching history”;
  • the current weight of the current user is updated to a preset configuration weight, The value of the configuration weight is a positive integer. The higher the value of the configuration weight is, the larger the weight of the user is, and the more times the subsequent scheduling is performed. Otherwise, if the comparison is performed, the "scheduled user information table switching history" is obtained. If the stored "user-scheduled user table switching history” is equal, the current weight of the current user is not updated.
  • the queue scheduling module is connected to the queue calculation module and the user scheduling module, and configured to be configured according to the user ID received by the user scheduling module and the current sent by the queue calculation module.
  • the schedulability of each queue managed by the user, from the respective queues governed by the user ID, the next queue whose queue weight is "non-zero natural number" and the schedulability is "1" is scheduled.
  • the user information table adopts a three-level bitmap structure, including a first level, a second level, and a third level from top to bottom, and the first level* the second level* the third level is M
  • the first level includes a first data piece, the first data piece is an M bit, and the second level includes M second data pieces, the second data
  • the slice is an N bit
  • the third level includes M*N third data slices
  • the third data slice is an L bit
  • any one of the first data slices governs one of the second levels.
  • any one of the third levels represents schedulability of a user corresponding to the third level, including: indicating that the schedulable schedulability 1 and the representation are not available Schedulability of scheduling 0; any bit in the second level representing the result of an OR operation of all L bits in a third piece of data in the third level it governs; Any bit in the level represents the result of an AND operation of all N bits in a second piece of data in the second stage it governs.
  • the user scheduling apparatus wherein the number of bits in the first level, the second level, and the third level in the three-level bitmap structure is: 128 bit, 128 bit, and 64 bit, constitute the first level * second level * third level is 128 bit * 128 bit * 64 bit user information table.
  • the user scheduling method of the embodiment of the present invention has the following beneficial effects:
  • any group of user information tables adopts a bitmap structure of two or more levels.
  • the user information table that is being scheduled is first rotated.
  • the scheduling is performed step by step from top to bottom, which not only improves the scheduling efficiency, but also avoids the generation of the air conditioner;
  • the user information table provided by the embodiment of the present invention adopts a bit chart architecture of two or more levels, and provides a number of users that can be supported compared with the use of the RAM matrix in the prior art, so that the number of users can reach one million (M, megabytes). ) level.
  • FIG. 1 is a schematic block diagram of a user scheduling apparatus according to an embodiment of the present invention
  • FIG. 2 is a logic block diagram of a specific implementation of a user scheduling apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a scheduling method according to an embodiment of the present invention.
  • FIG. 4 is a hierarchical structure diagram of a user information table for realizing user hierarchical scheduling in a scheduling method applied to an embodiment of the present invention. detailed description
  • the present invention provides a user scheduling method and apparatus thereof for performing scheduling operations on a plurality of users and queues governed by each of the users.
  • the provided user schedulability table is divided into two groups of user information tables (the user information table being scheduled and the user information table to be processed), and the user information table of any group adopts two Bit chart architecture above the level.
  • the scheduling the user information table to be processed is rotated in the order of the user information sequence, and the user information table to be processed is cycled from top to bottom.
  • the scheduling is performed to schedule the required user ID. Referring to FIG.
  • the user scheduling apparatus includes: a queue management module 101, a queue calculation module 103, a user calculation module 105, a user scheduling module 107, and a queue scheduling module 109.
  • the queue management module 101 is configured to obtain a queue ID corresponding to the queue in the data packet when the data packet of the enqueue is received, and send the queue ID of the enqueue to the queue calculation module 103.
  • the queue calculation module 103 is configured to receive the queue ID sent from the queue management module 101, confirm the current user to which the queue belongs, and calculate the schedulability and the first of all the queues managed by the current user.
  • the schedulability of the current user is calculated, and the schedulability of the current user calculated for the first time is sent to the user calculation module 105.
  • the schedulability of the queue includes: a schedulable schedulability "1" and a schedulability schedulability "0", and a schedulability "1" satisfaction condition: the queue is non-empty and the token
  • the positive and negative signs are "positive".
  • the first calculation of the schedulability of the current user is obtained by ORing the schedulability of all queues under the jurisdiction of the current user.
  • the user calculation module 105 is configured to calculate the schedulability of the current user. Specifically, the user calculation module calculates the schedulability of the current user for the second time according to the schedulability of the current user calculated by the queue calculation module and the token positive and negative flag in the user token bucket. .
  • the schedulability of the current user includes: a schedulable schedulability "1" and an unschedulable schedulability "0".
  • calculating the schedulability of the current user for the second time is performed by using the schedulability of the current user calculated for the first time and the token positive and negative signs in the user token bucket. "And" operation.
  • the user scheduling module 107 is configured to perform round-robin scheduling on the user schedulability table corresponding to the current user, if the schedulability of the current user calculated by the user calculation module 105 is schedulable, until scheduling User ID.
  • the user schedulability table includes two sets of user information tables that are scheduled and to be processed, where any one of the sets of the user information table uses two or more levels. Chart architecture. In this way, when the user ID is scheduled in a round-robin manner, the user information table to be processed is first rotated and then the user information table to be processed is rotated; when the user information table of any group is rotated, from top to bottom Scheduled step by step.
  • the queue scheduling module 109 is configured to: according to the user ID received by the user scheduling module 107 and the schedulability of each queue managed by the queue calculation module 103, the queues are managed by the user ID. The round robin schedules the next queue that can be scheduled.
  • FIG. 2 is a logic block diagram of a specific implementation of the user scheduling apparatus in the embodiment of the present invention.
  • the user scheduling apparatus includes: a queue management module 101, a queue calculation module 103, a user calculation module 105, a user scheduling module 107, and a queue scheduling module 109.
  • the modules in the logic block diagram of FIG. 2 can be implemented by electronic hardware, computer software, or a combination of the two.
  • each of the above modules can be integrated into an FPGA (Field-Programmable Gate Array, site). Programmable gate array) in the chip.
  • a queue information base using a user ID index, including each queue managed by the user (in an embodiment, for example, each can be set
  • the configuration bandwidth of a user is governed by eight queues, the configuration weight of each queue managed by the user, the current weight of each queue managed by the user, and the number of remaining packets in each queue, wherein the configured bandwidth can be based on communication
  • User information library using user ID index, including user's configured bandwidth, user's configuration weight, user's current weight, user-scheduled user information table switching history, user's upcoming user information table, And the user's last schedulability state
  • the user and the queue token bucket using the user ID index, including the current token positive and negative flags of each user and each queue in the user; the queue schedul
  • the queue information database is managed and controlled by the queue calculation module 103.
  • the user information database is managed and controlled by the user scheduling module 107, and the user and the queue token bucket are calculated by the queue.
  • the module 103 manages and controls the queue schedulability table to be managed and controlled by the queue scheduling module 109.
  • the two sets of user schedulability tables (the user information table being scheduled and the user information table to be scheduled) are for the user.
  • the scheduling module 107 performs round-robin scheduling.
  • the user scheduling process in the embodiment of the present invention is described below in conjunction with the logical block diagram of FIG. Referring to Figure 3, the user scheduling process is as follows:
  • Step S201 the queue management module 101 receives the data packet and acquires the queue ID of the enqueue in the data packet.
  • the data packet when a packet representing a user enters the queue management module, the data packet is in the form of a queue, that is, for a certain user, there may be multiple queues under its jurisdiction, for example, in one In this case, one user has data corresponding to eight queues, and each queue is assigned a corresponding queue ID.
  • the queue management module 101 can acquire the queue IDs of the enqueue according to the queue ID, and send the queue ID to the queue calculation module 103.
  • Step S203 after receiving the queue ID of the enqueue, the queue calculation module 103 performs: updating queue information, calculating schedulability of each queue managed by the current user corresponding to the queue ID, and calculating the first time. The schedulability of the current user corresponding to the queue ID.
  • step S203 The following describes each operation in step S203 in detail:
  • the method includes: a. The number of remaining packets in the queue ID
  • the range of values of the configuration weight is a positive integer (a natural number other than 0), BP : 1, 2.
  • the configuration weight may be set according to a specific queue, and the higher the configuration weight value of a certain queue, the greater the weight of the queue, and the more times the subsequent scheduling is performed, for example: the configuration weight 10 indicates The number of times of scheduling is 10, and the configuration weight of 30 means that the number of times of scheduling is 30.
  • the weight scheduling of the queue can be implemented.
  • the queue can be scheduled only when the queue is non-empty and the positive and negative tokens are positive, ie, the schedulability of the queue is recorded as " ⁇ (the schedulability of the queue includes representation Configurable schedulability 1 and indicating unschedulable schedulability 0); user ID of the current user, schedulability of each queue governed by the current user, and respective queues governed by the current user Whether the current weight is "0" is sent to the queue scheduling module 109.
  • calculating the schedulability of the current user for the first time is obtained by performing an OR operation on the schedulability of all queues under the jurisdiction of the current user. Specifically, the schedulability of all queues under the jurisdiction of the current user is ORed, as long as the schedulability of one queue in each queue managed by the current user is "1", The current user's schedulability is "1", and the current user's schedulability is only if and only if the schedulability of all queues under the jurisdiction of the current user is "0". 0".
  • Step S205 the user calculation module 105 calculates the second time according to the schedulability of the current user calculated by the first calculation sent from the queue calculation module 103 and the token positive and negative signs in the user token bucket.
  • the schedulability of the current user is to "and" the schedulability of the current user calculated in the first time with the token positive and negative signs in the user token bucket. Obtained by operation.
  • the first calculated schedulability of the current user is ANDed with the token positive and negative flag in the user token bucket, if and only if the current user is calculated for the first time
  • the arbitrability of the current user calculated for the second time is "1"; Otherwise, as long as the current user's schedulability of the first calculation is "0", the token positive and negative flag in the user token bucket is "negative (equivalent to "0"), and the first If the current user's schedulability of the second calculation is "0" and the token positive and negative flag in the user token bucket is "negative (equivalent to "0"), the second calculation is obtained.
  • the schedulability of the current user is "0".
  • the user calculation module 105 is further configured to update the user information base: compare the "user-scheduled user information table switching history" in the user information database with the "scheduled user information table switching history" sent by the user scheduling module 107. Whether the current weight of the user ID needs to be updated depends on whether the two are equal.
  • the “user-scheduled user information table switching history” in the user information base is not equal to the “scheduled user information table switching history” sent by the user scheduling module 107
  • the current information in the user information base is The current weight of the user is updated to a preset configuration weight, and a user information table command for inserting the user ID into the currently scheduled user information table is issued and sent to the user scheduling module 107, and the "user information table to be operated by the user" is sent.
  • the range of values of the user's weight is a natural number, that is, 0, 1, 2, ..., N, and the range of values of the configuration weight is a positive integer (a natural number other than 0).
  • BP 1, 2, 3, ..., N.
  • the configuration weight of the current user may be set according to a specific user. The higher the configuration weight value of a certain user, the greater the weight of the user, and the more times the subsequent scheduling is performed, for example: configuration weight 10 means that the number of scheduling is 10, and the configuration weight of 30 means that the number of scheduling is 30.
  • Step S207 the user scheduling module 107 performs round-robin scheduling on the user schedulability table corresponding to the current user according to the round-robin scheduling algorithm, if the schedulability of the current user is determined to be schedulable.
  • the user ID is scheduled, and the scheduled user ID is sent to the queue scheduling module 109.
  • the scheduled users are divided into two sets of user adjustability tables: a user information table being scheduled and a user information table to be processed.
  • the round-robin scheduling is first performed from the user information table being scheduled, and after all the valid users in the scheduled user information table are scheduled, the user information table is switched to the round-robin scheduling. .
  • the user information table (whether in the scheduling information table or the to-be-scheduled information table) of any group is used to adopt a bitmap structure Bitmap of two or more levels (which may include two levels), and user classification is implemented. Scheduling.
  • each set of user schedulability tables is divided into three levels, which are respectively referred to as: first level, second level, and third level, and constitute a first level*second Level *
  • the third level is M bit * N bit * L bit, where any bit bit in the third level represents a user, and any bit bit in the second level governs L bits in the third level Bit, any bit bit in the first stage governs N bit bits in the second stage.
  • the first stage includes a first data piece, the first data piece is an M bit, the second stage includes M second data pieces, and the second data piece is N bit,
  • the third stage includes M*N third data pieces, the third data piece is an L bit, and any one of the first data pieces governs a second data piece in the second stage, the first Any one of the two data slices governs a third piece of data in the third level.
  • 128 bit * 128 bit * 64 bit ie, 2 7 * 2 7 * 2 6
  • the first piece of data of the first stage Any one of the bits (a total of 128 bits) has a second piece of data (a total of 128 bits) of the second stage, and a second piece of data of the second stage (a total of 128 bits)
  • Any bit (1 bit) has a second piece of data (a total of 64 bits) of the third stage, and any bit (1 bit) of a third piece of data (a total of 64 bits) of the third stage Represents a user.
  • scheduling is performed step by step from top to bottom, that is, each time a user is scheduled, the first level, the second level, and the second stage are sequentially scheduled.
  • Level 3 until scheduling to the first occurrence of a bit in the first stage, one bit in the second stage, and one bit in the third stage is simultaneously 1, at this time, the third level A user represented by a bit of 1 is the user to be scheduled.
  • the first level, the second level, and the third level are sequentially scheduled until the first three bits in the first level, the second level, and the third level are scheduled to be 1 at the same time. Then, the bit of this third level in the third level is the user to be scheduled.
  • the specific process includes: a first step, starting from the first bit of the first data slice in the first stage, performing sequential scheduling in the first stage to schedule a bit of 1; If the last bit of the level is not scheduled to a bit of 1, the process ends; if a bit of 1 is scheduled in the first stage, the scheduling of the first level is suspended, which will be 1 The bit is recorded as the first level pause bit, and then proceeds to the next process; the second step is in the first level
  • One bit in a second data slice of the second stage under the one bit of 1 is sequentially scheduled to dispatch a bit of 1; if it is scheduled to the second level, the second If the last bit of the data slice is not scheduled to a bit of 1, then return to the first step, and continue to be sequentially scheduled from the next bit after the first-level pause bit in the first stage.
  • Pause bit then go to the next process; the third step, in the second stage of the second level of the third bit of a third piece of data in the third stage of the data is scheduled in order to dispatch a bit of 1; if it has been scheduled to the last bit of the third slice in the third level and is not scheduled to a bit of 1, then return to the second step, from the second level The second level of the second piece of data The next bit after the bit starts to continue to sequentially sequence the next bit of 1; if a bit of 1 is scheduled in the third piece of data in the third stage, the process ends, and the scheduling is completed.
  • a user represented by one of the bits of the third data slice in the third level is the user to be scheduled.
  • the user scheduling module 107 further includes: receiving a user information table insertion command of the user sent by the user calculation module 105, and setting a bit corresponding to the user ID in the insertion information table to "1";
  • the handover for example, the scheduling information table is switched to the to-be-scheduled information table, or the to-be-scheduled information table is switched to the scheduling information table
  • the information table switching history is sent to the user calculation module 105 for the user calculation module 105 to update accordingly.
  • User Information Library The process of updating the User Information Base has been described in the "User Computing Module 105" section, so it will not be described here).
  • the queue scheduling module 109 receives the user IDs scheduled from the user scheduling module 107, and queries the queue schedulability table for the information of each queue corresponding to the user ID, and schedules the queues according to the round-robin scheduling algorithm.
  • the next queue that can be scheduled is sent to the queue management module 101, and the user ID and the user information table switching history at the time of scheduling are sent to the queue calculation module 103.
  • the next queue that can be scheduled needs to meet the following requirements:
  • the queue weight is "a natural number other than 0" and the schedulability is "1".
  • the user schedulability table is used for scheduling, and the user schedulability table is divided into the user information table being scheduled and the user information table to be processed, and any
  • the group user information table adopts a bit chart structure of two or more levels, which greatly improves the number of users that can be supported, the number of users is more flexible, and the weight scheduling between users can be realized; when performing user scheduling, the first step is to follow the
  • the scheduled user information table further polls the user information table to be processed, and when scheduling the user information table of any group, scheduling is performed step by step from top to bottom, which not only improves scheduling efficiency, but also avoids air conditioning.
  • the generation of degrees is used for scheduling, and the user schedulability table is divided into the user information table being scheduled and the user information table to be processed, and any
  • any The group user information table adopts a bit chart structure of two or more levels, which greatly improves the number of users that can be supported, the number of users is more flexible, and the weight scheduling between users can be realized; when performing
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.
  • RAM random access memory
  • ROM read only memory
  • electrically programmable ROM electrically erasable programmable ROM
  • registers hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供一种用户调度方法及其装置,用于对多个用户及各个所述用户所管辖的队列进行调度操作;所述用户调度方法包括:计算当前用户的可调度性;在确认得到计算的所述当前用户的可调度性为可调度的情况下,对与所述当前用户对应的用户可调度性表进行轮循调度,直至调度出用户 ID;所述用户可调度性表包括分别为正在调度的和待处理的两组用户信息表,其中,任一组所述用户信息表采用两级以上的位图表架构;在调度用户 ID时,先轮循所述正在调度的用户信息表再轮循所述待处理的用户信息表;在轮循任一组所述用户信息表时,由上至下逐级进行调度。相较于现有技术,本发明提高了可支持的用户数,轮循调度具有实现简单、调度效率高等优点。

Description

用户调度方法及其装置 技术领域 本发明涉及通信技术领域, 特别涉及一种用户调度方法及其装置。 背景技术
网络 QoS (Quality of Service, 服务质量) 就是在网络带宽一定的前提下, 通过一定的策略和机制保证不同业务的服务需求, 具体可以量化为带宽、 延迟、 抖动、 丢失率、 吞吐量等性能指标。
队列调度算法是实现网络 QoS控制的核心机制之一, 是网络资源管理的重 要内容,通过控制不同类型的分组对链路带宽的使用, 使不同的数据流得到不同 等级的服务。
实现 Q0S调度的方法主要有漏桶和令牌桶两种, 其中, 令牌桶算法是网络 流量整形和速率限制中最常使用的一种算法。令牌桶按用户设定的速度向桶中放 置令牌, 并且令牌桶有用户设定的容量, 当桶中令牌的量超出桶的容量的时候, 令牌的量不再增加; 当报文被令牌桶处理的时候,若令牌桶中有足够的令牌可以 用来发送报文, 则报文可以通过, 同时令牌桶中的令牌量按报文的长度做相应的 减少, 当令牌桶中的令牌少到报文不能再发送时报文被丢弃。
QoS的调度算法有很多种, 如 RR (Round Robin, 循环) 调度算法、 WRR (Weighted Round-Robin, 加权循环)调度算法、 DRR (Deficit Round Robin, 差 额循环) 调度算法、 MDRR (Modified Deficit Round Robin, 改进型差分循环) 调度算法等, 其中, RR调度算法最简单, 通过循环服务避免局部队列饥饿, 即 所有用户轮循调度,可以保证每个用户都有服务的机会,但是这个调度算法没有 考虑每次调度单元的差异, 如包长的差异, 对时延难以改进, 不能为低时延业务 分配专用队列,每个队列的服务间隔完全依赖于那段时间内其他队列中有多少分 组等待发送以及这些分组的长度, 这些变量难以准确预测, 导致 RR调度算法容 易产生时延抖动。 所以, RR调度算法不能保证流量的分配, 只能保证服务机会 公平分配。
而其他调度算法, WRR调度算法是在 RR调度算法的基础上给用户加了服 务的权重。 DRR调度算法是 RR调度算法的扩展, 为每个队列分配一个常量(以 权重为比例的时间片) 和一个变量 (差额), 主要解决由于不同数据流的不同包 长引起对队列服务的不公平性。 MDRR调度算法是 DRR调度算法的改良算法, MDRR调度算法在所有的队列中设定一个低延迟队列, 优先调度出低延迟队列, MDRR调度算法可以为要求低延迟、 低抖动的业务提供较好的 QoS保证。 上述 调度算法相对而言较为复杂, 不易实现。
申请号为 200610140475.6的专利申请, 提供了一种对多用户进行 QoS调度 的方法和装置, 主要是利用令牌桶实现 MDRR调度算法, 其中的调度方法包括: 根据配置的 QoS信息表定时刷新令牌桶中的令牌数; 轮循出调度矩阵中的需要 调度的用户号, 其中, 调度矩阵为 X行 X列的 RAM, —共 X*X个存储单元, 对应 x*x个用户的调度使能标识; 轮循出的用户号发出调度请求; 获得上次调 度结果反馈后, 执行调度请求。 但, 由上可知, 在上述专利申请文件中: 采用的 调度矩阵为 RAM矩阵, 且 RAM矩阵是通过计算得出的, 比较复杂, 且会有空 调度, 浪费调度机会; 另外, 由于调度矩阵的限制, 支持的用户数较少, 一般, 用户数为千 (K) 级, 例如几千 (K) 至几十千 (K), 且用户数必须为 Χ*Χ个。 发明内容
本发明实施例的目的在于提供一种用户调度方法及其装置,用于解决现有调 度技术相对复杂、 出现空调度、 支持的用户数较少等问题。
第一方面,本发明实施例提供一种用户调度方法,用于对多个用户及各个所 述用户所管辖的队列进行调度操作,所述用户调度方法包括: 计算当前用户的可 调度性; 在确认得到计算的所述当前用户的可调度性为可调度的情况下,对与所 述当前用户对应的用户可调度性表进行轮循调度, 直至调度出用户 ID; 所述用 户可调度性表包括分别为正在调度的和待处理的两组用户信息表,其中,任一组 所述用户信息表采用两级以上的位图表架构; 在调度用户 ID时, 先轮循所述正 在调度的用户信息表再轮循所述待处理的用户信息表;在轮循任一组所述用户信 息表时, 由上至下逐级进行调度。
可选地,所述计算得到当前用户的可调度性包括: 依据入队的数据包中队列 所对应的队列 ID确认所述队列所属于的当前用户, 计算所述当前用户所管辖的 所有队列的可调度性和第一次计算所述当前用户的可调度性;根据第一次计算的 所述当前用户的可调度性以及用户令牌桶中的令牌正负标志,第二次计算所述当 前用户的可调度性。
可选地,所述第一次计算所述当前用户的可调度性包括: 将当前用户所管辖 的所有队列的可调度性进行"或"操作。
可选地,所述第二次计算所述当前用户的可调度性包括: 将第一次计算得到 的所述当前用户的可调度性与所述用户令牌桶中的令牌正负标志进行 "与"操作。
可选地,在计算所述当前用户所管辖的所有队列的可调度性之前还包括更新 队列信息的步骤, 包括: 验证所述队列 ID所对应的当前用户所管辖的各个队列 的当前权重; 若判断得到其中所有可调度的队列的当前权重为 "0", 则将所述当 前用户所管辖的所有队列的当前权重更新为预设的配置权重,所述配置权重的值 为正整数,所述配置权重的值越高代表该队列的权重越大,后续被调度的次数越 多; 反之, 若判断得到其中存在有至少一个可调度的队列的当前权重为"非 0的 自然数", 则对所述当前用户所管辖的所有队列的当前权重不进行更新。
可选地, 所述用户调度方法还包括更新用户信息的步骤, 包括: 将在调度过 程中的 "调度的用户信息表切换历史"与已存储的"用户调度出的用户表切换历 史"进行比较; 若经比较得到所述"调度的用户信息表切换历史 "与已存储的所述 "用户调度出的用户表切换历史"不相等,则将所述当前用户的当前权重更新为预 设的配置权重,所述配置权重的值为正整数,所述配置权重的值越高代表该用户 的权重越大, 后续被调度的次数越多; 反之, 若经比较得到所述"调度的用户信 息表切换历史 "与已存储的所述"用户调度出的用户表切换历史"相等, 则对所述 当前用户的当前权重不作更新。
可选地, 在调度出用户 ID之后还包括: 接收调度出来的用户 ID, 从所述用 户 ID所管辖的各个队列中轮循调度出队列权重为"非 0的自然数"且可调度性为 "1 "的下一个队列。
可选地, 所述用户信息表采用三级位图表架构, 包括由上至下的第一级、第 二级、 以及第三级, 构成的第一级 *第二级 *第三级为 M bit*N bit*L bit , 其中, 所述第一级包括一个第一数据片, 所述第一数据片为 M bit, 所述第二级包括 M 个第二数据片, 所述第二数据片为 N bit, 所述第三级包括 M*N个第三数据片, 所述第三数据片为 L bit, 所述第一数据片中的任一个比特位管辖第二级中的一 个第二数据片,所述第二数据片中的任一个比特位管辖第三级中的一个第三数据 片。 可选地,在所述三级位图表架构中,所述第三级中的任一比特位代表它所对 应的一个用户的可调度性,包括: 表示可调度的可调度性 1和表示不可调度的可 调度性 0; 所述第二级中的任一比特位代表它管辖的第三级中的一个第三数据片 中的所有 L个比特位进行 "或"操作的结果;所述第一级中的任一比特位代表它管 辖的第二级中一个第二数据片中的所有 N个比特位进行 "与"操作的结果; 进行 轮循调度包括: 每一次调度一个用户时, 依次调度第一级、 第二级、 第三级; 直 至调度到第一次出现第一级中的一个比特位、第二级中的一个比特位、 以及第三 级中的一个比特位同时为 1, 此时, 第三级中的这一个为 1的比特位所代表的一 个用户即为要调度出的用户。
可选地,所述利用轮循调度从用户可调度性表中调度用户 ID包括:第一步, 从第一级中的第一个比特位开始,在第一级中进行依序调度以调度出为 1的一个 比特位; 若已调度到第一级的最后一个比特位且没有调度到为 1的比特位, 则结 束流程; 若在第一级中调度到为 1的一个比特位, 则暂停第一级的调度, 转至下 一流程; 第二步,在第一级中为 1的那一个比特位下辖的第二级的一个第二数据 片中的所有比特位中进行依序调度以调度出为 1的一个比特位;若已调度到第二 级中那一个第二数据片的最后一个比特位且没有调度到为 1的比特位,则返回至 第一步,从第一级中暂停的为 1的那一个比特位之后的下一个比特位开始继续依 序调度出为 1 的下一个比特位; 若在第二级中那一个第二数据片中调度到为 1 的一个比特位, 则暂停第二级的调度, 转至下一流程; 第三步, 在第二级中为 1 的那一个比特位下辖的第三级的一个第三数据片中所有比特位中进行依序调度 以调度出为 1的一个比特位;若已调度到第三级中那一个第三数据片的最后一个 比特位且没有调度到为 1的比特位, 则返回至第二步, 从第二级中那一个第二数 据片中暂停的为 1的那一个比特位之后的下一个比特位开始继续依序调度出为 1 的下一个比特位; 若在第三级中那一个第三数据片中调度到为 1的一个比特位, 则结束流程,调度到的第三级中那一个第三数据片中的为 1的这一个比特位所代 表的一个用户即为要调度出的用户。
可选地,所述三级位图表架构中的第一级、第二级以及第三级中的比特位数 量分别为: 128 bit、 128 bit、以及 64 bit,构成第一级 *第二级 *第三级为 128 bit* 128 bit*64 bit的用户信息表。
第二方面,本发明实施例另提供一种用户调度装置,用于对多个用户及各个 所述用户所管辖的队列进行调度操作, 所述用户调度装置包括: 用户计算模块, 用于计算当前用户的可调度性; 用户调度模块, 与所述用户计算模块连接, 用于 在确认得到所述用户计算模块计算的所述当前用户的可调度性为可调度的情况 下, 对与所述当前用户对应的用户可调度性表进行轮循调度, 直至调度出用户 ID;所述用户可调度性表包括分别为正在调度的和待处理的两组用户信息表,其 中, 任一组所述用户信息表采用两级以上的位图表架构; 在调度用户 ID时, 先 轮循所述正在调度的用户信息表再轮循所述待处理的用户信息表;在轮循任一组 所述用户信息表时, 由上至下逐级进行调度。
可选地, 所述用户调度装置还包括: 队列管理模块和队列计算模块; 所述队 列管理模块,用于在接收到入队的数据包时获取所述数据包中队列所对应的队列 ID, 将入队的队列 ID发送至所述队列计算模块; 所述队列计算模块, 用于接收 来自所述队列管理模块所发送的入队的所述队列 ID, 确认所述队列所属于的当 前用户,计算所述当前用户所管辖的所有队列的可调度性和第一次计算所述当前 用户的可调度性,将第一次计算得到的所述当前用户的可调度性发送至所述用户 计算模块,由所述用户计算模块根据所述队列计算模块第一次计算的所述当前用 户的可调度性以及用户令牌桶中的令牌正负标志,第二次计算所述当前用户的可 调度性; 所述队列的可调度性包括: 表示可调度的可调度性" 1"和表示不可调度 的可调度性" 0", 可调度性 "1 "的满足条件为: 所述队列非空且令牌正负标志为 "正 "; 所述当前用户的可调度性包括: 表示可调度的可调度性 "1"和表示不可调 度的可调度性 "0"。
可选地,所述第一次计算的所述当前用户的可调度性是通过将当前用户所管 辖的所有队列的可调度性进行"或"操作而得到的。
可选地,所述第二次计算的所述当前用户的可调度性是通过将第一次计算得 到的所述当前用户的可调度性与所述用户令牌桶中的令牌正负标志进行"与"操 作而得到的。
可选地, 所述队列计算模块还包括用于更新队列信息: 验证所述队列 ID所 对应的当前用户所管辖的各个队列的当前权重;若判断得到其中所有可调度的队 列的当前权重为" 0", 则将所述当前用户所管辖的所有队列的当前权重更新为预 设的配置权重,所述配置权重的值为正整数,所述配置权重的值越高代表该队列 的权重越大, 后续被调度的次数越多; 反之, 若判断得到其中存在有至少一个可 调度的队列的当前权重为"非 0的自然数",则对所述当前用户所管辖的所有队列 的当前权重不进行更新。
可选地, 所述用户计算模块还包括更新用户信息: 将在调度过程中的"调度 的用户信息表切换历史"与已存储的"用户调度出的用户表切换历史"进行比较; 若经比较得到所述"调度的用户信息表切换历史 "与已存储的所述"用户调度出的 用户表切换历史"不相等,则将所述当前用户的当前权重更新为预设的配置权重, 所述配置权重的值为正整数,所述配置权重的值越高代表该用户的权重越大,后 续被调度的次数越多; 反之, 若经比较得到所述"调度的用户信息表切换历史" 与已存储的所述"用户调度出的用户表切换历史"相等,则对所述当前用户的当前 权重不作更新。
可选地,所述队列调度模块,与所述队列计算模块和所述用户调度模块连接, 用于根据接收自所述用户调度模块调度出来的用户 ID以及所述队列计算模块发 送的所述当前用户所管辖的各个队列的可调度性, 从所述用户 ID所管辖的各个 队列中轮循调度出队列权重为"非 0的自然数"且可调度性为 "1 "的下一个队列。
可选地, 所述用户信息表采用三级位图表架构, 包括由上至下的第一级、第 二级、 以及第三级, 构成的第一级 *第二级 *第三级为 M bit*N bit*L bit , 其中, 所述第一级包括一个第一数据片, 所述第一数据片为 M bit, 所述第二级包括 M 个第二数据片, 所述第二数据片为 N bit, 所述第三级包括 M*N个第三数据片, 所述第三数据片为 L bit, 所述第一数据片中的任一个比特位管辖第二级中的一 个第二数据片,所述第二数据片中的任一个比特位管辖第三级中的一个第三数据 片。
可选地,在所述三级位图表架构中,所述第三级中的任一比特位代表它所对 应的一个用户的可调度性,包括: 表示可调度的可调度性 1和表示不可调度的可 调度性 0; 所述第二级中的任一比特位代表它管辖的第三级中的一个第三数据片 中的所有 L个比特位进行 "或"操作的结果;所述第一级中的任一比特位代表它管 辖的第二级中一个第二数据片中的所有 N个比特位进行 "与"操作的结果。
可选地, 根据权利要求 17所述的用户调度装置, 其特征在于, 所述三级位 图表架构中的第一级、 第二级以及第三级中的比特位数量分别为: 128 bit、 128 bit、 以及 64 bit,构成第一级 *第二级 *第三级为 128 bit*128 bit*64 bit的用户信息 表。 如上所述, 本发明实施例的用户调度方法, 具有以下有益效果:
在本发明实施例中,提供了两组用户信息表, 且任一组用户信息表采用两级 以上的位图表架构,在进行用户调度时,先轮循所述正在调度的用户信息表再轮 循所述待处理的用户信息表,在轮循任一组所述用户信息表时, 由上至下逐级进 行调度, 不仅提高了调度效率, 而且也避免了空调度的产生; 另外, 由于本发明 实施例提供的用户信息表采用的是两级以上的位图表架构,相对于现有技术中的 使用 RAM矩阵, 提供了可支持的用户数, 使得用户数可达百万 (M, 兆) 级。 附图说明
图 1为本发明实施例用户调度装置的原理框图
图 2为本发明实施例用户调度装置所在的一个具体实现中的逻辑框图。 图 3为本发明实施例的调度方法的流程示意图。
图 4 为应用于本发明实施例的调度方法中实现用户分级调度的用户信息表 的分级结构图。 具体实施方式
以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说 明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外 不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观 点与应用, 在没有背离本发明的精神下进行各种修饰或改变。
需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构 想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形 状及尺寸绘制, 其实际实施时各组件的型态、 数量及比例可为一种随意的改变, 且其组件布局型态也可能更为复杂。
本发明提供一种用户调度方法及其装置,用于对多个用户及各个所述用户所 管辖的队列进行调度操作。在本发明的实施例中,将提供的用户可调度性表分为 两组用户信息表 (正在调度的用户信息表和待处理的用户信息表), 且任一组所 述用户信息表采用两级以上的位图表架构。这样, 在调度时, 依据先后顺序先轮 循所述正在调度的用户信息表再轮循所述待处理的用户信息表,且轮循任一组所 述用户信息表时由上至下逐级进行调度, 从而调度所需要的用户 ID。 请参阅图 1, 其为本发明实施例用户调度装置的原理框图, 用于实现对多个 用户及各个所述用户所管辖的队列进行调度操作。如图 1所示,所述用户调度装 置包括: 队列管理模块 101、 队列计算模块 103、 用户计算模块 105、 用户调度 模块 107、 以及队列调度模块 109。
队列管理模块 101 用于在接收到入队的数据包时获取所述数据包中队列所 对应的队列 ID, 将入队的队列 ID发送至队列计算模块 103。
队列计算模块 103用于接收来自队列管理模块 101所发送的入队的所述队列 ID,确认所述队列所属于的当前用户,计算所述当前用户所管辖的所有队列的可 调度性和第一次计算所述当前用户的可调度性,将第一次计算得到的所述当前用 户的可调度性发送至所述用户计算模块 105。 所述队列的可调度性包括: 表示可 调度的可调度性 "1"和表示不可调度的可调度性 "0", 可调度性 "1 "的满足条件为: 所述队列非空且令牌正负标志为"正"。在一种可实现的方式中, 第一次计算所述 当前用户的可调度性是通过将所述当前用户所管辖的所有队列的可调度性进行 "或"操作而得到的。
用户计算模块 105用于计算当前用户的可调度性。具体地,用户计算模块根 据所述队列计算模块第一次计算的所述当前用户的可调度性以及用户令牌桶中 的令牌正负标志,第二次计算所述当前用户的可调度性。所述当前用户的可调度 性包括: 表示可调度的可调度性 "1"和表示不可调度的可调度性 "0"。 在一种可实 现的方式中,第二次计算所述当前用户的可调度性是通过将第一次计算的所述当 前用户的可调度性与用户令牌桶中的令牌正负标志进行 "与"操作而得到的。
用户调度模块 107用于在确认得到用户计算模块 105计算的所述当前用户的 可调度性为可调度的情况下,对与所述当前用户对应的用户可调度性表进行轮循 调度, 直至调度出用户 ID。 具体地, 在一个可实现的方式中, 所述用户可调度 性表包括分别为正在调度的和待处理的两组用户信息表,其中,任一组所述用户 信息表采用两级以上的位图表架构。 这样, 在轮循调度用户 ID时, 先轮循所述 正在调度的用户信息表再轮循所述待处理的用户信息表;在轮循任一组所述用户 信息表时, 由上至下逐级进行调度。
队列调度模块 109用于根据接收自用户调度模块 107调度出来的用户 ID以 及队列计算模块 103发送的所述当前用户所管辖的各个队列的可调度性,从所述 用户 ID所管辖的各个队列中轮循调度出可调度的的下一个队列。 请再参阅图 2, 其为本发明实施例用户调度装置所在的一个具体实现中的逻 辑框图。 如图 2所示, 在所述逻辑框图中, 所述用户调度装置包括: 队列管理模 块 101、 队列计算模块 103、 用户计算模块 105、 用户调度模块 107、 以及队列调 度模块 109。 对于图 2所述逻辑框图中的各个模块能够以电子硬件、 计算机软件 或者二者的结合来实现, 例如, 在一实际应用中, 上述各个模块可以集成于一 FPGA ( Field-Programmable Gate Array, 现场可编程门阵列) 芯片中。 另外, 如 图 2所示, 在所述逻辑框图中, 还涉及到如下单元: 队列信息库, 使用用户 ID 索引, 包括用户所管辖的各个队列 (在一实施例中, 例如, 可设定每一用户管辖 八个队列)的配置带宽、用户所管辖的各个队列的配置权重、用户所管辖的各个 队列的当前权重、各个队列内剩余的报文个数, 其中, 所述配置带宽可根据通信 传输条件而设定; 用户信息库, 使用用户 ID索引, 包括用户的配置带宽、 用户 的配置权重、用户的当前权重、用户调度出的用户信息表切换历史、用户即将要 操作的用户信息表、 以及用户上次可调度性状态; 用户及队列令牌桶, 使用用户 ID 索引, 包括各个用户及用户内的各个队列当前的令牌正负标志; 队列可调度 性表, 使用用户 ID索引, 包括用户所管辖的各个队列是否可调度、 队列的调度 顺序、 以及队列的权重是否为 0等; 两组用户可调度性表(正在调度的用户信息 表和待调度的用户信息表), 使用用户 ID索引, 表明用户可调度性。对于上述单 元, 其中, 所述队列信息库是由队列计算模块 103管理和控制的, 所述用户信息 库是由用户调度模块 107管理和控制的,所述用户及队列令牌桶是由队列计算模 块 103管理和控制的,所述队列可调度性表是由队列调度模块 109管理和控制的, 两组用户可调度性表(正在调度的用户信息表和待调度的用户信息表)是供用户 调度模块 107进行轮循调度的。
以下结合图 2的逻辑框图来说明本发明实施例中的用户调度过程。参见图 3, 其用户调度过程如下:
步骤 S201 , 由队列管理模块 101接收数据包并获取所述数据包中入队的队 列 ID。 在本实施例中, 代表某一用户的数据包进入队列管理模块时, 数据包会 采用队列的形式, 即, 对于某一用户而言, 其所管辖的队列可以有多个, 例如, 在一种情况下, 一个用户对应管辖着 8个队列的数据, 且每一个队列均分配有对 应的一个队列 ID。在数据包以队列形式进入队列管理模块时, 队列管理模块 101 即可据此获取入队的这些队列 ID, 并将所述队列 ID发送至队列计算模块 103。 步骤 S203, 队列计算模块 103接收到入队的所述队列 ID之后, 执行: 更新 队列信息、计算所述队列 ID对应的所述当前用户所管辖的各个队列的可调度性、 以及第一次计算所述队列 ID对应的所述当前用户的可调度性。
以下对步骤 S203中的各个操作进行详细说明:
1 )、 更新队列信息库。 具体地, 包括: a、 将所述队列 ID内剩余的报文个数
+1 (加 1 ); b、 验证所述队列 ID所对应的当前用户所管辖的各个队列的当前权 重; 若判断得到其中所有可调度的队列(即非空且令牌正负标志为正)的当前权 重为 "0", 则将所述当前用户所管辖的所有队列的当前权重更新为预设的配置权 重; 反之, 若判断得到其中存在有至少一个可调度的队列(即非空且令牌正负标 志为正)的当前权重为 "非 0的自然数", 则对所述当前用户所管辖的所有队列的 当前权重不进行更新。需说明的是, 队列的权重的值的范围为自然数, 即: 0、 1、
2、 ... ...、 N, 而配置权重的值的范围则为正整数 (非 0的自然数), BP : 1、 2、
3、 ... ...、 N。 特别地, 所述配置权重可根据特定队列而设定相应的权重, 某一 队列的配置权重值越高代表该队列的权重越大, 后续被调度的次数越多, 例如: 配置权重 10即表示调度的次数为 10, 配置权重 30即表示调度的次数为 30, 通 过对队列的权重的更新, 能够实现队列的权重调度。
2)、 计算所述队列 ID对应的所述当前用户所管辖的各个队列的可调度性。 在本实施例中, 只有当队列非空且令牌正负标志为正时所述队列才可调度, 即, 所述队列的可调度性记为" Γ (所述队列的可调度性包括表示可调度的可调度性 1和表示不可调度的可调度性 0); 将所述当前用户的用户 ID、 所述当前用户所 管辖的各个队列的可调度性及所述当前用户所管辖的各个队列的当前权重是否 为 "0"发送至队列调度模块 109。
3 )、 第一次计算所述队列 ID对应的所述当前用户的可调度性。 在本实施例 中,第一次计算所述当前用户的可调度性是通过将所述当前用户所管辖的所有队 列的可调度性进行"或"操作而得到的。具体地, 将所述当前用户所管辖的所有队 列的可调度性进行"或"操作, 易知, 只要所述当前用户所管辖的各个队列中存在 有一个队列的可调度性为 "1", 则所述当前用户的可调度性为 "1", 只有当且仅当 所述当前用户所管辖的所有队列的可调度性均为 "0"时, 所述当前用户的可调度 性才为 "0"。 将所述当前用户的用户 ID、 入队状态、 第一次计算的所述当前用户 的可调度性、 以及用户令牌桶中的令牌正负标志发送至用户计算模块 105。 步骤 S205, 用户计算模块 105根据接收自队列计算模块 103发送过来的第 一次计算的所述当前用户的可调度性和用户令牌桶中的令牌正负标志而第二次 计算出所述当前用户的可调度性。在本实施例中,第二次计算所述当前用户的可 调度性是通过将第一次计算的所述当前用户的可调度性与用户令牌桶中的令牌 正负标志进行 "与"操作而得到的。具体地, 将第一次计算得到的所述当前用户的 可调度性与用户令牌桶中的令牌正负标志进行"与"操作,当且仅当第一次计算的 所述当前用户的可调度性为 "1"且用户令牌桶中的令牌正负标志为 "正 (相当于 "1" ) "时, 则得出第二次计算的所述当前用户的可调度性为 "1"; 否则, 只要出 现第一次计算的所述当前用户的可调度性为" 0"、 用户令牌桶中的令牌正负标志 为"负 (相当于" 0")、 以及第一次计算的所述当前用户的可调度性为 "0"且用户令 牌桶中的令牌正负标志为"负 (相当于" 0") 中的任一状况, 则得出第二次计算的 所述当前用户的可调度性即为" 0"。
另外, 用户计算模块 105还用于更新用户信息库: 将用户信息库中的"用户 调度出的用户信息表切换历史"与用户调度模块 107 发送过来的"调度的用户信 息表切换历史 "进行比较,根据两者是否相等来决定所述用户 ID的当前权重是否 需要更新。具体地, 若用户信息库中的"用户调度出的用户信息表切换历史 "与用 户调度模块 107发送过来的"调度的用户信息表切换历史 "不相等,则将用户信息 库中的所述当前用户的当前权重更新为预设的配置权重, 发出将所述用户 ID插 入到当前调度的用户信息表的用户信息表命令并发送至用户调度模块 107,将"用 户即将要操作的用户信息表"更新为用户调度模块 107 发送过来的"调度的用户 信息表切换历史"的 bit 0; 否则, 若用户信息库中的"用户调度出的用户信息表切 换历史 "与用户调度模块 107发送过来的"调度的用户信息表切换历史"相等, 则 用户信息库中的所述当前用户的当前权重不作更新, 根据"用户即将要操作的用 户信息表"而发出将所述用户 ID ***到正在调度的用户信息表或待处理的用户 信息表的用户信息表***命令并发送至用户调度模块 107。 需说明的是, 用户的 权重的值的范围为自然数, 即: 0、 1、 2、 ... ...、 N, 而配置权重的值的范围则 为正整数 (非 0的自然数), BP : 1、 2、 3、 ... ...、 N。 特别地, 所述当前用户的 配置权重可根据特定用户而设定相应的权重,某一用户的配置权重值越高代表该 用户的权重越大, 后续被调度的次数越多, 例如: 配置权重 10即表示调度的次 数为 10, 配置权重 30即表示调度的次数为 30。 通过对当前用户的权重的更新, 能够实现用户的权重调度。
步骤 S207, 用户调度模块 107在确认得到计算的所述当前用户的可调度性 为可调度的情况下,根据循环调度算法对与所述当前用户对应的用户可调度性表 进行轮循调度, 直至调度出用户 ID, 并将调度得到的用户 ID发送至队列调度模 块 109。
在本实施例中,根据用户的权重是否耗尽,将调度的用户分为两组用户可调 度性表: 正在调度的用户信息表和待处理的用户信息表。在调度过程中, 先从正 在调度的用户信息表中进行轮循调度,当正在调度的用户信息表中的所有有效用 户轮循调度完之后, 再切换到待处理的用户信息表进行轮循调度。
在本发明中, 特别地, 还包括将任一组的用户信息表(无论是正在调度信息 表还是待调度信息表) 采用两级以上 (可以包括两级) 的位图表架构 Bitmap, 实行用户分级调度。 在一实施方式中, 所述每一组用户可调度性表划分为三级, 由上至下分别称为: 第一级、 第二级、 以及第三级, 构成的第一级 *第二级 *第三 级为 M bit*N bit*L bit, 其中, 第三级中任一比特位 bit代表一个用户, 第二级中 的任一比特位 bit管辖第三级中的 L个比特位 bit, 第一级中的任一比特位 bit管 辖第二级中的 N个比特位 bit 。具体地, 所述第一级包括一个第一数据片, 所述 第一数据片为 M bit,所述第二级包括 M个第二数据片,所述第二数据片为 N bit, 所述第三级包括 M*N个第三数据片, 所述第三数据片为 L bit, 所述第一数据片 中的任一个比特位管辖第二级中的一个第二数据片,所述第二数据片中的任一个 比特位管辖第三级中的一个第三数据片。举例来讲,假设,将用户分为三级: 128 bit * 128 bit * 64 bit (即, 27 * 27* 26) (可参考图 4), 其中, 第一级的第一数据 片 (共有 128个比特) 中的任一比特 (l bit) 下辖第二级的一个第二数据片 (共 有 128个比特), 第二级的一个第二数据片 (共有 128个比特) 中的任一比特(1 bit)下辖第三级的一个第二数据片(共 64个比特),第三级的一个第三数据片(共 64个比特) 中的任一比特(l bit)均代表一个用户。 这样, 可以明显看出, 采用 如图 4所示的三级位图表架构,最高可支持的用户数为 128 bit * 128 bit * 64 bit = 27 * 27 * 26 = 220 = 1M, 可达百万 (M, 兆) 级, 相比于现有技术中采用 RAM矩 阵所能支持的 K级用户数, 大大扩展了可支持的用户数。 当然, 上面的仅为一 个示例,用户信息表的结构及其中的每一级的比特位数仍可根据实际需要而有不 同的变化。 另外, 在调度过程中, 在轮循任一组所述用户信息表时, 采用由上至下逐级 进行调度, 即, 每一次调度一个用户时, 依次调度第一级、 第二级、 第三级, 直 至调度到第一次出现第一级中的一个比特位、第二级中的一个比特位、 以及第三 级中的一个比特位同时为 1, 此时, 第三级中的这一个为 1的比特位所代表的一 个用户即为要调度出的用户。通过上述用户分级调度,有效减少了轮循调度消耗 的时间, 提高了轮循调度的效率。
对于上述轮循调度, 通过依次调度第一级、 第二级、 第三级, 直至调度到第 一次出现第一级、 第二级、 以及第三级中的三个比特位同时为 1, 则第三级中这 一个为 1的比特位即为要调度出的用户。具体流程包括: 第一步, 从第一级中的 第一数据片的第一个比特位开始,在第一级中进行依序调度以调度出为 1的一个 比特位; 若已调度到第一级的最后一个比特位且没有调度到为 1的比特位, 则结 束流程; 若在第一级中调度到为 1的一个比特位, 则暂停第一级的调度, 将为 1 的这一个比特位记为第一级暂停位, 接着转至下一流程; 第二步, 在第一级中为
1 的那一个比特位下辖的第二级的一个第二数据片中的所有比特位中进行依序 调度以调度出为 1的一个比特位;若已调度到第二级中那一个第二数据片的最后 一个比特位且没有调度到为 1的比特位, 则返回至第一步, 从第一级中的那一个 第一级暂停位之后的下一个比特位开始继续依序调度出为 1的下一个比特位;若 在第二级中那一个第二数据片中调度到为 1 的一个比特位, 则暂停第二级的调 度, 将为 1的这一个比特位记为第二级暂停位, 接着转至下一流程; 第三步, 在 第二级中为 1 的那一个比特位下辖的第三级的一个第三数据片中所有比特位中 进行依序调度以调度出为 1的一个比特位;若已调度到第三级中那一个第三数据 片的最后一个比特位且没有调度到为 1的比特位, 则返回至第二步, 从第二级中 那一个第二数据片中的那一个第二级暂停位之后的下一个比特位开始继续依序 调度出为 1的下一个比特位;若在第三级中那一个第三数据片中调度到为 1的一 个比特位, 则结束流程,调度到的第三级中那一个第三数据片中的为 1的这一个 比特位所代表的一个用户即为要调度出的用户。
需说明的是,在上述轮循调度过程中, 当第三级的某一个第三数据片调度到 最后一个比特位时,给当前第三级所属的第二级发指示,表明已完成了第二级的 一个比特位的调度,之后,由第二级在下一次从第二级的下一个比特位开始调度; 同样地, 当第二级的某一个第二数据片调度到最后一个比特位时,给当前第二级 所属的第一级发指示,表明完成了第一级的一个比特位的调度, 由第一级在下一 次从第一级的下一个比特位开始调度。
再有,用户调度模块 107还包括: 接收到用户计算模块 105发送过来的用户 的用户信息表***命令, 将***信息表中的用户 ID对应的 bit置为" 1"; 另外, 如果发生信息表切换(例如: 正在调度信息表切换为待调度信息表, 或者待调度 信息表切换为正在调度信息表), 则将信息表切换历史发送至用户计算模块 105, 以供用户计算模块 105据此更新用户信息库 (更新用户信息库的过程已在"用户 计算模块 105"部分描述, 故在此不在赘述)。
步骤 S209,队列调度模块 109接收自用户调度模块 107调度出来的用户 ID, 在队列可调度性表中查询出所述用户 ID对应的各个队列的信息, 根据轮循调度 算法从这些个队列中调度出可调度的下一个队列,将调度出的下一个队列的队列 ID发送至队列管理模块 101 ; 将用户 ID和调度时的用户信息表切换历史发送至 队列计算模块 103。 在一种可实现的方式中, 可调度的下一个队列需符合如下要 求: 队列权重为"非 0的自然数"且可调度性为 "1"。
由上可知,在本发明用户调度方法及其装置中,采用的是用户可调度性表进 行调度,用户可调度性表分为正在调度的用户信息表和待处理的用户信息表, 且 任一组用户信息表采用两级以上的位图表架构, 极大地提高了可支持的用户数, 用户数设置更加灵活, 且能够实现用户间的权重调度; 在进行用户调度时, 先轮 循所述正在调度的用户信息表再轮循所述待处理的用户信息表,在轮循任一组所 述用户信息表时, 由上至下逐级进行调度, 不仅提高了调度效率, 而且也避免了 空调度的产生。
本发明实施例所公开的实施例描述的各示例的单元及步骤, 能够以电子硬 件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟 以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业 技术人员可以对每个特定的应用来使用不同装置来实现所描述的功能,但是这种 实现不应认为超出本发明的范围。结合本文中所公开的实施例描述的装置或算法 的步骤可以用硬件、处理器执行的软件模块, 或者二者的结合来实施。软件模块 可以置于随机存储器(RAM)、 内存、 只读存储器(ROM)、 电可编程 ROM、 电 可擦除可编程 ROM、 寄存器、 硬盘、 可移动磁盘、 CD-ROM、 或技术领域内所 公知的任意其它形式的存储介质中。
上述实施例仅列示性说明本发明的原理及功效, 而非用于限制本发明。任何 熟悉此项技术的人员均可在不违背本发明的精神及范围下,对上述实施例进行修 改。 因此, 本发明的权利保护范围, 应如权利要求书所列。

Claims

权利要求
1. 一种用户调度方法, 用于对多个用户及各个所述用户所管辖的队列进行调度 操作, 其特征在于, 所述用户调度方法包括:
计算当前用户的可调度性;
在确认得到计算的所述当前用户的可调度性为可调度的情况下, 对与所 述当前用户对应的用户可调度性表进行轮循调度,直至调度出用户 ID;所述 用户可调度性表包括分别为正在调度的和待处理的两组用户信息表, 其中, 任一组所述用户信息表采用两级以上的位图表架构; 在调度用户 ID时, 先 轮循所述正在调度的用户信息表再轮循所述待处理的用户信息表; 在轮循任 一组所述用户信息表时, 由上至下逐级进行调度。
2. 根据权利要求 1所述的用户调度方法, 其特征在于, 所述计算得到当前用户 的可调度性包括:
依据入队的数据包中队列所对应的队列 ID确认所述队列所属于的当前 用户, 计算所述当前用户所管辖的所有队列的可调度性和第一次计算所述当 前用户的可调度性; 所述队列的可调度性包括: 表示可调度的可调度性 "1" 和表示不可调度的可调度性 "0", 可调度性" 1"的满足条件为: 所述队列非空 且令牌正负标志为"正"; 所述当前用户的可调度性包括: 表示可调度的可调 度性 "1"和表示不可调度的可调度性 "0";
根据第一次计算的所述当前用户的可调度性以及用户令牌桶中的令牌 正负标志, 第二次计算所述当前用户的可调度性。
3. 根据权利要求 2所述的用户调度方法, 其特征在于, 所述第一次计算所述当 前用户的可调度性包括: 将当前用户所管辖的所有队列的可调度性进行"或" 操作。
4. 根据权利要求 3所述的用户调度方法, 其特征在于, 所述第二次计算所述当 前用户的可调度性包括: 将第一次计算得到的所述当前用户的可调度性与所 述用户令牌桶中的令牌正负标志进行"与"操作。
5. 根据权利要求 2所述的用户调度方法, 其特征在于, 在计算所述当前用户所 管辖的所有队列的可调度性之前还包括更新队列信息的步骤, 包括:
验证所述队列 ID所对应的当前用户所管辖的各个队列的当前权重; 若 判断得到其中所有可调度的队列的当前权重为 "0", 则将所述当前用户所管 辖的所有队列的当前权重更新为预设的配置权重, 所述配置权重的值为正整 数,所述配置权重的值越高代表该队列的权重越大,后续被调度的次数越多; 反之, 若判断得到其中存在有至少一个可调度的队列的当前权重为"非 0 的 自然数", 则对所述当前用户所管辖的所有队列的当前权重不进行更新。 6. 根据权利要求 5所述的用户调度方法, 其特征在于, 还包括更新用户信息的 步骤, 包括:
将在调度过程中的"调度的用户信息表切换历史 "与已存储的 "用户调度 出的用户表切换历史 "进行比较; 若经比较得到所述"调度的用户信息表切换 历史"与已存储的所述"用户调度出的用户表切换历史"不相等,则将所述当前 用户的当前权重更新为预设的配置权重, 所述配置权重的值为正整数, 所述 配置权重的值越高代表该用户的权重越大, 后续被调度的次数越多; 反之, 若经比较得到所述"调度的用户信息表切换历史 "与已存储的所述"用户调度 出的用户表切换历史"相等, 则对所述当前用户的当前权重不作更新。 7. 根据权利要求 5所述的用户调度方法, 其特征在于, 在调度出用户 ID之后 还包括: 接收调度出来的用户 ID, 从所述用户 ID所管辖的各个队列中轮循 调度出队列权重为"非 0的自然数"且可调度性为 "1 "的下一个队列。
8. 根据权利要求 1所述的用户调度方法, 其特征在于, 所述用户信息表采用三 级位图表架构, 包括由上至下的第一级、 第二级、 以及第三级, 构成的第一 级 *第二级 *第三级为 M bit*N bit*L bit , 其中, 所述第一级包括一个第一数 据片, 所述第一数据片为 M bit, 所述第二级包括 M个第二数据片, 所述第 二数据片为 N bit, 所述第三级包括 M*N个第三数据片, 所述第三数据片为 L bit, 所述第一数据片中的任一个比特位管辖第二级中的一个第二数据片, 所述第二数据片中的任一个比特位管辖第三级中的一个第三数据片。 根据权利要求 8所述的用户调度方法, 其特征在于,
在所述三级位图表架构中, 所述第三级中的任一比特位代表它所对应的 一个用户的可调度性, 包括: 表示可调度的可调度性 1和表示不可调度的可 调度性 0; 所述第二级中的任一比特位代表它管辖的第三级中的一个第三数 据片中的所有 L个比特位进行 "或"操作的结果; 所述第一级中的任一比特位 代表它管辖的第二级中一个第二数据片中的所有 N个比特位进行 "与"操作 的结果;
进行轮循调度包括: 每一次调度一个用户时,依次调度第一级、第二级、 第三级; 直至调度到第一次出现第一级中的一个比特位、 第二级中的一个比 特位、 以及第三级中的一个比特位同时为 1, 此时, 第三级中的这一个为 1 的比特位所代表的一个用户即为要调度出的用户。
10. 根据权利要求 9所述的用户调度方法, 其特征在于, 所述利用轮循调度从用 户可调度性表中调度用户 ID包括:
第一步, 从第一级中的第一个比特位开始, 在第一级中进行依序调度以 调度出为 1的一个比特位; 若已调度到第一级的最后一个比特位且没有调度 到为 1的比特位, 则结束流程; 若在第一级中调度到为 1的一个比特位, 则 暂停第一级的调度, 转至下一流程;
第二步, 在第一级中为 1的那一个比特位下辖的第二级的一个第二数据 片中的所有比特位中进行依序调度以调度出为 1的一个比特位; 若已调度到 第二级中那一个第二数据片的最后一个比特位且没有调度到为 1的比特位, 则返回至第一步, 从第一级中暂停的为 1的那一个比特位之后的下一个比特 位开始继续依序调度出为 1的下一个比特位; 若在第二级中那一个第二数据 片中调度到为 1的一个比特位, 则暂停第二级的调度, 转至下一流程; 第三步, 在第二级中为 1的那一个比特位下辖的第三级的一个第三数据 片中所有比特位中进行依序调度以调度出为 1的一个比特位; 若已调度到第 三级中那一个第三数据片的最后一个比特位且没有调度到为 1的比特位, 则 返回至第二步, 从第二级中那一个第二数据片中暂停的为 1的那一个比特位 之后的下一个比特位开始继续依序调度出为 1的下一个比特位; 若在第三级 中那一个第三数据片中调度到为 1的一个比特位, 则结束流程, 调度到的第 三级中那一个第三数据片中的为 1的这一个比特位所代表的一个用户即为要 调度出的用户。 11. 根据权利要求 8所述的用户调度方法, 其特征在于, 所述三级位图表架构中 的第一级、 第二级以及第三级中的比特位数量分别为: 128 bit、 128 bit、 以 及 64 bit,构成第一级 *第二级 *第三级为 128 bit* 128 bit*64 bit的用户信息表。
12. 一种用户调度装置, 用于对多个用户及各个所述用户所管辖的队列进行调度 操作, 其特征在于, 所述用户调度装置包括:
用户计算模块, 用于计算当前用户的可调度性;
用户调度模块, 与所述用户计算模块连接, 用于在确认得到所述用户计 算模块计算的所述当前用户的可调度性为可调度的情况下, 对与所述当前用 户对应的用户可调度性表进行轮循调度,直至调度出用户 ID;所述用户可调 度性表包括分别为正在调度的和待处理的两组用户信息表, 其中, 任一组所 述用户信息表采用两级以上的位图表架构; 在调度用户 ID时, 先轮循所述 正在调度的用户信息表再轮循所述待处理的用户信息表; 在轮循任一组所述 用户信息表时, 由上至下逐级进行调度。 13. 根据权利要求 12所述的用户调度装置, 其特征在于, 还包括: 队列管理模 块和队列计算模块;
所述队列管理模块, 用于在接收到入队的数据包时获取所述数据包中队 列所对应的队列 ID, 将入队的队列 ID发送至所述队列计算模块;
所述队列计算模块, 用于接收来自所述队列管理模块所发送的入队的所 述队列 ID,确认所述队列所属于的当前用户,计算所述当前用户所管辖的所 有队列的可调度性和第一次计算所述当前用户的可调度性, 将第一次计算得 到的所述当前用户的可调度性发送至所述用户计算模块, 由所述用户计算模 块根据所述队列计算模块第一次计算的所述当前用户的可调度性以及用户 令牌桶中的令牌正负标志, 第二次计算所述当前用户的可调度性; 所述队列 的可调度性包括:表示可调度的可调度性 "1"和表示不可调度的可调度性 "0", 可调度性 "1"的满足条件为:所述队列非空且令牌正负标志为"正";所述当前 用户的可调度性包括: 表示可调度的可调度性 "1 "和表示不可调度的可调度 性" 0"。
14. 根据权利要求 13所述的用户调度装置, 其特征在于, 所述第一次计算的所 述当前用户的可调度性是通过将当前用户所管辖的所有队列的可调度性进 行"或"操作而得到的。
15. 根据权利要求 14所述的用户调度装置, 其特征在于, 所述第二次计算的所 述当前用户的可调度性是通过将第一次计算得到的所述当前用户的可调度 性与所述用户令牌桶中的令牌正负标志进行"与"操作而得到的。
16. 根据权利要求 13所述的用户调度装置, 其特征在于, 所述队列计算模块还 包括用于更新队列信息: 验证所述队列 ID所对应的当前用户所管辖的各个 队列的当前权重; 若判断得到其中所有可调度的队列的当前权重为 "0", 则 将所述当前用户所管辖的所有队列的当前权重更新为预设的配置权重, 所述 配置权重的值为正整数, 所述配置权重的值越高代表该队列的权重越大, 后 续被调度的次数越多; 反之, 若判断得到其中存在有至少一个可调度的队列 的当前权重为 "非 0的自然数", 则对所述当前用户所管辖的所有队列的当前 权重不进行更新。
17. 根据权利要求 16所述的用户调度装置, 其特征在于, 所述用户计算模块还 包括更新用户信息: 将在调度过程中的"调度的用户信息表切换历史"与已存 储的"用户调度出的用户表切换历史"进行比较;若经比较得到所述"调度的用 户信息表切换历史"与已存储的所述"用户调度出的用户表切换历史"不相等, 则将所述当前用户的当前权重更新为预设的配置权重, 所述配置权重的值为 正整数, 所述配置权重的值越高代表该用户的权重越大, 后续被调度的次数 越多; 反之, 若经比较得到所述"调度的用户信息表切换历史"与已存储的所 述"用户调度出的用户表切换历史"相等, 则对所述当前用户的当前权重不作 更新。
18. 根据权利要求 16或 17所述的用户调度装置, 其特征在于, 还包括: 队列调度模块, 与所述队列计算模块和所述用户调度模块连接, 用于根 据接收自所述用户调度模块调度出来的用户 ID 以及所述队列计算模块发送 的所述当前用户所管辖的各个队列的可调度性, 从所述用户 ID所管辖的各 个队列中轮循调度出队列权重为"非 0 的自然数"且可调度性为 "1 "的下一个 队列。
19. 根据权利要求 12所述的用户调度装置, 其特征在于, 所述用户信息表采用 三级位图表架构, 包括由上至下的第一级、 第二级、 以及第三级, 构成的第 一级 *第二级 *第三级为 M bit*N bit*L bit , 其中, 所述第一级包括一个第一 数据片, 所述第一数据片为 M bit, 所述第二级包括 M个第二数据片, 所述 第二数据片为 N bit, 所述第三级包括 M*N个第三数据片, 所述第三数据片 为 L bit, 所述第一数据片中的任一个比特位管辖第二级中的一个第二数据 片, 所述第二数据片中的任一个比特位管辖第三级中的一个第三数据片。
20. 根据权利要求 19所述的用户调度装置, 其特征在于,
在所述三级位图表架构中, 所述第三级中的任一比特位代表它所对应的 一个用户的可调度性, 包括: 表示可调度的可调度性 1和表示不可调度的可 调度性 0; 所述第二级中的任一比特位代表它管辖的第三级中的一个第三数 据片中的所有 L个比特位进行 "或"操作的结果; 所述第一级中的任一比特位 代表它管辖的第二级中一个第二数据片中的所有 N个比特位进行 "与"操作 的结果。 21. 根据权利要求 19所述的用户调度装置, 其特征在于, 所述三级位图表架构 中的第一级、 第二级以及第三级中的比特位数量分别为: 128 bit、 128 bit、 以及 64 bit, 构成第一级 *第二级 *第三级为 128 bit* 128 bit*64 bit的用户信息 表。
PCT/CN2012/086447 2012-12-12 2012-12-12 用户调度方法及其装置 WO2014089779A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201280005075.8A CN103547330B (zh) 2012-12-12 2012-12-12 用户调度方法及其装置
PCT/CN2012/086447 WO2014089779A1 (zh) 2012-12-12 2012-12-12 用户调度方法及其装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2012/086447 WO2014089779A1 (zh) 2012-12-12 2012-12-12 用户调度方法及其装置

Publications (1)

Publication Number Publication Date
WO2014089779A1 true WO2014089779A1 (zh) 2014-06-19

Family

ID=49970063

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/086447 WO2014089779A1 (zh) 2012-12-12 2012-12-12 用户调度方法及其装置

Country Status (2)

Country Link
CN (1) CN103547330B (zh)
WO (1) WO2014089779A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105376177B (zh) * 2015-12-12 2018-07-03 中国航空工业集团公司西安航空计算技术研究所 一种可配置多优先级调度方法
CN107204930B (zh) * 2016-03-17 2020-05-19 深圳市中兴微电子技术有限公司 令牌添加方法及装置

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949748A (zh) * 2006-10-09 2007-04-18 华为数字技术有限公司 一种对多用户进行qos调度的方法和装置
CN101399800A (zh) * 2007-09-27 2009-04-01 中兴通讯股份有限公司 基于正交频分复用***的资源分配信息表示方法
CN102546423A (zh) * 2012-01-20 2012-07-04 福建星网锐捷网络有限公司 队列调度方法、装置及网络设备

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6778546B1 (en) * 2000-02-14 2004-08-17 Cisco Technology, Inc. High-speed hardware implementation of MDRR algorithm over a large number of queues
CN101969409B (zh) * 2010-11-05 2013-05-08 南京邮电大学 一种基于定时器和mdrr的队列调度方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1949748A (zh) * 2006-10-09 2007-04-18 华为数字技术有限公司 一种对多用户进行qos调度的方法和装置
CN101399800A (zh) * 2007-09-27 2009-04-01 中兴通讯股份有限公司 基于正交频分复用***的资源分配信息表示方法
CN102546423A (zh) * 2012-01-20 2012-07-04 福建星网锐捷网络有限公司 队列调度方法、装置及网络设备

Also Published As

Publication number Publication date
CN103547330B (zh) 2016-09-28
CN103547330A (zh) 2014-01-29

Similar Documents

Publication Publication Date Title
US8339949B2 (en) Priority-aware hierarchical communication traffic scheduling
EP2923479B1 (en) Method and apparatus for controlling utilization in a horizontally scaled software application
EP2466824B1 (en) Service scheduling method and device
CN104348750A (zh) OpenFlow网络中QoS的实现方法及装置
WO2008095397A1 (fr) Procédé de planification de trafic et appareil apparenté
CN102387076B (zh) 一种结合整形的分级式队列调度方法
TW200822638A (en) System and methods for determining granularity level of information about buffer status
JP2004534462A (ja) リンク帯域幅割り当て方法および装置
RU2643666C2 (ru) Способ и устройство для управления авторизацией виртуальной очереди вывода, а также компьютерный носитель информации
CN104753809B (zh) 一种流量整形中添加令牌的方法及装置
CN101436987A (zh) QoS服务的调度配置方法和装置
US20150058485A1 (en) Flow scheduling device and method
Yuan et al. Fair round-robin: A low complexity packet schduler with proportional and worst-case fairness
CN102594663A (zh) 队列调度方法及装置
CN105700940B (zh) 一种调度器及调度器的动态复用方法
CN103532873A (zh) 应用于分布式文件***的流量控制策略
WO2017075967A1 (zh) 在线媒体服务的带宽分配方法及***
CN110134531A (zh) 虚拟资产流转数据的处理方法、装置和计算机设备
WO2014089779A1 (zh) 用户调度方法及其装置
CN105577563B (zh) 流量管理方法
CN102333026A (zh) 报文转发方法及装置
CN110247854B (zh) 一种多等级业务调度方法和调度***以及调度控制器
CN113906720B (zh) 流量调度方法、设备及存储介质
CN102769566A (zh) 一种多级调度***配置、变更方法和装置
CN102594670A (zh) 多端口多流的调度方法、装置及设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12890132

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12890132

Country of ref document: EP

Kind code of ref document: A1