WO2021134621A1 - Message scheduling method and apparatus - Google Patents

Message scheduling method and apparatus Download PDF

Info

Publication number
WO2021134621A1
WO2021134621A1 PCT/CN2019/130825 CN2019130825W WO2021134621A1 WO 2021134621 A1 WO2021134621 A1 WO 2021134621A1 CN 2019130825 W CN2019130825 W CN 2019130825W WO 2021134621 A1 WO2021134621 A1 WO 2021134621A1
Authority
WO
WIPO (PCT)
Prior art keywords
congestion control
control protocol
messages
message
credit
Prior art date
Application number
PCT/CN2019/130825
Other languages
French (fr)
Chinese (zh)
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 PCT/CN2019/130825 priority Critical patent/WO2021134621A1/en
Priority to CN201980102805.8A priority patent/CN114788243B/en
Publication of WO2021134621A1 publication Critical patent/WO2021134621A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control

Definitions

  • This application relates to the field of communications, and in particular to a method and device for scheduling messages.
  • the sending device regards the network as a black box, and obtains the change information of the network performance by detecting the network, so as to adjust the transmission data rate to match the capacity of the network. Since the passive congestion control mechanism is adjusted through changes in network performance, and the change in network performance is the damage to the network, such as increased delay and packet loss, the passive congestion control mechanism is based on the premise of network performance damage. Adjusted.
  • the active congestion control mechanism is equivalent to the reservation mechanism.
  • the sending device reserves bandwidth to the network through credit messages, and the network returns a signal to the sending device to control the total amount of data entering the network in advance, thereby fundamentally avoiding network cache delay. Therefore, the active congestion control mechanism does not need to be adjusted on the premise of network performance impairment. Compared with the passive congestion control mechanism, the active congestion control mechanism is an important leap in the development of the transmission protocol.
  • the present application provides a method for scheduling messages, which can realize the control of the active congestion control protocol flow when there is an inactive congestion control protocol flow.
  • a method for scheduling messages includes: receiving multiple messages from a sending device, when the multiple messages include an active congestion control protocol credit message and an inactive congestion control protocol data When sending a message, determine the virtual credit message corresponding to the non-active congestion control protocol data message, and according to the available bandwidth of the credit message, the received active congestion control protocol credit message and the received virtual credit message, from Part or all of the active congestion control protocol credit message is determined in the active congestion control protocol credit message, and the determined part or all of the active congestion control protocol credit message and part of the received non-active congestion control protocol data message are determined Or forward all to the destination device.
  • the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
  • the data message described in the embodiment of this application refers to a message used for user data transmission;
  • the credit message described in the embodiment of this application is a message that does not carry data and is used to represent data message reservation or competition.
  • Resources for user data transmission such as bandwidth.
  • there is a certain correspondence between the credit message and the data message and this correspondence can be used to implement resource allocation for the data message through operations such as scheduling the credit message.
  • the corresponding relationship between the two determines the required resources of the data message according to the number of credit messages.
  • the ratio of the number of credit messages to data messages is 1:2, and each data message needs to occupy 0.1 kilobits per second (kbps) of bandwidth; assuming that the number of credit messages is 50, it can be based on the above The relationship obtains that the number of data messages represented by the 50 credit messages is 100 (that is, 50*2), and then according to the above relationship, it is obtained that the 100 data messages need to occupy a bandwidth of 10 kbps (that is, 0.1 kbps*100).
  • the ratio of the number of credit messages to data messages is 1:2, and the ratio of the bandwidth that each credit message needs to occupy to the bandwidth that each data message needs to occupy is 1:20; then assume that in this example Here, the number of known credit messages is 50, and the bandwidth required for each credit message is 0.001 kbps. According to the above relationship, it can be obtained that the data messages represented by the 50 credit messages need to occupy 2 kbps (ie 0.001 kbps). *50*2*20) bandwidth; assuming that in this example, it is known that each data message needs to occupy a bandwidth of 0.05kbps, and the number of credit messages is 30. According to the above relationship, the 30 can be obtained The data message represented by the credit message needs to occupy a bandwidth of 3kbps (that is, 30*2*0.05kbps).
  • the credit message in the embodiment of the application includes the active congestion control protocol credit message and the virtual credit message described below.
  • the active congestion control protocol credit message can be used to reserve bandwidth for the active congestion control protocol data message
  • the virtual credit Messages can be used to compete for bandwidth for non-active congestion control protocol data messages.
  • active congestion control protocol credit messages exist objectively, while virtual credit messages are temporarily generated intermediate quantities.
  • the following is a unified introduction to the five types of messages in combination with active congestion control protocol and non-active congestion control protocol.
  • the active congestion control protocol is a data transmission protocol based on the reservation mechanism.
  • the active congestion control protocol includes the active congestion control protocol credit message and the active congestion control protocol data message.
  • the active congestion control protocol data message is used for user data Transmission
  • the active congestion control protocol credit message is used to reserve user data transmission for the active congestion control protocol data message.
  • the ratio of active congestion control protocol credit messages to active congestion control protocol data messages is 1:3, the number of active congestion control protocol credit messages is A (A is a non-negative integer), and each active congestion control protocol Credit messages need to occupy a bandwidth of Bkbps (B is a non-negative real number), the same number of active congestion control protocol credit messages and active congestion control protocol data messages, and the bandwidth required to occupy a ratio of 1:10, you can get
  • the bandwidth required for the active congestion control protocol data message represented by the A active congestion control protocol credit message is (B*A*3*10) kbps.
  • the non-active congestion control protocol is a data transmission protocol based on other congestion control mechanisms besides the active congestion control mechanism (such as the reservation mechanism).
  • Non-active congestion control protocols include traditional passive congestion control protocols and other congestion control protocols that are neither active nor passive congestion control protocols.
  • the passive congestion control protocol can be, for example, the transmission control protocol (TCP), and other congestion control protocols that are neither active nor passive congestion control protocols can be, for example, the user datagram protocol (UDP). ).
  • the non-active congestion control protocol data message is a general term for the data messages that may exist in the non-active congestion control protocol, including passive congestion control protocol data messages (such as TCP messages) and neither active congestion control protocol data messages nor active congestion control protocol data messages.
  • passive congestion control protocol data messages such as TCP messages
  • active congestion control protocol data messages nor active congestion control protocol data messages.
  • Other congestion control protocol data messages such as UDP messages that are not passive congestion control protocol data messages.
  • virtual credit messages are used to represent inactive congestion control protocol data messages competing for bandwidth and other resources. It should be understood that the difference between virtual credit messages and objectively existing credit messages such as active congestion control protocol is that virtual credit messages are used to enable non-active congestion control protocol data messages to participate in the competition or allocation of resources such as bandwidth.
  • the temporarily generated intermediate amount is also called the transitional amount.
  • the virtual credit message is not an objectively existing message type in the network, but an intermediate quantity introduced in order to realize the technical solution of the embodiment of the present application, which can also be referred to as a transition quantity.
  • the virtual credit message can be used together with the active congestion control protocol credit message to compete for bandwidth for their corresponding data messages.
  • the virtual credit message is generated by the forwarding device, and is only scheduled for use within the forwarding device, and will not be sent to the network outside the forwarding device.
  • the virtual credit message can be understood as a form of credit message based on the "reservation system".
  • the "reservation system” is the same as the reservation system mentioned above in that both the active congestion control protocol credit message and the virtual credit message can represent the required resources of the corresponding data message ( For example, the bandwidth that needs to be occupied). That is to say, the bandwidth and other resources required for the corresponding number of active congestion control protocol data messages can be determined according to the number of active congestion control protocol credit messages, and the corresponding number of inactive congestion control can also be determined according to the number of virtual credit messages. The bandwidth and other resources that the protocol data message needs to occupy. However, there is also a difference between the "reservation system" and the reservation system mentioned above.
  • the reservation system is that the bandwidth is reserved by the credit message at the current moment, and the sending device will send according to the reserved bandwidth at the next moment The corresponding number of data messages.
  • the "reservation system” can only reserve bandwidth for the next moment based on the number of virtual credit messages at that moment at the current moment, but the sending device will not send a corresponding number of data packets based on the reserved bandwidth at the next moment.
  • the “reservation system” mainly uses the characteristic that the traffic in the network does not change suddenly. According to the number of non-active congestion control protocol data messages at the current moment, the bandwidth allocated to the non-active congestion control protocol data messages at the next moment is adjusted.
  • the "reservation system” is equivalent to reserving as much bandwidth as possible for the non-active congestion control protocol data message at the next moment based on the virtual credit message generated at the current moment, without affecting the network as much as possible.
  • the link performance does not affect the realization of the active congestion control mechanism.
  • the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
  • a method for generating virtual credit messages based on non-active congestion control protocol data messages is provided. These generated virtual credit messages are used as intermediate quantities and are only generated in the forwarding device for corresponding The non-active congestion control protocol data messages compete for bandwidth and other resources, and will not be sent to the network other than the forwarding device, and can be discarded at an appropriate time.
  • the type field In order to distinguish the message types of the above four types of messages (that is, active congestion control protocol credit messages, active congestion control protocol data messages, non-active congestion control protocol data messages and virtual credit messages), you can set the type field, And set different values that can be distinguished in the type field to distinguish. Since the inactive congestion control protocol data message is an existing message format, the original message format may not be changed, that is, no additional type field is set. For the other three types of messages, the type field can be set, and the three types of messages can be distinguished by setting different values of the type field. For example, you can set the type field value of the active congestion control protocol credit message to "1", and set the virtual The type field value of the credit message is "2", and the type field value of the active congestion control protocol data message is set to "3" and so on.
  • the sending device may send one or more of the foregoing multiple messages based on service requirements or a fixed ratio.
  • the sending device may be a device capable of sending messages, such as a terminal device, a host, or a server. It should also be understood that the sending devices that send the foregoing messages may be the same or different.
  • the virtual credit message can be generated using the following generation mechanism.
  • the corresponding virtual credit message may be generated based on the inactive congestion control protocol data message received at the current moment.
  • corresponding virtual credit messages can be generated according to a predetermined ratio per message for non-active congestion control protocol data messages.
  • non-active congestion control protocol data messages and virtual credit messages use 1:1. 2:1, 3:1, 2:3 and other ratios.
  • the virtual credit message may use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • SCP stand-in control protocol
  • SCP is a self-defined transmission protocol with congestion control capabilities, similar to the working mode and function of TCP, it is to control how the sending device (such as the source host, the source terminal, etc.) transmits to the destination device (such as the destination server) , Destination terminal, etc.)
  • the transmission control protocol for sending data Assuming that the credit message uses the SCP protocol, the credit message and the data message of the SCP protocol can have a proportional relationship and other corresponding relationships, for example, it can be a variety of proportional relationships such as 1:2, 4:1, and so on. Here, 1:1 is taken as an example.
  • the ratio of SCP protocol credit messages to data messages is 1:1, that is to say, every time the sending device receives one SCP protocol credit message, it triggers the sending of one SCP protocol data message.
  • the virtual credit message also adopts the corresponding generation scheme, that is, the virtual credit message is generated in an equal proportion according to the non-active congestion control protocol data message, and the proportion is the same as that used by the SCP protocol. For example, if a 1:1 ratio is used, when a credit message is generated, a forwarding device receives an inactive congestion control protocol data message, and a corresponding virtual credit message is generated.
  • each information of the virtual credit message can be obtained by the following method.
  • the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
  • the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied.
  • the source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header.
  • the value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message.
  • the virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
  • the active congestion control protocol credit messages that do not meet the requirements may be discarded, or some or all of the virtual credit messages may be discarded.
  • all virtual credit messages can be discarded after the first level of QoS scheduling is completed, or all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling, and all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling. Before round scheduling, discard all virtual credit messages.
  • the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
  • the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
  • the active congestion control protocol to be forwarded is determined based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message
  • two types of credit messages can be selected based on certain preset rules or strategies.
  • the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the M non-active congestion control protocol data is determined
  • the P virtual credit messages corresponding to the message are selected from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the N active congestion control protocol credit messages and the P virtual credit messages Determine K active congestion control protocol credit messages, where K is a positive integer less than or equal to N.
  • the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages.
  • the credit message when the credit message only includes the aforementioned active congestion control protocol credit message and the virtual credit message, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as It is equivalent to the available bandwidth of the sum of the two types of credit messages (ie, mixed credit messages).
  • Available bandwidth for the current credit message may be, for example, a certain percentage of the total network bandwidth, such as 5%, 15%, 25.5%, etc., or may also be a specific bandwidth value, such as 100 megabits per second (million bits per second). second, Mbps).
  • the available bandwidth of the credit message may be based on the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, and the virtual credit The correspondence between the message and the inactive congestion control protocol data message is determined.
  • the active congestion control protocol credit message there is a corresponding relationship between the active congestion control protocol credit message and the dynamic congestion control protocol data message, such as a proportional relationship.
  • the sending device receives the returned active congestion control protocol credit message, it can trigger a corresponding number of Active congestion control protocol data messages.
  • virtual credit messages and inactive congestion control protocol data messages there is a similar correspondence between virtual credit messages and inactive congestion control protocol data messages. For example, it can also be a proportional relationship, which is equivalent to reserving bandwidth based on a certain number of virtual credit messages. It can meet the transmission of a corresponding number of inactive congestion control protocol data messages. It can be understood that when the number of active congestion control protocol credit messages and virtual credit messages is changed, the number of their respective corresponding data messages will also change according to their respective corresponding relationships.
  • the rate of the sum of active congestion control protocol credit messages and virtual credit messages can be restricted.
  • the sum of the two can be restricted to a fixed proportion x% of the network bandwidth, such as 5%, 10.4%, 16%, etc. , Where x can be a real number greater than 0 and less than 100. Limiting the bandwidth occupied by the sum of the two according to the network bandwidth can make the total amount of data packets represented by the two not exceed the network bandwidth.
  • a hybrid credit message is defined, which is used to represent the hybrid sum of the above two kinds of credit messages.
  • the rate of mixed credit messages can be limited to a fixed proportion x% of the link bandwidth, such as 5%, 10.4%, 16%, etc., where x can be a real number greater than 0 and less than 100.
  • the ratio of the bandwidth corresponding to the number of correspondence between the two needs to be occupied is 1:9. That is to say, when the ratio of the two numbers is 1:1, the ratio of the bandwidth occupied by the two is 1:9.
  • the correspondence between virtual credit messages and non-active congestion control protocol data messages is 1:1; the ratio of bandwidth that needs to be occupied is also 1:9.
  • 10% of the total network bandwidth can be allocated to credit messages, and 90% of the total network bandwidth can be allocated to data messages.
  • the available bandwidth for credit messages is 10% of the total network bandwidth.
  • the following method of discarding more credit messages may be used to determine the active congestion control protocol credit messages to be forwarded.
  • Step 1 Compare the number of two types of credit messages
  • Step 2 Compare the bandwidth occupied by the sum of the two credit messages with the available bandwidth of the credit message. When the bandwidth occupied by the two does not exceed the available bandwidth of the credit message, determine to forward all received active congestion control protocols For credit messages, when the bandwidth occupied by the two is greater than the available bandwidth of the credit messages, perform step 3 and discard the excess part;
  • Step 3 When the bandwidth occupied by the two is greater than the available bandwidth of the credit message, discard the part of the credit message of the larger number determined in step 1. For example, when it is determined in step 1 that there are too many active congestion control protocol credit messages, some of the active congestion control protocol credit messages are discarded to ensure that the sum of the remaining active congestion control protocol credit messages and virtual credit messages does not exceed the required bandwidth. The available bandwidth of the credit message, that is, the remaining active congestion control protocol credit message is determined to be forwarded. Similarly, when it is determined in step 1 that there are many virtual credit messages, some virtual credit messages are discarded.
  • step 3 since only the active congestion control protocol credit message to be forwarded needs to be determined, and the virtual credit message does not need to be sent out, in step 3, when the bandwidth occupied by the two is greater than the available bandwidth of the credit message, When the number of virtual credit messages is determined in step 1, there is no need to discard active congestion control protocol credit messages in step 3. Therefore, it can be directly determined that all active congestion control protocol credit messages that need to be forwarded are all, while for virtual credit The message can be completely discarded.
  • it can also be set to retain only a certain percentage of virtual credit messages each time, such as 60%, that is, each time after the corresponding virtual credit message is generated according to the received non-active congestion control protocol data message , Retain only 60% of the virtual credit messages, and then allocate all remaining bandwidth in the available bandwidth of the credit messages except the bandwidth that the 60% virtual credit messages need to occupy to the active congestion control protocol credit messages.
  • the weights of the two types of credit messages can be set, and then based on the available bandwidth of the credit messages and the respective weights of the two types of credit messages, the two types of credit messages can be selected to determine the active congestion control to be forwarded Agreement credit message.
  • the two types of messages can be selected for the following different situations.
  • the weight of the active congestion control protocol credit message and the virtual credit message can be set according to the traffic planned by the network. For example, if the active congestion control protocol traffic accounts for 50% and the non-active congestion control protocol traffic accounts for 50%, the weight of the active congestion control protocol credit message and the virtual credit message can be set to 1:1.
  • the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the M non-active congestion control protocol data is determined
  • K can be determined from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the weight of the active congestion control protocol credit message and the virtual credit message
  • the first-level quality of service (QoS) scheduling when determining the active congestion control protocol credit message to be forwarded, the first-level quality of service (QoS) scheduling can be used, and the scheduling can be performed according to the scheduling result. determine.
  • QoS quality of service
  • K active congestion control protocol credit messages are determined from the N active congestion control protocol credit messages In the process, it can be realized through first-level QoS scheduling.
  • a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling.
  • the WFQ scheduling strategy When using the WFQ scheduling strategy to perform first-level QoS scheduling on active congestion control credit protocol messages (for example, the above N active congestion control protocol credit messages) and virtual credit messages (for example, the above P virtual credit messages), it can be based on The weight is used to allocate bandwidth for the active congestion control protocol credit message and the virtual credit message, and realizes the fair competition of the above two kinds of credit messages.
  • active congestion control credit protocol messages for example, the above N active congestion control protocol credit messages
  • virtual credit messages for example, the above P virtual credit messages
  • the two types of credit messages can be allocated to 100Mbps. bandwidth.
  • the actual bandwidth of the active congestion control protocol credit message for example, the bandwidth required by the active congestion control protocol credit message received at T0
  • the actual bandwidth of the virtual credit message for example, according to the received at T0
  • B2 the bandwidth required for the virtual credit message generated by the non-active congestion control protocol credit message
  • B1>100Mbps and B2 ⁇ 100Mbps increase B1 and B2 remain unchanged, where B1 can be increased up to 200Mbps-B2; that is, the actual bandwidth of the virtual credit message remains unchanged, but the virtual credit message The remaining bandwidth can be allocated to active congestion control protocol credit messages.
  • B1 When B1 ⁇ 100Mbps and B2>100Mbps, increase B2, B1 remains unchanged, where B2 can be increased to 200Mbps-B1 at most; that is, the actual bandwidth of the active congestion control protocol credit message remains unchanged, but active congestion The remaining bandwidth of the control protocol credit message can be allocated to the virtual credit message.
  • the active congestion control protocol credit message to be forwarded after determining the active congestion control protocol credit message to be forwarded, it is also possible to set the forwarding sequence of different messages, and forward different messages according to the forwarding sequence. Text.
  • the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and K active congestion control protocol credits to be forwarded are determined Message.
  • the K active congestion control protocol credit messages can be forwarded first, and then part or all of the M non-active congestion control protocol data messages can be forwarded by using the remaining bandwidth. That is, the K active congestion control protocol credit messages are forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded as much as possible according to the remaining bandwidth.
  • the K active congestion control protocol credit messages are allocated according to the available bandwidth of the credit message, there is no situation in which the K active congestion control protocol credit messages preempt the available bandwidth of the data message. In the above situation, the available bandwidth of all data messages can be used to forward the M inactive congestion control protocol data messages as much as possible.
  • the bandwidth required to forward the M non-active congestion control protocol data messages may exceed the available bandwidth of the data message. At this time, some non-active congestion control protocol data messages can be discarded, but it may also be based on If necessary, the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message is transferred to the M inactive congestion control protocol data messages.
  • the non-active congestion control protocol data message can also be directly set to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message.
  • the M non-active congestion control protocol data messages can be forwarded as much as possible by using the available bandwidth of all data messages, and then the K active congestion control protocol credit messages are forwarded.
  • it may also be set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages.
  • the credit message is a message that does not carry data
  • the number of credit messages to be forwarded is determined according to the available bandwidth of the credit message, so the K active messages to be forwarded
  • the congestion control protocol credit message does not exceed the available bandwidth of the credit message
  • the received inactive congestion control protocol data message is a message carrying data, and the required bandwidth may exceed the available bandwidth of the data message.
  • the foregoing forwarding sequence may also be determined according to the priority by setting a priority.
  • the priority of the active congestion control protocol credit message can be set higher than the priority of the non-active congestion control protocol data message. It is set to forward the high-priority packets first, and then forward the active congestion control protocol credit messages first, and then forward part or all of the non-active congestion control protocol data messages according to the remaining bandwidth.
  • a priority queuing (PQ) scheduling strategy may be used to implement the foregoing process of forwarding each message according to the forwarding order.
  • PQ priority queuing
  • the priority of the hybrid credit message can be set higher than that of the non-active congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the priority of the active congestion control protocol credit message can be set higher than that of the non-active congestion control Protocol data message.
  • the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
  • the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
  • the above steps of generating virtual credit messages are performed.
  • the mixed credit messages are prioritized.
  • the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
  • the received multiple messages also include active congestion control protocol data messages
  • three kinds of messages can also be set According to the forwarding sequence, and forward each message according to the forwarding sequence, the forwarding sequence can also be set according to the priority, and the PQ scheduling strategy can also be used for scheduling.
  • the active congestion control mechanism is a reservation system, that is to say, in this case, the received active congestion control protocol data message is triggered based on the bandwidth reserved through the active congestion control protocol credit message at the previous moment It is forwarded, so the received active congestion control protocol data message needs to occupy the bandwidth not to exceed the bandwidth reserved for it, and thus does not exceed the available bandwidth of the data message.
  • the multiple messages received at a certain moment include N active congestion control protocol credit messages, M inactive congestion control protocol data messages and Q active congestion control protocol data messages, and use the above
  • the method determines the K active congestion control protocol credit messages to be forwarded, and the K active congestion control protocol credit messages will not exceed the available bandwidth of the credit message. Therefore, in this case, the Q active congestion control protocol credit messages will not exceed the available bandwidth of the credit message.
  • the bandwidth occupied by the sum of the control protocol data message and the K active congestion control protocol credit messages will not exceed the total network bandwidth. Therefore, the remaining bandwidth can be used to forward the M inactive congestion control protocol data messages as much as possible.
  • the priority of the active congestion control protocol data message can be the highest, the priority of the active congestion control protocol credit message is second, and the priority of the non-active congestion control protocol data message In the lowest priority order, forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages to the destination device, where , Q is an integer greater than or equal to 1.
  • the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion used to reserve the bandwidth at the next moment. Control the forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages to improve bandwidth utilization.
  • non-active congestion protocol data messages can also use the bandwidth obtained by competition for data transmission. This not only satisfies the low latency requirement of active congestion control, but also enables non-active congestion control protocol data messages to compete with and share bandwidth with active congestion control protocol data messages.
  • the second-level QoS scheduling can also be implemented. When the received inactive congestion protocol data message exceeds the bandwidth reserved at the previous moment, it can be discarded through this scheduling to ensure the transmission performance of the network link.
  • the methods described above can still be used, such as through two-level QoS scheduling, to reserve the next moment bandwidth for the non-active congestion control protocol, and to set the non-active congestion control protocol.
  • the congestion control protocol data message is forwarded.
  • WFQ scheduling because the active congestion control protocol credit message of the reserved bandwidth is not received, the remaining bandwidth of the active congestion control protocol credit message can be transferred to the virtual credit message, then the following For a moment, the bandwidth reserved for inactive congestion control protocol data messages increases.
  • PQ scheduling it is equivalent to only the second highest priority queue where the mixed credit message is located and the low priority queue where the non-active congestion control protocol data message is located. There are data packets, and there are only virtual credit messages in the mixed credit message. Therefore, the mixed credit message in the second-highest priority queue is scheduled first, and then the non-active congestion control protocol data message is scheduled.
  • the method described above can also be used, such as two-level QoS scheduling, to allocate the bandwidth of the next moment for the active congestion control protocol.
  • WFQ scheduling because no non-active congestion control protocol data message is received, it can be considered that non-active congestion control is temporarily unnecessary, and the remaining bandwidth of the virtual credit message can be allocated to the active Congestion control protocol credit messages, then at the next moment, active congestion control protocol data messages can use a larger proportion of bandwidth.
  • PQ scheduling it is equivalent to that there are only data packets in the second highest priority queue where the hybrid credit message is located, and there are only active congestion control protocol credit messages in the hybrid credit message, so only the second highest priority queue needs to be scheduled The hybrid credit message in.
  • the method described above can also be used to forward the active congestion control protocol data message, for example, through two-level QoS scheduling.
  • WFQ scheduling because the non-active congestion control protocol data message and the active congestion control protocol credit message are not received, there is no need to generate a virtual credit message, so WFQ scheduling may not be performed.
  • PQ scheduling it is equivalent to that only the active congestion control protocol data message is in the high-priority queue with data packets, so only the active congestion control protocol data message needs to be scheduled. This situation may occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when the active congestion control protocol credit message for bandwidth reservation is sent) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
  • part or all of the virtual credit messages may also be discarded at an appropriate time to release resources such as storage space occupied by them. For example, after determining the active congestion control protocol credit messages to be forwarded, all virtual credit messages can be discarded, or all virtual credit messages can be discarded before and after forwarding each message according to the forwarding order. All virtual credit messages are discarded after all the steps are completed, and all virtual credit messages can also be discarded after all the steps are executed and before the next round of incoming messages are received.
  • the present application provides an apparatus for scheduling messages.
  • the apparatus includes a communication unit and a processing unit.
  • the communication unit is configured to receive multiple messages from a sending device, and the multiple messages include active congestion control.
  • the processing unit is used to determine the virtual credit message corresponding to the non-active congestion control protocol data message, and according to the available bandwidth of the credit message, the received active congestion control
  • the protocol credit message and the received virtual credit message are used to determine part or all of the active congestion control protocol credit message from the active congestion control protocol credit message;
  • the processing unit is also used to control the determined part or all of the active congestion control
  • the protocol credit message and part or all of the received inactive congestion control protocol data message are forwarded to the destination device.
  • the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
  • each information of the virtual credit message can be obtained by using the processing unit and using the same method as the first aspect.
  • the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
  • the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied.
  • the source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header.
  • the value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message.
  • the virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
  • the processing unit may discard the active congestion control protocol credit message that does not meet the requirements, or may discard some or all of the virtual credit messages.
  • the processing unit can also discard all virtual credit messages after completing the first level of QoS scheduling, or can discard all virtual credit messages after completing the two levels of QoS scheduling, and also Before the next round of scheduling, discard all virtual credit messages.
  • the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
  • the processing unit determines the active congestion to be forwarded based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message
  • the processing unit may choose between the two types of credit messages based on certain preset rules or strategies.
  • the multiple messages received by the communication unit include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the processing unit determines the M inactive congestion.
  • the processing unit can, according to the available bandwidth of the credit message, the N active congestion control protocol credit messages, and the P virtual credit messages, from the N active congestion In the control protocol credit message, K active congestion control protocol credit messages are determined, where K is a positive integer less than or equal to N.
  • the processing unit may be used to execute the related method provided in the first aspect to select between the two types of credit messages. For the sake of brevity, some related content will not be repeated.
  • the available bandwidth of the credit message may be processed by the processing unit according to the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, And the corresponding relationship between the virtual credit message and the inactive congestion control protocol data message is determined.
  • the processing unit when used to determine the active congestion control protocol credit message to be forwarded, it can be scheduled through the first-level quality of service (QoS), and according to The scheduling result is determined.
  • QoS quality of service
  • the above processing unit determines K active congestion control protocol credits from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the weight of the active congestion control protocol credit message, and the weight of the virtual credit message. During the message process, it can be realized through the first-level QoS scheduling.
  • the processing unit may use a weighted fair queue (WFQ) scheduling strategy to perform the first-level QoS scheduling.
  • WFQ weighted fair queue
  • the processing unit When using the WFQ scheduling strategy to perform first-level QoS scheduling on active congestion control credit protocol messages (for example, the above N active congestion control protocol credit messages) and virtual credit messages (for example, the above P virtual credit messages), the processing unit
  • the active congestion control protocol credit message and the virtual credit message can be allocated bandwidth according to the weight, and the fair competition of the above two kinds of credit messages is realized.
  • the processing unit after the processing unit determines the active congestion control protocol credit message to be forwarded, the processing unit can also be used to set the forwarding sequence of different messages. In addition, , The communication unit forwards different messages according to the forwarding sequence.
  • the processing unit may be configured to forward the active congestion control protocol credit message first and then forward the non-active congestion control protocol data message.
  • the multiple messages received by the communication unit include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and the processing unit determines K active congestion control protocol data messages to be forwarded. Congestion control protocol credit messages.
  • the communication unit may first forward the K active congestion control protocol credit messages, and then use the remaining bandwidth to forward part or all of the M non-active congestion control protocol data messages. That is, the communication unit first forwards the K active congestion control protocol credit messages, and then forwards part or all of the M inactive congestion control protocol data messages as much as possible according to the remaining bandwidth.
  • the communication unit can use the available bandwidth of all data messages to forward the M inactive congestion control protocol data messages as much as possible.
  • the communication unit can discard some inactive congestion control protocol data messages, but also The processing unit may convert the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message to be allocated to the M inactive congestion control protocol data messages as needed.
  • the processing unit may also be configured to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message.
  • the communication unit may first use the available bandwidth of all data messages to forward the M inactive congestion control protocol data messages as much as possible, and then forward the K active congestion control protocol credit messages. Further, the communication unit can also reuse the bandwidth occupied by the original virtual credit message to forward the non-active congestion control protocol data message.
  • the processing unit may also set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages, and the communication unit alternately forwards the K active congestion control protocol credit messages according to the setting And the M inactive congestion control protocol data messages.
  • the processing unit may also determine the forwarding order according to the priority by setting a priority.
  • the processing unit may set the priority of the active congestion control protocol credit message to be higher than the priority of the non-active congestion control protocol data message. If it is set to forward the high priority message first, the communication unit will forward the active congestion control protocol credit message first, and then forward part or all of the non-active congestion control protocol data message according to the remaining bandwidth.
  • the processing unit may adopt a priority queuing (PQ) scheduling strategy to implement the foregoing process of forwarding each message according to the forwarding sequence.
  • PQ priority queuing
  • the processing unit may set the priority of the hybrid credit message to be higher than that of the non-active congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the processing unit can set the priority of the active congestion control protocol credit message to be higher than that of the inactive congestion control protocol credit message. Congestion control protocol data message.
  • the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
  • the above steps of generating virtual credit messages are performed.
  • the mixed credit messages are prioritized.
  • the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
  • the processing unit can also set For the three message forwarding sequences, the communication unit can forward each message according to the forwarding sequence, the processing unit can also set the forwarding sequence according to the priority, and the processing unit can also use the PQ scheduling strategy for scheduling.
  • the active congestion control mechanism is a reservation system, that is to say, in this case, the active congestion control protocol data message received by the communication unit is based on the previous time reservation through the active congestion control protocol credit message Bandwidth triggers the forwarding, so the bandwidth occupied by the active congestion control protocol data message received by the communication unit will not exceed the bandwidth reserved for it, and thus will not exceed the available bandwidth of the data message.
  • the processing unit uses the The method described in the article determines the K active congestion control protocol credit messages to be forwarded, and the K active congestion control protocol credit messages will not exceed the available bandwidth of the credit message. Therefore, in this case, the Q The bandwidth occupied by the sum of one active congestion control protocol data message and the K active congestion control protocol credit messages does not exceed the total network bandwidth. Therefore, the communication unit can use the remaining bandwidth to forward the M inactive congestion control protocol data messages as much as possible.
  • the priority order set by the processing unit determines the forwarding order, and the communication unit forwards each message according to the forwarding order determined by the processing unit.
  • the processing unit sets the forwarding order according to the highest priority of the active congestion control protocol data message, the second priority of the active congestion control protocol credit message, and the lowest priority of the non-active congestion control protocol data message.
  • the communication unit can forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and the M non-active congestion control protocol data messages to the destination device according to the forwarding sequence Part or all of the text, where Q is an integer greater than or equal to 1.
  • the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion used to reserve the bandwidth at the next moment. Control the forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages to improve bandwidth utilization.
  • the communication unit has only received inactive congestion control protocol data messages, and the communication unit has only received active congestion control protocol data messages.
  • the operations of receiving and forwarding are performed by the communication unit, and other operations are performed by the processing unit, which will not be repeated here.
  • the processing unit may also discard part or all of the virtual credit messages at an appropriate time to release resources such as storage space occupied by the processing unit. For example, the processing unit may discard all virtual credit messages after determining the active congestion control protocol credit messages to be forwarded, or discard all virtual credit messages before, after or during the execution of forwarding each message according to the forwarding order, or After all the steps are executed, all the virtual credit messages are discarded, and all the virtual credit messages may also be discarded after all the steps are executed and before the next round of incoming messages is received.
  • the present application provides a forwarding device, including one or more processors, one or more memories, and one or more transceivers.
  • the one or more memories are used to store computer programs
  • the one or more processors are used to call and run the computer programs stored in the memory, and control the one or more transceivers to send and receive signals, so as to forward
  • the device executes the method in the first aspect or any possible implementation manner thereof.
  • this application provides a computer-readable storage medium in which computer instructions are stored.
  • the computer instructions When the computer instructions are run on a computer, the computer can execute the first aspect or any of its possible implementations. In the method.
  • the present application provides a computer program product.
  • the computer program product includes computer program code.
  • the computer program code runs on a computer, the computer executes the first aspect or any of its possible implementations. method.
  • the present application provides an apparatus for scheduling messages, including a processor and an interface circuit, where the interface circuit is used to receive computer codes or instructions and transmit them to the processor, and the processor is used to run the Computer code or instructions to execute the method in the first aspect or any possible implementation manner thereof.
  • the present application provides a chip including one or more processors.
  • the one or more processors are used to execute a computer program stored in the memory to execute the method in the first aspect or any possible implementation manner thereof.
  • the memory used for storing the computer program is provided independently of the chip.
  • the chip may also include one or more communication interfaces.
  • the one or more communication interfaces may be input/output interfaces, input/output circuits, and the like.
  • the chip may also include one or more of the memories.
  • the present application provides a communication system, which includes at least one forwarding device, at least one sending device, and at least one destination device.
  • the at least one forwarding device can execute the method in the first aspect or any of its possible implementations, and the at least one sending device and the at least one destination device can be any one capable of sending and/or receiving The device of the message. It should be understood that the sending device and the destination device may be the same device or different types of devices.
  • the at least one forwarding device may also be the forwarding device described in the third aspect, or may be a device including the device for scheduling a message described in the second aspect.
  • Fig. 1 is a schematic diagram of a network scenario to which an embodiment of the present application is applicable;
  • FIG. 2 is a schematic flowchart of a method for scheduling messages provided by an embodiment of the present application
  • FIG. 3 is a schematic diagram of a method for scheduling packets at time T0 according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a first-level QoS scheduling method at time T0 provided by an embodiment of the present application
  • FIG. 5 is a schematic diagram of a two-level QoS scheduling method at time T0 provided by an embodiment of the present application
  • FIG. 6 is a schematic diagram of a method for scheduling packets at time T1 according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a two-level QoS scheduling method at time T1 provided by an embodiment of the present application.
  • FIG. 8 is a schematic block diagram of an apparatus for scheduling messages provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application.
  • Transmission control protocol transmission control protocol
  • TCP is a connection-oriented, reliable, byte stream-based transport layer communication protocol defined by the Internet Engineering Task Force (IETF) protocol request for comments (RFC) 793.
  • OSI Internet Engineering Task Force
  • IP Internet protocol suite
  • TCP the middle layer below the application layer.
  • the application layer sends to the TCP layer a data stream represented by 8-bit bytes for inter-network transmission, and then TCP partitions the data stream into message segments of appropriate length.
  • the segment of the message segment is usually affected by the network connected to the computer The maximum transmission unit (MTU) limit of the data link layer.
  • MTU maximum transmission unit
  • TCP transmits the result packet to the IP layer, which then transmits the packet to the TCP layer of the destination device of the message through the network.
  • TCP gives each packet a sequence number, and the sequence number also ensures that the packets sent to the destination device of the message are received in order.
  • the destination device of the message sends back an acknowledgement (ACK) to the successfully received packet; if the sending device does not receive the acknowledgement within a reasonable round-trip time (RTT), then the corresponding The data packet is assumed to have been lost and will be retransmitted.
  • TCP uses a checksum function to check the data for errors; checksums are calculated when sending and receiving.
  • the TCP protocol corresponds to the passive congestion control protocol, and is a data transmission protocol in the inactive congestion control protocol described in the embodiment of the present application.
  • UDP User datagram protocol
  • UDP is used to process data packets in the network like TCP, and is a connectionless protocol. In the OSI model, it is also used to complete the functions specified by the fourth layer of the transport layer, which is the upper layer of the IP protocol.
  • UDP has the disadvantages of not providing data packet grouping, assembly and inability to sort data packets. That is to say, after the message is sent, it is impossible to know whether it has arrived safely and completely.
  • the main function of the UDP protocol is to compress network data traffic into the form of data packets.
  • a typical data packet is a transmission unit of binary data. The first 8 bytes of each data packet are used to contain header information, and the remaining bytes are used to contain specific transmission data.
  • UDP packets do not have reliability guarantees, sequence guarantees, and flow control fields, and their reliability is poor. However, because the UDP protocol has fewer control options, the delay in the data transmission process is small, and the data transmission efficiency is high. It is suitable for applications that do not require high reliability, or applications that can guarantee reliability.
  • congestion control the UDP protocol is neither an active congestion control protocol nor a passive congestion control protocol. It is a congestion control protocol other than the above two congestion control protocols, and is one of the non-active congestion control protocols described in the embodiments of this application. A data transfer protocol.
  • SCP is a self-defined transmission protocol with congestion control capability, similar to the working mode and function of TCP, it is a transmission control protocol that controls how the sending device (such as the source host) sends data to the destination device (such as the destination host) .
  • the SCP protocol is one of many active congestion control mechanisms. In its protocol working mechanism, it is necessary to distinguish between credit messages and data messages. Credit messages are sent before data messages. The role of credit messages is to provide data. The message reserves the network bandwidth; the device in the middle of the network (for example, the forwarding device in the embodiment of this application) will recognize the credit message, and rate the credit message according to the link bandwidth capability of the device itself, which will exceed the rate limit.
  • the credit message is discarded; the credit message reaches the destination device (such as the destination host) after passing through the device in the middle of the network, the destination device will send the credit message back to the sending device, and the sending device will trigger the corresponding after receiving the credit message
  • the data message of the relationship (for example, the proportional relationship) is sent to the destination device. Since the amount of data packets sent is strictly controlled in accordance with the bandwidth limit of the forwarding device, no data exceeding the network bandwidth will be sent to the network, and network congestion will not be caused, thereby avoiding network packet loss and network buffering. The additional buffering delay that comes, realizes the congestion control transmission protocol with no packet loss and ultra-low delay.
  • the SCP protocol corresponds to the active congestion control protocol in congestion control, and is an example of the active congestion control protocol described in the embodiment of the present application.
  • Congestion control mechanisms include passive congestion control mechanisms and active congestion control mechanisms.
  • the sending device obtains network performance change information by detecting the network, thereby adjusting the message sending rate according to the degree of network congestion, such as TCP Reno.
  • the TCP protocol can be used as the passive congestion control protocol.
  • TCP Reno congestion control is a widely used passive congestion control mechanism, which is mainly divided into four stages: slow start, congestion avoidance, fast retransmission, and fast recovery.
  • slow start in order to maintain dynamic balance, a certain amount of loss must be periodically generated, and the window reduction caused by the loss of a data message takes a long time to recover.
  • window reduction caused by the loss of a data message takes a long time to recover.
  • bandwidth utilization The rate cannot be very high, and as the link bandwidth of the network continues to increase, this drawback is becoming more and more obvious.
  • the sending device reserves bandwidth to the network through credit messages, and the network returns a signal to the sending device to control the total amount of data sent by the sending device to the network and the timing of sending, so as to fundamentally avoid network caching.
  • the SCP protocol can be used as the active congestion control protocol.
  • Non-active congestion control protocol there are other data transmission protocols that are neither passive congestion control protocols nor active congestion control protocols, such as the UDP protocol mentioned above. These congestion control protocols other than the active congestion control protocol are collectively referred to as Non-active congestion control protocol.
  • Packet loss rate the percentage of data packets lost during network transmission.
  • the router When the network link is congested, the router will create a buffer to accumulate data packets. If the blocking time is too long and the limited capacity of the buffer is exhausted, some data packets will be discarded at this time.
  • the response time namely the run trip time (RTT) starts from the sending device sending the sending data to the sending device receiving the confirmation information from the destination device (the destination device immediately sends the confirmation after receiving the data), in total Elapsed time.
  • RTT run trip time
  • Latency also called delay, refers to the time required for data (messages, bits, etc.) to be transmitted from one end of the network (or link) to the other end.
  • the transmission delay refers to the time for the sending device (host or router) to send the data frame
  • the propagation delay refers to the time required for electromagnetic waves to propagate a certain distance in the channel
  • the processing delay refers to the destination device (host or router)
  • the time required for processing such as analysis, data extraction, error checking, routing selection, etc. when a packet (data packet) is received.
  • Queuing delay refers to the time the packet (data packet) is queued in the buffer of the destination device for processing.
  • Congestion management means that when network congestion occurs intermittently and delay-sensitive services require higher quality of service (QoS) than other services, the scheduling order of messages is adjusted to meet the high QoS services of delay-sensitive services.
  • QoS quality of service
  • QoS Quality of service
  • QoS scheduling strategy is very important in network QoS management. For one thing, the application of different scheduling strategies will produce different quality of service. Commonly used QoS scheduling strategies include priority (priority queuing, PQ) scheduling, weighted round robin (WRR) scheduling, fair queue (FQ) scheduling, and weighted fair queue (WFQ) scheduling And so on, and different scheduling strategies can be used in combination.
  • PQ priority queuing
  • WRR weighted round robin
  • FQ fair queue
  • WFQ weighted fair queue
  • LTE Long Term Evolution
  • FDD frequency division duplex
  • TDD Time division duplex
  • UMTS Universal Mobile Telecommunication System
  • WiMAX Worldwide Interoperability for Microwave Access
  • 5G Fifth Generation
  • 5G New Wireless Access Access technology
  • NR new radio access technology
  • MTC machine type communication
  • LTE-M inter-machine communication long-term evolution technology
  • D2D device to device
  • M2M Machine-to-machine
  • IoT Internet of things
  • the forwarding device may be any device that has the function of receiving and sending.
  • the device may be, for example, a router, a switch, a base station, and other devices.
  • This equipment includes but is not limited to: evolved Node B (eNB), radio network controller (RNC), Node B (NB), base station controller (BSC) , Base transceiver station (BTS), home base station (for example, home evolved NodeB, or home Node B, HNB), baseband unit (BBU), wireless fidelity (wireless fidelity, WiFi) system Access point (AP), wireless relay node, wireless backhaul node, transmission point (TP), or transmission and reception point (TRP), etc.
  • eNB evolved Node B
  • RNC radio network controller
  • NB Node B
  • BSC base station controller
  • BBU Base transceiver station
  • home base station for example, home evolved NodeB, or home Node B, HNB
  • BBU baseband unit
  • wireless fidelity wireless fidelity, WiFi
  • AP wireless relay
  • the sending device and the destination device may be terminal devices, network devices, or other devices that may be able to receive and/or send packets.
  • the network device may be, for example, a host, a server, and other devices.
  • Terminal devices can be mobile phones, tablets, computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, industrial control (industrial control) Wireless terminals in ), wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, and wireless terminals in transportation safety , Wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loops, WLL) stations, personal digital assistants (personal digital assistants, PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, the future Terminal equipment in an evolved public land mobile network (PLMN) or terminal equipment in a non-public network, etc.
  • VR virtual reality
  • AR augmented reality
  • industrial control industrial control
  • Wireless terminals in wireless terminals in self-driving
  • wireless terminals in remote medical wireless terminals in smart grid
  • wearable devices can also be called wearable smart devices, which are the general term for using wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes.
  • a wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories.
  • Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction.
  • wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones.
  • the terminal device may also be a terminal device in the Internet of Things (IoT) system.
  • IoT Internet of Things
  • Its main technical feature is to connect objects to the network through communication technology, so as to realize the intelligent network of human-machine interconnection and interconnection of things.
  • Fig. 1 is a schematic diagram of a network scenario to which an embodiment of the present application is applicable.
  • the sending device 110 and the destination device 130 may be terminal devices, network devices, or devices capable of sending and/or receiving packets as described above, and the forwarding device 120 may be devices such as switches, routers, or base stations as described above.
  • the sending device 110 can send a message to the destination device 130 via the forwarding device 120.
  • FIG. 1 is only an example of a scenario to which the method and/or device of the embodiment of the present application can be applied, and there is no limitation.
  • the number of devices and the connection and connection between the devices are not limited.
  • the communication method is also not limited.
  • the network formed between devices may be a wired network or a wireless network.
  • FIG. 1 corresponds to a data center network (DCN) scenario
  • the sending device 110 may correspond to the sending end server
  • the forwarding device 120 may correspond to a leaf switch (LS) or a spine switch (LS).
  • Switch, SS) and other switch devices the destination device 130 may correspond to the receiving end or the target end server.
  • the sender server communicates with the target server
  • the data stream or message sent by the sender server can reach the target server via different switches.
  • both the sending device 110 and the destination device 130 can correspond to various terminal devices such as mobile phones, smart TVs, smart speakers, and tablet computers, and the forwarding device 120 can be devices such as routers.
  • the forwarding device 120 can be devices such as routers.
  • a smart speaker can be used to turn on a smart TV through voice control, the smart speaker can be used as the sending device 110, and the smart TV can be used as the destination device 130.
  • the smart speaker sends a data stream or message to the smart TV, the data stream or message passes through The router goes from the smart speaker to the smart TV.
  • the network scenario shown in FIG. 1 may also correspond to various network scenarios such as wide area network (WAN), which will not be listed here.
  • WAN wide area network
  • the specific implementation of the active congestion control mechanism may be that the sending device 110 sends an active congestion control protocol credit message to the destination device 130 through the forwarding device 120 to reserve bandwidth ,
  • the forwarding device 120 receives the credit message, and forwards part or all of the credit message to the destination device 130 through its outgoing port.
  • the destination device 130 transmits back to the sending device 110 according to the received active congestion control protocol credit message, and sends
  • the device 110 triggers the sending of a corresponding active congestion control protocol data message according to the received back-transmitted active congestion control protocol credit message.
  • the sending device 110 first uses the active congestion control protocol credit message to reserve bandwidth, and then sends the corresponding data message according to the reserved bandwidth.
  • non-active congestion control protocol traffic refers to traffic other than active congestion control protocol traffic, including traditional passive congestion control protocol traffic (such as TCP traffic), and also includes neither active congestion control protocol traffic nor passive congestion control. Protocol traffic of other protocol traffic (such as UDP traffic). It should also be understood that since the non-active congestion control mechanism is premised on network performance impairment, the non-active congestion control protocol can also be referred to as a lossy transmission protocol. The active congestion control mechanism does not need to be premised on network performance impairment, so the active congestion control protocol can also be called a lossless transmission protocol.
  • Data message refers to the message used for user data transmission.
  • a credit message refers to a message that does not carry data, and is used to reserve or compete for resources for user data transmission, such as bandwidth, on behalf of the data message.
  • there is a certain correspondence between the credit message and the data message and this correspondence can be used to implement resource allocation for the data message through operations such as scheduling the credit message.
  • the corresponding relationship between the two determines the required resources of the data message according to the number of credit messages.
  • the ratio of the number of credit messages to data messages is 1:2, and each data message needs to occupy 0.1 kilobits per second (kbps) of bandwidth; assuming that the number of credit messages is 50, it can be based on the above The relationship obtains that the number of data messages represented by the 50 credit messages is 100 (that is, 50*2), and then according to the above relationship, it is obtained that the 100 data messages need to occupy a bandwidth of 10 kbps (that is, 0.1 kbps*100).
  • the ratio of the number of credit messages to data messages is 1:2, and the ratio of the bandwidth that each credit message needs to occupy to the bandwidth that each data message needs to occupy is 1:20; then assume that in this example Here, the number of known credit messages is 50, and the bandwidth required for each credit message is 0.001 kbps. According to the above relationship, it can be obtained that the data messages represented by the 50 credit messages need to occupy 2 kbps (ie 0.001 kbps). *50*2*20) bandwidth; assuming that in this example, it is known that each data message needs to occupy a bandwidth of 0.05kbps, and the number of credit messages is 30. According to the above relationship, the 30 can be obtained The data message represented by the credit message needs to occupy a bandwidth of 3kbps (that is, 30*2*0.05kbps).
  • the credit message in the embodiment of the application includes the active congestion control protocol credit message and the virtual credit message described below.
  • the active congestion control protocol credit message can be used to reserve bandwidth for the active congestion control protocol data message
  • the virtual credit Messages can be used to compete for bandwidth for non-active congestion control protocol data messages.
  • active congestion control protocol credit messages exist objectively, while virtual credit messages are temporarily generated intermediate quantities.
  • the following is a unified introduction to the five types of messages in combination with active congestion control protocol and non-active congestion control protocol.
  • the active congestion control protocol is a data transmission protocol based on the reservation mechanism.
  • the active congestion control protocol includes the active congestion control protocol credit message and the active congestion control protocol data message.
  • the active congestion control protocol data message is used for user data Transmission
  • the active congestion control protocol credit message is used to reserve user data transmission for the active congestion control protocol data message.
  • the ratio of active congestion control protocol credit messages to active congestion control protocol data messages is 1:3, the number of active congestion control protocol credit messages is A (A is a non-negative integer), and each active congestion control protocol Credit messages need to occupy a bandwidth of Bkbps (B is a non-negative real number), the same number of active congestion control protocol credit messages and active congestion control protocol data messages, and the bandwidth required to occupy a ratio of 1:10, you can get
  • the bandwidth required for the active congestion control protocol data message represented by the A active congestion control protocol credit message is (B*A*3*10) kbps.
  • the non-active congestion control protocol is a data transmission protocol based on other congestion control mechanisms in addition to the active congestion control mechanism (reservation mechanism).
  • Non-active congestion control protocols include traditional passive congestion control protocols and other congestion control protocols that are neither active nor passive congestion control protocols.
  • the passive congestion control protocol can be, for example, the transmission control protocol (TCP), and other congestion control protocols that are neither active nor passive congestion control protocols can be, for example, the user datagram protocol (UDP). ).
  • the non-active congestion control protocol data message is a general term for the data messages that may exist in the non-active congestion control protocol, including passive congestion control protocol data messages (such as TCP messages) and neither active congestion control protocol data messages nor active congestion control protocol data messages.
  • passive congestion control protocol data messages such as TCP messages
  • active congestion control protocol data messages nor active congestion control protocol data messages.
  • Other congestion control protocol data messages such as UDP messages that are not passive congestion control protocol data messages.
  • virtual credit messages are used to represent inactive congestion control protocol data messages competing for bandwidth and other resources. It should be understood that the difference between virtual credit messages and objectively existing credit messages such as active congestion control protocol is that virtual credit messages are used to enable non-active congestion control protocol data messages to participate in the competition or allocation of resources such as bandwidth.
  • the temporarily generated intermediate amount is also called the transitional amount.
  • the type field In order to distinguish the message types of the above four types of messages (that is, active congestion control protocol credit messages, active congestion control protocol data messages, non-active congestion control protocol data messages and virtual credit messages), you can set the type field, And set different values that can be distinguished in the type field to distinguish. Since the inactive congestion control protocol data message is an existing message format, the original message format may not be changed, that is, no additional type field is set. For the other three types of messages, the type field can be set, and the three types of messages can be distinguished by setting different values of the type field. For example, you can set the type field value of the active congestion control protocol credit message to "1", and set the virtual The type field value of the credit message is "2", and the type field value of the active congestion control protocol data message is set to "3" and so on.
  • the active congestion control protocol credit message refers to a credit message used to reserve bandwidth for the active congestion control protocol data message and to trigger the sending of the active congestion control protocol data message.
  • the active congestion control protocol credit message is a message that does not carry data, and can be filled into a small packet message, for example, a small packet of 64 to 84 bytes.
  • the sending device first sends the active congestion control protocol credit message at the current moment to reserve the available bandwidth of the active active congestion control protocol data message to be sent at the next moment, then At the next moment, the sending device triggers the sending of the corresponding number of active congestion control protocols according to the number of received active congestion control protocol credit messages (the returned active congestion control protocol credit messages correspond to the available bandwidth reserved at the current moment). Data message. For example, suppose that at the current moment, the sending device sends 50 active congestion control protocol credit messages, and the forwarding device forwards 40 active congestion control protocol credit messages among the 50 active congestion control protocol credit messages according to the current network conditions.
  • the available bandwidth of the 40 active congestion control protocol credit messages corresponding to the active congestion control protocol data message is 10 kbps, then the target device returns the 40 active congestion control protocol credit messages to the sending device through the forwarding device, and sends The device receives the returned 40 active congestion control protocol credit messages, and at the next moment, the sending device sends a corresponding number of active congestion control protocol data messages according to the 40 received active congestion control protocol credit messages.
  • the bandwidth required for the number of active congestion control protocol data messages corresponds to the aforementioned 10 kbps.
  • the forwarding device can limit the rate according to the rate limit configuration of the active congestion control protocol credit messages, and discard the active congestion control protocol credit messages that exceed the rate limit, for example, limit the rate of the active congestion control protocol credit messages to a specific rate 10% of the port bandwidth. It can also schedule according to the QoS scheduling strategy, and discard the active congestion control protocol credit messages that do not meet the strategy.
  • the active congestion control protocol data message is a data message used for user data transmission, and is a data message triggered by the active congestion control protocol credit message to send.
  • the active congestion control protocol credit message can trigger a corresponding number of active congestion control protocol data messages according to the proportional relationship.
  • the virtual credit message is a temporarily generated credit message used to represent the non-active congestion control protocol data message participating in resource competition or allocation such as bandwidth, and is used to implement the concept introduced by the technical solution of the embodiment of the present application. That is to say, the virtual credit message is not an objectively existing message type in the network, but an intermediate quantity introduced in order to realize the technical solution of the embodiment of the present application, which can also be referred to as a transition quantity.
  • the virtual credit message can be used together with the active congestion control protocol credit message to compete for bandwidth for their corresponding data messages.
  • the virtual credit message is generated by the forwarding device, and is only scheduled for use within the forwarding device, and will not be sent to the network outside the forwarding device.
  • the virtual credit message can be understood as a form of credit message based on the "reservation system".
  • the "reservation system” is the same as the reservation system mentioned above in that both the active congestion control protocol credit message and the virtual credit message can represent the required resources of the corresponding data message ( For example, the bandwidth that needs to be occupied). That is to say, the bandwidth and other resources required for the corresponding number of active congestion control protocol data messages can be determined according to the number of active congestion control protocol credit messages, and the corresponding number of inactive congestion control can also be determined according to the number of virtual credit messages. The bandwidth and other resources that the protocol data message needs to occupy. However, there is also a difference between the "reservation system" and the reservation system mentioned above.
  • the reservation system is that the bandwidth is reserved by the credit message at the current moment, and the sending device will send according to the reserved bandwidth at the next moment The corresponding number of data messages.
  • the "reservation system” can only reserve bandwidth for the next moment based on the number of virtual credit messages at that moment at the current moment, but the sending device will not send a corresponding number of data packets based on the reserved bandwidth at the next moment.
  • the “reservation system” mainly uses the characteristic that the traffic in the network does not change suddenly. According to the number of non-active congestion control protocol data messages at the current moment, the bandwidth allocated to the non-active congestion control protocol data messages at the next moment is adjusted.
  • the "reservation system” is equivalent to reserving as much bandwidth as possible for the non-active congestion control protocol data message at the next moment based on the virtual credit message generated at the current moment, without affecting the network as much as possible.
  • the link performance does not affect the realization of the active congestion control mechanism.
  • the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
  • the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied.
  • the source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header.
  • the value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message.
  • the virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
  • a method for generating virtual credit messages based on non-active congestion control protocol data messages is provided. These generated virtual credit messages are used as intermediate quantities and are only generated in the forwarding device for corresponding The non-active congestion control protocol data messages compete for bandwidth and other resources, and will not be sent to the network other than the forwarding device, and can be discarded at an appropriate time.
  • the hybrid credit message refers to the hybrid sum of the active congestion control protocol credit message and the virtual credit message. That is to say, the mixed credit message is not a separate and new message type, but is only used to indicate a mixture of the above two types of credit messages. It is to facilitate the description when only the processing of the sum of the two needs to be expressed, without the need to distinguish the specific processing of the two.
  • the non-active congestion control protocol data message is a collective term for all data messages except the active congestion control protocol data message, and is also used for user data transmission.
  • Non-active congestion control protocol data messages include traditional transmission protocol messages such as TCP messages and UDP messages. Since TCP messages include TCP control signaling and data associated with the route, and UDP is completely data messages, all of them can be called data messages.
  • the TCP message and the UDP message are the general message forms of the traditional transmission protocol, so they can adopt the same message format as the corresponding traditional transmission protocol message, which will not be repeated here.
  • Inactive congestion control protocol data messages are sent from the sending device (source end) to the destination device (destination end), and intermediate forwarding devices (such as switches, routers) forward the message to the destination device.
  • intermediate forwarding devices such as switches, routers
  • Inactive congestion control protocol data messages are sent from the sending device (source end) to the destination device (destination end), and intermediate forwarding devices (such as switches, routers) forward the message to the destination device.
  • intermediate forwarding devices such as switches, routers
  • inactive congestion control protocol datagrams that do not meet the strategy may be discarded. Text.
  • the correspondence between the virtual credit message and the inactive congestion control protocol data message is used, and the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message is used to compare Operations such as scheduling of virtual credit messages and active congestion control protocol credit messages realize the allocation of available bandwidth for the next moment inactive congestion control protocol data messages and active congestion control protocol data messages.
  • the QoS scheduling strategy is used to schedule the above two types of credit messages to determine the number of active congestion control protocol credit messages that the forwarding device can forward at the current moment. These forwarded active congestion control protocol credit messages represent the next moment.
  • the available bandwidth of active congestion control protocol data packets are also provided. This section mainly introduces the five message types and message formats involved in the embodiments of the present application, and the specific usage of various messages in related methods will be discussed below, and will not be described here.
  • virtual credit messages that do not meet the scheduling policy may be discarded. After completing the scheduling of virtual credit messages and active congestion control protocol credit messages, all virtual credit messages can be discarded.
  • FIG. 2 is a schematic flowchart of a method for scheduling messages provided by an embodiment of the present application. The method will be introduced below in conjunction with FIG. 2.
  • the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
  • the multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, where M and N are both integers greater than or equal to 1. Then the N active congestion control protocol credit messages are used to reserve bandwidth for the next active congestion control protocol data message.
  • the sending device may send one or more of the foregoing multiple messages based on service requirements or a fixed ratio.
  • the sending device may be a device capable of sending messages, such as a terminal device, a host, or a server. It should also be understood that the sending devices that send the foregoing messages may be the same or different.
  • the multiple messages received in step 201 include M inactive congestion control protocol data messages
  • P virtual congestion control protocol data messages corresponding to the M inactive congestion control protocol data messages can be determined. Credit message, where M and P are both integers greater than or equal to 1.
  • the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
  • the virtual credit message can be generated using the following generation mechanism.
  • the corresponding virtual credit message may be generated based on the inactive congestion control protocol data message received at the current moment.
  • corresponding virtual credit messages can be generated according to a predetermined ratio per message for non-active congestion control protocol data messages.
  • non-active congestion control protocol data messages and virtual credit messages use 1:1. 2:1, 3:1, 2:3 and other ratios.
  • the virtual credit message may use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • the following uses the SCP protocol as an example to further illustrate the generation mechanism of the virtual credit message.
  • the credit message uses the custom SCP protocol
  • 1:1 is taken as an example, that is, the ratio of the credit message to the data message of the SCP protocol is 1:1
  • the virtual credit message also adopts the corresponding generation scheme, that is, the virtual credit message is generated in an equal proportion according to the non-active congestion control protocol data message, and the proportion is the same as that used by the SCP protocol. For example, if a 1:1 ratio is used, when a credit message is generated, a forwarding device receives an inactive congestion control protocol data message, and a corresponding virtual credit message is generated.
  • the information in the virtual credit message can be obtained using the following method.
  • the virtual credit message can adopt the same message format as the SCP protocol, and the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol fields are not copied .
  • the source port number of the UDP header fills in the port number of the SCP protocol, and the destination port number of the UDP header is the destination port number of the TCP or UDP of the non-active congestion control protocol corresponding to the copy.
  • the virtual credit message also uses a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
  • the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message. It should also be understood that the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
  • the active congestion control protocol credit message to be forwarded can be determined according to the available bandwidth of the credit message, the received active congestion control protocol credit message and the generated virtual credit message, for example, based on certain preset rules or policies choose between two types of credit messages.
  • the multiple messages received in step 201 include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and in step 202, it is determined that the M inactive congestion control protocol data messages are related to each other.
  • the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages.
  • the credit message when the credit message only includes the aforementioned active congestion control protocol credit message and the virtual credit message, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as It is equivalent to the available bandwidth of the sum of the two types of credit messages (ie, mixed credit messages).
  • Available bandwidth for the current credit message may be, for example, a certain percentage of the total network bandwidth, such as 5%, 15%, 25.5%, etc., or may also be a specific bandwidth value, such as 100 megabits per second (million bits per second). second, Mbps).
  • the above-mentioned available bandwidth of the credit message may be based on the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, and the relationship between the virtual credit message and the non-active congestion control protocol data message. The corresponding relationship is determined.
  • the active congestion control protocol credit message there is a corresponding relationship between the active congestion control protocol credit message and the dynamic congestion control protocol data message, such as a proportional relationship.
  • the sending device receives the returned active congestion control protocol credit message, it can Trigger a corresponding number of dynamic congestion control protocol data messages.
  • virtual credit messages and inactive congestion control protocol data messages there is a similar correspondence between virtual credit messages and inactive congestion control protocol data messages.
  • it can also be a proportional relationship, which is equivalent to reserving bandwidth based on a certain number of virtual credit messages. It can meet the transmission of a corresponding number of inactive congestion control protocol data messages. It can be understood that when the number of active congestion control protocol credit messages and virtual credit messages is changed, the number of their respective corresponding data messages will also change according to their respective corresponding relationships.
  • the rate of the sum of active congestion control protocol credit messages and virtual credit messages can be restricted.
  • the sum of the two can be restricted to a fixed proportion x% of the network bandwidth, such as 5%, 15%, 25.5%, etc.
  • x can be a real number greater than 0 and less than 100.
  • Limiting the bandwidth occupied by the sum of the two according to the network bandwidth can make the total amount of data packets represented by the two not exceed the network bandwidth.
  • a hybrid credit message is defined, which is used to represent the hybrid sum of the above two kinds of credit messages.
  • the rate of the mixed credit message can be limited to a fixed ratio x% of the link bandwidth, such as 5%, 15%, 25.5%, etc., where x can be a real number greater than 0 and less than 100.
  • the ratio of the bandwidth corresponding to the number of correspondence between the two needs to be occupied is 1:9. That is to say, when the ratio of the two numbers is 1:1, the ratio of the bandwidth occupied by the two is 1:9.
  • the correspondence between virtual credit messages and non-active congestion control protocol data messages is 1:1; the ratio of bandwidth that needs to be occupied is also 1:9.
  • 10% of the total network bandwidth can be allocated to credit messages, and 90% of the total network bandwidth can be allocated to data messages.
  • the bandwidth occupied by the total amount of credit packets is less than 10%
  • the bandwidth occupied by the total amount of corresponding data packets is less than 90%
  • the bandwidth occupied by the total amount of all packets does not exceed 100% of the network bandwidth
  • the bandwidth occupied by the total amount of credit packets is equal to 10%
  • the bandwidth occupied by the total amount of corresponding data packets is equal to 90%
  • the bandwidth occupied by the total amount of all packets is exactly 100% of the network bandwidth
  • the bandwidth occupied by the total amount of credit messages is greater than 10%
  • the bandwidth occupied by the total amount of corresponding data messages is greater than 90%
  • the bandwidth occupied by the total amount of all messages exceeds 100% of the network bandwidth, that is, it exceeds The maximum bandwidth of the network.
  • the following method of discarding more credit messages may be used to determine the active congestion control protocol credit messages to be forwarded.
  • Step 1 Compare the number of two types of credit messages
  • Step 2 Compare the bandwidth occupied by the sum of the two credit messages with the available bandwidth of the credit message. When the bandwidth occupied by the two does not exceed the available bandwidth of the credit message, determine to forward all received active congestion control protocols For credit messages, when the bandwidth occupied by the two is greater than the available bandwidth of the credit messages, perform step 3 and discard the excess part;
  • Step 3 When the bandwidth occupied by the two is greater than the available bandwidth of the credit message, discard the part of the credit message of the larger number determined in step 1. For example, when it is determined in step 1 that there are too many active congestion control protocol credit messages, some of the active congestion control protocol credit messages are discarded to ensure that the sum of the remaining active congestion control protocol credit messages and virtual credit messages does not exceed the credit. The available bandwidth of the message, that is, the remaining active congestion control protocol credit messages are determined to be forwarded. Similarly, when it is determined in step 1 that there are many virtual credit messages, some virtual credit messages are discarded.
  • step 3 since only the active congestion control protocol credit message to be forwarded needs to be determined, and the virtual credit message does not need to be sent out, in step 3, when the bandwidth occupied by the two is greater than the available bandwidth of the credit message, When the number of virtual credit messages is determined in step 1, there is no need to discard active congestion control protocol credit messages in step 3. Therefore, it can be directly determined that all active congestion control protocol credit messages that need to be forwarded are all, while for virtual credit The message can be completely discarded.
  • it can also be set to retain only a certain percentage of virtual credit messages each time, such as 60%, that is, each time after the corresponding virtual credit message is generated according to the received non-active congestion control protocol data message , Retain only 60% of the virtual credit messages, and then allocate all remaining bandwidth in the available bandwidth of the credit messages except the bandwidth that the 60% virtual credit messages need to occupy to the active congestion control protocol credit messages.
  • the weights of the two types of credit messages can be set, and then based on the available bandwidth of the credit messages and the respective weights of the two types of credit messages, the two types of credit messages can be selected to determine the active congestion control to be forwarded Agreement credit message.
  • the two types of messages can be selected for the following different situations.
  • the weight of the active congestion control protocol credit message and the virtual credit message can be set according to the traffic planned by the network. For example, if the active congestion control protocol traffic accounts for 50% and the non-active congestion control protocol traffic accounts for 50%, the weight of the active congestion control protocol credit message and the virtual credit message can be set to 1:1.
  • the multiple messages received in step 201 include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and in step 202, it is determined that the M inactive congestion control protocol data messages are related to each other.
  • the weights of the N active congestion control protocols can be determined according to the available bandwidth of the credit message, the active congestion control protocol credit message and the weight of the virtual credit message.
  • K proactive congestion control protocol credit messages are determined in the credit messages, where K is a positive integer less than or equal to N.
  • the first-level quality of service (quality of service, QoS) scheduling may be used, and the determination may be made according to the scheduling result.
  • K active congestion control protocol credit messages are determined from the N active congestion control protocol credit messages In the process, it can be realized through first-level QoS scheduling.
  • a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling. This part of the content will be introduced in the relevant content of Figure 3 to Figure 7 below.
  • WFQ weighted fair queue
  • the active congestion control protocol credit messages that do not meet the requirements may be discarded, or some or all of the virtual credit messages may be discarded.
  • all virtual credit messages can be discarded after the first level of QoS scheduling is completed, or all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling, and all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling. Before round scheduling, discard all virtual credit messages.
  • step 201 to step 203 by introducing a virtual credit message corresponding to the non-active congestion control protocol data message, and determining the active congestion control protocol credit message forwarded to the destination device, the active congestion control
  • the protocol credit message reserves bandwidth, it can take into account the impact of non-active congestion control protocol data messages, ensuring that the active congestion control mechanism can still be implemented in the case of non-active congestion control protocol data messages.
  • the determined active congestion control protocol credit message can be forwarded to the destination device, and part or all of the received inactive congestion control protocol data can be forwarded Message.
  • step 204 it is also possible to set the forwarding sequence of different messages, and forward different messages according to the forwarding sequence. For example, by setting the forwarding sequence, the determined active congestion control protocol credit message and the received non-active congestion control protocol data message can be forwarded.
  • the active congestion control protocol credit message can be directly set to forward the active congestion control protocol credit message first and then forward the non-active congestion control protocol data message.
  • the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and K to be forwarded is determined in step 203 Active congestion control protocol credit messages.
  • the K active congestion control protocol credit messages can be forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded by using the remaining bandwidth. That is, the K active congestion control protocol credit messages are forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded as much as possible according to the remaining bandwidth.
  • the K active congestion control protocol credit messages are allocated according to the available bandwidth of the credit message, there is no situation in which the K active congestion control protocol credit messages preempt the available bandwidth of the data message. In the above situation, the available bandwidth of all data messages can be used to forward the M inactive congestion control protocol data messages as much as possible.
  • the bandwidth required to forward the M non-active congestion control protocol data messages may exceed the available bandwidth of the data message. At this time, some non-active congestion control protocol data messages can be discarded, but it may also be based on If necessary, the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message is transferred to the M inactive congestion control protocol data messages.
  • the non-active congestion control protocol data message can also be directly set to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message.
  • the M non-active congestion control protocol data messages can be forwarded as much as possible by using the available bandwidth of all data messages, and then the K active congestion control protocol credit messages are forwarded.
  • it may also be set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages.
  • the credit message is a message that does not carry data
  • the number of credit messages to be forwarded is determined according to the available bandwidth of the credit message, so the K active messages to be forwarded
  • the congestion control protocol credit message does not exceed the available bandwidth of the credit message
  • the received inactive congestion control protocol data message is a message carrying data, and the required bandwidth may exceed the available bandwidth of the data message.
  • the foregoing forwarding sequence may also be determined according to the priority by setting a priority.
  • the priority of the active congestion control protocol credit message can be set higher than the priority of the non-active congestion control protocol data message. It is set to forward the high-priority packets first, and then forward the active congestion control protocol credit messages first, and then forward part or all of the non-active congestion control protocol data messages according to the remaining bandwidth.
  • the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages
  • K to be forwarded is determined in step 203 Active congestion control protocol credit messages.
  • the priority of the active congestion active congestion control protocol credit message is higher than the priority of the non-active congestion control protocol data message
  • the K active congestion control protocol credit messages may be forwarded first, and then the M Part or all of an inactive congestion control protocol data message.
  • a priority queuing (PQ) scheduling strategy may be used to implement the foregoing process of forwarding each message according to the forwarding order.
  • PQ priority queuing
  • the priority of the mixed credit message can be set higher than that of the inactive congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the priority of the active congestion control protocol credit message can be set higher than that of the non-active congestion control Protocol data message.
  • the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
  • the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
  • the above steps of generating virtual credit messages are performed.
  • the mixed credit messages are prioritized.
  • the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
  • the received multiple packets also include active congestion control protocol data packets
  • the forwarding order is set according to the priority, and the PQ scheduling strategy can also be used for scheduling.
  • the active congestion control mechanism is a reservation system, that is to say, in this case, the received active congestion control protocol data message is triggered based on the bandwidth reserved through the active congestion control protocol credit message at the previous moment It is forwarded, so the received active congestion control protocol data message needs to occupy the bandwidth not to exceed the bandwidth reserved for it, and thus does not exceed the available bandwidth of the data message.
  • the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and Q active congestion control protocol data messages are also included.
  • the forwarding order can be set to be active congestion control protocol data messages, active congestion control protocol credit messages, and non-active congestion control protocol data messages.
  • First forward the Q active congestion control protocol data messages then forward the K active congestion control protocol credit messages determined from the N active congestion control protocol credit messages, and finally forward the Q active congestion control protocol data messages Part or all of the message.
  • forwarding sequences can also be set, for example, the forwarding sequence can be set to inactive congestion control protocol data messages, active congestion control protocol data messages, active congestion control protocol credit messages, and for example, forwarding rounds can also be set. , And the different forwarding sequence set in different forwarding rounds, etc.
  • the priority of the foregoing three types of messages can also be set, and the forwarding sequence is determined according to the priority. It is equivalent to forwarding the Q active congestion control protocol data to the destination device according to the priority of the active congestion control protocol data message, the priority of the active congestion control protocol credit message, and the priority of the non-active congestion control protocol data message Message, all of the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages, where Q is an integer greater than or equal to 1.
  • the priority of the active congestion control protocol data message can be the highest, the priority of the active congestion control protocol credit message is second, and the priority of the non-active congestion control protocol data message In the lowest priority order, forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages to the destination device, where , Q is an integer greater than or equal to 1.
  • the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion control used to reserve the bandwidth at the next moment.
  • the forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages improves bandwidth utilization.
  • step 201 in the process of receiving multiple messages in step 201, there may be other situations, for example, no active congestion control protocol credit message is received, or for example, only one kind of message is received.
  • the method described above can be used to determine the message to be forwarded, and to forward the message according to the forwarding order.
  • step 204 when there is no active congestion control protocol credit message (for example, the above N active congestion control protocol credit messages), then in step 204, when the message is forwarded according to the forwarding order, only the active congestion control protocol data message and the inactive congestion control protocol data message need to be forwarded.
  • Congestion control protocol data message For example, in the second-level QoS scheduling process, only active congestion control protocol data messages for high-priority queues (such as the above Q active congestion control protocol data messages) and non-active congestion control protocols for low-priority queues can be used. Data messages (for example, the above M inactive congestion control protocol data messages) are scheduled.
  • step 202 to step 204 may not be executed, and the two received data messages may be directly forwarded, or step 202 to step 204 may be executed, and when step 203 is executed,
  • the bandwidth originally needed to be allocated to the active congestion control protocol credit message is converted to the virtual credit message, that is, the virtual credit message can occupy the available bandwidth of all credit messages at most.
  • the methods described above can still be used, such as two-level QoS scheduling, to reserve the next moment bandwidth for the non-active congestion control protocol, and the non-active congestion control The protocol data message is forwarded.
  • the active congestion control protocol credit message of the reserved bandwidth is not received, the remaining bandwidth of the active congestion control protocol credit message can be transferred to the virtual credit message.
  • the bandwidth reserved for inactive congestion control protocol data messages increases.
  • the forwarding order is determined according to the priority and the message is forwarded, it is equivalent to only the second highest priority queue where the mixed credit message is located and the low priority queue where the non-active congestion control protocol data message is located. Data packets, and there are only virtual credit messages in the hybrid credit messages, so the hybrid credit messages in the second-highest priority pair are scheduled first, and then the non-active congestion control protocol data messages are scheduled.
  • the method described above can also be used, for example, through two-level QoS scheduling, to allocate the bandwidth for the active congestion control protocol at the next moment.
  • step 203 because no non-active congestion control protocol data message is received, it can be considered that non-active congestion control is temporarily unnecessary, and the remaining bandwidth of the virtual credit message can be allocated to the active Congestion control protocol credit messages, then at the next moment, active congestion control protocol data messages can use a larger proportion of bandwidth.
  • step 204 when the forwarding order is determined according to the priority and the message is forwarded, it is equivalent to that there are only data packets in the second highest priority queue where the mixed credit message is located, and there is only the active congestion control protocol in the mixed credit message Credit messages, so only the mixed credit messages in the second-highest priority queue need to be scheduled.
  • step 204 when the forwarding sequence is determined according to the priority and the message is forwarded, it is equivalent to that only the active congestion control protocol data message is in the high-priority queue with data packets, so only the active congestion control protocol data message needs to be scheduled Text. This situation can occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when forwarding the active congestion control protocol credit message used for bandwidth reservation) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
  • all virtual credit messages can be discarded, or all virtual credit messages can be discarded before and after forwarding each message according to the forwarding order. All virtual credit messages are discarded after all the steps are completed, and all virtual credit messages can also be discarded after all the steps are executed and before the next round of incoming messages are received.
  • step 203 when determining the active congestion control protocol credit message to be forwarded according to the available bandwidth of the credit message, the active congestion control protocol credit message and the virtual credit message, part or all of the virtual credit message may be discarded.
  • the available bandwidth of the above two types of credit messages is 10Mbps, and the weight of the two is 1:1
  • the active congestion control protocol credit messages need to occupy bandwidth 6Mbps
  • the virtual credit messages need If the occupied bandwidth is 7 Mbps, part of the active congestion control protocol credit messages and part of the virtual credit messages are discarded, so that the bandwidth occupied by both is 5 Mbps, or all virtual credit messages may be directly discarded at this time.
  • the active congestion control mechanism in the case of non-active congestion control protocol traffic is realized by the above method, since the traffic of the non-active congestion control protocol is not controlled, the non-active congestion control protocol will arrive at the next moment.
  • the congestion control protocol data message may still exceed the bandwidth obtained by the inactive congestion control protocol data message in the above method, and by setting the forwarding sequence to forward the data, the excess part can be discarded without affecting network performance.
  • Figure 2 mainly introduces the method of scheduling messages provided by the embodiments of the present application.
  • step 201 it is mentioned that the types of received messages may be different, mainly because two congestion control mechanisms may exist at the same time or there may be only one. Moreover, the specific methods and procedures of the two congestion control mechanisms are different, which makes the types of messages existing in the network at the same time different.
  • the types of received messages are different, if the method shown in Figure 2 is used for congestion control, different execution processes will occur.
  • the embodiments of the present application also provide several scheduling methods to optimize them. Therefore, the method for scheduling messages provided by the embodiments of the present application by using the scheduling policy will be introduced in the following according to different situations.
  • Time T0 refers to the time when the active congestion control protocol credit message sent by the sending device arrives at the forwarding device.
  • the forwarding device schedules the message received at T0, it will send the backhaul active congestion control protocol credit message to the sending device, and the sending device receives and triggers the sending of active congestion control protocol data according to the backhaul active congestion control protocol credit message.
  • time T1 can be set as the time when the forwarding device receives the active congestion control protocol data message.
  • the sending device at time T0 is reserving bandwidth for the active congestion control protocol data message, and the sending device at time T1 sends the corresponding data message according to the bandwidth reserved at time T0, but for specific settings, There is no restriction on which time point in the process.
  • the forwarding device 400 includes an ingress port 410 and an egress port 420, and the two ports are respectively used for receiving and sending data such as packets.
  • the message 310 and the message 330 are messages sent by the sending device 300 to the destination device via the forwarding device 400, wherein the message 310 is an active congestion control protocol credit message, which is used to reserve bandwidth for the active congestion control protocol data message;
  • the message 330 is an inactive congestion control protocol data message.
  • the message 430 is a virtual credit message generated in the forwarding device 400, and is only valid in the forwarding device 400.
  • the message 440 is a mixed credit message, that is, the mixed sum of the message 310 and the message 430, but it should be understood that in some cases, there may be only two kinds of messages, the message 310 and the message 430, in the message 440. One of them.
  • QoS scheduling refers to the scheduling performed by the forwarding device 400 on some or all of the message 310, the message 430, the message 330, and the message 440 to allocate bandwidth and/or determine the message to be sent.
  • the process between the sending device and the forwarding device is mainly introduced. Therefore, the destination device is not shown in FIGS. 3 to 7, but it should be understood that the forwarding device is performing this In the process of applying the embodiment, when various types of messages are forwarded, they are forwarded to the destination device.
  • FIG. 3 is a schematic diagram of a method for scheduling a message at time T0 provided by an embodiment of the present application.
  • the sending device 300 sends the message 310 and the message 330 to the destination device via the forwarding device 400.
  • the sending device 300 that sends the message 310 and the sending device 300 that sends the message 330 may be the same device or different devices.
  • the sending device 300 sends the message 310 based on service requirements or a fixed ratio.
  • the sending device 300 may be a terminal device, or a device capable of sending packets, such as a host or a switch.
  • the forwarding device 400 receives the message 330 and the message 310 from the sending device 300.
  • T0 time is not unique.
  • the time at which the sending device 300 sends the message 310 can also be set to time T0, and the time at which the sending device 300 sends the message 330 can also be set to time T0. This will not be repeated here.
  • the forwarding device 400 may generate a message 430 based on the message 330 received at time T0.
  • the message 430 is only valid in the forwarding device 400 and will not be sent to the network. in.
  • step 202 in FIG. 2 may be used to generate the message 430.
  • the forwarding device 400 may also perform QoS scheduling on the foregoing packets, and the QoS scheduling may include one-level or multi-level scheduling, which will be described below in conjunction with FIG. 4 and FIG. 5.
  • Fig. 4 is a schematic diagram of a first-level QoS scheduling method at time T0 provided by an embodiment of the present application. It should be understood that the method involved in step 203 in FIG. 2 may also be used to perform the first-level QoS scheduling.
  • the forwarding device 400 may generate a message 430 based on the message 330 received at time T0.
  • the message 430 is only valid in the forwarding device 400 and will not be sent to the network.
  • step 202 in FIG. 2 may be used to generate the message 430.
  • the forwarding device 400 may also determine from the message 310 to be forwarded according to the available bandwidth of the credit message of the active congestion control protocol credit message and the virtual credit message, the received message 310 and the generated message 430 Part or all of the message 310 is used to allocate bandwidth for the data message represented by the message 310.
  • the method described in step 203 in FIG. 2 may be used to determine part or all of the messages 310 to be forwarded from the received messages 310, so as to allocate the bandwidth of the active congestion control protocol data message at the next moment. And to reserve bandwidth for non-active congestion control protocol data messages at the next moment.
  • the first-level QoS scheduling may be performed on the message 310 and the message 430.
  • a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling.
  • WFQ weighted fair queue
  • fair queue (FQ) scheduling is to share network resources as fairly as possible, optimize the delay and jitter of all flows, and allow different queues to obtain fair scheduling opportunities.
  • the WFQ scheduling adds priority considerations on the basis of FQ, so that packets with higher priority have more opportunities for priority scheduling than packets with lower priority.
  • the WFQ scheduling classifies the traffic before the packet enters the queue.
  • the "session" information classification of the flow according to the protocol type of the message, source TCP or UDP port number, destination TCP or UDP port number, source IP address, destination IP address, type of service (ToS) field Automatically classify the traffic in the priority and so on, and provide as many queues as possible to evenly put each flow into a different queue, so as to balance the delay of each flow as a whole.
  • WFQ scheduling allocates the bandwidth that each stream can occupy according to the precedence of the stream. The smaller the priority value, the less bandwidth obtained. The higher the priority value, the more bandwidth is obtained.
  • classification by priority the traffic is marked as a local priority through priority mapping, and each local priority corresponds to a queue number.
  • Each interface is pre-allocated with 8 queues, and packets enter the queue according to the queue number.
  • the WFQ weights of the default queues are the same, and link bandwidth is evenly allocated to each flow.
  • the weight can be modified to change the allocation of the bandwidth that each stream can occupy.
  • the active congestion control protocol credit messages for example, message 310
  • virtual credit messages for example, message 430
  • the active congestion control protocol credit messages and The virtual credit message performs bandwidth allocation and realizes the fair competition of the above two kinds of credit messages.
  • the two types of credit messages can each be allocated a bandwidth of 100 Mbps.
  • the actual bandwidth of the active congestion control protocol credit message that is, the bandwidth that the active congestion control protocol credit message received at T0 needs to occupy
  • B1 the actual bandwidth of the virtual credit message
  • B2 the bandwidth required for the virtual credit message generated by the non-active congestion control protocol credit message
  • B1>100Mbps and B2 ⁇ 100Mbps increase B1 and B2 remain unchanged, where B1 can be increased up to 200Mbps-B2; that is, the actual bandwidth of the virtual credit message remains unchanged, but the virtual credit message The remaining bandwidth can be allocated to active congestion control protocol credit messages.
  • B1 When B1 ⁇ 100Mbps and B2>100Mbps, increase B2, B1 remains unchanged, where B2 can be increased to 200Mbps-B1 at most; that is, the actual bandwidth of the active congestion control protocol credit message remains unchanged, but active congestion The remaining bandwidth of the control protocol credit message can be allocated to the virtual credit message.
  • the forwarding device 400 may also set the rates of the two credit messages to a fixed ratio x% of the link bandwidth, such as 5%, 6%, 13%, etc., where x can be greater than 0 and less than 100.
  • x can be greater than 0 and less than 100.
  • the real number To ensure that the sum of the data messages corresponding to the two credit messages does not exceed the bandwidth of the network link.
  • the available bandwidth of the credit message can be determined according to the total network bandwidth and the correspondence between the two types of credit messages and their corresponding data messages. It should be understood that the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages.
  • the credit message when the credit message includes only the above two types of credit messages, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as equivalent to the sum of the two types of credit messages (ie Hybrid credit message) available bandwidth.
  • the forwarding device 400 may also perform two-level QoS scheduling on the foregoing message, and the scheduling process may be as shown in FIG. 5.
  • Fig. 5 is a schematic diagram of a two-level QoS scheduling method at time T0 provided by an embodiment of the present application.
  • first-level QoS scheduling is performed on the message 310 and the message 430.
  • the first-level QoS scheduling may use the first-level QoS scheduling method shown in FIG. 4 to schedule the message 310 and the message 430, for example, perform WFQ scheduling, and may also use step 203 in FIG. 2 The method involved in this level of QoS scheduling is not repeated here.
  • the method described above can be used to limit the rate of the message 440 and determine the bandwidth occupied by the message 440.
  • second-level QoS scheduling may be performed on the message 440 and the message 330. It should be understood that the second-level QoS scheduling can also be performed by using the method of forwarding each message according to the forwarding sequence involved in step 204 in FIG. 2.
  • the message 440 may be a mixed credit message after scheduling using the method described in FIG. 4.
  • the message 440 may also be the message 310. For example, if the message 430 is discarded after the first-level QoS scheduling is performed, only the message 310 will be left in the message 440.
  • the second-level QoS scheduling may be to schedule the message 330 and the message 440 according to priority.
  • the second-level QoS scheduling may adopt a priority (priority queuing, PQ) scheduling strategy.
  • PQ priority queuing
  • the priority of the hybrid credit message can be set higher than that of the non-active congestion control protocol data message.
  • the priority of the active congestion control protocol credit message can be set.
  • the scheduling will be performed in strict accordance with the order of the priority of the queue. Only after all the packets in the high-priority queue are scheduled, the low-priority queue has a scheduling opportunity. If there are data packets in the high-priority queue, the data packets in the high-priority queue are processed first. Until the high-priority queue is empty, the next priority queue will be processed, and the data packets in it will be processed and the high-priority queue will be checked. Whether the high-priority queue is empty, if the high-priority queue is empty, continue to process the priority queue, if there are data packets in the high-priority queue, then switch to the high-priority queue.
  • packets in the low-priority queue can only be processed when all queues with a priority higher than themselves are empty. When there are too many packets in the higher priority queue, the packets in the lower priority queue will not be served, which causes "queue starvation".
  • the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
  • the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
  • the forwarding device 400 does not receive any active congestion control protocol data messages. Therefore, when performing PQ scheduling, the message 440 is scheduled first, and when the second-highest priority queue where the message 440 is located is empty, it will be scheduled instead.
  • the forwarding device 400 discards all the packets 430 to release the storage space occupied by the forwarding device 400.
  • some packets 430 that do not conform to the scheduling policy may also be discarded.
  • the message 430 may be discarded when the first-level QoS scheduling is performed, and the message 430 may be discarded after all the scheduling is completed, which will not be repeated here.
  • the forwarding device 400 forwards some or all of the scheduled packets 310 to the destination device, and then the destination device returns to the sending device 300 to trigger a corresponding amount of active congestion control Protocol data message. For example, it returns to the sending device 300 after 1 RTT.
  • the message 320 in Figure 6 and Figure 7 refers to the active congestion control protocol data message, which is determined by The active congestion control protocol credit message (ie message 310) triggers the sending.
  • FIG. 6 is a schematic diagram of a method for scheduling packets at time T1 provided by an embodiment of the present application.
  • the sending device 300 sends a message 310, a message 320, and a message 330 to the forwarding device 400, where the message 320 is triggered to be sent by the message 310 at time T0.
  • the sending device 300 that sends the message 310, the message 320, and the message 330 may be the same device or different devices.
  • the sending device 300 may be a device capable of sending messages, such as a terminal device, a host, or a server.
  • the forwarding device 400 receives the message 330 and the message 310 from the sending device 300, and the message 320 triggered by some or all of the messages 310 returned after scheduling at time T0.
  • the setting at time T1 is also not unique, and the time at which the sending device 300 sends the message 320 triggered by the message 310 at time T0 can also be set to time T1, which will not be repeated here.
  • the forwarding device 400 may generate a message 430 based on the message 330 received at time T1.
  • the message 430 is only valid in the forwarding device 400 and will not be sent to the network. in.
  • step 202 in FIG. 2 may be used to generate the message 430.
  • the forwarding device 400 may also perform QoS scheduling on the above-mentioned message.
  • the QoS scheduling may include one-level or multi-level scheduling.
  • the first-level QoS scheduling may be the scheduling between the message 310 and the message 430, and the method involved in step 203 in FIG. 2 may also be used to perform the first-level QoS scheduling.
  • details are not described again.
  • the packet 310 may not exist at time T1, that is, there is no need to reserve bandwidth for the active congestion control protocol data packet at this time, and the first-level QoS scheduling may not be performed. Or in this case, if the first-level QoS scheduling is performed, all the bandwidth available to the original message 310 can be allocated to the message 430, which is equivalent to that the message 430 occupies the available bandwidth of the credit message (here there are two types of bandwidth). Available bandwidth for credit messages).
  • the forwarding device 400 may also perform two-level QoS scheduling on the foregoing message, and the scheduling process may be as shown in FIG. 7.
  • FIG. 7 is a schematic diagram of a two-level QoS scheduling method at time T1 provided by an embodiment of the present application.
  • the two-level QoS scheduling at time T1 will be introduced below in conjunction with FIG. 7.
  • the first-level QoS scheduling is performed on the message 310 and the message 430 first.
  • the first-level QoS scheduling may use the first-level QoS scheduling method shown in FIG. 4 to schedule the packets 310 and 430 at time T1, for example, perform WFQ scheduling, and also use FIG. 2
  • the method involved in step 203 in step 203 performs the first-level QoS scheduling, and will not be repeated here.
  • the packet 310 may not exist at time T1, that is, there is no need to reserve bandwidth for the active congestion control protocol data packet at this time, and the first-level QoS scheduling may not be performed. Or in this case, if the first-level QoS scheduling is performed, all the bandwidth available to the original message 310 can be allocated to the message 430, which is equivalent to that the message 430 occupies the bandwidth.
  • the method described above can be used to limit the rate of the message 440 and determine the bandwidth occupied by the message 440.
  • second-level QoS scheduling may be performed on the message 440 and the message 330. It should be understood that the second-level QoS scheduling can also be performed by using the method of forwarding each message according to the forwarding sequence involved in step 204 in FIG. 2.
  • the message 440 may be a mixed credit message after scheduling using the method described in FIG. 4.
  • the message 440 may also be the message 310. For example, if the message 430 is discarded after the first-level QoS scheduling is performed, only the message 310 will be left in the message 440.
  • the second-level QoS scheduling may be to schedule the message 330 and the message 440 according to priority.
  • the second-level QoS scheduling can adopt a PQ scheduling strategy.
  • active congestion control protocol data message is set as the highest priority, the hybrid credit message as the second highest priority, and the non-active congestion control protocol data message as the low priority.
  • active congestion control protocol data messages have the highest priority; hybrid credit messages have lower priority than active congestion control protocol data messages, but higher than non-active congestion control protocol data messages; not active congestion control The protocol data message has the lowest priority.
  • the second-level QoS scheduling may not be hybrid credit messages, but active congestion control protocol credit messages.
  • the active congestion control protocol credit messages can be set as the second highest priority. .
  • the forwarding device receives the message 330, the message 310, and the message 320 triggered by the message 310 at the time T0. Therefore, when performing the second-level QoS scheduling, it is necessary to perform PQ scheduling on three types of messages: message 320, message 440, and message 330 according to the order of priority from high to low. Among them, message 320 can be set. The priority of is the highest, the message 440 has the second priority, and the message 330 has the lowest priority, which will not be repeated here.
  • both the inactive congestion control protocol data message (message 330) and the active congestion control protocol credit message (message 310) are received, and the active congestion control protocol data message (message 320) is received.
  • the active congestion control protocol data message is prioritized.
  • the mixed credit message is then scheduled, only when the active congestion control
  • the non-active congestion control protocol data message is only scheduled when there are no data packets in the high priority queue where the protocol data message is located and the second highest priority queue where the hybrid credit message is located.
  • the forwarding device 400 may discard all the packets 430 to release resources such as storage space occupied by the forwarding device 400.
  • the active congestion control protocol data message is forwarded first to ensure the low delay effect of the active congestion control mechanism.
  • the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the bandwidth reserved by the active congestion control protocol, and Determine the bandwidth that can be reserved at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for the non-active congestion control protocol data message, so that the non-active congestion control protocol data message can be combined with the active congestion control protocol data message Shared bandwidth.
  • non-active congestion protocol data messages can also be obtained by competition at time T0 Bandwidth for data transmission not only meets the low-latency requirements of active congestion control, but also enables non-active congestion control protocol data messages to compete with and share bandwidth with active congestion control protocol data messages.
  • the second-level QoS scheduling can also be implemented. When the received inactive congestion protocol data message exceeds the bandwidth reserved at T0, it can be discarded through this scheduling to ensure the transmission performance of the network link.
  • the two-level QoS scheduling can still be used to reserve the next time bandwidth for the inactive congestion control protocol, and to forward some or all of the message 330.
  • WFQ scheduling because the message 310 for the reserved bandwidth is not received, the remaining bandwidth of the message 310 can be transferred to the message 430, and then at the next moment, the credit report of the message 330 The available bandwidth for text has increased.
  • PQ scheduling it is equivalent to only the next highest priority queue where the message 440 is located and the low priority queue where the message 330 is located have data packets, and there is only the message 430 in the message 440, so the next highest priority queue can be scheduled first. For the message 440 in the priority pair, the message 330 is then scheduled.
  • the two-level QoS scheduling can also be used to allocate the bandwidth at the next moment for the active congestion control protocol.
  • WFQ scheduling because the message 330 is not received, it can be considered that inactive congestion control is not needed temporarily, and the remaining bandwidth of the message 430 can be allocated to the message 310.
  • the message 320 can use a larger proportion of bandwidth.
  • PQ scheduling it is equivalent to that there are only packets in the second-highest priority queue where the message 440 is located, and there is only the message 310 in the message 440, so only the message 440 in the second-highest priority queue needs to be scheduled.
  • the message 320 can also be forwarded through two-level QoS scheduling.
  • WFQ scheduling because the message 330 and the message 310 are not received, there is no need to generate the message 430, so WFQ scheduling may not be performed.
  • PQ scheduling it is equivalent to that there are only data packets in the high-priority queue where the message 320 is located, so only the message 320 needs to be scheduled. This situation may occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when the message 310 for bandwidth reservation is sent) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
  • the congestion control method of the embodiment of the present application is described above in conjunction with FIG. 1 to FIG. 7.
  • the congestion control apparatus of the embodiment of the present application will be introduced with reference to FIG. 8 to FIG. 9.
  • FIG. 8 is a schematic block diagram of an apparatus for scheduling messages provided by an embodiment of the present application.
  • the apparatus 800 may correspond to the forwarding device in the methods shown in FIGS. 2 to 7, or may be a chip or component applied to the forwarding device, and each module or unit in the processing apparatus 800 may be used for Perform various actions or processing procedures performed by the forwarding device in any of the methods in FIG. 2 to FIG. 7.
  • the processing device 800 may include: a processing unit 810 and a communication unit 820.
  • the processing unit 810 is configured to perform some operations on the received message to determine the message to be forwarded to the destination device.
  • the processing unit 810 may be configured to generate a corresponding virtual credit message according to the received inactive congestion control protocol data message.
  • the processing unit 810 can also be used to assign weights to active congestion control protocol credit messages and virtual credit messages, and can also assign weights to received active congestion control protocol credit messages and non-active congestion control protocol data messages according to the weights.
  • the virtual credit message generated by the document is scheduled to realize bandwidth allocation and so on.
  • processing unit 810 may be configured to perform the corresponding operations in the above method embodiments to realize the corresponding functions of the above method embodiments. For brevity, details are not described herein again.
  • the communication unit 820 is used to receive and send messages. For example, it is used to receive multiple packets from a sending device, and the multiple received packets may include packets related to active congestion control protocol traffic and non-active congestion control protocol traffic, and are also used to send packets to the destination device.
  • the message for example, is used to forward some or all of the above multiple messages from the sending device.
  • the communication unit 820 can be used to receive packets, and can also be used to forward corresponding packets to the destination device according to the scheduling result of the processing unit 810, so as to implement the corresponding functions of the foregoing method embodiments. Go into details again.
  • the processing unit 810 can be used to perform steps 202 and 203 in the method shown in FIG. 2, and the communication unit 820 can be used to perform steps 201 and 204 in the method shown in FIG. It has been introduced above, for the sake of brevity, I will not repeat it here.
  • FIG. 9 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application.
  • the forwarding device 900 includes a processor 910 and a transceiver 920.
  • the forwarding device 900 further includes a memory 930.
  • the processor 910, the transceiver 920 and the memory 930 communicate with each other through internal connection paths to transfer control and/or data signals.
  • the memory 930 is used to store computer programs, and the processor 910 is used to call from the memory 930. And run the computer program to control the transceiver 920 to send and receive signals.
  • the foregoing processor 910 and the memory 930 may be combined into one processing device, and the processor 910 is configured to execute the program code stored in the memory 930 to implement the function of the forwarding device in the foregoing method embodiment.
  • the memory 930 may also be integrated in the processor 910 or independent of the processor 910.
  • the transceiver 920 may be implemented by a transceiver circuit.
  • the foregoing forwarding device may further include a communication interface 940 for forwarding the message output by the transceiver 920, or sending the received message to the transceiver 920 for further processing.
  • the processing device 900 may correspond to the forwarding device in the method embodiments shown in FIG. 2 to FIG. 7 according to the present application, and the processing device 900 may also be a chip or component applied to the forwarding device. Moreover, each module in the processing device 900 implements the corresponding processes in FIG. 2 to FIG. 7.
  • the memory 980 may be used to store program code, so that when the processor 910 executes the program code, the processor 910 is used to execute steps 202 and 203 in the method shown in FIG. 2, and the transceiver 920 is used to execute In the steps 201 and 204 in the method shown in FIG. 2, the process of each unit performing the above-mentioned corresponding steps has been introduced above, and for the sake of brevity, it will not be repeated here.
  • the memory and the memory in the foregoing device embodiments may be physically independent units, or the memory may also be integrated with the processor.
  • this application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions.
  • the computer instructions run on the computer, the computer executes the method for dispatching messages provided in this application by the forwarding device. Operations and/or processing performed.
  • the computer program product includes computer program code.
  • the computer program code runs on a computer, the computer executes the operations and/or operations performed by the forwarding device in the method for scheduling messages provided in this application. deal with.
  • the present application also provides a device, including a processor and an interface circuit, the interface circuit is used to receive computer code or instructions, and transmit to the processor, the processor is used to run the computer code or instructions to execute The operation and/or processing performed by the forwarding device in the method for scheduling messages provided in this application.
  • the application also provides a chip including one or more processors.
  • the one or more processors are used to execute a computer program stored in the memory to execute operations and/or processing performed by the forwarding device in any method embodiment.
  • the memory used for storing the computer program is provided independently of the chip.
  • the chip may also include one or more communication interfaces.
  • the one or more communication interfaces may be input/output interfaces, input/output circuits, and the like.
  • the chip may also include one or more of the memories.
  • the present application also provides a communication system, which includes at least one forwarding device in an embodiment of the present application, and also includes at least one sending device and at least one destination device.
  • the at least one forwarding device can perform the operations and/or processing performed by the forwarding device in the method for scheduling messages provided in this application
  • the at least one sending device and the at least one destination device may be Any device capable of sending and/or receiving messages described in the embodiments. It should be understood that the sending device and the destination device may be the same device or different types of devices.
  • the at least one forwarding device may also be the forwarding device shown in FIG. 9 or a device including the device for scheduling messages shown in FIG. 8.
  • the disclosed system, device, and method can be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a forwarding device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .

Abstract

Provided in the present application are a message scheduling method and apparatus. The method comprises: receiving multiple messages from a sending device; when the multiple messages comprise active congestion control protocol credit messages and non-active congestion control protocol data messages, determining virtual credit messages corresponding to the non-active congestion control protocol data messages, determining some or all active congestion control protocol credit messages among the active congestion control protocol credit messages according to the available bandwidth for credit messages, the received active congestion control protocol credit messages, and the received virtual credit messages, and forwarding to a destination device the determined some or all active congestion control protocol credit messages and some or all of the received non-active congestion control protocol data messages. By introducing virtual credit messages, active congestion control protocol traffic can still be effectively controlled when non-active congestion control protocol traffic is present.

Description

调度报文的方法和装置Method and device for dispatching messages 技术领域Technical field
本申请涉及通信领域,尤其涉及一种调度报文的方法和装置。This application relates to the field of communications, and in particular to a method and device for scheduling messages.
背景技术Background technique
近年来,传输协议的发展呈现出从被动拥塞控制向主动拥塞控制演变的趋势。在被动拥塞控制机制中,发送设备将网络看做黑盒,通过对网络的探测来获取网络性能的变化信息,从而做出传输数据速率的调整以匹配网络的能力。由于被动拥塞控制机制是通过网络性能的变化来做出调整的,而网络性能的变化就是网络的损伤,例如时延变大、丢包等,所以被动拥塞控制机制是以网络性能损伤为前提进行调整的。而主动拥塞控制机制相当于预约机制,发送设备通过信用报文向网络预约带宽,网络会返回信号给发送设备,提前控制进入网络的数据总量,从而根本上避免网的缓存时延。因此主动拥塞控制机制不需要以网络性能损伤为前提进行调整。主动拥塞控制机制相对于被动拥塞控制机制是传输协议发展的重要跃迁。In recent years, the development of transmission protocols has shown a trend of evolving from passive congestion control to active congestion control. In the passive congestion control mechanism, the sending device regards the network as a black box, and obtains the change information of the network performance by detecting the network, so as to adjust the transmission data rate to match the capacity of the network. Since the passive congestion control mechanism is adjusted through changes in network performance, and the change in network performance is the damage to the network, such as increased delay and packet loss, the passive congestion control mechanism is based on the premise of network performance damage. Adjusted. The active congestion control mechanism is equivalent to the reservation mechanism. The sending device reserves bandwidth to the network through credit messages, and the network returns a signal to the sending device to control the total amount of data entering the network in advance, thereby fundamentally avoiding network cache delay. Therefore, the active congestion control mechanism does not need to be adjusted on the premise of network performance impairment. Compared with the passive congestion control mechanism, the active congestion control mechanism is an important leap in the development of the transmission protocol.
但是现有网络中往往可能既存在主动拥塞控制协议流量,又存在被动拥塞控制协议流量,这使得主动拥塞控制协议不知道按照多少带宽去预约,从而影响了主动拥塞控制机制的实现。However, existing networks often have both active congestion control protocol traffic and passive congestion control protocol traffic. This makes the active congestion control protocol do not know how much bandwidth to reserve, thereby affecting the realization of the active congestion control mechanism.
发明内容Summary of the invention
本申请提供一种调度报文的方法,能够在存在非主动拥塞控制协议流量的情况下,实现对主动拥塞控制协议流量的控制。The present application provides a method for scheduling messages, which can realize the control of the active congestion control protocol flow when there is an inactive congestion control protocol flow.
第一方面,提供了一种调度报文的方法,该方法包括:接收来自于发送设备的多个报文,当该多个报文包括主动拥塞控制协议信用报文和非主动拥塞控制协议数据报文时,确定与该非主动拥塞控制协议数据报文对应的虚拟信用报文,并根据信用报文可用带宽、接收的该主动拥塞控制协议信用报文与接收的该虚拟信用报文,从该主动拥塞控制协议信用报文中确定部分或全部主动拥塞控制协议信用报文,并将确定的该部分或全部主动拥塞控制协议信用报文以及接收的该非主动拥塞控制协议数据报文的部分或全部转发给目的设备。In a first aspect, a method for scheduling messages is provided. The method includes: receiving multiple messages from a sending device, when the multiple messages include an active congestion control protocol credit message and an inactive congestion control protocol data When sending a message, determine the virtual credit message corresponding to the non-active congestion control protocol data message, and according to the available bandwidth of the credit message, the received active congestion control protocol credit message and the received virtual credit message, from Part or all of the active congestion control protocol credit message is determined in the active congestion control protocol credit message, and the determined part or all of the active congestion control protocol credit message and part of the received non-active congestion control protocol data message are determined Or forward all to the destination device.
在本申请技术方案中,通过引入虚拟信用报文,使得在利用主动拥塞控制协议信用报文预约带宽时,能够兼顾到非主动拥塞控制协议数据报文的影响,从而使得主动拥塞控制协议流量在存在非主动拥塞控制协议流量的情况下,依然能够得到有效控制。也就是说,通过引入虚拟信用报文,并根据信用报文可用带宽、接收的主动拥塞控制协议信用报文以及生成的虚拟信用报文确定转发给目的设备的主动拥塞控制协议信用报文,能够使得在根据接收的主动拥塞控制协议信用报文确定主动拥塞控制协议数据报文的带宽时,会根据网络链路中存在的非主动拥塞控制协议数据报文的数量进行适当调整,从而保证了主动拥塞 控制机制的有效性。In the technical solution of this application, by introducing virtual credit messages, when using active congestion control protocol credit messages to reserve bandwidth, the influence of non-active congestion control protocol data messages can be taken into account, so that the active congestion control protocol traffic is In the presence of inactive congestion control protocol traffic, it can still be effectively controlled. In other words, by introducing a virtual credit message, and determining the active congestion control protocol credit message forwarded to the destination device based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message, it is possible to When determining the bandwidth of the active congestion control protocol data message according to the received active congestion control protocol credit message, it will make appropriate adjustments according to the number of inactive congestion control protocol data messages existing in the network link, thereby ensuring the initiative Effectiveness of congestion control mechanisms.
需要说明的是,该多个报文可以包括以下至少一种:主动拥塞控制协议数据报文、主动拥塞控制协议信用报文、非主动拥塞控制协议数据报文,且每种报文的数量可能相同也可能不同。It should be noted that the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
本申请实施例所述数据报文是指用于用户数据传输的报文;本申请实施例所述信用报文则是一种不携带数据的报文,用于代表数据报文预约或者竞争用于用户数据传输的资源,例如带宽。也就是说,信用报文和数据报文之间存在一定的对应关系,可以利用该对应关系,通过对信用报文的调度等操作,实现对数据报文的资源分配。The data message described in the embodiment of this application refers to a message used for user data transmission; the credit message described in the embodiment of this application is a message that does not carry data and is used to represent data message reservation or competition. Resources for user data transmission, such as bandwidth. In other words, there is a certain correspondence between the credit message and the data message, and this correspondence can be used to implement resource allocation for the data message through operations such as scheduling the credit message.
可选地,利用信用报文和数据报文之间存在的数量对应关系,数据报文的数量(或者信用报文的需用资源)和数据报文的需用资源(例如需要占用的带宽)之间存在的对应关系,根据信用报文的数量确定数据报文的需用资源。例如,假设信用报文和数据报文数量比例为1:2,每个数据报文需要占用0.1千比特每秒(kbps)的带宽;则假设信用报文的数量为50个,就可以根据上述关系得到该50个信用报文代表的数据报文数量为100(即50*2)个,进而根据上述关系得到该100个数据报文需要占用10kbps(即0.1kbps*100)的带宽。又例如,假设信用报文和数据报文的数量比例为1:2,每个信用报文需要占用的带宽和每个数据报文需要占用的带宽的比例为1:20;则假设在这个例子中,已知信用报文数量为50个,每个信用报文需要占用的带宽为0.001kbps,就可以根据根据上述关系得到该50个信用报文代表的数据报文需要占用2kbps(即0.001kbps*50*2*20)的带宽;假设在这个例子中,已知每个数据报文需要占用的带宽为0.05kbps,信用报文的数量为30个,就可以根据根据上述关系得到该30个信用报文代表的数据报文需要占用3kbps(即30*2*0.05kbps)的带宽。Optionally, use the quantitative correspondence between the credit message and the data message, the number of data messages (or the required resources of the credit message) and the required resources of the data message (for example, the bandwidth that needs to be occupied) The corresponding relationship between the two determines the required resources of the data message according to the number of credit messages. For example, assuming that the ratio of the number of credit messages to data messages is 1:2, and each data message needs to occupy 0.1 kilobits per second (kbps) of bandwidth; assuming that the number of credit messages is 50, it can be based on the above The relationship obtains that the number of data messages represented by the 50 credit messages is 100 (that is, 50*2), and then according to the above relationship, it is obtained that the 100 data messages need to occupy a bandwidth of 10 kbps (that is, 0.1 kbps*100). For another example, suppose the ratio of the number of credit messages to data messages is 1:2, and the ratio of the bandwidth that each credit message needs to occupy to the bandwidth that each data message needs to occupy is 1:20; then assume that in this example Here, the number of known credit messages is 50, and the bandwidth required for each credit message is 0.001 kbps. According to the above relationship, it can be obtained that the data messages represented by the 50 credit messages need to occupy 2 kbps (ie 0.001 kbps). *50*2*20) bandwidth; assuming that in this example, it is known that each data message needs to occupy a bandwidth of 0.05kbps, and the number of credit messages is 30. According to the above relationship, the 30 can be obtained The data message represented by the credit message needs to occupy a bandwidth of 3kbps (that is, 30*2*0.05kbps).
应理解,上述数值指示为了举例说明,也可以采用其他数值,还可以采用其他对应关系等,在此不再赘述。It should be understood that the foregoing numerical indications are for illustrative purposes, and other numerical values can also be used, and other corresponding relationships, etc., can also be used, which will not be repeated here.
本申请实施例中信用报文包括主动拥塞控制协议信用报文以及下文所述虚拟信用报文,其中,主动拥塞控制协议信用报文可以用于为主动拥塞控制协议数据报文预约带宽,虚拟信用报文可以用于为非主动拥塞控制协议数据报文竞争带宽,二者区别在于,主动拥塞控制协议信用报文是客观存在的,而虚拟信用报文则是临时生成的中间量。下面结合主动拥塞控制协议和非主动拥塞控制协议对五种报文进行统一介绍。The credit message in the embodiment of the application includes the active congestion control protocol credit message and the virtual credit message described below. Among them, the active congestion control protocol credit message can be used to reserve bandwidth for the active congestion control protocol data message, and the virtual credit Messages can be used to compete for bandwidth for non-active congestion control protocol data messages. The difference between the two is that active congestion control protocol credit messages exist objectively, while virtual credit messages are temporarily generated intermediate quantities. The following is a unified introduction to the five types of messages in combination with active congestion control protocol and non-active congestion control protocol.
主动拥塞控制协议是一种基于预约机制的数据传输协议,主动拥塞控制协议中包括主动拥塞控制协议信用报文和主动拥塞控制协议数据报文,其中,主动拥塞控制协议数据报文用于用户数据传输,主动拥塞控制协议信用报文用于为主动拥塞控制协议数据报文预约用户数据传输。例如,假设主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的比例为1:3,主动拥塞控制协议信用报文的数量为A(A为非负整数),每个主动拥塞控制协议信用报文需要占用带宽为Bkbps(B为非负实数),相同数量的主动拥塞控制协议信用报文与主动拥塞控制协议数据报文,而这需要占用的带宽比例为1:10,则可以得到该A个主动拥塞控制协议信用报文所能代表的主动拥塞控制协议数据报文需要占用的带宽为(B*A*3*10)kbps。The active congestion control protocol is a data transmission protocol based on the reservation mechanism. The active congestion control protocol includes the active congestion control protocol credit message and the active congestion control protocol data message. Among them, the active congestion control protocol data message is used for user data Transmission, the active congestion control protocol credit message is used to reserve user data transmission for the active congestion control protocol data message. For example, assuming that the ratio of active congestion control protocol credit messages to active congestion control protocol data messages is 1:3, the number of active congestion control protocol credit messages is A (A is a non-negative integer), and each active congestion control protocol Credit messages need to occupy a bandwidth of Bkbps (B is a non-negative real number), the same number of active congestion control protocol credit messages and active congestion control protocol data messages, and the bandwidth required to occupy a ratio of 1:10, you can get The bandwidth required for the active congestion control protocol data message represented by the A active congestion control protocol credit message is (B*A*3*10) kbps.
非主动拥塞控制协议是一种基于除主动拥塞控制机制(例如预约机制)之外的其他拥塞控制机制的数据传输协议。非主动拥塞控制协议包括传统的被动拥塞控制协议,以及既 不是主动拥塞控制协议又不是被动拥塞控制协议的其他拥塞控制协议。其中,被动拥塞控制协议例如可以是传输控制协议(transmission control protocol,TCP),既不是主动拥塞控制协议又不是被动拥塞控制协议的其他拥塞控制协议例如可以是用户数据报协议(user datagram protocol,UDP)。The non-active congestion control protocol is a data transmission protocol based on other congestion control mechanisms besides the active congestion control mechanism (such as the reservation mechanism). Non-active congestion control protocols include traditional passive congestion control protocols and other congestion control protocols that are neither active nor passive congestion control protocols. Among them, the passive congestion control protocol can be, for example, the transmission control protocol (TCP), and other congestion control protocols that are neither active nor passive congestion control protocols can be, for example, the user datagram protocol (UDP). ).
非主动拥塞控制协议数据报文是对非主动拥塞控制协议中可能存在的数据报文的统称,包括被动拥塞控制协议数据报文(例如TCP报文)和既不是主动拥塞控制协议数据报文又不是被动拥塞控制协议数据报文的其他拥塞控制协议数据报文(例如UDP报文)。The non-active congestion control protocol data message is a general term for the data messages that may exist in the non-active congestion control protocol, including passive congestion control protocol data messages (such as TCP messages) and neither active congestion control protocol data messages nor active congestion control protocol data messages. Other congestion control protocol data messages (such as UDP messages) that are not passive congestion control protocol data messages.
本申请实施例中还引入了虚拟信用报文的概念,虚拟信用报文用于代表非主动拥塞控制协议数据报文竞争带宽等资源。应理解,虚拟信用报文与客观存在的例如主动拥塞控制协议信用报文的区别在于,虚拟信用报文是为了使得非主动拥塞控制协议数据报文也能够参与到带宽等资源的竞争或分配中而临时生成的中间量,或者称之为过渡量。In the embodiments of the present application, the concept of virtual credit messages is also introduced. The virtual credit messages are used to represent inactive congestion control protocol data messages competing for bandwidth and other resources. It should be understood that the difference between virtual credit messages and objectively existing credit messages such as active congestion control protocol is that virtual credit messages are used to enable non-active congestion control protocol data messages to participate in the competition or allocation of resources such as bandwidth. The temporarily generated intermediate amount is also called the transitional amount.
也就是说,虚拟信用报文不是网络中客观已存在的报文类型,而是为了实现本申请实施例的技术方案引入的一种中间量,也可以称之为过渡量。虚拟信用报文能够用于与主动拥塞控制协议信用报文一起,为各自对应的数据报文竞争带宽。That is to say, the virtual credit message is not an objectively existing message type in the network, but an intermediate quantity introduced in order to realize the technical solution of the embodiment of the present application, which can also be referred to as a transition quantity. The virtual credit message can be used together with the active congestion control protocol credit message to compete for bandwidth for their corresponding data messages.
类似于主动拥塞控制协议信用报文与主动拥塞控制协议数据报文之间的对应关系,虚拟信用报文与非主动拥塞控制协议数据报文之间也存在相似的对应关系,通过对主动拥塞控制协议信用报文和虚拟信用报文进行调度,就能实现对其各自代表的主动拥塞控制协议数据报文和非主动拥塞控制协议数据报文的带宽等资源分配或竞争。Similar to the corresponding relationship between the active congestion control protocol credit message and the active congestion control protocol data message, there is also a similar corresponding relationship between the virtual credit message and the non-active congestion control protocol data message, through the active congestion control The scheduling of protocol credit messages and virtual credit messages can realize resource allocation or competition for the bandwidth of the active congestion control protocol data messages and non-active congestion control protocol data messages of their respective representatives.
应理解,虚拟信用报文由转发设备产生,仅在转发设备内部调度使用,不会发送到转发设备之外的网络中。It should be understood that the virtual credit message is generated by the forwarding device, and is only scheduled for use within the forwarding device, and will not be sent to the network outside the forwarding device.
可以将虚拟信用报文理解为一种基于“预留制”的信用报文形式。“预留制”与上文所述预约制的相同之处在于,主动拥塞控制协议信用报文和虚拟信用报文这两种信用报文都能够代表各自对应的数据报文的需用资源(例如需要占用的带宽)。也就是说,能够根据主动拥塞控制协议信用报文的数量确定对应数量的主动拥塞控制协议数据报文需要占用的带宽等资源,也能够根据虚拟信用报文的数量确定对应数量的非主动拥塞控制协议数据报文需要占用的带宽等资源。但“预留制”与上文所述预约制也存在区别,二者区别之处在于,预约制是在当前时刻由信用报文先预约带宽,下一时刻发送设备会根据预约到的带宽发送相应数量的数据报文。而“预留制”只能在当前时刻根据该时刻的虚拟信用报文数量为下一时刻预留带宽,但下一时刻发送设备并不会根据该预留带宽发送相应数量的数据报文。“预留制”主要利用了网络中流量不会突变的特性,根据当前时刻中非主动拥塞控制协议数据报文的数量,去调整下一时刻分配给非主动拥塞控制协议数据报文的带宽,因此,“预留制”相当于根据当前时刻所生成的虚拟信用报文的情况为下一时刻的非主动拥塞控制协议数据报文预留尽可能多的带宽,但又尽可能不影响网络中的链路性能,且不影响主动拥塞控制机制的实现。The virtual credit message can be understood as a form of credit message based on the "reservation system". The "reservation system" is the same as the reservation system mentioned above in that both the active congestion control protocol credit message and the virtual credit message can represent the required resources of the corresponding data message ( For example, the bandwidth that needs to be occupied). That is to say, the bandwidth and other resources required for the corresponding number of active congestion control protocol data messages can be determined according to the number of active congestion control protocol credit messages, and the corresponding number of inactive congestion control can also be determined according to the number of virtual credit messages. The bandwidth and other resources that the protocol data message needs to occupy. However, there is also a difference between the "reservation system" and the reservation system mentioned above. The difference between the two is that the reservation system is that the bandwidth is reserved by the credit message at the current moment, and the sending device will send according to the reserved bandwidth at the next moment The corresponding number of data messages. The "reservation system" can only reserve bandwidth for the next moment based on the number of virtual credit messages at that moment at the current moment, but the sending device will not send a corresponding number of data packets based on the reserved bandwidth at the next moment. The "reservation system" mainly uses the characteristic that the traffic in the network does not change suddenly. According to the number of non-active congestion control protocol data messages at the current moment, the bandwidth allocated to the non-active congestion control protocol data messages at the next moment is adjusted. Therefore, the "reservation system" is equivalent to reserving as much bandwidth as possible for the non-active congestion control protocol data message at the next moment based on the virtual credit message generated at the current moment, without affecting the network as much as possible. The link performance does not affect the realization of the active congestion control mechanism.
可选地,虚拟信用报文的报文格式可以采用与主动拥塞控制协议信用报文相同的格式,只是在其特定字段填入不同的信息,例如在类型字段填入不同的信息,用于区分报文类型。Optionally, the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
在本申请实施例中,提供了根据非主动拥塞控制协议数据报文生成的虚拟信用报文的方法,这些生成的虚拟信用报文在作为中间量,只在转发设备中产生,用于为对应的非主 动拥塞控制协议数据报文进行带宽等资源的竞争,不会真正发送到转发设备以外的网络中,且可以在适当时候丢弃。In the embodiment of the present application, a method for generating virtual credit messages based on non-active congestion control protocol data messages is provided. These generated virtual credit messages are used as intermediate quantities and are only generated in the forwarding device for corresponding The non-active congestion control protocol data messages compete for bandwidth and other resources, and will not be sent to the network other than the forwarding device, and can be discarded at an appropriate time.
为了区分上述四种报文(即主动拥塞控制协议信用报文、主动拥塞控制协议数据报文、非主动拥塞控制协议数据报文和虚拟信用报文)的报文类型,可以通过设置类型字段,并在类型字段设置能够区分的不同数值加以区分。由于非主动拥塞控制协议数据报文是已有的报文形式,因此可以不改变原有报文格式,也就是说不额外设置类型字段。而对于其他三种报文则可以设置类型字段,并且通过设置类型字段的不同值将三种报文进行区分,例如可以设置主动拥塞控制协议信用报文的类型字段值为“1”,设置虚拟信用报文的类型字段值为“2”,设置主动拥塞控制协议数据报文的类型字段值为“3”等。In order to distinguish the message types of the above four types of messages (that is, active congestion control protocol credit messages, active congestion control protocol data messages, non-active congestion control protocol data messages and virtual credit messages), you can set the type field, And set different values that can be distinguished in the type field to distinguish. Since the inactive congestion control protocol data message is an existing message format, the original message format may not be changed, that is, no additional type field is set. For the other three types of messages, the type field can be set, and the three types of messages can be distinguished by setting different values of the type field. For example, you can set the type field value of the active congestion control protocol credit message to "1", and set the virtual The type field value of the credit message is "2", and the type field value of the active congestion control protocol data message is set to "3" and so on.
可选地,发送设备可以基于业务需求或者一个固定比例发送上述多个报文中的一种或多种报文。应理解,发送设备可以是终端设备、主机、服务器等能够发送报文的设备。还应理解,发送上述报文的发送设备可以相同,也可以不同。Optionally, the sending device may send one or more of the foregoing multiple messages based on service requirements or a fixed ratio. It should be understood that the sending device may be a device capable of sending messages, such as a terminal device, a host, or a server. It should also be understood that the sending devices that send the foregoing messages may be the same or different.
可选地,虚拟信用报文可以采用下面的产生机制生成。Optionally, the virtual credit message can be generated using the following generation mechanism.
例如,可以基于当前时刻所接收的非主动拥塞控制协议数据报文生成对应的虚拟信用报文。生成方案可以有很多种,可以针对非主动拥塞控制协议数据报文逐报文按照预定比例生成对应的虚拟信用报文,例如非主动拥塞控制协议数据报文与虚拟信用报文采用1:1、2:1、3:1、2:3等各比例。For example, the corresponding virtual credit message may be generated based on the inactive congestion control protocol data message received at the current moment. There are many generation schemes, and corresponding virtual credit messages can be generated according to a predetermined ratio per message for non-active congestion control protocol data messages. For example, non-active congestion control protocol data messages and virtual credit messages use 1:1. 2:1, 3:1, 2:3 and other ratios.
又例如,还可以基于前一时刻非主动拥塞控制协议流量的速率统计生成对应速率的虚拟信用报文。For another example, it is also possible to generate a virtual credit message corresponding to the rate based on the rate statistics of the inactive congestion control protocol traffic at the previous moment.
可选地,虚拟信用报文可以采用与主动拥塞控制协议信用报文大小相同的小包,例如64字节。Optionally, the virtual credit message may use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
下面以替身控制协议(stand-in control protocol,SCP)为例,进一步举例说明虚拟信用报文的产生机制。其中,SCP是自定义的一种具备拥塞控制能力的传输协议,与TCP的工作方式和功能相似,是控制发送设备(例如源端主机、源端终端等)如何向目的设备(例如目的端服务器、目的端终端等)发送数据的传输控制协议。假设信用报文使用SCP协议,则信用报文与SCP协议的数据报文可以存在比例关系等对应关系,例如可以是1:2、4:1等各种比例关系,此处以1:1为例,即SCP协议信用报文和数据报文比例为1:1,也就是说,发送设备每收到1个SCP协议信用报文,就触发发送1个SCP协议数据报文。在这种情况下,虚拟信用报文也采用相应的生成方案,即按照非主动拥塞控制协议数据报文等比例地产生虚拟信用报文,且比例与SCP协议采用的比例相同。例如,如果采用了1:1的比例,则在生成信用报文时,转发设备接收到1个非主动拥塞控制协议数据报文,就会对应产生1个虚拟信用报文。The following takes the stand-in control protocol (SCP) as an example to further illustrate the generation mechanism of the virtual credit message. Among them, SCP is a self-defined transmission protocol with congestion control capabilities, similar to the working mode and function of TCP, it is to control how the sending device (such as the source host, the source terminal, etc.) transmits to the destination device (such as the destination server) , Destination terminal, etc.) The transmission control protocol for sending data. Assuming that the credit message uses the SCP protocol, the credit message and the data message of the SCP protocol can have a proportional relationship and other corresponding relationships, for example, it can be a variety of proportional relationships such as 1:2, 4:1, and so on. Here, 1:1 is taken as an example. , That is, the ratio of SCP protocol credit messages to data messages is 1:1, that is to say, every time the sending device receives one SCP protocol credit message, it triggers the sending of one SCP protocol data message. In this case, the virtual credit message also adopts the corresponding generation scheme, that is, the virtual credit message is generated in an equal proportion according to the non-active congestion control protocol data message, and the proportion is the same as that used by the SCP protocol. For example, if a 1:1 ratio is used, when a credit message is generated, a forwarding device receives an inactive congestion control protocol data message, and a corresponding virtual credit message is generated.
结合第一方面,在第一方面的某些实现方式中,虚拟信用报文的各信息可以采用下面的方法获得。With reference to the first aspect, in some implementation manners of the first aspect, each information of the virtual credit message can be obtained by the following method.
可选地,虚拟信用报文的报文格式可以采用与主动拥塞控制协议信用报文相同的格式,只是在其特定字段填入不同的信息,例如在类型字段填入不同的信息,用于区分报文类型。Optionally, the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
以SCP协议为例,虚拟信用报文的IP头信息拷贝对应的非主动拥塞控制协议数据报文的IP头信息,其中,虚拟信用报文的IP头中的协议字段不进行拷贝。该协议字段填写 UDP的协议号。虚拟信用报文的UDP头的源端口号填写SCP的协议端口号,UDP头的目的端口号拷贝对应的非主动拥塞控制协议数据报文的目的端口号。在SCP协议的类型字段填写的数值,既不同于主动拥塞控制协议信用报文的类型字段的数值,也不同于主动拥塞控制协议数据报文的类型字段的数值,以代表虚拟信用报文。虚拟信用报文也可以采用与主动拥塞控制协议信用报文大小相同的小包,例如64字节。Taking the SCP protocol as an example, the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied. Fill in the protocol number of UDP in this protocol field. The source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header. The value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message. The virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
应理解,虚拟信用报文也可以不对IP头、UDP头、SCP头等中的信息进行限定,只要使得虚拟信用报文能够与主动拥塞控制协议信用报文能够区分开就可以。It should be understood that the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
在上述确定要转发的主动拥塞控制协议信用报文的过程中,可能会丢弃不满足要求的主动拥塞控制协议信用报文,也可能会丢弃部分或全部虚拟信用报文。In the foregoing process of determining the active congestion control protocol credit messages to be forwarded, the active congestion control protocol credit messages that do not meet the requirements may be discarded, or some or all of the virtual credit messages may be discarded.
如果利用QoS调度的方法执行上述过程,还可以在完成第一级QoS调度后,丢弃所有虚拟信用报文,也可以在完成两级QoS调度后,丢弃所有虚拟信用报文,以及还可以在下一轮调度之前,丢弃所有虚拟信用报文。If the QoS scheduling method is used to perform the above process, all virtual credit messages can be discarded after the first level of QoS scheduling is completed, or all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling, and all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling. Before round scheduling, discard all virtual credit messages.
需要说明的是,虚拟信用报文也可以不对IP头、UDP头、SCP头等中的信息进行限定,只要使得虚拟信用报文能够与主动拥塞控制协议信用报文能够区分开就可以。It should be noted that the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
应理解,虚拟信用报文只在生成该虚拟信用报文的转发设备内有效,不会发送到该转发设备以外的网络中。It should be understood that the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
结合第一方面,在第一方面的某些实现方式中,在上述根据信用报文可用带宽、接收的主动拥塞控制协议信用报文与生成的虚拟信用报文,确定要转发的主动拥塞控制协议信用报文的过程中,可以基于一定预设规则或策略对两种信用报文进行取舍。In combination with the first aspect, in some implementations of the first aspect, in the foregoing, the active congestion control protocol to be forwarded is determined based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message In the process of credit messages, two types of credit messages can be selected based on certain preset rules or strategies.
假设在一种情况下,接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,并确定了与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,则根据信用报文可用带宽、该N个主动拥塞控制协议信用报文和该P个虚拟信用报文,从该N个主动拥塞控制协议信用报文中确定出K个主动拥塞控制协议信用报文,其中,K为小于或等于N的正整数。Suppose that in a situation, the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the M non-active congestion control protocol data is determined The P virtual credit messages corresponding to the message are selected from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the N active congestion control protocol credit messages and the P virtual credit messages Determine K active congestion control protocol credit messages, where K is a positive integer less than or equal to N.
需要说明的是,信用报文可用带宽是指所有信用报文的可用带宽之和,或者可以理解为所有信用报文之和的可用带宽。在本申请实施例中,当信用报文只包括上述主动拥塞控制协议信用报文与虚拟信用报文两种信用报文时,则相当于该两种信用报文的可用带宽,或者可以理解为相当于该两种信用报文之和(即混合信用报文)的可用带宽。当的信用报文可用带宽。可选地,该信用报文可用带宽例如可以是网络总带宽的一定比例,例如5%、15%、25.5%等,或者也可以是特定的带宽值,例如100兆比特每秒(million bits per second,Mbps)。It should be noted that the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages. In the embodiment of the present application, when the credit message only includes the aforementioned active congestion control protocol credit message and the virtual credit message, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as It is equivalent to the available bandwidth of the sum of the two types of credit messages (ie, mixed credit messages). Available bandwidth for the current credit message. Optionally, the available bandwidth of the credit message may be, for example, a certain percentage of the total network bandwidth, such as 5%, 15%, 25.5%, etc., or may also be a specific bandwidth value, such as 100 megabits per second (million bits per second). second, Mbps).
结合第一方面,在第一方面的某些实现方式中,上述信用报文可用带宽可以根据网络总带宽、主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的对应关系,以及虚拟信用报文与非主动拥塞控制协议数据报文的对应关系确定。In combination with the first aspect, in some implementations of the first aspect, the available bandwidth of the credit message may be based on the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, and the virtual credit The correspondence between the message and the inactive congestion control protocol data message is determined.
也就是说,主动拥塞控制协议信用报文与动拥塞控制协议数据报文之间存在对应关系,例如比例关系,当发送设备接收到返回的主动拥塞控制协议信用报文后,可以触发相应数量的动拥塞控制协议数据报文。与之相似,虚拟信用报文与非主动拥塞控制协议数据报文之间也存在类似的对应关系,例如也可以是比例关系,则相当于根据一定数量的虚拟信用报文预留带宽之后,就能够满足相应数量的非主动拥塞控制协议数据报文的传输。可 以理解为,当改变主动拥塞控制协议信用报文和虚拟信用报文的数量时,其各自对应的数据报文的数量也会根据其各自的对应关系发生改变。That is to say, there is a corresponding relationship between the active congestion control protocol credit message and the dynamic congestion control protocol data message, such as a proportional relationship. When the sending device receives the returned active congestion control protocol credit message, it can trigger a corresponding number of Active congestion control protocol data messages. Similarly, there is a similar correspondence between virtual credit messages and inactive congestion control protocol data messages. For example, it can also be a proportional relationship, which is equivalent to reserving bandwidth based on a certain number of virtual credit messages. It can meet the transmission of a corresponding number of inactive congestion control protocol data messages. It can be understood that when the number of active congestion control protocol credit messages and virtual credit messages is changed, the number of their respective corresponding data messages will also change according to their respective corresponding relationships.
可选地,可以限制主动拥塞控制协议信用报文和虚拟信用报文之和的速率,例如,可以限制二者之和为网络带宽的固定比例x%,例如5%、10.4%、16%等,其中x可以为大于0且小于100的实数。根据网络带宽对二者之和所占用的带宽进行限制,能够使得二者各自代表的数据报文的总量不会超过网络带宽。Optionally, the rate of the sum of active congestion control protocol credit messages and virtual credit messages can be restricted. For example, the sum of the two can be restricted to a fixed proportion x% of the network bandwidth, such as 5%, 10.4%, 16%, etc. , Where x can be a real number greater than 0 and less than 100. Limiting the bandwidth occupied by the sum of the two according to the network bandwidth can make the total amount of data packets represented by the two not exceed the network bandwidth.
在本申请实施例中,定义了一种混合信用报文,用于表示上述两种信用报文的混合之和。在这种情况下,可以限制混合信用报文的速率为链路带宽的固定比例x%,例如5%、10.4%、16%等,其中x可以为大于0且小于100的实数。In the embodiment of the present application, a hybrid credit message is defined, which is used to represent the hybrid sum of the above two kinds of credit messages. In this case, the rate of mixed credit messages can be limited to a fixed proportion x% of the link bandwidth, such as 5%, 10.4%, 16%, etc., where x can be a real number greater than 0 and less than 100.
举例说明,假设主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的对应关系为1:1,与该数量对应关系所对应的二者需要占用的带宽的比例为1:9。也就是说当二者数量比例为1:1时,二者需要占用的带宽比例为1:9。与之相似,假设虚拟信用报文与非主动拥塞控制协议数据报文的对应关系为1:1;需要占用的带宽比例同样为1:9。又假设网络中只存在上述两种信用报文,则可以将网络总带宽的10%分配给信用报文,将网络总带宽的90%分配给数据报文,也就是说,在这个例子中,信用报文可用带宽为10%的网络总带宽。For example, suppose that the corresponding relationship between the active congestion control protocol credit message and the active congestion control protocol data message is 1:1, and the ratio of the bandwidth corresponding to the number of correspondence between the two needs to be occupied is 1:9. That is to say, when the ratio of the two numbers is 1:1, the ratio of the bandwidth occupied by the two is 1:9. Similarly, suppose that the correspondence between virtual credit messages and non-active congestion control protocol data messages is 1:1; the ratio of bandwidth that needs to be occupied is also 1:9. Assuming that only the above two types of credit messages exist in the network, 10% of the total network bandwidth can be allocated to credit messages, and 90% of the total network bandwidth can be allocated to data messages. In other words, in this example, The available bandwidth for credit messages is 10% of the total network bandwidth.
可选地,可以采用下面丢弃较多信用报文的方法确定要转发的主动拥塞控制协议信用报文。Optionally, the following method of discarding more credit messages may be used to determine the active congestion control protocol credit messages to be forwarded.
步骤一、比较两种信用报文的数量大小;Step 1: Compare the number of two types of credit messages;
步骤二、将两种信用报文之和需要占用的带宽与信用报文可用带宽进行比较,当二者需要占用的带宽不超过该信用报文可用带宽时,确定转发所有接收的主动拥塞控制协议信用报文,当二者需要占用的带宽大于信用报文可用带宽时,执行步骤三,丢弃超出的部分;Step 2. Compare the bandwidth occupied by the sum of the two credit messages with the available bandwidth of the credit message. When the bandwidth occupied by the two does not exceed the available bandwidth of the credit message, determine to forward all received active congestion control protocols For credit messages, when the bandwidth occupied by the two is greater than the available bandwidth of the credit messages, perform step 3 and discard the excess part;
步骤三、当二者需要占用的带宽大于信用报文可用带宽时,丢弃在步骤一判断出的数量较多的那类信用报文的部分报文。例如当在步骤一确定主动拥塞控制协议信用报文较多时,丢弃部分主动拥塞控制协议信用报文,保证剩余的主动拥塞控制协议信用报文与虚拟信用报文之和需要占用的带宽不超过该信用报文可用带宽,也就是说,确定剩余的主动拥塞控制协议信用报文为要转发的。与之类似,当在步骤一确定虚拟信用报文较多时丢弃部分虚拟信用报文。Step 3: When the bandwidth occupied by the two is greater than the available bandwidth of the credit message, discard the part of the credit message of the larger number determined in step 1. For example, when it is determined in step 1 that there are too many active congestion control protocol credit messages, some of the active congestion control protocol credit messages are discarded to ensure that the sum of the remaining active congestion control protocol credit messages and virtual credit messages does not exceed the required bandwidth. The available bandwidth of the credit message, that is, the remaining active congestion control protocol credit message is determined to be forwarded. Similarly, when it is determined in step 1 that there are many virtual credit messages, some virtual credit messages are discarded.
需要说明的是,由于只需要确定要转发的主动拥塞控制协议信用报文,而虚拟信用报文不需要发送出去,所以在步骤三中,当二者需要占用的带宽大于信用报文可用带宽、在步骤一确定虚拟信用报文数量较多时,则在步骤三不需要丢弃主动拥塞控制协议信用报文,因此,可以直接确定需要转发的主动拥塞控制协议信用报文为其全部,而对于虚拟信用报文则完全可以全部丢弃。It should be noted that since only the active congestion control protocol credit message to be forwarded needs to be determined, and the virtual credit message does not need to be sent out, in step 3, when the bandwidth occupied by the two is greater than the available bandwidth of the credit message, When the number of virtual credit messages is determined in step 1, there is no need to discard active congestion control protocol credit messages in step 3. Therefore, it can be directly determined that all active congestion control protocol credit messages that need to be forwarded are all, while for virtual credit The message can be completely discarded.
可选地,还可以设定每次只保留一定比例的虚拟信用报文,例如60%,也就是说,每次在根据接收的非主动拥塞控制协议数据报文生成对应的虚拟信用报文后,只保留60%的虚拟信用报文,再把信用报文可用带宽中除该60%虚拟信用报文需要占用的带宽以外的所有剩余带宽分配给主动拥塞控制协议信用报文。Optionally, it can also be set to retain only a certain percentage of virtual credit messages each time, such as 60%, that is, each time after the corresponding virtual credit message is generated according to the received non-active congestion control protocol data message , Retain only 60% of the virtual credit messages, and then allocate all remaining bandwidth in the available bandwidth of the credit messages except the bandwidth that the 60% virtual credit messages need to occupy to the active congestion control protocol credit messages.
可选地,还可以设定两种信用报文的权重,再根据信用报文可用带宽和两种信用报文各自的权重,对两种信用报文做取舍,确定出要转发的主动拥塞控制协议信用报文。Optionally, the weights of the two types of credit messages can be set, and then based on the available bandwidth of the credit messages and the respective weights of the two types of credit messages, the two types of credit messages can be selected to determine the active congestion control to be forwarded Agreement credit message.
可选地,在这个例子中可以针对下面几种不同情况对两种报文进行取舍。Optionally, in this example, the two types of messages can be selected for the following different situations.
情况一、当两种信用报文之和需要占用的带宽不超过信用报文可用带宽时,不丢弃任何信用报文。Case 1: When the bandwidth occupied by the sum of the two types of credit messages does not exceed the available bandwidth of the credit message, no credit message is discarded.
情况二、当两种信用报文之和需要占用的带宽超过信用报文可用带宽时,将两种信用报文超过权重的部分丢弃,使其总量需要占用的带宽不超过信用报文可用带宽。Case 2: When the bandwidth occupied by the sum of the two types of credit messages exceeds the available bandwidth of the credit messages, discard the parts that exceed the weight of the two types of credit messages, so that the total bandwidth occupied by the two types of credit messages does not exceed the available bandwidth of the credit messages .
可选地,可以根据网络规划的流量设定主动拥塞控制协议信用报文与虚拟信用报文的权重。例如主动拥塞控制协议流量占比为50%,非主动拥塞控制协议流量占比50%,则可以设定主动拥塞控制协议信用报文与虚拟信用报文的权重为1:1。Optionally, the weight of the active congestion control protocol credit message and the virtual credit message can be set according to the traffic planned by the network. For example, if the active congestion control protocol traffic accounts for 50% and the non-active congestion control protocol traffic accounts for 50%, the weight of the active congestion control protocol credit message and the virtual credit message can be set to 1:1.
假设在一种情况下,接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,并确定了与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,则可以根据信用报文可用带宽、主动拥塞控制协议信用报文和虚拟信用报文的权重,从该N个主动拥塞控制协议信用报文中确定出K个主动拥塞控制协议信用报文,其中,K为小于或等于N的正整数。Suppose that in a situation, the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the M non-active congestion control protocol data is determined For the P virtual credit messages corresponding to the message, K can be determined from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the weight of the active congestion control protocol credit message and the virtual credit message An active congestion control protocol credit message, where K is a positive integer less than or equal to N.
结合第一方面,在第一方面的某些实现方式中,在确定要转发的主动拥塞控制协议信用报文时,可以通过一级服务质量(quality of service,QoS)调度,并根据调度结果进行确定。In combination with the first aspect, in some implementations of the first aspect, when determining the active congestion control protocol credit message to be forwarded, the first-level quality of service (QoS) scheduling can be used, and the scheduling can be performed according to the scheduling result. determine.
例如,在上述根据信用报文可用带宽和主动拥塞控制协议信用报文的权重以及虚拟信用报文的权重,从该N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文的过程中,可以通过一级QoS调度实现。For example, in the foregoing, based on the available bandwidth of the credit message and the weight of the active congestion control protocol credit message and the weight of the virtual credit message, K active congestion control protocol credit messages are determined from the N active congestion control protocol credit messages In the process, it can be realized through first-level QoS scheduling.
可选地,可以采用加权公平队列(weighted fair queue,WFQ)调度策略进行该一级QoS调度。Optionally, a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling.
在利用WFQ调度策略对主动拥塞控制信用协议报文(例如上述N个主动拥塞控制协议信用报文)与虚拟信用报文(例如上述P个虚拟信用报文)进行一级QoS调度时,可以根据权重,对主动拥塞控制协议信用报文和虚拟信用报文进行带宽分配,并实现了上述两种信用报文的公平竞争。When using the WFQ scheduling strategy to perform first-level QoS scheduling on active congestion control credit protocol messages (for example, the above N active congestion control protocol credit messages) and virtual credit messages (for example, the above P virtual credit messages), it can be based on The weight is used to allocate bandwidth for the active congestion control protocol credit message and the virtual credit message, and realizes the fair competition of the above two kinds of credit messages.
举例说明,假设上述两种信用报文设置的权重分配为1:1,信用报文可用带宽为200Mbps,则当只存在上述两种信用报文时,两种信用报文分别能够分配到100Mbps的带宽。为了表述简洁,主动拥塞控制协议信用报文的实际带宽(例如T0时刻接收的主动拥塞控制协议信用报文需要占用的带宽)用B1表示,虚拟信用报文的实际带宽(例如根据T0时刻接收的非主动拥塞控制协议信用报文所生成的虚拟信用报文需要占用的带宽)用B2表示,则在WFQ调度过程中,可能存在如下情况:For example, suppose the weight distribution of the above two types of credit messages is 1:1, and the available bandwidth of the credit messages is 200Mbps. When there are only the above two types of credit messages, the two types of credit messages can be allocated to 100Mbps. bandwidth. For the sake of simplicity, the actual bandwidth of the active congestion control protocol credit message (for example, the bandwidth required by the active congestion control protocol credit message received at T0) is represented by B1, and the actual bandwidth of the virtual credit message (for example, according to the received at T0 The bandwidth required for the virtual credit message generated by the non-active congestion control protocol credit message) is denoted by B2, then in the WFQ scheduling process, the following situations may exist:
当B1<=100Mbps且B2<=100Mbps时,二者分配到的带宽不变。When B1<=100Mbps and B2<=100Mbps, the bandwidth allocated to the two remains unchanged.
当B1>100Mbps且B2<100Mbps时,增大B1,B2保持不变,其中B1最大可以增大到200Mbps-B2;也就是说,虚拟信用报文的实际带宽不变,但虚拟信用报文的剩余带宽可以分配给主动拥塞控制协议信用报文。When B1>100Mbps and B2<100Mbps, increase B1 and B2 remain unchanged, where B1 can be increased up to 200Mbps-B2; that is, the actual bandwidth of the virtual credit message remains unchanged, but the virtual credit message The remaining bandwidth can be allocated to active congestion control protocol credit messages.
当B1<100Mbps且B2>100Mbps时,增大B2,B1保持不变,其中B2最大可以增大到200Mbps-B1;也就是说,主动拥塞控制协议信用报文的实际带宽不变,但主动拥塞控制协议信用报文的剩余带宽可以分配给虚拟信用报文。When B1<100Mbps and B2>100Mbps, increase B2, B1 remains unchanged, where B2 can be increased to 200Mbps-B1 at most; that is, the actual bandwidth of the active congestion control protocol credit message remains unchanged, but active congestion The remaining bandwidth of the control protocol credit message can be allocated to the virtual credit message.
当B1>100Mbps且B2>100Mbps时,二者均只能分配到100Mbps带宽。When B1>100Mbps and B2>100Mbps, both can only be allocated to 100Mbps bandwidth.
通过上述两种信用报文的公平竞争,能够使得在确定下一时刻主动拥塞控制协议数据报文的带宽时,综合考虑了主动拥塞控制协议信用报文和虚拟信用报文,也就是说,会根据网络中存在的非主动拥塞控制协议数据报文的数量进行适当调整,从而使得发送设备在根据返回的主动拥塞控制协议信用报文触发发送相应的主动拥塞控制协议数据报文时,不会超过网络中主动拥塞控制协议数据报文实际可用的带宽。上述WFQ调度使得主动拥塞控制协议流量在存在非主动拥塞控制协议流量的情况下,依然能够得到有效控制,并且实现了主动拥塞控制协议数据报文和非主动拥塞控制协议数据报文之间能够公平竞争带宽。Through the fair competition of the above two types of credit messages, it is possible to comprehensively consider the active congestion control protocol credit messages and virtual credit messages when determining the bandwidth of the active congestion control protocol data message at the next moment. Make appropriate adjustments according to the number of non-active congestion control protocol data messages existing in the network, so that the sending device will not exceed the amount when the corresponding active congestion control protocol data message is triggered to send the corresponding active congestion control protocol data message according to the returned active congestion control protocol credit message. The actual bandwidth available for active congestion control protocol data packets in the network. The above-mentioned WFQ scheduling enables active congestion control protocol traffic to be effectively controlled in the presence of non-active congestion control protocol traffic, and realizes fairness between active congestion control protocol data messages and non-active congestion control protocol data messages Competing for bandwidth.
结合第一方面,在第一方面的某些实现方式中,在确定了要转发的主动拥塞控制协议信用报文之后,还可以通过设置不同报文的转发顺序,并根据该转发顺序转发不同报文。In combination with the first aspect, in some implementations of the first aspect, after determining the active congestion control protocol credit message to be forwarded, it is also possible to set the forwarding sequence of different messages, and forward different messages according to the forwarding sequence. Text.
可选地,可以直接设置先转发主动拥塞控制协议信用报文再转发非主动拥塞控制协议数据报文。假设在一种情况下,接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,并且确定出要转发的K个主动拥塞控制协议信用报文。则可以先转发该K个主动拥塞控制协议信用报文,再利用剩余带宽转发该M个非主动拥塞控制协议数据报文的部分或全部。也就是说,先转发该K个主动拥塞控制协议信用报文,再根据剩余带宽尽可能多地转发该M个非主动拥塞控制协议数据报文中的部分或全部。Optionally, it can be directly set to forward the active congestion control protocol credit message first and then forward the non-active congestion control protocol data message. Suppose that in a situation, the received multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and K active congestion control protocol credits to be forwarded are determined Message. Then, the K active congestion control protocol credit messages can be forwarded first, and then part or all of the M non-active congestion control protocol data messages can be forwarded by using the remaining bandwidth. That is, the K active congestion control protocol credit messages are forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded as much as possible according to the remaining bandwidth.
需要说明的是,由于该K个主动拥塞控制协议信用报文是根据信用报文可用带宽进行分配的,所以不存在该K个主动拥塞控制协议信用报文抢占数据报文可用带宽的情况,因此在上述情况下,可以利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文。It should be noted that since the K active congestion control protocol credit messages are allocated according to the available bandwidth of the credit message, there is no situation in which the K active congestion control protocol credit messages preempt the available bandwidth of the data message. In the above situation, the available bandwidth of all data messages can be used to forward the M inactive congestion control protocol data messages as much as possible.
还应理解,也可能出现转发该M个非主动拥塞控制协议数据报文需要的带宽超过了数据报文可用带宽的情况,这时候可以丢弃部分非主动拥塞控制协议数据报文,但也可能根据需要,将原信用报文可用带宽中虚拟信用报文所占用的带宽转为分配给该M个非主动拥塞控制协议数据报文。It should also be understood that the bandwidth required to forward the M non-active congestion control protocol data messages may exceed the available bandwidth of the data message. At this time, some non-active congestion control protocol data messages can be discarded, but it may also be based on If necessary, the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message is transferred to the M inactive congestion control protocol data messages.
又例如,还可以直接设置先转发非主动拥塞控制协议数据报文再转发主动拥塞控制协议信用报文。在这种情况下,可以先利用利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文,再转发该K个主动拥塞控制协议信用报文。进一步还可以,最后再利用原虚拟信用报文占用的带宽转发非主动拥塞控制协议数据报文。For another example, it can also be directly set to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message. In this case, the M non-active congestion control protocol data messages can be forwarded as much as possible by using the available bandwidth of all data messages, and then the K active congestion control protocol credit messages are forwarded. Furthermore, it is possible to finally use the bandwidth occupied by the original virtual credit message to forward the non-active congestion control protocol data message.
又例如,还可以设置交替转发该K个主动拥塞控制协议信用报文和该M个非主动拥塞控制协议数据报文。For another example, it may also be set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages.
需要说明的是,信用报文是一种不携带数据的报文,而且在确定上述要转发的信用报文的数量时是根据信用报文可用带宽进行确定的,因此要转发的该K个主动拥塞控制协议信用报文不会超过信用报文可用带宽,而接收的非主动拥塞控制协议数据报文是携带了数据的报文,需要的带宽可能会超过数据报文可用带宽。It should be noted that the credit message is a message that does not carry data, and the number of credit messages to be forwarded is determined according to the available bandwidth of the credit message, so the K active messages to be forwarded The congestion control protocol credit message does not exceed the available bandwidth of the credit message, and the received inactive congestion control protocol data message is a message carrying data, and the required bandwidth may exceed the available bandwidth of the data message.
结合第一方面,在第一方面的某些实现方式中,在上述确定转发顺序的过程中,还可以通过设置优先级,根据优先级确定上述转发顺序。With reference to the first aspect, in some implementation manners of the first aspect, in the foregoing process of determining the forwarding sequence, the foregoing forwarding sequence may also be determined according to the priority by setting a priority.
可选地,可以设置主动拥塞主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文的优先级。设定先转发优先级高的报文,则优先转发主动拥塞控制协议信用报文,再根据剩余的带宽转发非主动拥塞控制协议数据报文的部分或全部。Optionally, the priority of the active congestion control protocol credit message can be set higher than the priority of the non-active congestion control protocol data message. It is set to forward the high-priority packets first, and then forward the active congestion control protocol credit messages first, and then forward part or all of the non-active congestion control protocol data messages according to the remaining bandwidth.
可选地,可以采用优先级队列(priority queuing,PQ)调度策略实现上述根据转发顺序转发各报文的过程。Optionally, a priority queuing (PQ) scheduling strategy may be used to implement the foregoing process of forwarding each message according to the forwarding order.
可选地,可以设定混合信用报文的优先级高于非主动拥塞控制协议数据报文。需要说明的是,此处也可以不是混合信用报文,而是主动拥塞控制协议信用报文,在这种情况下,可以设定主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文。Optionally, the priority of the hybrid credit message can be set higher than that of the non-active congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the priority of the active congestion control protocol credit message can be set higher than that of the non-active congestion control Protocol data message.
采用PQ调度方式,可以将延迟敏感的关键业务放入高优先级队列,将非关键业务放入低优先级队列,从而确保关键业务被优先转发。因此,在上述PQ调度过程中,优先将混合信用报文中的主动拥塞控制协议信用报文转发出去,以保证对下一时刻主动拥塞控制协议数据报文的带宽预约。Using the PQ scheduling method, delay-sensitive key services can be placed in a high-priority queue, and non-critical services can be placed in a low-priority queue, thereby ensuring that key services are forwarded preferentially. Therefore, in the above-mentioned PQ scheduling process, the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
在上述PQ调度过程中,对混合信用报文的调度,相当于告知了发送设备在下一时刻转发设备能够接收的主动拥塞控制协议数据报文的数量,使得发送设备准确获知主动拥塞控制协议所预约到的带宽,以及判断下一时刻可以为后续时刻预约的带宽;此外,相当于为非主动拥塞控制协议数据报文预留了在下一时刻的可用带宽,使得非主动拥塞控制协议数据报文可以与主动拥塞控制协议数据报文共享带宽。In the above-mentioned PQ scheduling process, the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
当只接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文时,执行上述生成虚拟信用报文等步骤,在PQ调度过程中,优先调度混合信用报文,当混合信用报文所在的次高优先级队列没有数据包的时候,再调度非主动拥塞控制协议数据报文。此时,不存在主动拥塞控制协议数据报文。When only non-active congestion control protocol data messages and active congestion control protocol credit messages are received, the above steps of generating virtual credit messages are performed. In the PQ scheduling process, the mixed credit messages are prioritized. When the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
结合第一方面,在第一方面的某些实现方式中,假设在另一种情况下,接收到的多个报文中还包括主动拥塞控制协议数据报文,则同样可以设置三种报文的转发顺序,并根据转发顺序转发各报文,也同样可以根据优先级设置转发顺序,以及还可以利用PQ调度策略进行调度。In combination with the first aspect, in some implementations of the first aspect, assuming that in another case, the received multiple messages also include active congestion control protocol data messages, then three kinds of messages can also be set According to the forwarding sequence, and forward each message according to the forwarding sequence, the forwarding sequence can also be set according to the priority, and the PQ scheduling strategy can also be used for scheduling.
需要说明的是,由于主动拥塞控制机制是预约制,也就是说在这种情况下,接收的主动拥塞控制协议数据报文是基于前一时刻通过主动拥塞控制协议信用报文预约到的带宽触发转发的,因此接收的主动拥塞控制协议数据报文需要占用的带宽不会超过其预约到的带宽,从而不会超过数据报文可用带宽。It should be noted that since the active congestion control mechanism is a reservation system, that is to say, in this case, the received active congestion control protocol data message is triggered based on the bandwidth reserved through the active congestion control protocol credit message at the previous moment It is forwarded, so the received active congestion control protocol data message needs to occupy the bandwidth not to exceed the bandwidth reserved for it, and thus does not exceed the available bandwidth of the data message.
假设某一时刻接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文和Q个主动拥塞控制协议数据报文,并利用上文所述方法确定出了要转发的K个主动拥塞控制协议信用报文,则该K个主动拥塞控制协议信用报文是不会超过信用报文可用带宽的,因此,这种情况下该Q个主动拥塞控制协议数据报文和该K个主动拥塞控制协议信用报文的总和所占用的带宽不会超过网络总带宽。因此,可以利用剩余的带宽尽最大可能地转发该M个非主动拥塞控制协议数据报文。Assume that the multiple messages received at a certain moment include N active congestion control protocol credit messages, M inactive congestion control protocol data messages and Q active congestion control protocol data messages, and use the above The method determines the K active congestion control protocol credit messages to be forwarded, and the K active congestion control protocol credit messages will not exceed the available bandwidth of the credit message. Therefore, in this case, the Q active congestion control protocol credit messages will not exceed the available bandwidth of the credit message. The bandwidth occupied by the sum of the control protocol data message and the K active congestion control protocol credit messages will not exceed the total network bandwidth. Therefore, the remaining bandwidth can be used to forward the M inactive congestion control protocol data messages as much as possible.
可选地,在根据优先级转发报文的时候,可以根据主动拥塞控制协议数据报文的优先级最高、主动拥塞控制协议信用报文的优先级次之、非主动拥塞控制协议数据报文的优先级最低的顺序,向目的设备转发该Q个主动拥塞控制协议数据报文、该K个主动拥塞控制协议信用报文,以及该M个非主动拥塞控制协议数据报文的部分或全部,其中,Q为大于或等于1的整数。Optionally, when forwarding messages according to priority, the priority of the active congestion control protocol data message can be the highest, the priority of the active congestion control protocol credit message is second, and the priority of the non-active congestion control protocol data message In the lowest priority order, forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages to the destination device, where , Q is an integer greater than or equal to 1.
在这种情况下,能够优先将主动拥塞控制协议数据报文转发出去,保证了主动拥塞控制协议的低时延效果,而在这个前提下,又能够兼顾用于预约下一时刻带宽的主动拥塞控 制协议信用报文的转发和非主动拥塞控制协议数据报文的转发,提高带宽的利用率。In this case, the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion used to reserve the bandwidth at the next moment. Control the forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages to improve bandwidth utilization.
还应理解,当不存在主动拥塞控制协议信用报文(例如上述N个主动拥塞控制协议信用报文)时,则在第二级QoS调度过程中,可以只对高优先级队列的主动拥塞控制协议数据报文(例如上述Q个主动拥塞控制协议数据报文)和低优先级队列的非主动拥塞控制协议数据报文(例如上述M个非主动拥塞控制协议数据报文)进行调度。It should also be understood that when there are no active congestion control protocol credit messages (such as the above N active congestion control protocol credit messages), then in the second-level QoS scheduling process, only active congestion control for high-priority queues can be performed Protocol data messages (for example, the above-mentioned Q active congestion control protocol data messages) and inactive congestion control protocol data messages in the low priority queue (for example, the above-mentioned M inactive congestion control protocol data messages) are scheduled.
在上述调度过程中,对接收到的各类报文进行调度,在保证主动拥塞控制协议数据报文优先传输的前提下,非主动拥塞协议数据报文也能利用竞争得到的带宽进行数据传输,既满足了主动拥塞控制的低时延需求,又使得非主动拥塞控制协议数据报文可以跟主动拥塞控制协议数据报文进行竞争和共享带宽。此外,第二级QoS调度还可以实现,当所接收的非主动拥塞协议数据报文超过了前一时刻预留的带宽时,能够通过这次调度进行丢弃,保证网络链路的传输性能。In the above scheduling process, various received messages are scheduled. Under the premise of ensuring the priority transmission of active congestion control protocol data messages, non-active congestion protocol data messages can also use the bandwidth obtained by competition for data transmission. This not only satisfies the low latency requirement of active congestion control, but also enables non-active congestion control protocol data messages to compete with and share bandwidth with active congestion control protocol data messages. In addition, the second-level QoS scheduling can also be implemented. When the received inactive congestion protocol data message exceeds the bandwidth reserved at the previous moment, it can be discarded through this scheduling to ensure the transmission performance of the network link.
需要说明的是,在调度报文的调度过程中还存在其他情况。It should be noted that there are other situations in the scheduling process of the scheduling message.
例如,当只接收到了非主动拥塞控制协议数据报文时,依然可以通过上文所述方法,例如通过两级QoS调度,为非主动拥塞控制协议预留下一时刻的带宽,以及将非主动拥塞控制协议数据报文转发出去。在这种情况下,在WFQ调度中,因为没有接收到预约带宽的主动拥塞控制协议信用报文,则主动拥塞控制协议信用报文的剩余带宽都可以转而分配给虚拟信用报文,则在下一时刻,为非主动拥塞控制协议数据报文预留的带宽增加了。而在PQ调度中,相当于只有混合信用报文所在的次高优先级队列和非主动拥塞控制协议数据报文所在的低优先级队列中有数据包,而且混合信用报文中只有虚拟信用报文,所以先调度次高优先级对列中的混合信用报文,再调度非主动拥塞控制协议数据报文。For example, when only non-active congestion control protocol data messages are received, the methods described above can still be used, such as through two-level QoS scheduling, to reserve the next moment bandwidth for the non-active congestion control protocol, and to set the non-active congestion control protocol. The congestion control protocol data message is forwarded. In this case, in WFQ scheduling, because the active congestion control protocol credit message of the reserved bandwidth is not received, the remaining bandwidth of the active congestion control protocol credit message can be transferred to the virtual credit message, then the following For a moment, the bandwidth reserved for inactive congestion control protocol data messages increases. In PQ scheduling, it is equivalent to only the second highest priority queue where the mixed credit message is located and the low priority queue where the non-active congestion control protocol data message is located. There are data packets, and there are only virtual credit messages in the mixed credit message. Therefore, the mixed credit message in the second-highest priority queue is scheduled first, and then the non-active congestion control protocol data message is scheduled.
再例如,当只接收到了主动拥塞控制协议信用报文时,同样可以通过上文所述方法,例如通过两级QoS调度,为主动拥塞控制协议分配下一时刻的带宽。在这种情况下,在WFQ调度中,因为没有接收到非主动拥塞控制协议数据报文,可以认为暂时不需要进行非主动拥塞控制,则虚拟信用报文的剩余带宽都可以转而分配给主动拥塞控制协议信用报文,则在下一时刻,主动拥塞控制协议数据报文可以使用更大占比的带宽。而在PQ调度中,相当于只有混合信用报文所在的次高优先级队列中有数据包,且该混合信用报文中只有主动拥塞控制协议信用报文,所以只需要调度次高优先级队列中的混合信用报文。For another example, when only the active congestion control protocol credit message is received, the method described above can also be used, such as two-level QoS scheduling, to allocate the bandwidth of the next moment for the active congestion control protocol. In this case, in WFQ scheduling, because no non-active congestion control protocol data message is received, it can be considered that non-active congestion control is temporarily unnecessary, and the remaining bandwidth of the virtual credit message can be allocated to the active Congestion control protocol credit messages, then at the next moment, active congestion control protocol data messages can use a larger proportion of bandwidth. In PQ scheduling, it is equivalent to that there are only data packets in the second highest priority queue where the hybrid credit message is located, and there are only active congestion control protocol credit messages in the hybrid credit message, so only the second highest priority queue needs to be scheduled The hybrid credit message in.
又例如,当只接收到了主动拥塞控制协议数据报文时,同样可以通过上文所述方法,例如通过两级QoS调度,将主动拥塞控制协议数据报文转发出去。在这种情况下,在WFQ调度中,因为没有接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文,因此不需要生成虚拟信用报文,所以可以不进行WFQ调度。而在PQ调度中,相当于只有主动拥塞控制协议数据报文所在的高优先级队列中有数据包,所以只需要调度主动拥塞控制协议数据报文。这种情况可以出现在,前一时刻(发送用于预约带宽的主动拥塞控制协议信用报文时)和当前时刻网络中均不存在非主动拥塞控制协议流量。或者,可以出现在不存在非主动拥塞控制协议流量的网络中。For another example, when only the active congestion control protocol data message is received, the method described above can also be used to forward the active congestion control protocol data message, for example, through two-level QoS scheduling. In this case, in the WFQ scheduling, because the non-active congestion control protocol data message and the active congestion control protocol credit message are not received, there is no need to generate a virtual credit message, so WFQ scheduling may not be performed. In PQ scheduling, it is equivalent to that only the active congestion control protocol data message is in the high-priority queue with data packets, so only the active congestion control protocol data message needs to be scheduled. This situation may occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when the active congestion control protocol credit message for bandwidth reservation is sent) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
结合第一方面,在第一方面的某些实现方式中,还可以在适当的时候丢弃部分或全部虚拟信用报文,以释放其所占的存储空间等资源。例如,可以在确定要转发的主动拥塞控制协议信用报文之后丢弃所有虚拟信用报文,也可以在执行上述根据转发顺序转发各报文的前后或期间丢弃所有虚拟信用报文,还可以在执行完所有步骤后丢弃所有虚拟信用报 文,还可以在执行完所有步骤之后以及接收下一轮到来的报文之前丢弃所有虚拟信用报文。In combination with the first aspect, in some implementations of the first aspect, part or all of the virtual credit messages may also be discarded at an appropriate time to release resources such as storage space occupied by them. For example, after determining the active congestion control protocol credit messages to be forwarded, all virtual credit messages can be discarded, or all virtual credit messages can be discarded before and after forwarding each message according to the forwarding order. All virtual credit messages are discarded after all the steps are completed, and all virtual credit messages can also be discarded after all the steps are executed and before the next round of incoming messages are received.
第二方面,本申请提供一种调度报文的装置,该装置包括通信单元和处理单元,其中,通信单元用于接收来自于发送设备的多个报文,该多个报文包括主动拥塞控制协议信用报文和非主动拥塞控制协议数据报文;处理单元用于确定与该非主动拥塞控制协议数据报文对应的虚拟信用报文,并根据信用报文可用带宽、接收的该主动拥塞控制协议信用报文与接收的该虚拟信用报文,从该主动拥塞控制协议信用报文中确定部分或全部主动拥塞控制协议信用报文;处理单元还用于将确定的该部分或全部主动拥塞控制协议信用报文以及接收的该非主动拥塞控制协议数据报文的部分或全部转发给目的设备。In a second aspect, the present application provides an apparatus for scheduling messages. The apparatus includes a communication unit and a processing unit. The communication unit is configured to receive multiple messages from a sending device, and the multiple messages include active congestion control. Protocol credit messages and non-active congestion control protocol data messages; the processing unit is used to determine the virtual credit message corresponding to the non-active congestion control protocol data message, and according to the available bandwidth of the credit message, the received active congestion control The protocol credit message and the received virtual credit message are used to determine part or all of the active congestion control protocol credit message from the active congestion control protocol credit message; the processing unit is also used to control the determined part or all of the active congestion control The protocol credit message and part or all of the received inactive congestion control protocol data message are forwarded to the destination device.
在本申请技术方案中,通过引入虚拟信用报文,使得在利用主动拥塞控制协议信用报文预约带宽时,能够兼顾到非主动拥塞控制协议数据报文的影响,从而使得主动拥塞控制协议流量在存在非主动拥塞控制协议流量的情况下,依然能够得到有效控制。也就是说,通过引入虚拟信用报文,并根据信用报文可用带宽、接收的主动拥塞控制协议信用报文以及生成的虚拟信用报文确定转发给目的设备的主动拥塞控制协议信用报文,能够使得在根据接收的主动拥塞控制协议信用报文确定主动拥塞控制协议数据报文的带宽时,会根据网络链路中存在的非主动拥塞控制协议数据报文的数量进行适当调整,从而保证了主动拥塞控制机制的有效性。In the technical solution of this application, by introducing virtual credit messages, when using active congestion control protocol credit messages to reserve bandwidth, the influence of non-active congestion control protocol data messages can be taken into account, so that the active congestion control protocol traffic is In the presence of inactive congestion control protocol traffic, it can still be effectively controlled. In other words, by introducing a virtual credit message, and determining the active congestion control protocol credit message forwarded to the destination device based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message, it is possible to When determining the bandwidth of the active congestion control protocol data message according to the received active congestion control protocol credit message, it will make appropriate adjustments according to the number of inactive congestion control protocol data messages existing in the network link, thereby ensuring the initiative Effectiveness of congestion control mechanisms.
需要说明的是,该多个报文可以包括以下至少一种:主动拥塞控制协议数据报文、主动拥塞控制协议信用报文、非主动拥塞控制协议数据报文,且每种报文的数量可能相同也可能不同。It should be noted that the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
结合第二方面,在第二方面的某些实现方式中,虚拟信用报文的各信息可以利用处理单元,采用与第一方面相同的方法获得。With reference to the second aspect, in some implementation manners of the second aspect, each information of the virtual credit message can be obtained by using the processing unit and using the same method as the first aspect.
可选地,虚拟信用报文的报文格式可以采用与主动拥塞控制协议信用报文相同的格式,只是在其特定字段填入不同的信息,例如在类型字段填入不同的信息,用于区分报文类型。Optionally, the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
以SCP协议为例,虚拟信用报文的IP头信息拷贝对应的非主动拥塞控制协议数据报文的IP头信息,其中,虚拟信用报文的IP头中的协议字段不进行拷贝。该协议字段填写UDP的协议号。虚拟信用报文的UDP头的源端口号填写SCP的协议端口号,UDP头的目的端口号拷贝对应的非主动拥塞控制协议数据报文的目的端口号。在SCP协议的类型字段填写的数值,既不同于主动拥塞控制协议信用报文的类型字段的数值,也不同于主动拥塞控制协议数据报文的类型字段的数值,以代表虚拟信用报文。虚拟信用报文也可以采用与主动拥塞控制协议信用报文大小相同的小包,例如64字节。Taking the SCP protocol as an example, the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied. Fill in the UDP protocol number in the protocol field. The source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header. The value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message. The virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
应理解,虚拟信用报文也可以不对IP头、UDP头、SCP头等中的信息进行限定,只要使得虚拟信用报文能够与主动拥塞控制协议信用报文能够区分开就可以。It should be understood that the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
在上述处理单元确定要转发的主动拥塞控制协议信用报文的过程中,处理单元可能会丢弃不满足要求的主动拥塞控制协议信用报文,也可能会丢弃部分或全部虚拟信用报文。In the process of the foregoing processing unit determining the active congestion control protocol credit message to be forwarded, the processing unit may discard the active congestion control protocol credit message that does not meet the requirements, or may discard some or all of the virtual credit messages.
如果利用QoS调度的方法执行上述过程,处理单元还可以在完成第一级QoS调度后,丢弃所有虚拟信用报文,也可以在完成两级QoS调度后,丢弃所有虚拟信用报文,以及还可以在下一轮调度之前,丢弃所有虚拟信用报文。If the QoS scheduling method is used to perform the above process, the processing unit can also discard all virtual credit messages after completing the first level of QoS scheduling, or can discard all virtual credit messages after completing the two levels of QoS scheduling, and also Before the next round of scheduling, discard all virtual credit messages.
应理解,虚拟信用报文只在生成该虚拟信用报文的转发设备内有效,不会发送到该转发设备以外的网络中。It should be understood that the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
结合第二方面,在第二方面的某些实现方式中,在上述处理单元根据信用报文可用带宽、接收的主动拥塞控制协议信用报文与生成的虚拟信用报文,确定要转发的主动拥塞控制协议信用报文的过程中,处理单元可以基于一定预设规则或策略对两种信用报文进行取舍。With reference to the second aspect, in some implementations of the second aspect, the processing unit determines the active congestion to be forwarded based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message In the process of controlling the protocol credit messages, the processing unit may choose between the two types of credit messages based on certain preset rules or strategies.
假设在一种情况下,通信单元接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,处理单元确定了与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,则处理单元可以根据信用报文可用带宽、该N个主动拥塞控制协议信用报文和该P个虚拟信用报文,从该N个主动拥塞控制协议信用报文中确定出K个主动拥塞控制协议信用报文,其中,K为小于或等于N的正整数。Suppose that in a situation, the multiple messages received by the communication unit include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and the processing unit determines the M inactive congestion. Control the P virtual credit messages corresponding to the protocol data message, then the processing unit can, according to the available bandwidth of the credit message, the N active congestion control protocol credit messages, and the P virtual credit messages, from the N active congestion In the control protocol credit message, K active congestion control protocol credit messages are determined, where K is a positive integer less than or equal to N.
可选地,处理单元可以用于执行第一方面所提供的相关方法,对两种信用报文进行取舍。为了简洁,部分相关内容不再重复介绍。Optionally, the processing unit may be used to execute the related method provided in the first aspect to select between the two types of credit messages. For the sake of brevity, some related content will not be repeated.
结合第二方面,在第二方面的某些实现方式中,上述信用报文可用带宽可以由处理单元根据网络总带宽、主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的对应关系,以及虚拟信用报文与非主动拥塞控制协议数据报文的对应关系确定。With reference to the second aspect, in some implementations of the second aspect, the available bandwidth of the credit message may be processed by the processing unit according to the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, And the corresponding relationship between the virtual credit message and the inactive congestion control protocol data message is determined.
结合第二方面,在第二方面的某些实现方式中,在利用处理单元确定要转发的主动拥塞控制协议信用报文时,可以通过一级服务质量(quality of service,QoS)调度,并根据调度结果进行确定。In combination with the second aspect, in some implementations of the second aspect, when the processing unit is used to determine the active congestion control protocol credit message to be forwarded, it can be scheduled through the first-level quality of service (QoS), and according to The scheduling result is determined.
例如,在上述处理单元根据信用报文可用带宽和主动拥塞控制协议信用报文的权重以及虚拟信用报文的权重,从该N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文的过程中,可以通过一级QoS调度实现。For example, the above processing unit determines K active congestion control protocol credits from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the weight of the active congestion control protocol credit message, and the weight of the virtual credit message. During the message process, it can be realized through the first-level QoS scheduling.
可选地,处理单元可以采用加权公平队列(weighted fair queue,WFQ)调度策略进行该一级QoS调度。Optionally, the processing unit may use a weighted fair queue (WFQ) scheduling strategy to perform the first-level QoS scheduling.
在利用WFQ调度策略对主动拥塞控制信用协议报文(例如上述N个主动拥塞控制协议信用报文)与虚拟信用报文(例如上述P个虚拟信用报文)进行一级QoS调度时,处理单元可以根据权重,对主动拥塞控制协议信用报文和虚拟信用报文进行带宽分配,并实现了上述两种信用报文的公平竞争。When using the WFQ scheduling strategy to perform first-level QoS scheduling on active congestion control credit protocol messages (for example, the above N active congestion control protocol credit messages) and virtual credit messages (for example, the above P virtual credit messages), the processing unit The active congestion control protocol credit message and the virtual credit message can be allocated bandwidth according to the weight, and the fair competition of the above two kinds of credit messages is realized.
结合第二方面,在第二方面的某些实现方式中,在利用处理单元确定了要转发的主动拥塞控制协议信用报文之后,处理单元还可以用于设置不同报文的转发顺讯,此外,通信单元根据该转发顺序转发不同报文。In combination with the second aspect, in some implementations of the second aspect, after the processing unit determines the active congestion control protocol credit message to be forwarded, the processing unit can also be used to set the forwarding sequence of different messages. In addition, , The communication unit forwards different messages according to the forwarding sequence.
可选地,处理单元可以设置先转发主动拥塞控制协议信用报文再转发非主动拥塞控制协议数据报文。假设在一种情况下,通信单元接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,并且处理单元确定出要转发的K个主动拥塞控制协议信用报文。则通信单元可以先转发该K个主动拥塞控制协议信用报文,再利用剩余带宽转发该M个非主动拥塞控制协议数据报文的部分或全部。也就是说,通信单元先转发该K个主动拥塞控制协议信用报文,再根据剩余带宽尽可能多地转发该M个非主动拥塞控制协议数据报文中的部分或全部。Optionally, the processing unit may be configured to forward the active congestion control protocol credit message first and then forward the non-active congestion control protocol data message. Suppose that in a situation, the multiple messages received by the communication unit include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and the processing unit determines K active congestion control protocol data messages to be forwarded. Congestion control protocol credit messages. Then the communication unit may first forward the K active congestion control protocol credit messages, and then use the remaining bandwidth to forward part or all of the M non-active congestion control protocol data messages. That is, the communication unit first forwards the K active congestion control protocol credit messages, and then forwards part or all of the M inactive congestion control protocol data messages as much as possible according to the remaining bandwidth.
需要说明的是,由于该K个主动拥塞控制协议信用报文是处理单元根据信用报文可用 带宽进行分配的,所以不存在该K个主动拥塞控制协议信用报文抢占数据报文可用带宽的情况,因此在上述情况下,通信单元可以利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文。It should be noted that since the K active congestion control protocol credit messages are allocated by the processing unit according to the available bandwidth of the credit message, there is no situation in which the K active congestion control protocol credit messages preempt the available bandwidth of the data message. Therefore, in the above situation, the communication unit can use the available bandwidth of all data messages to forward the M inactive congestion control protocol data messages as much as possible.
还应理解,也可能出现转发该M个非主动拥塞控制协议数据报文需要的带宽超过了数据报文可用带宽的情况,这时候通信单元可以丢弃部分非主动拥塞控制协议数据报文,但也可能处理单元根据需要,将原信用报文可用带宽中虚拟信用报文所占用的带宽转为分配给该M个非主动拥塞控制协议数据报文。It should also be understood that it may also happen that the bandwidth required to forward the M inactive congestion control protocol data messages exceeds the available bandwidth of the data message. At this time, the communication unit can discard some inactive congestion control protocol data messages, but also The processing unit may convert the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message to be allocated to the M inactive congestion control protocol data messages as needed.
又例如,处理单元还可以设置先转发非主动拥塞控制协议数据报文再转发主动拥塞控制协议信用报文。在这种情况下,通信单元可以先利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文,再转发该K个主动拥塞控制协议信用报文。进一步,通信单元还可以再利用原虚拟信用报文占用的带宽转发非主动拥塞控制协议数据报文。For another example, the processing unit may also be configured to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message. In this case, the communication unit may first use the available bandwidth of all data messages to forward the M inactive congestion control protocol data messages as much as possible, and then forward the K active congestion control protocol credit messages. Further, the communication unit can also reuse the bandwidth occupied by the original virtual credit message to forward the non-active congestion control protocol data message.
又例如,处理单元还可以设置交替转发该K个主动拥塞控制协议信用报文和该M个非主动拥塞控制协议数据报文,通信单元根据该设置交替转发该K个主动拥塞控制协议信用报文和该M个非主动拥塞控制协议数据报文。For another example, the processing unit may also set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages, and the communication unit alternately forwards the K active congestion control protocol credit messages according to the setting And the M inactive congestion control protocol data messages.
结合第二方面,在第二方面的某些实现方式中,在上述处理单元确定转发顺序的过程中,处理单元还可以通过设置优先级,根据优先级确定上述转发顺序。With reference to the second aspect, in some implementation manners of the second aspect, in the process of determining the forwarding order by the processing unit, the processing unit may also determine the forwarding order according to the priority by setting a priority.
可选地,处理单元可以设置主动拥塞主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文的优先级。设定先转发优先级高的报文,则通信单元优先转发主动拥塞控制协议信用报文,再根据剩余的带宽转发非主动拥塞控制协议数据报文的部分或全部。Optionally, the processing unit may set the priority of the active congestion control protocol credit message to be higher than the priority of the non-active congestion control protocol data message. If it is set to forward the high priority message first, the communication unit will forward the active congestion control protocol credit message first, and then forward part or all of the non-active congestion control protocol data message according to the remaining bandwidth.
可选地,处理单元可以采用优先级队列(priority queuing,PQ)调度策略实现上述根据转发顺序转发各报文的过程。Optionally, the processing unit may adopt a priority queuing (PQ) scheduling strategy to implement the foregoing process of forwarding each message according to the forwarding sequence.
可选地,处理单元可以设定混合信用报文的优先级高于非主动拥塞控制协议数据报文。需要说明的是,此处也可以不是混合信用报文,而是主动拥塞控制协议信用报文,在这种情况下,处理单元可以设定主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文。Optionally, the processing unit may set the priority of the hybrid credit message to be higher than that of the non-active congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the processing unit can set the priority of the active congestion control protocol credit message to be higher than that of the inactive congestion control protocol credit message. Congestion control protocol data message.
在上述PQ调度过程中,对混合信用报文的调度,相当于告知了发送设备在下一时刻转发设备能够接收的主动拥塞控制协议数据报文的数量,使得发送设备准确获知主动拥塞控制协议所预约到的带宽,以及判断下一时刻可以为后续时刻预约的带宽;此外,相当于为非主动拥塞控制协议数据报文预留了在下一时刻的可用带宽,使得非主动拥塞控制协议数据报文可以与主动拥塞控制协议数据报文共享带宽。In the above-mentioned PQ scheduling process, the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
当只接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文时,执行上述生成虚拟信用报文等步骤,在PQ调度过程中,优先调度混合信用报文,当混合信用报文所在的次高优先级队列没有数据包的时候,再调度非主动拥塞控制协议数据报文。此时,不存在主动拥塞控制协议数据报文。When only non-active congestion control protocol data messages and active congestion control protocol credit messages are received, the above steps of generating virtual credit messages are performed. In the PQ scheduling process, the mixed credit messages are prioritized. When the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
结合第二方面,在第二方面的某些实现方式中,假设在另一种情况下,通信单元接收到的多个报文中还包括主动拥塞控制协议数据报文,则处理单元同样可以设置三种报文的转发顺序,通信单元可以根据转发顺序转发各报文,处理单元也同样可以根据优先级设置 转发顺序,以及处理单元还可以利用PQ调度策略进行调度。With reference to the second aspect, in some implementations of the second aspect, assuming that in another case, the multiple messages received by the communication unit also include an active congestion control protocol data message, the processing unit can also set For the three message forwarding sequences, the communication unit can forward each message according to the forwarding sequence, the processing unit can also set the forwarding sequence according to the priority, and the processing unit can also use the PQ scheduling strategy for scheduling.
需要说明的是,由于主动拥塞控制机制是预约制,也就是说在这种情况下,通信单元接收的主动拥塞控制协议数据报文是基于前一时刻通过主动拥塞控制协议信用报文预约到的带宽触发转发的,因此通信单元接收的主动拥塞控制协议数据报文需要占用的带宽不会超过其预约到的带宽,从而不会超过数据报文可用带宽。It should be noted that because the active congestion control mechanism is a reservation system, that is to say, in this case, the active congestion control protocol data message received by the communication unit is based on the previous time reservation through the active congestion control protocol credit message Bandwidth triggers the forwarding, so the bandwidth occupied by the active congestion control protocol data message received by the communication unit will not exceed the bandwidth reserved for it, and thus will not exceed the available bandwidth of the data message.
假设某一时刻通信单元接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文和Q个主动拥塞控制协议数据报文,处理单元利用上文所述方法确定出了要转发的K个主动拥塞控制协议信用报文,则该K个主动拥塞控制协议信用报文是不会超过信用报文可用带宽的,因此,这种情况下该Q个主动拥塞控制协议数据报文和该K个主动拥塞控制协议信用报文的总和所占用的带宽不会超过网络总带宽。因此,通信单元可以利用剩余的带宽尽最大可能地转发该M个非主动拥塞控制协议数据报文。Assuming that the multiple messages received by the communication unit at a certain moment include N active congestion control protocol credit messages, M inactive congestion control protocol data messages and Q active congestion control protocol data messages, the processing unit uses the The method described in the article determines the K active congestion control protocol credit messages to be forwarded, and the K active congestion control protocol credit messages will not exceed the available bandwidth of the credit message. Therefore, in this case, the Q The bandwidth occupied by the sum of one active congestion control protocol data message and the K active congestion control protocol credit messages does not exceed the total network bandwidth. Therefore, the communication unit can use the remaining bandwidth to forward the M inactive congestion control protocol data messages as much as possible.
可选地,在通信单元根据优先级转发报文的时候,处理单元设置的优先级顺序确定转发顺序,通信单元根据处理单元所确定的转发顺序转发各报文。例如,处理单元设置根据主动拥塞控制协议数据报文的优先级最高、主动拥塞控制协议信用报文的优先级次之、非主动拥塞控制协议数据报文的优先级最低设置转发顺序为优先级从高到低发送,则通信单元可以根据该转发顺序向目的设备转发该Q个主动拥塞控制协议数据报文、该K个主动拥塞控制协议信用报文,以及该M个非主动拥塞控制协议数据报文的部分或全部,其中,Q为大于或等于1的整数。Optionally, when the communication unit forwards the message according to the priority, the priority order set by the processing unit determines the forwarding order, and the communication unit forwards each message according to the forwarding order determined by the processing unit. For example, the processing unit sets the forwarding order according to the highest priority of the active congestion control protocol data message, the second priority of the active congestion control protocol credit message, and the lowest priority of the non-active congestion control protocol data message. High to low transmission, the communication unit can forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and the M non-active congestion control protocol data messages to the destination device according to the forwarding sequence Part or all of the text, where Q is an integer greater than or equal to 1.
在这种情况下,能够优先将主动拥塞控制协议数据报文转发出去,保证了主动拥塞控制协议的低时延效果,而在这个前提下,又能够兼顾用于预约下一时刻带宽的主动拥塞控制协议信用报文的转发和非主动拥塞控制协议数据报文的转发,提高带宽的利用率。In this case, the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion used to reserve the bandwidth at the next moment. Control the forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages to improve bandwidth utilization.
需要说明的是,在调度报文的调度过程中还存在其他情况,例如通信单元只接收到了非主动拥塞控制协议数据报文、通信单元只接收到了主动拥塞控制协议数据报文等情况,相关内容已在第一方面中给出,接收和转发的操作由通信单元执行,其他操作由处理单元执行,在此不再赘述。It should be noted that there are other situations in the scheduling process of scheduling messages. For example, the communication unit has only received inactive congestion control protocol data messages, and the communication unit has only received active congestion control protocol data messages. Related content As given in the first aspect, the operations of receiving and forwarding are performed by the communication unit, and other operations are performed by the processing unit, which will not be repeated here.
结合第二方面,在第二方面的某些实现方式中,处理单元还可以在适当的时候丢弃部分或全部虚拟信用报文,以释放其所占的存储空间等资源。例如,处理单元可以在确定要转发的主动拥塞控制协议信用报文之后丢弃所有虚拟信用报文,也可以在执行上述根据转发顺序转发各报文的前后或期间丢弃所有虚拟信用报文,还可以在执行完所有步骤后丢弃所有虚拟信用报文,还可以在执行完所有步骤之后以及接收下一轮到来的报文之前丢弃所有虚拟信用报文。With reference to the second aspect, in some implementation manners of the second aspect, the processing unit may also discard part or all of the virtual credit messages at an appropriate time to release resources such as storage space occupied by the processing unit. For example, the processing unit may discard all virtual credit messages after determining the active congestion control protocol credit messages to be forwarded, or discard all virtual credit messages before, after or during the execution of forwarding each message according to the forwarding order, or After all the steps are executed, all the virtual credit messages are discarded, and all the virtual credit messages may also be discarded after all the steps are executed and before the next round of incoming messages is received.
第三方面,本申请提供一种转发设备,包括一个或多个处理器、一个或多个存储器以及一个或多个收发器。其中,所述一个或多个存储器用于存储计算机程序,所述一个或多个处理器用于调用并运行存储器中存储的计算机程序,并控制所述一个或多个收发器收发信号,以使得转发设备执行第一方面或其任意可能的实现方式中的方法。In a third aspect, the present application provides a forwarding device, including one or more processors, one or more memories, and one or more transceivers. Wherein, the one or more memories are used to store computer programs, and the one or more processors are used to call and run the computer programs stored in the memory, and control the one or more transceivers to send and receive signals, so as to forward The device executes the method in the first aspect or any possible implementation manner thereof.
第四方面,本申请提供一种计算机可读存储介质,所述计算机可读存储介质中存储有计算机指令,当计算机指令在计算机上运行时,使得计算机执行第一方面或其任意可能的实现方式中的方法。In a fourth aspect, this application provides a computer-readable storage medium in which computer instructions are stored. When the computer instructions are run on a computer, the computer can execute the first aspect or any of its possible implementations. In the method.
第五方面,本申请提供一种计算机程序产品,所述计算机程序产品包括计算机程序代码,当所述计算机程序代码在计算机上运行时,使得计算机执行第一方面或其任意可能的实现方式中的方法。In a fifth aspect, the present application provides a computer program product. The computer program product includes computer program code. When the computer program code runs on a computer, the computer executes the first aspect or any of its possible implementations. method.
第六方面,本申请提供一种调度报文的装置,包括处理器和接口电路,所述接口电路用于接收计算机代码或指令,并传输至所述处理器,所述处理器用于运行所述计算机代码或指令,以执行第一方面或其任意可能的实现方式中的方法。In a sixth aspect, the present application provides an apparatus for scheduling messages, including a processor and an interface circuit, where the interface circuit is used to receive computer codes or instructions and transmit them to the processor, and the processor is used to run the Computer code or instructions to execute the method in the first aspect or any possible implementation manner thereof.
第七方面,本申请提供一种芯片,所述芯片包括一个或多个处理器。所述一个或多个处理器用于执行存储器中存储的计算机程序,以执行第一方面或其任意可能的实现方式中的方法。其中,所述用于存储计算机程序的存储器独立于所述芯片之外而设置。In a seventh aspect, the present application provides a chip including one or more processors. The one or more processors are used to execute a computer program stored in the memory to execute the method in the first aspect or any possible implementation manner thereof. Wherein, the memory used for storing the computer program is provided independently of the chip.
进一步地,所述芯片还可以包括一个或多个通信接口。所述一个或多个通信接口可以是输入/输出接口,输入/输出电路等。进一步地,所述芯片还可以包括一个或多个所述存储器。Further, the chip may also include one or more communication interfaces. The one or more communication interfaces may be input/output interfaces, input/output circuits, and the like. Further, the chip may also include one or more of the memories.
第八方面,本申请提供一种通信系统,该通信系统包括至少一个转发设备、至少一个发送设备和至少一个目的设备。在该通信系统中,该至少一个转发设备能够执行执行第一方面或其任意可能的实现方式中的方法,该至少一个发送设备和该至少一个目的设备可以是任意一种能够发送和/或接收报文的设备。应理解,发送设备和目的设备可以是同一种设备,也可以是不同种类的设备。In an eighth aspect, the present application provides a communication system, which includes at least one forwarding device, at least one sending device, and at least one destination device. In the communication system, the at least one forwarding device can execute the method in the first aspect or any of its possible implementations, and the at least one sending device and the at least one destination device can be any one capable of sending and/or receiving The device of the message. It should be understood that the sending device and the destination device may be the same device or different types of devices.
可选地,该至少一个转发设备还可以是第三方面所述转发设备,也可以是包括第二方面所述调度报文的装置的设备。Optionally, the at least one forwarding device may also be the forwarding device described in the third aspect, or may be a device including the device for scheduling a message described in the second aspect.
附图说明Description of the drawings
图1是本申请实施例适用的网络场景的示意图;Fig. 1 is a schematic diagram of a network scenario to which an embodiment of the present application is applicable;
图2是本申请实施例提供的调度报文的方法的示意性流程图;FIG. 2 is a schematic flowchart of a method for scheduling messages provided by an embodiment of the present application;
图3是本申请实施例提供的T0时刻调度报文的方法的示意图;FIG. 3 is a schematic diagram of a method for scheduling packets at time T0 according to an embodiment of the present application;
图4是本申请实施例提供的T0时刻的一级QoS调度的方法示意图;FIG. 4 is a schematic diagram of a first-level QoS scheduling method at time T0 provided by an embodiment of the present application;
图5是本申请实施例提供的T0时刻的两级QoS调度的方法示意图;FIG. 5 is a schematic diagram of a two-level QoS scheduling method at time T0 provided by an embodiment of the present application;
图6是本申请实施例提供的T1时刻调度报文的方法的示意图;FIG. 6 is a schematic diagram of a method for scheduling packets at time T1 according to an embodiment of the present application;
图7是本申请实施例提供的T1时刻的两级QoS调度的方法示意图;FIG. 7 is a schematic diagram of a two-level QoS scheduling method at time T1 provided by an embodiment of the present application;
图8是本申请实施例提供的调度报文的装置的示意性框图;FIG. 8 is a schematic block diagram of an apparatus for scheduling messages provided by an embodiment of the present application;
图9是本申请实施例提供的转发设备的结构示意图。FIG. 9 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请中的技术方案进行描述。The technical solution in this application will be described below in conjunction with the accompanying drawings.
为了便于本领域技术人员的理解,下面先对本申请中的部分用语进行解释说明。In order to facilitate the understanding of those skilled in the art, some terms in this application will be explained below.
1、传输控制协议(transmission control protocol,TCP)1. Transmission control protocol (transmission control protocol, TCP)
TCP是一种面向连接的、可靠的、基于字节流的传输层通信协议,由因特网工程任务组(internet engineering task force,IETF)的协议请求评议(request for comments,RFC)793定义。在简化的计算机网络开放式系统互联(open system interconnect,OSI)模型中, 它完成第四层传输层所指定的功能;在因特网协议族(internet protocol suite)中,TCP层是位于网络协议(internet protocol,IP)层之上,应用层之下的中间层。应用层向TCP层发送用于网间传输的、用8位字节表示的数据流,然后TCP把数据流分区成适当长度的报文段,该报文段的分区通常受该计算机连接的网络的数据链路层的最大传输单元(maximum transmission unit,MTU)的限制。之后TCP把结果包传给IP层,由它来通过网络将包传送给报文目的设备的TCP层。TCP为了保证不发生丢包,就给每个包一个序号,同时序号也保证了传送到报文目的设备的包的按序接收。然后报文目的设备对已成功收到的包发回一个相应的确认(acknowledgement,ACK);如果发送设备在合理的往返时延(round-trip time,RTT)内未收到确认,那么对应的数据包就被假设为已丢失将会被进行重传。TCP用一个校验和函数来检验数据是否有错误;在发送和接收时都要计算校验和。在拥塞控制中,TCP协议对应于被动拥塞控制协议,是本申请实施例所述非主动拥塞控制协议中的一种数据传输协议。TCP is a connection-oriented, reliable, byte stream-based transport layer communication protocol defined by the Internet Engineering Task Force (IETF) protocol request for comments (RFC) 793. In the simplified open system interconnect (OSI) model of computer networks, it completes the functions specified by the fourth layer of the transport layer; in the Internet protocol suite, the TCP layer is located in the network protocol (internet protocol suite). Above the protocol, IP) layer, the middle layer below the application layer. The application layer sends to the TCP layer a data stream represented by 8-bit bytes for inter-network transmission, and then TCP partitions the data stream into message segments of appropriate length. The segment of the message segment is usually affected by the network connected to the computer The maximum transmission unit (MTU) limit of the data link layer. After that, TCP transmits the result packet to the IP layer, which then transmits the packet to the TCP layer of the destination device of the message through the network. In order to ensure that no packet loss occurs, TCP gives each packet a sequence number, and the sequence number also ensures that the packets sent to the destination device of the message are received in order. Then the destination device of the message sends back an acknowledgement (ACK) to the successfully received packet; if the sending device does not receive the acknowledgement within a reasonable round-trip time (RTT), then the corresponding The data packet is assumed to have been lost and will be retransmitted. TCP uses a checksum function to check the data for errors; checksums are calculated when sending and receiving. In congestion control, the TCP protocol corresponds to the passive congestion control protocol, and is a data transmission protocol in the inactive congestion control protocol described in the embodiment of the present application.
2、用户数据报协议(user datagram protocol,UDP)2. User datagram protocol (UDP)
UDP在网络中与TCP一样用于处理数据包,是一种无连接的协议。在OSI模型中,同样用于完成第四层传输层所指定的功能,处于IP协议的上一层。UDP有不提供数据包分组、组装和不能对数据包进行排序的缺点,也就是说,当报文发送之后,是无法得知其是否安全完整到达的。UDP协议的主要作用是将网络数据流量压缩成数据包的形式。一个典型的数据包就是一个二进制数据的传输单位。每一个数据包的前8个字节用来包含报头信息,剩余字节则用来包含具体的传输数据。UDP报文没有可靠性保证、顺序保证和流量控制字段等,可靠性较差。但是正因为UDP协议的控制选项较少,在数据传输过程中延迟小、数据传输效率高,适合对可靠性要求不高的应用程序,或者可以保障可靠性的应用程序。在拥塞控制中,UDP协议既不是主动拥塞控制协议又不是被动拥塞控制协议,是上述两种拥塞控制协议之外的其他拥塞控制协议,是本申请实施例所述非主动拥塞控制协议中的一种数据传输协议。UDP is used to process data packets in the network like TCP, and is a connectionless protocol. In the OSI model, it is also used to complete the functions specified by the fourth layer of the transport layer, which is the upper layer of the IP protocol. UDP has the disadvantages of not providing data packet grouping, assembly and inability to sort data packets. That is to say, after the message is sent, it is impossible to know whether it has arrived safely and completely. The main function of the UDP protocol is to compress network data traffic into the form of data packets. A typical data packet is a transmission unit of binary data. The first 8 bytes of each data packet are used to contain header information, and the remaining bytes are used to contain specific transmission data. UDP packets do not have reliability guarantees, sequence guarantees, and flow control fields, and their reliability is poor. However, because the UDP protocol has fewer control options, the delay in the data transmission process is small, and the data transmission efficiency is high. It is suitable for applications that do not require high reliability, or applications that can guarantee reliability. In congestion control, the UDP protocol is neither an active congestion control protocol nor a passive congestion control protocol. It is a congestion control protocol other than the above two congestion control protocols, and is one of the non-active congestion control protocols described in the embodiments of this application. A data transfer protocol.
3、替身控制协议(stand-in control protocol,SCP)3. Stand-in control protocol (SCP)
SCP是自定义的一种具备拥塞控制能力的传输协议,与TCP的工作方式和功能相似,是控制发送设备(例如源端主机)如何向目的设备(例如目的端主机)发送数据的传输控制协议。SCP协议是诸多主动拥塞控制机制中的一种协议,在其协议工作机制中,需要区分信用报文和数据报文,信用报文会先于数据报文发送,信用报文的作用是为数据报文预约网络带宽;网络中间的设备(例如本申请实施例中的转发设备)会识别信用报文,并根据该设备自身的链路带宽能力对信用报文进行速率限制,将超过速率限制的信用报文丢弃;信用报文经过该网络中间的设备之后到达目的设备(例如目的端主机),该目的设备会将信用报文返回发送给发送设备,发送设备收到信用报文后会触发对应关系(例如比例关系)的数据报文发送给目的设备。由于发送的数据报文数据量是严格按照转发设备的带宽限制进行控制的,因此不会有超出网络带宽的数据发送到网络中,不会造成网络拥塞,从而避免了网络丢包和网络缓存带来的额外缓存时延,实现了无丢包超低时延的拥塞控制传输协议。在拥塞控制中,SCP协议对应于拥塞控制中的主动拥塞控制协议,是本申请实施例所述主动拥塞控制协议的一个例子。SCP is a self-defined transmission protocol with congestion control capability, similar to the working mode and function of TCP, it is a transmission control protocol that controls how the sending device (such as the source host) sends data to the destination device (such as the destination host) . The SCP protocol is one of many active congestion control mechanisms. In its protocol working mechanism, it is necessary to distinguish between credit messages and data messages. Credit messages are sent before data messages. The role of credit messages is to provide data. The message reserves the network bandwidth; the device in the middle of the network (for example, the forwarding device in the embodiment of this application) will recognize the credit message, and rate the credit message according to the link bandwidth capability of the device itself, which will exceed the rate limit. The credit message is discarded; the credit message reaches the destination device (such as the destination host) after passing through the device in the middle of the network, the destination device will send the credit message back to the sending device, and the sending device will trigger the corresponding after receiving the credit message The data message of the relationship (for example, the proportional relationship) is sent to the destination device. Since the amount of data packets sent is strictly controlled in accordance with the bandwidth limit of the forwarding device, no data exceeding the network bandwidth will be sent to the network, and network congestion will not be caused, thereby avoiding network packet loss and network buffering. The additional buffering delay that comes, realizes the congestion control transmission protocol with no packet loss and ultra-low delay. In congestion control, the SCP protocol corresponds to the active congestion control protocol in congestion control, and is an example of the active congestion control protocol described in the embodiment of the present application.
4、拥塞控制机制4. Congestion control mechanism
拥塞控制机制包括被动拥塞控制机制和主动拥塞控制机制。Congestion control mechanisms include passive congestion control mechanisms and active congestion control mechanisms.
在被动拥塞控制机制中,发送设备通过对网络的探测来获取网络性能的变化信息,从而根据网络的拥塞程度调整报文发送速率,典型的如TCP Reno等。在被动拥塞控制机制中,例如可以采用TCP协议作为被动拥塞控制协议。In the passive congestion control mechanism, the sending device obtains network performance change information by detecting the network, thereby adjusting the message sending rate according to the degree of network congestion, such as TCP Reno. In the passive congestion control mechanism, for example, the TCP protocol can be used as the passive congestion control protocol.
TCP Reno拥塞控制是一种应用非常广泛的被动拥塞控制机制,主要分为慢启动、拥塞避免、快重传和快速恢复四个阶段。在TCP Reno拥塞控制机制中,为了维持动态平衡,必须周期性地产生一定量的丢失,而由于一个数据报文的丢失所带来的窗口缩小要花费很长的时间来恢复,这样,带宽利用率不可能很高,且随着网络的链路带宽不断提升,这种弊端也越来越明显。TCP Reno congestion control is a widely used passive congestion control mechanism, which is mainly divided into four stages: slow start, congestion avoidance, fast retransmission, and fast recovery. In the TCP Reno congestion control mechanism, in order to maintain dynamic balance, a certain amount of loss must be periodically generated, and the window reduction caused by the loss of a data message takes a long time to recover. In this way, bandwidth utilization The rate cannot be very high, and as the link bandwidth of the network continues to increase, this drawback is becoming more and more obvious.
在主动拥塞控制机制中,发送设备通过信用报文向网络预约带宽,网络会返回信号给发送设备,以控制发送设备发送到网络的数据总量以及发送时机等,从而根本上避免网络的缓存时延。例如可以采用SCP协议作为主动拥塞控制协议。In the active congestion control mechanism, the sending device reserves bandwidth to the network through credit messages, and the network returns a signal to the sending device to control the total amount of data sent by the sending device to the network and the timing of sending, so as to fundamentally avoid network caching. Extension. For example, the SCP protocol can be used as the active congestion control protocol.
此外,在拥塞控制过程中还存在既不属于被动拥塞控制协议又不属于主动拥塞控制协议的其他数据传输协议,例如上文所述UDP协议,这些除主动拥塞控制协议以外的拥塞控制协议统称为非主动拥塞控制协议。In addition, in the congestion control process, there are other data transmission protocols that are neither passive congestion control protocols nor active congestion control protocols, such as the UDP protocol mentioned above. These congestion control protocols other than the active congestion control protocol are collectively referred to as Non-active congestion control protocol.
5、拥塞控制的评价指标5. Evaluation indicators for congestion control
(1)吞吐量(throughput),单位时间内成功传送的数据量,可以以比特、字节、分组等为测量单元进行测量。(1) Throughput, the amount of data successfully transmitted per unit time, which can be measured with bits, bytes, packets, etc. as measurement units.
(2)丢包率,数据包在网络传送过程中丢失的比例。当网络链路产生堵塞时,路由器会创建缓冲区来堆积数据包。如果堵塞时间过长,缓冲区的有限容量耗尽,这个时候会抛弃一些数据包。(2) Packet loss rate, the percentage of data packets lost during network transmission. When the network link is congested, the router will create a buffer to accumulate data packets. If the blocking time is too long and the limited capacity of the buffer is exhausted, some data packets will be discarded at this time.
(3)抖动,网络中时延的变化程度。如果网络发生拥塞,排队时延将影响端到端的时延,并导致通过同一连接传输的分组时延各不相同,而抖动,就是用来描述这样一时延变化的程度。(3) Jitter, the degree of delay in the network. If the network is congested, the queuing delay will affect the end-to-end delay, and cause the delay of packets transmitted through the same connection to be different, and jitter is used to describe the degree of such a delay change.
(4)响应时间,即往返时间(run trip time,RTT),从发送设备发出发送数据开始,到发送设备收到来自目的设备的确认信息(目的设备收到数据后便立即发送确认),总共经历的时间。(4) The response time, namely the run trip time (RTT), starts from the sending device sending the sending data to the sending device receiving the confirmation information from the destination device (the destination device immediately sends the confirmation after receiving the data), in total Elapsed time.
(5)时延(latency),也称之为延迟,是指数据(报文、比特等)从网络(或链路)的一端传送到另一端所需要的时间。时延还包括发送时延、传播时延、处理时延和排队时延,这些时延的总和称之为总时延,即,总时延=发送时延+传播时延+处理时延+排队时延。其中,发送时延是指发送设备(主机或路由器)发送完数据帧的时间,传播时延是指电磁波在信道中传播一定距离所需要的时间,处理时延是指目的设备(主机或路由器)在收到分组(数据包)时进行分析、提取数据、差错检验、路由选择等处理需要的时间,排队时延是指分组(数据包)在目的设备缓冲区排队等待处理的时间。(5) Latency, also called delay, refers to the time required for data (messages, bits, etc.) to be transmitted from one end of the network (or link) to the other end. Delay also includes transmission delay, propagation delay, processing delay and queuing delay. The sum of these delays is called total delay, that is, total delay = transmission delay + propagation delay + processing delay + Queuing delay. Among them, the transmission delay refers to the time for the sending device (host or router) to send the data frame, the propagation delay refers to the time required for electromagnetic waves to propagate a certain distance in the channel, and the processing delay refers to the destination device (host or router) The time required for processing such as analysis, data extraction, error checking, routing selection, etc. when a packet (data packet) is received. Queuing delay refers to the time the packet (data packet) is queued in the buffer of the destination device for processing.
(6)公平性(6) Fairness
当网络中出现拥塞时,必然会发生资源的竞争,竞争能力强的流将得到更多的网络资源,而竞争能力差的流则会明显效率低下。网络拥塞会导致不公平性的产生,而网络资源分配的不公平会加重网络拥塞的状况,甚至会造成网络崩溃的发生。因此在对网络拥塞进行控制时,需要考虑到公平性,使得网络资源的分配相对公平。When congestion occurs in the network, resource competition will inevitably occur. Streams with strong competitiveness will get more network resources, while streams with poor competitiveness will be significantly inefficient. Network congestion will cause unfairness, and the unfair distribution of network resources will aggravate network congestion and even cause network collapse. Therefore, when controlling network congestion, fairness needs to be considered to make the distribution of network resources relatively fair.
6、拥塞管理6. Congestion management
拥塞管理是指在网络间歇性出现拥塞,时延敏感业务要求得到比其它业务更高的服务质量(quality of service,QoS)时,通过调整报文的调度次序来满足时延敏感业务高QoS服务的一种流量控制机制。Congestion management means that when network congestion occurs intermittently and delay-sensitive services require higher quality of service (QoS) than other services, the scheduling order of messages is adjusted to meet the high QoS services of delay-sensitive services. A kind of flow control mechanism.
7、服务质量(quality of service,QoS)调度7. Quality of service (QoS) scheduling
在网络中,为保证一定的QoS指标,例如丢包率、时延、抖动等,需要进行拥塞控制、拥塞回避、排队调度等多方面的技术协作,其中调度策略是网络QoS管理中非常重要的一部分,不同调度策略的应用会产生不同的服务质量。常用的QoS调度策略有优先级(priority queuing,PQ)调度、加权轮询(weighted round robin,WRR)调度、公平队列(fair queue,FQ)调度,以及加权公平队列(weighted fair queue,WFQ)调度等,且不同调度策略可以进行组合使用。In the network, in order to ensure certain QoS indicators, such as packet loss rate, delay, jitter, etc., technical cooperation in congestion control, congestion avoidance, queuing scheduling, etc. is required. Among them, scheduling strategy is very important in network QoS management. For one thing, the application of different scheduling strategies will produce different quality of service. Commonly used QoS scheduling strategies include priority (priority queuing, PQ) scheduling, weighted round robin (WRR) scheduling, fair queue (FQ) scheduling, and weighted fair queue (WFQ) scheduling And so on, and different scheduling strategies can be used in combination.
本申请实施例的技术方案可以应用于各种通信系统,例如:长期演进(Long Term Evolution,LTE)系统、LTE频分双工(frequency division duplex,FDD)系统、LTE时分双工(time division duplex,TDD)、通用移动通信系统(universal mobile telecommunication system,UMTS)、全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统、第五代(5th generation,5G)移动通信系统、新无线接入技术(new radio access technology,NR),以及未来的通信系统等。The technical solutions of the embodiments of this application can be applied to various communication systems, for example: Long Term Evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (time division duplex) , TDD), Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) Communication System, Fifth Generation (5G) Mobile Communication System, New Wireless Access Access technology (new radio access technology, NR), and future communication systems.
本申请提供的技术方案还可以应用于机器类通信(machine type communication,MTC)、机器间通信长期演进技术(Long Term Evolution-machine,LTE-M)、设备到设备(device to device,D2D)网络、机器到机器(machine to machine,M2M)网络、物联网(internet of things,IoT)网络、智慧家庭(smart home)网络或者其他网络等。The technical solution provided in this application can also be applied to machine type communication (MTC), inter-machine communication long-term evolution technology (Long Term Evolution-machine, LTE-M), and device to device (device to device, D2D) networks , Machine-to-machine (M2M) network, Internet of things (IoT) network, smart home network or other networks, etc.
本申请实施例中,转发设备可以是任意具有收发功能的设备。该设备例如可以是路由器、交换机、基站等设备。该设备包括但不限于:演进型节点B(evolved Node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、基带单元(baseband unit,BBU),无线保真(wireless fidelity,WiFi)系统中的接入点(access point,AP)、无线中继节点、无线回传节点、传输点(transmission point,TP)或者发送接收点(transmission and reception point,TRP)等,还可以为5G,如,NR,系统中的gNB,或,传输点(TRP或TP),5G系统中的基站的一个或一组(包括多个天线面板)天线面板,或者,还可以为构成gNB或传输点的网络节点,如基带单元(BBU),或,分布式单元(distributed unit,DU),或者下一代通信6G系统中的基站等。In the embodiments of the present application, the forwarding device may be any device that has the function of receiving and sending. The device may be, for example, a router, a switch, a base station, and other devices. This equipment includes but is not limited to: evolved Node B (eNB), radio network controller (RNC), Node B (NB), base station controller (BSC) , Base transceiver station (BTS), home base station (for example, home evolved NodeB, or home Node B, HNB), baseband unit (BBU), wireless fidelity (wireless fidelity, WiFi) system Access point (AP), wireless relay node, wireless backhaul node, transmission point (TP), or transmission and reception point (TRP), etc., can also be 5G, such as NR , The gNB in the system, or the transmission point (TRP or TP), one or a group of antenna panels (including multiple antenna panels) of the base station in the 5G system, or it can also be a network node that constitutes a gNB or transmission point, Such as a baseband unit (BBU), or a distributed unit (DU), or a base station in the next-generation communication 6G system.
本申请实施例中,发送设备和目的设备可以是终端设备、网络设备或者其他可以能够接收和/或发送报文的设备。其中,网络设备例如可以是主机、服务器等设备。终端设备可以是手机(mobile phone)、平板电脑(pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线 终端、蜂窝电话、无绳电话、会话启动协议(session initiation protocol,SIP)电话、无线本地环路(wireless local loop,WLL)站、个人数字助理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备或连接到无线调制解调器的其它处理设备、车载设备、可穿戴设备、5G网络中的终端设备、未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端设备或者非公共网络中的终端设备等。In the embodiments of the present application, the sending device and the destination device may be terminal devices, network devices, or other devices that may be able to receive and/or send packets. Among them, the network device may be, for example, a host, a server, and other devices. Terminal devices can be mobile phones, tablets, computers with wireless transceiver functions, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, industrial control (industrial control) Wireless terminals in ), wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grid, and wireless terminals in transportation safety , Wireless terminals in smart cities, wireless terminals in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loops, WLL) stations, personal digital assistants (personal digital assistants, PDAs), handheld devices with wireless communication functions, computing devices or other processing devices connected to wireless modems, in-vehicle devices, wearable devices, terminal devices in 5G networks, the future Terminal equipment in an evolved public land mobile network (PLMN) or terminal equipment in a non-public network, etc.
其中,可穿戴设备也可以称为穿戴式智能设备,是应用穿戴式技术对日常穿戴进行智能化设计、开发出可以穿戴的设备的总称,如眼镜、手套、手表、服饰及鞋等。可穿戴设备即直接穿在身上,或是整合到用户的衣服或配件的一种便携式设备。可穿戴设备不仅仅是一种硬件设备,更是通过软件支持以及数据交互、云端交互来实现强大的功能。广义穿戴式智能设备包括功能全、尺寸大、可不依赖智能手机实现完整或者部分的功能,例如:智能手表或智能眼镜等,以及只专注于某一类应用功能,需要和其它设备如智能手机配合使用,如各类进行体征监测的智能手环、智能首饰等。Among them, wearable devices can also be called wearable smart devices, which are the general term for using wearable technology to intelligently design daily wear and develop wearable devices, such as glasses, gloves, watches, clothing and shoes. A wearable device is a portable device that is directly worn on the body or integrated into the user's clothes or accessories. Wearable devices are not only a kind of hardware device, but also realize powerful functions through software support, data interaction, and cloud interaction. In a broad sense, wearable smart devices include full-featured, large-sized, complete or partial functions that can be achieved without relying on smart phones, such as smart watches or smart glasses, and only focus on a certain type of application function, and need to cooperate with other devices such as smart phones. Use, such as all kinds of smart bracelets and smart jewelry for physical sign monitoring.
此外,终端设备还可以是物联网(Internet of things,IoT)系统中的终端设备。IoT是未来信息技术发展的重要组成部分,其主要技术特点是将物品通过通信技术与网络连接,从而实现人机互连,物物互连的智能化网络。In addition, the terminal device may also be a terminal device in the Internet of Things (IoT) system. IoT is an important part of the development of information technology in the future. Its main technical feature is to connect objects to the network through communication technology, so as to realize the intelligent network of human-machine interconnection and interconnection of things.
图1是本申请实施例适用的网络场景的示意图。如图1所示,在该网络场景中存在至少一个发送设备110、至少一个转发设备120和至少一个目的设备130。发送设备110和目的设备130可以是上文所述终端设备、网络设备或者能够发送和/或接收报文的设备,转发设备120可以是上文所述交换机、路由器或者基站等设备。在该网络场景中,发送设备110能够经过转发设备120发送报文给目的设备130。Fig. 1 is a schematic diagram of a network scenario to which an embodiment of the present application is applicable. As shown in FIG. 1, there are at least one sending device 110, at least one forwarding device 120, and at least one destination device 130 in this network scenario. The sending device 110 and the destination device 130 may be terminal devices, network devices, or devices capable of sending and/or receiving packets as described above, and the forwarding device 120 may be devices such as switches, routers, or base stations as described above. In this network scenario, the sending device 110 can send a message to the destination device 130 via the forwarding device 120.
应理解,图1只是对本申请实施例的方法和/或装置能够适用的场景的示例,不存在限定,在图1所示的网络场景中,对各设备的数量和各设备之间的连接和/或通信方式同样不存在限定。It should be understood that FIG. 1 is only an example of a scenario to which the method and/or device of the embodiment of the present application can be applied, and there is no limitation. In the network scenario shown in FIG. 1, the number of devices and the connection and connection between the devices are not limited. / Or the communication method is also not limited.
还应理解,在图1所示的网络场景中,设备之间形成的网络可以是有线网络,也可以是无线网络。It should also be understood that, in the network scenario shown in FIG. 1, the network formed between devices may be a wired network or a wireless network.
例如,假设图1对应于一数据中心网络(data center network,DCN)场景,则发送设备110可以对应于发送端服务器,转发设备120可以对应于叶子交换机(leaf switch,LS)或脊柱交换机(spine switch,SS)等交换机设备,目的设备130可以对应于接收端或目标端服务器。也就是说,发送端服务器与目标端服务器进行通信时,发送端服务器发送的数据流或报文可以经由不同的交换机到达目标端服务器。For example, assuming that FIG. 1 corresponds to a data center network (DCN) scenario, the sending device 110 may correspond to the sending end server, and the forwarding device 120 may correspond to a leaf switch (LS) or a spine switch (LS). Switch, SS) and other switch devices, the destination device 130 may correspond to the receiving end or the target end server. In other words, when the sender server communicates with the target server, the data stream or message sent by the sender server can reach the target server via different switches.
又例如,假设图1对应于一智慧家庭网络场景,则发送设备110和目的设备130均可以对应于手机、智能电视、智能音箱、平板电脑等各类终端设备,转发设备120可以是路由器等设备。例如,可以利用智能音箱通过语音控制打开智能电视,则可以将智能音箱作为发送设备110,智能电视作为目的设备130,智能音箱向智能电视发送数据流或报文时,该数据流或报文经由路由器从智能音箱到达智能电视。For another example, assuming that Figure 1 corresponds to a smart home network scenario, both the sending device 110 and the destination device 130 can correspond to various terminal devices such as mobile phones, smart TVs, smart speakers, and tablet computers, and the forwarding device 120 can be devices such as routers. . For example, a smart speaker can be used to turn on a smart TV through voice control, the smart speaker can be used as the sending device 110, and the smart TV can be used as the destination device 130. When the smart speaker sends a data stream or message to the smart TV, the data stream or message passes through The router goes from the smart speaker to the smart TV.
又例如,图1所示的网络场景还可以对应于广域网(wide area network,WAN)等各类网络场景,在此不再一一列举。For another example, the network scenario shown in FIG. 1 may also correspond to various network scenarios such as wide area network (WAN), which will not be listed here.
假设在图1所示网络场景中只存在主动拥塞控制协议流量,则主动拥塞控制机制的具体实现方式可以是,发送设备110通过转发设备120向目的设备130发送主动拥塞控制协 议信用报文预约带宽,转发设备120接收该信用报文,并通过其出端口转发部分或全部信用报文给目的设备130,目的设备130根据接收到的主动拥塞控制协议信用报文向发送设备110进行回传,发送设备110根据接收到的回传的主动拥塞控制协议信用报文触发发送相应的主动拥塞控制协议数据报文。在主动拥塞控制机制中,发送设备110先利用主动拥塞控制协议信用报文预约带宽,再根据预约到的带宽发送相应的数据报文。Assuming that only active congestion control protocol traffic exists in the network scenario shown in Figure 1, the specific implementation of the active congestion control mechanism may be that the sending device 110 sends an active congestion control protocol credit message to the destination device 130 through the forwarding device 120 to reserve bandwidth , The forwarding device 120 receives the credit message, and forwards part or all of the credit message to the destination device 130 through its outgoing port. The destination device 130 transmits back to the sending device 110 according to the received active congestion control protocol credit message, and sends The device 110 triggers the sending of a corresponding active congestion control protocol data message according to the received back-transmitted active congestion control protocol credit message. In the active congestion control mechanism, the sending device 110 first uses the active congestion control protocol credit message to reserve bandwidth, and then sends the corresponding data message according to the reserved bandwidth.
假设在该网络场景中还存在非主动拥塞控制协议流量,例如被动拥塞控制协议流量(例如TCP流量)或者其他拥塞控制协议流量(例如UDP流量),则会导致在利用主动拥塞控制协议信用报文为主动拥塞控制协议数据报文预约带宽时,没有办法判断应该为主动拥塞控制协议数据报文分配多少带宽。本申请实施例所提供的方法可以使得主动拥塞控制机制即使在存在非主动拥塞控制协议流量的情况下,依然能够实现对主动拥塞控制协议流量的控制。Assuming that there is still non-active congestion control protocol traffic in this network scenario, such as passive congestion control protocol traffic (such as TCP traffic) or other congestion control protocol traffic (such as UDP traffic), it will lead to the use of active congestion control protocol credit messages When reserving bandwidth for active congestion control protocol data messages, there is no way to determine how much bandwidth should be allocated for active congestion control protocol data messages. The method provided in the embodiments of the present application can enable the active congestion control mechanism to realize the control of the active congestion control protocol flow even when there is an inactive congestion control protocol flow.
需要说明的是,非主动拥塞控制协议流量是指主动拥塞控制协议流量以外的流量,包括传统的被动拥塞控制协议流量(例如TCP流量),还包括既不是主动拥塞控制协议流量又不是被动拥塞控制协议流量的其他协议流量(例如UDP流量)。还应理解,由于非主动拥塞控制机制是以网络性能损伤为前提的,因此也可以将非主动拥塞控制协议称之为有损传输协议。主动拥塞控制机制不需要以网络性能损伤为前提,因此也可以将主动拥塞控制协议称之为无损传输协议。It should be noted that non-active congestion control protocol traffic refers to traffic other than active congestion control protocol traffic, including traditional passive congestion control protocol traffic (such as TCP traffic), and also includes neither active congestion control protocol traffic nor passive congestion control. Protocol traffic of other protocol traffic (such as UDP traffic). It should also be understood that since the non-active congestion control mechanism is premised on network performance impairment, the non-active congestion control protocol can also be referred to as a lossy transmission protocol. The active congestion control mechanism does not need to be premised on network performance impairment, so the active congestion control protocol can also be called a lossless transmission protocol.
为了便于理解本申请实施例,首先对涉及到的五种报文类型进行介绍。In order to facilitate the understanding of the embodiments of the present application, firstly, the five message types involved are introduced.
首先对数据报文和信用报文进行介绍。First introduce the data message and credit message.
数据报文是指用于用户数据传输的报文。信用报文则是指一种不携带数据的报文,用于代表数据报文预约或者竞争用于用户数据传输的资源,例如带宽。也就是说,信用报文和数据报文之间存在一定的对应关系,可以利用该对应关系,通过对信用报文的调度等操作,实现对数据报文的资源分配。Data message refers to the message used for user data transmission. A credit message refers to a message that does not carry data, and is used to reserve or compete for resources for user data transmission, such as bandwidth, on behalf of the data message. In other words, there is a certain correspondence between the credit message and the data message, and this correspondence can be used to implement resource allocation for the data message through operations such as scheduling the credit message.
可选地,利用信用报文和数据报文之间存在的数量对应关系,数据报文的数量(或者信用报文的需用资源)和数据报文的需用资源(例如需要占用的带宽)之间存在的对应关系,根据信用报文的数量确定数据报文的需用资源。例如,假设信用报文和数据报文数量比例为1:2,每个数据报文需要占用0.1千比特每秒(kbps)的带宽;则假设信用报文的数量为50个,就可以根据上述关系得到该50个信用报文代表的数据报文数量为100(即50*2)个,进而根据上述关系得到该100个数据报文需要占用10kbps(即0.1kbps*100)的带宽。又例如,假设信用报文和数据报文的数量比例为1:2,每个信用报文需要占用的带宽和每个数据报文需要占用的带宽的比例为1:20;则假设在这个例子中,已知信用报文数量为50个,每个信用报文需要占用的带宽为0.001kbps,就可以根据根据上述关系得到该50个信用报文代表的数据报文需要占用2kbps(即0.001kbps*50*2*20)的带宽;假设在这个例子中,已知每个数据报文需要占用的带宽为0.05kbps,信用报文的数量为30个,就可以根据根据上述关系得到该30个信用报文代表的数据报文需要占用3kbps(即30*2*0.05kbps)的带宽。Optionally, use the quantitative correspondence between the credit message and the data message, the number of data messages (or the required resources of the credit message) and the required resources of the data message (for example, the bandwidth that needs to be occupied) The corresponding relationship between the two determines the required resources of the data message according to the number of credit messages. For example, assuming that the ratio of the number of credit messages to data messages is 1:2, and each data message needs to occupy 0.1 kilobits per second (kbps) of bandwidth; assuming that the number of credit messages is 50, it can be based on the above The relationship obtains that the number of data messages represented by the 50 credit messages is 100 (that is, 50*2), and then according to the above relationship, it is obtained that the 100 data messages need to occupy a bandwidth of 10 kbps (that is, 0.1 kbps*100). For another example, suppose the ratio of the number of credit messages to data messages is 1:2, and the ratio of the bandwidth that each credit message needs to occupy to the bandwidth that each data message needs to occupy is 1:20; then assume that in this example Here, the number of known credit messages is 50, and the bandwidth required for each credit message is 0.001 kbps. According to the above relationship, it can be obtained that the data messages represented by the 50 credit messages need to occupy 2 kbps (ie 0.001 kbps). *50*2*20) bandwidth; assuming that in this example, it is known that each data message needs to occupy a bandwidth of 0.05kbps, and the number of credit messages is 30. According to the above relationship, the 30 can be obtained The data message represented by the credit message needs to occupy a bandwidth of 3kbps (that is, 30*2*0.05kbps).
应理解,上述数值指示为了举例说明,也可以采用其他数值,还可以采用其他对应关系等,在此不再赘述。It should be understood that the foregoing numerical indications are for illustrative purposes, and other numerical values can also be used, and other corresponding relationships, etc., can also be used, which will not be repeated here.
本申请实施例中信用报文包括主动拥塞控制协议信用报文以及下文所述虚拟信用报 文,其中,主动拥塞控制协议信用报文可以用于为主动拥塞控制协议数据报文预约带宽,虚拟信用报文可以用于为非主动拥塞控制协议数据报文竞争带宽,二者区别在于,主动拥塞控制协议信用报文是客观存在的,而虚拟信用报文则是临时生成的中间量。下面结合主动拥塞控制协议和非主动拥塞控制协议对五种报文进行统一介绍。The credit message in the embodiment of the application includes the active congestion control protocol credit message and the virtual credit message described below. Among them, the active congestion control protocol credit message can be used to reserve bandwidth for the active congestion control protocol data message, and the virtual credit Messages can be used to compete for bandwidth for non-active congestion control protocol data messages. The difference between the two is that active congestion control protocol credit messages exist objectively, while virtual credit messages are temporarily generated intermediate quantities. The following is a unified introduction to the five types of messages in combination with active congestion control protocol and non-active congestion control protocol.
主动拥塞控制协议是一种基于预约机制的数据传输协议,主动拥塞控制协议中包括主动拥塞控制协议信用报文和主动拥塞控制协议数据报文,其中,主动拥塞控制协议数据报文用于用户数据传输,主动拥塞控制协议信用报文用于为主动拥塞控制协议数据报文预约用户数据传输。例如,假设主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的比例为1:3,主动拥塞控制协议信用报文的数量为A(A为非负整数),每个主动拥塞控制协议信用报文需要占用带宽为Bkbps(B为非负实数),相同数量的主动拥塞控制协议信用报文与主动拥塞控制协议数据报文,而这需要占用的带宽比例为1:10,则可以得到该A个主动拥塞控制协议信用报文所能代表的主动拥塞控制协议数据报文需要占用的带宽为(B*A*3*10)kbps。The active congestion control protocol is a data transmission protocol based on the reservation mechanism. The active congestion control protocol includes the active congestion control protocol credit message and the active congestion control protocol data message. Among them, the active congestion control protocol data message is used for user data Transmission, the active congestion control protocol credit message is used to reserve user data transmission for the active congestion control protocol data message. For example, assuming that the ratio of active congestion control protocol credit messages to active congestion control protocol data messages is 1:3, the number of active congestion control protocol credit messages is A (A is a non-negative integer), and each active congestion control protocol Credit messages need to occupy a bandwidth of Bkbps (B is a non-negative real number), the same number of active congestion control protocol credit messages and active congestion control protocol data messages, and the bandwidth required to occupy a ratio of 1:10, you can get The bandwidth required for the active congestion control protocol data message represented by the A active congestion control protocol credit message is (B*A*3*10) kbps.
非主动拥塞控制协议是一种基于除主动拥塞控制机制(预约机制)之外的其他拥塞控制机制的数据传输协议。非主动拥塞控制协议包括传统的被动拥塞控制协议,以及既不是主动拥塞控制协议又不是被动拥塞控制协议的其他拥塞控制协议。其中,被动拥塞控制协议例如可以是传输控制协议(transmission control protocol,TCP),既不是主动拥塞控制协议又不是被动拥塞控制协议的其他拥塞控制协议例如可以是用户数据报协议(user datagram protocol,UDP)。The non-active congestion control protocol is a data transmission protocol based on other congestion control mechanisms in addition to the active congestion control mechanism (reservation mechanism). Non-active congestion control protocols include traditional passive congestion control protocols and other congestion control protocols that are neither active nor passive congestion control protocols. Among them, the passive congestion control protocol can be, for example, the transmission control protocol (TCP), and other congestion control protocols that are neither active nor passive congestion control protocols can be, for example, the user datagram protocol (UDP). ).
非主动拥塞控制协议数据报文是对非主动拥塞控制协议中可能存在的数据报文的统称,包括被动拥塞控制协议数据报文(例如TCP报文)和既不是主动拥塞控制协议数据报文又不是被动拥塞控制协议数据报文的其他拥塞控制协议数据报文(例如UDP报文)。The non-active congestion control protocol data message is a general term for the data messages that may exist in the non-active congestion control protocol, including passive congestion control protocol data messages (such as TCP messages) and neither active congestion control protocol data messages nor active congestion control protocol data messages. Other congestion control protocol data messages (such as UDP messages) that are not passive congestion control protocol data messages.
本申请实施例中还引入了虚拟信用报文的概念,虚拟信用报文用于代表非主动拥塞控制协议数据报文竞争带宽等资源。应理解,虚拟信用报文与客观存在的例如主动拥塞控制协议信用报文的区别在于,虚拟信用报文是为了使得非主动拥塞控制协议数据报文也能够参与到带宽等资源的竞争或分配中而临时生成的中间量,或者称之为过渡量。In the embodiments of the present application, the concept of virtual credit messages is also introduced. The virtual credit messages are used to represent inactive congestion control protocol data messages competing for bandwidth and other resources. It should be understood that the difference between virtual credit messages and objectively existing credit messages such as active congestion control protocol is that virtual credit messages are used to enable non-active congestion control protocol data messages to participate in the competition or allocation of resources such as bandwidth. The temporarily generated intermediate amount is also called the transitional amount.
为了区分上述四种报文(即主动拥塞控制协议信用报文、主动拥塞控制协议数据报文、非主动拥塞控制协议数据报文和虚拟信用报文)的报文类型,可以通过设置类型字段,并在类型字段设置能够区分的不同数值加以区分。由于非主动拥塞控制协议数据报文是已有的报文形式,因此可以不改变原有报文格式,也就是说不额外设置类型字段。而对于其他三种报文则可以设置类型字段,并且通过设置类型字段的不同值将三种报文进行区分,例如可以设置主动拥塞控制协议信用报文的类型字段值为“1”,设置虚拟信用报文的类型字段值为“2”,设置主动拥塞控制协议数据报文的类型字段值为“3”等。In order to distinguish the message types of the above four types of messages (that is, active congestion control protocol credit messages, active congestion control protocol data messages, non-active congestion control protocol data messages and virtual credit messages), you can set the type field, And set different values that can be distinguished in the type field to distinguish. Since the inactive congestion control protocol data message is an existing message format, the original message format may not be changed, that is, no additional type field is set. For the other three types of messages, the type field can be set, and the three types of messages can be distinguished by setting different values of the type field. For example, you can set the type field value of the active congestion control protocol credit message to "1", and set the virtual The type field value of the credit message is "2", and the type field value of the active congestion control protocol data message is set to "3" and so on.
下面对所涉及的五种报文的含义、用途等分别进行介绍。The meanings and uses of the five types of messages involved are introduced below.
(1)主动拥塞控制协议信用报文(1) Active congestion control protocol credit message
主动拥塞控制协议信用报文是指用来为主动拥塞控制协议数据报文预约带宽,以及用于触发主动拥塞控制协议数据报文的发送的信用报文。根据上文描述可知,主动拥塞控制协议信用报文是不携带数据的报文,可以通过填充成为小包报文,例如可以是64~84字节的小包。The active congestion control protocol credit message refers to a credit message used to reserve bandwidth for the active congestion control protocol data message and to trigger the sending of the active congestion control protocol data message. According to the above description, the active congestion control protocol credit message is a message that does not carry data, and can be filled into a small packet message, for example, a small packet of 64 to 84 bytes.
根据上文描述可知,在主动拥塞控制机制中,在当前时刻发送设备先发送主动拥塞控制协议信用报文,用于预约下一时刻要发送的主动主动拥塞控制协议数据报文的可用带宽,则下一时刻发送设备根据接收到的返回的主动拥塞控制协议信用报文的数量(这些返回的主动拥塞控制协议信用报文对应于当前时刻预约到的可用带宽)触发发送相应数量的主动拥塞控制协议数据报文。例如,假设在当前时刻发送设备发送了50个主动拥塞控制协议信用报文,转发设备根据当前网络情况将50个主动拥塞控制协议信用报文中的40个主动拥塞控制协议信用报文转发给了目标设备,该40个主动拥塞控制协议信用报文对应主动拥塞控制协议数据报文的可用带宽为10kbps,则目标设备将该40个主动拥塞控制协议信用报文经过转发设备返回给发送设备,发送设备接收返回的40个主动拥塞控制协议信用报文,并且在下一时刻发送设备根据接收的该40个返回的主动拥塞控制协议信用报文,发送相应数量的主动拥塞控制协议数据报文,该相应数量的主动拥塞控制协议数据报文需要占用的带宽对应于上述10kbps。According to the above description, in the active congestion control mechanism, the sending device first sends the active congestion control protocol credit message at the current moment to reserve the available bandwidth of the active active congestion control protocol data message to be sent at the next moment, then At the next moment, the sending device triggers the sending of the corresponding number of active congestion control protocols according to the number of received active congestion control protocol credit messages (the returned active congestion control protocol credit messages correspond to the available bandwidth reserved at the current moment). Data message. For example, suppose that at the current moment, the sending device sends 50 active congestion control protocol credit messages, and the forwarding device forwards 40 active congestion control protocol credit messages among the 50 active congestion control protocol credit messages according to the current network conditions. For the target device, the available bandwidth of the 40 active congestion control protocol credit messages corresponding to the active congestion control protocol data message is 10 kbps, then the target device returns the 40 active congestion control protocol credit messages to the sending device through the forwarding device, and sends The device receives the returned 40 active congestion control protocol credit messages, and at the next moment, the sending device sends a corresponding number of active congestion control protocol data messages according to the 40 received active congestion control protocol credit messages. The bandwidth required for the number of active congestion control protocol data messages corresponds to the aforementioned 10 kbps.
在网络中,转发设备可以根据对主动拥塞控制协议信用报文的限速配置进行限速,丢弃超过限速的主动拥塞控制协议信用报文,例如将主动拥塞控制协议信用报文限速为特定端口带宽的10%。还可以根据QoS调度策略进行调度,丢弃不满足策略的主动拥塞控制协议信用报文。In the network, the forwarding device can limit the rate according to the rate limit configuration of the active congestion control protocol credit messages, and discard the active congestion control protocol credit messages that exceed the rate limit, for example, limit the rate of the active congestion control protocol credit messages to a specific rate 10% of the port bandwidth. It can also schedule according to the QoS scheduling strategy, and discard the active congestion control protocol credit messages that do not meet the strategy.
(2)主动拥塞控制协议数据报文(2) Active congestion control protocol data message
主动拥塞控制协议数据报文是用于用户数据传输的数据报文,是由主动拥塞控制协议信用报文触发发送的数据报文。The active congestion control protocol data message is a data message used for user data transmission, and is a data message triggered by the active congestion control protocol credit message to send.
也就是说,主动拥塞控制协议数据报文与主动拥塞控制协议信用报文之间存在对应关系,该对应关系例如可以是比例关系。则可以由主动拥塞控制协议信用报文根据该比例关系触发相应数量的主动拥塞控制协议数据报文。That is to say, there is a corresponding relationship between the active congestion control protocol data message and the active congestion control protocol credit message, and the corresponding relationship may be a proportional relationship, for example. Then, the active congestion control protocol credit message can trigger a corresponding number of active congestion control protocol data messages according to the proportional relationship.
(3)虚拟信用报文(3) Virtual credit message
虚拟信用报文是用于代表非主动拥塞控制协议数据报文参与带宽等资源竞争或分配的临时产生的信用报文,是为了实现本申请实施例的技术方案引入的概念。也就是说,虚拟信用报文不是网络中客观已存在的报文类型,而是为了实现本申请实施例的技术方案引入的一种中间量,也可以称之为过渡量。虚拟信用报文能够用于与主动拥塞控制协议信用报文一起,为各自对应的数据报文竞争带宽。The virtual credit message is a temporarily generated credit message used to represent the non-active congestion control protocol data message participating in resource competition or allocation such as bandwidth, and is used to implement the concept introduced by the technical solution of the embodiment of the present application. That is to say, the virtual credit message is not an objectively existing message type in the network, but an intermediate quantity introduced in order to realize the technical solution of the embodiment of the present application, which can also be referred to as a transition quantity. The virtual credit message can be used together with the active congestion control protocol credit message to compete for bandwidth for their corresponding data messages.
类似于主动拥塞控制协议信用报文与主动拥塞控制协议数据报文之间的对应关系,虚拟信用报文与非主动拥塞控制协议数据报文之间也存在相似的对应关系,通过对主动拥塞控制协议信用报文和虚拟信用报文进行调度,就能实现对其各自代表的主动拥塞控制协议数据报文和非主动拥塞控制协议数据报文的带宽等资源分配或竞争。Similar to the corresponding relationship between the active congestion control protocol credit message and the active congestion control protocol data message, there is also a similar corresponding relationship between the virtual credit message and the non-active congestion control protocol data message, through the active congestion control The scheduling of protocol credit messages and virtual credit messages can realize resource allocation or competition for the bandwidth of the active congestion control protocol data messages and non-active congestion control protocol data messages of their respective representatives.
应理解,虚拟信用报文由转发设备产生,仅在转发设备内部调度使用,不会发送到转发设备之外的网络中。It should be understood that the virtual credit message is generated by the forwarding device, and is only scheduled for use within the forwarding device, and will not be sent to the network outside the forwarding device.
可以将虚拟信用报文理解为一种基于“预留制”的信用报文形式。“预留制”与上文所述预约制的相同之处在于,主动拥塞控制协议信用报文和虚拟信用报文这两种信用报文都能够代表各自对应的数据报文的需用资源(例如需要占用的带宽)。也就是说,能够根据主动拥塞控制协议信用报文的数量确定对应数量的主动拥塞控制协议数据报文需要占用的带宽等资源,也能够根据虚拟信用报文的数量确定对应数量的非主动拥塞控制协议数据报 文需要占用的带宽等资源。但“预留制”与上文所述预约制也存在区别,二者区别之处在于,预约制是在当前时刻由信用报文先预约带宽,下一时刻发送设备会根据预约到的带宽发送相应数量的数据报文。而“预留制”只能在当前时刻根据该时刻的虚拟信用报文数量为下一时刻预留带宽,但下一时刻发送设备并不会根据该预留带宽发送相应数量的数据报文。“预留制”主要利用了网络中流量不会突变的特性,根据当前时刻中非主动拥塞控制协议数据报文的数量,去调整下一时刻分配给非主动拥塞控制协议数据报文的带宽,因此,“预留制”相当于根据当前时刻所生成的虚拟信用报文的情况为下一时刻的非主动拥塞控制协议数据报文预留尽可能多的带宽,但又尽可能不影响网络中的链路性能,且不影响主动拥塞控制机制的实现。The virtual credit message can be understood as a form of credit message based on the "reservation system". The "reservation system" is the same as the reservation system mentioned above in that both the active congestion control protocol credit message and the virtual credit message can represent the required resources of the corresponding data message ( For example, the bandwidth that needs to be occupied). That is to say, the bandwidth and other resources required for the corresponding number of active congestion control protocol data messages can be determined according to the number of active congestion control protocol credit messages, and the corresponding number of inactive congestion control can also be determined according to the number of virtual credit messages. The bandwidth and other resources that the protocol data message needs to occupy. However, there is also a difference between the "reservation system" and the reservation system mentioned above. The difference between the two is that the reservation system is that the bandwidth is reserved by the credit message at the current moment, and the sending device will send according to the reserved bandwidth at the next moment The corresponding number of data messages. The "reservation system" can only reserve bandwidth for the next moment based on the number of virtual credit messages at that moment at the current moment, but the sending device will not send a corresponding number of data packets based on the reserved bandwidth at the next moment. The "reservation system" mainly uses the characteristic that the traffic in the network does not change suddenly. According to the number of non-active congestion control protocol data messages at the current moment, the bandwidth allocated to the non-active congestion control protocol data messages at the next moment is adjusted. Therefore, the "reservation system" is equivalent to reserving as much bandwidth as possible for the non-active congestion control protocol data message at the next moment based on the virtual credit message generated at the current moment, without affecting the network as much as possible. The link performance does not affect the realization of the active congestion control mechanism.
可选地,虚拟信用报文的报文格式可以采用与主动拥塞控制协议信用报文相同的格式,只是在其特定字段填入不同的信息,例如在类型字段填入不同的信息,用于区分报文类型。Optionally, the message format of the virtual credit message can use the same format as the active congestion control protocol credit message, except that different information is filled in its specific fields, for example, different information is filled in the type field to distinguish Message type.
以SCP协议为例,虚拟信用报文的IP头信息拷贝对应的非主动拥塞控制协议数据报文的IP头信息,其中,虚拟信用报文的IP头中的协议字段不进行拷贝。该协议字段填写UDP的协议号。虚拟信用报文的UDP头的源端口号填写SCP的协议端口号,UDP头的目的端口号拷贝对应的非主动拥塞控制协议数据报文的目的端口号。在SCP协议的类型字段填写的数值,既不同于主动拥塞控制协议信用报文的类型字段的数值,也不同于主动拥塞控制协议数据报文的类型字段的数值,以代表虚拟信用报文。虚拟信用报文也可以采用与主动拥塞控制协议信用报文大小相同的小包,例如64字节。Taking the SCP protocol as an example, the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol field in the IP header of the virtual credit message is not copied. Fill in the UDP protocol number in the protocol field. The source port number of the UDP header of the virtual credit message fills in the protocol port number of the SCP, and the destination port number of the UDP header is the destination port number of the non-active congestion control protocol data message corresponding to the copy of the UDP header. The value filled in the type field of the SCP protocol is not only different from the value of the type field of the active congestion control protocol credit message, but also different from the value of the type field of the active congestion control protocol data message to represent the virtual credit message. The virtual credit message may also use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
应理解,虚拟信用报文也可以不对IP头、UDP头、SCP头等中的信息进行限定,只要使得虚拟信用报文能够与主动拥塞控制协议信用报文能够区分开就可以。It should be understood that the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message.
在本申请实施例中,提供了根据非主动拥塞控制协议数据报文生成的虚拟信用报文的方法,这些生成的虚拟信用报文在作为中间量,只在转发设备中产生,用于为对应的非主动拥塞控制协议数据报文进行带宽等资源的竞争,不会真正发送到转发设备以外的网络中,且可以在适当时候丢弃。In the embodiment of the present application, a method for generating virtual credit messages based on non-active congestion control protocol data messages is provided. These generated virtual credit messages are used as intermediate quantities and are only generated in the forwarding device for corresponding The non-active congestion control protocol data messages compete for bandwidth and other resources, and will not be sent to the network other than the forwarding device, and can be discarded at an appropriate time.
(4)混合信用报文(4) Mixed credit message
混合信用报文是指主动拥塞控制协议信用报文与虚拟信用报文的混合之和。也就是说,混合信用报文并不是一种单独的、新的报文类型,仅仅用于表示上述两种信用报文的混合。是为了当只需要表述对二者之和的整体进行的处理,而不需要区分对二者的具体处理时,可以方便描述。The hybrid credit message refers to the hybrid sum of the active congestion control protocol credit message and the virtual credit message. That is to say, the mixed credit message is not a separate and new message type, but is only used to indicate a mixture of the above two types of credit messages. It is to facilitate the description when only the processing of the sum of the two needs to be expressed, without the need to distinguish the specific processing of the two.
(5)非主动拥塞控制协议数据报文(5) Non-active congestion control protocol data message
非主动拥塞控制协议数据报文是除主动拥塞控制协议数据报文之外的所有数据报文的统称,同样用于用户数据传输。非主动拥塞控制协议数据报文包括TCP报文和UDP报文等传统传输协议报文。由于TCP报文包括TCP的控制信令与数据随路,而UDP完全是数据报文,因此可以将其全部称之为数据报文。The non-active congestion control protocol data message is a collective term for all data messages except the active congestion control protocol data message, and is also used for user data transmission. Non-active congestion control protocol data messages include traditional transmission protocol messages such as TCP messages and UDP messages. Since TCP messages include TCP control signaling and data associated with the route, and UDP is completely data messages, all of them can be called data messages.
TCP报文和UDP报文是传统传输协议的通用报文形式,因此可以与对应的传统传输协议报文采用相同的报文格式,在此不再赘述。The TCP message and the UDP message are the general message forms of the traditional transmission protocol, so they can adopt the same message format as the corresponding traditional transmission protocol message, which will not be repeated here.
非主动拥塞控制协议数据报文由发送设备(源端)发往目的设备(目的端),中间转发设备(如交换机、路由器)将报文向目的设备转发。当采用两级QoS调度策略时,在 转发过程中,在中间转发设备的端口出方向,会根据两级QoS调度策略进行调度,根据调度策略可能会丢弃不满足策略的非主动拥塞控制协议数据报文。Inactive congestion control protocol data messages are sent from the sending device (source end) to the destination device (destination end), and intermediate forwarding devices (such as switches, routers) forward the message to the destination device. When a two-level QoS scheduling strategy is adopted, in the forwarding process, in the outbound direction of the intermediate forwarding device, it will be scheduled according to the two-level QoS scheduling strategy. According to the scheduling strategy, inactive congestion control protocol datagrams that do not meet the strategy may be discarded. Text.
在本申请实施例中,利用虚拟信用报文与非主动拥塞控制协议数据报文之间的对应关系,主动拥塞控制协议信用报文与主动拥塞控制协议数据报文之间的对应关系,通过对虚拟信用报文和主动拥塞控制协议信用报文的调度等操作,实现对下一时刻非主动拥塞控制协议数据报文和主动拥塞控制协议数据报文的可用带宽的分配。例如采用QoS调度策略对上述两种信用报文进行调度,从而确定转发设备当前时刻能够转发的主动拥塞控制协议信用报文的数量,这些被转发的主动拥塞控制协议信用报文代表了下一时刻的主动拥塞控制协议数据报文的可用带宽。在本申请实施例中,还提供了转发设备在转发各类报文时的转发顺序等。本部分主要介绍本申请实施例所涉及的五种报文类型以及报文格式,而对于各类报文在相关方法中具体使用情况,会在下文涉及,在此不进行展开描述。In the embodiment of this application, the correspondence between the virtual credit message and the inactive congestion control protocol data message is used, and the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message is used to compare Operations such as scheduling of virtual credit messages and active congestion control protocol credit messages realize the allocation of available bandwidth for the next moment inactive congestion control protocol data messages and active congestion control protocol data messages. For example, the QoS scheduling strategy is used to schedule the above two types of credit messages to determine the number of active congestion control protocol credit messages that the forwarding device can forward at the current moment. These forwarded active congestion control protocol credit messages represent the next moment. The available bandwidth of active congestion control protocol data packets. In the embodiment of the present application, the forwarding sequence of the forwarding device when forwarding various types of packets, etc. are also provided. This section mainly introduces the five message types and message formats involved in the embodiments of the present application, and the specific usage of various messages in related methods will be discussed below, and will not be described here.
在进行QoS调度时,可能会丢弃不满足调度策略的虚拟信用报文,在完成对虚拟信用报文和主动拥塞控制协议信用报文的调度后,可以丢弃所有虚拟信用报文。During QoS scheduling, virtual credit messages that do not meet the scheduling policy may be discarded. After completing the scheduling of virtual credit messages and active congestion control protocol credit messages, all virtual credit messages can be discarded.
图2是本申请实施例提供的调度报文的方法的示意性流程图。下面结合图2对该方法进行介绍。FIG. 2 is a schematic flowchart of a method for scheduling messages provided by an embodiment of the present application. The method will be introduced below in conjunction with FIG. 2.
201、接收来自于发送设备的多个报文。201. Receive multiple messages from a sending device.
需要说明的是,该多个报文可以包括以下至少一种:主动拥塞控制协议数据报文、主动拥塞控制协议信用报文、非主动拥塞控制协议数据报文,且每种报文的数量可能相同也可能不同。It should be noted that the multiple messages may include at least one of the following: active congestion control protocol data messages, active congestion control protocol credit messages, non-active congestion control protocol data messages, and the number of each message may be The same may be different.
假设在一种情况下,该多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,其中,M、N均为大于或等于1的整数。则该N个主动拥塞控制协议信用报文用于为下一时刻的主动拥塞控制协议数据报文预约带宽。Suppose that in a situation, the multiple messages include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, where M and N are both integers greater than or equal to 1. Then the N active congestion control protocol credit messages are used to reserve bandwidth for the next active congestion control protocol data message.
可选地,发送设备可以基于业务需求或者一个固定比例发送上述多个报文中的一种或多种报文。应理解,发送设备可以是终端设备、主机、服务器等能够发送报文的设备。还应理解,发送上述报文的发送设备可以相同,也可以不同。Optionally, the sending device may send one or more of the foregoing multiple messages based on service requirements or a fixed ratio. It should be understood that the sending device may be a device capable of sending messages, such as a terminal device, a host, or a server. It should also be understood that the sending devices that send the foregoing messages may be the same or different.
202、确定与非主动拥塞控制协议数据报文对应的虚拟信用报文。202. Determine a virtual credit message corresponding to the inactive congestion control protocol data message.
假设在一种情况下,在步骤201接收到的多个报文中包括M个非主动拥塞控制协议数据报文,则可以确定与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,其中,M、P均为大于或等于1的整数。Assuming that in a case, the multiple messages received in step 201 include M inactive congestion control protocol data messages, then P virtual congestion control protocol data messages corresponding to the M inactive congestion control protocol data messages can be determined. Credit message, where M and P are both integers greater than or equal to 1.
需要说明的是,虚拟信用报文只在生成该虚拟信用报文的转发设备内有效,不会发送到该转发设备以外的网络中。It should be noted that the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
可选地,虚拟信用报文可以采用下面的产生机制生成。Optionally, the virtual credit message can be generated using the following generation mechanism.
例如,可以基于当前时刻所接收的非主动拥塞控制协议数据报文生成对应的虚拟信用报文。生成方案可以有很多种,可以针对非主动拥塞控制协议数据报文逐报文按照预定比例生成对应的虚拟信用报文,例如非主动拥塞控制协议数据报文与虚拟信用报文采用1:1、2:1、3:1、2:3等各比例。For example, the corresponding virtual credit message may be generated based on the inactive congestion control protocol data message received at the current moment. There are many generation schemes, and corresponding virtual credit messages can be generated according to a predetermined ratio per message for non-active congestion control protocol data messages. For example, non-active congestion control protocol data messages and virtual credit messages use 1:1. 2:1, 3:1, 2:3 and other ratios.
又例如,还可以基于前一时刻非主动拥塞控制协议流量的速率统计生成对应速率的虚拟信用报文。For another example, it is also possible to generate a virtual credit message corresponding to the rate based on the rate statistics of the inactive congestion control protocol traffic at the previous moment.
可选地,虚拟信用报文可以采用与主动拥塞控制协议信用报文大小相同的小包,例如 64字节。Optionally, the virtual credit message may use a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
下面以SCP协议为例,进一步举例说明虚拟信用报文的产生机制。The following uses the SCP protocol as an example to further illustrate the generation mechanism of the virtual credit message.
假设信用报文使用自定义的SCP协议,则信用报文与SCP协议的数据报文可以存在比例关系,此处以1:1为例,即SCP协议信用报文和数据报文比例为1:1,也就是说,发送设备每收到1个SCP协议信用报文,就触发发送1个SCP协议数据报文。在这种情况下,虚拟信用报文也采用相应的生成方案,即按照非主动拥塞控制协议数据报文等比例地产生虚拟信用报文,比例与SCP协议采用的比例相同。例如,如果采用了1:1的比例,则在生成信用报文时,转发设备接收到1个非主动拥塞控制协议数据报文,就会对应产生1个虚拟信用报文。Assuming that the credit message uses the custom SCP protocol, there can be a proportional relationship between the credit message and the data message of the SCP protocol. Here, 1:1 is taken as an example, that is, the ratio of the credit message to the data message of the SCP protocol is 1:1 In other words, every time the sending device receives an SCP protocol credit message, it triggers the sending of an SCP protocol data message. In this case, the virtual credit message also adopts the corresponding generation scheme, that is, the virtual credit message is generated in an equal proportion according to the non-active congestion control protocol data message, and the proportion is the same as that used by the SCP protocol. For example, if a 1:1 ratio is used, when a credit message is generated, a forwarding device receives an inactive congestion control protocol data message, and a corresponding virtual credit message is generated.
可选地,虚拟信用报文中的信息可以采用下面的方法获得。Optionally, the information in the virtual credit message can be obtained using the following method.
可选地,虚拟信用报文可以采用与SCP协议相同的报文格式,虚拟信用报文的IP头信息拷贝对应的非主动拥塞控制协议数据报文的IP头信息,其中,协议字段不进行拷贝。协议字段填写UDP协议代号。UDP头的源端口号填写SCP协议端口号,UDP头的目的端口号拷贝对应的非主动拥塞控制协议的TCP或者UDP的目的端口号。在SCP协议的类型字段填写不同于主动拥塞控制协议信用报文和不同于主动拥塞控制协议数据报文的类型数值,以代表虚拟信用报文。虚拟信用报文也采用与主动拥塞控制协议信用报文大小相同的小包,例如64字节。Optionally, the virtual credit message can adopt the same message format as the SCP protocol, and the IP header information of the virtual credit message is copied corresponding to the IP header information of the inactive congestion control protocol data message, wherein the protocol fields are not copied . Fill in the UDP protocol code in the protocol field. The source port number of the UDP header fills in the port number of the SCP protocol, and the destination port number of the UDP header is the destination port number of the TCP or UDP of the non-active congestion control protocol corresponding to the copy. Fill in the type field of the SCP protocol different from the active congestion control protocol credit message and the type value different from the active congestion control protocol data message to represent the virtual credit message. The virtual credit message also uses a small packet of the same size as the active congestion control protocol credit message, for example, 64 bytes.
应理解,虚拟信用报文也可以不对IP头、UDP头、SCP头等中的信息进行限定,只要使得虚拟信用报文能够与主动拥塞控制协议信用报文能够区分开就可以。还应理解,虚拟信用报文只在生成该虚拟信用报文的转发设备内有效,不会发送到该转发设备以外的网络中。It should be understood that the virtual credit message may not limit the information in the IP header, UDP header, SCP header, etc., as long as the virtual credit message can be distinguished from the active congestion control protocol credit message. It should also be understood that the virtual credit message is only valid in the forwarding device that generated the virtual credit message, and will not be sent to a network other than the forwarding device.
203、确定要转发的主动拥塞控制协议信用报文。203. Determine the active congestion control protocol credit message to be forwarded.
可选地,可以根据信用报文可用带宽、接收的主动拥塞控制协议信用报文与生成的虚拟信用报文,确定要转发的主动拥塞控制协议信用报文,例如可以基于一定预设规则或策略对两种信用报文进行取舍。Optionally, the active congestion control protocol credit message to be forwarded can be determined according to the available bandwidth of the credit message, the received active congestion control protocol credit message and the generated virtual credit message, for example, based on certain preset rules or policies Choose between two types of credit messages.
假设在一种情况下,在步骤201接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,在步骤202确定与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,则在步骤203可以根据信用报文可用带宽、该N个主动拥塞控制协议信用报文和该P个虚拟信用报文,从该N个主动拥塞控制协议信用报文中确定出K个主动拥塞控制协议信用报文,其中,K为小于或等于N的正整数。Suppose that in a case, the multiple messages received in step 201 include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and in step 202, it is determined that the M inactive congestion control protocol data messages are related to each other. P virtual credit messages corresponding to the congestion control protocol data message, in step 203, the available bandwidth of the credit message, the N active congestion control protocol credit messages and the P virtual credit messages can be selected from the N K active congestion control protocol credit messages are determined from the active congestion control protocol credit messages, where K is a positive integer less than or equal to N.
需要说明的是,信用报文可用带宽是指所有信用报文的可用带宽之和,或者可以理解为所有信用报文之和的可用带宽。在本申请实施例中,当信用报文只包括上述主动拥塞控制协议信用报文与虚拟信用报文两种信用报文时,则相当于该两种信用报文的可用带宽,或者可以理解为相当于该两种信用报文之和(即混合信用报文)的可用带宽。当的信用报文可用带宽。可选地,该信用报文可用带宽例如可以是网络总带宽的一定比例,例如5%、15%、25.5%等,或者也可以是特定的带宽值,例如100兆比特每秒(million bits per second,Mbps)。It should be noted that the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages. In the embodiment of the present application, when the credit message only includes the aforementioned active congestion control protocol credit message and the virtual credit message, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as It is equivalent to the available bandwidth of the sum of the two types of credit messages (ie, mixed credit messages). Available bandwidth for the current credit message. Optionally, the available bandwidth of the credit message may be, for example, a certain percentage of the total network bandwidth, such as 5%, 15%, 25.5%, etc., or may also be a specific bandwidth value, such as 100 megabits per second (million bits per second). second, Mbps).
可选地,上述信用报文可用带宽可以根据网络总带宽、主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的对应关系,以及虚拟信用报文与非主动拥塞控制协议数据报 文的对应关系确定。Optionally, the above-mentioned available bandwidth of the credit message may be based on the total network bandwidth, the correspondence between the active congestion control protocol credit message and the active congestion control protocol data message, and the relationship between the virtual credit message and the non-active congestion control protocol data message. The corresponding relationship is determined.
根据上文的相关描述可知,主动拥塞控制协议信用报文与动拥塞控制协议数据报文之间存在对应关系,例如比例关系,当发送设备接收到返回的主动拥塞控制协议信用报文后,可以触发相应数量的动拥塞控制协议数据报文。与之相似,虚拟信用报文与非主动拥塞控制协议数据报文之间也存在类似的对应关系,例如也可以是比例关系,则相当于根据一定数量的虚拟信用报文预留带宽之后,就能够满足相应数量的非主动拥塞控制协议数据报文的传输。可以理解为,当改变主动拥塞控制协议信用报文和虚拟信用报文的数量时,其各自对应的数据报文的数量也会根据其各自的对应关系发生改变。According to the relevant description above, there is a corresponding relationship between the active congestion control protocol credit message and the dynamic congestion control protocol data message, such as a proportional relationship. When the sending device receives the returned active congestion control protocol credit message, it can Trigger a corresponding number of dynamic congestion control protocol data messages. Similarly, there is a similar correspondence between virtual credit messages and inactive congestion control protocol data messages. For example, it can also be a proportional relationship, which is equivalent to reserving bandwidth based on a certain number of virtual credit messages. It can meet the transmission of a corresponding number of inactive congestion control protocol data messages. It can be understood that when the number of active congestion control protocol credit messages and virtual credit messages is changed, the number of their respective corresponding data messages will also change according to their respective corresponding relationships.
可选地,可以限制主动拥塞控制协议信用报文和虚拟信用报文之和的速率,例如,可以限制二者之和为网络带宽的固定比例x%,例如5%、15%、25.5%等各比例,其中x可以为大于0且小于100的实数。根据网络带宽对二者之和所占用的带宽进行限制,能够使得二者各自代表的数据报文的总量不会超过网络带宽。在本申请实施例中,定义了一种混合信用报文,用于表示上述两种信用报文的混合之和。在这种情况下,可以限制混合信用报文的速率为链路带宽的固定比例x%,例如5%、15%、25.5%等各比例,其中x可以为大于0且小于100的实数。Optionally, the rate of the sum of active congestion control protocol credit messages and virtual credit messages can be restricted. For example, the sum of the two can be restricted to a fixed proportion x% of the network bandwidth, such as 5%, 15%, 25.5%, etc. For each ratio, x can be a real number greater than 0 and less than 100. Limiting the bandwidth occupied by the sum of the two according to the network bandwidth can make the total amount of data packets represented by the two not exceed the network bandwidth. In the embodiment of the present application, a hybrid credit message is defined, which is used to represent the hybrid sum of the above two kinds of credit messages. In this case, the rate of the mixed credit message can be limited to a fixed ratio x% of the link bandwidth, such as 5%, 15%, 25.5%, etc., where x can be a real number greater than 0 and less than 100.
举例说明,假设主动拥塞控制协议信用报文与主动拥塞控制协议数据报文的对应关系为1:1,与该数量对应关系所对应的二者需要占用的带宽的比例为1:9。也就是说当二者数量比例为1:1时,二者需要占用的带宽比例为1:9。与之相似,假设虚拟信用报文与非主动拥塞控制协议数据报文的对应关系为1:1;需要占用的带宽比例同样为1:9。又假设网络中只存在上述两种信用报文,则可以将网络总带宽的10%分配给信用报文,将网络总带宽的90%分配给数据报文,也就是说,在这个例子中,可以设置信用报文可用带宽为10%的网络总带宽,设置数据报文可用带宽为90%的网络总带宽。For example, suppose that the corresponding relationship between the active congestion control protocol credit message and the active congestion control protocol data message is 1:1, and the ratio of the bandwidth corresponding to the number of correspondence between the two needs to be occupied is 1:9. That is to say, when the ratio of the two numbers is 1:1, the ratio of the bandwidth occupied by the two is 1:9. Similarly, suppose that the correspondence between virtual credit messages and non-active congestion control protocol data messages is 1:1; the ratio of bandwidth that needs to be occupied is also 1:9. Assuming that only the above two types of credit messages exist in the network, 10% of the total network bandwidth can be allocated to credit messages, and 90% of the total network bandwidth can be allocated to data messages. In other words, in this example, You can set the available bandwidth of credit messages to 10% of the total network bandwidth, and set the available bandwidth of data messages to 90% of the total network bandwidth.
进一步举例说明,假设根据上述两种信用报文与其各自对应的数据报文的对应关系可知,上述两种信用报文与对应的数据报文所占用的带宽均存在1:9的关系,即需要占用1%带宽的信用报文所能触发的数据报文需要占用9%的带宽。则可以出现下面几种情况。To further illustrate, suppose that according to the correspondence between the above two types of credit messages and their corresponding data messages, it can be known that there is a 1:9 relationship between the bandwidth occupied by the above two types of credit messages and the corresponding data messages, that is, the need A data message that can be triggered by a credit message occupying 1% of the bandwidth needs to occupy 9% of the bandwidth. The following situations can occur.
当信用报文的总量占用的带宽小于10%时,对应的数据报文的总量占用的带宽小于90%,所有报文的总量所占用的带宽没有超过网络带宽100%;When the bandwidth occupied by the total amount of credit packets is less than 10%, the bandwidth occupied by the total amount of corresponding data packets is less than 90%, and the bandwidth occupied by the total amount of all packets does not exceed 100% of the network bandwidth;
当信用报文的总量占用的带宽等于10%时,对应的数据报文的总量占用的带宽等于90%,所有报文的总量所占用的带宽刚好为网络带宽100%;When the bandwidth occupied by the total amount of credit packets is equal to 10%, the bandwidth occupied by the total amount of corresponding data packets is equal to 90%, and the bandwidth occupied by the total amount of all packets is exactly 100% of the network bandwidth;
当信用报文的总量占用的带宽大于10%时,对应的数据报文的总量占用的带宽大于90%,所有报文的总量所占用的带宽超过了网络带宽100%,即超过了网络的最大带宽。When the bandwidth occupied by the total amount of credit messages is greater than 10%, the bandwidth occupied by the total amount of corresponding data messages is greater than 90%, and the bandwidth occupied by the total amount of all messages exceeds 100% of the network bandwidth, that is, it exceeds The maximum bandwidth of the network.
可选地,可以采用下面丢弃较多信用报文的方法确定要转发的主动拥塞控制协议信用报文。Optionally, the following method of discarding more credit messages may be used to determine the active congestion control protocol credit messages to be forwarded.
步骤一、比较两种信用报文的数量大小;Step 1: Compare the number of two types of credit messages;
步骤二、将两种信用报文之和需要占用的带宽与信用报文可用带宽进行比较,当二者需要占用的带宽不超过该信用报文可用带宽时,确定转发所有接收的主动拥塞控制协议信用报文,当二者需要占用的带宽大于信用报文可用带宽时,执行步骤三,丢弃超出的部分;Step 2. Compare the bandwidth occupied by the sum of the two credit messages with the available bandwidth of the credit message. When the bandwidth occupied by the two does not exceed the available bandwidth of the credit message, determine to forward all received active congestion control protocols For credit messages, when the bandwidth occupied by the two is greater than the available bandwidth of the credit messages, perform step 3 and discard the excess part;
步骤三、当二者需要占用的带宽大于信用报文可用带宽时,丢弃在步骤一判断出的数量较多的那类信用报文的部分报文。例如当在步骤一确定主动拥塞控制协议信用报文较多 时,丢弃部分主动拥塞控制协议信用报文,保证剩余的主动拥塞控制协议信用报文与虚拟信用报文之和需要占用的带宽不超过信用报文可用带宽,也就是说,确定剩余的主动拥塞控制协议信用报文为要转发的。与之类似,当在步骤一确定虚拟信用报文较多时丢弃部分虚拟信用报文。Step 3: When the bandwidth occupied by the two is greater than the available bandwidth of the credit message, discard the part of the credit message of the larger number determined in step 1. For example, when it is determined in step 1 that there are too many active congestion control protocol credit messages, some of the active congestion control protocol credit messages are discarded to ensure that the sum of the remaining active congestion control protocol credit messages and virtual credit messages does not exceed the credit. The available bandwidth of the message, that is, the remaining active congestion control protocol credit messages are determined to be forwarded. Similarly, when it is determined in step 1 that there are many virtual credit messages, some virtual credit messages are discarded.
需要说明的是,由于只需要确定要转发的主动拥塞控制协议信用报文,而虚拟信用报文不需要发送出去,所以在步骤三中,当二者需要占用的带宽大于信用报文可用带宽、在步骤一确定虚拟信用报文数量较多时,则在步骤三不需要丢弃主动拥塞控制协议信用报文,因此,可以直接确定需要转发的主动拥塞控制协议信用报文为其全部,而对于虚拟信用报文则完全可以全部丢弃。It should be noted that since only the active congestion control protocol credit message to be forwarded needs to be determined, and the virtual credit message does not need to be sent out, in step 3, when the bandwidth occupied by the two is greater than the available bandwidth of the credit message, When the number of virtual credit messages is determined in step 1, there is no need to discard active congestion control protocol credit messages in step 3. Therefore, it can be directly determined that all active congestion control protocol credit messages that need to be forwarded are all, while for virtual credit The message can be completely discarded.
可选地,还可以设定每次只保留一定比例的虚拟信用报文,例如60%,也就是说,每次在根据接收的非主动拥塞控制协议数据报文生成对应的虚拟信用报文后,只保留60%的虚拟信用报文,再把信用报文可用带宽中除该60%虚拟信用报文需要占用的带宽以外的所有剩余带宽分配给主动拥塞控制协议信用报文。Optionally, it can also be set to retain only a certain percentage of virtual credit messages each time, such as 60%, that is, each time after the corresponding virtual credit message is generated according to the received non-active congestion control protocol data message , Retain only 60% of the virtual credit messages, and then allocate all remaining bandwidth in the available bandwidth of the credit messages except the bandwidth that the 60% virtual credit messages need to occupy to the active congestion control protocol credit messages.
可选地,还可以设定两种信用报文的权重,再根据信用报文可用带宽和两种信用报文各自的权重,对两种信用报文做取舍,确定出要转发的主动拥塞控制协议信用报文。Optionally, the weights of the two types of credit messages can be set, and then based on the available bandwidth of the credit messages and the respective weights of the two types of credit messages, the two types of credit messages can be selected to determine the active congestion control to be forwarded Agreement credit message.
可选地,在这个例子中可以针对下面几种不同情况对两种报文进行取舍。Optionally, in this example, the two types of messages can be selected for the following different situations.
情况一、当两种信用报文之和需要占用的带宽不超过信用报文可用带宽时,不丢弃任何信用报文。Case 1: When the bandwidth occupied by the sum of the two types of credit messages does not exceed the available bandwidth of the credit message, no credit message is discarded.
情况二、当两种信用报文之和需要占用的带宽超过信用报文可用带宽时,将两种信用报文超过权重的部分丢弃,使其总量需要占用的带宽不超过信用报文可用带宽。Case 2: When the bandwidth occupied by the sum of the two types of credit messages exceeds the available bandwidth of the credit messages, discard the parts that exceed the weight of the two types of credit messages, so that the total bandwidth occupied by the two types of credit messages does not exceed the available bandwidth of the credit messages .
可选地,可以根据网络规划的流量设定主动拥塞控制协议信用报文与虚拟信用报文的权重。例如主动拥塞控制协议流量占比为50%,非主动拥塞控制协议流量占比50%,则可以设定主动拥塞控制协议信用报文与虚拟信用报文的权重为1:1。Optionally, the weight of the active congestion control protocol credit message and the virtual credit message can be set according to the traffic planned by the network. For example, if the active congestion control protocol traffic accounts for 50% and the non-active congestion control protocol traffic accounts for 50%, the weight of the active congestion control protocol credit message and the virtual credit message can be set to 1:1.
假设在一种情况下,在步骤201接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,在步骤202确定与该M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,则在步骤203可以根据信用报文可用带宽、主动拥塞控制协议信用报文和虚拟信用报文的权重,从该N个主动拥塞控制协议信用报文中确定出K个主动拥塞控制协议信用报文,其中,K为小于或等于N的正整数。Suppose that in a case, the multiple messages received in step 201 include N active congestion control protocol credit messages and M inactive congestion control protocol data messages, and in step 202, it is determined that the M inactive congestion control protocol data messages are related to each other. For the P virtual credit messages corresponding to the congestion control protocol data message, in step 203, the weights of the N active congestion control protocols can be determined according to the available bandwidth of the credit message, the active congestion control protocol credit message and the weight of the virtual credit message. K proactive congestion control protocol credit messages are determined in the credit messages, where K is a positive integer less than or equal to N.
可选地,在步骤203在确定要转发的主动拥塞控制协议信用报文时,可以通过一级服务质量(quality of service,QoS)调度,并根据调度结果进行确定。Optionally, in step 203, when determining the active congestion control protocol credit message to be forwarded, the first-level quality of service (quality of service, QoS) scheduling may be used, and the determination may be made according to the scheduling result.
例如,在上述根据信用报文可用带宽和主动拥塞控制协议信用报文的权重以及虚拟信用报文的权重,从该N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文的过程中,可以通过一级QoS调度实现。For example, in the foregoing, based on the available bandwidth of the credit message and the weight of the active congestion control protocol credit message and the weight of the virtual credit message, K active congestion control protocol credit messages are determined from the N active congestion control protocol credit messages In the process, it can be realized through first-level QoS scheduling.
可选地,可以采用加权公平队列(weighted fair queue,WFQ)调度策略进行该一级QoS调度。此部分内容会在下面图3至图7相关内容中进行介绍。Optionally, a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling. This part of the content will be introduced in the relevant content of Figure 3 to Figure 7 below.
在上述确定要转发的主动拥塞控制协议信用报文的过程中,可能会丢弃不满足要求的主动拥塞控制协议信用报文,也可能会丢弃部分或全部虚拟信用报文。In the foregoing process of determining the active congestion control protocol credit messages to be forwarded, the active congestion control protocol credit messages that do not meet the requirements may be discarded, or some or all of the virtual credit messages may be discarded.
如果利用QoS调度的方法执行上述过程,还可以在完成第一级QoS调度后,丢弃所有虚拟信用报文,也可以在完成两级QoS调度后,丢弃所有虚拟信用报文,以及还可以 在下一轮调度之前,丢弃所有虚拟信用报文。If the QoS scheduling method is used to perform the above process, all virtual credit messages can be discarded after the first level of QoS scheduling is completed, or all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling, and all virtual credit messages can be discarded after the completion of the two levels of QoS scheduling. Before round scheduling, discard all virtual credit messages.
在步骤201至步骤203的执行过程中,通过引入对应于非主动拥塞控制协议数据报文的虚拟信用报文,以及确定转发给目的设备的主动拥塞控制协议信用报文,使得在利用主动拥塞控制协议信用报文预约带宽时,能够兼顾到非主动拥塞控制协议数据报文的影响,保证了在存在非主动拥塞控制协议数据报文的情况下,主动拥塞控制机制依然能够实现。In the execution process of step 201 to step 203, by introducing a virtual credit message corresponding to the non-active congestion control protocol data message, and determining the active congestion control protocol credit message forwarded to the destination device, the active congestion control When the protocol credit message reserves bandwidth, it can take into account the impact of non-active congestion control protocol data messages, ensuring that the active congestion control mechanism can still be implemented in the case of non-active congestion control protocol data messages.
204、转发所确定的主动拥塞控制协议信用报文以及部分或全部接收的非主动拥塞控制协议数据报文。204. Forward the determined active congestion control protocol credit message and part or all of the received non-active congestion control protocol data message.
可选地,可以根据步骤203所确定的要转发的主动拥塞控制协议信用报文,向目的设备转发所确定的主动拥塞控制协议信用报文,以及转发部分或全部接收的非主动拥塞控制协议数据报文。Optionally, according to the active congestion control protocol credit message to be forwarded determined in step 203, the determined active congestion control protocol credit message can be forwarded to the destination device, and part or all of the received inactive congestion control protocol data can be forwarded Message.
在上述技术方案中,通过引入虚拟信用报文,使得在利用主动拥塞控制协议信用报文预约带宽时,能够兼顾到非主动拥塞控制协议数据报文的影响,从而使得主动拥塞控制协议流量在存在非主动拥塞控制协议流量的情况下,依然能够得到有效控制。也就是说,通过引入虚拟信用报文,并根据信用报文可用带宽、接收的主动拥塞控制协议信用报文以及生成的虚拟信用报文确定转发给目的设备的主动拥塞控制协议信用报文,能够使得在根据接收的主动拥塞控制协议信用报文确定主动拥塞控制协议数据报文的带宽时,会根据网络链路中存在的非主动拥塞控制协议数据报文的数量进行适当调整,从而保证了主动拥塞控制机制的有效性。In the above technical solution, by introducing virtual credit messages, when using active congestion control protocol credit messages to reserve bandwidth, the influence of inactive congestion control protocol data messages can be taken into account, so that the active congestion control protocol traffic exists. In the case of non-active congestion control protocol traffic, it can still be effectively controlled. In other words, by introducing a virtual credit message, and determining the active congestion control protocol credit message forwarded to the destination device based on the available bandwidth of the credit message, the received active congestion control protocol credit message, and the generated virtual credit message, it is possible to When determining the bandwidth of the active congestion control protocol data message according to the received active congestion control protocol credit message, it will make appropriate adjustments according to the number of inactive congestion control protocol data messages existing in the network link, thereby ensuring the initiative Effectiveness of congestion control mechanisms.
在执行步骤204时,还可以通过设置不同报文的转发顺序,并根据该转发顺序转发不同报文。例如,可以通过设置转发顺序,转发上述确定的主动拥塞控制协议信用报文和接收的非主动拥塞控制协议数据报文。When performing step 204, it is also possible to set the forwarding sequence of different messages, and forward different messages according to the forwarding sequence. For example, by setting the forwarding sequence, the determined active congestion control protocol credit message and the received non-active congestion control protocol data message can be forwarded.
可选地,可以直接设置先转发主动拥塞控制协议信用报文再转发非主动拥塞控制协议数据报文。假设在一种情况下,在步骤201接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,在步骤203确定出要转发的K个主动拥塞控制协议信用报文。则在步骤204可以先转发该K个主动拥塞控制协议信用报文,再利用剩余带宽转发该M个非主动拥塞控制协议数据报文的部分或全部。也就是说,先转发该K个主动拥塞控制协议信用报文,再根据剩余带宽尽可能多地转发该M个非主动拥塞控制协议数据报文中的部分或全部。Optionally, it can be directly set to forward the active congestion control protocol credit message first and then forward the non-active congestion control protocol data message. Assuming that in a case, the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and K to be forwarded is determined in step 203 Active congestion control protocol credit messages. Then, in step 204, the K active congestion control protocol credit messages can be forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded by using the remaining bandwidth. That is, the K active congestion control protocol credit messages are forwarded first, and then part or all of the M inactive congestion control protocol data messages are forwarded as much as possible according to the remaining bandwidth.
需要说明的是,由于该K个主动拥塞控制协议信用报文是根据信用报文可用带宽进行分配的,所以不存在该K个主动拥塞控制协议信用报文抢占数据报文可用带宽的情况,因此在上述情况下,可以利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文。It should be noted that since the K active congestion control protocol credit messages are allocated according to the available bandwidth of the credit message, there is no situation in which the K active congestion control protocol credit messages preempt the available bandwidth of the data message. In the above situation, the available bandwidth of all data messages can be used to forward the M inactive congestion control protocol data messages as much as possible.
还应理解,也可能出现转发该M个非主动拥塞控制协议数据报文需要的带宽超过了数据报文可用带宽的情况,这时候可以丢弃部分非主动拥塞控制协议数据报文,但也可能根据需要,将原信用报文可用带宽中虚拟信用报文所占用的带宽转为分配给该M个非主动拥塞控制协议数据报文。It should also be understood that the bandwidth required to forward the M non-active congestion control protocol data messages may exceed the available bandwidth of the data message. At this time, some non-active congestion control protocol data messages can be discarded, but it may also be based on If necessary, the bandwidth occupied by the virtual credit message in the available bandwidth of the original credit message is transferred to the M inactive congestion control protocol data messages.
又例如,还可以直接设置先转发非主动拥塞控制协议数据报文再转发主动拥塞控制协议信用报文。在这种情况下,可以先利用利用所有数据报文可用带宽尽可能多地转发该M个非主动拥塞控制协议数据报文,再转发该K个主动拥塞控制协议信用报文。进一步还可 以,最后再利用原虚拟信用报文占用的带宽转发非主动拥塞控制协议数据报文。For another example, it can also be directly set to forward the non-active congestion control protocol data message first and then forward the active congestion control protocol credit message. In this case, the M non-active congestion control protocol data messages can be forwarded as much as possible by using the available bandwidth of all data messages, and then the K active congestion control protocol credit messages are forwarded. Furthermore, it is possible to finally use the bandwidth occupied by the original virtual credit message to forward the non-active congestion control protocol data message.
又例如,还可以设置交替转发该K个主动拥塞控制协议信用报文和该M个非主动拥塞控制协议数据报文。For another example, it may also be set to alternately forward the K active congestion control protocol credit messages and the M non-active congestion control protocol data messages.
需要说明的是,信用报文是一种不携带数据的报文,而且在确定上述要转发的信用报文的数量时是根据信用报文可用带宽进行确定的,因此要转发的该K个主动拥塞控制协议信用报文不会超过信用报文可用带宽,而接收的非主动拥塞控制协议数据报文是携带了数据的报文,需要的带宽可能会超过数据报文可用带宽。It should be noted that the credit message is a message that does not carry data, and the number of credit messages to be forwarded is determined according to the available bandwidth of the credit message, so the K active messages to be forwarded The congestion control protocol credit message does not exceed the available bandwidth of the credit message, and the received inactive congestion control protocol data message is a message carrying data, and the required bandwidth may exceed the available bandwidth of the data message.
可选地,在上述确定转发顺序的过程中,还可以通过设置优先级,根据优先级确定上述转发顺序。Optionally, in the foregoing process of determining the forwarding sequence, the foregoing forwarding sequence may also be determined according to the priority by setting a priority.
可选地,可以设置主动拥塞主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文的优先级。设定先转发优先级高的报文,则优先转发主动拥塞控制协议信用报文,再根据剩余的带宽转发非主动拥塞控制协议数据报文的部分或全部。Optionally, the priority of the active congestion control protocol credit message can be set higher than the priority of the non-active congestion control protocol data message. It is set to forward the high-priority packets first, and then forward the active congestion control protocol credit messages first, and then forward part or all of the non-active congestion control protocol data messages according to the remaining bandwidth.
假设在一种情况下,在步骤201接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,在步骤203确定了要转发的K个主动拥塞控制协议信用报文。进一步假设主动拥塞主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文的优先级,则在步骤204可以先转发该K个主动拥塞控制协议信用报文,再转发该M个非主动拥塞控制协议数据报文的部分或全部。Assuming that in a case, the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and K to be forwarded is determined in step 203 Active congestion control protocol credit messages. Further assuming that the priority of the active congestion active congestion control protocol credit message is higher than the priority of the non-active congestion control protocol data message, then in step 204, the K active congestion control protocol credit messages may be forwarded first, and then the M Part or all of an inactive congestion control protocol data message.
可选地,可以采用优先级队列(priority queuing,PQ)调度策略实现上述根据转发顺序转发各报文的过程。此部分内容会在下面图3至图7相关内容中进行介绍。Optionally, a priority queuing (PQ) scheduling strategy may be used to implement the foregoing process of forwarding each message according to the forwarding order. This part of the content will be introduced in the relevant content of Figure 3 to Figure 7 below.
例如,可以设定混合信用报文的优先级高于非主动拥塞控制协议数据报文。需要说明的是,此处也可以不是混合信用报文,而是主动拥塞控制协议信用报文,在这种情况下,可以设定主动拥塞控制协议信用报文的优先级高于非主动拥塞控制协议数据报文。For example, the priority of the mixed credit message can be set higher than that of the inactive congestion control protocol data message. It should be noted that this may not be a mixed credit message, but an active congestion control protocol credit message. In this case, the priority of the active congestion control protocol credit message can be set higher than that of the non-active congestion control Protocol data message.
采用PQ调度方式,可以将延迟敏感的关键业务放入高优先级队列,将非关键业务放入低优先级队列,从而确保关键业务被优先发送。因此,在上述PQ调度过程中,优先将混合信用报文中的主动拥塞控制协议信用报文转发出去,以保证对下一时刻主动拥塞控制协议数据报文的带宽预约。Using the PQ scheduling method, delay-sensitive key services can be placed in a high-priority queue, and non-critical services can be placed in a low-priority queue, thereby ensuring that key services are sent first. Therefore, in the above-mentioned PQ scheduling process, the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
在上述PQ调度过程中,对混合信用报文的调度,相当于告知了发送设备在下一时刻转发设备能够接收的主动拥塞控制协议数据报文的数量,使得发送设备准确获知主动拥塞控制协议所预约到的带宽,以及判断下一时刻可以为后续时刻预约的带宽;此外,相当于为非主动拥塞控制协议数据报文预留了在下一时刻的可用带宽,使得非主动拥塞控制协议数据报文可以与主动拥塞控制协议数据报文共享带宽。In the above-mentioned PQ scheduling process, the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
当只接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文时,执行上述生成虚拟信用报文等步骤,在PQ调度过程中,优先调度混合信用报文,当混合信用报文所在的次高优先级队列没有数据包的时候,再调度非主动拥塞控制协议数据报文。此时,不存在主动拥塞控制协议数据报文。When only non-active congestion control protocol data messages and active congestion control protocol credit messages are received, the above steps of generating virtual credit messages are performed. In the PQ scheduling process, the mixed credit messages are prioritized. When the mixed credit messages are When there is no data packet in the second-highest priority queue, the non-active congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
假设在另一种情况下,接收到的多个报文中还包括主动拥塞控制协议数据报文,则同样可以设置三种报文的转发顺序,并根据转发顺序转发各报文,也同样可以根据优先级设置转发顺序,以及还可以利用PQ调度策略进行调度。Assuming that in another case, the received multiple packets also include active congestion control protocol data packets, you can also set the forwarding sequence of the three types of packets, and forward each packet according to the forwarding sequence, the same is true The forwarding order is set according to the priority, and the PQ scheduling strategy can also be used for scheduling.
需要说明的是,由于主动拥塞控制机制是预约制,也就是说在这种情况下,接收的主 动拥塞控制协议数据报文是基于前一时刻通过主动拥塞控制协议信用报文预约到的带宽触发转发的,因此接收的主动拥塞控制协议数据报文需要占用的带宽不会超过其预约到的带宽,从而不会超过数据报文可用带宽。It should be noted that since the active congestion control mechanism is a reservation system, that is to say, in this case, the received active congestion control protocol data message is triggered based on the bandwidth reserved through the active congestion control protocol credit message at the previous moment It is forwarded, so the received active congestion control protocol data message needs to occupy the bandwidth not to exceed the bandwidth reserved for it, and thus does not exceed the available bandwidth of the data message.
假设在另一种情况下,在步骤201接收到的多个报文中包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,还包括Q个主动拥塞控制协议数据报文,则可以设定转发顺序依次为主动拥塞控制协议数据报文、主动拥塞控制协议信用报文、非主动拥塞控制协议数据报文。先转发该Q个主动拥塞控制协议数据报文,再转发从该N个主动拥塞控制协议信用报文中确定出的K个主动拥塞控制协议信用报文,最后转发该Q个主动拥塞控制协议数据报文的部分或全部。Suppose that in another case, the multiple messages received in step 201 include N active congestion control protocol credit messages and M non-active congestion control protocol data messages, and Q active congestion control protocol data messages are also included. For messages, the forwarding order can be set to be active congestion control protocol data messages, active congestion control protocol credit messages, and non-active congestion control protocol data messages. First forward the Q active congestion control protocol data messages, then forward the K active congestion control protocol credit messages determined from the N active congestion control protocol credit messages, and finally forward the Q active congestion control protocol data messages Part or all of the message.
应理解,还可以设置其他转发顺序,例如设置转发顺序依次为非主动拥塞控制协议数据报文、主动拥塞控制协议数据报文、主动拥塞控制协议信用报文,又例如,还可以设置转发轮次,以及设置在不同转发轮次的转发顺序不同等。It should be understood that other forwarding sequences can also be set, for example, the forwarding sequence can be set to inactive congestion control protocol data messages, active congestion control protocol data messages, active congestion control protocol credit messages, and for example, forwarding rounds can also be set. , And the different forwarding sequence set in different forwarding rounds, etc.
可选地,同样可以设定上述三种报文的优先级,在根据优先级确定转发顺序。相当于可以根据主动拥塞控制协议数据报文的优先级、主动拥塞控制协议信用报文的优先级和非主动拥塞控制协议数据报文的优先级,向目的设备转发该Q个主动拥塞控制协议数据报文、该K个主动拥塞控制协议信用报文的全部,以及该M个非主动拥塞控制协议数据报文的部分或全部,其中,Q为大于或等于1的整数。Optionally, the priority of the foregoing three types of messages can also be set, and the forwarding sequence is determined according to the priority. It is equivalent to forwarding the Q active congestion control protocol data to the destination device according to the priority of the active congestion control protocol data message, the priority of the active congestion control protocol credit message, and the priority of the non-active congestion control protocol data message Message, all of the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages, where Q is an integer greater than or equal to 1.
可选地,在根据优先级转发报文的时候,可以根据主动拥塞控制协议数据报文的优先级最高、主动拥塞控制协议信用报文的优先级次之、非主动拥塞控制协议数据报文的优先级最低的顺序,向目的设备转发该Q个主动拥塞控制协议数据报文、该K个主动拥塞控制协议信用报文,以及该M个非主动拥塞控制协议数据报文的部分或全部,其中,Q为大于或等于1的整数。在该过程中,能够优先将主动拥塞控制协议数据报文转发出去,保证了主动拥塞控制协议的低时延效果,而在这个前提下,又能够兼顾用于预约下一时刻带宽的主动拥塞控制协议信用报文的转发和非主动拥塞控制协议数据报文的转发,提高带宽的利用率。Optionally, when forwarding messages according to priority, the priority of the active congestion control protocol data message can be the highest, the priority of the active congestion control protocol credit message is second, and the priority of the non-active congestion control protocol data message In the lowest priority order, forward the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and part or all of the M non-active congestion control protocol data messages to the destination device, where , Q is an integer greater than or equal to 1. In this process, the active congestion control protocol data message can be forwarded preferentially, ensuring the low latency effect of the active congestion control protocol, and under this premise, it can also take into account the active congestion control used to reserve the bandwidth at the next moment. The forwarding of protocol credit messages and the forwarding of inactive congestion control protocol data messages improves bandwidth utilization.
需要说明的是,在步骤201接收多个报文的过程中,还可以存在其他情况,例如未接收到主动拥塞控制协议信用报文,又例如只接收到了一种报文等。但均可以采用上文所述方法确定要转发的报文,以及根据转发顺序转发报文。It should be noted that in the process of receiving multiple messages in step 201, there may be other situations, for example, no active congestion control protocol credit message is received, or for example, only one kind of message is received. However, the method described above can be used to determine the message to be forwarded, and to forward the message according to the forwarding order.
当不存在主动拥塞控制协议信用报文(例如上述N个主动拥塞控制协议信用报文)时,则在步骤204根据转发顺序转发报文时,只需要转发主动拥塞控制协议数据报文和非主动拥塞控制协议数据报文。例如,可以在第二级QoS调度过程中,只对高优先级队列的主动拥塞控制协议数据报文(例如上述Q个主动拥塞控制协议数据报文)和低优先级队列的非主动拥塞控制协议数据报文(例如上述M个非主动拥塞控制协议数据报文)进行调度。此外,当不存在主动拥塞控制协议信用报文时,可以不执行步骤202至步骤204,而直接转发接收的两种数据报文,也可以执行步骤202至步骤204,并且在执行步骤203时,将原先需要分配给主动拥塞控制协议信用报文的带宽转为分配给虚拟信用报文,也就是说,虚拟信用报文最大可以占满所有信用报文可用带宽。When there is no active congestion control protocol credit message (for example, the above N active congestion control protocol credit messages), then in step 204, when the message is forwarded according to the forwarding order, only the active congestion control protocol data message and the inactive congestion control protocol data message need to be forwarded. Congestion control protocol data message. For example, in the second-level QoS scheduling process, only active congestion control protocol data messages for high-priority queues (such as the above Q active congestion control protocol data messages) and non-active congestion control protocols for low-priority queues can be used. Data messages (for example, the above M inactive congestion control protocol data messages) are scheduled. In addition, when there is no active congestion control protocol credit message, step 202 to step 204 may not be executed, and the two received data messages may be directly forwarded, or step 202 to step 204 may be executed, and when step 203 is executed, The bandwidth originally needed to be allocated to the active congestion control protocol credit message is converted to the virtual credit message, that is, the virtual credit message can occupy the available bandwidth of all credit messages at most.
当只接收到了非主动拥塞控制协议数据报文时,依然可以通过上文所述方法,例如通过两级QoS调度,为非主动拥塞控制协议预留下一时刻的带宽,以及将非主动拥塞控制 协议数据报文转发出去。在这种情况下,在步骤203中,因为没有接收到预约带宽的主动拥塞控制协议信用报文,则主动拥塞控制协议信用报文的剩余带宽都可以转而分配给虚拟信用报文,则在下一时刻,为非主动拥塞控制协议数据报文预留的带宽增加了。而在步骤204中,当根据优先级确定转发顺序,转发报文时,相当于只有混合信用报文所在的次高优先级队列和非主动拥塞控制协议数据报文所在的低优先级队列中有数据包,而且混合信用报文中只有虚拟信用报文,所以先调度次高优先级对列中的混合信用报文,再调度非主动拥塞控制协议数据报文。When only the non-active congestion control protocol data message is received, the methods described above can still be used, such as two-level QoS scheduling, to reserve the next moment bandwidth for the non-active congestion control protocol, and the non-active congestion control The protocol data message is forwarded. In this case, in step 203, because the active congestion control protocol credit message of the reserved bandwidth is not received, the remaining bandwidth of the active congestion control protocol credit message can be transferred to the virtual credit message. For a moment, the bandwidth reserved for inactive congestion control protocol data messages increases. In step 204, when the forwarding order is determined according to the priority and the message is forwarded, it is equivalent to only the second highest priority queue where the mixed credit message is located and the low priority queue where the non-active congestion control protocol data message is located. Data packets, and there are only virtual credit messages in the hybrid credit messages, so the hybrid credit messages in the second-highest priority pair are scheduled first, and then the non-active congestion control protocol data messages are scheduled.
当只接收到了主动拥塞控制协议信用报文时,同样可以通过上文所述方法,例如通过两级QoS调度,为主动拥塞控制协议分配下一时刻的带宽。在这种情况下,在步骤203中,因为没有接收到非主动拥塞控制协议数据报文,可以认为暂时不需要进行非主动拥塞控制,则虚拟信用报文的剩余带宽都可以转而分配给主动拥塞控制协议信用报文,则在下一时刻,主动拥塞控制协议数据报文可以使用更大占比的带宽。而在步骤204中,当根据优先级确定转发顺序,转发报文时,相当于只有混合信用报文所在的次高优先级队列中有数据包,且该混合信用报文中只有主动拥塞控制协议信用报文,所以只需要调度次高优先级队列中的混合信用报文。When only the active congestion control protocol credit message is received, the method described above can also be used, for example, through two-level QoS scheduling, to allocate the bandwidth for the active congestion control protocol at the next moment. In this case, in step 203, because no non-active congestion control protocol data message is received, it can be considered that non-active congestion control is temporarily unnecessary, and the remaining bandwidth of the virtual credit message can be allocated to the active Congestion control protocol credit messages, then at the next moment, active congestion control protocol data messages can use a larger proportion of bandwidth. In step 204, when the forwarding order is determined according to the priority and the message is forwarded, it is equivalent to that there are only data packets in the second highest priority queue where the mixed credit message is located, and there is only the active congestion control protocol in the mixed credit message Credit messages, so only the mixed credit messages in the second-highest priority queue need to be scheduled.
当只接收到了主动拥塞控制协议数据报文时,同样可以通过上文所述方法,例如通过两级QoS调度,将主动拥塞控制协议数据报文转发出去。在这种情况下,因为没有接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文,因此不需要生成虚拟信用报文,所以可以不执行步骤202和步骤203。而在步骤204中,当根据优先级确定转发顺序,转发报文时,相当于只有主动拥塞控制协议数据报文所在的高优先级队列中有数据包,所以只需要调度主动拥塞控制协议数据报文。这种情况可以出现在,前一时刻(转发用于预约带宽的主动拥塞控制协议信用报文时)和当前时刻网络中均不存在非主动拥塞控制协议流量。或者,可以出现在不存在非主动拥塞控制协议流量的网络中。When only the active congestion control protocol data message is received, the method described above can also be used to forward the active congestion control protocol data message, for example, through two-level QoS scheduling. In this case, because the inactive congestion control protocol data message and the active congestion control protocol credit message are not received, there is no need to generate a virtual credit message, so step 202 and step 203 may not be performed. In step 204, when the forwarding sequence is determined according to the priority and the message is forwarded, it is equivalent to that only the active congestion control protocol data message is in the high-priority queue with data packets, so only the active congestion control protocol data message needs to be scheduled Text. This situation can occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when forwarding the active congestion control protocol credit message used for bandwidth reservation) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
在上述方法中,还可以在适当的时候,丢弃部分或全部虚拟信用报文,以释放其所占用的存储空间等资源。In the above method, it is also possible to discard part or all of the virtual credit messages at an appropriate time to release resources such as storage space occupied by them.
例如,可以在确定要转发的主动拥塞控制协议信用报文之后丢弃所有虚拟信用报文,也可以在执行上述根据转发顺序转发各报文的前后或期间丢弃所有虚拟信用报文,还可以在执行完所有步骤后丢弃所有虚拟信用报文,还可以在执行完所有步骤之后以及接收下一轮到来的报文之前丢弃所有虚拟信用报文。For example, after determining the active congestion control protocol credit messages to be forwarded, all virtual credit messages can be discarded, or all virtual credit messages can be discarded before and after forwarding each message according to the forwarding order. All virtual credit messages are discarded after all the steps are completed, and all virtual credit messages can also be discarded after all the steps are executed and before the next round of incoming messages are received.
又例如,在步骤203根据信用报文可用带宽和主动拥塞控制协议信用报文与虚拟信用报文,确定要转发的主动拥塞控制协议信用报文时,可以丢弃部分或全部虚拟信用报文。进一步举例说明,在这个例子中,假设上述两种信用报文信用报文可用带宽为10Mbps,二者权重为1:1,而主动拥塞控制协议信用报文需要占用带宽6Mbps,虚拟信用报文需要占用的带宽为7Mbps,则丢弃部分主动拥塞控制协议信用报文和部分虚拟信用报文,使得二者所占带宽均为5Mbps,或者也可以在此时就直接丢弃所有虚拟信用报文。For another example, in step 203, when determining the active congestion control protocol credit message to be forwarded according to the available bandwidth of the credit message, the active congestion control protocol credit message and the virtual credit message, part or all of the virtual credit message may be discarded. To further illustrate, in this example, suppose that the available bandwidth of the above two types of credit messages is 10Mbps, and the weight of the two is 1:1, while the active congestion control protocol credit messages need to occupy bandwidth 6Mbps, and the virtual credit messages need If the occupied bandwidth is 7 Mbps, part of the active congestion control protocol credit messages and part of the virtual credit messages are discarded, so that the bandwidth occupied by both is 5 Mbps, or all virtual credit messages may be directly discarded at this time.
在实际中,虽然通过上述方法实现了存在非主动拥塞控制协议流量的情况下的主动拥塞控制机制,但由于非主动拥塞控制协议的流量是不受控制的,因此,在下一时刻到来的非主动拥塞控制协议数据报文依然可能超过了在上述方法中非主动拥塞控制协议数据报文得到的带宽,而通过设定转发顺序转发数据,就能够使得超过部分被丢掉,而不至于影 响网络性能。In practice, although the active congestion control mechanism in the case of non-active congestion control protocol traffic is realized by the above method, since the traffic of the non-active congestion control protocol is not controlled, the non-active congestion control protocol will arrive at the next moment. The congestion control protocol data message may still exceed the bandwidth obtained by the inactive congestion control protocol data message in the above method, and by setting the forwarding sequence to forward the data, the excess part can be discarded without affecting network performance.
此外,假设某些时刻非主动拥塞控制协议的数据更为重要,就可以设定优先转发非主动拥塞控制协议数据报文,再转发主动拥塞控制协议信用报文和/或主动拥塞控制协议数据报文。在这种情况下,可能出现上述主动拥塞控制协议信用报文和主动拥塞控制协议数据报文不能全部转发出去的情况。In addition, assuming that the data of non-active congestion control protocol is more important at certain moments, you can set priority to forward non-active congestion control protocol data messages, and then forward active congestion control protocol credit messages and/or active congestion control protocol data messages Text. In this case, it may happen that the aforementioned active congestion control protocol credit messages and active congestion control protocol data messages cannot all be forwarded.
图2主要对本申请实施例提供的调度报文的方法进行了介绍,在步骤201提到接收到的报文种类可能不同,主要是因为两种拥塞控制机制可能同时存在也可能只存在一种,而且两种拥塞控制机制的具体方法和过程不同,使得同一时刻在网络中存在的报文种类不同。当接收到的报文种类不同时,如果利用图2所示方法进行拥塞控制,就会产生不同的执行过程。而为了使得上述调度报文的方法达到更好的效果,本申请实施例还提供几种调度方法,对其进行优化。因此,下面会针对不同的情况对本申请实施例提供的利用调度策略调度报文的方法进行介绍。Figure 2 mainly introduces the method of scheduling messages provided by the embodiments of the present application. In step 201, it is mentioned that the types of received messages may be different, mainly because two congestion control mechanisms may exist at the same time or there may be only one. Moreover, the specific methods and procedures of the two congestion control mechanisms are different, which makes the types of messages existing in the network at the same time different. When the types of received messages are different, if the method shown in Figure 2 is used for congestion control, different execution processes will occur. In order to achieve better results in the foregoing method for scheduling messages, the embodiments of the present application also provide several scheduling methods to optimize them. Therefore, the method for scheduling messages provided by the embodiments of the present application by using the scheduling policy will be introduced in the following according to different situations.
下面结合图3至图7分别介绍T0时刻和T1时刻的调度报文的方法,其中,图3至图5对应T0时刻,图6和图7对应T1时刻。T0时刻是指发送设备发送的主动拥塞控制协议信用报文到达转发设备的时刻。当转发设备对T0时刻所接收的报文进行调度后,会向发送设备发送回程主动拥塞控制协议信用报文,发送设备接收并根据该回程主动拥塞控制协议信用报文触发发送主动拥塞控制协议数据报文。因此,可以将T1时刻设置为转发设备接收到该主动拥塞控制协议数据报文的时刻。The methods for scheduling messages at T0 time and T1 time are respectively introduced below in conjunction with FIGS. 3 to 7, where FIGS. 3 to 5 correspond to time T0, and FIGS. 6 and 7 correspond to time T1. Time T0 refers to the time when the active congestion control protocol credit message sent by the sending device arrives at the forwarding device. When the forwarding device schedules the message received at T0, it will send the backhaul active congestion control protocol credit message to the sending device, and the sending device receives and triggers the sending of active congestion control protocol data according to the backhaul active congestion control protocol credit message. Message. Therefore, time T1 can be set as the time when the forwarding device receives the active congestion control protocol data message.
应理解,在本申请实施例中,T0时刻发送设备在为主动拥塞控制协议数据报文预约带宽,T1时刻发送设备在根据T0时刻预约的带宽发送相应的数据报文,但对于具体设置在执行过程的哪个时间节点不存在限定。It should be understood that in this embodiment of the application, the sending device at time T0 is reserving bandwidth for the active congestion control protocol data message, and the sending device at time T1 sends the corresponding data message according to the bandwidth reserved at time T0, but for specific settings, There is no restriction on which time point in the process.
下面首先结合图3至图5对T0时刻的调度报文的方法进行介绍。The following first introduces the method of scheduling messages at time T0 with reference to FIGS. 3 to 5.
首先对图3至图5各元素解释如下:转发设备400包括入端口410和出端口420,该两个端口分别用于接收和发送报文等数据。报文310和报文330是发送设备300经转发设备400向目的设备发送的报文,其中,报文310为主动拥塞控制协议信用报文,用于为主动拥塞控制协议数据报文预约带宽;报文330为非主动拥塞控制协议数据报文。报文430是在转发设备400中生成的虚拟信用报文,只在转发设备400内有效。报文440是混合信用报文,即报文310与报文430的混合之和,但应理解在某些情况下,报文440中也有可能只存在报文310与报文430两种报文中的一种。QoS调度是指转发设备400对报文310、报文430、报文330、报文440中的部分或全部进行的调度,用以分配带宽和/或确定要发送的报文等。First, the elements of FIGS. 3 to 5 are explained as follows: the forwarding device 400 includes an ingress port 410 and an egress port 420, and the two ports are respectively used for receiving and sending data such as packets. The message 310 and the message 330 are messages sent by the sending device 300 to the destination device via the forwarding device 400, wherein the message 310 is an active congestion control protocol credit message, which is used to reserve bandwidth for the active congestion control protocol data message; The message 330 is an inactive congestion control protocol data message. The message 430 is a virtual credit message generated in the forwarding device 400, and is only valid in the forwarding device 400. The message 440 is a mixed credit message, that is, the mixed sum of the message 310 and the message 430, but it should be understood that in some cases, there may be only two kinds of messages, the message 310 and the message 430, in the message 440. One of them. QoS scheduling refers to the scheduling performed by the forwarding device 400 on some or all of the message 310, the message 430, the message 330, and the message 440 to allocate bandwidth and/or determine the message to be sent.
需要说明的是,在本申请实施例中,主要是对发送设备和转发设备之间的过程进行介绍,因此在图3至图7中未示出目的设备,但应理解,转发设备在执行本申请实施例的过程转发各类报文时,是转发给目的设备的。It should be noted that, in the embodiments of this application, the process between the sending device and the forwarding device is mainly introduced. Therefore, the destination device is not shown in FIGS. 3 to 7, but it should be understood that the forwarding device is performing this In the process of applying the embodiment, when various types of messages are forwarded, they are forwarded to the destination device.
图3是本申请实施例提供的T0时刻调度报文的方法的示意图。FIG. 3 is a schematic diagram of a method for scheduling a message at time T0 provided by an embodiment of the present application.
发送设备300经转发设备400向目的设备发送报文310、报文330。The sending device 300 sends the message 310 and the message 330 to the destination device via the forwarding device 400.
需要说明的是,发送报文310的发送设备300与发送报文330的发送设备300可以是同一设备,也可以是不同的设备。It should be noted that the sending device 300 that sends the message 310 and the sending device 300 that sends the message 330 may be the same device or different devices.
可选地,发送设备300基于业务需求或者一个固定比例发送该报文310。Optionally, the sending device 300 sends the message 310 based on service requirements or a fixed ratio.
应理解,发送设备300可以是终端设备,也可以是主机或交换机等能够发送报文的设备。It should be understood that the sending device 300 may be a terminal device, or a device capable of sending packets, such as a host or a switch.
在T0时刻,转发设备400接收到来自于发送设备300的报文330和报文310。At time T0, the forwarding device 400 receives the message 330 and the message 310 from the sending device 300.
需要说明的是,T0时刻的设置并不唯一,也可以将发送设备300发送报文310的时刻设定为T0时刻,还可以将发送设备300发送报文330的时刻设定为T0时刻,在此不再赘述。It should be noted that the setting of T0 time is not unique. The time at which the sending device 300 sends the message 310 can also be set to time T0, and the time at which the sending device 300 sends the message 330 can also be set to time T0. This will not be repeated here.
可选地,当接收到上述报文330和报文310后,转发设备400可以基于T0时刻接收的报文330生成报文430,报文430只在转发设备400内有效,不会发送到网络中。Optionally, after receiving the above-mentioned message 330 and message 310, the forwarding device 400 may generate a message 430 based on the message 330 received at time T0. The message 430 is only valid in the forwarding device 400 and will not be sent to the network. in.
可选地,可以采用图2中步骤202所述方法生成报文430。Optionally, the method described in step 202 in FIG. 2 may be used to generate the message 430.
可选地,转发设备400还可以对上述报文进行QoS调度,该QoS调度可以包括一级或多级调度,下面将结合图4和图5进行介绍。Optionally, the forwarding device 400 may also perform QoS scheduling on the foregoing packets, and the QoS scheduling may include one-level or multi-level scheduling, which will be described below in conjunction with FIG. 4 and FIG. 5.
图4是本申请实施例提供的T0时刻的一级QoS调度的方法示意图。应理解,还可以利用图2中步骤203中所涉及的方法进行该一级QoS调度。Fig. 4 is a schematic diagram of a first-level QoS scheduling method at time T0 provided by an embodiment of the present application. It should be understood that the method involved in step 203 in FIG. 2 may also be used to perform the first-level QoS scheduling.
如图4所示,转发设备400可以基于T0时刻接收的报文330生成报文430,报文430只在转发设备400内有效,不会发送到网络中。As shown in FIG. 4, the forwarding device 400 may generate a message 430 based on the message 330 received at time T0. The message 430 is only valid in the forwarding device 400 and will not be sent to the network.
应理解,报文430与报文330存在对应关系,也就是说一个报文430所代表的报文330的数量是可以设定的。It should be understood that there is a correspondence between the message 430 and the message 330, that is, the number of messages 330 represented by one message 430 can be set.
可选地,可以采用图2中步骤202所述方法生成报文430。Optionally, the method described in step 202 in FIG. 2 may be used to generate the message 430.
可选地,转发设备400还可以根据主动拥塞控制协议信用报文与虚拟信用报文的信用报文可用带宽以及接收的报文310和生成的报文430,从报文310中确定出要转发的部分或全部报文310,用以为报文310代表的数据报文进行带宽分配。Optionally, the forwarding device 400 may also determine from the message 310 to be forwarded according to the available bandwidth of the credit message of the active congestion control protocol credit message and the virtual credit message, the received message 310 and the generated message 430 Part or all of the message 310 is used to allocate bandwidth for the data message represented by the message 310.
可选地,可以采用图2中步骤203所述方法,从接收的报文310中确定要转发的部分或全部报文310,以用于分配下一时刻主动拥塞控制协议数据报文的带宽,以及为下一时刻非主动拥塞控制协议数据报文预留带宽。Optionally, the method described in step 203 in FIG. 2 may be used to determine part or all of the messages 310 to be forwarded from the received messages 310, so as to allocate the bandwidth of the active congestion control protocol data message at the next moment. And to reserve bandwidth for non-active congestion control protocol data messages at the next moment.
可选地,可以对报文310和报文430进行一级QoS调度。Optionally, the first-level QoS scheduling may be performed on the message 310 and the message 430.
可选地,可以采用加权公平队列(weighted fair queue,WFQ)调度策略进行该一级QoS调度。下面对WFQ调度策略以及利用其对报文310和报文430进行一级QoS调度的过程进行介绍。Optionally, a weighted fair queue (WFQ) scheduling strategy can be used to perform this level-one QoS scheduling. The following describes the WFQ scheduling strategy and the process of using it to perform first-level QoS scheduling on the message 310 and the message 430.
公平队列(fair queue,FQ)调度的目的是尽可能公平地分享网络资源,使所有流的时延和抖动达到最优,让不同队列获得公平的调度机会。而WFQ调度则是在FQ的基础上增加了优先级方面的考虑,使优先级较高的报文获得优先调度的机会多于优先级较低的报文。The purpose of fair queue (FQ) scheduling is to share network resources as fairly as possible, optimize the delay and jitter of all flows, and allow different queues to obtain fair scheduling opportunities. The WFQ scheduling adds priority considerations on the basis of FQ, so that packets with higher priority have more opportunities for priority scheduling than packets with lower priority.
WFQ调度在报文入队之前,先对流量进行分类。The WFQ scheduling classifies the traffic before the packet enters the queue.
例如,按流的“会话”信息分类:根据报文的协议类型、源TCP或UDP端口号、目的TCP或UDP端口号、源IP地址、目的IP地址、服务类型(type of service,ToS)域中的优先级等自动进行流量的分类,并且尽可能多地提供队列,以将每个流均匀地放入不同队列中,从而在总体上均衡各个流的时延。在出队的时候,WFQ调度按流的优先级(precedence)来分配每个流可以占有的带宽。优先级的数值越小,所得的带宽越少。优先级的数值越大,所得的带宽越多。For example, according to the "session" information classification of the flow: according to the protocol type of the message, source TCP or UDP port number, destination TCP or UDP port number, source IP address, destination IP address, type of service (ToS) field Automatically classify the traffic in the priority and so on, and provide as many queues as possible to evenly put each flow into a different queue, so as to balance the delay of each flow as a whole. When dequeuing, WFQ scheduling allocates the bandwidth that each stream can occupy according to the precedence of the stream. The smaller the priority value, the less bandwidth obtained. The higher the priority value, the more bandwidth is obtained.
又例如,按优先级分类:通过优先级映射把流量标记为本地优先级,每个本地优先级对应一个队列号。每个接口预分配8个队列,报文根据队列号进入队列。初始时默认队列的WFQ权重相同,每个流平均分配链路带宽。但在WFQ调度过程中可以通过修改权重,改变对每个流可以占有的带宽的分配。For another example, classification by priority: the traffic is marked as a local priority through priority mapping, and each local priority corresponds to a queue number. Each interface is pre-allocated with 8 queues, and packets enter the queue according to the queue number. Initially, the WFQ weights of the default queues are the same, and link bandwidth is evenly allocated to each flow. However, in the WFQ scheduling process, the weight can be modified to change the allocation of the bandwidth that each stream can occupy.
为了提供各个流之间的公平调度,在WFQ调度中,会给每个流分配带宽,并允许其它流使用某条流的剩余带宽,例如,总带宽为200kbps,共10条流,则可以给每条流分配20kbps带宽,可能实际上某条流例如流1只有5kbps,而流2有30kbps,那么其它的流就可以分配流1所剩余下的20-5=15kbps的带宽。In order to provide fair scheduling among various flows, in WFQ scheduling, bandwidth is allocated to each flow and other flows are allowed to use the remaining bandwidth of a certain flow. For example, if the total bandwidth is 200kbps, there are 10 flows in total. Each stream is allocated 20 kbps bandwidth. In fact, a certain stream, for example, stream 1 has only 5 kbps and stream 2 has 30 kbps, so other streams can allocate the remaining 20-5=15 kbps bandwidth of stream 1.
在利用WFQ调度策略对主动拥塞控制信用协议报文(例如报文310)与虚拟信用报文(例如报文430)进行一级QoS调度时,可以根据权重,对主动拥塞控制协议信用报文和虚拟信用报文进行带宽分配,并实现了上述两种信用报文的公平竞争。When using the WFQ scheduling strategy to perform first-level QoS scheduling on active congestion control credit protocol messages (for example, message 310) and virtual credit messages (for example, message 430), the active congestion control protocol credit messages and The virtual credit message performs bandwidth allocation and realizes the fair competition of the above two kinds of credit messages.
举例说明,假设上述两种报文设置的权重分配为1:1,信用报文可用带宽为200Mbps,则当只存在上述两种信用报文时,两种信用报文分别能够分配100Mbps的带宽。为了表述简洁,主动拥塞控制协议信用报文的实际带宽(即T0时刻接收的主动拥塞控制协议信用报文需要占用的带宽)用B1表示,虚拟信用报文的实际带宽(即根据T0时刻接收的非主动拥塞控制协议信用报文所生成的虚拟信用报文需要占用的带宽)用B2表示,则在WFQ调度过程中,可能存在如下情况:For example, assuming that the weight allocation set for the above two types of messages is 1:1, and the available bandwidth of the credit message is 200 Mbps, when there are only the above two types of credit messages, the two types of credit messages can each be allocated a bandwidth of 100 Mbps. For the sake of simplicity, the actual bandwidth of the active congestion control protocol credit message (that is, the bandwidth that the active congestion control protocol credit message received at T0 needs to occupy) is represented by B1, and the actual bandwidth of the virtual credit message (that is, according to the received at T0 The bandwidth required for the virtual credit message generated by the non-active congestion control protocol credit message) is denoted by B2, then in the WFQ scheduling process, the following situations may exist:
当B1<=100Mbps且B2<=100Mbps时,二者分配到的带宽不变。When B1<=100Mbps and B2<=100Mbps, the bandwidth allocated to the two remains unchanged.
当B1>100Mbps且B2<100Mbps时,增大B1,B2保持不变,其中B1最大可以增大到200Mbps-B2;也就是说,虚拟信用报文的实际带宽不变,但虚拟信用报文的剩余带宽可以分配给主动拥塞控制协议信用报文。When B1>100Mbps and B2<100Mbps, increase B1 and B2 remain unchanged, where B1 can be increased up to 200Mbps-B2; that is, the actual bandwidth of the virtual credit message remains unchanged, but the virtual credit message The remaining bandwidth can be allocated to active congestion control protocol credit messages.
当B1<100Mbps且B2>100Mbps时,增大B2,B1保持不变,其中B2最大可以增大到200Mbps-B1;也就是说,主动拥塞控制协议信用报文的实际带宽不变,但主动拥塞控制协议信用报文的剩余带宽可以分配给虚拟信用报文。When B1<100Mbps and B2>100Mbps, increase B2, B1 remains unchanged, where B2 can be increased to 200Mbps-B1 at most; that is, the actual bandwidth of the active congestion control protocol credit message remains unchanged, but active congestion The remaining bandwidth of the control protocol credit message can be allocated to the virtual credit message.
当B1>100Mbps且B2>100Mbps时,二者均只能分配到100Mbps带宽。When B1>100Mbps and B2>100Mbps, both can only be allocated to 100Mbps bandwidth.
通过上述两种信用报文的公平竞争,能够使得在确定下一时刻主动拥塞控制协议数据报文的带宽时,综合考虑了主动拥塞控制协议信用报文和虚拟信用报文,也就是说,会根据网络链路中存在的非主动拥塞控制协议数据报文的数量进行适当调整,从而使得发送设备在根据返回的回程主动拥塞控制协议信用报文触发发送相应的主动拥塞控制协议数据报文时,不会超过链路中主动拥塞控制协议数据报文实际可用的带宽。上述WFQ调度使得主动拥塞控制协议流量在存在非主动拥塞控制协议流量的情况下,依然能够得到有效控制。Through the fair competition of the above two types of credit messages, it is possible to comprehensively consider the active congestion control protocol credit messages and virtual credit messages when determining the bandwidth of the active congestion control protocol data message at the next moment. Make appropriate adjustments according to the number of inactive congestion control protocol data messages existing in the network link, so that when the sending device triggers the sending of the corresponding active congestion control protocol data message according to the returned backhaul active congestion control protocol credit message, Will not exceed the bandwidth actually available for active congestion control protocol data packets in the link. The above-mentioned WFQ scheduling enables active congestion control protocol traffic to be effectively controlled even in the presence of non-active congestion control protocol traffic.
可选地,转发设备400还可以将两种信用报文的速率设置为链路带宽的固定比例x%,例如5%、6%、13%等各比例,其中x可以为大于0且小于100的实数。以保证两种信用报文所对应的数据报文的总和不超过网络链路的带宽。也就是说,可以根据网络总带宽以及两种信用报文与各自对应的数据报文的对应关系,确定信用报文可用带宽。应理解,信用报文可用带宽是指所有信用报文的可用带宽之和,或者可以理解为所有信用报文之和的可用带宽。在本申请实施例中,当信用报文只包括上述两种信用报文时,则相当于该两种信用报文的可用带宽,或者可以理解为相当于该两种信用报文之和(即混合信用报文)的 可用带宽。Optionally, the forwarding device 400 may also set the rates of the two credit messages to a fixed ratio x% of the link bandwidth, such as 5%, 6%, 13%, etc., where x can be greater than 0 and less than 100. The real number. To ensure that the sum of the data messages corresponding to the two credit messages does not exceed the bandwidth of the network link. In other words, the available bandwidth of the credit message can be determined according to the total network bandwidth and the correspondence between the two types of credit messages and their corresponding data messages. It should be understood that the available bandwidth of credit messages refers to the sum of available bandwidth of all credit messages, or can be understood as the sum of available bandwidth of all credit messages. In the embodiment of the present application, when the credit message includes only the above two types of credit messages, it is equivalent to the available bandwidth of the two types of credit messages, or can be understood as equivalent to the sum of the two types of credit messages (ie Hybrid credit message) available bandwidth.
需要说明的是,在上述一级QoS调度过程中,可能会丢弃部分不符合调度策略的报文310,而在调度结束后,可以丢弃所有报文430。It should be noted that in the foregoing first-level QoS scheduling process, some packets 310 that do not conform to the scheduling policy may be discarded, and after the scheduling is completed, all the packets 430 may be discarded.
可选地,转发设备400还可以对上述报文进行两级QoS调度,调度过程可以如图5所示。Optionally, the forwarding device 400 may also perform two-level QoS scheduling on the foregoing message, and the scheduling process may be as shown in FIG. 5.
图5是本申请实施例提供的T0时刻的两级QoS调度的方法示意图。Fig. 5 is a schematic diagram of a two-level QoS scheduling method at time T0 provided by an embodiment of the present application.
如图5所示,在两级QoS调度中,首先对报文310和报文430进行第一级QoS调度。As shown in FIG. 5, in the two-level QoS scheduling, first-level QoS scheduling is performed on the message 310 and the message 430.
可选地,该第一级QoS调度可以采用图4中所示的一级QoS调度的方法,对报文310和报文430进行调度,例如进行WFQ调度,以及还可以利用图2中步骤203中所涉及的方法进行该一级QoS调度,在此不再重复介绍。Optionally, the first-level QoS scheduling may use the first-level QoS scheduling method shown in FIG. 4 to schedule the message 310 and the message 430, for example, perform WFQ scheduling, and may also use step 203 in FIG. 2 The method involved in this level of QoS scheduling is not repeated here.
可选地,在第一级QoS调度后,可以利用上文所述方法,对报文440进行限速,确定报文440占用的带宽。Optionally, after the first-level QoS scheduling, the method described above can be used to limit the rate of the message 440 and determine the bandwidth occupied by the message 440.
可选地,可以对报文440和报文330进行第二级QoS调度。应理解,还可以利用图2中步骤204中所涉及的根据转发顺序转发各报文的方法进行该第二级QoS调度。Optionally, second-level QoS scheduling may be performed on the message 440 and the message 330. It should be understood that the second-level QoS scheduling can also be performed by using the method of forwarding each message according to the forwarding sequence involved in step 204 in FIG. 2.
需要说明的是,该报文440可以是利用图4所述方法进行调度后的混合信用报文。此外,该报文440也可以是报文310,例如如果在进行第一级QoS调度后丢弃掉报文430,则会使得报文440中只剩下报文310。It should be noted that the message 440 may be a mixed credit message after scheduling using the method described in FIG. 4. In addition, the message 440 may also be the message 310. For example, if the message 430 is discarded after the first-level QoS scheduling is performed, only the message 310 will be left in the message 440.
可选地,第二级QoS调度可以是根据优先级对报文330和报文440进行调度。Optionally, the second-level QoS scheduling may be to schedule the message 330 and the message 440 according to priority.
可选地,第二级QoS调度可以采用优先级(priority queuing,PQ)调度策略。下面对PQ调度策略以及利用其对报文330和报文440进行第二级QoS调度的过程进行介绍。Optionally, the second-level QoS scheduling may adopt a priority (priority queuing, PQ) scheduling strategy. The following describes the PQ scheduling strategy and the process of using it to perform the second-level QoS scheduling on the message 330 and the message 440.
可选地,可以设定混合信用报文的优先级高于非主动拥塞控制协议数据报文。Optionally, the priority of the hybrid credit message can be set higher than that of the non-active congestion control protocol data message.
需要说明的是,参与第二级QoS调度的可以不是混合信用报文,而是主动拥塞控制协议信用报文,在这种情况下,可以设定主动拥塞控制协议信用报文的优先级。It should be noted that it is not the hybrid credit message that participates in the second-level QoS scheduling, but the active congestion control protocol credit message. In this case, the priority of the active congestion control protocol credit message can be set.
在PQ调度过程中,会严格按照队列优先级的高低顺序进行调度。只有高优先级队列中的报文全部调度完毕后,低优先级队列才有调度机会。如果在高优先级队列中有数据包,优先处理该高优先级队列的数据包,直到该高优先级队列为空,才会转到下一优先级队列,处理其中的数据包并检查高优先级队列是否为空,如果高优先级队列为空,就继续处理该优先级队列,如果高优先级队列又出现了数据包,则转而处理高优先级队列。因此,低优先级队列中的数据包只能在所有优先级高于自己的队列都为空时,才能处理。当更高优先级队列里有太多的数据包时,就会使低优先级队列里的数据包得不到服务,这就造成了“队列饥饿”。In the PQ scheduling process, the scheduling will be performed in strict accordance with the order of the priority of the queue. Only after all the packets in the high-priority queue are scheduled, the low-priority queue has a scheduling opportunity. If there are data packets in the high-priority queue, the data packets in the high-priority queue are processed first. Until the high-priority queue is empty, the next priority queue will be processed, and the data packets in it will be processed and the high-priority queue will be checked. Whether the high-priority queue is empty, if the high-priority queue is empty, continue to process the priority queue, if there are data packets in the high-priority queue, then switch to the high-priority queue. Therefore, packets in the low-priority queue can only be processed when all queues with a priority higher than themselves are empty. When there are too many packets in the higher priority queue, the packets in the lower priority queue will not be served, which causes "queue starvation".
由此可以看出,采用PQ调度方式,可以将延迟敏感的关键业务放入高优先级队列,将非关键业务放入低优先级队列,从而确保关键业务被优先转发。因此,在上述PQ调度过程中,优先将混合信用报文中的主动拥塞控制协议信用报文转发出去,以保证对下一时刻主动拥塞控制协议数据报文的带宽预约。It can be seen from this that by adopting the PQ scheduling method, delay-sensitive key services can be placed in a high-priority queue, and non-critical services can be placed in a low-priority queue, thereby ensuring that key services are forwarded preferentially. Therefore, in the above-mentioned PQ scheduling process, the active congestion control protocol credit message in the hybrid credit message is forwarded first to ensure bandwidth reservation for the active congestion control protocol data message at the next moment.
在上述PQ调度过程中,对混合信用报文的调度,相当于告知了发送设备在下一时刻转发设备能够接收的主动拥塞控制协议数据报文的数量,使得发送设备准确获知主动拥塞控制协议所预约到的带宽,以及判断下一时刻可以为后续时刻预约的带宽;此外,相当于为非主动拥塞控制协议数据报文预留了在下一时刻的可用带宽,使得非主动拥塞控制协议 数据报文可以与主动拥塞控制协议数据报文共享带宽。In the above-mentioned PQ scheduling process, the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the active congestion control protocol reservations The bandwidth reached, and the bandwidth that can be reserved for subsequent moments at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for non-active congestion control protocol data messages, so that non-active congestion control protocol data messages can be Share bandwidth with active congestion control protocol data messages.
当只接收到非主动拥塞控制协议数据报文和主动拥塞控制协议信用报文时,执行上述生成虚拟信用报文、WFQ调度的步骤后,在PQ调度过程中,优先调度混合信用报文,当混合信用报文所在的次高优先级队列没有数据包的时候,再调度非主动拥塞控制协议数据报文。此时,不存在主动拥塞控制协议数据报文。When only non-active congestion control protocol data messages and active congestion control protocol credit messages are received, after performing the above steps of generating virtual credit messages and WFQ scheduling, in the PQ scheduling process, priority is given to scheduling hybrid credit messages. When there is no data packet in the second-highest priority queue where the hybrid credit message is located, the inactive congestion control protocol data message is then scheduled. At this time, there is no active congestion control protocol data message.
T0时刻转发设备400没有接收到任何主动拥塞控制协议数据报文,因此,在进行PQ调度时,优先调度报文440,当报文440所在的次高优先级队列为空的时候,转而调度低优先级的报文330。At time T0, the forwarding device 400 does not receive any active congestion control protocol data messages. Therefore, when performing PQ scheduling, the message 440 is scheduled first, and when the second-highest priority queue where the message 440 is located is empty, it will be scheduled instead. A low-priority message 330.
可选地,当进行完上述两级调度后,转发设备400丢弃所有报文430,以释放其所占的存储空间。Optionally, after the foregoing two-level scheduling is performed, the forwarding device 400 discards all the packets 430 to release the storage space occupied by the forwarding device 400.
需要说明的是,在调度过程中也可以丢弃不符合调度策略的部分报文430。此外,还可以在执行完第一级QoS调度时丢弃报文430,又可以在所有调度都结束后,丢弃报文430,在此不再赘述。It should be noted that in the scheduling process, some packets 430 that do not conform to the scheduling policy may also be discarded. In addition, the message 430 may be discarded when the first-level QoS scheduling is performed, and the message 430 may be discarded after all the scheduling is completed, which will not be repeated here.
T0时刻并不存在主动拥塞控制协议数据报文的传输需求,因此,在图3至图5所示调度过程中,通过生成非主动拥塞控制协议数据报文所对应的虚拟信用报文,以及对虚拟信用报文和主动拥塞控制协议信用报文的权重分配,使得非主动拥塞控制协议数据报文能与主动拥塞控制协议数据报文竞争带宽,即能够为非主动拥塞控制协议数据报文预留一定的带宽。而通过对混合信用报文和非主动拥塞控制协议数据报文的优先级队列调度,使得在T0时刻能够将接收到的非主动拥塞控制协议数据报文最大程度地转发出去,提高了带宽的利用率。There is no transmission demand for active congestion control protocol data messages at T0. Therefore, in the scheduling process shown in Figures 3 to 5, virtual credit messages corresponding to non-active congestion control protocol data messages are generated, and The weight distribution of virtual credit messages and active congestion control protocol credit messages enables non-active congestion control protocol data messages to compete with active congestion control protocol data messages for bandwidth, that is, they can be reserved for non-active congestion control protocol data messages A certain bandwidth. And through the priority queue scheduling of mixed credit messages and non-active congestion control protocol data messages, the received non-active congestion control protocol data messages can be forwarded to the greatest extent at T0, which improves bandwidth utilization rate.
T0时刻的报文310在经过调度后,会由转发设备400将经过调度的部分或全部报文310转发给目的设备,再由目的设备返回给发送设备300,用于触发相应量的主动拥塞控制协议数据报文。例如,经过1个RTT返回发送设备300。After the packet 310 at time T0 is scheduled, the forwarding device 400 forwards some or all of the scheduled packets 310 to the destination device, and then the destination device returns to the sending device 300 to trigger a corresponding amount of active congestion control Protocol data message. For example, it returns to the sending device 300 after 1 RTT.
下面结合图6和图7对T1时刻的调度报文的方法进行介绍。The method for scheduling messages at time T1 will be introduced below in conjunction with FIG. 6 and FIG. 7.
在图6和图7中出现的与图3中相同名称和编号的元素的含义也相同,因此不再赘述,图6和图7中的报文320是指主动拥塞控制协议数据报文,由主动拥塞控制协议信用报文(即报文310)触发发送。The elements with the same names and numbers appearing in Figure 6 and Figure 7 have the same meaning as those in Figure 3, so they will not be repeated. The message 320 in Figure 6 and Figure 7 refers to the active congestion control protocol data message, which is determined by The active congestion control protocol credit message (ie message 310) triggers the sending.
图6是本申请实施例提供的T1时刻调度报文的方法的示意图。FIG. 6 is a schematic diagram of a method for scheduling packets at time T1 provided by an embodiment of the present application.
发送设备300向转发设备400发送报文310、报文320和报文330,其中报文320由T0时刻的报文310触发发送。The sending device 300 sends a message 310, a message 320, and a message 330 to the forwarding device 400, where the message 320 is triggered to be sent by the message 310 at time T0.
需要说明的是,发送报文310、报文320和报文330的发送设备300可以是同一设备,也可以是不同的设备。发送设备300可以是终端设备、主机、服务器等能够发送报文的设备。It should be noted that the sending device 300 that sends the message 310, the message 320, and the message 330 may be the same device or different devices. The sending device 300 may be a device capable of sending messages, such as a terminal device, a host, or a server.
在T1时刻,转发设备400接收到来自于发送设备300的报文330、报文310,以及由T0时刻经过调度后返回的部分或全部报文310触发的报文320。At time T1, the forwarding device 400 receives the message 330 and the message 310 from the sending device 300, and the message 320 triggered by some or all of the messages 310 returned after scheduling at time T0.
应理解,T1时刻的设置同样不唯一,也可以将发送设备300发送由T0时刻的报文310触发的报文320的时刻设定为T1时刻,在此不再赘述。It should be understood that the setting at time T1 is also not unique, and the time at which the sending device 300 sends the message 320 triggered by the message 310 at time T0 can also be set to time T1, which will not be repeated here.
还应理解,T1时刻也可能不存在报文310,即相当于在T1时刻发送设备300没有为主动拥塞控制协议数据报文预约带宽。It should also be understood that there may be no packet 310 at time T1, which is equivalent to that the sending device 300 does not reserve bandwidth for the active congestion control protocol data packet at time T1.
可选地,当接收到上述报文330和报文310后,转发设备400可以基于T1时刻接收的报文330生成报文430,报文430只在转发设备400内有效,不会发送到网络中。Optionally, after receiving the above-mentioned message 330 and message 310, the forwarding device 400 may generate a message 430 based on the message 330 received at time T1. The message 430 is only valid in the forwarding device 400 and will not be sent to the network. in.
可选地,可以采用图2中步骤202所述方法生成报文430。Optionally, the method described in step 202 in FIG. 2 may be used to generate the message 430.
可选地,转发设备400还可以对上述报文进行QoS调度,该QoS调度可以包括一级或多级调度,当只存在一级QoS调度的时候,与图4所示方法相同,即该一级QoS调度可以是对报文310和报文430之间的调度,以及还可以利用图2中步骤203中所涉及的方法进行该一级QoS调度,为了简洁,不再赘述。Optionally, the forwarding device 400 may also perform QoS scheduling on the above-mentioned message. The QoS scheduling may include one-level or multi-level scheduling. When there is only one-level QoS scheduling, the method is the same as that shown in FIG. The first-level QoS scheduling may be the scheduling between the message 310 and the message 430, and the method involved in step 203 in FIG. 2 may also be used to perform the first-level QoS scheduling. For the sake of brevity, details are not described again.
需要说明的是,由于T1时刻也可以不存在报文310,也就是该时刻不需要为主动拥塞控制协议数据报文预约带宽,则可以不进行第一级QoS调度。或者在这种情况下,如果执行第一级QoS调度,则可以将原报文310可用的所有带宽分配给报文430,相当于报文430占满信用报文可用带宽(此处为两种信用报文的可用带宽)。It should be noted that since the packet 310 may not exist at time T1, that is, there is no need to reserve bandwidth for the active congestion control protocol data packet at this time, and the first-level QoS scheduling may not be performed. Or in this case, if the first-level QoS scheduling is performed, all the bandwidth available to the original message 310 can be allocated to the message 430, which is equivalent to that the message 430 occupies the available bandwidth of the credit message (here there are two types of bandwidth). Available bandwidth for credit messages).
可选地,转发设备400还可以对上述报文进行两级QoS调度,调度过程可以如图7所示。Optionally, the forwarding device 400 may also perform two-level QoS scheduling on the foregoing message, and the scheduling process may be as shown in FIG. 7.
图7是本申请实施例提供的T1时刻的两级QoS调度的方法示意图。下面将结合图7对T1时刻的两级QoS调度进行介绍。FIG. 7 is a schematic diagram of a two-level QoS scheduling method at time T1 provided by an embodiment of the present application. The two-level QoS scheduling at time T1 will be introduced below in conjunction with FIG. 7.
如图7所示,在两级QoS调度中,首先对报文310和报文430进行第一级QoS调度。As shown in FIG. 7, in the two-level QoS scheduling, the first-level QoS scheduling is performed on the message 310 and the message 430 first.
可选地,该第一级QoS调度可以采用图4中所示的一级QoS调度的方法,对T1时刻的报文310和报文430进行调度,例如进行WFQ调度,以及还可以利用图2中步骤203中所涉及的方法进行该一级QoS调度,在此不再重复介绍。Optionally, the first-level QoS scheduling may use the first-level QoS scheduling method shown in FIG. 4 to schedule the packets 310 and 430 at time T1, for example, perform WFQ scheduling, and also use FIG. 2 The method involved in step 203 in step 203 performs the first-level QoS scheduling, and will not be repeated here.
需要说明的是,由于T1时刻也可以不存在报文310,也就是该时刻不需要为主动拥塞控制协议数据报文预约带宽,则可以不进行第一级QoS调度。或者在这种情况下,如果执行第一级QoS调度,则可以将原报文310可用的所有带宽分配给报文430,相当于报文430占满带宽。It should be noted that since the packet 310 may not exist at time T1, that is, there is no need to reserve bandwidth for the active congestion control protocol data packet at this time, and the first-level QoS scheduling may not be performed. Or in this case, if the first-level QoS scheduling is performed, all the bandwidth available to the original message 310 can be allocated to the message 430, which is equivalent to that the message 430 occupies the bandwidth.
可选地,在第一级QoS调度后,可以利用上文所述方法,对报文440进行限速,确定报文440占用的带宽。Optionally, after the first-level QoS scheduling, the method described above can be used to limit the rate of the message 440 and determine the bandwidth occupied by the message 440.
可选地,可以对报文440和报文330进行第二级QoS调度。应理解,还可以利用图2中步骤204中所涉及的根据转发顺序转发各报文的方法进行该第二级QoS调度。Optionally, second-level QoS scheduling may be performed on the message 440 and the message 330. It should be understood that the second-level QoS scheduling can also be performed by using the method of forwarding each message according to the forwarding sequence involved in step 204 in FIG. 2.
需要说明的是,该报文440可以是利用图4所述方法进行调度后的混合信用报文。此外,该报文440也可以是报文310,例如如果在进行第一级QoS调度后丢弃掉报文430,则会使得报文440中只剩下报文310。It should be noted that the message 440 may be a mixed credit message after scheduling using the method described in FIG. 4. In addition, the message 440 may also be the message 310. For example, if the message 430 is discarded after the first-level QoS scheduling is performed, only the message 310 will be left in the message 440.
可选地,第二级QoS调度可以是根据优先级对报文330和报文440进行调度。Optionally, the second-level QoS scheduling may be to schedule the message 330 and the message 440 according to priority.
可选地,第二级QoS调度可以采用PQ调度策略。Optionally, the second-level QoS scheduling can adopt a PQ scheduling strategy.
可选地,可以设定主动拥塞控制协议数据报文为最高优先级,混合信用报文为次高优先级,非主动拥塞控制协议数据报文为低优先级。也就是说,主动拥塞控制协议数据报文的优先级最高;混合信用报文的优先级低于主动拥塞控制协议数据报文,但高于非主动拥塞控制协议数据报文;而非主动拥塞控制协议数据报文的优先级最低。Optionally, it is possible to set the active congestion control protocol data message as the highest priority, the hybrid credit message as the second highest priority, and the non-active congestion control protocol data message as the low priority. In other words, active congestion control protocol data messages have the highest priority; hybrid credit messages have lower priority than active congestion control protocol data messages, but higher than non-active congestion control protocol data messages; not active congestion control The protocol data message has the lowest priority.
需要说明的是,参与第二级QoS调度的可以不是混合信用报文,而是主动拥塞控制协议信用报文,在这种情况下,可以设定主动拥塞控制协议信用报文为次高优先级。It should be noted that the second-level QoS scheduling may not be hybrid credit messages, but active congestion control protocol credit messages. In this case, the active congestion control protocol credit messages can be set as the second highest priority. .
在T1时刻,转发设备接收到报文330、报文310,以及由T0时刻的报文310触发的 报文320。因此,在进行第二级QoS调度时,需要对报文320、报文440和报文330三种报文,根据优先级从高到低的顺序进行PQ调度,其中,可以设定报文320的优先级最高,报文440优先级次之,报文330优先级最低,在此不再赘述。At time T1, the forwarding device receives the message 330, the message 310, and the message 320 triggered by the message 310 at the time T0. Therefore, when performing the second-level QoS scheduling, it is necessary to perform PQ scheduling on three types of messages: message 320, message 440, and message 330 according to the order of priority from high to low. Among them, message 320 can be set. The priority of is the highest, the message 440 has the second priority, and the message 330 has the lowest priority, which will not be repeated here.
也就是说,T1时刻既接收到非主动拥塞控制协议数据报文(报文330)和主动拥塞控制协议信用报文(报文310),又接收到主动拥塞控制协议数据报文(报文320),在PQ调度过程中,优先调度主动拥塞控制协议数据报文,当主动拥塞控制协议数据报文所在的高优先级队列没有数据包的时候,再调度混合信用报文,只有当主动拥塞控制协议数据报文所在的高优先级队列和混合信用报文所在的次高优先级队列都没有数据包的时候,才调度非主动拥塞控制协议数据报文。That is to say, at time T1, both the inactive congestion control protocol data message (message 330) and the active congestion control protocol credit message (message 310) are received, and the active congestion control protocol data message (message 320) is received. ), in the PQ scheduling process, the active congestion control protocol data message is prioritized. When there is no data packet in the high priority queue where the active congestion control protocol data message is located, the mixed credit message is then scheduled, only when the active congestion control The non-active congestion control protocol data message is only scheduled when there are no data packets in the high priority queue where the protocol data message is located and the second highest priority queue where the hybrid credit message is located.
还应理解,当不存在报文310时,则在第二级QoS调度过程中,可以只对高优先级队列的报文320和低优先级队列的报文330进行调度。It should also be understood that when there is no packet 310, in the second-level QoS scheduling process, only the packets 320 in the high priority queue and the packets 330 in the low priority queue may be scheduled.
可选地,当进行完上述调度后,转发设备400可以丢弃所有报文430,以释放其所占的存储空间等资源。Optionally, after the foregoing scheduling is completed, the forwarding device 400 may discard all the packets 430 to release resources such as storage space occupied by the forwarding device 400.
需要说明的是,关于丢弃报文430的操作与上文图2至图5所涉及到的相关内容相似,在此不再赘述。It should be noted that the operation of discarding the message 430 is similar to the related content involved in FIGS. 2 to 5 above, and will not be repeated here.
在上述PQ调度过程中,优先将主动拥塞控制协议数据报文转发出去,以保证主动拥塞控制机制的低时延效果。此外,对混合信用报文的调度,相当于告知了发送设备在下一时刻转发设备能够接收的主动拥塞控制协议数据报文的数量,使得发送设备准确获知主动拥塞控制协议所预约到的带宽,以及判断下一时刻可以预约的带宽;此外,相当于为非主动拥塞控制协议数据报文预留了在下一时刻的可用带宽,使得非主动拥塞控制协议数据报文可以与主动拥塞控制协议数据报文共享带宽。In the above-mentioned PQ scheduling process, the active congestion control protocol data message is forwarded first to ensure the low delay effect of the active congestion control mechanism. In addition, the scheduling of mixed credit messages is equivalent to informing the sending device of the number of active congestion control protocol data messages that the forwarding device can receive at the next moment, so that the sending device can accurately learn the bandwidth reserved by the active congestion control protocol, and Determine the bandwidth that can be reserved at the next moment; in addition, it is equivalent to reserve the available bandwidth at the next moment for the non-active congestion control protocol data message, so that the non-active congestion control protocol data message can be combined with the active congestion control protocol data message Shared bandwidth.
在上述调度过程中,对T1时刻接收到的各类报文进行调度,在保证主动拥塞控制协议数据报文优先传输的前提下,非主动拥塞协议数据报文也能利用T0时刻所竞争得到的带宽进行数据传输,既满足了主动拥塞控制的低时延需求,又使得非主动拥塞控制协议数据报文可以跟主动拥塞控制协议数据报文进行竞争和共享带宽。此外,第二级QoS调度还可以实现,当所接收的非主动拥塞协议数据报文超过了在T0时刻预留的带宽时,能够通过这次调度进行丢弃,保证网络链路的传输性能。In the above scheduling process, all types of messages received at time T1 are scheduled. Under the premise of ensuring the priority transmission of active congestion control protocol data messages, non-active congestion protocol data messages can also be obtained by competition at time T0 Bandwidth for data transmission not only meets the low-latency requirements of active congestion control, but also enables non-active congestion control protocol data messages to compete with and share bandwidth with active congestion control protocol data messages. In addition, the second-level QoS scheduling can also be implemented. When the received inactive congestion protocol data message exceeds the bandwidth reserved at T0, it can be discarded through this scheduling to ensure the transmission performance of the network link.
需要说明的是,在调度报文的调度过程中还存在其他情况,下面继续结合图3和图6举例说明。It should be noted that there are other situations in the scheduling process of scheduling messages, and the following will continue to illustrate with reference to FIG. 3 and FIG. 6 as an example.
例如,当只接收到了报文330时,依然可以通过两级QoS调度,为非主动拥塞控制协议预留下一时刻的带宽,以及将部分或全部报文330转发出去。在这种情况下,在WFQ调度中,因为没有接收到预约带宽的报文310,则报文310的剩余带宽都可以转而分配给报文430,则在下一时刻,报文330的信用报文可用带宽增加了。而在PQ调度中,相当于只有报文440所在的次高优先级队列和报文330所在的低优先级队列中有数据包,而且报文440中只有报文430,所以可以先调度次高优先级对列中的报文440,再调度报文330。For example, when only the message 330 is received, the two-level QoS scheduling can still be used to reserve the next time bandwidth for the inactive congestion control protocol, and to forward some or all of the message 330. In this case, in WFQ scheduling, because the message 310 for the reserved bandwidth is not received, the remaining bandwidth of the message 310 can be transferred to the message 430, and then at the next moment, the credit report of the message 330 The available bandwidth for text has increased. In PQ scheduling, it is equivalent to only the next highest priority queue where the message 440 is located and the low priority queue where the message 330 is located have data packets, and there is only the message 430 in the message 440, so the next highest priority queue can be scheduled first. For the message 440 in the priority pair, the message 330 is then scheduled.
再例如,当只接收到了报文310时,同样可以通过两级QoS调度,为主动拥塞控制协议分配下一时刻的带宽。在这种情况下,在WFQ调度中,因为没有接收到报文330,可以认为暂时不需要进行非主动拥塞控制,则报文430的剩余带宽都可以转而分配给报文310,则在下一时刻,报文320可以使用更大占比的带宽。而在PQ调度中,相当于只有 报文440所在的次高优先级队列中有数据包,且该报文440中只有报文310,所以只需要调度次高优先级队列中的报文440。For another example, when only the message 310 is received, the two-level QoS scheduling can also be used to allocate the bandwidth at the next moment for the active congestion control protocol. In this case, in WFQ scheduling, because the message 330 is not received, it can be considered that inactive congestion control is not needed temporarily, and the remaining bandwidth of the message 430 can be allocated to the message 310. At a moment, the message 320 can use a larger proportion of bandwidth. In PQ scheduling, it is equivalent to that there are only packets in the second-highest priority queue where the message 440 is located, and there is only the message 310 in the message 440, so only the message 440 in the second-highest priority queue needs to be scheduled.
又例如,当只接收到了报文320时,同样可以通过两级QoS调度,将报文320转发出去。在这种情况下,在WFQ调度中,因为没有接收到报文330和报文310,因此不需要生成报文430,所以可以不进行WFQ调度。而在PQ调度中,相当于只有报文320所在的高优先级队列中有数据包,所以只需要调度报文320。这种情况可以出现在,前一时刻(发送用于预约带宽的报文310时)和当前时刻网络中均不存在非主动拥塞控制协议流量。或者,可以出现在不存在非主动拥塞控制协议流量的网络中。For another example, when only the message 320 is received, the message 320 can also be forwarded through two-level QoS scheduling. In this case, in the WFQ scheduling, because the message 330 and the message 310 are not received, there is no need to generate the message 430, so WFQ scheduling may not be performed. In PQ scheduling, it is equivalent to that there are only data packets in the high-priority queue where the message 320 is located, so only the message 320 needs to be scheduled. This situation may occur when there is no non-active congestion control protocol traffic in the network at the previous moment (when the message 310 for bandwidth reservation is sent) and the current moment. Or, it can appear in a network where there is no inactive congestion control protocol traffic.
以上结合图1至图7对本申请实施例的拥塞控制的方法进行了介绍。以下,结合图8至图9对本申请实施例的拥塞控制的装置进行介绍。The congestion control method of the embodiment of the present application is described above in conjunction with FIG. 1 to FIG. 7. Hereinafter, the congestion control apparatus of the embodiment of the present application will be introduced with reference to FIG. 8 to FIG. 9.
图8是本申请实施例提供的调度报文的装置的示意性框图。如图8所示,装置800可以对应图2至图7所示方法中的转发设备,也可以是应用于转发设备的芯片或组件,并且,该处理装置800中各模块或单元可以分别用于执行图2至图7中任意方法中转发设备所执行的各动作或处理过程。如图8所示,该处理装置800可以包括:处理单元810和通信单元820。FIG. 8 is a schematic block diagram of an apparatus for scheduling messages provided by an embodiment of the present application. As shown in FIG. 8, the apparatus 800 may correspond to the forwarding device in the methods shown in FIGS. 2 to 7, or may be a chip or component applied to the forwarding device, and each module or unit in the processing apparatus 800 may be used for Perform various actions or processing procedures performed by the forwarding device in any of the methods in FIG. 2 to FIG. 7. As shown in FIG. 8, the processing device 800 may include: a processing unit 810 and a communication unit 820.
处理单元810,用于对接收的报文进行一些操作,以确定向目的设备转发的报文。The processing unit 810 is configured to perform some operations on the received message to determine the message to be forwarded to the destination device.
例如,处理单元810可以用于根据接收的非主动拥塞控制协议数据报文,生成对应的虚拟信用报文。处理单元810还可以用于对主动拥塞控制协议信用报文和虚拟信用报文分配权重,以及还可以根据该权重对接收的主动拥塞控制协议信用报文和根据接收的非主动拥塞控制协议数据报文生成的虚拟信用报文进行调度,以实现带宽分配等。For example, the processing unit 810 may be configured to generate a corresponding virtual credit message according to the received inactive congestion control protocol data message. The processing unit 810 can also be used to assign weights to active congestion control protocol credit messages and virtual credit messages, and can also assign weights to received active congestion control protocol credit messages and non-active congestion control protocol data messages according to the weights. The virtual credit message generated by the document is scheduled to realize bandwidth allocation and so on.
应理解,处理单元810可以用于执行上文方法实施例中的相应操作,以实现上述方法实施例相应的功能,为了简洁,在此不再赘述。It should be understood that the processing unit 810 may be configured to perform the corresponding operations in the above method embodiments to realize the corresponding functions of the above method embodiments. For brevity, details are not described herein again.
通信单元820,用于接收和发送报文。例如,用于接收来自于发送设备的多个报文,所接收的多个报文可以包括主动拥塞控制协议流量和非主动拥塞控制协议流量所涉及的报文,还用于向目的设备发送报文,例如用于转发部分或全部上述来自于发送设备的多个报文。The communication unit 820 is used to receive and send messages. For example, it is used to receive multiple packets from a sending device, and the multiple received packets may include packets related to active congestion control protocol traffic and non-active congestion control protocol traffic, and are also used to send packets to the destination device. The message, for example, is used to forward some or all of the above multiple messages from the sending device.
应理解,通信单元820可以用于接收报文,还可以用于根据处理单元810的调度结果,转发相应的报文给目的设备,以实现上述方法实施例相应的功能,为了简洁,在此不再赘述。It should be understood that the communication unit 820 can be used to receive packets, and can also be used to forward corresponding packets to the destination device according to the scheduling result of the processing unit 810, so as to implement the corresponding functions of the foregoing method embodiments. Go into details again.
例如,该处理单元810可以用于执行图2所示方法中的步骤202、203,该通信单元820可以用于执行图2所示方法中的步骤201、204,各单元执行上述相应步骤的过程在上文中已经进行了介绍,为了简洁,在此不再赘述。For example, the processing unit 810 can be used to perform steps 202 and 203 in the method shown in FIG. 2, and the communication unit 820 can be used to perform steps 201 and 204 in the method shown in FIG. It has been introduced above, for the sake of brevity, I will not repeat it here.
图9是本申请实施例提供的转发设备的结构示意图。如图9所示,该转发设备900包括处理器910和收发器920。可选地,该转发设备900还包括存储器930。其中,处理器910、收发器920和存储器930之间通过内部连接通路互相通信,传递控制和/或数据信号,该存储器930用于存储计算机程序,该处理器910用于从该存储器930中调用并运行该计算机程序,以控制该收发器920收发信号。FIG. 9 is a schematic structural diagram of a forwarding device provided by an embodiment of the present application. As shown in FIG. 9, the forwarding device 900 includes a processor 910 and a transceiver 920. Optionally, the forwarding device 900 further includes a memory 930. Among them, the processor 910, the transceiver 920 and the memory 930 communicate with each other through internal connection paths to transfer control and/or data signals. The memory 930 is used to store computer programs, and the processor 910 is used to call from the memory 930. And run the computer program to control the transceiver 920 to send and receive signals.
上述处理器910和存储器930可以合成一个处理装置,处理器910用于执行存储器930中存储的程序代码来实现上述方法实施例中转发设备的功能。具体实现时,该存储器 930也可以集成在处理器910中,或者独立于处理器910。收发器920可以通过收发电路的方式来实现。The foregoing processor 910 and the memory 930 may be combined into one processing device, and the processor 910 is configured to execute the program code stored in the memory 930 to implement the function of the forwarding device in the foregoing method embodiment. During specific implementation, the memory 930 may also be integrated in the processor 910 or independent of the processor 910. The transceiver 920 may be implemented by a transceiver circuit.
上述转发设备还可以包括通信接口940,用于将收发器920输出的报文转发出去,或者接收后的报文发送给收发器920进一步处理。The foregoing forwarding device may further include a communication interface 940 for forwarding the message output by the transceiver 920, or sending the received message to the transceiver 920 for further processing.
应理解,该处理装置900可对应于根据本申请图2至图7所示方法实施例中的转发设备,该处理装置900也可以是应用于转发设备的芯片或组件。并且,该处理装置900中的各模块实现图2至图7中的相应流程。例如,该存储器980可以用于存储程序代码,使得处理器910在执行该程序代码时,控制该处理器910用于执行图2所示方法中的步骤202、203,该收发器920用于执行图2所示方法中的步骤201、204,各单元执行上述相应步骤的过程在上文中已经进行了介绍,为了简洁,在此不再赘述。It should be understood that the processing device 900 may correspond to the forwarding device in the method embodiments shown in FIG. 2 to FIG. 7 according to the present application, and the processing device 900 may also be a chip or component applied to the forwarding device. Moreover, each module in the processing device 900 implements the corresponding processes in FIG. 2 to FIG. 7. For example, the memory 980 may be used to store program code, so that when the processor 910 executes the program code, the processor 910 is used to execute steps 202 and 203 in the method shown in FIG. 2, and the transceiver 920 is used to execute In the steps 201 and 204 in the method shown in FIG. 2, the process of each unit performing the above-mentioned corresponding steps has been introduced above, and for the sake of brevity, it will not be repeated here.
可选的,上述各装置实施例中的存储器与存储器可以是物理上相互独立的单元,或者,存储器也可以和处理器集成在一起。Optionally, the memory and the memory in the foregoing device embodiments may be physically independent units, or the memory may also be integrated with the processor.
此外,本申请还提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机指令,当计算机指令在计算机上运行时,使得计算机执行本申请提供的调度报文的方法中由转发设备执行的操作和/或处理。In addition, this application also provides a computer-readable storage medium. The computer-readable storage medium stores computer instructions. When the computer instructions run on the computer, the computer executes the method for dispatching messages provided in this application by the forwarding device. Operations and/or processing performed.
本申请还提供一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行本申请提供的调度报文的方法中由转发设备执行的操作和/或处理。This application also provides a computer program product. The computer program product includes computer program code. When the computer program code runs on a computer, the computer executes the operations and/or operations performed by the forwarding device in the method for scheduling messages provided in this application. deal with.
本申请还提供一种装置,包括处理器和接口电路,所述接口电路用于接收计算机代码或指令,并传输至所述处理器,所述处理器用于运行所述计算机代码或指令,以执行本申请提供的调度报文的方法中由转发设备执行的操作和/或处理。The present application also provides a device, including a processor and an interface circuit, the interface circuit is used to receive computer code or instructions, and transmit to the processor, the processor is used to run the computer code or instructions to execute The operation and/or processing performed by the forwarding device in the method for scheduling messages provided in this application.
本申请还提供一种芯片,所述芯片包括一个或多个处理器。所述一个或多个处理器用于执行存储器中存储的计算机程序,以执行任意一个方法实施例中由转发设备执行的操作和/或处理。其中,所述用于存储计算机程序的存储器独立于所述芯片之外而设置。The application also provides a chip including one or more processors. The one or more processors are used to execute a computer program stored in the memory to execute operations and/or processing performed by the forwarding device in any method embodiment. Wherein, the memory used for storing the computer program is provided independently of the chip.
进一步地,所述芯片还可以包括一个或多个通信接口。所述一个或多个通信接口可以是输入/输出接口,输入/输出电路等。进一步地,所述芯片还可以包括一个或多个所述存储器。Further, the chip may also include one or more communication interfaces. The one or more communication interfaces may be input/output interfaces, input/output circuits, and the like. Further, the chip may also include one or more of the memories.
本申请还提供一种通信系统,该通信系统包括至少一个本申请实施例中的转发设备,还包括至少一个发送设备和至少一个目的设备。在该通信系统中,该至少一个转发设备能够执行本申请提供的调度报文的方法中由转发设备执行的操作和/或处理,该至少一个发送设备和该至少一个目的设备,可以是本申请实施例所述任意一种能够发送和/或接收报文的设备。应理解,发送设备和目的设备可以是同一种设备,也可以是不同种类的设备。The present application also provides a communication system, which includes at least one forwarding device in an embodiment of the present application, and also includes at least one sending device and at least one destination device. In the communication system, the at least one forwarding device can perform the operations and/or processing performed by the forwarding device in the method for scheduling messages provided in this application, and the at least one sending device and the at least one destination device may be Any device capable of sending and/or receiving messages described in the embodiments. It should be understood that the sending device and the destination device may be the same device or different types of devices.
可选地,该至少一个转发设备还可以是图9所示转发设备,也可以是包括图8所示调度报文的装置的设备。Optionally, the at least one forwarding device may also be the forwarding device shown in FIG. 9 or a device including the device for scheduling messages shown in FIG. 8.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者转发设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a forwarding device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (read-only memory, ROM), random access memory (random access memory, RAM), magnetic disks or optical disks and other media that can store program codes. .
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application, but the protection scope of this application is not limited to this. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application. Should be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (19)

  1. 一种调度报文的方法,其特征在于,包括:A method for scheduling messages, characterized in that it comprises:
    接收来自于发送设备的多个报文,所述多个报文包括N个主动拥塞控制协议信用报文和M个非主动拥塞控制协议数据报文,其中,M、N为大于或等于1的整数;Receive multiple messages from the sending device, the multiple messages including N active congestion control protocol credit messages and M non-active congestion control protocol data messages, where M and N are greater than or equal to 1 Integer
    确定与所述M个非主动拥塞控制协议数据报文对应的P个虚拟信用报文,其中,P为大于或等于1的整数;Determine P virtual credit messages corresponding to the M inactive congestion control protocol data messages, where P is an integer greater than or equal to 1;
    根据信用报文可用带宽、所述N个主动拥塞控制协议信用报文与所述P个虚拟信用报文,从所述N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文,其中,K为大于或等于1且小于或等于N的整数;According to the available bandwidth of credit messages, the N active congestion control protocol credit messages and the P virtual credit messages, determine K active congestion control protocol credit messages from the N active congestion control protocol credit messages Text, where K is an integer greater than or equal to 1 and less than or equal to N;
    转发所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部。Forward all of the K active congestion control protocol credit messages and part or all of the M non-active congestion control protocol data messages.
  2. 如权利要求1所述的方法,其特征在于,所述根据信用报文可用带宽、所述N个主动拥塞控制协议信用报文与所述P个虚拟信用报文,从所述N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文,包括:The method according to claim 1, characterized in that, according to the available bandwidth of credit messages, the N active congestion control protocol credit messages and the P virtual credit messages, from the N active congestion K proactive congestion control protocol credit messages are determined in the control protocol credit messages, including:
    根据所述信用报文可用带宽、所述主动拥塞控制协议信用报文的权重与所述虚拟信用报文的权重,对所述N个主动拥塞控制协议信用报文和所述P个虚拟信用报文进行加权公平队列WFQ调度,根据所述WFQ调度的调度结果,从所述N个主动拥塞控制协议信用报文中确定所述K个主动拥塞控制协议信用报文。According to the available bandwidth of the credit message, the weight of the active congestion control protocol credit message, and the weight of the virtual credit message, the N active congestion control protocol credit messages and the P virtual credit messages The text performs weighted fair queue WFQ scheduling, and according to the scheduling result of the WFQ scheduling, the K active congestion control protocol credit messages are determined from the N active congestion control protocol credit messages.
  3. 如权利要求1或2所述的方法,其特征在于,在所述根据信用报文可用带宽、所述N个主动拥塞控制协议信用报文与所述P个虚拟信用报文,从所述N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文之前,所述方法还包括:The method according to claim 1 or 2, characterized in that, according to the available bandwidth of the credit message, the N active congestion control protocol credit messages and the P virtual credit messages, the N Before determining K active congestion control protocol credit messages in the active congestion control protocol credit messages, the method further includes:
    根据网络总带宽、主动拥塞控制协议数据报文与主动拥塞控制协议信用报文的对应关系,以及虚拟信用报文与非主动拥塞控制协议数据报文的对应关系,确定所述信用报文可用带宽。Determine the available bandwidth of the credit message according to the total network bandwidth, the correspondence between the active congestion control protocol data message and the active congestion control protocol credit message, and the correspondence between the virtual credit message and the non-active congestion control protocol data message .
  4. 如权利要求1至3中任一项所述的方法,其特征在于,所述多个报文还包括Q个主动拥塞控制协议数据报文,其中,Q为大于或等于1的整数,所述方法还包括:The method according to any one of claims 1 to 3, wherein the multiple messages further comprise Q active congestion control protocol data messages, wherein Q is an integer greater than or equal to 1, and the Methods also include:
    确定所述Q个主动拥塞控制协议数据报文、所述K个主动拥塞控制协议信用报文和所述M个非主动拥塞控制协议数据报文的转发顺序;Determining the forwarding sequence of the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and the M non-active congestion control protocol data messages;
    所述转发所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部,包括:The forwarding all of the K active congestion control protocol credit messages and part or all of the M non-active congestion control protocol data messages includes:
    根据所述转发顺序,转发所述Q个主动拥塞控制协议数据报文的部分或全部、所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部。According to the forwarding sequence, forward part or all of the Q active congestion control protocol data messages, all of the K active congestion control protocol credit messages, and the M non-active congestion control protocol data messages Part or all.
  5. 如权利要求4所述的方法,其特征在于,所述确定所述Q个主动拥塞控制协议数据报文、所述K个主动拥塞控制协议信用报文和所述M个非主动拥塞控制协议数据报文的转发顺序,包括:The method according to claim 4, wherein said determining said Q active congestion control protocol data messages, said K active congestion control protocol credit messages and said M non-active congestion control protocol data The packet forwarding sequence includes:
    根据主动拥塞控制协议数据报文的优先级、主动拥塞控制协议信用报文的优先级和非主动拥塞控制协议数据报文的优先级,确定所述转发顺序。The forwarding sequence is determined according to the priority of the active congestion control protocol data message, the priority of the active congestion control protocol credit message, and the priority of the non-active congestion control protocol data message.
  6. 如权利要求4或5所述的方法,其特征在于,当所述转发顺序为先转发所述Q个主动拥塞控制协议数据报文,再转发所述K个主动拥塞控制协议信用报文,最后转发所述M个非主动拥塞控制协议数据报文时,所述根据所述转发顺序,转发所述Q个主动拥塞控制协议数据报文的部分或全部、所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部,包括:The method according to claim 4 or 5, wherein when the forwarding sequence is to forward the Q active congestion control protocol data messages first, then forward the K active congestion control protocol credit messages, and finally When forwarding the M inactive congestion control protocol data messages, the forwarding part or all of the Q active congestion control protocol data messages and the K active congestion control protocol credit messages according to the forwarding sequence All of the message and part or all of the M non-active congestion control protocol data messages, including:
    转发所述Q个主动拥塞控制协议数据报文;Forward the Q active congestion control protocol data messages;
    转发所述K个主动拥塞控制协议信用报文;Forward the K active congestion control protocol credit messages;
    确定网络总带宽的剩余带宽;Determine the remaining bandwidth of the total network bandwidth;
    如果所述剩余带宽大于或等于所述M个非主动拥塞控制协议数据报文占用的带宽,则转发所述M个非主动拥塞控制协议数据报文;If the remaining bandwidth is greater than or equal to the bandwidth occupied by the M inactive congestion control protocol data messages, forward the M inactive congestion control protocol data messages;
    如果所述剩余带宽小于所述M个非主动拥塞控制协议数据报文占用的带宽,则转发所述M个非主动拥塞控制协议数据报文中的T个非主动拥塞控制协议数据报文,其中,所述T个非主动拥塞控制协议数据报文占用的带宽小于所述剩余带宽,T为大于或等于1且小于M的整数。If the remaining bandwidth is less than the bandwidth occupied by the M inactive congestion control protocol data messages, forward the T inactive congestion control protocol data messages among the M inactive congestion control protocol data messages, where , The bandwidth occupied by the T inactive congestion control protocol data messages is less than the remaining bandwidth, and T is an integer greater than or equal to 1 and less than M.
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括,丢弃所述P个虚拟信用报文。8. The method according to any one of claims 1 to 6, wherein the method further comprises discarding the P virtual credit messages.
  8. 如权利要求1至7中任一项所述的方法,其特征在于,所述虚拟信用报文采用IP数据包格式封装,所述虚拟信用报文的网络协议IP头中的除协议字段以外的信息为所述非主动拥塞控制协议数据报文中的IP头的对应信息,所述虚拟信用报文的IP头中的所述协议字段为用户数据报协议UDP的协议号;The method according to any one of claims 1 to 7, wherein the virtual credit message is encapsulated in an IP data packet format, and the network protocol IP header of the virtual credit message except for the protocol field The information is the corresponding information of the IP header in the inactive congestion control protocol data message, and the protocol field in the IP header of the virtual credit message is the protocol number of the user datagram protocol UDP;
    所述虚拟信用报文的UDP头中的源端口号为替身控制协议SCP的端口号;The source port number in the UDP header of the virtual credit message is the port number of the avatar control protocol SCP;
    所述虚拟信用报文的UDP头中的目的端口号为所述非主动拥塞控制协议数据报文的目的端口号。The destination port number in the UDP header of the virtual credit message is the destination port number of the inactive congestion control protocol data message.
  9. 一种调度报文的装置,其特征在于,包括:A device for scheduling messages, characterized in that it comprises:
    通信单元,用于接收来自于发送设备的多个报文,所述多个报文包括N个主动拥塞控制协议信用报文和M个被动拥塞控制协议数据报文,其中,M、N为大于或等于1的整数;The communication unit is configured to receive multiple messages from the sending device, the multiple messages including N active congestion control protocol credit messages and M passive congestion control protocol data messages, where M and N are greater than Or an integer equal to 1;
    处理单元,用于确定与所述M个被动拥塞控制协议数据报文对应的P个虚拟信用报文,其中,P为大于或等于1的整数;A processing unit, configured to determine P virtual credit messages corresponding to the M passive congestion control protocol data messages, where P is an integer greater than or equal to 1;
    所述处理单元,还用于根据信用报文可用带宽、所述N个主动拥塞控制协议信用报文与所述P个虚拟信用报文,从所述N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文,其中,K为大于或等于1且小于或等于N的整数;The processing unit is further configured to determine from the N active congestion control protocol credit messages according to the available bandwidth of the credit message, the N active congestion control protocol credit messages, and the P virtual credit messages K active congestion control protocol credit messages, where K is an integer greater than or equal to 1 and less than or equal to N;
    所述通信单元,还用于转发所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部。The communication unit is further configured to forward all of the K active congestion control protocol credit messages and part or all of the M inactive congestion control protocol data messages.
  10. 如权利要求9所述的装置,其特征在于,所述处理单元,具体用于根据所述信用报文可用带宽、所述主动拥塞控制协议信用报文的权重与所述虚拟信用报文的权重,对所述N个主动拥塞控制协议信用报文和所述P个虚拟信用报文进行加权公平队列WFQ调度,根据所述WFQ调度的调度结果,从所述N个主动拥塞控制协议信用报文中确定所述K个主动拥塞控制协议信用报文。The device according to claim 9, wherein the processing unit is specifically configured to determine the available bandwidth of the credit message, the weight of the active congestion control protocol credit message and the weight of the virtual credit message , Performing weighted fair queue WFQ scheduling on the N active congestion control protocol credit messages and the P virtual credit messages, and according to the scheduling result of the WFQ scheduling, from the N active congestion control protocol credit messages Determine the K active congestion control protocol credit messages in.
  11. 如权利要求9或10所述的装置,其特征在于,所述处理单元,还用于在根据所述信用报文可用带宽、所述N个主动拥塞控制协议信用报文与所述P个虚拟信用报文,从所述N个主动拥塞控制协议信用报文中确定K个主动拥塞控制协议信用报文之前,根据网络总带宽、主动拥塞控制协议数据报文与主动拥塞控制协议信用报文的对应关系,以及虚拟信用报文与非主动拥塞控制协议数据报文的对应关系,确定所述信用报文可用带宽。The device according to claim 9 or 10, wherein the processing unit is further configured to perform the processing between the available bandwidth of the credit message, the N active congestion control protocol credit messages and the P virtual Credit message, before determining K active congestion control protocol credit messages from the N active congestion control protocol credit messages, according to the total network bandwidth, active congestion control protocol data messages and active congestion control protocol credit messages The corresponding relationship, and the corresponding relationship between the virtual credit message and the inactive congestion control protocol data message, determine the available bandwidth of the credit message.
  12. 如权利要求9至11中任一项所述的装置,其特征在于,所述多个报文还包括Q个主动拥塞控制协议数据报文,其中,Q为大于或等于1的整数,所述处理单元,还用于确定所述Q个主动拥塞控制协议数据报文、所述K个主动拥塞控制协议信用报文和所述M个非主动拥塞控制协议数据报文的转发顺序;The apparatus according to any one of claims 9 to 11, wherein the multiple messages further comprise Q active congestion control protocol data messages, wherein Q is an integer greater than or equal to 1, and the The processing unit is further configured to determine the forwarding sequence of the Q active congestion control protocol data messages, the K active congestion control protocol credit messages, and the M non-active congestion control protocol data messages;
    所述通信单元,具体用于根据所述转发顺序,转发所述Q个主动拥塞控制协议数据报文的部分或全部、所述K个主动拥塞控制协议信用报文的全部和所述M个非主动拥塞控制协议数据报文的部分或全部。The communication unit is specifically configured to forward part or all of the Q active congestion control protocol data messages, all of the K active congestion control protocol credit messages, and the M non-congestion control protocol data messages according to the forwarding sequence. Part or all of the active congestion control protocol data message.
  13. 如权利要求12所述的装置,其特征在于,所述处理单元,具体用于根据主动拥塞控制协议数据报文的优先级、主动拥塞控制协议信用报文的优先级和非主动拥塞控制协议数据报文的优先级,确定所述转发顺序。The device according to claim 12, wherein the processing unit is specifically configured to respond according to the priority of the active congestion control protocol data message, the priority of the active congestion control protocol credit message, and the non-active congestion control protocol data The priority of the message determines the forwarding sequence.
  14. 如权利要求12或13所述的装置,其特征在于,当所述转发顺序为先转发所述Q个主动拥塞控制协议数据报文,再转发所述K个主动拥塞控制协议信用报文,最后转发所述M个非主动拥塞控制协议数据报文时,所述通信单元,具体用于转发所述Q个主动拥塞控制协议数据报文;The apparatus according to claim 12 or 13, wherein when the forwarding sequence is to forward the Q active congestion control protocol data messages first, then forward the K active congestion control protocol credit messages, and finally When forwarding the M inactive congestion control protocol data messages, the communication unit is specifically configured to forward the Q active congestion control protocol data messages;
    转发所述K个主动拥塞控制协议信用报文;Forward the K active congestion control protocol credit messages;
    确定网络总带宽的剩余带宽;Determine the remaining bandwidth of the total network bandwidth;
    如果所述剩余带宽大于或等于所述M个非主动拥塞控制协议数据报文占用的带宽,则转发所述M个非主动拥塞控制协议数据报文;If the remaining bandwidth is greater than or equal to the bandwidth occupied by the M inactive congestion control protocol data messages, forward the M inactive congestion control protocol data messages;
    如果所述剩余带宽小于所述M个非主动拥塞控制协议数据报文占用的带宽,则转发所述M个非主动拥塞控制协议数据报文中的T个非主动拥塞控制协议数据报文,其中,所述T个非主动拥塞控制协议数据报文占用的带宽小于所述剩余带宽,T为大于或等于1且小于M的整数。If the remaining bandwidth is less than the bandwidth occupied by the M inactive congestion control protocol data messages, forward the T inactive congestion control protocol data messages among the M inactive congestion control protocol data messages, where , The bandwidth occupied by the T inactive congestion control protocol data messages is less than the remaining bandwidth, and T is an integer greater than or equal to 1 and less than M.
  15. 如权利要求9至14中任一项所述的装置,其特征在于,所述处理单元,还用于丢弃所述P个虚拟信用报文。The apparatus according to any one of claims 9 to 14, wherein the processing unit is further configured to discard the P virtual credit messages.
  16. 如权利要求9至14中任一项所述的装置,其特征在于,所述虚拟信用报文采用IP包格式封装,所述虚拟信用报文的网络协议IP头中的除协议字段以外的信息为所述非主动拥塞控制协议数据报文中的IP头的对应信息,所述虚拟信用报文的IP头中的所述协议字段为用户数据报协议UDP的协议号;The device according to any one of claims 9 to 14, wherein the virtual credit message is encapsulated in an IP packet format, and information other than the protocol field in the network protocol IP header of the virtual credit message Is the corresponding information of the IP header in the inactive congestion control protocol data message, and the protocol field in the IP header of the virtual credit message is the protocol number of the user datagram protocol UDP;
    所述虚拟信用报文的UDP头中的源端口号为替身控制协议SCP的端口号;The source port number in the UDP header of the virtual credit message is the port number of the avatar control protocol SCP;
    所述虚拟信用报文的UDP头中的目的端口号为所述非主动拥塞控制协议数据报文的目的端口号。The destination port number in the UDP header of the virtual credit message is the destination port number of the inactive congestion control protocol data message.
  17. 一种转发设备,其特征在于,包括至少一个处理器,所述至少一个处理器与至少一个存储器耦合:A forwarding device, characterized in that it comprises at least one processor, and the at least one processor is coupled with at least one memory:
    所述至少一个处理器,用于执行所述至少一个存储器中存储的计算机程序或指令,以使得所述终端装置执行如权利要求1至8中任一项所述的方法。The at least one processor is configured to execute a computer program or instruction stored in the at least one memory, so that the terminal device executes the method according to any one of claims 1 to 8.
  18. 一种计算机可读存储介质,用于存储计算机指令,当所述计算机指令被执行时,如权利要求1至8中任一项所述的方法被实现。A computer-readable storage medium for storing computer instructions. When the computer instructions are executed, the method according to any one of claims 1 to 8 is implemented.
  19. 一种调度报文的装置,其特征在于,包括处理器和接口电路;A device for scheduling messages, characterized in that it comprises a processor and an interface circuit;
    所述接口电路,用于接收代码或指令并传输至所述处理器;The interface circuit is used to receive codes or instructions and transmit them to the processor;
    所述处理器用于运行所述代码或指令以执行如权利要求1至8中任一项所述方法。The processor is configured to run the code or instruction to execute the method according to any one of claims 1 to 8.
PCT/CN2019/130825 2019-12-31 2019-12-31 Message scheduling method and apparatus WO2021134621A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2019/130825 WO2021134621A1 (en) 2019-12-31 2019-12-31 Message scheduling method and apparatus
CN201980102805.8A CN114788243B (en) 2019-12-31 2019-12-31 Method and device for scheduling message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/130825 WO2021134621A1 (en) 2019-12-31 2019-12-31 Message scheduling method and apparatus

Publications (1)

Publication Number Publication Date
WO2021134621A1 true WO2021134621A1 (en) 2021-07-08

Family

ID=76686855

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130825 WO2021134621A1 (en) 2019-12-31 2019-12-31 Message scheduling method and apparatus

Country Status (2)

Country Link
CN (1) CN114788243B (en)
WO (1) WO2021134621A1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546098A (en) * 2011-12-15 2012-07-04 福建星网锐捷网络有限公司 Data transmission device, method and system
CN102656848A (en) * 2010-11-09 2012-09-05 华为技术有限公司 Method and apparatus for transmitting data packets
WO2013048517A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Credit based power management
US20140307555A1 (en) * 2013-04-15 2014-10-16 International Business Machines Corporation Flow control credits for priority in lossless ethernet
US20160065477A1 (en) * 2014-08-28 2016-03-03 Xpliant, Inc. Phantom queue link level load balancing system, method and device
CN110166366A (en) * 2018-02-14 2019-08-23 华为技术有限公司 Method for controlling network congestion, device and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8804523B2 (en) * 2012-06-21 2014-08-12 Microsoft Corporation Ensuring predictable and quantifiable networking performance
CN105282029B (en) * 2014-06-30 2020-02-07 中兴通讯股份有限公司 Outer label coding method, traffic congestion control method and device
CN107046495B (en) * 2016-02-06 2020-08-18 阿里巴巴集团控股有限公司 Method, device and system for constructing virtual private network
CN109067665B (en) * 2018-09-25 2022-01-11 华为技术有限公司 Congestion control method and network equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102656848A (en) * 2010-11-09 2012-09-05 华为技术有限公司 Method and apparatus for transmitting data packets
WO2013048517A1 (en) * 2011-09-30 2013-04-04 Intel Corporation Credit based power management
CN102546098A (en) * 2011-12-15 2012-07-04 福建星网锐捷网络有限公司 Data transmission device, method and system
US20140307555A1 (en) * 2013-04-15 2014-10-16 International Business Machines Corporation Flow control credits for priority in lossless ethernet
US20160065477A1 (en) * 2014-08-28 2016-03-03 Xpliant, Inc. Phantom queue link level load balancing system, method and device
CN110166366A (en) * 2018-02-14 2019-08-23 华为技术有限公司 Method for controlling network congestion, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHINA UNICOM: "Editorial correction on the numbering of NOTEs in TS 23.203", 3GPP DRAFT; S2-120092, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG2, no. Elbonia; 20120112 - 20120118, 10 January 2012 (2012-01-10), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France, XP050575940 *

Also Published As

Publication number Publication date
CN114788243A (en) 2022-07-22
CN114788243B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
US8169909B2 (en) Optimization of a transfer layer protocol connection
US8170572B2 (en) Methods and apparatus for supporting quality of service in communication systems
US11171862B2 (en) Multi-subflow network transmission method and apparatus
KR20210042963A (en) Data transmission method and device, traffic switching method and device
US20080304416A1 (en) Method and Apparatus for Solving Data Packet Traffic Congestion
CN111432440A (en) Method, device and system for realizing service continuity
US20060291395A1 (en) Packet transmission control method and apparatus
CN110351201A (en) A kind of data processing method and device
WO2021238676A1 (en) Data transmission method and device
CN109842570B (en) Aggregation rate control method, equipment and system
US20220303825A1 (en) Data transmission method and apparatus
WO2022148371A1 (en) Message transmission method and apparatus
CN110944358A (en) Data transmission method and device
Irazabal et al. Dynamic buffer sizing and pacing as enablers of 5G low-latency services
Irazabal et al. Preventing RLC buffer sojourn delays in 5G
Eklund et al. Using multiple paths in SCTP to reduce latency for signaling traffic
US20220103465A1 (en) Multi-Subflow Network Transmission Method and Apparatus
CN112822720B (en) Cross-layer congestion control method based on MAC layer link quality in unmanned aerial vehicle networking technology
CN103858474A (en) Enhanced performance service-based profiling for transport networks
Xia et al. Active queue management with dual virtual proportional integral queues for TCP uplink/downlink fairness in infrastructure WLANs
WO2021134621A1 (en) Message scheduling method and apparatus
Eklund et al. Efficient scheduling to reduce latency for signaling traffic using CMT-SCTP
Zhou et al. Managing background traffic in cellular networks
Seyedzadegan et al. The TCP fairness in WLAN: a review
WO2023193203A1 (en) Time delay control method and apparatus, and communication device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19958178

Country of ref document: EP

Kind code of ref document: A1