CN107483360B - Service flow scheduling method and device - Google Patents

Service flow scheduling method and device Download PDF

Info

Publication number
CN107483360B
CN107483360B CN201610403381.7A CN201610403381A CN107483360B CN 107483360 B CN107483360 B CN 107483360B CN 201610403381 A CN201610403381 A CN 201610403381A CN 107483360 B CN107483360 B CN 107483360B
Authority
CN
China
Prior art keywords
priority
scheduling
port
service flow
adjusting
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201610403381.7A
Other languages
Chinese (zh)
Other versions
CN107483360A (en
Inventor
吴红海
简化
张红卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201610403381.7A priority Critical patent/CN107483360B/en
Priority to PCT/CN2017/087162 priority patent/WO2017211252A1/en
Publication of CN107483360A publication Critical patent/CN107483360A/en
Application granted granted Critical
Publication of CN107483360B publication Critical patent/CN107483360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

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

Abstract

The invention provides a method and a device for scheduling service flows, wherein the method comprises the following steps: determining a port priority of a port of an access device accessing a network; and scheduling the service flow to which the port belongs according to the determined port priority. The invention solves the problem that the traditional QoS can not simultaneously schedule the same service of a plurality of users.

Description

Service flow scheduling method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and an apparatus for scheduling a service flow.
Background
Differentiated Service (Diff-Serv) classifies and controls the Service according to the Service requirement at the edge of the Diff-Serv network domain by defining the Service as a limited class, and sets the Differentiated Service Point (diff.service Code Point, abbreviated as DSCP) of the Service; all nodes in the Diff-Serv domain will obey Per-Hop Behavior (Per Hop Behavior, shortly PHB) according to the packet's DSCP field. Among the numerous Quality of Service (QoS) technologies, IP Diff-Serv is currently the dominant application technology.
However, with the rapid development of network devices, the capacity of a single port is increased, and there are many access users, whereas the traditional QoS is scheduled based on service priority, so when scheduling the same service of multiple users, it is impossible to determine which user's service is invoked first. Therefore, the conventional QoS cannot simultaneously schedule the same service of multiple users.
Disclosure of Invention
The embodiment of the invention provides a service flow scheduling method and a service flow scheduling device, which are used for at least solving the problem that the traditional QoS (quality of service) in the related technology can not simultaneously schedule the same service of a plurality of users.
According to an embodiment of the present invention, a method for scheduling a service flow is provided, including: determining a port priority of a port of an access device accessing a network; and scheduling the service flow to which the port belongs according to the determined port priority.
Optionally, the scheduling, according to the determined port priority, the service flow to which the port belongs includes: determining queue priority of the service flow in a physical queue according to the port priority and the service flow priority of the service flow under the port, wherein the physical queue comprises the service flows of one or more ports; and scheduling the service flow according to the determined queue priority.
Optionally, scheduling the service flow according to the determined queue priority includes: according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority; and scheduling the service flow according to the first adjusting priority.
Optionally, the adjusting the determined queue priority according to the traffic quality priority of the traffic to obtain a first adjusted priority includes: determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority; mapping the first adjustment priority to a physical queue according to the determined first adjustment weight and a first preset adjustment coefficient.
Optionally, scheduling the service flow according to the first adjusted priority includes: under the condition that the speed limit is opened in the outlet direction of the network side port and/or the inlet direction of the user side port, adjusting the first adjustment priority according to a first speed limit value in the outlet direction of the network side port and/or a second speed limit value in the inlet direction of the user side port to obtain a second adjustment priority; and scheduling the service flow according to the second adjustment priority.
Optionally, the first adjustment priority is adjusted according to a first speed limit value of the network-side port and/or a second speed limit value of the user-side port, so as to obtain a second adjustment priority: determining a second adjusting weight for adjusting the first adjusting priority according to a first speed limit value of the network side port and/or a second speed limit value of the user side port and the total bandwidth of the ports; and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second preset adjustment coefficient.
According to another embodiment of the present invention, there is provided a traffic flow scheduling apparatus, including: a determining module, configured to determine a port priority of a port of an access device accessing a network; the scheduling module is used for scheduling the service flow to which the port belongs according to the determined port priority;
optionally, the scheduling module further includes a determining unit, configured to determine a queue priority of the traffic flow in a physical queue according to the port priority and a traffic flow priority of the traffic flow under the port, where the physical queue includes traffic flows to which one or more ports belong; and the scheduling unit is used for scheduling the service flow according to the determined queue priority.
Optionally, the scheduling unit includes an adjusting subunit, configured to adjust the determined queue priority according to a service flow quality priority of a service flow to obtain a first adjustment priority; and the scheduling subunit is used for scheduling the service flow according to the first adjustment priority.
Optionally, the scheduling subunit includes: the adjustment sub-unit is also used for adjusting the first adjustment priority to obtain a second adjustment priority according to a first speed limit value of the output direction of the network-side port and/or a second speed limit value of the input direction of the user-side port under the condition that the output direction of the network-side port and/or the input direction of the user-side port open the speed limit; and the scheduling sub-unit is also used for scheduling the service flow according to the second adjustment priority.
According to still another embodiment of the present invention, there is also provided a storage medium. The storage medium is configured to store program code for performing the steps of: determining a port priority of a port of an access device accessing a network; and scheduling the service flow to which the port belongs according to the determined port priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: the step of scheduling the service flow to which the port belongs according to the determined port priority comprises the following steps: determining queue priority of the service flow in a physical queue according to the port priority and the service flow priority of the service flow under the port, wherein the physical queue comprises the service flows of one or more ports; and scheduling the service flow according to the determined queue priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: scheduling the traffic flow according to the determined queue priority comprises: according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority; and scheduling the service flow according to the first adjusting priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: adjusting the determined queue priority to obtain a first adjustment priority according to the traffic quality priority of the traffic in the following manner: determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority; and mapping the first adjusting priority to a physical queue according to the determined first adjusting weight and a first preset adjusting coefficient.
Optionally, the storage medium is further arranged to store program code for performing the steps of: after scheduling the traffic flow according to the first adjusted priority, further comprising: under the condition that the speed limit is opened in the outlet direction of the network side port and/or the inlet direction of the user side port, adjusting the first adjustment priority according to a first speed limit value in the outlet direction of the network side port and/or a second speed limit value in the inlet direction of the user side port to obtain a second adjustment priority; and scheduling the service flow according to the second adjustment priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: according to the first speed limit value of the network side port and/or the second speed limit value of the user side port, the first adjustment priority is adjusted to obtain a second adjustment priority: determining a second adjusting weight for adjusting the first adjusting priority according to a first speed limit value of the network side port and/or a second speed limit value of the user side port and the total bandwidth of the ports; and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second preset adjustment coefficient.
By the invention, the port priority of the port of the access equipment accessing the network is determined; and scheduling the service flow to which the port belongs according to the determined port priority. Because the port priority of the port of the access equipment accessing the network is determined, that is, the priority of the user corresponding to the port is determined, when a plurality of users exist, the users can be distinguished according to the port priority, and the service of the users can be scheduled according to the port priority. Therefore, the problem that the traditional QoS can not simultaneously schedule the same service of a plurality of users can be solved, and the effect of distinguishing the services of the plurality of users is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a terminal of a service flow scheduling method according to an embodiment of the present invention;
fig. 2 is a flowchart of a traffic flow scheduling method according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a traffic flow scheduling method according to an embodiment of the present invention;
fig. 4 is a preferred schematic diagram of a traffic flow scheduling method according to an embodiment of the present invention;
fig. 5 is a first preferred flowchart of a traffic flow scheduling method according to an embodiment of the present invention;
fig. 6 is a second preferred flowchart of a traffic flow scheduling method according to an embodiment of the present invention;
fig. 7 is a third preferred flow chart of the traffic flow scheduling method according to the embodiment of the present invention;
fig. 8 is a block diagram of a traffic flow scheduling apparatus according to an embodiment of the present invention;
fig. 9 is a block diagram of a scheduling module 84 in a traffic flow scheduling apparatus according to an embodiment of the present invention;
fig. 10 is a block diagram of a scheduling unit 94 in a traffic flow scheduling apparatus according to an embodiment of the present invention;
fig. 11 is a block diagram of a scheduling subunit 104 in a traffic flow scheduling apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Example 1
In the related art, the conventional QoS cannot distinguish a user and a service at the same time, and can only distinguish a plurality of services, that is, the conventional QoS cannot control the traffic of the user, and can only control the traffic of the service according to the priority of the service. The traditional QoS technology is intended to realize simultaneous scheduling of multiple services of multiple users, and can only be realized by upgrading hardware equipment supporting HQoS of the existing network access equipment, that is, a brand new hardware design is adopted, so that the equipment has a control strategy of internal resources, and quality assurance can be provided for high-grade users. However, for the large number of existing devices present in the access network, it is clearly impractical to replace all with HQoS-enabled devices. Thus. The embodiment of the invention provides a method for realizing an HQoS function on the existing equipment, namely, on the basis of the traditional QoS, the method realizes the differentiated scheduling of the same service of multiple users.
The method provided by the first embodiment of the present application may be executed in a terminal, a computer terminal, or a similar computing device. Taking the operation on the terminal as an example, fig. 1 is a hardware structure block diagram of the terminal of the service flow scheduling method according to the embodiment of the present invention. As shown in fig. 1, the terminal 10 can include one or more (only one shown) processors 102 (the processors 102 can include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmitting device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the electronic device. For example, the terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the traffic scheduling method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a network provided by a communication provider of the terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmitting device 106 may be a switching chip for communicating with the internet by wireless.
In this embodiment, a method for scheduling a service flow running on the terminal is provided, and fig. 2 is a flowchart of the method for scheduling a service flow according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, determining the port priority of the port of the access equipment accessing the network; for example, a default Class of Service (CoS for short) of an access device port (e.g., one of the subscriber ports in a Multi-Dwelling Unit (MDU)) may be configured according to the importance of the access user traffic of the access device port (e.g., the CoS of the port is equivalent to the port priority);
and step S204, scheduling the service flow to which the port belongs according to the determined port priority.
Through the steps, the port priority of the port of the access equipment accessing the network is determined, namely the priority of the user corresponding to the port is determined, so that when a plurality of users exist, the users can be distinguished according to the port priority, and the services of the users can be scheduled according to the port priority. Therefore, the problem that the traditional QoS can not simultaneously schedule the same service of a plurality of users can be solved.
Optionally, the scheduling the service flow to which the port belongs according to the determined port priority includes: determining queue priority of the service flow in a physical queue according to the port priority and the service flow priority of the service flow under the port, wherein the physical queue comprises the service flows of one or more ports; and scheduling the service flow according to the determined queue priority. For example, according to the CoS of the service flow from the port and the default CoS of the port, a new CoS mapping (i.e., queue priority) of the service flow is determined in combination with the configured priority-to-priority mapping, and finally, HQoS multi-level scheduling based on the CoS of the user (port) and the CoS of the service flow is achieved.
Through the steps, the port priority (namely the user priority) and the service flow priority are considered, and the scheduling of a plurality of services of a plurality of users can be realized simultaneously. Therefore, a multi-level QoS (HQoS for short) scheduling function can be realized by using the existing network access equipment, so that the problem that the existing network access equipment needs to be upgraded to support the HQoS scheduling function at present and the problem that the existing network access equipment is replaced and new equipment is purchased high cost due to hardware upgrading are solved under the condition that hardware of the existing network access equipment is not upgraded, therefore, the hardware of the existing network equipment can support the HQoS function, and compared with the related technology in which the hardware of the existing network equipment is replaced to support the HQoS function, the embodiment of the invention has the remarkable advantage of low cost. In addition, through the steps, the problem that the network packet impacts a CPU (central processing unit) due to the repartitioning of the physical queue is solved, so that system abnormity or response is slow is solved, and the performance of the existing network equipment is improved to a certain extent.
Optionally, scheduling the service flow according to the determined queue priority includes: according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority; and scheduling the service flow according to the first adjusting priority. Through the steps, the priority of the service flow can be adjusted again through flexibly adjusting the quality priority of the service flow, the first adjustment priority scheduling is obtained, the service flow is scheduled according to the first adjustment priority, the important service flow can be further guaranteed to be scheduled preferentially, and the service quality of the important service flow is guaranteed.
Optionally, adjusting the determined queue priority to obtain the first adjustment priority according to the service flow quality priority of the service flow may be implemented in various ways, for example, by: determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority; mapping the first adjustment priority to a physical queue according to the determined first adjustment weight and a first predetermined adjustment coefficient, but the implementation is not limited thereto.
Optionally, scheduling the traffic flow according to the first adjusted priority may further include: under the condition that the speed is limited by the direction of the network side port and/or the direction of the user side port, the first adjustment priority is adjusted according to a first speed limit value of the direction of the network side port and/or a second speed limit value of the direction of the user side port, so that a second adjustment priority is obtained; and scheduling the service flow according to the second adjustment priority. Through the steps, the service priority can be adjusted again according to the speed limit of the port in practical application, so that the adjusted service flow priority is more in line with the practical situation of the existing equipment, and the effectiveness of service scheduling can be further improved under the condition that the hardware of the existing equipment is not upgraded.
Optionally, the adjusting of the first adjustment priority to obtain the second adjustment priority may be implemented in various ways according to a second speed limit value of an outgoing direction of the network-side port to the first speed limit value and/or an incoming direction of the user-side port, for example, the second adjustment weight for adjusting the first adjustment priority may be determined according to the second speed limit value of an outgoing direction of the network-side port to the first speed limit value and/or an incoming direction of the user-side port to the second speed limit value and the total bandwidth of the ports in the following ways; and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second predetermined adjustment coefficient, but the implementation manner is not limited to this.
According to the above embodiments, it can be seen that, in the embodiments of the present invention, at least three levels of scheduling are provided for the uplink packet, where the first level of scheduling (L1 level scheduling): a default CoS is assigned to each port (for example, set as a), and is used as a basis for calculating a new CoS of a service flow, which is equivalent to that the importance degree of user services connected under the port is different, and then the default CoS and the CoS of the service flow (for example, set as B) are remapped to the new CoS (that is, the first adjustment priority is set as C, for example), as can be seen, the first-level scheduling is implemented by a priority-to-priority mapping algorithm, mainly focuses on the importance degrees of users connected to different ports and the priority of a specific service flow, and can flexibly adjust the weight occupied by the user priority and the service priority according to networking needs; second level scheduling (L2 level scheduling): according to the obtained new CoS (C) and the combination of the service quality priority, adjusting a mapping relation table from the new CoS to a hardware physical queue, and as can be seen, the second-stage scheduling is realized through a mapping algorithm from the priority to the physical queue, mainly paying attention to the service flow quality guarantee, and scheduling the uplink service flow again through flexibly adjusting the mapping from the priority to the physical queue (namely flexibly adjusting the service quality priority), so as to ensure that the important service flow enters the queue which is scheduled first, and ensure the service quality of the important service flow to be guaranteed; and (3) third-level scheduling: and performing some additional pre-scheduling on the output direction of the network side port/the input direction of the user side port to limit the speed to realize the third adjustment of the priority of the service flow, wherein the third adjustment can be flexibly selected, and for example, the third scheduling can be performed on the output direction of the uplink port according to the speed limit of the priority/the queue and a queue scheduling algorithm.
Therefore, based on the above three-time scheduling, it can be seen that in the first-level scheduling, the embodiment of the present invention assigns the user priority (i.e., the port priority) through the user-side port for the first time, i.e., introduces the user priority into the conventional QoS, thereby changing the defect that the conventional QoS can only perform scheduling according to the service priority (service level) but is not sensitive to the user, and implementing HQoS multi-level scheduling which is sensitive to both the user and the service level (service priority). In the first-level scheduling and the second-level scheduling, important services are mapped to the highest physical queue by introducing mapping from priority to priority and mapping algorithm from priority to physical queue, so that other services are not allowed to occupy the queue, and the security problems of equipment paralysis or severe performance reduction and the like caused by the impact of a special protocol message on a CPU are further solved.
It should be noted that the service may be a message, and the service flow is a series of activities of message transmission. In order to help understand the service flow scheduling method, the embodiment of the present invention describes the service flow scheduling method in detail by taking a transmission message as an example, and meanwhile, for convenience of subsequent description, an agreement is made that an uplink message refers to a message sent from a user side to a network side, that is, a message sent from a user side interface of a switch chip to a network side interface of the switch chip and then sent from the network side interface of the switch chip; otherwise, the message is a downlink message.
Fig. 3 is a schematic diagram of a traffic flow scheduling method according to an embodiment of the present invention, fig. 4 is a preferred schematic diagram of a traffic flow scheduling method according to an embodiment of the present invention, fig. 5 is a preferred flowchart of a traffic flow scheduling method according to an embodiment of the present invention, and with reference to the schematic diagrams of fig. 3 and fig. 4, the flow shown in fig. 5 includes the following steps:
step S502, according to the Service networking, a default Class of Service (CoS for short) is assigned to the port of each access device (the function is the priority of the port), that is, the importance of the user Service connected to the port is different, and the default CoS of the port is different. The default CoS value range of the port is 0-7, and in principle, the more important default CoS of the port is higher according to the importance degree of the user or the importance degree of the service opened by the user.
Step S504, according to the service networking, configuring a priority mapping rule (algorithm) suitable for self networking. The priority mapping rule is as follows, and it should be noted that the CoS mapping algorithm can be flexibly adjusted based on different scenarios. In the embodiment of the present invention, an 8-priority model is taken as an example, and a specific queue mapping rule/algorithm may be, but is not limited to, as shown in table 1.
TABLE 1
Figure BDA0001013361900000101
Step S506, according to the service networking, a mapping relation table from the uplink priority suitable for the self networking to the physical queue is configured. The mapping rule from the priority to the physical queue is as follows, and the priority to physical queue mapping algorithm can be flexibly adjusted according to the self needs based on different scenes. Taking 8 queue models as an example, the specific queue mapping rule is as follows: queue 8: the highest queue is reserved for service flows which cannot be influenced by other queues, is used for ensuring that the single board normally operates the message queue of the required interaction class, and does not allow other service messages to occupy, for example, a communication message between a service daughter card and a main control board in MDU equipment can belong to the queue, so that the system cannot influence communication needing top priority guarantee due to other network miscellaneous packets; the mapping rules for priorities 0-7 to physical queues (queues) are shown in Table 2:
TABLE 2
Figure BDA0001013361900000111
Step S508, according to the service networking, if necessary, a speed limit template based on CoS/physical queue may be configured in the user side port ingress/network side port egress. The speed-limiting template can be, but is not limited to, performing speed-limiting processing on a data stream with low priority but large traffic, so as to reduce the influence of the data stream on normal services/core services.
Step S510, according to the service networking requirement, configuring a queue scheduling algorithm for the network side port egress direction, a queue depth, and the like. The queue scheduling algorithm mainly comprises the following steps: SP, WRR, and SP + WRR hybrid scheduling mode.
Step S512, according to the port where the data flow enters, a port configuration table is searched, and the port default priority A configured in the step S502 and the priority B of the data flow are obtained.
Step S514, generating a new data flow priority C according to the uplink packet priority mapping rule/algorithm configured/selected in step S504 and the port default priority a and the data flow priority B acquired in step S512, and modifying the priority of the data flow to C through the ACL rule, which is the first-level (L1) scheduling.
Step S516, according to the data stream priority C generated in step S107, looking up the mapping relationship table from the uplink priority to the queue configured in step S506, and placing the data stream packet into the found physical queue, which is scheduling for the second-level (L2).
Step S518, determining whether the priority/queue is configured with the speed limit template in step S508, if so, continuing to execute step S320, otherwise, executing step S322.
Step S520, if in step S518, the priority/queue after the message mapping has the speed limit template configured in step S508, then the speed limit is executed according to the speed limit template of step S508, which is a third-level (L3) scheduling, and is optional.
Step S522, according to the port direction scheduling algorithm configured in step S510, the speed limit is actually executed according to the speed limit of the port and the queue scheduling algorithm at the uplink port direction, that is, the actual effective module of the above-mentioned several stages of scheduling. The uplink port can selectively add the output speed limit based on the port according to different scenes; and the queue scheduling of the uplink port can support SP, WRR, SP + WRR scheduling algorithms.
Fig. 6 is a second preferred flowchart of a traffic flow scheduling method according to an embodiment of the present invention, as shown in fig. 6, the flowchart includes the following steps:
step S602, extracting and matching the default priority a and the original priority B of the packet at the packet ingress port.
Step S604, finding the priority mapping template applied by the ingress port according to the priority mapping rule/algorithm configured in step S504 shown in fig. 5. If the priority algorithm 1 is found, continuing to step S606; if the priority mapping algorithm 2 is found, continue to step S608; if the priority algorithm N is found, the process continues to step S610. Among them, the priority mapping algorithm may be, but is not limited to, the following examples: it can be abstracted that C ═ x a + y × B, where x and y are the weights of port default priority a and traffic limited B, respectively. The priority mapping algorithm shown in table 1 in step S504 in the first embodiment is C ═ a + B)/2, that is, x ═ y ═ 1/2.
Step S606, according to the priority mapping algorithm number 1 found in step S604, a corresponding priority-to-priority mapping algorithm calculation formula cosToCos _1(a, B) is obtained.
Step S608, according to the priority mapping algorithm number 2 found in step S604, obtaining the corresponding priority-to-priority mapping algorithm calculation formula cosToCos _2(a, B).
Step S610, according to the priority mapping algorithm number N found in step S604, obtaining the corresponding priority-to-priority mapping algorithm calculation formula cosToCos _ N (a, B).
Step S612, according to the mapping algorithm from the priority to the priority found in step 606/608/610, and the port default priority a and the packet original priority B extracted in step S602, calculate to obtain the new priority C of the packet, which is cos tocos (a, B).
And step S614, modifying the priority of the message into the priority C obtained by calculation in the step S612 through the ACL rule configured in advance.
Step S616, obtaining the algorithm number applied by the ingress port according to the mapping rule/algorithm from the uplink packet priority to the physical queue configured in step S506 in the flowchart shown in fig. 5. If the algorithm number is found to be 1, go to step S618; if the searched algorithm number is 2, go to step S620; by analogy, if the searched algorithm number is N, go to step S622. The mapping rule/algorithm of priority to physical queue may be, but is not limited to, the following examples:
and Qc is (m × C + n), where m is the priority weight and n is the compensation coefficient. According to the algorithm illustrated in step S506 in the flowchart shown in fig. 5, the values of m and n are: when c is [0,5], m is 1, n is 1; however, when c is [6,7], m is 1 and n is 0.
Step S618, according to the priority mapping algorithm number 1 found in step S604, obtains the mapping algorithm calculation formula cosToQueue _1(a, B) from the corresponding priority to the physical queue.
Step S620, according to the priority mapping algorithm number 2 found in step S604, obtains the mapping algorithm calculation formula cosToQueue _2(a, B) from the corresponding priority to the physical queue.
Step S622, obtaining the mapping algorithm calculation formula cosToQueue _ N (a, B) from the corresponding priority to the physical queue according to the priority mapping algorithm number N found in step S604.
Step S624, according to the mapping algorithm from the priority found in step S618/S620/S622 to the physical queue and the new priority C of the message obtained by calculation in step S612, calculate to obtain the new priority Qc of the message, which is costoqueue (C).
Step S626, according to the ACL rules configured in advance, puts the packet into the network side port egress queue Qc calculated in step S212, and waits for scheduling.
Fig. 7 is a third preferred flowchart of a traffic flow scheduling method according to an embodiment of the present invention, and as shown in fig. 7, this embodiment illustrates a preferred flowchart of the third-level scheduling shown in fig. 5, where the flowchart includes the following steps:
step S702, according to the new priority C/new physical queue Qc obtained in step S612/step S622, matches the priority or queue speed limit template.
Step S704, judging whether the new priority C/new queue Qc obtained by mapping starts the speed limit according to the speed limit template configured in the step S508, and if the speed limit is started, turning to step S706; otherwise, the speed limit processing is skipped, and the process directly jumps to the step S716.
Step S706, selecting a speed limit template/algorithm matched with the new priority C/new queue Qc according to the speed limit template configured in the step S508, and if the algorithm 1 is selected, going to step S708; if Algorithm 2 is selected, step S710 is followed; if algorithm N is selected, step S712 is followed. The speed limit algorithm based on the priority/physical queue may be, but is not limited to, the following examples:
r ═ rateLimit (C/Qc) ═ α × C × B + β, where α is the priority/queue bandwidth weight coefficient, B is the port total bandwidth, and β is the compensation coefficient.
Step S708, according to the speed limit algorithm number 1 found in step S706, obtaining a corresponding speed limit algorithm calculation formula rateLimit _1 (C/Qc).
Step S710, according to the speed limit algorithm number 2 found in step S706, obtaining a corresponding speed limit algorithm calculation formula rateLimit _2 (C/Qc).
Step S712, according to the speed limit algorithm number N found in step S706, obtaining a corresponding speed limit algorithm calculation formula rateLimit _ N (C/Qc).
Step S714, according to the speed limit algorithm obtained in steps S708 to S712, a speed limit value R is calculated, and the speed limit value R is applied through an ACL rule, and once the hardware detects that the flow of the priority/queue exceeds the speed limit value R, the process goes to step S718, otherwise, the process goes to step S716.
Step S716, the ACL rule configured in advance is used to put the packet into the network side port egress queue Qc calculated in step S624, and the scheduling is waited.
In step S718, for the data flow mapped to the new priority C/queue Qc, if the traffic exceeds the previously configured speed limit value, the data flow exceeding the speed limit portion is discarded.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a service flow scheduling apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and details of which have been already described are omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 8 is a block diagram of a traffic flow scheduling apparatus according to an embodiment of the present invention, and as shown in fig. 8, the apparatus includes:
a determining module 82, configured to determine a port priority of a port of an access device accessing a network;
a scheduling module 84 (having the same function as the above-mentioned port exit scheduling), connected to the above-mentioned determining module 82, for scheduling the traffic flow to which the port belongs according to the determined port priority.
Fig. 9 is a block diagram of a scheduling module 84 in a traffic flow scheduling apparatus according to an embodiment of the present invention, and as shown in fig. 9, the scheduling module 84 includes: the determination unit 92 and the scheduling unit 94 are explained below.
A determining unit 92 (the function of which is the CoS mapping module described above) configured to determine a queue priority of a service flow in a physical queue according to a port priority and a service flow priority of the service flow under the port, where the physical queue includes service flows to which one or more ports belong;
a scheduling unit 94, connected to the determining unit 92, for scheduling the traffic flow according to the determined queue priority.
Fig. 10 is a block diagram of a structure of a scheduling unit 94 in a traffic flow scheduling apparatus according to an embodiment of the present invention, and as shown in fig. 10, the scheduling unit 94 includes: the adjusting subunit 102 and the scheduling subunit 104 are explained below.
An adjusting subunit 102, configured to adjust the determined queue priority according to a service flow quality priority of the service flow to obtain a first adjustment priority;
a scheduling subunit 104, connected to the adjusting subunit 102, configured to schedule the service flow according to the first adjusted priority.
Fig. 11 is a block diagram of a scheduling subunit 104 in a traffic flow scheduling apparatus according to an embodiment of the present invention, and as shown in fig. 11, the scheduling subunit 104 includes: the tuning subunit 112 and the scheduling subunit 114 are described separately below.
An adjustment sub-unit 112 (having the same function as the flow rate limiting module described above) configured to, under the condition that the speed is limited by the direction of the network-side port and/or the direction of the user-side port, adjust the first adjustment priority according to a first speed limit value of the direction of the network-side port and/or a second speed limit value of the direction of the user-side port, so as to obtain a second adjustment priority;
a scheduling subunit 114, connected to the adjusting subunit 112, for scheduling the traffic flow according to the second adjusting priority.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, determining the port priority of the port of the access device accessing the network;
and S2, scheduling the service flow to which the port belongs according to the determined port priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, determining queue priority of service flow in physical queue according to port priority and service flow priority of service flow under port, wherein the physical queue includes service flow to which one or more ports belong;
and S2, scheduling the service flow according to the determined queue priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of: scheduling the traffic flow according to the determined queue priority comprises:
s1, according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority;
and S2, scheduling the service flow according to the first adjusting priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, adjusting the determined queue priority according to the traffic quality priority of the traffic to obtain a first adjusted priority includes: determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority; mapping the first adjustment priority to a physical queue according to the determined first adjustment weight and a first preset adjustment coefficient.
Optionally, the storage medium is further arranged to store program code for performing the steps of: scheduling the traffic flow according to the first adjusted priority comprises:
s1, under the condition that the speed is limited by the direction of the network side port and/or the direction of the user side port, the first adjustment priority is adjusted according to the first speed limit value of the direction of the network side port and/or the second speed limit value of the direction of the user side port to obtain a second adjustment priority;
and S2, scheduling the service flow according to the second adjusting priority.
Optionally, the storage medium is further arranged to store program code for performing the steps of:
s1, according to the first speed limit value of the network side port and/or the second speed limit value of the user side port, adjusting the first adjusting priority to obtain a second adjusting priority: determining a second adjusting weight for adjusting the first adjusting priority according to a first speed limit value of the network side port and/or a second speed limit value of the user side port and the total bandwidth of the port; and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second preset adjustment coefficient.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: determining a port priority of a port of an access device accessing a network; and scheduling the service flow to which the port belongs according to the determined port priority.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: the service flow of the port is scheduled according to the determined port priority comprises the following steps: determining queue priority of the service flow in a physical queue according to the port priority and the service flow priority of the service flow under the port, wherein the physical queue comprises the service flows of one or more ports; and scheduling the service flow according to the determined queue priority.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: scheduling the traffic flow according to the determined queue priority comprises: according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority; and scheduling the service flow according to the first adjusting priority.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: adjusting the determined queue priority to obtain a first adjustment priority according to the traffic quality priority of the traffic in the following manner: determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority; and mapping the first adjusting priority to a physical queue according to the determined first adjusting weight and a first preset adjusting coefficient.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: scheduling the traffic flow according to the first adjusted priority comprises: under the condition that the speed is limited by the direction of the network side port and/or the direction of the user side port, the first adjustment priority is adjusted according to a first speed limit value of the direction of the network side port and/or a second speed limit value of the direction of the user side port, so that a second adjustment priority is obtained; and scheduling the service flow according to the second adjustment priority.
Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium: according to the first speed limit value of the network side port and/or the second speed limit value of the user side port, the first adjustment priority is adjusted to obtain a second adjustment priority: determining a second adjusting weight for adjusting the first adjusting priority according to a first speed limit value of the network side port and/or a second speed limit value of the user side port and the total bandwidth of the port; and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second preset adjustment coefficient.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A method for scheduling traffic flow, comprising:
determining a port priority of a port of an access device accessing a network;
determining queue priority of the service flow in a physical queue according to the port priority and the service flow priority of the service flow under the port, wherein the physical queue comprises the service flows of one or more ports;
and scheduling the service flow according to the determined queue priority.
2. The method of claim 1, wherein scheduling the traffic flow according to the determined queue priority comprises:
according to the service flow quality priority of the service flow, adjusting the determined queue priority to obtain a first adjustment priority;
and scheduling the service flow according to the first adjusting priority.
3. The method of claim 2, wherein adjusting the determined queue priority to obtain a first adjusted priority based on a traffic quality priority of a traffic flow comprises:
determining a first adjusting weight for adjusting the first adjusting priority according to the service flow quality priority;
and mapping the first adjusting priority to a physical queue according to the determined first adjusting weight and a first preset adjusting coefficient.
4. The method of claim 2, wherein scheduling the traffic flow according to the first adjusted priority comprises:
under the condition that the speed limit is opened in the outlet direction of a network side port and/or the inlet direction of a user side port, adjusting the first adjustment priority according to a first speed limit value of the outlet direction of the network side port and/or a second speed limit value of the inlet direction of the user side port to obtain a second adjustment priority;
and scheduling the service flow according to the second adjustment priority.
5. The method according to claim 4, characterized in that the first adjustment priority is adjusted to obtain a second adjustment priority according to a first speed limit value of the network-side port and/or a second speed limit value of the user-side port, by:
determining a second adjusting weight for adjusting the first adjusting priority according to a first speed limit value of the network side port and/or a second speed limit value of the user side port and the total bandwidth of the ports;
and adjusting the first adjustment priority to obtain a second adjustment priority according to the determined second adjustment weight and a second preset adjustment coefficient.
6. A traffic flow scheduling apparatus, comprising:
a determining module, configured to determine a port priority of a port of an access device accessing a network;
the scheduling module is used for scheduling the service flow to which the port belongs according to the determined port priority; the scheduling module further comprises:
a determining unit, configured to determine a queue priority of a service flow in a physical queue according to the port priority and a service flow priority of the service flow under the port, where the physical queue includes service flows to which one or more ports belong;
and the scheduling unit is used for scheduling the service flow according to the determined queue priority.
7. The apparatus of claim 6, wherein the scheduling unit comprises:
the adjusting subunit is configured to adjust the determined queue priority according to a service flow quality priority of a service flow to obtain a first adjustment priority;
and the scheduling subunit is used for scheduling the service flow according to the first adjustment priority.
8. The apparatus of claim 7, wherein the scheduling subunit further comprises:
the adjustment sub-unit is also used for adjusting the first adjustment priority to obtain a second adjustment priority according to a first speed limit value of the output direction of the network-side port and/or a second speed limit value of the input direction of the user-side port under the condition that the output direction of the network-side port and/or the input direction of the user-side port open the speed limit;
and the scheduling subunit is further used for scheduling the service flow according to the second adjustment priority.
CN201610403381.7A 2016-06-08 2016-06-08 Service flow scheduling method and device Active CN107483360B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610403381.7A CN107483360B (en) 2016-06-08 2016-06-08 Service flow scheduling method and device
PCT/CN2017/087162 WO2017211252A1 (en) 2016-06-08 2017-06-05 Service flow scheduling method, device, apparatus, and data storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610403381.7A CN107483360B (en) 2016-06-08 2016-06-08 Service flow scheduling method and device

Publications (2)

Publication Number Publication Date
CN107483360A CN107483360A (en) 2017-12-15
CN107483360B true CN107483360B (en) 2022-05-13

Family

ID=60578414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610403381.7A Active CN107483360B (en) 2016-06-08 2016-06-08 Service flow scheduling method and device

Country Status (2)

Country Link
CN (1) CN107483360B (en)
WO (1) WO2017211252A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114866430A (en) * 2022-03-29 2022-08-05 北京智芯微电子科技有限公司 Calculation force prediction method for edge calculation, calculation force arrangement method and system
CN114428693A (en) * 2022-03-31 2022-05-03 季华实验室 Method and device for adjusting message priority, electronic equipment and storage medium
CN115086245B (en) * 2022-06-29 2023-10-03 北京物芯科技有限责任公司 TSN message scheduling method, switch, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410584A (en) * 2014-12-16 2015-03-11 上海斐讯数据通信技术有限公司 QoS queue level scheduling method

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003244222A (en) * 2002-02-18 2003-08-29 Sony Corp Communication controller, communication control system and method and computer program
JP4701152B2 (en) * 2006-10-20 2011-06-15 富士通株式会社 Data relay apparatus, data relay method, and data relay program
CN101179503B (en) * 2007-12-14 2011-07-20 华为技术有限公司 QoS implementing method and apparatus in wireless access network
CN101841456B (en) * 2009-03-18 2012-07-25 中国电信股份有限公司 Method and system for implementing service application division
CN102055643B (en) * 2009-11-03 2015-05-20 中兴通讯股份有限公司 Allocation method for downlink priority scheduling, and downlink priority scheduling method and device
CN101771733B (en) * 2010-01-18 2013-11-20 中国联合网络通信集团有限公司 Method and device for address conversion
JP2012120021A (en) * 2010-12-02 2012-06-21 Nec Corp Search system, portable terminal and search method
CN102811159B (en) * 2011-06-03 2017-07-18 中兴通讯股份有限公司 The dispatching method and device of a kind of uplink service
WO2012162994A1 (en) * 2011-09-30 2012-12-06 华为技术有限公司 Method and device for performing policy control on data packet
CN102332950A (en) * 2011-10-26 2012-01-25 中国电子科技集团公司第五十四研究所 Method for limiting speed and scheduling priority based on network port in satellite internet protocol (IP) network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410584A (en) * 2014-12-16 2015-03-11 上海斐讯数据通信技术有限公司 QoS queue level scheduling method

Also Published As

Publication number Publication date
CN107483360A (en) 2017-12-15
WO2017211252A1 (en) 2017-12-14

Similar Documents

Publication Publication Date Title
US10659563B2 (en) Bandwidth reservation for authenticated applications
US8797867B1 (en) Generating and enforcing a holistic quality of service policy in a network
KR100608904B1 (en) System and method for providing quality of service in ip network
US11677643B2 (en) Traffic classification of elephant and mice data flows in managing data networks
CN106453138B (en) Message processing method and device
US8937945B2 (en) Method and apparatus for optimizing usage of ternary content addressable memory (TCAM)
JP2002044150A (en) Packet processor with multi-level policing logic
EP2362589B1 (en) Priority and source aware packet memory reservation and flow control
CN107483360B (en) Service flow scheduling method and device
US11929911B2 (en) Shaping outgoing traffic of network packets in a network management system
US11777857B2 (en) Service forwarding method and network device
CN104219165A (en) Business bandwidth control method and apparatus
CN108243506B (en) L TE system service scheduling method and device
CN109039791B (en) Bandwidth management method and device and computer equipment
EP1978682B9 (en) QoS CONTROL METHOD AND SYSTEM
CN116582493A (en) Data center network link selection method and device and electronic equipment
Cisco MPLS QoS Multi-VC Mode for PA-A3
Kassim et al. Adaptive Policing Algorithms on inbound internet traffic using Generalized Pareto model
WO2023124660A1 (en) Message scheduling method, apparatus, electronic device, and storage medium
US20240064555A1 (en) Lan-aware quality of service orchestration
CN117941409A (en) Method for transmitting uplink data packet and communication device
CN117675711A (en) Link congestion scheduling method, device, equipment, medium and program
CN115297064A (en) Elastic bandwidth regulation and control method, storage medium and terminal
CN113709891A (en) Method for processing flow and AP
CN115603922A (en) Security defense method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant