WO2023274006A1 - 一种网络设备的主动队列管理方法及网络设备 - Google Patents

一种网络设备的主动队列管理方法及网络设备 Download PDF

Info

Publication number
WO2023274006A1
WO2023274006A1 PCT/CN2022/100657 CN2022100657W WO2023274006A1 WO 2023274006 A1 WO2023274006 A1 WO 2023274006A1 CN 2022100657 W CN2022100657 W CN 2022100657W WO 2023274006 A1 WO2023274006 A1 WO 2023274006A1
Authority
WO
WIPO (PCT)
Prior art keywords
network device
sending
queue
value
decision result
Prior art date
Application number
PCT/CN2022/100657
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 EP22831822.6A priority Critical patent/EP4344153A4/en
Publication of WO2023274006A1 publication Critical patent/WO2023274006A1/zh
Priority to US18/397,708 priority patent/US20240137327A1/en

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/6215Individual queue per QOS, rate or priority
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/26Flow control; Congestion control using explicit feedback to the source, e.g. choke packets
    • H04L47/263Rate modification at the source after receiving feedback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/27Evaluation or update of window size, e.g. using information derived from acknowledged [ACK] packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/33Flow control; Congestion control using forward notification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/52Queue scheduling by attributing bandwidth to queues
    • H04L47/527Quantum based scheduling, e.g. credit or deficit based scheduling or token bank

Definitions

  • the present application relates to the field of data transmission, in particular to an active queue management method for network equipment and network equipment.
  • the active queue management algorithm notifies the source end of the congestion situation implicitly or explicitly by discarding or marking data packets in the queue of network devices (such as routers, switches, etc.), and the source end reduces the data accordingly.
  • random early detection (RED) and explicit congestion notification (ECN) are AQM widely used in network equipment, which are used to cooperate with the congestion control protocol of the transport layer to improve throughput and reduce delay .
  • the basic principle of RED/ECN is that the switch calculates a probability p according to its current queue depth, and marks the passing packets according to the probability p.
  • the calculation method of the probability p is shown in the following formula (1), where K min , K max , and P max are parameters such as the lower limit of the probability, the upper limit of the probability, and the preset probability value. From this formula, it can be concluded that when the queue depth q is Between K min and K max , the marking probability p increases linearly with the queue depth q.
  • RED/ECN can only provide a "single-bit" signal, that is, “congested” or “not congested” (in some application scenarios, different levels of “congestion” can be provided), and the sender can only design the window of the sender based on this signal Adjust the algorithm.
  • This type of algorithm makes decisions at the sending end, and there is a common characteristic: when the number of flows on the bottleneck port on the switch (here, a flow is defined as an object controlled by an instance of a congestion control protocol, for example, transmission control protocol (transmission control protocol) , TCP) increases, the average queue depth on the bottleneck port also increases, which in turn increases the queuing delay.
  • TCP transmission control protocol
  • RED/ECN marks messages according to the queue, it means that it must respond after the congestion occurs, but cannot be controlled before the congestion occurs.
  • the embodiment of the present application provides an active queue management method of a network device and a network device, which are used to propose a new AQM algorithm to realize the decoupling of the queue depth on the network device and the flow number on the bottleneck link, so that the network device
  • the queue depth on is customizable.
  • the embodiment of the present application firstly provides an active queue management method of a network device, which can be used in the field of data transmission.
  • Forwarding capability wherein the idle forwarding capability is used to represent the difference between the upper limit of the forwarded data volume of the target output queue (one or more) or the target output port (one or more) on the network device and the current actual forwarding amount , which can specifically represent the upper limit of the forwarded data volume of the target outbound queue (one or more) or the target outbound port (one or more) on the network device within a certain preset time period (for example, 200us) and the current actual forwarding volume
  • the difference between the preset duration can be set by yourself.
  • the network device is any device on the path between the sending end device and the receiving end device (including the sending end device and the receiving end device).
  • the network device will also obtain a message carrying an adjustment request, which can be called the first message, and the adjustment request can be It is a window adjustment request, and may also be a rate adjustment request, wherein the window adjustment request is used to instruct to adjust the sending window of the sending device, and the rate adjustment request is used to instruct to adjust the sending rate of the sending device.
  • the network device After the network device obtains the first message, it first judges whether the first message has a preset flag, and if the network device determines that the first message does not have a preset flag, the network device A decision result is obtained from the value of the idle forwarding capability and the value of the adjustment request, and the decision result is carried in the first message to obtain a second message. Specifically, the network device obtains the decision result by comparing the value of the idle forwarding capability with the value of the adjustment request. Therefore, the unit of the value of the idle forwarding capability and the value of the adjustment request need to be If not, the network device needs to convert the two units so that the two units are consistent.
  • the sending end device performs the step of "obtaining the first message carrying the adjustment request", that is, the first message is sent by
  • the sending end device generates by itself (the first message generated at this time is an initial message without a preset flag), and the sending end device carries the adjustment request in the first message, and the sending end device then according to The value of the adjustment request and the obtained value of the idle forwarding capability are used to obtain a decision result, and then the decision result is carried in the first message to obtain a second message, so that the second message can be forwarded to the next-hop device send.
  • the sending end device does not perform the step of "obtaining the first message carrying the adjustment request", that is, the sending end device may not carry the adjustment request in the first message (the first message generated at this time is The initial message does not have a preset flag), but after calculating the value of the idle forwarding capability, the decision result is obtained directly according to the value of the adjustment request and the obtained value of the idle forwarding capability, and then the decision result is carried in the In the first packet, the second packet is obtained, so that the second packet can be sent to the next-hop device subsequently.
  • the above embodiments of the present application propose a new AQM algorithm to decouple the queue depth on the network device from the flow number on the bottleneck link, so that the queue depth on the network device can be customized.
  • the network device compares the value of the idle forwarding capability with the value of the adjustment request (the value of the adjustment request can be Indicates) to determine the value of the idle forwarding capability ⁇ the value II of the adjustment request, in this case, the decision result obtained by the network device is "grant", and the grant information is taken as the decision result, and the grant information is used to represent the permission to send
  • the end device increases the sending window or sending rate.
  • the first message does not have a preset flag
  • the network device determines that the value of the idle forwarding capability is ⁇ by comparing the value of the idle forwarding capability with the value II of the adjustment request
  • the decision result determined by the network device is grant information, which can Achievement.
  • the speed increasing/decreasing value needs to be calculated on the network device, it is difficult to obtain it in the network device.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability and the value II of the adjustment request, and only need to perform a simple comparison operation to obtain the corresponding decision results, so it is easy to use in high-speed network equipment realized.
  • the network device when the first packet does not have a preset flag, and the network device compares the value of the idle forwarding capability with the value II of the adjustment request, it determines that 0 ⁇ idle forwarding capability value ⁇ the value II of the adjustment request, in this case, the network device marks the first packet according to the preset probability, specifically, the way the network device marks the first packet according to the preset probability
  • the first message can be marked according to the preset fixed probability p, or the dynamic probability p' of the current round can be calculated after each determination of 0 ⁇ the value of idle forwarding capability ⁇ the value II of the adjustment request , and then mark the first packet with the dynamic probability p', which is not limited in this application.
  • marking the first message according to the preset probability will have the following two results. The results are different, and the decision results obtained by the network device are also different.
  • the network device marks the first packet with the mark information of the preset mark as the decision result, that is, the decision result obtained by the network device is "mark", and the mark The information is used to indicate that the sending end device is allowed to reduce the sending window or sending rate.
  • the first packet does not have a preset flag
  • the network device determines that 0 ⁇ idle forwarding capability by comparing the value of the idle forwarding capability with the value II of the adjustment request
  • the network device can further increase the value of the deficit counter (deficit counter, DC) corresponding to the idle forwarding capability by a target preset value (expressed by ⁇ ) as a new deficit counter
  • the network device needs to mark the first message according to the preset probability.
  • the decision result determined by the network device is the marking information, which achieves different decision results when different conditions are met, and has flexibility.
  • the speed increasing/decreasing value needs to be calculated on the network device, it is difficult to obtain it in the network device.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability, the size relationship between DC and II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network equipment .
  • the network device when the first message is not marked with the preset mark with a preset probability by the network device, the network device further compares the deficit counter corresponding to the idle forwarding capability The size between the value DC of the adjustment request and the value II of the adjustment request (the premise is that the units of the two are consistent), and then a specific decision result is obtained based on the comparison result. It should also be noted here that the decision result obtained by the network device is different when the comparison result is different.
  • the decision result obtained by the network device is is "grant", which means grant information is taken as the result of the decision, and the grant information is used to indicate that the sending end device is allowed to increase the sending window or sending rate.
  • the network device needs to mark the first packet according to the preset probability.
  • the network device if the first message is not marked with a preset message, it is necessary to further compare the value between the value DC of the deficit counter and the value II of the adjustment request, and if the value DC of the deficit counter ⁇ the value of the adjustment request
  • the decision result determined by the network device is grant information, so that different decision results can be obtained when different conditions are met, and it has flexibility.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability, the size relationship between DC and II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network equipment .
  • the network device determines that the first packet is not marked with the preset mark, and the value DC of the deficit counter corresponding to the idle forwarding capability ⁇ the value II of the adjustment request. Then the decision result obtained by the network device is "deny", that is, the rejection information is taken as the decision result, and the rejection information is used to indicate that the sending end device is not allowed to adjust the sending window or sending rate.
  • the decision result determined by the network device is Rejecting information enables different decision-making results to be obtained when different conditions are met, which is flexible.
  • the speed increasing/decreasing value needs to be calculated on the network device, it is difficult to obtain it in the network device.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability, the size relationship between DC and II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network equipment .
  • the network device determines the value of the idle forwarding capability by comparing the value of the idle forwarding capability with the value II of the adjustment request ⁇ 0, in this case, the network device marks the first packet with the preset mark, and marks the first packet with the mark information of the preset mark as a decision result, that is, the network device obtains The decision result is "flag", and the flag information is used to indicate that the sending end device is allowed to reduce the sending window or sending rate.
  • the network device marks the first message and determines that the decision result is Marking information enables different decision-making results to be obtained when different conditions are met, which is flexible.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability and the size relationship of II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network equipment.
  • the network device after the network device acquires the first message, if it is determined whether the first message has a preset mark, then the network device marks the first packet with the mark information of the preset mark as the decision result, that is, the decision result obtained by the network device is "mark", and the mark information is used to indicate that the sender is allowed to The device reduces the send window or send rate.
  • the network device does not need to compare the value of the idle forwarding capability with the value of the adjustment request, but directly determines the flag information as the decision result, It achieves different decision-making results when different conditions are met, and has flexibility.
  • the process for the network device to calculate the idle forwarding capability of the target out-of-queue or target-out port on the network device may be specifically: Or the upper limit of the forwarded data volume of the target output port (it can be expressed by B* ⁇ , B is the link bandwidth or link rate, which is not limited here) and the data that passes through the target output queue or the target output port within the preset time length ⁇
  • the total amount of data (represented by TxSize) calculates the value of a credit counter (credit counter, CC), wherein the value of the credit counter (represented by CC) is used to represent the size of the idle forwarding capability.
  • one way for the network device to calculate the idle forwarding capability of the target output queue or target output port on the network device is to calculate the target output queue or target output port on the network device based on two parameters.
  • the idle forwarding capability of the egress port involves few parameters and is easy to implement.
  • the process for the network device to calculate the idle forwarding capability of the target outbound queue or the target outbound port on the network device may specifically be: The upper limit of the amount of forwarded data B* ⁇ of the queue or the target output port, the total amount of data TxSize passing through the target output queue or the target output port within the preset time length ⁇ , and the value of the current output queue depth calculation letter of credit counter, wherein, The current output queue depth is the depth of the target output queue or the depth of the output queue corresponding to the target output port, which can be represented by q.
  • q may refer to the sum of all current queue depths, or the one with the largest current queue depth, or the current value greater than a preset threshold.
  • Dequeue depth value one or more
  • this application does not limit the meaning of q.
  • q in the following embodiments represents the sum of the current out-of-queue depths, and details will not be described later.
  • one way for the network device to calculate the idle forwarding capability of the target output queue or target output port on the network device is to calculate the target output queue or target output port on the network device based on three parameters.
  • the idle forwarding capability of the outgoing port improves the accuracy of calculating the value of the letter of credit counter.
  • the process for the network device to calculate the idle forwarding capability of the target out-of-queue or target-out port on the network device may also be specifically: Or the upper limit of the amount of forwarded data of the target output port B* ⁇ , the total amount of data TxSize passing through the target output queue or the target output port within the preset time period ⁇ , the current output queue depth q, and the preset queue depth (can be expressed by Q t ) Calculate the value of the letter of credit counter.
  • the preset queue depth Q t is a user-defined value, for example, Q t can take specific values such as 0KB, 10KB, 20KB, etc. according to actual needs.
  • the preset queue depth Q t when the preset queue depth Q t is set to 0KB, it means that the queue depth of the target outbound queue or the outbound queue depth corresponding to the target outbound port needs to be maintained at 0, so that an extremely low queuing delay can be achieved.
  • one way for the network device to calculate the idle forwarding capability of the target output queue or target output port on the network device is to calculate the target output queue or target output port on the network device based on four parameters.
  • the idle forwarding capability of the outgoing port which additionally introduces the preset queue depth Q t , so that the outgoing queue depth on the network device can be controlled at the specified depth value, reducing the queuing delay.
  • the network device passes the target out-of-queue or target out-port within the preset time length ⁇ according to the upper limit B* ⁇ of forwarded data volume of the target out-of-queue or target out-port
  • the specific implementation of the total amount of data TxSize, the current out-of-queue depth q, and the preset queue depth Q t to calculate the value of the letter of credit counter CC can be as follows: first, the network device outputs the target out of the queue or the target out-port within the preset time length ⁇ Subtract TxSize from the upper limit of the amount of forwarded data B* ⁇ and the total amount of data passing through the target out-queue or target out-port within the preset time length ⁇ to obtain the first subtraction result, and then compare the first subtraction result with the preset queue depth Q t is added to obtain the addition result, and the addition result is subtracted from the sum q of the current queue depth (in some embodiments, it can also be the maximum
  • the algorithm has low complexity and does not involve multiple multiplication and division operations, thereby reducing storage overhead.
  • the network device passes the target out-of-queue or target out-port within the preset time length ⁇ according to the upper limit B* ⁇ of forwarded data volume of the target out-of-queue or target out-port
  • the specific implementation of the total amount of data TxSize, the current out-of-queue depth q, and the preset queue depth Q t to calculate the value of the letter of credit counter CC can be as follows: first, the network device outputs the target out of the queue or the target out-port within the preset time length ⁇ Subtract TxSize from the upper limit of the amount of forwarded data B* ⁇ and the total amount of data passing through the target out-queue or target out-port within the preset time length ⁇ to obtain the first subtraction result, and then compare the first subtraction result with the preset queue depth Q t is added to obtain the addition result, and the addition result is subtracted from the sum q of the current queue depth (in some embodiments, it can also be the maximum
  • the network device if the network device is not the receiving end device, it means that the network device is not the last hop device on the transmission path. Therefore, the network device can further obtain the second The packet (that is, the first packet carrying the decision result) is sent to the next-hop device.
  • the receiving end device will parse the second message after receiving the second message sent by the network device. text, and carry the decision result in the confirmation message and send it to the sending device (the path that the receiving device returns the confirmation message to the sending device must be the original path), and the confirmation message is used to instruct the sending device Adjust the sending window (when the adjustment request is a window adjustment request) or the sending rate (when the adjustment request is a rate adjustment request) of the sending end device according to the decision result carried therein.
  • the sending device can adjust the sending window or sending rate based on the final decision result, which is flexible.
  • the network device is the receiving end device
  • the second message after that, the second message is analyzed, the decision result obtained by the analysis is carried in the confirmation message, and the confirmation message is sent to the sending end device, and the confirmation message is used to indicate the sending end
  • the device adjusts the sending window (when the adjustment request is a window adjustment request) or the sending rate (when the adjustment request is a rate adjustment request) of the sending end device according to the decision result carried therein.
  • the receiving end device does not perform the step of "carrying the decision result in the first message to obtain the second message", but when the receiving end device determines that the first message does not have a preset flag, the receiving end device The device obtains the decision result according to the idle forwarding capability and the adjustment request.
  • the decision result is not carried in the first packet, but is directly carried in the confirmation packet, and the confirmation packet is sent to the sending end device, and the confirmation packet is It is used to instruct the sending end device to adjust the sending window (when the adjustment request is a window adjustment request) or sending rate (when the adjustment request is a rate adjustment request) of the sending end device according to the decision result carried therein.
  • the current network device is the receiving end device
  • how the receiving end device processes the decision result is specifically explained, which has selectivity and wide applicability.
  • the confirmation message is specifically used to instruct the sending end device to reduce the sending window or sending rate of the sending end device according to the decision result, wherein, reducing The magnitude of is obtained according to the target preset value ⁇ .
  • the sending window or sending rate of the sending device can be reduced by ⁇ on the original basis, or the sending window or sending rate of the sending device can be reduced by k on the original basis. 1 * ⁇ , where k 1 is a user-defined parameter, and k 1 >0.
  • the decision results carried in the confirmation message are different, and the ways for the sending end device to adjust the sending window and sending rate based on the confirmation message are also different.
  • the adjustment logic is simple and easy to implement, and has optional sex.
  • the confirmation message is specifically used to instruct the sending end device to increase the sending window or sending rate of the sending end device according to the decision result, where increasing The magnitude of is obtained according to the value II of the adjustment request.
  • the sending window or sending rate of the sending device can be increased by II on the original basis, or the sending window or sending rate of the sending device can be increased by k on the original basis. 2 *II, wherein, k 2 is a user-defined parameter, and k 2 >0.
  • the decision results carried in the confirmation message are different, and the ways for the sending end device to adjust the sending window and sending rate based on the confirmation message are also different.
  • the adjustment logic is simple and easy to implement, and has optional sex.
  • the confirmation message is specifically used to instruct the sending end device not to increase or decrease (that is, not adjust) the sending end device according to the decision result. Send window or send rate.
  • the decision results carried in the confirmation message are different, and the ways for the sending end device to adjust the sending window and sending rate based on the confirmation message are also different.
  • the adjustment logic is simple and easy to implement, and has optional sex.
  • a second aspect of the embodiments of the present application provides a network device, where the network device has a function of implementing the first aspect or the method of any possible implementation manner of the first aspect.
  • This function may be implemented by hardware, or may be implemented by executing corresponding software on the hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the third aspect of the embodiment of the present application provides a network device, which may include a memory, a processor, and a bus system, wherein the memory is used to store a program, and the processor is used to call the program stored in the memory to execute the first aspect of the embodiment of the present application Or any one of the possible implementation methods of the first aspect.
  • the fourth aspect of the embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores instructions, and when it is run on a computer, the computer can execute any one of the above-mentioned first aspect or the first aspect. method of possible implementation.
  • the fifth aspect of the embodiments of the present application provides a computer program, which, when running on a computer, causes the computer to execute the method of the above-mentioned first aspect or any possible implementation manner of the first aspect.
  • the sixth aspect of the embodiment of the present application provides a chip, the chip includes at least one processor and at least one interface circuit, the interface circuit is coupled to the processor, the at least one interface circuit is used to perform the function of sending and receiving, and send instructions to At least one processor, at least one processor is used to run computer programs or instructions, which has the function of realizing the method of the above-mentioned first aspect or any possible implementation manner of the first aspect, and this function can be realized by hardware or by software Realization can also be achieved through a combination of hardware and software, where the hardware or software includes one or more modules corresponding to the above functions.
  • the interface circuit is used to communicate with other modules outside the chip.
  • Fig. 1 is a schematic diagram of the relationship between the outgoing port and the outgoing queue on the network device provided by the embodiment of the present application;
  • Fig. 2 is a schematic diagram of the system architecture provided by the embodiment of the present application.
  • FIG. 3 is another schematic diagram of the system architecture provided by the embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an active queue management method for a network device provided in an embodiment of the present application
  • FIG. 5 is another schematic flowchart of an active queue management method for a network device provided in an embodiment of the present application
  • FIG. 6 is a schematic flow diagram of a sending device adjusting a sending window or a sending rate according to a decision result provided by an embodiment of the present application
  • FIG. 7 is a schematic diagram of a framework for realizing the slow start algorithm by using the active queue management method of the network device provided by the embodiment of the present application;
  • FIG. 8 is a schematic diagram of a framework for implementing the AIMD algorithm by utilizing the active queue management method of the network device provided by the embodiment of the present application;
  • Fig. 9 is a schematic diagram of the effect comparison between the method of the present application and the existing method provided by the embodiment of the present application;
  • FIG. 10 is a schematic structural diagram of a network device provided by an embodiment of the present application.
  • FIG. 11 is another schematic structural diagram of a network device provided by an embodiment of the present application.
  • the embodiment of the present application provides an active queue management method of a network device and a network device, which are used to propose a new AQM algorithm to realize the decoupling of the queue depth on the network device and the flow number on the bottleneck link, so that the network device
  • the queue depth on is customizable.
  • Network devices and components are physical entities connected to a network. There are many types of network devices and they are increasing day by day.
  • Basic network devices are: computers (whether they are PCs or servers), hubs, switches, bridges, routers, gateways, network interface cards (NICs), wireless access points (WAPs), printers and modems, fiber optic transceivers , optical cable, etc.
  • NICs network interface cards
  • WAPs wireless access points
  • printers and modems fiber optic transceivers , optical cable, etc.
  • Network equipment includes repeaters, bridges, routers, gateways, firewalls, switches and other equipment.
  • the network device can also be terminal devices such as mobile phones, smart bracelets, and smart watches.
  • the network device can specifically be Any device on the path between the sending end device and the receiving end device (including the sending end device and the receiving end device).
  • the queue exit is the traditionally described queue exit; when there is only one queue type on the network device , then this type of queue is the out-queue described in this application (that is, the network device must have an out-queue, but may not have an in-queue). It should be noted that on a network device, there can be one or more queues.
  • One outbound port can correspond to one outbound queue, or there can be multiple outbound queues.
  • Each outbound port corresponds to an outbound queue.
  • the number of queues may be the same or different, which is not limited in this application.
  • a network device such as a switch
  • a certain port is an egress port, but it is also an ingress port for the quantity flow in the opposite direction.
  • FIG. 1 For details, please refer to FIG. 1.
  • the values of n 1 , n 2 , ... n m may be different from each other, or may be partly the same, or all of them may be the same, which are not limited here.
  • the idle forwarding capability is used to represent the difference between the upper limit of the forwarded data volume of the target output queue (one or more) or the target output port (one or more) on the network device and the current actual forwarding amount , which can specifically represent the upper limit of the forwarded data volume of the target output queue (one or more) or the target output port (one or more) on the network device within a certain preset time period (eg, 200 microseconds (us))
  • a certain preset time period eg, 200 microseconds (us)
  • the difference between the current actual forwarding amount and the preset duration can be set by yourself.
  • the specific situations for calculating the idle forwarding capability of network equipment are as follows:
  • the calculated idle forwarding capability of the network device corresponds to one outgoing queue, the calculated idle forwarding capability of the outgoing queue.
  • the purpose of calculating the idle forwarding capacity is to maintain the dequeue depth at a small level even in the case of congestion.
  • the purpose of calculating the idle forwarding capacity is to keep the depth of the p outqueues at a small level in the case of congestion as a whole.
  • the outbound queue corresponding to the outbound port is calculated (may correspond to one outbound queue, or may correspond to multiple outbound queues).
  • Total idle forwarding capacity In the embodiment of the present application, the purpose of calculating the idle forwarding capacity is to keep the depth of all outgoing queues under the outgoing port at a small level overall under congestion conditions.
  • the calculation is the total idle forwarding of the outbound queues corresponding to the q outbound ports (each outbound port corresponds to at least one outbound queue) ability.
  • the purpose of calculating the idle forwarding capacity is to keep the depth of all outbound queues under the q outbound ports at a small overall level even in the case of congestion.
  • the idle forwarding capability can be measured not only by the amount of data, but also by the number of messages, which is not limited in this application. , both use the amount of data to measure the size of the idle forwarding capability.
  • a data flow graph is a schematic data structure that reflects the design principles of computing logic and the implementation process by expressing the flow direction and computing relationship of data in computing logic.
  • parameters refer to the data carried by the connection edges of computing nodes on the graph, used for processing by computing nodes or fed back by computing nodes.
  • the server may be a traditionally described server such as a cloud server, a data center network, or a cluster, or may be a terminal device (such as a virtual reality (VR) device, a mobile phone, a tablet, a notebook computer, or a smart wearable device. etc.), wheeled mobile devices (such as self-driving vehicles, assisted driving vehicles, etc.), which are not limited in this application.
  • a virtual reality (VR) device such as a mobile phone, a tablet, a notebook computer, or a smart wearable device. etc.
  • wheeled mobile devices such as self-driving vehicles, assisted driving vehicles, etc.
  • the network device described in this application may be any device on the path between the sending end device and the receiving end device (including the sending end device and the receiving end device).
  • the illustrated network device does not include the sending end device or the receiving end device, that is, the network device in FIG. 2 is the only device in the path between the sending end device and the receiving end device, Similarly, the network device in FIG. 3 is any device on the path between the sending end device and the receiving end device.
  • the following describes the overall flow of the active queue management method for the network device provided in the embodiment of the present application based on the system structure shown in FIG. 3 , which may specifically include the following steps:
  • Step 1 The network device periodically calculates the idle forwarding capability of the target output queue (or target output port) on the network device.
  • the target output queue may include one or more output queues, and the target output port may include one or more output ports.
  • the network device is any device on the path between the sending end device and the receiving end device.
  • the message sent by the sending end device carries an adjustment request.
  • the adjustment request can be a window adjustment request or a rate adjustment request. This application does not limit this.
  • the window adjustment request (or rate adjustment request) It will carry the specific value of how much the sending window (or sending rate) needs to be increased, and the specific value can be represented by II, where the window adjustment request is used to indicate the adjustment of the sending window of the sending end device, and the rate adjustment request is used to indicate the adjustment of the sending end The sending rate of the device.
  • the sender device is any one of n sender devices in the network structure, where n ⁇ 1.
  • Step 3 After the message sent by the sending end device reaches the network device, the network device will first judge whether the message is marked with a preset mark. If the message does not have a preset mark, the network device will The value of the idle forwarding capability calculated in step 2 and the value of the window adjustment request (or rate adjustment request) in step 2 yield a decision result, the decision result is carried by the message, and the decision result is used to instruct the sending end device to adjust the sending window (or sending rate), the decision result includes the following three situations: 1 the grant information is used as the decision result to indicate that the sending end device is granted to increase the sending window (or sending rate); 2 the rejection information is used as the decision result to use Indicates that the sending device is rejected from adjusting the sending window (or sending rate).
  • This situation can be classified as the above-mentioned third situation, that is, the above-mentioned third situation can be summarized as follows: 3If the message is marked with a preset mark (whether it is marked by the previous network device or marked by itself), the The flag information is used as a decision result, and is used to instruct to reduce the sending window (or sending rate) of the sending end device.
  • Step 4 After the message carrying the decision result arrives at the receiving end device, the receiving end device analyzes the decision result, carries the decision result in an acknowledgment message (acknowledge, ACK) and returns it to the sending end device.
  • acknowledge acknowledge
  • Step 5 After receiving the confirmation message, the sending device analyzes the decision result carried in the confirmation message, and adjusts the sending window (or sending rate) according to the decision result.
  • the adjustment method includes: increasing the sending window (or sending rate), Do not increase or decrease the sending window (or sending rate), reduce the sending window (or sending rate).
  • the network device included in the system structure shown in Figure 3 is any device on the path between the sending end device and the receiving end device, that is, in Figure 3, the illustrated network device does not include the sending end device nor the receiving end device , and there are multiple network devices, then the network device may be the first hop device after the sender device, or the last hop device before the receiver device, which is not limited here.
  • the two decision results 1 and 2 made by the previous hop device may be rewritten by the current network device. If the decision made by the previous hop device is the decision result of 3, that is, any previous network device marks the packet with a preset mark, and the subsequent network devices can only get the decision result of 3.
  • Specific rewriting rules include but are not limited to the following methods:
  • the current decision result of the network device may be the above 1, 2, 3, that is, the decision result may be: grant information, Refuse information, flag information.
  • the current decision result of the network device may be the above 2, 3, that is, the decision result may be: reject information, mark information .
  • the decision result of the preceding network device is in the case of 3, that is, the decision result is marked information
  • the current decision result of the network device may be the above 3, that is, the decision result can only be: marked information.
  • Step 1 The network device periodically calculates the idle forwarding capability of the target output queue (or target output port) on the network device.
  • the target output queue may include one or more output queues, and the target output port may include one or more output ports.
  • Step 2 The message sent by the sending end device carries an adjustment request.
  • the adjustment request can be a window adjustment request or a rate adjustment request. This application does not limit this.
  • the window adjustment request (or rate adjustment request) is used
  • the sending end device here is any one of n sending end devices in the networking structure, where n ⁇ 1.
  • Step 3 After the message sent by the sending end device reaches the network device directly, since the message does not carry a preset mark when sent by the sender end, the network device does not need to judge whether the message has been marked, but directly according to The value of the idle forwarding capability calculated in step 1 and the value of the window adjustment request (or rate adjustment request) in step 2 yield a decision result, which is carried by the message, and the decision result is used to instruct the sending end device to adjust
  • the sending window (or sending rate), the decision result includes the following three situations: 1 the grant information is used as the decision result, which is used to indicate that the sending end device is granted to increase the sending window (or sending rate); 2 the rejection information is used as the decision result, It is used to indicate that the sending device is refused to adjust the sending window (or sending rate). 3 mark the message with a preset mark, and use the mark information as a decision result to instruct to reduce the sending window (or sending rate) of the sending end device.
  • Step 4 After the message carrying the decision result arrives at the receiving end device, the receiving end device analyzes the decision result, carries the decision result in the confirmation message and returns to the sending end device.
  • Step 5 After receiving the confirmation message, the sending device analyzes the decision result carried in the confirmation message, and adjusts the sending window (or sending rate) according to the decision result.
  • the adjustment method includes: increasing the sending window (or sending rate), Do not increase or decrease the sending window (or sending rate), reduce the sending window (or sending rate).
  • step 1 can be executed first, and then step 2 can be executed.
  • step 2 can also be performed first, and then step 1 can be performed, or step 1 and step 2 can be performed at the same time, which is not limited here.
  • each network device needs to judge whether the received message from the previous hop device has a preset mark, and there is only one network device in the path between the sending end device and the receiving end device in Figure 2 , so the message received by the network device is directly from the sender device, and the message has no preset mark, so there is no need to judge whether it has a preset mark; 2) the current network device in Figure 3 may The decision result (if any) carried in the message sent by the device is rewritten. There is only one current network device in Figure 2, and the decision result is written by itself, and there is no rewriting.
  • the network device can also be a sending end device or a receiving end device, when the network device is used as a sending end device, it is essentially the network device corresponding to Figure 2 or Figure 3 above.
  • the executed steps are merged with the steps executed by the sending end device to be executed by one device.
  • the network device calculates the idle forwarding capability of the target output queue or target output port on the network device, and the idle forwarding capacity is used to represent the difference between the upper limit of the forwarded data volume of the target output queue or the target output port and the current actual forwarding amount
  • the network device is any device on the path between the sending end device and the receiving end device.
  • the network device calculates the idle forwarding capability of the target output queue or the target output port on the network device, wherein the idle forwarding capacity is used to represent the target output queue (one or more) or the target output port (one or more)
  • the difference between the upper limit of the forwarded data volume and the current actual forwarding volume which can specifically represent the target output queue (one or more) or the target output port (one or more) on a network device in a certain
  • the difference between the upper limit of forwarded data volume and the current actual forwarded volume within a preset time period (for example, 200us), which can be set by itself.
  • the network device is any device on the path between the sending end device and the receiving end device (including the sending end device and the receiving end device).
  • the calculation process for the network device to calculate the idle forwarding capability of the target output queue or the target output port on the network device may be periodic calculation, for example, every time ⁇ (here time ⁇ is the period length) to be calculated once; this calculation process can also be non-periodic calculation, for example, the first time interval time length ⁇ 1 is calculated once, the second time interval time length ⁇ 2 time, and so on, the specific application does not do this calculation process limited.
  • the network device is used to periodically calculate the idle forwarding capability of the target output queue or the target output port on the network device based on the preset time length ⁇ .
  • the process for the network device to calculate the idle forwarding capability of the target output queue or target output port on the network device specifically includes but is not limited to:
  • the network device is based on the upper limit of the forwarded data volume of the target output queue or the target output port within the preset time length ⁇ (which can be represented by B* ⁇ , B is the link bandwidth) and the target output queue or the target output queue within the preset time length ⁇
  • the total amount of data (available TxSize representation) of the target outlet port calculates the value of the letter of credit counter (credit counter, CC), wherein, the value of the credit counter (available CC representation) is just used to characterize the size of the idle forwarding capability .
  • the network device is based on the upper limit of forwarded data volume B* ⁇ of the target output queue or target output port within the preset time length ⁇ , the total amount of data TxSize passing through the target output queue or the target output port within the preset time length ⁇ , and the current output Queue depth calculates the value of the letter of credit counter, where the current exit queue depth is the depth of the target exit queue or the depth of the exit queue corresponding to the target exit port, which can be represented by q.
  • q may refer to the sum of all current queue depths, or the one with the largest current queue depth, or the current value greater than a preset threshold.
  • Dequeue depth value (one or more), specifically, this application does not limit the meaning of q.
  • q in the following embodiments represents the sum of the current out-of-queue depths, and details will not be described later.
  • the network device is based on the upper limit of the forwarded data volume B* ⁇ of the target output queue or the target output port within the preset time length ⁇ , the total amount of data passing through the target output queue or the target output port within the preset time length ⁇ TxSize, and the current output queue Depth q and preset queue depth (can be represented by Q t ) calculate the value of the letter of credit counter.
  • the preset queue depth Q t is a user-defined value, for example, Q t can take specific values such as 0KB, 10KB, 20KB, etc. according to actual needs. No limit.
  • the preset queue depth Q t when the preset queue depth Q t is set to 0KB, it means that the queue depth of the target outbound queue or the outbound queue depth corresponding to the target outbound port needs to be maintained at 0, so that an extremely low queuing delay can be achieved.
  • method a is based on two parameters to calculate the target out-of-queue or target out-port on the network device
  • the idle forwarding capability of the target output queue or the target output port on the network device is calculated based on three parameters, and the number of parameters involved is small, which is easy to implement
  • the method b is based on three parameters to calculate the idle forwarding capability of the target output queue or target output port on the network device, which improves the accuracy of calculating the value of the letter of credit counter
  • Method c is to calculate the idle forwarding capability of the target output queue or the target output port on the network device based on four parameters, in which the preset queue depth Q t is additionally introduced, so that the output queue depth on the network device can be controlled at a specified On the depth value, the queuing delay is reduced, and the queue depth and the number of flows are unbound.
  • the current out-of-queue depth is the depth of the target out-of-queue or the depth of the out-of-queue corresponding to the target out-port
  • the sum of the current out-of-queue depth is the sum of the depth of the target out-of-queue or the out-of-queue corresponding to the target out-of-port
  • the sum of the depths, the sum of the current out-of-queue depths can be the sum of the instantaneous current out-of-queue depths, or the sum of the average current out-of-queue depths within the preset time length T, which is not limited in this application.
  • the sum of the current out-queue depth is the sum of the target out-queue depths, suppose the target out-queue includes out-queue 1, out-queue 2, and out-queue 3, and at the current time t 0 , out-queue 1, out-queue 2,
  • the current dequeue depth is the depth of the target dequeue
  • the target dequeue includes dequeue 1, dequeue 2, and dequeue 3, and at the current time t 0 , dequeue 1, dequeue 2, and dequeue 3
  • the queue depths are L 1 , L 2 , and L 3 respectively, and L 1 >L 2 , L 1 >L 3 , indicating that L 1 is the largest of the current queue depths L 1 , L 2 , and L 3 , then the current time t
  • the maximum instantaneous current queue depth of 0 is L 1 .
  • the current output queue depth is the depth of the target output port, assuming that the target output port includes output port 1 and output port 2, output port 1 corresponds to output queue 1 and output queue 2, and output port 2 corresponds to output queue 3 and output port 2.
  • Queue 4, Exit Queue 5, and at the current time t 0 the queue depths of Exit Queue 1, Exit Queue 2, Exit Queue 3, Exit Queue 4, and Exit Queue 5 are L 1 , L 2 , L 3 , L 4 , L 5 , and L 3 is the largest of the current queue depths L 1 , L 2 , L 3 , L 4 , and L 5 , then the maximum instantaneous current queue depth at the current time t 0 is L 3 .
  • the current queue depth is the depth of the target queue, it is assumed that the target queue includes queue 1, queue 2, and queue 3, and within the preset time length T, the queue 1 and queue 1 are recorded every once in a while.
  • the network device is based on the sum of the current out-of-queue depth q, the upper limit of the forwarded data volume B* ⁇ of the target out-of-queue or target out-of-port within the preset time length ⁇ , and
  • the specific realization of the total amount of data TxSize of the target output port and the preset queue depth Q t to calculate the value of CC includes but is not limited to the following methods:
  • TxSize specifically refers to the total amount of data passing through the target output queue or the target output port within the last preset duration ⁇ time range.
  • formula (3) is based on formula (2) and divided by the preset time length ⁇ .
  • the network device is based on the sum of the current out-of-queue depth q, the upper limit of the forwarded data volume B* ⁇ of the target out-of-queue or target out-port within the preset time length ⁇ , and the preset time length ⁇ .
  • the network device in addition to the sum q of the current out-of-queue depth, the upper limit of the forwarded data volume B* ⁇ of the target out-of-queue or target out-port within the preset time length ⁇ , the The total amount of data TxSize and the preset queue depth Qt that pass through the target out-of-queue or out-port of the target within the preset time period ⁇ are calculated in addition to the value of CC (it can also be based on the above method a) 2 parameters or 3 parameters in the above method b to calculate the value of CC, which is not limited here), and more parameters can be included on the basis of the parameters of these 4 dimensions for more accurate calculation of the value of CC Value, for example, counting the sum of the letter of credit counters allocated to the message within the preset time period from the last CC update time to the current CC update time, and subtracting the sum when the CC is updated this time, or subtracting the sum Multi
  • the network device acquires a first packet that carries an adjustment request, where the adjustment request is used to instruct to adjust a sending window or a sending rate of the sending end device.
  • the network device will also obtain a message carrying an adjustment request, which can be called the first message, and the adjustment request can be It is a window adjustment request, and may also be a rate adjustment request, wherein the window adjustment request is used to instruct to adjust the sending window of the sending device, and the rate adjustment request is used to instruct to adjust the sending rate of the sending device.
  • the way for the network device to obtain the first message carrying the adjustment request includes but is not limited to: 1) When the network device is the sending end device, then the first message is sent by the The end device generates by itself (the first message generated at this time is an initial message without a preset flag), and the sending end device carries the adjustment request in the first message, and the sending end device then adjusts the request according to the adjustment request.
  • the decision result is obtained from the requested value II and the obtained value of the idle forwarding capability, and then the decision result is carried in the first message to obtain the second message, so that the second message can be sent to the next-hop device later .
  • the sending end device may not carry the adjustment request in the first message (the first message generated at this time is The initial message does not have a preset mark), but after the value of the idle forwarding capability is calculated according to step 401, the decision result is obtained directly according to the value II of the adjustment request and the obtained value of the idle forwarding capability, and then the decision The result is carried in the first message to obtain the second message, so that the second message can be sent to the next-hop device later. 2)
  • the network device receives the first message sent by the previous hop device (which may be the sender device, or other devices behind the sender device).
  • step 401 can be executed first, and then step 402 can be executed, or step 402 can be executed first, and then step 401 can be executed, or Step 401 and step 402 are executed at the same time, and the details are not limited here.
  • the network device determines that the first packet does not have a preset flag, the network device obtains a decision result according to the idle forwarding capability and the adjustment request, and carries the decision result in the first packet to obtain a second packet. message.
  • the network device After the network device obtains the first message, it first judges whether the first message has a preset flag, and if the network device determines that the first message does not have a preset flag, the network device The value of the idle forwarding capability and the value of the adjustment request (the value of the adjustment request is represented by II) obtain a decision result, and carry the decision result in the first message, thereby obtaining a second message. Specifically, the network device obtains the decision result by comparing the value of the idle forwarding capability with the value II of the adjustment request. Therefore, the unit of the value of the idle forwarding capability and the value II of the adjustment request The units need to be consistent. If not, the network device needs to convert the two units so that the two units are consistent.
  • the first message does not have a preset flag, and the value of the idle forwarding capability ⁇ the value II of the adjustment request, then the grant information is taken as the decision result.
  • the network device determines that the value of the idle forwarding capability ⁇ the value II of the adjustment request by comparing the value of the idle forwarding capability with the value II of the adjustment request, in this case,
  • the decision result obtained by the network device is "grant", that is, the grant information is taken as the decision result (that is, the above-mentioned situation 1 of the decision result), and the grant information is used to indicate that the sending end device is allowed to increase the sending window or sending rate.
  • the first message does not have a preset flag
  • the network device determines that the value of the idle forwarding capability is ⁇ by comparing the value of the idle forwarding capability with the value II of the adjustment request
  • the decision result determined by the network device is grant information, which can Achievement.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability and the size relationship of II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network devices.
  • the first message does not have a preset mark, and if 0 ⁇ the value of idle forwarding capability ⁇ the value II of the adjustment request, mark the first message according to the preset probability.
  • the network device determines by comparing the value of the idle forwarding capability with the value II of the adjustment request that 0 ⁇ the value of the idle forwarding capability ⁇ the value II of the adjustment request, in this case
  • the network device marks the first packet according to a preset probability. Specifically, the network device marks the first packet according to a preset probability by marking the first packet according to a preset fixed probability p
  • the first message may also be calculated to obtain the dynamic probability p' of the current round after each determination of 0 ⁇ idle forwarding capability value ⁇ adjustment request value II, and then mark the first message with the dynamic probability p' text, this application does not limit it.
  • the first message is successfully marked with a preset mark by the network device with a preset probability, and the mark information is taken as a decision result.
  • the network device When the first message is successfully marked with the preset mark by the network device with a preset probability, the network device marks the first message with the mark information of the preset mark as a decision result, that is, the network
  • the decision result obtained by the device is "flag" (that is, the above-mentioned situation 3 of the decision result), and the flag information is used to indicate that the sending device is allowed to reduce the sending window or sending rate.
  • the first packet does not have a preset flag
  • the network device determines that 0 ⁇ idle forwarding capability by comparing the value of the idle forwarding capability with the value II of the adjustment request
  • the network device can further increase the value of the deficit counter (deficit counter, DC) corresponding to the idle forwarding capability by a target preset value (expressed by ⁇ ) as a new deficit counter
  • the network device needs to mark the first message according to the preset probability.
  • the decision result determined by the network device is the marking information, which achieves different decision results when different conditions are met, and has flexibility.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability, the size relationship between DC and II, and only need to perform a simple comparison operation to obtain the corresponding decision results, so it is easy to use on high-speed network devices accomplish.
  • the first packet is not marked with a preset mark with a preset probability by the network device, then compare the value DC of the deficit counter with the value II of the adjustment request.
  • the network device When the first packet is not marked with the preset mark with a preset probability by the network device, the network device further compares the value DC of the deficit counter corresponding to the idle forwarding capability with the value II of the adjustment request (The premise is that the two units are consistent), and then based on the comparison results to obtain specific decision results. Also, it should be noted here that the comparison results are different, and the decision results obtained by the network device are also different, which are explained below:
  • the decision result obtained by the network device is "grant", and the grant information is taken as the decision result (that is, the situation of the above-mentioned decision result 1), the grant information is used to indicate that the sending device is allowed to increase the sending window or sending rate.
  • the network device needs to mark the first packet according to the preset probability.
  • the network device if the first message is not marked with a preset message, it is necessary to further compare the value between the value DC of the deficit counter and the value II of the adjustment request, and if the value DC of the deficit counter ⁇ the value of the adjustment request
  • the decision result determined by the network device is grant information, so that different decision results can be obtained when different conditions are met, and it has flexibility.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability, the size relationship between DC and II, and only need to perform a simple comparison operation to obtain the corresponding decision results, so it is easy to use on high-speed network devices accomplish.
  • the decision result obtained by the network device is "reject", and the rejection information is taken as the decision result (that is, the situation of the above-mentioned decision result 2), the rejection information is used to indicate that the sending device is not allowed to adjust the sending window or sending rate.
  • the value of the idle forwarding capability is ⁇ 0.
  • the network device determines that the value of the idle forwarding capability is ⁇ 0 by comparing the value of the idle forwarding capability with the value II of the adjustment request, in this case, the network device
  • the first message is marked with the preset mark, and the first message is marked with the mark information of the preset mark as a decision result, that is, the decision result obtained by the network device is "mark" (that is, the above-mentioned In case 3 of the above decision result, the flag information is used to indicate that the sending device is allowed to reduce the sending window or sending rate.
  • the network device marks the first message and determines that the decision result is Marking information enables different decision-making results to be obtained when different conditions are met, which is flexible.
  • the decision results obtained by the method of this application are all determined by the value of the idle forwarding capability and the size relationship of II, and the corresponding decision results can be obtained only by a simple comparison operation, so it is easy to implement on high-speed network equipment.
  • the above points (1), (2), and (3) describe how the network device obtains a decision result based on the idle forwarding capability and the adjustment request when the first message does not have a preset flag.
  • the network device marks the first packet with the marking information of the preset mark as a decision result, that is, the network device makes a decision result as "mark" (that is, the above-mentioned situation of the decision result 3),
  • the flag information is used to indicate that the sending end device is allowed to reduce the sending window or sending rate.
  • the network device may further increase the value of the idle forwarding capability by a target preset value ⁇ as a new idle forwarding
  • a target preset value ⁇ As a new idle forwarding
  • take the value of the idle forwarding capability as CC as an example, that is, CC CC+ ⁇ .
  • the network device does not need to compare the value of the idle forwarding capability with the value II of the adjustment request, but directly determines the flag information as the decision result , to achieve different decision-making results when different conditions are met, with flexibility.
  • the network device can be any device on the path between the sending end device and the receiving end device, that is to say, the network device can be any traditional network device (such as , switches, routers, etc.), it can also be a sending end device or a receiving end device, which are explained separately below:
  • a network device is any device between the path between the sending end device and the receiving end device (excluding the sending end device and the receiving end device).
  • the network device is any device between the sending end device and the receiving end device path (excluding the sending end device and the receiving end device), that is, the network device is neither the sending end device nor the receiving end device, then in step 402
  • the way for the network device to obtain the first packet carrying the adjustment request is that the network device receives the first packet sent by the previous hop device (which may be the sender device or other devices behind the sender device). Since the network device is not the receiving end device, which means that the network device is not the last hop device, then in some embodiments of the present application, after step 403, the network device can further obtain the second message (That is, the first packet carrying the decision result) is sent to the next-hop device.
  • the receiving end device will analyze the second message after receiving the second message sent by the network device, and carry the decision result with the It is sent to the sending device in the confirmation message (it is not limited that the path for the receiving device to return the confirmation message to the sending device must be the original path), and the confirmation message is used to instruct the sending device to adjust according to the decision result carried in it.
  • the sending window when the adjustment request is a window adjustment request
  • the sending rate when the adjustment request is a rate adjustment request
  • the network device is the sending end device.
  • the sending end device executes the execution steps of the network device in step 402, that is, the first message is generated by the sending end device itself (the first message generated at this time The first message is an initial message without a preset mark), and the adjustment request is carried by the sending end device in the first message, and the sending end device then uses the value II of the adjustment request and the obtained idle forwarding capability The value of the decision result is obtained, and the decision result is carried in the first message to obtain the second message, so that the second message can be sent to the next-hop device later.
  • the sending-end device does not perform the execution steps of the network device in step 402, that is, the sending-end device may not carry the adjustment request in the first message (the first message generated at this time is an initial message and does not have preset flag), but after calculating the value of the idle forwarding capability according to step 401, the decision result is directly obtained according to the value II of the adjustment request and the obtained value of the idle forwarding capability, and then the decision result is carried in the first In the message, the second message is obtained, so that the second message can be sent to the next-hop device later.
  • the sending end device may further send the obtained second packet (that is, the first packet carrying the decision result A packet) is sent to the next hop device.
  • the receiving device will analyze the second message after receiving the second message sent by the sending device, and make a decision
  • the result is carried in the confirmation message and sent to the sending end device (the path that the receiving end device returns the confirmation message to the sending end device must be the original path), and the confirmation message is used to instruct the sending end device to follow the information carried in it.
  • the decision result adjusts the sending window of the sending end device (when the adjustment request is a window adjustment request) or the sending rate (when the adjustment request is a rate adjustment request).
  • the network device is the receiving end device.
  • the receiving end device executes the execution steps of the network device in step 403, that is, when the receiving end device determines that the first message does not have a preset mark, The receiving end device obtains a decision result according to the idle forwarding capability and the adjustment request, and carries the decision result in the first message to obtain the second message, and then analyzes the second message, and carries the decision result in the In the confirmation message, and send the confirmation message to the sending end device, the confirmation message is used to instruct the sending end device to adjust the sending window of the sending end device according to the decision result carried in it (the adjustment request is a window adjustment request down) or sending rate (in case the adjustment request is a rate adjustment request).
  • the receiving end device does not perform the execution steps of the network device in step 403, but when the receiving end device determines that the first message does not have a preset flag, the receiving end device obtains a decision result according to the idle forwarding capability and the adjustment request , the decision result is not carried in the first message, but directly carried in the confirmation message, and the confirmation message is sent to the sending end device, and the confirmation message is used to instruct the sending end device to follow the decision carried in it As a result, the sending window of the sending device is adjusted (when the adjustment request is a window adjustment request) or the sending rate (when the adjustment request is a rate adjustment request).
  • the decision result has the following three situations: 1 the grant information is used as the decision result to indicate that the sending end device is granted to increase the sending window (or sending rate); The information is used as a decision result, and is used to indicate that the sending device is rejected from increasing the sending window (or sending rate). 3 If the message is marked with a preset mark (whether it is marked by the previous network device or marked by itself), the mark information is used as the decision result, and the mark information is used as the decision result to instruct to reduce the transmission of the sending end device. window (or send rate). Therefore, after the sending device receives the confirmation message sent by the receiving device, it adjusts the sending window (or sending rate) of the sending device in different ways according to the decision results carried in it, including but not limited to:
  • the confirmation message is specifically used to instruct the sending end device to reduce the sending window or sending rate of the sending end device according to the decision result, wherein the reduction range is obtained according to the target preset value ⁇ , for example , can be to reduce the sending window or sending rate of the sending end device by ⁇ on the original basis, or reduce the sending window or sending rate of the sending end device on the original basis by k 1 * ⁇ , where k 1 is a custom parameter, k 1 >0.
  • the confirmation message is specifically used to instruct the sending end device to increase the sending window or sending rate of the sending end device according to the decision result, wherein the increase range is obtained according to the value II of the adjustment request, for example , it can be to increase the sending window or sending rate of the sending device on the original basis by II, or to increase the sending window or sending rate of the sending device on the original basis by k 2 *II, where k 2 is self-defined parameter, k 2 >0.
  • the confirmation message is specifically used to instruct the sending device not to increase or decrease the sending window or sending rate of the sending device according to the decision result.
  • the decision results carried in the confirmation message are different, and the ways for the sending end device to adjust the sending window and sending rate based on the confirmation message are also different.
  • the adjustment logic is simple and easy to implement, and has optional sex.
  • Step1 The network device judges whether the first message is marked with a preset mark. If it is marked, then the mark information of the first message with a preset mark is the decision result, and the network device will increase CC by ⁇ at the same time ( ⁇ is an automatic Define the parameters, that is, the above-mentioned target preset value.
  • the network device will further send the first packet to the next hop device on the path between the sending end device and the receiving end device; if the network device is a receiving end device, it will mark The information is carried in the generated confirmation message as the result of the decision; if the first message is not marked with a preset mark, then enter Step2.
  • the network device will further send the first message carrying the decision result (that is, the second message described in the embodiment corresponding to Figure 4 above) to the sending end device and the receiving end.
  • the next hop device on the device path sends, if the network device is the receiving end device, the decision result will be carried in the generated confirmation message; if 0 ⁇ CC ⁇ II, enter Step3, if CC ⁇ 0, Then enter Step6.
  • the network device will further send the first message with the preset flag to the next hop device on the path between the sending end device and the receiving end device, if the network device is the receiving end device , the marking information will be carried in the generated confirmation message as the decision result; if the first message is not marked with the preset mark with the preset probability, then enter Step4.
  • Step 5 The network device carries the rejection information in the first message as the decision result of the network. If the network device is not the receiving end device, the network device will further send the first message carrying the decision result (that is, the second message described in the embodiment corresponding to Figure 4 above) to the sending end device and the receiving end The next-hop device on the device path sends it. If the network device is the receiving end device, the decision result will be carried in the generated confirmation message.
  • Step 6 The network device marks the first message, and the mark information that the first message has a preset mark is the decision result. If the network device is not the receiving end device, the network device will further send the first packet to the next hop device on the path between the sending end device and the receiving end device; if the network device is a receiving end device, it will mark The information is carried in the generated confirmation message as the decision result.
  • the current network device obtains its own decision result for the obtained first message, and the decision result does not consider the previous hop device of the network device (if Yes) carries the preorder decision result on the first packet.
  • the decision result of the previous hop device is to grant information or deny information (that is, the above-mentioned The above two decision results of 1 and 2) may be rewritten by the current network device.
  • the decision result of the previous hop device is that the first packet has a preset mark (that is, the above 3), That is to say, any of the previous network devices marks the first packet with a preset mark, and the subsequent network devices can only get the decision result of 3.
  • the specific rewriting rules are as described above and will not be repeated this time.
  • FIG. 6 is a schematic flow diagram of the sending end device adjusting the sending window or sending rate according to the decision result provided by the embodiment of the present application. It can be seen from FIG.
  • the confirmation message is specifically used to instruct the sending end
  • the device reduces the sending window or sending rate of the sending device according to the decision result; if the decision result is grant information, the confirmation message is specifically used to instruct the sending device to increase the sending window or sending rate of the sending device according to the decision result; If the decision result is rejection information, the acknowledgment message is specifically used to instruct the sending device not to adjust (ie neither increase nor decrease) the sending window or sending rate of the sending device according to the decision result.
  • the active queue management method of the network device provided in the embodiment of the present application can be used to cooperate with the congestion control protocol to control the queue depth to a specified depth.
  • the implementation of the slow start algorithm and the linear increase multiplicative decrease (additive increase multiplicative decrease, AIMD) algorithm are respectively described below using the active queue management method of the network device provided by the embodiment of the present application:
  • the slow start algorithm is realized by using the active queue management method of the network device provided by the embodiment of the present application.
  • FIG. 7 is a schematic framework diagram of implementing the slow start algorithm by using the active queue management method of the network device provided by the embodiment of the present application provided by the embodiment of the present application.
  • the characteristic of the slow start algorithm is that the size of the sending window doubles every time a round trip time (RTT) passes. Under the control of the algorithm, the window increases quickly to quickly fill up the idle bandwidth.
  • RTT round trip time
  • the value II of the adjustment request carried in the message is set as the MTU, as shown in step S1 in Figure 7, after the message passes through the network device (here Assuming that the network device does not include the sending end device and the receiving end device), the network device will make a judgment, as shown in step S2 in Figure 7. After the judgment, three decision results can be obtained: 1) II keeps the MTU unchanged (that is, the decision result 2) II is changed to 0, (that is, the decision result is rejection information); 3) the message is marked (that is, the decision result is mark information), as shown in the above step S3.
  • the receiving end device carries the decision result in the message in the confirmation message ACK and returns it to the sending end device, as shown in steps S4 and S5 in Figure 7. It should be noted here that the confirmation message shown in Figure 7
  • the return path of the ACK is the same as the sending path. In practical applications, there is no restriction on the return path being consistent with the sending path.
  • the sending end device updates the window according to the decision result carried in the confirmation message ACK, as shown in step S6 in Figure 7. If the decision result carried in the confirmation message ACK is not flag information, it will adjust The value II of the request is added to the sending window. If the decision result carried by the confirmation message ACK is tag information, the sending end device will reduce the sending window by ⁇ .
  • this application uses the active queue management method of the network device provided by the embodiment of the application to implement the slow start algorithm to adjust the sending window of the sending end device. In other implementations of the application, it can also be used to adjust The method of adjusting the sending rate of the sending device is similar to the method of adjusting the sending window, and will not be described here.
  • the AIMD algorithm is realized by using the active queue management method of the network device provided by the embodiment of the present application.
  • the network device when the network device determines that 0 ⁇ CC ⁇ II, the network device can determine that the bandwidth is fully occupied. But at this time, multiple flows are not necessarily fair, that is, they have the same bandwidth, so the AIMD algorithm can continue to be implemented based on the active queue management method of the network device provided by the embodiment of the present application, so as to realize flow fairness.
  • the II carried in the message sent by the sending device is ⁇ /cwnd, and other behaviors remain unchanged, as shown in Figure 8. Since the bandwidth of the network device has been fully occupied, 0 ⁇ CC ⁇ II at this time, so enter into Step 3 in the above embodiment corresponding to FIG. 5 .
  • this branch implements the AIMD algorithm, which can achieve equal throughput for multiple streams after multiple iterations.
  • the active queue management method of the network device provided by the embodiment of the present application has the following beneficial effects:
  • the queue depth on the network device can be stably maintained at the preset queue depth Q t , for example, Q t can be set to 0KB, that is, the queue depth is maintained at 0, so that an extremely low queuing delay can be obtained.
  • the method has low complexity and is easy to implement on high-speed network equipment.
  • the technical effects brought by the embodiments of the present application are further compared below, and the present application utilizes the active queue management method of the network device to realize the slow start algorithm for comparison , this application constructs a dumbbell-shaped topology on the simulation platform, and constructs the traffic to pass through the bottleneck link. Continuously increase the number of streams on the bottleneck link and observe the queue depth on the bottleneck link.
  • the application sets Qt to 0KB , and the result obtained is compared with the result of the prior art as shown in Figure 9, wherein C-AQM is the method of the embodiment of the present application, and HPCC and XCP are the results of the prior art, as shown in Figure 9
  • the effect comparison chart shows that: the result of the existing technology XCP is that with the increase of the number of flows, the average queue depth shows a significant upward trend as a whole, but the number of flows in the middle decreases; the result of the existing technology HPCC, the average queue depth As the number of flows increases significantly; the result of C-AQM in the embodiment of the present invention is that the mean value of the average queue depth increases slightly with the number of flows.
  • the reason why the queue depth is not strictly 0KB is that the real-time queue depth actually fluctuates around 0KB. When the queue underflows, it is actually calculated as 0, so the actual average queue depth is higher than 0KB.
  • the reason why the average queue depth increases slightly with the number of flows is that when the number of flows increases, the jitter of the queue will also increase, resulting in an increase in the instantaneous queue, which in turn increases the average queue depth slightly.
  • Figure 10 is a network provided by the embodiments of the present application
  • the network device 1000 may specifically include: a calculation module 1001, an acquisition module 1002, and a decision module 1003, wherein the calculation module 1001 is used to calculate the idle forwarding capability of the target output queue or target output port on the network device 1000 , the idle forwarding capability is used to represent the difference between the upper limit of forwarded data volume of the target outbound queue or the target outbound port and the current actual forwarding volume, the target outbound queue includes one or more outbound queues, and the target outbound port includes One or more output ports, the network device 1000 is any device on the path between the sending end device and the receiving end device; the obtaining module 1002 is used to obtain the first message carrying the adjustment request, and the adjustment request includes a window
  • the acquisition module 1002 executes the step of "obtaining the first message carrying the adjustment request", that is, the first message is sent by
  • the obtaining module 1002 generates by itself (the first message generated at this time is an initial message without a preset flag), and the obtaining module 1002 carries the adjustment request in the first message, and the decision-making module 1003 then according to The value of the adjustment request and the obtained value of the idle forwarding capability are used to obtain a decision result, and then the decision result is carried in the first message to obtain a second message, so that the second message can be forwarded to the next-hop device send.
  • the obtaining module 1002 does not perform the step of "obtaining the first message carrying the adjustment request", that is, the obtaining module 1002 may not carry the adjustment request in the first message (the first message generated at this time is initial message, does not have a preset flag), the acquisition module 1002 only generates the first message, and after the decision module 1003 calculates the value of the idle forwarding capability, directly according to the value of the adjustment request and the value of the obtained idle forwarding capability After receiving the decision result, the decision module 1003 carries the decision result in the first message to obtain a second message, so as to send the second message to the next-hop device later.
  • the decision module 1003 is specifically configured to: when the network device 1000 determines that the value of the idle forwarding capability is greater than or equal to the value of the adjustment request, taking grant information as the decision result, the The grant information is used to indicate that the sending end device is allowed to increase the sending window or sending rate of the sending end device.
  • the decision module 1003 is specifically configured to: when the network device 1000 determines that the value of the idle forwarding capability is greater than zero and less than the value of the adjustment request, mark the first message; when the network device 1000 determines that the first message is marked with the preset mark, the first message has the mark information of the preset mark as the decision result, and the mark information is used to represent The sending end device is allowed to reduce the sending window or sending rate of the sending end device.
  • the decision-making module 1003 is further configured to: when the network device 1000 determines that the first packet is not marked with the preset mark, and the value of the deficit counter corresponding to the idle forwarding capability is greater than or equal to the value of the adjustment request, grant information is used as the decision result, and the grant information is used to indicate that the sending end device is allowed to increase the sending window or sending rate of the sending end device.
  • the decision-making module 1003 is further configured to: when the network device 1000 determines that the first packet is not marked with the preset mark, and the value of the deficit counter corresponding to the idle forwarding capability is less than In the case of adjusting the value of the request, rejection information is used as the decision result, and the rejection information is used to indicate that the sending end device is not allowed to adjust the sending window or sending rate of the sending end device.
  • the decision module 1003 is further configured to: when the network device 1000 determines that the value of the idle forwarding capability is less than zero, mark the first packet with the preset mark, and set The first packet has flag information of the preset flag as the decision result, and the flag information is used to indicate that the sending end device is allowed to reduce the sending window or sending rate of the sending end device.
  • the decision module 1003 is further configured to: when the network device 1000 determines that the first packet has the preset flag, mark the first packet with the preset flag The information is used as a decision result, and the decision result is carried in the first packet to obtain a second packet.
  • the flag information is used to indicate that the sending device is allowed to reduce the sending window or sending rate of the sending device.
  • the calculation module 1001 is specifically configured to: according to the upper limit of the forwarded data volume of the target output queue or the target output port within the preset time period and the target output queue or The total amount of data on the target output port calculates the value of the letter of credit counter, and the value of the letter of credit counter is used to represent the size of the idle forwarding capability.
  • the calculation module 1001 is specifically configured to: according to the upper limit of the forwarded data volume of the target output queue or the target output port within the preset time period, the target output queue or the target output port within the preset time period
  • the total amount of data on the target output port and the current out-of-queue depth calculate the value of the letter of credit counter, which is used to represent the size of the idle forwarding capability, and the current out-of-queue depth is the depth of the target out-of-queue Or the depth of the output queue corresponding to the target output port.
  • the calculation module 1001 is specifically configured to: according to the upper limit of the forwarded data volume of the target output queue or the target output port within the preset time period, the target output queue or the target output port within the preset time period
  • the total amount of data of the target output port, the current out-of-queue depth and the preset queue depth calculate the value of the letter of credit counter, which is used to represent the size of the idle forwarding capability, and the current out-of-queue depth is the value of the letter of credit counter.
  • the calculation module 1001 is specifically further configured to: compare the upper limit of forwarded data volume of the target out of the queue or the target outbound port within the preset time period with the data passing through the target out of the queue within the preset time period Or subtract the total amount of data at the target outbound port to obtain the first subtraction result; add the first subtraction result to the preset queue depth to obtain the addition result; add the addition result to the current out-of-queue depth The sum is subtracted to obtain a second subtraction result; the second subtraction result is multiplied by a preset coefficient to obtain the value of the letter of credit counter, wherein the unit of the value of the letter of credit counter is byte.
  • the calculation module 1001 is specifically further configured to: compare the upper limit of forwarded data volume of the target out of the queue or the target outbound port within the preset time period with the data passing through the target out of the queue within the preset time period Or subtract the total amount of data at the target outbound port to obtain the first subtraction result; add the first subtraction result to the preset queue depth to obtain the addition result; add the addition result to the current out-of-queue depth and subtract the sum to obtain the second subtraction result; multiply the second subtraction result by the preset coefficient to obtain the multiplication result; divide the multiplication result by the preset time length to obtain the value of the L/C counter Value, where the unit of the letter of credit counter is rate.
  • the network device 1000 is not the receiving end device, and the network device 1000 further includes: a sending module 1004, where the sending module 1004 is configured to send the second packet to a next-hop device.
  • the sending module 1004 is specifically configured to: send the second packet to the receiving end device, so that the receiving end device sends The sending end device sends an acknowledgment message carrying the decision result, and the acknowledgment message is used to instruct the sending end device to adjust the sending window or sending rate of the sending end device according to the decision result.
  • the network device 1000 is the receiving end device, and the network device 1000 further includes a sending module 1004, and the sending module 1004 is configured to send an acknowledgment message carrying the decision result to the sending end device, The confirmation message is used to instruct the sending device to adjust the sending window or sending rate of the sending device according to the decision result.
  • the decision-making module 1003 executes the step of "carrying the decision result in the first message to obtain the second message", that is, in When the decision-making module 1003 determines that the first message does not have a preset flag, it obtains a decision result according to the idle forwarding capability and the adjustment request, and carries the decision result in the first message to obtain a second message.
  • the sending module 1004 The second message is analyzed, and the decision result obtained by the analysis is carried in the confirmation message, and the confirmation message is sent to the sending end device, and the confirmation message is used to instruct the sending end device to follow the decision result carried in it Adjust the sending window of the sending device (when the adjustment request is a window adjustment request) or the sending rate (when the adjustment request is a rate adjustment request). 2)
  • the decision-making module 1003 does not perform the step of "carrying the decision result in the first message to obtain the second message", but forwards it according to the idle time when the decision-making module 1003 determines that the first message does not have a preset flag.
  • the capability and adjustment request obtains a decision result, the decision result is not carried in the first message, but is directly carried in the confirmation message, and the sending module 1004 sends the confirmation message to the sending end device, and the confirmation message is It is used to instruct the sending end device to adjust the sending window (when the adjustment request is a window adjustment request) or sending rate (when the adjustment request is a rate adjustment request) of the sending end device according to the decision result carried therein.
  • the confirmation message is specifically used to instruct the sending end device to reduce the The sending window or sending rate of the sending end device, wherein the reduction range is obtained according to a target preset value.
  • the confirmation message is used to instruct the sender device to increase the send window or send rate of the sender device according to the decision result, wherein , the magnitude of the increase is obtained from the value of the adjustment request.
  • the confirmation message is used to instruct the sender device not to adjust (ie neither increase nor decrease) the sender device according to the decision result.
  • the send window or send rate of the device is used to instruct the sender device not to adjust (ie neither increase nor decrease) the sender device according to the decision result.
  • FIG. 11 is a schematic structural diagram of the network device provided by the embodiment of the present application.
  • the network device 1100 can be deployed with the corresponding embodiment in FIG.
  • the described network device 1000 is used to implement the functions of the network device 1000 in the embodiment corresponding to FIG. Differences may include one or more central processing units (central processing units, CPU) 1122 and memory 1132, one or more storage media 1130 (such as one or more mass storage devices) for storing application programs 1142 or data 1144.
  • the memory 1132 and the storage medium 1130 may be temporary storage or persistent storage.
  • the program stored in the storage medium 1130 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the network device 1100 . Furthermore, the central processing unit 1122 may be configured to communicate with the storage medium 1130 , and execute a series of instruction operations in the storage medium 1130 on the network device 1100 .
  • the network device 1100 can also include one or more power supplies 1126, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1158, and/or, one or more operating systems 1141, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • one or more operating systems 1141 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the central processing unit 1122 is configured to execute the steps performed by the network device in the embodiment corresponding to FIG. 4 or FIG. 5 .
  • the central processing unit 1122 can be used to: firstly, calculate the idle forwarding capability of the target outgoing queue or the target outgoing port on the network device, wherein the idle forwarding capability is used to characterize the target outgoing queue (one or more The difference between the upper limit of the forwarded data volume of the target output port (one or more) and the current actual forwarding volume, which can specifically represent the target output queue (one or more) or the target output port ( One or more) the difference between the upper limit of forwarded data volume and the current actual forwarded volume within a certain preset time length (eg, 200us), the preset time length can be set by itself.
  • a certain preset time length eg, 200us
  • the network device is any device on the path between the sending end device and the receiving end device (including the sending end device and the receiving end device).
  • the central processing unit 1122 will not only calculate the idle forwarding capability of the target output queue or the target output port on the network device, but also obtain the message carrying the adjustment request, which can be called the first message.
  • the adjustment request may be a window adjustment request or a rate adjustment request, where the window adjustment request is used to instruct to adjust the sending window of the sender device, and the rate adjustment request is used to instruct to adjust the send rate of the sender device.
  • the network device After obtaining the first packet, it will first judge whether the first packet has a preset flag, and if the network device determines that the first packet does not have a preset flag, the network device forwards A decision result is obtained from the value of the capability and the value II of the adjustment request, and the decision result is carried in the first message to obtain a second message. Specifically, the network device obtains the decision result by comparing the value of the idle forwarding capability with the value II of the adjustment request. Therefore, the unit of the value of the idle forwarding capability and the value II of the adjustment request The units need to be consistent. If not, the network device needs to convert the two units so that the two units are consistent.
  • the device embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be A physical unit can be located in one place, or it can be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • the connection relationship between the modules indicates that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines.
  • the essence of the technical solution of this application or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a readable storage medium, such as a floppy disk of a computer , U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disk or optical disk, etc., including several instructions to make a computer device (which can be A personal computer, a training device, or a network device, etc.) executes the methods described in various embodiments of the present application.
  • a computer device which can be A personal computer, a training device, or a network device, etc.
  • all or part of them may be implemented by software, hardware, firmware or any combination thereof.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transferred from a website, computer, training device, or data
  • the center transmits to another website site, computer, training device or data center via wired (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.).
  • wired eg, coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium may be any available medium that can be stored by a computer, or a data storage device such as a training device or a data center integrated with one or more available media.
  • the available medium may be a magnetic medium (such as a floppy disk, a hard disk, or a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (solid state disk, SSD)), etc.

Landscapes

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

Abstract

本申请公开了一种网络设备的主动队列管理方法及网络设备,可应用于数据传输领域,包括:网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力(如,信用证计数器CC),空闲转发能力用于表征目标出队列或目标出端口的转发数据量上限与当前实际转发量的差值,之后网络设备获取携带了调整请求的第一报文,且在第一报文不具有预设标记的情况下,根据空闲转发能力和调整请求得到决策结果,并将决策结果携带于第一报文,得到第二报文。本申请实施例中,根据决策结果的不同,发送端设备调整发送窗口/速率的方式也不同,且本申请提出的新的AQM算法可实现网络设备上队列深度与瓶颈链路上的流数解耦,使得网络设备上的队列深度可自定义。

Description

一种网络设备的主动队列管理方法及网络设备
本申请要求于2021年6月28日提交中国专利局、申请号为202110721083.3、申请名称为“一种网络设备的主动队列管理方法及网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据传输领域,尤其涉及一种网络设备的主动队列管理方法及网络设备。
背景技术
主动队列管理算法(active queue management,AQM)通过在网络设备(如,路由器、交换机等)队列中丢弃或标记数据包将拥塞情况隐式或显式地通知源端,源端相应地减小数据发送速率来响应数据包的丢弃或标记,避免更严重的拥塞发生。其中,随机早期检测(random early detection,RED)和显式拥塞通知(explicit congestion notification,ECN)是网络设备中广泛采用的AQM,用于和传输层的拥塞控制协议配合以提升吞吐、降低时延。
RED/ECN的基本原理是交换机根据自身当前队列深度计算出一个概率p,并根据此概率p对经过的报文进行标记。概率p的计算方式如下公式(1)所示,其中,K min、K max、P max分别为概率下限、概率上限和预设概率值等参数,由该式可以得出,当队列深度q在K min和K max之间时,标记概率p随队列深度q线性增加。
Figure PCTCN2022100657-appb-000001
然而,RED/ECN只能提供“单比特”信号,即“拥塞”或者“不拥塞”(部分应用场景中可提供不同“拥塞”程度的等级),发送端只能依据此信号设计发送端的窗口调整算法。这类算法在发送端进行决策,存在一个普遍的特点:当交换机上的瓶颈端口上的流数(这里一条流定义为一个拥塞控制协议的实例控制的对象,例如,传输控制协议(transmission control protocol,TCP)的五元组)增加时,瓶颈端口上的平均队列深度也随之增加,进而带来排队时延的增加。而且,由于RED/ECN是根据队列标记报文,意味着必须在拥塞出现之后予以响应,而不能在拥塞出现之前予以控制。
发明内容
本申请实施例提供了一种网络设备的主动队列管理方法及网络设备,用于提出一种新的AQM算法,以实现网络设备上队列深度与瓶颈链路上的流数解耦,使得网络设备上的队列深度可自定义。
基于此,本申请实施例提供以下技术方案:
第一方面,本申请实施例首先提供一种网络设备的主动队列管理方法,可用于数据传输领域中,该方法包括:首先,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力,其中,该空闲转发能力用于表征网络设备上的目标出队列(一个或多个) 或目标出端口(一个或多个)的转发数据量上限与当前实际转发量之间的差值,具体可以是表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)在某个预设时长(如,200us)内的转发数据量上限与当前实际转发量之间的差值,该预设时长可自行设定。该网络设备为发送端设备与接收端设备路径上的任意一个设备(其中包括发送端设备和接收端设备)。网络设备除了会计算该网络设备上的目标出队列或目标出端口的空闲转发能力之外,也会获取携带了调整请求的报文,该报文可称为第一报文,该调整请求可以是窗口调整请求,也可以是速率调整请求,其中,窗口调整请求用于指示调整发送端设备的发送窗口,速率调整请求用于指示调整发送端设备的发送速率。该网络设备在获取到该第一报文之后,会先判断该第一报文是否具有预设标记,在该网络设备确定该第一报文不具有预设标记的情况下,该网络设备根据该空闲转发能力的值和该调整请求的值得到决策结果,并将该决策结果携带于该第一报文,从而得到第二报文。具体地,该网络设备通过比较该空闲转发能力的值与该调整请求的值的大小来得到决策结果,因此,在比较大小的过程中空闲转发能力的值的单位与调整请求的值的单位需保持一致,若不一致,该网络设备还需对这两者的单位进行转换,以使得两者的单位一致。
这里需要注意的是,当网络设备是发送端设备时,这里有两种处理方式:1)发送端设备执行“获取携带了调整请求的第一报文”的步骤,即该第一报文由该发送端设备自行生成(此时生成的第一报文为初始报文,不具有预设标记),并由该发送端设备将该调整请求携带于该第一报文,发送端设备再根据该调整请求的值与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。2)发送端设备不执行“获取携带了调整请求的第一报文”的步骤,即该发送端设备还可以不将调整请求携带于该第一报文(此时生成的第一报文为初始报文,不具有预设标记),而是在计算得到空闲转发能力的值之后,直接根据该调整请求的值与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。
本申请上述实施方式提出了一种新的AQM算法,以实现网络设备上队列深度与瓶颈链路上的流数解耦,使得网络设备上的队列深度可自定义。
在第一方面的一种可能的实现方式中,在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值(调整请求的值可用II表示)确定空闲转发能力的值≥调整请求的值II,在这种情况下,该网络设备得出的决策结果为“授予”,即将授予信息作为该决策结果,该授予信息用于表征允许发送端设备增加发送窗口或发送速率。需要说明的是,在本申请的另一些实施方式中,在第一报文不具有预设标记,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定空闲转发能力的值≥调整请求的值II的情况下,该网络设备还可以进一步将当前空闲转发能力的值减去所述调整请求的值II作为新的空闲转发能力的值,以空闲转发能力的值为信用证计数器的值CC为例,即CC=CC-II。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且空闲转发能力的值≥调整请求的值II的情形下,该网络设备确定的决策结果是授予信息,具备可实现性。同 时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值以及调整请求的值II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
在第一方面的一种可能的实现方式中,在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定0≤空闲转发能力的值<调整请求的值II,在这种情况下,该网络设备按照预设概率对该第一报文进行标记,具体地,网络设备按照预设概率对该第一报文进行标记的方式可以是按照预先设定好的固定概率p标记该第一报文,也可以是在每次确定0≤空闲转发能力的值<调整请求的值II之后,计算得到当前轮次的动态概率p’,再以该动态概率p’标记该第一报文,本申请对此不做限定。这里需要注意的是,按照预设概率对该第一报文标记会有如下两种结果,结果不同,该网络设备得到的决策结果也不同,当该第一报文被该网络设备以预设概率成功标记上所述预设标记,则该网络设备将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为“标记”,该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。同样需要说明的是,在本申请的另一些实施方式中,在第一报文不具有预设标记,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定0≤空闲转发能力的值<调整请求的值II的情况下,该网络设备还可以进一步将与空闲转发能力对应的赤字计数器(deficit counter,DC)的值增加目标预设值(可用β表示)作为新的赤字计数器的值(赤字计数器的值可用DC表示),即DC=DC+β。这里需要注意的是,DC是与空闲转发能力的值一一对应的,一个空闲转发能力的值对应有一个DC。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且0≤空闲转发能力的值<调整请求的值II的情形下,该网络设备需要按照预设概率标记第一报文,若该第一报文被成功标记上预设报文,该网络设备确定的决策结果是标记信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值、DC以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
在第一方面的一种可能的实现方式中,当该第一报文未被该网络设备以预设概率标记上所述预设标记,则该网络设备进一步比较该空闲转发能力对应的赤字计数器的值DC与调整请求的值II之间的大小(前提也是两者单位保持一致),之后基于比较的结果来得到具体的决策结果。同样这里需要注意的是,比较的结果不同,该网络设备得到的决策结果也不同,当该空闲转发能力对应的赤字计数器的值DC≥调整请求的值II,则该网络设备得出的决策结果为“授予”,即将授予信息作为该决策结果,该授予信息用于表征允许发送端设备增加发送窗口或发送速率。需要说明的是,在本申请的另一些实施方式中,在该第一报文未被网络设备以预设概率标记上预设标记,且该网络设备通过比较赤字计数器的值DC与调整请求的值II确定赤字计数器的值DC≥调整请求的值II的情况下,该网络设备还可 以进一步将当前赤字计数器的值DC减去所述调整请求的值II作为新的赤字计数器的值DC,即DC=DC-II。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且0<空闲转发能力的值<调整请求的值II的情形下,该网络设备需要按照预设概率标记第一报文,若该第一报文未被标记上预设报文,则还需进一步比较赤字计数器的值DC与调整请求的值II之间的大小,并且在赤字计数器的值DC≥调整请求的值II的情况下,该网络设备确定的决策结果是授予信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值、DC以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
在第一方面的一种可能的实现方式中,在网络设备确定第一报文未被标记有所述预设标记,且该空闲转发能力对应的赤字计数器的值DC<调整请求的值II,则该网络设备得出的决策结果为“拒绝”,即将拒绝信息作为该决策结果,该拒绝信息用于表征不允许发送端设备调整发送窗口或发送速率。
在本申请上述实施方式中,阐述了在第一报文未被预设概率标记上预设标记,且赤字计数器的值DC<调整请求的值II的情形下,该网络设备确定的决策结果是拒绝信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值、DC以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
在第一方面的一种可能的实现方式中,在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定空闲转发能力的值<0,在这种情况下,该网络设备对该第一报文标记该预设标记,并将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为“标记”,该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且空闲转发能力的值<0的情形下,该网络设备对该第一报文进行标记,并确定决策结果是标记信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
在第一方面的一种可能的实现方式中,该网络设备在获取到该第一报文之后,若通过对第一报文是否具有预设标记的判断得出该第一报文具有预设标记,那么该网络设备将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为 “标记”,该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。需要说明的是,在该第一报文一开始就被该网络设备确定具有预设标记的情况下,该网络设备还可以进一步将空闲转发能力的值增加目标预设值β作为新的空闲转发能力的值,以空闲转发能力的值为CC为例,即CC=CC+β。
在本申请上述实施方式中,阐述了在第一报文具有预设标记,则网络设备无需比较空闲转发能力的值与调整请求的值之间的大小,而是直接确定标记信息为决策结果,实现了当满足不同条件时得到不同的决策结果,具备灵活性。
在第一方面的一种可能的实现方式中,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的过程具体可以是:网络设备根据预设时长τ内的目标出队列或目标出端口的转发数据量上限(可用B*τ表示,B为链路带宽或链路速率,此处不做限定)以及该预设时长τ内经过该目标出队列或该目标出端口的数据总量(可用TxSize表示)计算信用证计数器(credit counter,CC)的取值,其中,该信用证计数器的值(可用CC表示)就用于表征所述空闲转发能力的大小。
在本申请上述实施方式中,阐述了网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的一种实现方式是基于2种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,涉及的参数量少,便于实现。
在第一方面的一种可能的实现方式中,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的过程具体还可以是:网络设备根据预设时长τ内的目标出队列或目标出端口的转发数据量上限B*τ、该预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize以及当前出队列深度计算信用证计数器的取值,其中,当前出队列深度为该目标出队列的深度或该目标出端口对应的出队列的深度,可用q表示。需要注意的是,在本申请实施例中,q可以是指所有当前出队列深度之和,也可以是指所有当前出队列深度值最大的那个,还可以是指大于某个预设阈值的当前出队列深度值(一个或多个),具体本申请对q表征的含义不做限定。为便于阐述,以下实施例中的q均表征当前出队列深度之和,后续不再赘述。
在本申请上述实施方式中,阐述了网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的一种实现方式是基于3种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,提高了计算信用证计数器的值的精确度。
在第一方面的一种可能的实现方式中,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的过程具体还可以是:网络设备根据预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize、当前出队列深度q以及预设队列深度(可用Q t表示)计算信用证计数器的取值。需要说明的是,在本申请实施例中,该预设队列深度Q t为用户自定义的值,例如,Q t可以根据实际需要取0KB、10KB、20KB等具体的值,具体本申请对此不做限定。如,当预设队列深度Q t设置为0KB,即表示目标出队列的队列深度或目标出端口对应的出队列的深度需要维持在0,这样可达到极低的排队时延。
在本申请上述实施方式中,阐述了网络设备计算该网络设备上的目标出队列或目标出 端口的空闲转发能力的一种实现方式是基于4种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,其中额外引入了预设队列深度Q t,从而可将网络设备上的出队列深度控制在指定的深度值上,减少了排队时延。
在第一方面的一种可能的实现方式中,网络设备根据预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、预设时长τ内经过目标出队列或目标出端口的数据总量TxSize、当前出队列深度q以及预设队列深度Q t计算信用证计数器CC的取值的具体实现方式可以是:首先,网络设备将预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ与预设时长τ内经过目标出队列或目标出端口的数据总量相减TxSize,得到第一相减结果,再将第一相减结果与预设队列深度Q t相加,得到相加结果,并将相加结果与当前出队列深度之和q(在一些实施例中,也可以是当前队列深度的最大值,此处不做限定)相减,得到第二相减结果,最后将第二相减结果与预设系数相乘,得到信用证计数器的取值,其中,信用证计数器的取值的单位为字节。
在本申请上述实施方式中,阐述了一种计算信用证计数器CC的取值的具体实现方式,该算法复杂度低,不涉及多次乘法和除法操作,从而降低了存储开销。
在第一方面的一种可能的实现方式中,网络设备根据预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、预设时长τ内经过目标出队列或目标出端口的数据总量TxSize、当前出队列深度q以及预设队列深度Q t计算信用证计数器CC的取值的具体实现方式可以是:首先,网络设备将预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ与预设时长τ内经过目标出队列或目标出端口的数据总量相减TxSize,得到第一相减结果,再将第一相减结果与预设队列深度Q t相加,得到相加结果,并将相加结果与当前出队列深度之和q(在一些实施例中,也可以是当前队列深度的最大值,此处不做限定)相减,得到第二相减结果,最后将第二相减结果与预设系数相乘,得到的相乘结果再除以预设时长τ,最终得到信用证计数器的取值,其中,信用证计数器的取值的单位为速率。
在本申请上述实施方式中,阐述了一种计算信用证计数器CC的取值的另一种具体实现方式,具备可选择性和灵活性。
在第一方面的一种可能的实现方式中,若网络设备不为接收端设备,说明该网络设备不是该传输路径上的最后一跳设备,因此,该网络设备还可以进一步将得到的第二报文(即携带了决策结果的第一报文)向下一跳设备发送。
在第一方面的一种可能的实现方式中,阐述了当网络设备不是最后一跳设备时,还需将得到第二报文继续下发,以实现报文的传递,具备可实现性。
在第一方面的一种可能的实现方式中,若该网络设备的下一跳设备就是接收端设备,那么接收端设备接收到该网络设备发送的第二报文后,会解析该第二报文,并将决策结果携带于确认报文中向发送端设备发送(不限制接收端设备向发送端设备返回确认报文的路径必须是原路径),该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
在本申请上述实施方式中,具体阐述了若下一跳设备就是接收端设备,说明当前网络 设备得到的决策结果就是最终决策结果(不会被改写),该最终决策结果需携带于确认报文中返回发送端设备,发送端设备就可基于该最终决策结果调整发送窗口或发送速率,具备灵活性。
在第一方面的一种可能的实现方式中,若网络设备为接收端设备,这里也有两种处理方式:1)接收端设备执行“将决策结果携带于第一报文,得到第二报文”的步骤,即在接收端设备确定第一报文不具有预设标记的情况下,该接收端设备根据空闲转发能力和调整请求得到决策结果,并将决策结果携带于第一报文,得到第二报文,之后,对该第二报文进行解析,解析得到的决策结果携带于确认报文中,并将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。2)接收端设备不执行“将决策结果携带于第一报文,得到第二报文”的步骤,而是在接收端设备确定第一报文不具有预设标记的情况下,该接收端设备根据空闲转发能力和调整请求得到决策结果,该决策结果不携带于第一报文,而是直接携带于确认报文中,并将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
在本申请上述实施方式中,具体阐述了若当前网络设备就是接收端设备,接收端设备如何处理决策结果的实现方式,具备可选择性和广泛适用性。
在第一方面的一种可能的实现方式中,若决策结果是标记信息,那么确认报文则具体用于指示发送端设备根据该决策结果降低发送端设备的发送窗口或发送速率,其中,降低的幅度根据目标预设值β得到,例如,可以是将发送端设备的发送窗口或发送速率在原有基础上降低β,也可以是将发送端设备的发送窗口或发送速率在原有基础上降低k 1*β,其中,k 1为自定义参数,k 1>0。
在本申请上述实施方式中,阐述了在确认报文中携带的决策结果不同,发送端设备基于该确认报文调整发送窗口和发送速率的方式也不同,调整逻辑简单易实现,且具备可选择性。
在第一方面的一种可能的实现方式中,若决策结果是授予信息,那么确认报文则具体用于指示发送端设备根据该决策结果增加发送端设备的发送窗口或发送速率,其中,增加的幅度根据调整请求的值II得到,例如,可以是将发送端设备的发送窗口或发送速率在原有基础上增加II,也可以是将发送端设备的发送窗口或发送速率在原有基础上增加k 2*II,其中,k 2为自定义参数,k 2>0。
在本申请上述实施方式中,阐述了在确认报文中携带的决策结果不同,发送端设备基于该确认报文调整发送窗口和发送速率的方式也不同,调整逻辑简单易实现,且具备可选择性。
在第一方面的一种可能的实现方式中,若决策结果是拒绝信息,那么确认报文则具体用于指示发送端设备根据该决策结果不增加也不降低(即不调整)发送端设备的发送窗口或发送速率。
在本申请上述实施方式中,阐述了在确认报文中携带的决策结果不同,发送端设备基于该确认报文调整发送窗口和发送速率的方式也不同,调整逻辑简单易实现,且具备可选择性。
本申请实施例第二方面提供一种网络设备,该网络设备具有实现上述第一方面或第一方面任意一种可能实现方式的方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。
本申请实施例第三方面提供一种网络设备,可以包括存储器、处理器以及总线系统,其中,存储器用于存储程序,处理器用于调用该存储器中存储的程序以执行本申请实施例第一方面或第一方面任意一种可能实现方式的方法。
本申请实施例第四方面提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机可以执行上述第一方面或第一方面任意一种可能实现方式的方法。
本申请实施例第五方面提供了一种计算机程序,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面任意一种可能实现方式的方法。
本申请实施例第六方面提供了一种芯片,该芯片包括至少一个处理器和至少一个接口电路,该接口电路和该处理器耦合,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,至少一个处理器用于运行计算机程序或指令,其具有实现如上述第一方面或第一方面任意一种可能实现方式的方法的功能,该功能可以通过硬件实现,也可以通过软件实现,还可以通过硬件和软件组合实现,该硬件或软件包括一个或多个与上述功能相对应的模块。此外,该接口电路用于与该芯片之外的其它模块进行通信。
附图说明
图1为本申请实施例提供的网络设备上的出端口与出队列之间的关系的一个示意图;
图2为本申请实施例提供的系统架构的一个示意图;
图3为本申请实施例提供的系统架构的另一示意图;
图4为本申请实施例提供的网络设备的主动队列管理方法的一个流程示意图;
图5为本申请实施例提供的网络设备的主动队列管理方法的另一流程示意图;
图6为本申请实施例提供的发送端设备根据决策结果调整发送窗口或发送速率的一个流程示意图;
图7为本申请实施例提供的利用本申请实施例提供的网络设备的主动队列管理方法实现慢启动算法的一个框架示意图;
图8为本申请实施例提供的利用本申请实施例提供的网络设备的主动队列管理方法实现AIMD算法的一个框架示意图;
图9为本申请实施例提供的本申请方法与已有方法的一个效果对比示意图;
图10为本申请实施例提供的网络设备的一个结构示意图;
图11为本申请实施例提供的网络设备的另一结构示意图。
具体实施方式
本申请实施例提供了一种网络设备的主动队列管理方法及网络设备,用于提出一种新的AQM算法,以实现网络设备上队列深度与瓶颈链路上的流数解耦,使得网络设备上的队列深度可自定义。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
为了更好地理解本申请实施例的方案,下面先对本申请实施例可能涉及的相关术语和概念进行介绍。应理解的是,相关的概念解释可能会因为本申请实施例的具体情况有所限制,但并不代表本申请仅能局限于该具体情况,在不同实施例的具体情况可能也会存在差异,具体此处不做限定。
(1)网络设备
网络设备及部件是连接到网络中的物理实体。网络设备的种类繁多,且与日俱增。基本的网络设备有:计算机(无论其为个人电脑或服务器)、集线器、交换机、网桥、路由器、网关、网络接口卡(NIC)、无线接入点(WAP)、打印机和调制解调器、光纤收发器、光缆等。具体地,不论是局域网、城域网还是广域网,在物理上通常都是由网卡、集线器、交换机、路由器、网线、RJ45接头等网络连接设备和传输介质组成的。网络设备又包括中继器、网桥、路由器、网关、防火墙、交换机等设备。
需要注意的是,在本申请实施例中,网络设备除了上述传统所述的设备之外,还可以是手机、智能手环、智能手表等终端设备,在数据传输路径上,网络设备具体可以是发送端设备与接收端设备路径上的任意一个设备(其中包括发送端设备和接收端设备)。
(2)出队列
在本申请实施例中,当网络设备上的队列类型既有入队列又有出队列的情况下时,出队列就是传统所述的出队列;当网络设备上只有一种队列类型的情况下时,那么这种队列类型就为本申请所述的出队列(即网络设备必须有出队列,但可能没有入队列)。需要注意的是,在一个网络设备上,出队列可以有一个,也可以有多个。
(3)出端口
在本申请实施例中,网络设备上的出端口可以是一个,也可以是多个,一个出端口下可以对应有一个出队列,也可以对应有多个出队列,每个出端口对应的出队列的数量可以相同,也可以不相同,本申请对此不做限定。
这里需要说明的是,网络设备(如,交换机)都有入端口和出端口,入端口和出端口都是相对于数据流来说的,因此入端口和出端口没有对应关系,对于一些数据流来说某个端口是出端口,但对于相反流向的数量流来说又是入端口。具体可参阅图1,图1为本申请实施例提供的网络设备上的出端口与出队列之间的关系的一个示意图,其中,m为该网 络设备的出端口数量,m≥1,n 1、n 2、……n m分别为这m个出端口各自对应的出队列的数量,n 1≥1,n 2≥1,……,n m≥1。并且,n 1、n 2、……n m的取值可以各不相同,也可以部分相同,还可以全部相同,这里不做限定。
(4)空闲转发能力
本申请实施例中,空闲转发能力用于表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)的转发数据量上限与当前实际转发量之间的差值,具体可以是表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)在某个预设时长(如,200微秒(us))内的转发数据量上限与当前实际转发量之间的差值,该预设时长可自行设定。不同对应情况下,计算网络设备的空闲转发能力的具体情形分别如下:
a、若计算的网络设备的空闲转发能力是与1个出队列对应,则计算的是该出队列的空闲转发能力。在本申请实施例中,计算该空闲转发能力的目的是为了让该出队列深度在拥塞情况下也能维持在一个小的水平。
b、若计算的网络设备的空闲转发能力是与p个出队列对应,则计算的是这p个出队列的总的空闲转发能力。在本申请实施例中,计算该空闲转发能力的目的是为了让这p个出队列的深度在拥塞情况下也能整体维持在一个小的水平。
c、若计算的网络设备的空闲转发能力是与1个出端口对应,则计算的是该出端口对应的出队列(可能对应的是一个出队列,也可能对应的是多个出队列)的总的空闲转发能力。在本申请实施例中,计算该空闲转发能力的目的是为了让该出端口下的所有出队列的深度在拥塞情况下也能整体维持在一个小的水平。
d、若计算的网络设备的空闲转发能力是与q个出端口对应,则计算的是这q个出端口各自对应的出队列(每个出端口至少对应有一个出队列)的总的空闲转发能力。在本申请实施例中,计算该空闲转发能力的目的是为了让这q个出端口下的所有出队列的深度在拥塞情况下也能整体维持维持在一个小的水平。
为便于理解,下面以计算网络设备上的一个出端口的空闲转发能力为例进行介绍:假设网络设备上的这一个出端口为100Gbps的端口,在预设时长100微秒(us)内的转发数据量最大为:100Gbps*10us=125KB,125KB即为该出端口在预设时长100us内的转发数据量上限(也可以称为以数据量为衡量的最大转发能力),如果该出端口在预设时长100us内的实际转发量是100KB,那么该出端口的空闲转发能力就是25KB。
需要注意的是,在本申请的一些实施方式中,空闲转发能力也可以体现为空闲带宽,若以空闲带宽表征空闲转发能力,则需要对单位进行换算,依然以上述例子为例:空闲带宽就可表示为25KB/10us=20Gbps。
还需要注意的是,在本申请实施例中,空闲转发能力既可以数据量衡量,也可以报文个数衡量,本申请对此不做限定,为便于阐述,在本申请下述实施例中,均以数据量来衡量空闲转发能力的大小。
(5)消息传递
计算机系统中,进程间或软件组件间的一类数据通信方法的统称。它将待通信的数据抽象并封装为“消息”,参与通信的双方或多方通过调用消息发送、接收等原语实现消息在 进程或组件之间的传递,从而完成数据通信。
(6)数据流图
数据流图是一种通过表达数据在计算逻辑中的流动方向和计算关系,从而反映计算逻辑的设计原理及实现流程的图式数据结构。
(7)数据流图参数
在数据流图中,参数是指图上计算节点的连接边所承载的、用于计算节点处理或由计算节点反馈的数据。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
首先,对本申请实施例方法所应用的系统架构以及整体流程进行说明,具体请参阅图2以及图3,图2为本申请实施例提供的系统架构的一个示意图,图3为本申请实施例提供的系统架构的另一示意图,其中,多台服务器通过一台(或多台,图2示意的是一台的情况,图3示意的是多台的情况)网络设备组网,在本申请实施例中,服务器可以是云侧服务器、数据中心网络、集群等传统所述的服务器,也可以是终端设备(如,虚拟现实(virtual reality,VR)设备、手机、平板、笔记本电脑、智能穿戴设备等)、轮式移动设备(如,自动驾驶车辆、辅助驾驶车辆等),具体本申请对此不做限定。本申请所述的网络设备则可以是发送端设备与接收端设备路径上的任意一个设备(其中包括发送端设备以及接收端设备)。但在图2以及图3中,所示意的网络设备不包括发送端设备也不包括接收端设备,即图2中的网络设备是发送端设备与接收端设备之间路径的仅有一个设备,类似地,图3中的网络设备则是发送端设备与接收端设备之间路径的任意一个设备。下面基于图3示意的系统结构对本申请实施例提供的网络设备的主动队列管理方法的整体流程进行阐述,具体可以包括如下几个步骤:
步骤1、网络设备周期性计算该网络设备上目标出队列(或目标出端口)的空闲转发能力,目标出队列可以包括一个或多个出队列,目标出端口可以包括一个或多个出端口,该网络设备是发送端设备与接收端设备之间路径的任意一个设备。
步骤2、发送端设备发出的报文中携带调整请求,该调整请求可以是窗口调整请求,也可以是速率调整请求,本申请对此不做限定,该窗口调整请求(或速率调整请求)中会携带需要增加多少发送窗口(或发送速率)的具体取值,该具体取值可用II表示,其中,窗口调整请求用于指示调整发送端设备的发送窗口,速率调整请求用于指示调整发送端设备的发送速率。这里的发送端设备为组网结构中n个发送端设备中的任意一个,n≥1。
步骤3、发送端设备发出的报文到达该网络设备后,该网络设备首先会判断该报文是否标记有预设标记,在该报文没有预设标记的情况下,该网络设备根据步骤1中计算的空闲转发能力的值与步骤2中的窗口调整请求(或速率调整请求)的值得出决策结果,该决策结果由该报文携带,该决策结果则用于指示发送端设备调整发送窗口(或发送速率),该决策结果包括如下三种情形:①将授予信息作为决策结果,用于指示授予该发送端设备增加发送窗口(或发送速率);②将拒绝信息作为决策结果,用于指示拒绝该发送端设备调整发送窗口(或发送速率)。③对该报文标记预设标记,并将标记信息作为决策结果,用于指 示降低该发送端设备的发送窗口(或发送速率)。需要注意的是,若该网络设备判断该报文是否标记有预设标记的结果是该报文被标记有预设标记,此时无需根据空闲转发能力的值与窗口调整请求(或速率调整请求)的值得出决策结果,而是直接将标记信息作为决策结果,用于指示降低该发送端设备的发送窗口(或发送速率)。这种情形可归为上述第③种情形,即上述第三种情形可总结为:③若该报文被标记有预设标记(无论是前序网络设备标记的,还是自身标记的),将标记信息作为决策结果,用于指示降低该发送端设备的发送窗口(或发送速率)。
步骤4、携带了决策结果的报文到达接收端设备后,接收端设备解析出该决策结果,将该决策结果携带在确认报文(acknowledge,ACK)中返回发送端设备。
步骤5、发送端设备收到确认报文后,解析确认报文中携带的决策结果,并根据该决策结果调整发送窗口(或发送速率),调整方式包括:增加发送窗口(或发送速率)、不增加也不降低发送窗口(或发送速率)、降低发送窗口(或发送速率)。
图3所示的系统结构中包括的网络设备是发送端设备与接收端设备之间路径的任意一个设备,即在图3中,所示意的网络设备不包括发送端设备也不包括接收端设备,且网络设备有多个,那么该网络设备可能是发送端设备之后的第一跳设备,也可能是接收端设备之前的最后一跳设备,具体此处不做限定。
需要说明的是,假设该网络设备的前一跳设备不是发送端设备而是另一个网络设备,那么前一跳设备决策出来的①和②这两种决策结果有可能被当前该网络设备改写,若前一跳设备决策出来的是③这种决策结果,即前面的任意一个网络设备把报文标记上了预设标记,后续的网络设备得出的都只能是③这种决策结果。具体的改写规则包括但不限于如下方式:
a、前序网络设备的决策结果如果是①的情形,即决策结果是授予信息,那么当前该网络设备可能得出的决策结果是上述①、②、③,即决策结果可能是:授予信息、拒绝信息、标记信息。
b、前序网络设备的决策结果如果是②的情形,即决策结果是拒绝信息,那么当前该网络设备可能得出的决策结果是上述②、③,即决策结果可能是:拒绝信息、标记信息。
c、前序网络设备的决策结果如果是③的情形,即决策结果是标记信息,那么当前该网络设备可能得出的决策结果是上述③,即决策结果只能是:标记信息。
以上是基于图3示意的系统结构对本申请实施例提供的网络设备的主动队列管理方法的整体流程进行阐述,下面基于图2示意的系统结构对本申请实施例提供的网络设备的主动队列管理方法的整体流程进行阐述,具体可以包括如下几个步骤:
步骤1、网络设备周期性计算该网络设备上目标出队列(或目标出端口)的空闲转发能力,目标出队列可以包括一个或多个出队列,目标出端口可以包括一个或多个出端口。
步骤2、发送端设备发出的报文中携带调整请求,该调整请求可以是窗口调整请求,也可以是速率调整请求,本申请对此不做限定,该窗口调整请求(或速率调整请求)用于指示调整发送端设备的发送窗口(或发送速率),这里的发送端设备为组网结构中n个发送端设备中的任意一个,n≥1。
步骤3、发送端设备发出的报文直接到达该网络设备后,由于该报文由发送端发出时不携带预设标记,因此该网络设备无需判断该报文是否被标记过,而是直接根据步骤1中计算的空闲转发能力的值与步骤2中的窗口调整请求(或速率调整请求)的值得出决策结果,该决策结果由该报文携带,该决策结果则用于指示发送端设备调整发送窗口(或发送速率),该决策结果包括如下三种情形:①将授予信息作为决策结果,用于指示授予该发送端设备增加发送窗口(或发送速率);②将拒绝信息作为决策结果,用于指示拒绝该发送端设备调整发送窗口(或发送速率)。③对该报文标记预设标记,并将标记信息作为决策结果,用于指示降低该发送端设备的发送窗口(或发送速率)。
步骤4、携带了决策结果的报文到达接收端设备后,接收端设备解析出该决策结果,将该决策结果携带在确认报文中返回发送端设备。
步骤5、发送端设备收到确认报文后,解析确认报文中携带的决策结果,并根据该决策结果调整发送窗口(或发送速率),调整方式包括:增加发送窗口(或发送速率)、不增加也不降低发送窗口(或发送速率)、降低发送窗口(或发送速率)。
需要说明的是,不管是图2对应的整体流程的步骤还是图3对应的整体流程的步骤,步骤1和步骤2之前没有执行上的先后之分,可以先执行步骤1,再执行步骤2,也可以先执行步骤2,再执行步骤1,还可以同时执行步骤1和步骤2,具体此处不做限定。
综上所述,图2对应的整体流程的步骤与图3对应的整体流程的步骤之间的区别仅在于:1)图3中由于发送端设备与接收端设备之间路径的网络设备存在多个,因此每个网络设备都需对接收到的来自上一跳设备的报文进行是否具有预设标记的判断,而图2中的发送端设备与接收端设备之间路径的网络设备只有一个,因此该网络设备接收的报文是直接来自发送端设备的,该报文无预设标记,因此无需进行是否具有预设标记的判断;2)图3中的当前网络设备可能对前一跳设备发送的报文中携带的决策结果(如有)进行改写,图2中的当前网络设备只有一个,决策结果均有自身写入,不存在改写的情况。
这里需要说明的是,在本申请实施例中,由于网络设备还可以是发送端设备或接收端设备,当该网络设备作为发送端设备时,实质就是上述图2或图3对应的网络设备所执行的步骤与发送端设备所执行的步骤融合为一个设备来执行,其具体的执行步骤可参阅上述图2或图3对应的网络设备和发送端设备,此处不予赘述;当该网络设备作为接收端设备时,实质就是上述图2或图3对应的网络设备所执行的步骤与接收端设备所执行的步骤融合为一个设备来执行,其具体的执行步骤可参阅上述图2或图3对应的网络设备和接收端设备,此处不予赘述。
结合上述对系统架构以及整体流程的描述,下面开始对本申请实施例提供的网络设备的主动队列管理方法进行说明具体请参阅图4,图4为本申请实施例提供的网络设备的主动队列管理方法的一个流程示意图,该方法具体可以包括如下步骤:
401、网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力,该空闲转发能力用于表征该目标出队列或该目标出端口的转发数据量上限与当前实际转发量之间的差值,该网络设备为发送端设备与接收端设备路径上的任意一个设备。
首先,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力,其中, 该空闲转发能力用于表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)的转发数据量上限与当前实际转发量之间的差值,具体可以是表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)在某个预设时长(如,200us)内的转发数据量上限与当前实际转发量之间的差值,该预设时长可自行设定。该网络设备为发送端设备与接收端设备路径上的任意一个设备(其中包括发送端设备和接收端设备)。
需要说明的是,在本申请的一些实施方式中,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的计算过程可以是周期性计算,例如,每隔时长τ(此时τ为周期时长)计算一次;该计算过程也可以是非周期性计算,例如,第一次间隔时长τ1计算一次,第二次间隔时长τ2一次,依次类推,具体本申请对该计算过程不做限定。为便于阐述,在以下实施例中均以网络设备基于预设时长τ周期性计算该网络设备上的目标出队列或目标出端口的空闲转发能力。
还需要说明的是,在本申请的一些实施方式中,网络设备计算该网络设备上的目标出队列或目标出端口的空闲转发能力的过程具体包括但不限于:
a、网络设备根据预设时长τ内的目标出队列或目标出端口的转发数据量上限(可用B*τ表示,B为链路带宽)以及该预设时长τ内经过该目标出队列或该目标出端口的数据总量(可用TxSize表示)计算信用证计数器(credit counter,CC)的取值,其中,该信用证计数器的值(可用CC表示)就用于表征所述空闲转发能力的大小。
b、网络设备根据预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、该预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize以及当前出队列深度计算信用证计数器的取值,其中,当前出队列深度为该目标出队列的深度或该目标出端口对应的出队列的深度,可用q表示。需要注意的是,在本申请实施例中,q可以是指所有当前出队列深度之和,也可以是指所有当前出队列深度值最大的那个,还可以是指大于某个预设阈值的当前出队列深度值(一个或多个),具体本申请对q表征的含义不做限定。为便于阐述,以下实施例中的q均表征当前出队列深度之和,后续不再赘述。
c、网络设备根据预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize、当前出队列深度q以及预设队列深度(可用Q t表示)计算信用证计数器的取值。需要说明的是,在本申请实施例中,该预设队列深度Q t为用户自定义的值,例如,Q t可以根据实际需要取0KB、10KB、20KB等具体的值,具体本申请对此不做限定。如,当预设队列深度Q t设置为0KB,即表示目标出队列的队列深度或目标出端口对应的出队列的深度需要维持在0,这样可达到极低的排队时延。
综上所述,上述三种计算网络设备上的目标出队列或目标出端口的空闲转发能力的方式的区别在于:方式a是基于2种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,涉及的参数量少,便于实现;方式b是基于3种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,提高了计算信用证计数器的值的精确度;方式c是基于4种参数计算该网络设备上的目标出队列或目标出端口的空闲转发能力,其中额外引入了预设队列深度Q t,从而可将网络设备上的出队列深度控制在指定的深度值上,减少 了排队时延,并让队列深度与流数解绑。为便于阐述,以下实施例均以方式c为例对计算该网络设备上的目标出队列或目标出端口的空闲转发能力的过程进行示意。
这里需要注意的是,当前出队列深度为目标出队列的深度或目标出端口对应的出队列的深度,当前出队列深度之和就为目标出队列的深度之和或目标出端口对应的出队列的深度之和,当前出队列深度之和可以是瞬时当前出队列深度之和,也可以是预设时长T内的平均当前出队列深度之和,具体本申请对此不做限定。
为便于理解何为瞬时当前队列深度之和、平均当前队列深度之和、最大当前瞬时队列深度以及最大当前平均队列深度,下面分别举例进行示意:
(1)瞬时当前队列深度之和
a、若当前出队列深度之和为目标出队列的深度之和,假设目标出队列包括出队列1、出队列2、出队列3,且在当前时刻t 0,出队列1、出队列2、出队列3的队列深度分别为L 1、L 2、L 3,那么在当前时刻t 0的瞬时当前队列深度之和L all就为L all=L 1+L 2+L 3
b、若当前出队列深度之和为目标出端口的深度之和,假设目标出端口包括出端口1和出端口2,出端口1对应有出队列1、出队列2,出端口2对应有出队列3、出队列4、出队列5,且在当前时刻t 0,出队列1、出队列2、出队列3、出队列4、出队列5的队列深度分别为L 1、L 2、L 3、L 4、L 5,那么在当前时刻t 0的瞬时当前队列深度之和L all就为L all=L 1+L 2+L 3+L 4+L 5
(2)平均当前队列深度之和
a、若当前出队列深度之和为目标出队列的深度之和,假设目标出队列包括出队列1、出队列2、出队列3,且在预设时长T内,每隔一段时间记录一次出队列1、出队列2、出队列3的瞬时队列深度,假设在预设时长T内出队列1、出队列2、出队列3各自被记录到3次瞬时队列深度,分别为L 11、L 12、L 13、L 21、L 22、L 23、L 31、L 32、L 33,那么该平均当前队列深度之和L arv=(L 11+L 12+L 13+L 21+L 22+L 23+L 31+L 32+L 33)÷3,其中分母“3”为在预设时长T内每个出队列各自被记录的瞬时队列深度的次数。
b、若当前出队列深度之和为目标出端口的深度之和,计算平均当前队列深度之和是类似的,具体此处不予赘述。
(3)最大瞬时当前队列深度
a、若当前出队列深度为目标出队列的深度,假设目标出队列包括出队列1、出队列2、出队列3,且在当前时刻t 0,出队列1、出队列2、出队列3的队列深度分别为L 1、L 2、L 3,且L 1>L 2,L 1>L 3,说明L 1是当前队列深度L 1、L 2、L 3中最大的一个,则当前时刻t 0的最大瞬时当前队列深度就为L 1
b、若当前出队列深度为目标出端口的深度,假设目标出端口包括出端口1和出端口2,出端口1对应有出队列1、出队列2,出端口2对应有出队列3、出队列4、出队列5,且在当前时刻t 0,出队列1、出队列2、出队列3、出队列4、出队列5的队列深度分别为L 1、L 2、L 3、L 4、L 5,且L 3是当前队列深度L 1、L 2、L 3、L 4、L 5中最大的一个,则当前时刻t 0的最大瞬时当前队列深度就为L 3
(4)最大平均当前队列深度
a、若当前出队列深度为目标出队列的深度,假设目标出队列包括出队列1、出队列2、出队列3,且在预设时长T内,每隔一段时间记录一次出队列1、出队列2、出队列3的瞬时队列深度,假设在预设时长T内出队列1、出队列2、出队列3各自被记录到3次瞬时队列深度,分别为L 11、L 12、L 13、L 21、L 22、L 23、L 31、L 32、L 33,那么每次被记录到的平均当前队列深度分别为L avg1=(L 11+L 12+L 13)÷3,L avg2=(L 21+L 22+L 23)÷3,L avg3=(L 31+L 32+L 33)÷3,且L avg1>L avg2,L avg1>L avg3,说明L avg1是平均当前队列深度L avg1、L avg2、L avg3中最大的一个,则当前时刻t 0的最大平均当前队列深度就为L avg1,其中分母“3”为在预设时长T内每个出队列各自被记录的瞬时队列深度的次数。
b、若当前出队列深度为目标出端口的深度,计算最大平均当前队列深度是类似的,具体此处不予赘述。
还需要说明的是,网络设备根据当前出队列深度之和q、预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、该预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize以及预设队列深度Q t计算CC的取值的具体实现方式包括但不限于如下方式:
A、当以字节为单位,CC的计算方式可以如下式(2)所示:
CC=λ*(B*τ-TxSize+Q t-q)      (2)
在本申请实施例中,更新CC的同时,还可以有以下操作:
TxSize=0
DC=0
CreditAllocated=0
其中,λ为系数,且0<λ≤1,这里需要注意的是,TxSize具体是上一个预设时长τ时间范围内经过目标出队列或该目标出端口的数据总量。
B、当以速率为单位,CC的计算方式可以如下式(3)所示:
CC=λ*(B*τ-TxSize+Q t-q)/τ     (3)
在本申请实施例中,更新CC的同时,还有以下操作:
TxSize=0
DC=0
CreditAllocated=0
公式(3)与公式(2)的区别在于:公式(3)是在公式(2)的基础上除以预设时长τ。并且,在本申请上述实施方式中,具体阐述了网络设备根据当前出队列深度之和q、预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、该预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize以及预设队列深度Q t计算CC的取值的几种实现方式,具备灵活性,且提供的这几种算法复杂度低,不涉及多次乘法和除法操作,从而降低了存储开销。
还需要说明的是,在本申请的另一些实施方式中,网络设备除了根据当前出队列深度之和q、预设时长τ内目标出队列或目标出端口的转发数据量上限B*τ、该预设时长τ内经过该目标出队列或该目标出端口的数据总量TxSize以及预设队列深度Qt这4个维度的参数计算CC的取值之外(也可可以是根据上述方式a中的2种参数或上述方式b中的3种参数计算CC的取值,此处不做限定),还可以在这4个维度的参数基础上纳入更多的参数 用于更精确的计算CC的取值,例如,统计自上次CC更新时刻至本次CC更新时刻该预设时长内分配给报文的信用证计数器之和,在本次CC更新时再减去该和,或者减去该和乘以λ,对如何减去该和的方式不限定。在这种情况下,该优化对应的操作是CreditAllocated=CreditAllocated+II(在CC≥II时),CreditAllocated即表示一个周期内分配的信用证计数器之和。若该第一报文为被标记报文,那么该优化还带来了另一个操作,即CreditAllocated=CreditAllocated–β。
402、网络设备获取携带了调整请求的第一报文,该调整请求用于指示调整发送端设备的发送窗口或发送速率。
网络设备除了会计算该网络设备上的目标出队列或目标出端口的空闲转发能力之外,也会获取携带了调整请求的报文,该报文可称为第一报文,该调整请求可以是窗口调整请求,也可以是速率调整请求,其中,窗口调整请求用于指示调整发送端设备的发送窗口,速率调整请求用于指示调整发送端设备的发送速率。
需要说明的是,在本申请实施例中,网络设备获取携带了调整请求的第一报文的方式包括但不限于:1)当网络设备就是发送端设备,那么该第一报文由该发送端设备自行生成(此时生成的第一报文为初始报文,不具有预设标记),并由该发送端设备将该调整请求携带于该第一报文,发送端设备再根据该调整请求的值II与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。这里需要注意的是,在本申请的一些实施方式中,当网络设备是发送端设备,该发送端设备还可以不将调整请求携带于该第一报文(此时生成的第一报文为初始报文,不具有预设标记),而是在根据步骤401计算得到空闲转发能力的值之后,直接根据该调整请求的值II与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。2)当网络设备不是发送端设备,那么该网络设备接收由上一跳设备(可能是发送端设备,也可能是位于发送端设备之后的其他设备)发送的第一报文。
需要注意的是,在本申请实施例中,步骤401和步骤402在执行上没有先后顺序,可以先执行步骤401,再执行步骤402,也可以先执行步骤402,再执行步骤401,还可以是步骤401和步骤402同时执行,具体此处不做限定。
403、在网络设备确定第一报文不具有预设标记的情况下,网络设备根据该空闲转发能力和该调整请求得到决策结果,并将该决策结果携带于该第一报文,得到第二报文。
该网络设备在获取到该第一报文之后,会先判断该第一报文是否具有预设标记,在该网络设备确定该第一报文不具有预设标记的情况下,该网络设备根据该空闲转发能力的值和该调整请求的值(调整请求的值以II表示)得到决策结果,并将该决策结果携带于该第一报文,从而得到第二报文。具体地,该网络设备通过比较该空闲转发能力的值与该调整请求的值II的大小来得到决策结果,因此,在比较大小的过程中空闲转发能力的值的单位与调整请求的值II的单位需保持一致,若不一致,该网络设备还需对这两者的单位进行转换,以使得两者的单位一致。
下面在该第一报文不具有预设标记的情况下,对网络设备如何通过比较该空闲转发能 力的值与该调整请求的值II的大小(在两者的单位保持一致的前提下进行比较)来得到决策结果的具体过程进行阐述:
(1)第一报文不具有预设标记,且空闲转发能力的值≥调整请求的值II,则将授予信息作为决策结果。
在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定空闲转发能力的值≥调整请求的值II,在这种情况下,该网络设备得出的决策结果为“授予”,即将授予信息作为该决策结果(也就是上述所述决策结果的情形①),该授予信息用于表征允许发送端设备增加发送窗口或发送速率。
需要说明的是,在本申请的另一些实施方式中,在第一报文不具有预设标记,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定空闲转发能力的值≥调整请求的值II的情况下,该网络设备还可以进一步将当前空闲转发能力的值减去所述调整请求的值II作为新的空闲转发能力的值,以空闲转发能力的值为信用证计数器的值CC为例,即CC=CC-II。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且空闲转发能力的值≥调整请求的值II的情形下,该网络设备确定的决策结果是授予信息,具备可实现性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
(2)第一报文不具有预设标记,且0≤空闲转发能力的值<调整请求的值II,则按照预设概率标记第一报文。
在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定0≤空闲转发能力的值<调整请求的值II,在这种情况下,该网络设备按照预设概率对该第一报文进行标记,具体地,网络设备按照预设概率对该第一报文进行标记的方式可以是按照预先设定好的固定概率p标记该第一报文,也可以是在每次确定0≤空闲转发能力的值<调整请求的值II之后,计算得到当前轮次的动态概率p’,再以该动态概率p’标记该第一报文,本申请对此不做限定。
这里需要注意的是,按照预设概率对该第一报文标记会有如下两种结果,结果不同,该网络设备得到的决策结果也不同,下面分别进行阐述:
A、第一报文被网络设备以预设概率成功标记上预设标记,则将标记信息作为决策结果。
当该第一报文被该网络设备以预设概率成功标记上所述预设标记,则该网络设备将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为“标记”(也就是上述所述决策结果的情形③),该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。
同样需要说明的是,在本申请的另一些实施方式中,在第一报文不具有预设标记,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定0≤空闲转发能力的值<调 整请求的值II的情况下,该网络设备还可以进一步将与空闲转发能力对应的赤字计数器(deficit counter,DC)的值增加目标预设值(可用β表示)作为新的赤字计数器的值(赤字计数器的值可用DC表示),即DC=DC+β。这里需要注意的是,DC是与空闲转发能力的值一一对应的,一个空闲转发能力的值对应有一个DC。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且0≤空闲转发能力的值<调整请求的值II的情形下,该网络设备需要按照预设概率标记第一报文,若该第一报文被成功标记上预设报文,该网络设备确定的决策结果是标记信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值、DC以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
B、第一报文未被网络设备以预设概率标记上预设标记,则比较赤字计数器的值DC与调整请求的值II之间的大小。
当该第一报文未被该网络设备以预设概率标记上所述预设标记,则该网络设备进一步比较该空闲转发能力对应的赤字计数器的值DC与调整请求的值II之间的大小(前提也是两者单位保持一致),之后基于比较的结果来得到具体的决策结果。同样这里需要注意的是,比较的结果不同,该网络设备得到的决策结果也不同,下面分别进行阐述:
a、赤字计数器的值DC≥调整请求的值II,则将授予信息作为决策结果。
当该空闲转发能力对应的赤字计数器的值DC≥调整请求的值II,则该网络设备得出的决策结果为“授予”,即将授予信息作为该决策结果(也就是上述所述决策结果的情形①),该授予信息用于表征允许发送端设备增加发送窗口或发送速率。
需要说明的是,在本申请的另一些实施方式中,在该第一报文未被网络设备以预设概率标记上预设标记,且该网络设备通过比较赤字计数器的值DC与调整请求的值II确定赤字计数器的值DC≥调整请求的值II的情况下,该网络设备还可以进一步将当前赤字计数器的值DC减去所述调整请求的值II作为新的赤字计数器的值DC,即DC=DC-II。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且0<空闲转发能力的值<调整请求的值II的情形下,该网络设备需要按照预设概率标记第一报文,若该第一报文未被标记上预设报文,则还需进一步比较赤字计数器的值DC与调整请求的值II之间的大小,并且在赤字计数器的值DC≥调整请求的值II的情况下,该网络设备确定的决策结果是授予信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值、DC以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
b、赤字计数器的值DC<调整请求的值II,则将拒绝信息作为决策结果。
当该空闲转发能力对应的赤字计数器的值DC<调整请求的值II,则该网络设备得出的 决策结果为“拒绝”,即将拒绝信息作为该决策结果(也就是上述所述决策结果的情形②),该拒绝信息用于表征不允许发送端设备调整发送窗口或发送速率。
(3)第一报文不具有预设标记的情况下,空闲转发能力的值<0。
在第一报文不具有预设标记的情况下,且该网络设备通过比较空闲转发能力的值与调整请求的值II确定空闲转发能力的值<0,在这种情况下,该网络设备对该第一报文标记该预设标记,并将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为“标记”(也就是上述所述决策结果的情形③),该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。
在本申请上述实施方式中,阐述了在第一报文不具有预设标记,且空闲转发能力的值<0的情形下,该网络设备对该第一报文进行标记,并确定决策结果是标记信息,实现了当满足不同条件时得到不同的决策结果,具备灵活性。同时,相比于已有方案中采用让上一个周期内所有报文增速/降速值相同的方式(该增速/降速值需要在网络设备上进行复杂计算得出,难以在网络设备上实现),本申请方式得到的决策结果都由空闲转发能力的值以及II的大小关系决定,只需要进行简单的比较操作即可得到对应的决策结果,因而易于在高速网络设备上实现。
上述(1)、(2)、(3)点对第一报文在不具有预设标记的情况下,网络设备如何基于该空闲转发能力和该调整请求得到决策结果进行了阐述。在本申请的另一些实施方式中,该该网络设备在获取到该第一报文之后,若通过对第一报文是否具有预设标记的判断得出该第一报文具有预设标记,那么该网络设备将该第一报文标记有所述预设标记的标记信息作为决策结果,即该网络设备得出的决策结果为“标记”(也就是上述所述决策结果的情形③),该标记信息用于表征允许该发送端设备降低发送窗口或发送速率。
需要说明的是,在该第一报文一开始就被该网络设备确定具有预设标记的情况下,该网络设备还可以进一步将空闲转发能力的值增加目标预设值β作为新的空闲转发能力的值,以空闲转发能力的值为CC为例,即CC=CC+β。
在本申请上述实施方式中,阐述了在第一报文具有预设标记,则网络设备无需比较空闲转发能力的值与调整请求的值II之间的大小,而是直接确定标记信息为决策结果,实现了当满足不同条件时得到不同的决策结果,具备灵活性。
还需要说明的是,在本申请实施例中,由于网络设备可以是发送端设备与接收端设备路径上的任意一个设备,也就是说,该网络设备除了可以是传统所述的网络设备(如,交换机、路由器等)外,还可以是发送端设备或接收端设备,下面分别进行阐述:
(1)网络设备是发送端设备与接收端设备路径之间(不包括发送端设备和接收端设备)的任意一个设备。
当网络设备是发送端设备与接收端设备路径之间(不包括发送端设备和接收端设备)的任意一个设备时,也就是该网络设备不是发送端设备也不是接收端设备,则步骤402中网络设备获取携带了调整请求的第一报文的方式就是网络设备接收由上一跳设备(可能是发送端设备,也可能是位于发送端设备之后的其他设备)发送的第一报文。由于该网络设备不是接收端设备,意味着该网络设备也不是最后一跳设备,那么在本申请的一些实施方 式中,在步骤403之后,该网络设备还可以进一步将得到的第二报文(即携带了决策结果的第一报文)向下一跳设备发送。
这里需要说明的是,若该网络设备的下一跳设备就是接收端设备,那么接收端设备接收到该网络设备发送的第二报文后,会解析该第二报文,并将决策结果携带于确认报文中向发送端设备发送(不限制接收端设备向发送端设备返回确认报文的路径必须是原路径),该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
(2)网络设备是发送端设备。
当网络设备是发送端设备时,这里有两种处理方式:1)发送端设备执行步骤402中网络设备的执行步骤,即该第一报文由该发送端设备自行生成(此时生成的第一报文为初始报文,不具有预设标记),并由该发送端设备将该调整请求携带于该第一报文,发送端设备再根据该调整请求的值II与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。2)发送端设备不执行步骤402中网络设备的执行步骤,即该发送端设备还可以不将调整请求携带于该第一报文(此时生成的第一报文为初始报文,不具有预设标记),而是在根据步骤401计算得到空闲转发能力的值之后,直接根据该调整请求的值II与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。
类似地,由于发送端设备不是最后一跳设备,那么在本申请的一些实施方式中,在步骤403之后,该发送端设备还可以进一步将得到的第二报文(即携带了决策结果的第一报文)向下一跳设备发送。
同样需要说明的是,若该发送端设备的下一跳设备就是接收端设备,那么接收端设备接收到该发送端设备发送的第二报文后,会解析该第二报文,并将决策结果携带于确认报文中向该发送端设备发送(不限制接收端设备向发送端设备返回确认报文的路径必须是原路径),该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
(3)网络设备是接收端设备。
当网络设备是接收端设备时,这里也有两种处理方式:1)接收端设备执行步骤403中网络设备的执行步骤,即在接收端设备确定第一报文不具有预设标记的情况下,该接收端设备根据空闲转发能力和调整请求得到决策结果,并将决策结果携带于第一报文,得到第二报文,之后,对该第二报文进行解析,解析得到的决策结果携带于确认报文中,并将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。2)接收端设备不执行步骤403中网络设备的执行步骤,而是在接收端设备确定第一报文不具有预设标记的情况下,该接收端设备根据空闲转发能力和调整请求得到决策结果,该决策结果不携带于第一报文,而是直接携带于确认报文中,并 将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
需要说明的是,在本申请上述实施方式中,由于决策结果有如下三种情形:①将授予信息作为决策结果,用于指示授予该发送端设备增加发送窗口(或发送速率);②将拒绝信息作为决策结果,用于指示拒绝该发送端设备增加发送窗口(或发送速率)。③若报文被标记有预设标记(无论是前序网络设备标记的,还是自身标记的),将标记信息作为决策结果,将标记信息作为决策结果,用于指示降低该发送端设备的发送窗口(或发送速率)。因此,发送端设备接收到接收端设备发送的确认报文后,根据其中携带的决策结果不同,其调整发送端设备的发送窗口(或发送速率)的方式也不同,包括但不限于:
a、若决策结果是标记信息,那么确认报文则具体用于指示发送端设备根据该决策结果降低发送端设备的发送窗口或发送速率,其中,降低的幅度根据目标预设值β得到,例如,可以是将发送端设备的发送窗口或发送速率在原有基础上降低β,也可以是将发送端设备的发送窗口或发送速率在原有基础上降低k 1*β,其中,k 1为自定义参数,k 1>0。
b、若决策结果是授予信息,那么确认报文则具体用于指示发送端设备根据该决策结果增加发送端设备的发送窗口或发送速率,其中,增加的幅度根据调整请求的值II得到,例如,可以是将发送端设备的发送窗口或发送速率在原有基础上增加II,也可以是将发送端设备的发送窗口或发送速率在原有基础上增加k 2*II,其中,k 2为自定义参数,k 2>0。
c、若决策结果是拒绝信息,那么确认报文则具体用于指示发送端设备根据该决策结果不增加也不降低发送端设备的发送窗口或发送速率。
在本申请上述实施方式中,阐述了在确认报文中携带的决策结果不同,发送端设备基于该确认报文调整发送窗口和发送速率的方式也不同,调整逻辑简单易实现,且具备可选择性。
在本申请实施例中,为便于进一步理解上述步骤403的逻辑,下面以空闲转发能力为CC为例,对上述基于不同比较结果得到不同决策结果的过程进行示意,具体可参阅图5,图5为本申请实施例提供的网络设备的主动队列管理方法的另一流程示意图,当网络设备获取到该第一报文时,该网络设备有如下操作:
Step1、网络设备判断第一报文是否被标记有预设标记,如果被标记,那么该第一报文具有预设标记的标记信息就是决策结果,网络设备同时会将CC增加β(β为自定义参数,即上述所述的目标预设值,经验取值一般是以0.5*最大传输单元(maximum transmission unit,MTU)的幅度增加)作为新的CC,即CC=CC+β。若该网络设备不是接收端设备,则网络设备会进一步将该第一报文向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将标记信息作为决策结果,携带于生成的确认报文中;若第一报文没有被标记有预设标记,则进入Step2。
Step2、网络设备判断信用证计数器的值CC和第一报文中携带的调整请求的值II的大小关系,如果CC≥II,则将授予信息作为该网络设备的决策结果携带于该第一报文,并将CC减去II作为新的CC(即CC=CC-II)。若该网络设备不是接收端设备,则网络设备会进 一步将携带了所述决策结果的第一报文(即上述图4对应实施例中所述的第二报文)向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将该决策结果携带于生成的确认报文中;如果0≤CC<II,则进入Step3,如果CC<0,则进入Step6。
Step3、网络设备按照预设概率(预设概率为自定义参数,若预设概率为固定概率p,则经验取值一般为0.1-0.2,若预设概率是动态概率p’,则网络设备每次自行计算)标记该第一报文,若第一报文成功被标记上预设标记,那么该第一报文具有预设标记的标记信息就是决策结果,网络设备同时会将与CC对应的DC增加β得到新的DC,即DC=DC+β。若该网络设备不是接收端设备,则网络设备会进一步将该具有预设标记的第一报文向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将标记信息作为决策结果,携带于生成的确认报文中;若第一报文没有被预设概率标记上预设标记,则进入Step4。
Step4、网络设备比较DC与II的大小关系,若DC≥II,则将授予信息作为该网络设备的决策结果携带于该第一报文,并将DC减去II作为新的DC(即DC=DC-II)。若该网络设备不是接收端设备,则网络设备会进一步将携带了所述决策结果的第一报文(即上述图4对应实施例中所述的第二报文)向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将该决策结果携带于生成的确认报文中;如果DC<II,则进入Step5。
Step5、网络设备将拒绝信息作为该网络的决策结果携带于该第一报文。若该网络设备不是接收端设备,则网络设备会进一步将携带了所述决策结果的第一报文(即上述图4对应实施例中所述的第二报文)向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将该决策结果携带于生成的确认报文中。
Step6、网络设备对该第一报文进行标记,该第一报文具有预设标记的标记信息就是决策结果。若该网络设备不是接收端设备,则网络设备会进一步将该第一报文向发送端设备与接收端设备路径上的下一跳设备发送,若该网络设备是接收端设备,则会将标记信息作为决策结果,携带于生成的确认报文中。
需要说明的是,在图5对应实施例中,说明的是当前该网络设备针对获取到的第一报文得到的自身的决策结果,该决策结果没有考虑该网络设备的前一跳设备(若有)携带域该第一报文上的前序决策结果。在实际应用中,假设当前该网络设备不是发送端设备,且该网络设备的前一跳设备也不是发送端设备,那么前一跳设备决策出来的决策结果若是授予信息或拒绝信息(即上述所述的①和②)这两种决策结果有可能被当前该网络设备改写,若前一跳设备决策出来的是第一报文具有预设标记(即上述所述的③)这种决策结果,也就是前面的任意一个网络设备把第一报文标记上了预设标记,后续的网络设备得出的都只能是③这种决策结果。具体的改写规则如上述所述,此次不予赘述。
还需要说明的是,当发送端设备接收到接收端设备返回的确认报文,会根据该确认报文中的决策结果的不同而对发送窗口或发送速率进行不同的调整,具体请参阅图6,图6为本申请实施例提供的发送端设备根据决策结果调整发送窗口或发送速率的一个流程示意 图,由图6可知,若决策结果是标记信息,那么确认报文则具体用于指示发送端设备根据该决策结果降低发送端设备的发送窗口或发送速率;若决策结果是授予信息,那么确认报文则具体用于指示发送端设备根据该决策结果增加发送端设备的发送窗口或发送速率;若决策结果是拒绝信息,那么确认报文则具体用于指示发送端设备根据该决策结果不调整(即不增加也不降低)发送端设备的发送窗口或发送速率。
还需要说明的是,本申请实施例提供的网络设备的主动队列管理方法可用于和拥塞控制协议配合,把队列深度控制在指定深度上。下面对利用本申请实施例提供的网络设备的主动队列管理方法实现慢启动算法和线性增加乘性降低(additive increase multiplicative decrease,AIMD)算法分别进行阐述:
(1)利用本申请实施例提供的网络设备的主动队列管理方法实现慢启动算法。
具体请参阅图7,图7为本申请实施例提供的利用本申请实施例提供的网络设备的主动队列管理方法实现慢启动算法的一个框架示意图。由于慢启动算法的特点是:每经过一个往返时延(round trip time,RTT),发送窗口的大小翻倍。在该算法的控制下,窗口增加较快,用于迅速占满空闲带宽。为了实现该算法,在发送端设备发出的每个报文中,报文中携带的调整请求的值II被设置为MTU,如图7中的步骤S1所示,报文经过网络设备后(这里假设网络设备不包括发送端设备和接收端设备)之后,该网络设备会进行判断,如图7中的步骤S2,判断之后可得到三种决策结果:1)II保持MTU不变(即决策结果为授予信息);2)II被改为0,(即决策结果为拒绝信息);3)报文被标记(即决策结果为标记信息),如上述步骤S3所示。接收端设备把报文中的决策结果携带在确认报文ACK中,返回发送端设备,如图7中的步骤S4和步骤S5所示,这里需注意的是,图7中示意的确认报文ACK的返回路径是发送路径是一样的,在实际应用中,不限制返回路径与发送路径保持一致。确认报文ACK达到发送端设备之后,发送端设备根据确认报文ACK携带的决策结果更新窗口,如图7中的步骤S6,如果确认报文ACK中携带的决策结果不是标记信息,则将调整请求的值II增加到发送窗口上,如果确认报文ACK携带的决策结果是标记信息,则发送端设备将发送窗口降低β。
这里需要注意的是,本申请利用本申请实施例提供的网络设备的主动队列管理方法实现慢启动算法调整的是发送端设备的发送窗口,在本申请另一些实施方式中,也可以用于调整发送端设备的发送速率,调整的方式与调整发送窗口的方式类似,此处不予赘述。
(2)利用本申请实施例提供的网络设备的主动队列管理方法实现AIMD算法。
在上述(1)的基础上,当网络设备确定0<CC<II时,网络设备可以判断带宽被占满。但此时多流不一定公平,即有相同的带宽,因此可继续基于本申请实施例提供的网络设备的主动队列管理方法实现AIMD算法,以实现流的公平性。当发送端设备处于慢启动算法时,若发送端设备收到的确认报文ACK中II=0(即决策结果为拒绝信息)或者确认报文ACK中的决策结果为标记信息,则发送端设备也可以判断出瓶颈链路带宽已满(甚至拥塞),进而从慢启动算法退出进入AIMD算法。为了实现AIMD算法,发送端设备发出的报文中携带的II为α/cwnd,其他行为则保持不变,如图8所示。由于网络设备的带宽已被占满,此时0<CC<II,因此进入上述图5对应实施例中的Step3。当报文中携带的II设置为α/cwnd, 该分支实现的就是AIMD算法,经过多次迭代之后能够让多流达到相等吞吐。
综上所述,本申请实施例提供的网络设备的主动队列管理方法具有如下有益效果:
1)网络设备上的队列深度可稳定维持在预设队列深度Q t上,例如,Q t可以设置为0KB,即队列深度维持在0,这样可以得到极低的排队时延。
2)可用于实现慢启动等快速升速的算法,该方法能够在链路带宽不满时让发送端设备迅速升满占满带宽,同时实现逻辑简单。
3)在带宽已满时可用于实现AIMD算法,在不损失带宽的情况下实现多流的公平性,同时实现逻辑简单。
4)该方法复杂度低,易于在高速网络设备上实现。
为了对本申请实施例所带来的有益效果有更为直观的认识,以下对本申请实施例所带来的技术效果作进一步的对比,本申请利用网络设备的主动队列管理方法实现慢启动算法进行对比,本申请在仿真平台上构造哑铃状拓扑,构造流量经过瓶颈链路。不断增加瓶颈链路上流的数量,观测瓶颈链路上的队列深度。本申请将Q t设置为0KB,得到的结果与已有技术的结果对比如图9所示,其中C-AQM为本申请实施例方法,HPCC和XCP为已有技术的结果,由图9的效果对比图可知:已有技术XCP的结果是随着流数增加,平均队列深度整体呈显著升高趋势,但在中间一些流数上又有所降低;已有技术HPCC的结果,平均队列深度随着流数显著增加;本发明实施例C-AQM的结果是平均队列深度均值随着流数略有提升。队列深度不严格为0KB的原因在于实时队列深度实际上围绕0KB上下波动,当队列下溢时实际被计算为0,因此实际平均队列深度高于0KB。平均队列深度随流数略有提升的原因是,流数增加时,队列的抖动也会增加,导致瞬时队列升高,进而使得平均队列深度也略有升高。
在上述实施例的基础上,为了更好的实施本申请实施例的上述方案,下面还提供用于实施上述方案的相关设备,具体参阅图10,图10为本申请实施例提供的一种网络设备的示意图,该网络设备1000具体可以包括:计算模块1001、获取模块1002以及决策模块1003,其中,计算模块1001,用于计算该网络设备1000上的目标出队列或目标出端口的空闲转发能力,该空闲转发能力用于表征该目标出队列或该目标出端口的转发数据量上限与当前实际转发量之间的差值,该目标出队列包括一个或多个出队列,该目标出端口包括一个或多个出端口,该网络设备1000为发送端设备与接收端设备路径上的任意一个设备;获取模块1002,用于获取携带了调整请求的第一报文,该调整请求包括窗口调整请求或速率调整请求,该调整请求用于指示调整发送端设备的发送窗口或发送速率;决策模块1003,用于在该网络设备1000确定该第一报文不具有预设标记的情况下,根据该空闲转发能力和该调整请求得到决策结果,并将该决策结果携带于该第一报文,得到第二报文。
这里需要注意的是,当网络设备是发送端设备时,这里有两种处理方式:1)获取模块1002执行“获取携带了调整请求的第一报文”的步骤,即该第一报文由该获取模块1002自行生成(此时生成的第一报文为初始报文,不具有预设标记),并由该获取模块1002将该调整请求携带于该第一报文,决策模块1003再根据该调整请求的值与得到的空闲转发能力的值得到决策结果,再将该决策结果携带于该第一报文中,得到第二报文,以便后续将 该第二报文向下一跳设备发送。2)获取模块1002不执行“获取携带了调整请求的第一报文”的步骤,即该获取模块1002还可以不将调整请求携带于该第一报文(此时生成的第一报文为初始报文,不具有预设标记),获取模块1002只是生成第一报文,而在决策模块1003计算得到空闲转发能力的值之后,直接根据该调整请求的值与得到的空闲转发能力的值得到决策结果,再由决策模块1003将该决策结果携带于该第一报文中,得到第二报文,以便后续将该第二报文向下一跳设备发送。
在一种可能的设计中,该决策模块1003,具体用于:在该网络设备1000确定该空闲转发能力的值大于或等于该调整请求的值的情况下,将授予信息作为该决策结果,该授予信息用于表征允许该发送端设备增加该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该决策模块1003,具体用于:在该网络设备1000确定该空闲转发能力的值大于零且小于该调整请求的值的情况下,根据预设概率标记该第一报文;在该网络设备1000确定该第一报文被标记有该预设标记的情况下,将该第一报文具有该预设标记的标记信息作为该决策结果,该标记信息用于表征允许该发送端设备降低该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该决策模块1003,还用于:在该网络设备1000确定该第一报文未被标记有该预设标记,且与该空闲转发能力对应的赤字计数器的值大于或等于该调整请求的值的情况下,将授予信息作为该决策结果,该授予信息用于表征允许该发送端设备增加该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该决策模块1003,还用于:在该网络设备1000确定该第一报文未被标记有该预设标记,且与该空闲转发能力对应的赤字计数器的值小于该调整请求的值的情况下,将拒绝信息作为该决策结果,该拒绝信息用于表征不允许该发送端设备调整该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该决策模块1003,具体还用于:在该网络设备1000确定该空闲转发能力的值小于零的情况下,对该第一报文标记该预设标记,并将该第一报文具有该预设标记的标记信息作为该决策结果,该标记信息用于表征允许该发送端设备降低该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该决策模块1003,还用于:在该网络设备1000确定该第一报文具有该预设标记的情况下,将该第一报文具有该预设标记的标记信息作为决策结果,并将该决策结果携带于该第一报文,得到第二报文,该标记信息用于表征允许该发送端设备降低该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该计算模块1001,具体用于:根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限以及该预设时长内经过该目标出队列或该目标出端口的数据总量计算信用证计数器的取值,该信用证计数器的取值用于表征该空闲转发能力的大小。
在一种可能的设计中,该计算模块1001,具体用于:根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、该预设时长内经过该目标出队列或该目标出端口的数据总量以及当前出队列深度计算信用证计数器的取值,该信用证计数器的取值用于表征 该空闲转发能力的大小,该当前出队列深度为该目标出队列的深度或该目标出端口对应的出队列的深度。
在一种可能的设计中,该计算模块1001,具体用于:根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、该预设时长内经过该目标出队列或该目标出端口的数据总量、当前出队列深度以及预设队列深度计算信用证计数器的取值,该信用证计数器的取值用于表征该空闲转发能力的大小,该当前出队列深度为该目标出队列的深度或该目标出端口对应的出队列的深度。
在一种可能的设计中,该计算模块1001,具体还用于:将预设时长内所述目标出队列或所述目标出端口的转发数据量上限与该预设时长内经过该目标出队列或该目标出端口的数据总量相减,得到第一相减结果;将该第一相减结果与该预设队列深度相加,得到相加结果;将该相加结果与当前出队列深度之和相减,得到第二相减结果;将该第二相减结果与预设系数相乘,得到该信用证计数器的取值,其中,该信用证计数器的取值的单位为字节。
在一种可能的设计中,该计算模块1001,具体还用于:将预设时长内所述目标出队列或所述目标出端口的转发数据量上限与该预设时长内经过该目标出队列或该目标出端口的数据总量相减,得到第一相减结果;将该第一相减结果与该预设队列深度相加,得到相加结果;将该相加结果与当前出队列深度之和相减,得到第二相减结果;将该第二相减结果与预设系数相乘,得到相乘结果;将该相乘结果除以该预设时长,得到该信用证计数器的取值,其中,该信用证计数器的取值的单位为速率。
在一种可能的设计中,该网络设备1000不为该接收端设备,该网络设备1000还包括:发送模块1004,该发送模块1004用于将该第二报文向下一跳设备发送。
在一种可能的设计中,当该下一跳设备为该接收端设备时,该发送模块1004,具体用于:向该接收端设备发送该第二报文,以使得该接收端设备向该发送端设备发送携带了该决策结果的确认报文,该确认报文用于指示该发送端设备根据该决策结果调整该发送端设备的发送窗口或发送速率。
在一种可能的设计中,该网络设备1000为该接收端设备,该网络设备1000还包括发送模块1004,该发送模块1004用于向该发送端设备发送携带了该决策结果的确认报文,该确认报文用于指示该发送端设备根据该决策结果调整该发送端设备的发送窗口或发送速率。
这里需要注意的是,当网络设备是发送端设备时,这里也有两种处理方式:1)决策模块1003执行“将决策结果携带于第一报文,得到第二报文”的步骤,即在决策模块1003确定第一报文不具有预设标记的情况下,根据空闲转发能力和调整请求得到决策结果,并将决策结果携带于第一报文,得到第二报文,之后,发送模块1004对该第二报文进行解析,解析得到的决策结果携带于确认报文中,并将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。2)决策模块1003不执行“将决策结果携带于第一报文,得到第二报文”的步骤,而是在决策模块1003 确定第一报文不具有预设标记的情况下,根据空闲转发能力和调整请求得到决策结果,该决策结果不携带于第一报文,而是直接携带于确认报文中,并由发送模块1004将该确认报文向发送端设备发送,该确认报文就用于指示发送端设备根据其中携带的决策结果调整发送端设备的发送窗口(调整请求是窗口调整请求的情况下)或发送速率(调整请求是速率调整请求的情况下)。
在一种可能的设计中,当该决策模块1003将该第一报文具有该预设标记的标记信息作为该决策结果时,该确认报文具体用于指示该发送端设备根据该决策结果降低该发送端设备的发送窗口或发送速率,其中,该降低的幅度根据目标预设值得到。
在一种可能的设计中,当该决策模块1003将授予信息作为该决策结果时,该确认报文用于指示该发送端设备根据该决策结果增加该发送端设备的发送窗口或发送速率,其中,该增加的幅度根据该调整请求的值得到。
在一种可能的设计中,当该决策模块1003将拒绝信息作为该决策结果时,该确认报文用于指示该发送端设备根据该决策结果不调整(即不增加也不降低)该发送端设备的发送窗口或发送速率。
需要说明的是,网络设备1000中各模块/单元之间的信息交互、执行过程等内容,与本申请中图4或图5对应的方法实施例基于同一构思,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。
接下来介绍本申请实施例提供的另一种网络设备,请参阅图11,图11为本申请实施例提供的网络设备的一种结构示意图,网络设备1100上可以部署有图10对应实施例中所描述的网络设备1000,用于实现图10对应实施例中网络设备1000的功能,具体的,网络设备1100由一个或多个服务器实现,网络设备1100可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1122和存储器1132,一个或一个以上存储应用程序1142或数据1144的存储介质1130(例如一个或一个以上海量存储设备)。其中,存储器1132和存储介质1130可以是短暂存储或持久存储。存储在存储介质1130的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对网络设备1100中的一系列指令操作。更进一步地,中央处理器1122可以设置为与存储介质1130通信,在网络设备1100上执行存储介质1130中的一系列指令操作。
网络设备1100还可以包括一个或一个以上电源1126,一个或一个以上有线或无线网络接口1150,一个或一个以上输入输出接口1158,和/或,一个或一个以上操作系统1141,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
本申请实施例中,中央处理器1122,用于执行图4或图5对应实施例中的网络设备执行的步骤。例如,中央处理器1122可以用于:首先,计算该网络设备上的目标出队列或目标出端口的空闲转发能力,其中,该空闲转发能力用于表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)的转发数据量上限与当前实际转发量之间的差值,具体可以是表征网络设备上的目标出队列(一个或多个)或目标出端口(一个或多个)在某个预设时长(如,200us)内的转发数据量上限与当前实际转发量之间的差值,该预设时长可自行设定。该网络设备为发送端设备与接收端设备路径上的任意一个设备(其中包括 发送端设备和接收端设备)。此外,中央处理器1122除了会计算该网络设备上的目标出队列或目标出端口的空闲转发能力之外,也会获取携带了调整请求的报文,该报文可称为第一报文,该调整请求可以是窗口调整请求,也可以是速率调整请求,其中,窗口调整请求用于指示调整发送端设备的发送窗口,速率调整请求用于指示调整发送端设备的发送速率。在获取到该第一报文之后,会先判断该第一报文是否具有预设标记,在该网络设备确定该第一报文不具有预设标记的情况下,该网络设备根据该空闲转发能力的值和该调整请求的值II得到决策结果,并将该决策结果携带于该第一报文,从而得到第二报文。具体地,该网络设备通过比较该空闲转发能力的值与该调整请求的值II的大小来得到决策结果,因此,在比较大小的过程中空闲转发能力的值的单位与调整请求的值II的单位需保持一致,若不一致,该网络设备还需对这两者的单位进行转换,以使得两者的单位一致。
需要说明的是,中央处理器1122执行上述各个步骤的具体方式,与本申请中图4或图5对应的方法实施例基于同一构思,其带来的技术效果也与本申请上述实施例相同,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线 (例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。

Claims (35)

  1. 一种网络设备的主动队列管理方法,其特征在于,包括:
    网络设备计算所述网络设备上的目标出队列或目标出端口的空闲转发能力,所述空闲转发能力用于表征所述目标出队列或所述目标出端口的转发数据量上限与当前实际转发量之间的差值,所述目标出队列包括一个或多个出队列,所述目标出端口包括一个或多个出端口,所述网络设备为发送端设备与接收端设备路径上的任意一个设备;
    所述网络设备获取携带了调整请求的第一报文,所述调整请求用于指示调整所述发送端设备的发送窗口或发送速率;
    在所述网络设备确定所述第一报文不具有预设标记的情况下,所述网络设备根据所述空闲转发能力和所述调整请求得到决策结果,并将所述决策结果携带于所述第一报文,得到第二报文。
  2. 根据权利要求1所述的方法,其特征在于,所述网络设备根据所述空闲转发能力和所述调整请求得到决策结果包括:
    在所述网络设备确定所述空闲转发能力的值大于或等于所述调整请求的值的情况下,所述网络设备将授予信息作为所述决策结果,所述授予信息用于表征允许所述发送端设备增加所述发送端设备的发送窗口或发送速率。
  3. 根据权利要求1所述的方法,其特征在于,所述网络设备根据所述空闲转发能力和所述调整请求得到决策结果包括:
    在所述网络设备确定所述空闲转发能力的值大于零且小于所述调整请求的值的情况下,所述网络设备根据预设概率标记所述第一报文;
    在所述网络设备确定所述第一报文被标记有所述预设标记的情况下,所述网络设备将所述第一报文具有所述预设标记的标记信息作为所述决策结果,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    在所述网络设备确定所述第一报文未被标记有所述预设标记,且与所述空闲转发能力对应的赤字计数器的值大于或等于所述调整请求的值的情况下,所述网络设备将授予信息作为所述决策结果,所述授予信息用于表征允许所述发送端设备增加所述发送端设备的发送窗口或发送速率。
  5. 根据权利要求3-4中任一项所述的方法,其特征在于,所述方法还包括:
    在所述网络设备确定所述第一报文未被标记有所述预设标记,且与所述空闲转发能力对应的赤字计数器的值小于所述调整请求的值的情况下,所述网络设备将拒绝信息作为所述决策结果,所述拒绝信息用于表征不允许所述发送端设备调整所述发送端设备的发送窗口或发送速率。
  6. 根据权利要求1所述的方法,其特征在于,所述网络设备根据所述空闲转发能力和所述调整请求得到决策结果包括:
    在所述网络设备确定所述空闲转发能力的值小于零的情况下,所述网络设备对所述第一报文标记所述预设标记;
    所述网络设备将所述第一报文具有所述预设标记的标记信息作为所述决策结果,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    在所述网络设备确定所述第一报文具有所述预设标记的情况下,所述网络设备将所述第一报文具有所述预设标记的标记信息作为决策结果,并将所述决策结果携带于所述第一报文,得到第二报文,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述网络设备计算所述网络设备上的目标出队列或目标出端口的空闲转发能力包括:
    所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限以及所述预设时长内经过所述目标出队列或所述目标出端口的数据总量计算信用证计数器的取值,所述信用证计数器的取值用于表征所述空闲转发能力的大小。
  9. 根据权利要求8所述的方法,其特征在于,所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限以及所述预设时长内经过所述目标出队列或所述目标出端口的数据总量计算信用证计数器的取值包括:
    所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长内经过所述目标出队列或所述目标出端口的数据总量以及当前出队列深度计算信用证计数器的取值,所述当前出队列深度为所述目标出队列的深度或所述目标出端口对应的出队列的深度。
  10. 根据权利要求9所述的方法,其特征在于,所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长内经过所述目标出队列或所述目标出端口的数据总量以及当前出队列深度计算信用证计数器的取值包括:
    所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长内经过所述目标出队列或所述目标出端口的数据总量、当前出队列深度以及预设队列深度计算信用证计数器的取值。
  11. 根据权利要求10所述的方法,其特征在于,所述网络设备根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长内经过所述目标出队列或所述目标出端口的数据总量、当前出队列深度以及预设队列深度计算信用证计数器的取值包括:
    所述网络设备将预设时长内所述目标出队列或所述目标出端口的转发数据量上限与所述预设时长内经过所述目标出队列或所述目标出端口的数据总量相减,得到第一相减结果;
    所述网络设备将所述第一相减结果与所述预设队列深度相加,得到相加结果;
    所述网络设备将所述相加结果与当前出队列深度相减,得到第二相减结果;
    所述网络设备将所述第二相减结果与预设系数相乘,得到所述信用证计数器的取值,其中,所述信用证计数器的取值的单位为字节。
  12. 根据权利要求1-11中任一项所述的方法,其特征在于,所述网络设备不为所述接收端设备,所述方法还包括:
    所述网络设备将所述第二报文向下一跳设备发送。
  13. 根据权利要求12所述的方法,其特征在于,所述下一跳设备为所述接收端设备,所述网络设备将所述第二报文向下一跳设备发送包括:
    所述网络设备向所述接收端设备发送所述第二报文,以使得所述接收端设备向所述发送端设备发送携带了所述决策结果的确认报文,所述确认报文用于指示所述发送端设备根据所述决策结果调整所述发送端设备的发送窗口或发送速率。
  14. 根据权利要求1-11中任一项所述的方法,其特征在于,所述网络设备为所述接收端设备,所述方法还包括:
    所述网络设备向所述发送端设备发送携带了所述决策结果的确认报文,所述确认报文用于指示所述发送端设备根据所述决策结果调整所述发送端设备的发送窗口或发送速率。
  15. 根据权利要求13-14中任一项所述的方法,其特征在于,
    当所述网络设备将所述第一报文具有所述预设标记的标记信息作为所述决策结果时,所述确认报文具体用于指示所述发送端设备根据所述决策结果降低所述发送端设备的发送窗口或发送速率,其中,所述降低的幅度根据目标预设值得到。
  16. 根据权利要求13-15中任一项所述的方法,其特征在于,
    当所述网络设备将授予信息作为所述决策结果时,所述确认报文用于指示所述发送端设备根据所述决策结果增加所述发送端设备的发送窗口或发送速率,其中,所述增加的幅度根据所述调整请求的值得到。
  17. 根据权利要求13-16中任一项所述的方法,其特征在于,
    当所述网络设备将拒绝信息作为所述决策结果时,所述确认报文用于指示所述发送端设备根据所述决策结果不调整所述发送端设备的发送窗口或发送速率。
  18. 一种网络设备,其特征在于,包括:
    计算模块,用于计算所述网络设备上的目标出队列或目标出端口的空闲转发能力,所述空闲转发能力用于表征所述目标出队列或所述目标出端口的转发数据量上限与当前实际转发量之间的差值,所述目标出队列包括一个或多个出队列,所述目标出端口包括一个或多个出端口,所述网络设备为发送端设备与接收端设备路径上的任意一个设备;
    获取模块,用于获取携带了调整请求的第一报文,所述调整请求用于指示调整所述发送端设备的发送窗口或发送速率;
    决策模块,用于在所述网络设备确定所述第一报文不具有预设标记的情况下,根据所述空闲转发能力和所述调整请求得到决策结果,并将所述决策结果携带于所述第一报文,得到第二报文。
  19. 根据权利要求18所述的设备,其特征在于,所述决策模块,具体用于:
    在所述网络设备确定所述空闲转发能力的值大于或等于所述调整请求的值的情况下,将授予信息作为所述决策结果,所述授予信息用于表征允许所述发送端设备增加所述发送端设备的发送窗口或发送速率。
  20. 根据权利要求18所述的设备,其特征在于,所述决策模块,具体用于:
    在所述网络设备确定所述空闲转发能力的值大于零且小于所述调整请求的值的情况下, 根据预设概率标记所述第一报文;
    在所述网络设备确定所述第一报文被标记有所述预设标记的情况下,将所述第一报文具有所述预设标记的标记信息作为所述决策结果,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  21. 根据权利要求20所述的设备,其特征在于,所述决策模块,还用于:
    在所述网络设备确定所述第一报文未被标记有所述预设标记,且与所述空闲转发能力对应的赤字计数器的值大于或等于所述调整请求的值的情况下,将授予信息作为所述决策结果,所述授予信息用于表征允许所述发送端设备增加所述发送端设备的发送窗口或发送速率。
  22. 根据权利要求20-21中任一项所述的设备,其特征在于,所述决策模块,还用于:
    在所述网络设备确定所述第一报文未被标记有所述预设标记,且与所述空闲转发能力对应的赤字计数器的值小于所述调整请求的值的情况下,将拒绝信息作为所述决策结果,所述拒绝信息用于表征不允许所述发送端设备调整所述发送端设备的发送窗口或发送速率。
  23. 根据权利要求18所述的设备,其特征在于,所述决策模块,具体还用于:
    在所述网络设备确定所述空闲转发能力的值小于零的情况下,对所述第一报文标记所述预设标记;
    将所述第一报文具有所述预设标记的标记信息作为所述决策结果,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  24. 根据权利要求18-23中任一项所述的设备,其特征在于,所述决策模块,还用于:
    在所述网络设备确定所述第一报文具有所述预设标记的情况下,将所述第一报文具有所述预设标记的标记信息作为决策结果,并将所述决策结果携带于所述第一报文,得到第二报文,所述标记信息用于表征允许所述发送端设备降低所述发送端设备的发送窗口或发送速率。
  25. 根据权利要求18-24中任一项所述的设备,其特征在于,所述计算模块,具体用于:
    根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限以及所述预设时长内经过所述目标出队列或所述目标出端口的数据总量计算信用证计数器的取值,所述信用证计数器的取值用于表征所述空闲转发能力的大小。
  26. 根据权利要求18-25中任一项所述的设备,其特征在于,所述计算模块,具体还用于:
    根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长内经过所述目标出队列或所述目标出端口的数据总量以及当前出队列深度计算信用证计数器的取值,所述信用证计数器的取值用于表征所述空闲转发能力的大小,所述当前出队列深度为所述目标出队列的深度或所述目标出端口对应的出队列的深度。
  27. 根据权利要求18-26中任一项所述的设备,其特征在于,所述计算模块,具体还用于:
    根据预设时长内所述目标出队列或所述目标出端口的转发数据量上限、所述预设时长 内经过所述目标出队列或所述目标出端口的数据总量、当前出队列深度以及预设队列深度计算信用证计数器的取值,所述信用证计数器的取值用于表征所述空闲转发能力的大小,所述当前出队列深度为所述目标出队列的深度或所述目标出端口对应的出队列的深度。
  28. 根据权利要求27所述的设备,其特征在于,所述计算模块,具体还用于:
    将预设时长内所述目标出队列或所述目标出端口的转发数据量上限与所述预设时长内经过所述目标出队列或所述目标出端口的数据总量相减,得到第一相减结果;
    将所述第一相减结果与所述预设队列深度相加,得到相加结果;
    将所述相加结果与当前出队列深度相减,得到第二相减结果;
    将所述第二相减结果与预设系数相乘,得到所述信用证计数器的取值,其中,所述信用证计数器的取值的单位为字节。
  29. 根据权利要求18-28中任一项所述的设备,其特征在于,所述网络设备不为所述接收端设备,所述设备还包括:
    发送模块,用于将所述第二报文向下一跳设备发送。
  30. 根据权利要求29所述的设备,其特征在于,所述下一跳设备为所述接收端设备,所述发送模块,具体用于:
    向所述接收端设备发送所述第二报文,以使得所述接收端设备向所述发送端设备发送携带了所述决策结果的确认报文,所述确认报文用于指示所述发送端设备根据所述决策结果调整所述发送端设备的发送窗口或发送速率。
  31. 根据权利要求18-28中任一项所述的设备,其特征在于,所述网络设备为所述接收端设备,所述设备还包括:
    发送模块,用于向所述发送端设备发送携带了所述决策结果的确认报文,所述确认报文用于指示所述发送端设备根据所述决策结果调整所述发送端设备的发送窗口或发送速率。
  32. 一种网络设备,包括处理器和存储器,所述处理器与所述存储器耦合,其特征在于,
    所述存储器,用于存储程序;
    所述处理器,用于执行所述存储器中的程序,使得所述网络设备执行如权利要求1-17中任一项所述的方法。
  33. 一种计算机可读存储介质,包括程序,当其在计算机上运行时,使得计算机执行如权利要求1-17中任一项所述的方法。
  34. 一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如权利要求1-17中任一项所述的方法。
  35. 一种芯片,所述芯片包括处理器与数据接口,所述处理器通过所述数据接口读取存储器上存储的指令,执行如权利要求1-17中任一项所述的方法。
PCT/CN2022/100657 2021-06-28 2022-06-23 一种网络设备的主动队列管理方法及网络设备 WO2023274006A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22831822.6A EP4344153A4 (en) 2021-06-28 2022-06-23 ACTIVE QUEUE MANAGEMENT METHOD FOR A NETWORK DEVICE AND NETWORK DEVICE
US18/397,708 US20240137327A1 (en) 2021-06-28 2023-12-27 Active queue management method for network device and network device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110721083.3 2021-06-28
CN202110721083.3A CN115550263A (zh) 2021-06-28 2021-06-28 一种网络设备的主动队列管理方法及网络设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/397,708 Continuation US20240137327A1 (en) 2021-06-28 2023-12-27 Active queue management method for network device and network device

Publications (1)

Publication Number Publication Date
WO2023274006A1 true WO2023274006A1 (zh) 2023-01-05

Family

ID=84690752

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100657 WO2023274006A1 (zh) 2021-06-28 2022-06-23 一种网络设备的主动队列管理方法及网络设备

Country Status (4)

Country Link
US (1) US20240137327A1 (zh)
EP (1) EP4344153A4 (zh)
CN (1) CN115550263A (zh)
WO (1) WO2023274006A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932631A (zh) * 2023-07-18 2023-10-24 哈尔滨晨文科技开发有限公司 一种基于大数据的检测数据可视化管理系统及方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150207628A1 (en) * 2013-01-25 2015-07-23 Ralph John Hilla Restructuring the computer and its association with the internet
CN103430489B (zh) * 2011-12-20 2016-11-30 华为技术有限公司 内容分发网络中文件下载方法、装置和系统
CN106302228A (zh) * 2016-10-18 2017-01-04 中南大学 一种数据中心网络中基于任务感知的传输控制方法
CN112468403A (zh) * 2019-09-06 2021-03-09 华为技术有限公司 一种通信方法及其相关设备
CN112822120A (zh) * 2019-11-18 2021-05-18 华为技术有限公司 一种实现拥塞控制的方法、装置和系统

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112737964B (zh) * 2020-12-25 2022-10-14 北京大学深圳研究生院 一种融合推拉语义的传输控制方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103430489B (zh) * 2011-12-20 2016-11-30 华为技术有限公司 内容分发网络中文件下载方法、装置和系统
US20150207628A1 (en) * 2013-01-25 2015-07-23 Ralph John Hilla Restructuring the computer and its association with the internet
CN106302228A (zh) * 2016-10-18 2017-01-04 中南大学 一种数据中心网络中基于任务感知的传输控制方法
CN112468403A (zh) * 2019-09-06 2021-03-09 华为技术有限公司 一种通信方法及其相关设备
CN112822120A (zh) * 2019-11-18 2021-05-18 华为技术有限公司 一种实现拥塞控制的方法、装置和系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4344153A4

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932631A (zh) * 2023-07-18 2023-10-24 哈尔滨晨文科技开发有限公司 一种基于大数据的检测数据可视化管理系统及方法

Also Published As

Publication number Publication date
EP4344153A1 (en) 2024-03-27
EP4344153A4 (en) 2024-10-16
US20240137327A1 (en) 2024-04-25
CN115550263A (zh) 2022-12-30

Similar Documents

Publication Publication Date Title
KR102385762B1 (ko) 속도 최적화된 정체 관리
EP2890065B1 (en) Systems and methods for managing congestion
US9419900B2 (en) Multi-bit indicator set according to feedback based on an equilibrium length of a queue
US6894974B1 (en) Method, apparatus, media, and signals for controlling packet transmission rate from a packet source
WO2021103706A1 (zh) 控制数据包发送方法、模型训练方法、装置及系统
US20170005933A1 (en) Machine for smoothing and/or polishing slabs of stone material, such as natural or agglomerated stone, ceramic and glass
CN110730469B (zh) 一种基于扩展卡尔曼无线网络带宽预测方法及其拥塞控制
EP4020892A1 (en) Network parameter configuration method and apparatus
US20240137327A1 (en) Active queue management method for network device and network device
Lu et al. Dynamic ECN marking threshold algorithm for TCP congestion control in data center networks
US9843526B2 (en) Pacing enhanced packet forwarding/switching and congestion avoidance
Abu-Shareha Integrated Random Early Detection for Congestion Control at the Router Buffer.
CN113438182B (zh) 一种基于信用的流量控制系统和流量控制方法
US20240064109A1 (en) Method and system for dynamic quota-based congestion management
Pan et al. Improvement of BBRv2 Congestion Control Algorithm Based on Flow‐aware ECN
Baklizi Stabilizing average queue length in active queue management method
Xu et al. Stability and fairness of rate estimation-based AIAD congestion control in TCP
CN113950099B (zh) 一种网络拥塞控制方法及设备
US7500012B2 (en) Method for controlling dataflow to a central system from distributed systems
Zhang et al. Adaptive fast TCP
Shu et al. Analysing and improving convergence of quantized congestion notification in Data Center Ethernet
US11924106B2 (en) Method and system for granular dynamic quota-based congestion management
Das et al. A Dynamic Algorithm for Optimization of Network Traffic through Smart Network Switch Data Flow Management
Wan et al. Research on Improved Algorithm of RDMA Network Congestion Control for Data Center
Jie et al. F 2-HPCC: Achieve Faster Convergence and Better Fairness for HPCC

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: 22831822

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022831822

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022831822

Country of ref document: EP

Effective date: 20231221

NENP Non-entry into the national phase

Ref country code: DE