WO2024082727A1 - Packet scheduling method, network device, storage medium, and computer program product - Google Patents

Packet scheduling method, network device, storage medium, and computer program product Download PDF

Info

Publication number
WO2024082727A1
WO2024082727A1 PCT/CN2023/107728 CN2023107728W WO2024082727A1 WO 2024082727 A1 WO2024082727 A1 WO 2024082727A1 CN 2023107728 W CN2023107728 W CN 2023107728W WO 2024082727 A1 WO2024082727 A1 WO 2024082727A1
Authority
WO
WIPO (PCT)
Prior art keywords
queue
sending
time
message
countdown time
Prior art date
Application number
PCT/CN2023/107728
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 中兴通讯股份有限公司
Publication of WO2024082727A1 publication Critical patent/WO2024082727A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling

Definitions

  • the embodiments of the present application relate to but are not limited to the field of network technology, and in particular, to a message scheduling method, network equipment, storage medium, and computer program product.
  • the controller will limit the local deadline of each node in the deterministic path, form a local deadline stack with these local deadlines, and carry the local deadline stack in the message, and then require each node to send out the message carrying the local deadline stack of its local deadline when its local deadline is reached.
  • the scheme of carrying the local deadline stack in the message in the related art will meet the deterministic delay requirements, carrying the local deadline stack in the message will increase the complexity of message scheduling.
  • the allocation rules and scheduling algorithms of the forwarding queue (or called the deadline queue) are proposed to reduce the complexity of message scheduling, and at the same time solve the problem of message disorder.
  • this method requires the selection of parameters. If the selected parameters are not appropriate, the results may not meet expectations. Therefore, how to reduce the complexity of message scheduling and solve the problem of message disorder without selecting parameters is a technical problem that needs to be solved urgently.
  • Embodiments of the present application provide a message scheduling method, a network device, a storage medium, and a computer program product.
  • an embodiment of the present application provides a message scheduling method, including: determining an ordered guarantee object to which a target message belongs, the ordered guarantee object being used to store forwarding queue information of a message corresponding to the ordered guarantee object that was most recently cached; obtaining an allowed queuing delay of the target message, the allowed queuing delay being used to characterize the maximum queuing time that the target message waits to be sent in the forwarding queue; determining a preliminary queue based on the allowed queuing delay, the preliminary queue corresponding to a first sending countdown time; scheduling the target message based on the first sending countdown time and the forwarding queue information stored in the ordered guarantee object.
  • an embodiment of the present application further provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the message scheduling method as described in the first aspect above is implemented.
  • an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the message scheduling method described in the first aspect above.
  • the embodiments of the present application further provide a computer program product, including a computer program or a computer instruction, wherein the computer program or the computer instruction is stored in a computer-readable storage medium, and a processor of a computer device receives the computer program or the computer instruction from the computer.
  • the computer-readable storage medium reads the computer program or the computer instruction, and the processor executes the computer program or the computer instruction, so that the computer device executes the message scheduling method described in the first aspect above.
  • FIG1 is a schematic diagram of a network topology for executing a message scheduling method provided by an embodiment of the present application
  • FIG2 is a schematic diagram of a Deadline queue provided in a specific example of the present application.
  • FIG3 is a flow chart of a message scheduling method provided by an embodiment of the present application.
  • FIG4 is a flow chart of a message scheduling method provided by another embodiment of the present application.
  • FIG5 is a flowchart of a specific method of step S130 in FIG3 ;
  • FIG6 is a flowchart of a specific method of step S320 in FIG5 ;
  • FIG. 7 is a flowchart of a specific method of step S110 in FIG. 3 ;
  • FIG8 is a schematic diagram of determining an ordered guarantee object to which a target message belongs provided by a specific example of the present application.
  • FIG9 is a schematic diagram of a message queue provided by a specific example of the present application.
  • FIG. 10 is a schematic diagram of the structure of a network device provided in one embodiment of the present application.
  • the present application provides a message scheduling method, a network device, a storage medium and a computer program product.
  • the ordered guarantee object to which the target message belongs is determined.
  • the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the ordered guarantee object that was cached most recently.
  • the allowed queuing delay of the target message is obtained.
  • the allowed queuing delay is used to characterize the maximum queuing time of the target message waiting to be sent in the forwarding queue.
  • the preliminary selection queue is determined according to the allowed queuing delay.
  • the preliminary selection queue corresponds to a first sending countdown time. Therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored by the ordered guarantee object.
  • the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
  • Figure 1 is a schematic diagram of a network topology for executing a message scheduling method provided by an embodiment of the present application.
  • the network topology includes a first node 110, a second node 120, and a third node 130.
  • a deterministic delay path passing through the second node 120 can be established between the first node 110 and the third node 130.
  • the first node 110, the second node 120, and the third node 130 can all be network devices such as routers or switches, which can forward messages.
  • any node maintains a countdown timer for sending certain specific outbound ports.
  • the forwarding queue (or deadline queue) of the countdown time (CT) and the authorization time (or authorization time (AT)) can be one or more, and can be appropriately set according to the actual application.
  • the deadline queue has the following characteristics:
  • a cyclic timer can be set in the node to decrement the sending countdown time of all deadline queues. That is, every time the cyclic timer times out, the sending countdown time of all deadline queues will be subtracted by the time interval of the cyclic timer. For example, assuming that the time interval of the cyclic timer is 1 ⁇ s, then every time the cyclic timer times out, the countdown time of all deadline queues will be subtracted by 1 ⁇ s.
  • the time interval of the cyclic timer is the step value of the countdown time of the deadline queue.
  • the time interval of the cyclic timer should be fine enough to perceive the difference in delay requirements between messages. For example, if the difference in delay requirements between messages is only a few microseconds, the time interval of the cyclic timer can be 1 microsecond.
  • the initial values of the send countdown time of each deadline queue are staggered, that is, at any time, only one deadline queue's send countdown time decreases to 0.
  • the scheduling priority of the corresponding deadline queue will be set to the highest, so that it will immediately get the opportunity to schedule messages, and will be prohibited from caching new messages.
  • the messages cached in the deadline queue will be immediately sent out from the egress port.
  • the maximum duration allowed for the deadline queue to send messages is the preset authorized sending time.
  • the deadline queue will send all the messages cached in the queue within the authorized sending time. If the messages in the queue are sent and there is still free time for the authorized sending, the messages in other queues with the next highest priority can continue to be scheduled during the free authorized sending time.
  • the deadline queue is allowed to buffer messages.
  • FIG. 2 is a schematic diagram of a deadline queue provided by a specific example.
  • the deadline queue includes queues queue1 to queue7, while the other queues are traditional non-deadline queues.
  • the authorized sending time of each deadline queue is 10 ⁇ s, and each has its countdown time attribute, and the preset maximum countdown time is 60 ⁇ s.
  • the initial values of the sending countdown time of all deadline queues are staggered from each other, for example, the initial value of the sending countdown time of queue queue1 is 60 ⁇ s, the initial value of the sending countdown time of queue queue2 is 50 ⁇ s, the initial value of the sending countdown time of queue queue3 is 40 ⁇ s, and so on.
  • the initial value of the sending countdown time of queue queue7 is 0, that is, queue queue7 has the highest scheduling priority at this time, so queue queue7 will no longer cache new messages and immediately send the messages cached in queue queue7.
  • the sending countdown time of queue 1 decreases to 50 ⁇ s
  • the sending countdown time of queue 2 decreases to 40 ⁇ s
  • the sending countdown time of queue 3 decreases to 30 ⁇ s, etc.
  • the sending countdown time of queue 7 is restored to the maximum countdown time (i.e., 60 ⁇ s)
  • the scheduling priority of queue 7 is no longer the highest level, that is, queue 7 is allowed to cache new messages again, and the sending countdown time of queue 6 becomes 0. Therefore, queue 6 has the highest scheduling priority, that is, during this period, queue 6 is prohibited from caching new messages, and the messages cached in queue 6 are sent immediately.
  • the sending countdown time of each deadline queue is sorted in ascending order. Therefore, the next deadline queue of a deadline queue refers to the next deadline queue with a larger sending countdown time than the deadline queue and adjacent to it. For example, at time T0, the next deadline queue of queue7 is queue6.
  • the sending countdown time of two deadline queues can be compared, and the deadline queue with a smaller sending countdown time value is called the previous deadline queue, and the deadline queue with a larger sending countdown time value is called the next deadline queue.
  • FIG. 1 does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
  • Figure 3 is a flowchart of a message scheduling method provided by an embodiment of the present application.
  • the message scheduling method can be applied to nodes in a network, such as the first node 110 or the second node 120 in the network topology shown in Figure 1.
  • the message scheduling method includes but is not limited to step S110, step S120, step S130 and step S140.
  • Step S110 determining the order guarantee object to which the target message belongs, where the order guarantee object is used to store the forwarding queue information of the message corresponding to the most recently cached order guarantee object.
  • the message corresponding to the cached order guarantee object can be any message.
  • the order guarantee object (OGO) is maintained in advance on the egress port where the queue (such as the candidate queue) is located.
  • the number of the order guarantee objects is unlimited, and the number can be 1 or more. When the number of order guarantee objects is more than one, the forwarding queue information corresponding to different order guarantee objects can be different or the same.
  • the target messages belonging to the same order guarantee object have some common features, such as coming from the same ingress port and/or having the same planned residence time and/or belonging to the same data flow, etc., which are not specifically limited here.
  • the forwarding queue information can record the queue's sending countdown time, the queue number or queue name of the queue, etc., which are not specifically limited here.
  • Step S120 obtaining the allowed queuing delay of the target message, where the allowed queuing delay is used to represent the maximum queuing time length of the target message waiting to be sent in the forwarding queue.
  • the allowed queuing delay can be obtained based on the planned residence time of the message in the current node, plus the accumulated delay deviation of the message in all upstream nodes, and then minus the forwarding delay of the message in the current node, where the planned residence time represents the maximum residence time of the message in the local node. It can be understood that if a message is on the current node If the actual queuing delay is greater than the allowed queuing delay, the message may have a smaller allowed queuing delay on the downstream node; conversely, if the actual queuing delay of a message on the current node is smaller than the allowed queuing delay, the message may have a larger allowed queuing delay on the downstream node.
  • Step S130 determining a preliminary selection queue according to the allowed queuing delay, and the preliminary selection queue corresponds to a first sending countdown time.
  • the preliminary selection queue is also a forwarding queue (i.e., a Deadline queue), and the number of preliminary selection queues can be 1.
  • the first sending countdown time is the sending countdown time of the preliminary selection queue. For the specific description of the sending countdown time, please refer to the relevant description in the above embodiment, which will not be repeated here.
  • Step S140 Schedule the target message according to the first sending countdown time and the forwarding queue information stored in the order guarantee object.
  • step S110 since the ordered guarantee object to which the target message belongs is determined in step S110, it is possible to determine that the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the most recently cached ordered guarantee object, and the first sending countdown time of the preliminary queue is determined in step S130. Therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored in the ordered guarantee object. This eliminates the need to select parameters and can avoid message disorder when the node sends the target message in the same data stream. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
  • the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
  • step S140 is further described.
  • step S140 may include but is not limited to the following steps:
  • the second sending countdown time is compared with the first sending countdown time to obtain a first comparison result.
  • the target message is scheduled according to the first comparison result.
  • the second sending countdown time may be a preset value or a sending countdown time of a candidate queue.
  • the second sending countdown time may be a preset value, which may be 0 ⁇ s, -1 ⁇ s or other values; when the second sending countdown time is the sending countdown time of the candidate queue, the specific description of the second sending countdown time may refer to the relevant description in the above embodiment, which will not be repeated here.
  • the second sending countdown time stored in the order guarantee object can be obtained, and then the second sending countdown time and the first sending countdown time can be compared to obtain a first comparison result, and then the target message is scheduled according to the first comparison result.
  • the embodiments of the present application can reduce the complexity of message scheduling and solve the problem of message disorder without selecting parameters.
  • step S140 is further described.
  • step S140 may include but is not limited to the following steps:
  • the second sending countdown time is obtained according to the forwarding queue information stored in the order guarantee object.
  • the second sending countdown time is compared with the first sending countdown time to obtain a first comparison result.
  • the target message is scheduled according to the first comparison result.
  • obtaining the second sending countdown time based on the forwarding queue information stored in the order guarantee object such as obtaining the second sending countdown time based on the queue number; or obtaining the second sending countdown time based on the queue name; or obtaining the second sending countdown time based on the queue number and the queue name, and no specific restrictions are made here.
  • the order guarantee object to which the target message belongs is in the initial state, that is, the order guarantee object does not store the forwarding queue information of the message corresponding to the cached order guarantee object, the forwarding queue information stored in the order guarantee object is empty, and the second sending countdown obtained at this time is the preset value.
  • queue numbers or queue names correspond to different second sending countdown times. For example, assuming that the second sending countdown time obtained according to queue number queue6 is CT1, and the second sending countdown time obtained according to queue number queue7 is CT2, CT1 and CT2 are not equal.
  • the second sending countdown time can be obtained according to the forwarding queue information stored in the order guarantee object, and then the second sending countdown time is compared with the first sending countdown time to obtain a first comparison result, and then the target message is scheduled according to the first comparison result, without selecting parameters, and it can also avoid the situation that the node sends the target message in the same data stream out of order, and at the same time, it is not necessary to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
  • the sending countdown time of the above-mentioned queue can be an explicitly set attribute of the queue, and the attribute (i.e., the sending countdown time) is presented to the outside during hardware implementation.
  • the sending countdown time of the above-mentioned queue can also be implicitly derived through other information of the queue (such as the queue number, the queue name) combined with the necessary time number (such as the number of time intervals of the cyclic timer experienced within a single authorized sending time), and it is not necessary to present the attribute to the outside during hardware implementation.
  • the sending countdown time is an explicitly set attribute or an attribute implicitly derived through other information of the queue, there is no difference in the first comparison result obtained by comparing the first sending countdown time with the second sending countdown time.
  • an embodiment of the present application further illustrates the step of “scheduling the target message according to the first comparison result”, which may include but is not limited to step S210 and step S220.
  • Step S210 Determine a target forwarding queue according to the first comparison result.
  • the number of target forwarding queues is not limited, and may be one or more, and may be determined according to actual conditions, and no specific limitation is made here.
  • Step S220 Cache the target message to the target forwarding queue, and wait for the target forwarding queue to schedule the target message.
  • the fourth sending countdown time of each target forwarding queue will decrease over time, and the The smaller the value of the fourth sending countdown time is, the higher the scheduling priority of the corresponding target forwarding queue is. In addition, different target forwarding queues have different fourth sending countdown times.
  • the target forwarding queue corresponding to the fourth sending countdown time fails to schedule the target message immediately, that is, waits for the target forwarding queue to schedule the target message; when the fourth sending countdown time decreases to 0, the scheduling priority of the target forwarding queue corresponding to the fourth sending countdown time will be set to the highest.
  • the target forwarding queue can schedule the target message, and the embodiment of the present application does not impose any specific restrictions on this.
  • target forwarding queue A there are two target forwarding queues, namely, target forwarding queue A and target forwarding queue B, and the fourth sending countdown time of target forwarding queue A is first decremented to 0.
  • target forwarding queue A can schedule the target message cached therein.
  • the fourth sending countdown time of target forwarding queue B is decremented to 0, and the fourth sending countdown time of target forwarding queue A is restored to the preset maximum value. At this time, target forwarding queue B can schedule the target message cached therein.
  • the target forwarding queue can be determined according to the first comparison result, the target message is cached in the target forwarding queue, and the target forwarding queue is waited for to schedule the target message, without selecting parameters, and it can also avoid the situation that the node sends the target message in the same data stream out of order, and there is no need to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
  • step S210 is further described.
  • step S210 may include but is not limited to the following steps:
  • the candidate queue is determined as the target forwarding queue.
  • the second sending countdown time is the sending countdown time of the candidate queue.
  • a first comparison result is obtained by comparing the second sending countdown time with the first sending countdown time of the preliminary queue.
  • the candidate queue is determined as the target forwarding queue, so that the target message can be cached to the target forwarding queue in the subsequent steps.
  • the target message is scheduled through the target forwarding queue, which does not require parameter selection and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
  • step S210 is further described.
  • Step S210 may include but is not limited to the following steps:
  • the preliminary selection queue is determined as the target forwarding queue.
  • a first comparison result is obtained by comparing the second sending countdown time with the first sending countdown time of the preliminary selection queue.
  • the candidate queue is determined as the target forwarding queue, so that the target message is cached to the target forwarding queue in the subsequent steps, and the target message is scheduled by the target forwarding queue.
  • step S130 which may include but is not limited to step S310 and step S320 .
  • Step S310 Obtain the authorized sending time and the third sending countdown time of the forwarding queue.
  • the authorized sending time is used to indicate the maximum duration of the forwarding queue to send the message.
  • the authorized sending time reference may be made to the relevant description in the above embodiment, which will not be repeated here.
  • Deadline queues there are multiple forwarding queues (i.e., Deadline queues), and different forwarding queues correspond to different third sending countdown times.
  • the third sending countdown time i.e., the sending countdown time of the Deadline queue
  • Step S320 Determine the preliminary selection queue according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
  • multiple forwarding queues may be provided in the node. Therefore, after executing step S120 to obtain the allowed queuing delay of the target message, and executing step S310 to obtain the authorized sending time and the third sending countdown times of multiple forwarding queues, a preliminary queue may be determined from the multiple forwarding queues according to the authorized sending time, the multiple third sending countdown times, and the allowed queuing delay, so that in subsequent steps, the target forwarding queue may be determined according to the first sending countdown time and the second sending countdown time of the preliminary queue.
  • the target message may be scheduled through the target forwarding queue, without the need to select parameters and the problem of message disorder may be solved. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
  • step S320 which may include but is not limited to step S410 and step S420 .
  • Step S410 Compare the third sending countdown time with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time to obtain a second comparison result.
  • the third sending countdown times of multiple forwarding queues can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues at the same time; or, the third sending countdown times of multiple forwarding queues can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues in an orderly manner.
  • multiple forwarding queues are sorted according to the third sending countdown times of the forwarding queues, and the third sending countdown times of multiple forwarding queues are compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues in turn, and so on. No specific restrictions are made here.
  • Step S420 Determine a preliminary selection queue according to the second comparison result.
  • the third sending countdown time can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time to obtain a second comparison result, and then a preliminary queue is determined based on the second comparison result, so that in subsequent steps, the target forwarding queue can be determined based on the first sending countdown time and the second sending countdown time of the preliminary queue.
  • the target message is scheduled through the target forwarding queue, which does not require the selection of parameters and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message to reduce the complexity of message scheduling.
  • step S410 is further described. There are multiple forwarding queues, different forwarding queues have different third sending countdown times, and different forwarding queues have the same authorized sending time. In this case, step S410 may include but is not limited to the following steps:
  • the allowed queuing delay is compared with the third sending countdown time of each forwarding queue, and the sum of the third sending countdown time corresponding to each forwarding queue and the authorized sending time.
  • Deadline queues when there are multiple forwarding queues (i.e., Deadline queues), and different forwarding queues correspond to different third sending countdown times, and different forwarding queues correspond to the same authorized sending time, the sum of the third sending countdown time and the authorized sending time corresponding to different forwarding queues is different.
  • the third sending countdown time corresponding to each forwarding queue can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of each forwarding queue at the same time; or the third sending countdown time of each forwarding queue can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of each forwarding queue in an orderly manner.
  • multiple forwarding queues are sorted according to the third sending countdown time of the forwarding queue, and the third sending countdown time of multiple forwarding queues are compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of multiple forwarding queues in turn, and so on. No specific restrictions are made here.
  • a plurality of forwarding queues may be provided in the node. Therefore, after executing step S310 to obtain the authorized sending time and the third sending countdown time of the forwarding queue, and executing step S120 to obtain the allowed queuing delay of the target message, the allowed queuing delay may be compared with the third sending countdown time of each forwarding queue and the sum of the third sending countdown time corresponding to each forwarding queue and the authorized sending time.
  • a second comparison result is obtained in which the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, so as to facilitate determining the preliminary selection queue according to the second comparison result in the subsequent steps.
  • step S420 is further described.
  • step S420 may include but is not limited to the following steps:
  • the forwarding queue whose allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time is determined as the preliminary queue.
  • multiple forwarding queues may be provided in the node. Therefore, when the second comparison result is that the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, the forwarding queue whose allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time is determined as the preliminary queue, so that in the subsequent steps, the target forwarding queue is determined according to the first sending countdown time and the second sending countdown time of the preliminary queue.
  • the target message is scheduled through the target forwarding queue, which does not require the selection of parameters and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message to reduce the complexity of message scheduling.
  • the forwarding queue is determined as the primary selection queue, where Q is the allowed queuing delay of the target message. Assume that the preliminary queue is queue-X and the candidate queue corresponding to OGO is queue-Y.
  • the messages in the same queue are scheduled according to the first-in-first-out rule of the queue.
  • the scheduling countdown time of the target forwarding queue is not equal to the scheduling countdown time of the target message, that is, the target message needs to wait longer than the head message to be scheduled.
  • the target message may also be near the head of the target queue, and the allowed queuing delay Q of the target message is much greater than the remaining countdown time of the target queue, that is, the target message only needs to wait for a shorter time to be scheduled.
  • the scheduling mechanism of the Deadline queue has the ability to compensate for delays, and the delay deviation generated at the current node will be compensated at the downstream node.
  • step S110 which may include but is not limited to step S510 and step S520 .
  • Step S510 classify the target message according to a preset granularity to obtain the object to which the target message belongs.
  • the preset granularity can be per "ingress port + planned residence time", per "flow”, per "ingress port”, per "ingress port + flow”, or per "planned residence time”, etc., wherein “flow” refers to data flow.
  • the target messages are classified according to each "ingress port + planned residence time", that is, the target messages from the same ingress port and with the same planned residence time are classified into the same category; similarly, the target messages are classified according to each "flow”, that is, the target messages belonging to the same data flow are classified into the same category; the target messages are classified according to each "ingress port”, that is, the target messages from the same ingress port are classified into the same category; the target messages are classified according to each "ingress port + flow”, that is, the target messages from the same ingress port and belonging to the same data flow are classified into the same category; the target messages are classified according to each "planned residence time", which means that the target messages with the same planned residence time are classified into the same category.
  • the preset granularity can be selected
  • Step S520 Determine the belonging object as the order-guaranteed object to which the target message belongs.
  • the order guarantee object can be used to implement the maintenance of the ingress port value and the planned residence time attribute value.
  • the target message can be classified and processed according to the preset granularity to obtain the belonging object of the target message, and then the belonging object is determined as the ordered guarantee object to which the target message belongs, paving the way for determining the target forwarding queue in the subsequent steps.
  • the message scheduling method may also include but is not limited to the following steps:
  • the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue.
  • the ordered guarantee object to which the target message B belongs can be determined.
  • the candidate queue corresponding to the ordered guarantee object to which the target message B belongs is the target forwarding queue a, that is, the target message B is scheduled according to the second sending countdown time of the ordered guarantee object (before it is reduced to a preset value, it is equal to the fourth sending countdown time corresponding to the target forwarding queue a), the first sending countdown time corresponding to the preliminary queue, and the allowed queuing delay of the target message B.
  • the fourth sending countdown time corresponding to the target forwarding queue can be decremented using a time interval.
  • the forwarding queue information stored in the order guarantee object is cleared, that is, the queue information of the target forwarding queue stored in the order guarantee object is cleared, wherein the queue information includes at least one of a queue number or a queue name.
  • the message scheduling method may also include but is not limited to the following steps:
  • the second sending countdown time in the countdown time field is updated to the fourth sending countdown time corresponding to the target forwarding queue.
  • the value in the countdown time field is decremented using a time interval until the value in the countdown time field reaches a preset value, wherein the time interval is calculated based on the authorized sending time.
  • the value in the countdown time field is decremented using the time interval, that is, whenever the cyclic timer times out, the values stored in all order guarantee objects will be subtracted from the time interval of the cyclic timer.
  • a cyclic timer can be set in the node, and the time interval is the step value used by the cyclic timer to decrease the sending countdown time (such as the first sending countdown time, the second sending countdown time, the third sending countdown time, and the fourth sending countdown time) of all deadline queues (i.e., forwarding queues), and the time interval must be less than or equal to the authorized sending time, and the time interval of the cyclic timer should be set finely enough to perceive the delay requirement difference between messages. For example, if the delay requirement difference between messages is only a few microseconds, the time interval of the cyclic timer can be 1 microsecond.
  • the preset value may be other values of the fourth sending countdown time that is less than or equal to the minimum initial value of all target forwarding queues, such as 0 microseconds or -1 microsecond, etc. No specific limitation is made here.
  • the order guarantee object when the order guarantee object includes a countdown time field for storing the second sending countdown time, after the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, the second sending countdown time in the countdown time field can be updated to the fourth sending countdown time corresponding to the target forwarding queue, and the value in the countdown time field can be decremented using a time interval until the value in the countdown time field is a preset value. That is, the sending countdown time (ie, the second sending countdown time) recorded by the order guarantee object may decrease synchronously with the sending countdown times of other forwarding queues (eg, the third sending countdown time) as time goes by.
  • the sending countdown time ie, the second sending countdown time
  • the second sending countdown time in the countdown time field corresponding to the order guarantee object can also decrease synchronously with the sending countdown time of other forwarding queues over time.
  • the message scheduling method may also include but is not limited to the following steps:
  • the value in the countdown time field of the order guarantee object decreases to a preset value
  • the value in the countdown time field is kept unchanged until the forwarding queue information stored in the order guarantee object is updated again.
  • the preset value is 0 ⁇ s
  • the time interval is 1 ⁇ s
  • the value in the countdown time field is 3 ⁇ s
  • the forwarding queue information stored in the order guarantee object is updated again. If the fourth sending countdown time corresponding to the new target forwarding queue is 4 ⁇ s, then at this time, the value 0 ⁇ s in the countdown time field of the order guarantee object will be updated to 4 ⁇ s. No specific restrictions are made here.
  • the second sending countdown time in the countdown time field corresponding to the order guarantee object decreases to a preset value, all records of the queue can be cleared in the order guarantee object.
  • the following is a specific example to explain in detail how to determine the order guarantee object to which the target message belongs.
  • FIG8 is a schematic diagram of determining the ordered guarantee object to which the target message belongs, provided by a specific example of the present application.
  • ingress ports namely, ingress port 1, ingress port 2, ..., ingress port m, where m is a positive integer, and there is one egress port, wherein the egress port creates different ordered guarantee objects according to the preset granularity of each "ingress port + planned residence time".
  • the target message can be classified and processed according to the ingress port and the planned residence time to obtain the object to which the target message belongs, and the belonging object is determined as the ordered guarantee object to which the target message belongs.
  • each of the above-mentioned order guarantee objects may be a simple register or memory unit allocated on the hardware, and this embodiment does not impose any limitation on this.
  • node R receives a sequence of messages from one of its inbound ports, among which messages P1 to P5 are five messages belonging to the same data stream, and these five messages are sent almost simultaneously at the source end.
  • the time when node R receives message P2 is 1 ⁇ s later than the time when it receives message P1
  • the time when node R receives message P3 is 1 ⁇ s later than the time when it receives message P2
  • the time when node R receives message P4 is 1 ⁇ s later than the time when it receives message P3
  • the time when node R receives message P5 is 1 ⁇ s later than the time when it receives message P4.
  • node R receives messages P1, P2, P3, P4 and P5 in sequence, and the delay between each adjacent message received is 1 ⁇ s. Therefore, at node R, the later received message will have a smaller allowed queuing delay Q.
  • the allowed queuing delay Q of P1 is 25 ⁇ s, that is, P1(25)
  • the allowed queuing delay Q of P2 is 24 ⁇ s, that is, P2(24)
  • the allowed queuing delay Q of P3 is 23 ⁇ s, that is, P3(23)
  • the allowed queuing delay Q of P4 is 22 ⁇ s, that is, P4(22)
  • the allowed queuing delay Q of P5 is 21 ⁇ s, that is, P5(21).
  • the authorized sending time AT of the Deadline queue (i.e., the forwarding queue) maintained by node R is 10 ⁇ s
  • the time interval I used to decrement the sending countdown time CT of the Deadline queue is 1 ⁇ s.
  • node R is at T0
  • message P1 is received at time T0+1 ⁇ s
  • message P2 is received at time T0+1 ⁇ s, and so on.
  • deadline queues set by node R include queue-A, queue-B, and queue-C
  • the CT of queue-A, the CT of queue-B, and the CT of queue-C are 25 ⁇ s, 15 ⁇ s, and 5 ⁇ s respectively.
  • the CT of queue-A, the CT of queue-B, and the CT of queue-C decrease to 24 ⁇ s, 14 ⁇ s, and 4 ⁇ s respectively.
  • the target message can be scheduled according to the first sending countdown time of the preliminary selection queue and the forwarding queue information stored in the order guarantee object.
  • the specific implementation process is as follows:
  • the target message P1 is received, wherein the allowed queuing delay Q of the target message P1 is equal to 25, therefore, the target message P1 can be cached to queue-A (at this time, the third sending countdown time of queue-A is equal to 25).
  • the preliminary selection queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
  • the preliminary selection queue queue-A is determined as the target forwarding queue.
  • the second sending countdown time (i.e. 0) recorded by the order guarantee object is updated to the fourth sending countdown time (i.e. 25) of the target forwarding queue queue-A.
  • the candidate queue corresponding to the order guarantee object is queue-A.
  • the target message P2 is received, wherein the allowed queuing delay Q of the target message P2 is equal to 24. Therefore, the target message P2 can be cached to queue-A (at this time, the third sending countdown time of queue-A is still equal to 25, which is about to jump to 24).
  • the preliminary queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
  • the candidate queue queue-A is determined as the target forwarding queue.
  • the second sending countdown time (i.e. 25) recorded by the order guarantee object is updated to the fourth sending countdown time of the target forwarding queue queue-A (i.e. 25, the same as the second sending countdown time recorded by the previous order guarantee object).
  • the candidate queue corresponding to the order guarantee object is queue-A.
  • the target message P3 is received, wherein the allowed queuing delay Q of the target message P3 is equal to 23, therefore, the target message P3 can be cached to queue-A (at this time, the third sending countdown time of queue-A is still equal to 24, which is about to jump to 23).
  • the preliminary selection queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
  • queue-B is determined as the preliminary selection queue; then, since the second sending countdown time recorded by the order guarantee object is decreased to 24 (not yet jumped to 23), therefore, the first sending countdown time (i.e. 14) of the selected preliminary selection queue queue-B is less than the second sending countdown time recorded by the order guarantee object (i.e. the sending countdown time of the candidate queue queue-A is 24), therefore, the candidate queue queue-A is determined as the target forwarding queue.
  • the second sending countdown time i.e.
  • the candidate queue corresponding to the order guarantee object is queue-A.
  • the target message P4 will also be cached in queue-A; at the time close to T0+4 ⁇ s, the target message P5 will also be cached in queue-A. In order to avoid redundancy, it will not be repeated here. That is, node R can send messages P1 to P5 belonging to the same data flow in order.
  • an embodiment of the present application further provides a network device, wherein the network device 200 includes a memory 202 , a processor 201 , and a computer program stored in the memory 202 and executable on the processor 201 .
  • the processor 201 and the memory 202 may be connected via a bus or other means.
  • the memory 202 can be used to store non-transitory software programs and non-transitory computer executable programs.
  • the memory 202 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device.
  • the memory 202 may optionally include a memory remotely arranged relative to the processor 201, and these remote memories may be connected to the processor 201 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the network device 200 in this embodiment can be applied as any node in the embodiment shown in Figure 1.
  • the network device 200 in this embodiment can constitute a part of the network topology in the embodiment shown in Figure 1.
  • the non-transient software programs and instructions required to implement the message scheduling method of the above embodiment are stored in the memory 202.
  • the message scheduling method in the above embodiment is executed, for example, the method steps S110 to S140 in Figure 3, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7 described above are executed.
  • the device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by a processor in the above-mentioned device embodiment, so that the above-mentioned processor can execute the message scheduling method in the above-mentioned embodiment, for example, execute the method steps S110 to S140 in Figure 3 described above, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7.
  • an embodiment of the present application also provides a computer program product, including a computer program or computer instructions, the computer program or computer instructions are stored in a computer-readable storage medium, the processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the message scheduling method in the above embodiment, for example, executes the method steps S110 to S140 in Figure 3, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7 described above.
  • the embodiment of the present application includes: firstly determining the ordered guarantee object to which the target message belongs, the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the ordered guarantee object cached most recently, then obtaining the allowed queuing delay of the target message, the allowed queuing delay is used to characterize the maximum queuing time of the target message waiting to be sent in the forwarding queue, determining the preliminary selection queue according to the allowed queuing delay, the preliminary selection queue corresponds to a first sending countdown time, therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored by the ordered guarantee object, without selecting parameters, and can also avoid the situation that the node sends the target message in the same data stream out of order, and at the same time, there is no need to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
  • computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data).
  • Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Landscapes

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

Abstract

The present application provides a packet scheduling method, a network device, a storage medium, and a computer program product. The method comprises: determining an ordering guarantee object to which a target packet belongs, the ordering guarantee object being used for storing forwarding queue information of latest cached packets corresponding to the ordering guarantee object (S110); acquiring an allowed queuing delay of the target packet, the allowed queuing delay being used for representing the maximum queuing duration for the target packet waiting to be sent in a forwarding queue (S120); determining an initially selected queue according to the allowed queuing delay, the initially selected queue corresponding to a first sending countdown time (S130); and scheduling the target packet according to the first sending countdown time and the forwarding queue information stored in the ordering guarantee object (S140).

Description

报文调度方法、网络设备、存储介质及计算机程序产品Message scheduling method, network device, storage medium and computer program product
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请基于申请号为202211289451.2、申请日为2022年10月20日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on the Chinese patent application with application number 202211289451.2 and application date October 20, 2022, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference.
技术领域Technical Field
本申请实施例涉及但不限于网络技术领域,尤其涉及一种报文调度方法、网络设备、存储介质及计算机程序产品。The embodiments of the present application relate to but are not limited to the field of network technology, and in particular, to a message scheduling method, network equipment, storage medium, and computer program product.
背景技术Background technique
相关技术中,控制器会限定确定性路径中每个节点的本地截止时间,将这些本地截止时间形成一个本地截止时间堆栈,并将该本地截止时间堆栈携带于报文中,然后要求每个节点在达到其本地截止时间时把携带有其本地截止时间的本地截止时间堆栈的报文发送出去。虽然相关技术中的在报文中携带本地截止时间堆栈的方案会满足确定性的时延要求,但是在报文中携带本地截止时间堆栈,会提高报文调度的复杂度。为此,相关技术中,又提出了转发队列(或者称为Deadline队列)的分配规则和调度算法以降低报文调度的复杂度,同时能够解决报文乱序的问题,然而该方法需要选择参数,若选择的参数不合适,可能会导致结果不符合期望。因此,如何在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题,是亟待解决的技术问题。In the related art, the controller will limit the local deadline of each node in the deterministic path, form a local deadline stack with these local deadlines, and carry the local deadline stack in the message, and then require each node to send out the message carrying the local deadline stack of its local deadline when its local deadline is reached. Although the scheme of carrying the local deadline stack in the message in the related art will meet the deterministic delay requirements, carrying the local deadline stack in the message will increase the complexity of message scheduling. For this reason, in the related art, the allocation rules and scheduling algorithms of the forwarding queue (or called the deadline queue) are proposed to reduce the complexity of message scheduling, and at the same time solve the problem of message disorder. However, this method requires the selection of parameters. If the selected parameters are not appropriate, the results may not meet expectations. Therefore, how to reduce the complexity of message scheduling and solve the problem of message disorder without selecting parameters is a technical problem that needs to be solved urgently.
发明内容Summary of the invention
本申请实施例提供了一种报文调度方法、网络设备、存储介质及计算机程序产品。Embodiments of the present application provide a message scheduling method, a network device, a storage medium, and a computer program product.
第一方面,本申请实施例提供了一种报文调度方法,包括:确定目标报文所属的有序保证对象,所述有序保证对象用于存储最近一次缓存所述有序保证对象所对应的报文的转发队列信息;获取所述目标报文的允许排队时延,所述允许排队时延用于表征所述目标报文在转发队列中等待被发送的最大排队时长;根据所述允许排队时延确定初选队列,所述初选队列对应有第一发送倒计时间;根据所述第一发送倒计时间和所述有序保证对象所存储的转发队列信息对所述目标报文进行调度。In a first aspect, an embodiment of the present application provides a message scheduling method, including: determining an ordered guarantee object to which a target message belongs, the ordered guarantee object being used to store forwarding queue information of a message corresponding to the ordered guarantee object that was most recently cached; obtaining an allowed queuing delay of the target message, the allowed queuing delay being used to characterize the maximum queuing time that the target message waits to be sent in the forwarding queue; determining a preliminary queue based on the allowed queuing delay, the preliminary queue corresponding to a first sending countdown time; scheduling the target message based on the first sending countdown time and the forwarding queue information stored in the ordered guarantee object.
第二方面,本申请实施例还提供了一种网络设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上第一方面所述的报文调度方法。In a second aspect, an embodiment of the present application further provides a network device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the message scheduling method as described in the first aspect above is implemented.
第三方面,本申请实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行如上第一方面所述的报文调度方法。In a third aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the message scheduling method described in the first aspect above.
第四方面,本申请实施例还提供了一种计算机程序产品,包括计算机程序或计算机指令,所述计算机程序或所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所 述计算机可读存储介质读取所述计算机程序或所述计算机指令,所述处理器执行所述计算机程序或所述计算机指令,使得所述计算机设备执行如上第一方面所述的报文调度方法。In a fourth aspect, the embodiments of the present application further provide a computer program product, including a computer program or a computer instruction, wherein the computer program or the computer instruction is stored in a computer-readable storage medium, and a processor of a computer device receives the computer program or the computer instruction from the computer. The computer-readable storage medium reads the computer program or the computer instruction, and the processor executes the computer program or the computer instruction, so that the computer device executes the message scheduling method described in the first aspect above.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请一个实施例提供的用于执行报文调度方法的网络拓扑的示意图;FIG1 is a schematic diagram of a network topology for executing a message scheduling method provided by an embodiment of the present application;
图2是本申请一个具体示例提供的Deadline队列的示意图;FIG2 is a schematic diagram of a Deadline queue provided in a specific example of the present application;
图3是本申请一个实施例提供的报文调度方法的流程图;FIG3 is a flow chart of a message scheduling method provided by an embodiment of the present application;
图4是本申请另一个实施例提供的报文调度方法的流程图;FIG4 is a flow chart of a message scheduling method provided by another embodiment of the present application;
图5是图3中步骤S130的一种具体方法流程图;FIG5 is a flowchart of a specific method of step S130 in FIG3 ;
图6是图5中步骤S320的一种具体方法流程图;FIG6 is a flowchart of a specific method of step S320 in FIG5 ;
图7是图3中步骤S110的一种具体方法流程图;FIG. 7 is a flowchart of a specific method of step S110 in FIG. 3 ;
图8是本申请一个具体示例提供的确定目标报文所属的有序保证对象的示意图;FIG8 is a schematic diagram of determining an ordered guarantee object to which a target message belongs provided by a specific example of the present application;
图9是本申请一具体示例提供的报文入队的示意图;FIG9 is a schematic diagram of a message queue provided by a specific example of the present application;
图10是本申请一个实施例提供的网络设备的结构示意图。FIG. 10 is a schematic diagram of the structure of a network device provided in one embodiment of the present application.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于流程图中的顺序执行所示出或描述的步骤。说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
本申请提供了一种报文调度方法、网络设备、存储介质及计算机程序产品,首先确定目标报文所属的有序保证对象,有序保证对象用于存储最近一次缓存有序保证对象所对应的报文的转发队列信息,然后获取目标报文的允许排队时延,允许排队时延用于表征目标报文在转发队列中等待被发送的最大排队时长,根据允许排队时延确定初选队列,初选队列对应有第一发送倒计时间,因此,可以根据第一发送倒计时间和有序保证对象所存储的转发队列信息对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。The present application provides a message scheduling method, a network device, a storage medium and a computer program product. First, the ordered guarantee object to which the target message belongs is determined. The ordered guarantee object is used to store the forwarding queue information of the message corresponding to the ordered guarantee object that was cached most recently. Then, the allowed queuing delay of the target message is obtained. The allowed queuing delay is used to characterize the maximum queuing time of the target message waiting to be sent in the forwarding queue. The preliminary selection queue is determined according to the allowed queuing delay. The preliminary selection queue corresponds to a first sending countdown time. Therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored by the ordered guarantee object. There is no need to select parameters, and the node can avoid the situation where the message is out of order when sending the target message in the same data stream. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
下面结合附图,对本申请实施例作进一步阐述。The embodiments of the present application are further described below in conjunction with the accompanying drawings.
如图1所示,图1是本申请一个实施例提供的用于执行报文调度方法的网络拓扑的示意图。在图1的示例中,该网络拓扑包括第一节点110、第二节点120和第三节点130。其中,第一节点110和第三节点130之间可以建立一条途径第二节点120的确定性时延路径。第一节点110、第二节点120和第三节点130均可以是路由器或者交换机等网络设备,能够对报文进行转发。As shown in Figure 1, Figure 1 is a schematic diagram of a network topology for executing a message scheduling method provided by an embodiment of the present application. In the example of Figure 1, the network topology includes a first node 110, a second node 120, and a third node 130. Among them, a deterministic delay path passing through the second node 120 can be established between the first node 110 and the third node 130. The first node 110, the second node 120, and the third node 130 can all be network devices such as routers or switches, which can forward messages.
在该网络拓扑中,任何一个节点均维护有针对某些特定出端口的具有发送倒计时间 (Countdown Time,CT)和授权发送时间(或称为授权时间(Authorization Time,AT))的转发队列(或称为Deadline队列),该Deadline队列的数量可以为1个或多个,可以根据实际应用情况进行适当的设置。该Deadline队列具有如下几点特征:In this network topology, any node maintains a countdown timer for sending certain specific outbound ports. The forwarding queue (or deadline queue) of the countdown time (CT) and the authorization time (or authorization time (AT)) can be one or more, and can be appropriately set according to the actual application. The deadline queue has the following characteristics:
(1)每个Deadline队列的发送倒计时间会随着时间的推移而递减,其中,发送倒计时间的数值越小,表示对应的Deadline队列的调度优先级越高。节点内可以设置一个循环定时器对所有的Deadline队列的发送倒计时间进行递减操作,即,每当循环定时器超时时,所有Deadline队列的发送倒计时间都会被减去循环定时器的时间间隔。比如,假设循环定时器的时间间隔为1μs,那么每当循环定时器超时时,所有Deadline队列的倒计时间都会被减去1μs。(1) The sending countdown time of each deadline queue will decrease over time. The smaller the sending countdown time value, the higher the scheduling priority of the corresponding deadline queue. A cyclic timer can be set in the node to decrement the sending countdown time of all deadline queues. That is, every time the cyclic timer times out, the sending countdown time of all deadline queues will be subtracted by the time interval of the cyclic timer. For example, assuming that the time interval of the cyclic timer is 1μs, then every time the cyclic timer times out, the countdown time of all deadline queues will be subtracted by 1μs.
循环定时器的时间间隔是Deadline队列的发送倒计时间递减的步进值,该时间间隔必须小于或等于Deadline队列的授权发送时间,且应满足授权发送时间能够被时间间隔整除,即AT=N*I,其中,I表示时间间隔,N为大于或等于1的整数。另外,循环定时器的时间间隔应该足够精细,以此感知报文之间的时延需求差异,比如,报文之间的时延需求差异仅为几微秒,则循环定时器的时间间隔可以为1微秒。The time interval of the cyclic timer is the step value of the countdown time of the deadline queue. The time interval must be less than or equal to the authorized sending time of the deadline queue, and the authorized sending time must be divisible by the time interval, that is, AT = N*I, where I represents the time interval and N is an integer greater than or equal to 1. In addition, the time interval of the cyclic timer should be fine enough to perceive the difference in delay requirements between messages. For example, if the difference in delay requirements between messages is only a few microseconds, the time interval of the cyclic timer can be 1 microsecond.
初始时,所有Deadline队列中,每个队列的发送倒计时间的初始值相互错开,也就是说,在任何时候都只会有一个Deadline队列的发送倒计时间递减到0。Initially, the initial values of the send countdown time of each deadline queue are staggered, that is, at any time, only one deadline queue's send countdown time decreases to 0.
(2)当发送倒计时间递减到0时,对应的Deadline队列的调度优先级会被设置为最高,从而立即获得调度报文的机会,并禁止缓存新的报文,该Deadline队列中已缓存的报文会被立即从出端口往外发送。其中,允许Deadline队列发送报文的最长持续时间为预设的授权发送时间,Deadline队列会在该授权发送时间内将队列中缓存的所有报文发送完毕。如果队列内的报文发送完毕后且授权发送时间还有空闲,则可以在该空闲的授权发送时间内继续调度其它的次高优先级的队列中的报文。(2) When the send countdown time decreases to 0, the scheduling priority of the corresponding deadline queue will be set to the highest, so that it will immediately get the opportunity to schedule messages, and will be prohibited from caching new messages. The messages cached in the deadline queue will be immediately sent out from the egress port. Among them, the maximum duration allowed for the deadline queue to send messages is the preset authorized sending time. The deadline queue will send all the messages cached in the queue within the authorized sending time. If the messages in the queue are sent and there is still free time for the authorized sending, the messages in other queues with the next highest priority can continue to be scheduled during the free authorized sending time.
(3)对于发送倒计时间已经递减到0的Deadline队列,在经过授权发送时间后,其发送倒计时间会恢复为预设的最大初始值(即MAX_CT),此时,该队列的调度优先级非最高,并允许该Deadline队列重新缓存新的报文,使得该Deadline队列进入下一轮的随着时间推移而递减发送倒计时间的操作。(3) For a deadline queue whose sending countdown has been decremented to 0, after the authorized sending time has passed, its sending countdown will be restored to the preset maximum initial value (i.e., MAX_CT). At this time, the scheduling priority of the queue is not the highest, and the deadline queue is allowed to re-cache new messages, so that the deadline queue enters the next round of the operation of decrementing the sending countdown time as time goes by.
(4)对于发送倒计时间未递减到0的Deadline队列,允许该Deadline队列缓存报文。(4) For a deadline queue whose sending countdown time has not decreased to 0, the deadline queue is allowed to buffer messages.
参照图2,图2是一个具体示例提供的Deadline队列的示意图。在图2中,Deadline队列包括队列queue1至队列queue7,而其它队列则是传统的非Deadline队列。每个Deadline队列的授权发送时间为10μs,且均有其倒计时间属性,预设的最大倒计时间为60μs。参考图2,在初始时刻(即T0时刻),所有Deadline队列的发送倒计时间的初始值相互错开,例如,队列queue1的发送倒计时间的初始值为60μs,队列queue2的发送倒计时间的初始值为50μs,队列queue3的发送倒计时间的初始值为40μs,等等。此时,仅队列queue7的发送倒计时间的初始值为0,即是说,此时的队列queue7具有最高的调度优先级,因此,队列quene7将不再缓存新的报文,并立即发送缓存在该队列quene7中的报文。Referring to FIG. 2 , FIG. 2 is a schematic diagram of a deadline queue provided by a specific example. In FIG. 2 , the deadline queue includes queues queue1 to queue7, while the other queues are traditional non-deadline queues. The authorized sending time of each deadline queue is 10 μs, and each has its countdown time attribute, and the preset maximum countdown time is 60 μs. Referring to FIG. 2 , at the initial moment (i.e., moment T0), the initial values of the sending countdown time of all deadline queues are staggered from each other, for example, the initial value of the sending countdown time of queue queue1 is 60 μs, the initial value of the sending countdown time of queue queue2 is 50 μs, the initial value of the sending countdown time of queue queue3 is 40 μs, and so on. At this time, only the initial value of the sending countdown time of queue queue7 is 0, that is, queue queue7 has the highest scheduling priority at this time, so queue queue7 will no longer cache new messages and immediately send the messages cached in queue queue7.
假设节点内设置了一个时间间隔为1μs的循环定时器,那么,当循环定时器每次超时后,都会将所有的Deadline队列的发送倒计时间减去循环定时器的时间间隔,如图2中,在T0+1μs时刻,循环定时器超时,则队列queue1的发送倒计时间递减为59μs,队列queue2的发送倒计时间递减为49μs,队列queue3的发送倒计时间递减为39μs,等等。此时,队列queue7的 发送倒计时间递减为-1(或者,在此后的一段授权发送时间内,保持队列queue7的发送倒计时间为0μs),因此,队列queue7的调度优先级仍然为最高级。Assume that a cyclic timer with a time interval of 1μs is set in the node. Then, every time the cyclic timer times out, the countdown time of all deadline queues will be subtracted from the time interval of the cyclic timer. As shown in Figure 2, at time T0+1μs, the cyclic timer times out, and the countdown time of queue 1 decreases to 59μs, the countdown time of queue 2 decreases to 49μs, the countdown time of queue 3 decreases to 39μs, and so on. At this time, the countdown time of queue 7 decreases to 59μs. The sending countdown time is decremented to -1 (or, during a subsequent period of authorized sending time, the sending countdown time of queue 7 is kept at 0 μs), so the scheduling priority of queue 7 is still the highest level.
而在T0+10μs时刻,即经过一段授权发送时间后,队列queue1的发送倒计时间递减为50μs,队列queue2的发送倒计时间递减为40μs,队列queue3的发送倒计时间递减为30μs,等等。此时,队列queue7的发送倒计时间恢复为最大倒计时间(即60μs),并且,队列queue7的调度优先级不再为最高级,即重新被允许该队列queue7缓存新的报文,而队列queue6的发送倒计时间变为0,因此,队列queue6具有最高的调度优先级,即在此期间,会禁止队列queue6缓存新的报文,并立即发送缓存在该队列queue6中的报文。At T0+10μs, that is, after a period of authorized sending time, the sending countdown time of queue 1 decreases to 50μs, the sending countdown time of queue 2 decreases to 40μs, the sending countdown time of queue 3 decreases to 30μs, etc. At this time, the sending countdown time of queue 7 is restored to the maximum countdown time (i.e., 60μs), and the scheduling priority of queue 7 is no longer the highest level, that is, queue 7 is allowed to cache new messages again, and the sending countdown time of queue 6 becomes 0. Therefore, queue 6 has the highest scheduling priority, that is, during this period, queue 6 is prohibited from caching new messages, and the messages cached in queue 6 are sent immediately.
值得注意的是,将各Deadline队列的发送倒计时时间按照从小到大的顺序排序,因此,某个Deadline队列的下一个Deadline队列是指下一个比该Deadline队列发送倒计时间大的且相邻的Deadline队列。比如在T0时刻,队列queue7的下一个Deadline队列是队列queue6。另外,可比较两个Deadline队列的发送倒计时间,将发送倒计时间的数值小的Deadline队列称为在前Deadline队列,将发送倒计时间的数值大的Deadline队列称为在后Deadline队列。It is worth noting that the sending countdown time of each deadline queue is sorted in ascending order. Therefore, the next deadline queue of a deadline queue refers to the next deadline queue with a larger sending countdown time than the deadline queue and adjacent to it. For example, at time T0, the next deadline queue of queue7 is queue6. In addition, the sending countdown time of two deadline queues can be compared, and the deadline queue with a smaller sending countdown time value is called the previous deadline queue, and the deadline queue with a larger sending countdown time value is called the next deadline queue.
本申请实施例描述的网络拓扑以及应用场景是为了更加清楚的说明本申请实施例的技术方案,并不构成对于本申请实施例提供的技术方案的限定,本领域技术人员可知,随着网络拓扑的演变和新应用场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The network topology and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of network topology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
本领域技术人员可以理解的是,图1中示出的拓扑结构并不构成对本申请实施例的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art will appreciate that the topological structure shown in FIG. 1 does not constitute a limitation on the embodiments of the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
基于上述网络拓扑的结构,下面提出本申请的报文调度方法的各个实施例。Based on the structure of the above network topology, various embodiments of the message scheduling method of the present application are proposed below.
参照图3,图3是本申请一个实施例提供的报文调度方法的流程图,该报文调度方法可以应用于网络中的节点,例如图1所示网络拓扑中的第一节点110或第二节点120,该报文调度方法包括但不限于步骤S110、步骤S120、步骤S130和步骤S140。Referring to Figure 3, Figure 3 is a flowchart of a message scheduling method provided by an embodiment of the present application. The message scheduling method can be applied to nodes in a network, such as the first node 110 or the second node 120 in the network topology shown in Figure 1. The message scheduling method includes but is not limited to step S110, step S120, step S130 and step S140.
步骤S110:确定目标报文所属的有序保证对象,有序保证对象用于存储最近一次缓存有序保证对象所对应的报文的转发队列信息。Step S110: determining the order guarantee object to which the target message belongs, where the order guarantee object is used to store the forwarding queue information of the message corresponding to the most recently cached order guarantee object.
在本步骤中,被缓存的有序保证对象所对应的报文可以为任何报文。而有序保证对象(Order Guarantee Object,OGO)事先维护在队列(比如候选队列)所处的出端口上,该有序保证对象的数量不限,其数量可以为1个,也可以为多个,其中,当有序保证对象的数量为多个时,不同的有序保证对象对应的转发队列信息可以不同或者相同。In this step, the message corresponding to the cached order guarantee object can be any message. The order guarantee object (OGO) is maintained in advance on the egress port where the queue (such as the candidate queue) is located. The number of the order guarantee objects is unlimited, and the number can be 1 or more. When the number of order guarantee objects is more than one, the forwarding queue information corresponding to different order guarantee objects can be different or the same.
在一实施例中,属于同一个有序保证对象的目标报文具有一些共同点,比如,来自相同的入端口和/或具有相同计划驻留时间和/或属于同一条数据流等等,在此不做具体限制。另外,该转发队列信息可以记录队列的发送倒计时间、队列的队列编号或者队列名称,等等,在此不做具体限制。In one embodiment, the target messages belonging to the same order guarantee object have some common features, such as coming from the same ingress port and/or having the same planned residence time and/or belonging to the same data flow, etc., which are not specifically limited here. In addition, the forwarding queue information can record the queue's sending countdown time, the queue number or queue name of the queue, etc., which are not specifically limited here.
步骤S120:获取目标报文的允许排队时延,允许排队时延用于表征目标报文在转发队列中等待被发送的最大排队时长。Step S120: obtaining the allowed queuing delay of the target message, where the allowed queuing delay is used to represent the maximum queuing time length of the target message waiting to be sent in the forwarding queue.
在一实施例中,允许排队时延可以根据报文在当前节点内的计划驻留时间,加上报文在所有上游节点累计的时延偏差,再减去报文在当前节点内的转发时延而得到,其中,计划驻留时间表示报文在本地节点内的最大驻留时间。可以理解的是,如果一个报文在当前节点上 实际产生的排队时延比允许排队时延大,则该报文在下游节点上可能会拥有更小的允许排队时延;相反,如果一个报文在当前节点上实际产生的排队时延比允许排队时延小,则该报文在下游节点上可能会拥有更大的允许排队时延。In one embodiment, the allowed queuing delay can be obtained based on the planned residence time of the message in the current node, plus the accumulated delay deviation of the message in all upstream nodes, and then minus the forwarding delay of the message in the current node, where the planned residence time represents the maximum residence time of the message in the local node. It can be understood that if a message is on the current node If the actual queuing delay is greater than the allowed queuing delay, the message may have a smaller allowed queuing delay on the downstream node; conversely, if the actual queuing delay of a message on the current node is smaller than the allowed queuing delay, the message may have a larger allowed queuing delay on the downstream node.
步骤S130:根据允许排队时延确定初选队列,初选队列对应有第一发送倒计时间。Step S130: determining a preliminary selection queue according to the allowed queuing delay, and the preliminary selection queue corresponds to a first sending countdown time.
本步骤中,初选队列也是转发队列(即Deadline队列),且初选队列的数量可以为1个,第一发送倒计时间即初选队列的发送倒计时间,对于发送倒计时间的具体说明,可以参考上述实施例中的相关说明,此处不再赘述。In this step, the preliminary selection queue is also a forwarding queue (i.e., a Deadline queue), and the number of preliminary selection queues can be 1. The first sending countdown time is the sending countdown time of the preliminary selection queue. For the specific description of the sending countdown time, please refer to the relevant description in the above embodiment, which will not be repeated here.
步骤S140:根据第一发送倒计时间和有序保证对象所存储的转发队列信息对目标报文进行调度。Step S140: Schedule the target message according to the first sending countdown time and the forwarding queue information stored in the order guarantee object.
本步骤中,由于在步骤S110中确定了目标报文所属的有序保证对象,因此可以确定有序保证对象用于存储最近一次缓存有序保证对象所对应的报文的转发队列信息,又在步骤S130中确定了初选队列的第一发送倒计时间,因此可以根据第一发送倒计时间和有序保证对象所存储的转发队列信息对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。In this step, since the ordered guarantee object to which the target message belongs is determined in step S110, it is possible to determine that the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the most recently cached ordered guarantee object, and the first sending countdown time of the preliminary queue is determined in step S130. Therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored in the ordered guarantee object. This eliminates the need to select parameters and can avoid message disorder when the node sends the target message in the same data stream. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
本实施例中,通过采用包括上述步骤S110至步骤S140的报文调度方法,首先确定目标报文所属的有序保证对象,有序保证对象用于存储最近一次缓存有序保证对象所对应的报文的转发队列信息,然后获取目标报文的允许排队时延,允许排队时延用于表征目标报文在转发队列中等待被发送的最大排队时长,根据允许排队时延确定初选队列,初选队列对应有第一发送倒计时间,因此,可以根据第一发送倒计时间和有序保证对象所存储的转发队列信息对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。In this embodiment, by adopting the message scheduling method including the above steps S110 to S140, first determine the ordered guarantee object to which the target message belongs, the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the most recent cached ordered guarantee object, then obtain the allowed queuing delay of the target message, the allowed queuing delay is used to characterize the maximum queuing time of the target message waiting to be sent in the forwarding queue, determine the preliminary selection queue according to the allowed queuing delay, the preliminary selection queue corresponds to the first sending countdown time, therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored by the ordered guarantee object, without selecting parameters, and can also avoid the situation that the node sends the target message in the same data stream out of order, and at the same time, there is no need to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
本申请的一个实施例,对步骤S140进行进一步的说明,在有序保证对象所存储的转发队列信息包括第二发送倒计时间的情况下,步骤S140可以包括但不限于有以下步骤:In one embodiment of the present application, step S140 is further described. When the forwarding queue information stored in the order guarantee object includes the second sending countdown time, step S140 may include but is not limited to the following steps:
获取有序保证对象所存储的第二发送倒计时间。Get the second sending countdown time stored in the order guarantee object.
将第二发送倒计时间和第一发送倒计时间进行比较,得到第一比较结果。The second sending countdown time is compared with the first sending countdown time to obtain a first comparison result.
根据第一比较结果对目标报文进行调度。The target message is scheduled according to the first comparison result.
在一实施例中,第二发送倒计时间可以是预设数值,也可以是候选队列的发送倒计时间。比如,目标报文所属的有序保证对象为初始状态,即该有序保证对象并没有存储缓存有序保证对象所对应的报文的转发队列信息,则该第二发送倒计时间可以为预设数值,该预设数值可以是0μs、-1μs或者其他数值;当第二发送倒计时间为候选队列的发送倒计时间,则对于第二发送倒计时间的具体说明,可以参考上述实施例中的相关说明,此处不再赘述。In one embodiment, the second sending countdown time may be a preset value or a sending countdown time of a candidate queue. For example, if the ordered guarantee object to which the target message belongs is in the initial state, that is, the ordered guarantee object does not store the forwarding queue information of the message corresponding to the cached ordered guarantee object, then the second sending countdown time may be a preset value, which may be 0μs, -1μs or other values; when the second sending countdown time is the sending countdown time of the candidate queue, the specific description of the second sending countdown time may refer to the relevant description in the above embodiment, which will not be repeated here.
本实施例中,可以获取有序保证对象所存储的第二发送倒计时间,然后将第二发送倒计时间和第一发送倒计时间进行比较,得到第一比较结果,然后根据第一比较结果对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。 因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。In this embodiment, the second sending countdown time stored in the order guarantee object can be obtained, and then the second sending countdown time and the first sending countdown time can be compared to obtain a first comparison result, and then the target message is scheduled according to the first comparison result. There is no need to select parameters, and it can also avoid the situation where the node sends the target message in the same data stream out of order. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiments of the present application can reduce the complexity of message scheduling and solve the problem of message disorder without selecting parameters.
本申请的另一个实施例,对步骤S140进行进一步的说明,在有序保证对象所存储的转发队列信息至少包括队列编号或队列名称中的一个的情况下,步骤S140可以包括但不限于有以下步骤:In another embodiment of the present application, step S140 is further described. When the forwarding queue information stored in the order guarantee object includes at least one of a queue number or a queue name, step S140 may include but is not limited to the following steps:
根据有序保证对象所存储的转发队列信息获取第二发送倒计时间。The second sending countdown time is obtained according to the forwarding queue information stored in the order guarantee object.
将第二发送倒计时间和第一发送倒计时间进行比较,得到第一比较结果。The second sending countdown time is compared with the first sending countdown time to obtain a first comparison result.
根据第一比较结果对目标报文进行调度。The target message is scheduled according to the first comparison result.
在一实施例中,根据有序保证对象所存储的转发队列信息获取第二发送倒计时间的实施方式有很多,比如,根据队列编号获取第二发送倒计时间;或者,根据队列名称获取第二发送倒计时间;或者,根据队列编号和队列名称获取第二发送倒计时间,此处均不作具体限制。In one embodiment, there are many implementation methods for obtaining the second sending countdown time based on the forwarding queue information stored in the order guarantee object, such as obtaining the second sending countdown time based on the queue number; or obtaining the second sending countdown time based on the queue name; or obtaining the second sending countdown time based on the queue number and the queue name, and no specific restrictions are made here.
可以理解的是,当目标报文所属的有序保证对象为初始状态,即该有序保证对象并没有存储缓存有序保证对象所对应的报文的转发队列信息,则有序保证对象所存储的转发队列信息为空,此时获取的第二发送倒计时为预设数值。It can be understood that when the order guarantee object to which the target message belongs is in the initial state, that is, the order guarantee object does not store the forwarding queue information of the message corresponding to the cached order guarantee object, the forwarding queue information stored in the order guarantee object is empty, and the second sending countdown obtained at this time is the preset value.
可以理解的是,不同的队列编号或队列名称对应不同的第二发送倒计时间,比如,假设根据队列编号queue6获取的第二发送倒计时间为CT1,根据队列编号queue7获取的第二发送倒计时间为CT2,CT1与CT2并不相等。It is understandable that different queue numbers or queue names correspond to different second sending countdown times. For example, assuming that the second sending countdown time obtained according to queue number queue6 is CT1, and the second sending countdown time obtained according to queue number queue7 is CT2, CT1 and CT2 are not equal.
本实施例中,在有序保证对象所存储的转发队列信息至少包括队列编号或队列名称中的一个的情况下,可以根据有序保证对象所存储的转发队列信息获取第二发送倒计时间,然后将第二发送倒计时间和第一发送倒计时间进行比较,得到第一比较结果,然后根据第一比较结果对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。In this embodiment, when the forwarding queue information stored in the order guarantee object includes at least one of the queue number or the queue name, the second sending countdown time can be obtained according to the forwarding queue information stored in the order guarantee object, and then the second sending countdown time is compared with the first sending countdown time to obtain a first comparison result, and then the target message is scheduled according to the first comparison result, without selecting parameters, and it can also avoid the situation that the node sends the target message in the same data stream out of order, and at the same time, it is not necessary to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
可以理解的是,上述队列的发送倒计时间(比如第一发送倒计时间、第二发送倒计时间)可以是队列的显式设置的属性,并且在硬件实现时对外呈现该属性(即发送倒计时间)。在具体应用中,上述队列的发送倒计时间也可以通过队列的其他信息(比如队列编号、队列名称)结合必要的时间数(比如在单个授权发送时间内所经历的循环定时器的时间间隔的个数)去隐含地推导而得到的,而不一定要在硬件实现时对外呈现该属性。另外,无论发送倒计时间是显式设置的属性,还是通过队列的其它信息隐含推导而得到的属性,对于通过将第一发送倒计时间与第一发送倒计时间进行比较而得到第一比较结果都无任何差异。It is understandable that the sending countdown time of the above-mentioned queue (such as the first sending countdown time, the second sending countdown time) can be an explicitly set attribute of the queue, and the attribute (i.e., the sending countdown time) is presented to the outside during hardware implementation. In a specific application, the sending countdown time of the above-mentioned queue can also be implicitly derived through other information of the queue (such as the queue number, the queue name) combined with the necessary time number (such as the number of time intervals of the cyclic timer experienced within a single authorized sending time), and it is not necessary to present the attribute to the outside during hardware implementation. In addition, whether the sending countdown time is an explicitly set attribute or an attribute implicitly derived through other information of the queue, there is no difference in the first comparison result obtained by comparing the first sending countdown time with the second sending countdown time.
参照图4,本申请的一个实施例,对步骤“根据第一比较结果对目标报文进行调度”进行进一步的说明,该步骤可以包括但不限于有步骤S210和步骤S220。4 , an embodiment of the present application further illustrates the step of “scheduling the target message according to the first comparison result”, which may include but is not limited to step S210 and step S220.
步骤S210:根据第一比较结果确定目标转发队列。Step S210: Determine a target forwarding queue according to the first comparison result.
在本步骤中,目标转发队列的数量不限,可以为1个或者多个,可以根据实际情况确定,在此不做具体限制。In this step, the number of target forwarding queues is not limited, and may be one or more, and may be determined according to actual conditions, and no specific limitation is made here.
步骤S220:将目标报文缓存至目标转发队列,等待目标转发队列对目标报文进行调度。Step S220: Cache the target message to the target forwarding queue, and wait for the target forwarding queue to schedule the target message.
可以理解的是,每个目标转发队列的第四发送倒计时间会随着时间的推移而递减,且第 四发送倒计时间的数值越小,表示对应的目标转发队列的调度优先级越高。并且,不同的目标转发队列对应有不同的第四发送倒计时间。It is understandable that the fourth sending countdown time of each target forwarding queue will decrease over time, and the The smaller the value of the fourth sending countdown time is, the higher the scheduling priority of the corresponding target forwarding queue is. In addition, different target forwarding queues have different fourth sending countdown times.
在一实施例中,当第四发送倒计时间未递减到0时,该第四发送倒计时间所对应的目标转发队列未能立即对目标报文进行调度,即等待目标转发队列对目标报文进行调度;当第四发送倒计时间递减到0时,与该第四发送倒计时间对应的目标转发队列的调度优先级会被设置为最高,此时,目标转发队列可以对目标报文进行调度,本申请实施例对此不作具体限制。In one embodiment, when the fourth sending countdown time has not decreased to 0, the target forwarding queue corresponding to the fourth sending countdown time fails to schedule the target message immediately, that is, waits for the target forwarding queue to schedule the target message; when the fourth sending countdown time decreases to 0, the scheduling priority of the target forwarding queue corresponding to the fourth sending countdown time will be set to the highest. At this time, the target forwarding queue can schedule the target message, and the embodiment of the present application does not impose any specific restrictions on this.
在一实施例中,假设目标转发队列有两个,即目标转发队列A和目标转发队列B,且目标转发队列A的第四发送倒计时间最先递减到0,当目标转发队列A的第四发送倒计时间递减到0,目标转发队列A可以对其所缓存的目标报文进行调度,在经过一段授权发送时间之后,目标转发队列B的第四发送倒计时间递减到0,而目标转发队列A的第四发送倒计时间恢复成预设的最大值,此时,目标转发队列B可以对其所缓存的目标报文进行调度。In one embodiment, it is assumed that there are two target forwarding queues, namely, target forwarding queue A and target forwarding queue B, and the fourth sending countdown time of target forwarding queue A is first decremented to 0. When the fourth sending countdown time of target forwarding queue A is decremented to 0, target forwarding queue A can schedule the target message cached therein. After a period of authorized sending time, the fourth sending countdown time of target forwarding queue B is decremented to 0, and the fourth sending countdown time of target forwarding queue A is restored to the preset maximum value. At this time, target forwarding queue B can schedule the target message cached therein.
本实施例中,通过采用包括上述步骤S210至步骤S220的报文调度方法,因此,可以根据第一比较结果确定目标转发队列,将目标报文缓存至目标转发队列,等待目标转发队列对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。In this embodiment, by adopting the message scheduling method including the above steps S210 to S220, the target forwarding queue can be determined according to the first comparison result, the target message is cached in the target forwarding queue, and the target forwarding queue is waited for to schedule the target message, without selecting parameters, and it can also avoid the situation that the node sends the target message in the same data stream out of order, and there is no need to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
本申请的一个实施例,对步骤S210进行进一步的说明,在有序保证对象所存储的转发队列信息对应于候选队列,候选队列对应于最近一次缓存有序保证对象所对应的报文的转发队列(即Deadline队列)的情况下,步骤S210可以包括但不限于以下步骤:In one embodiment of the present application, step S210 is further described. When the forwarding queue information stored in the order guarantee object corresponds to the candidate queue, and the candidate queue corresponds to the forwarding queue (i.e., the deadline queue) of the message corresponding to the most recently cached order guarantee object, step S210 may include but is not limited to the following steps:
当第一比较结果为第一发送倒计时间小于第二发送倒计时间,将候选队列确定为目标转发队列。When the first comparison result is that the first sending countdown time is less than the second sending countdown time, the candidate queue is determined as the target forwarding queue.
可以理解的是,在有序保证对象所存储的转发队列信息对应于候选队列,候选队列对应于最近一次缓存有序保证对象所对应的报文的转发队列(即Deadline队列)的情况下,第二发送倒计时间是候选队列的发送倒计时间。It can be understood that when the forwarding queue information stored in the order guarantee object corresponds to the candidate queue, and the candidate queue corresponds to the forwarding queue (ie, the deadline queue) of the message corresponding to the most recently cached order guarantee object, the second sending countdown time is the sending countdown time of the candidate queue.
在本实施例中,通过将第二发送倒计时间和初选队列的第一发送倒计时间进行比较,得到第一比较结果,当第一比较结果为第一发送倒计时间小于第二发送倒计时间,将候选队列确定为目标转发队列,以便于后续步骤中将目标报文缓存至目标转发队列,通过目标转发队列对该目标报文进行调度,既无需选择参数,还能够解决报文乱序的问题,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。In this embodiment, a first comparison result is obtained by comparing the second sending countdown time with the first sending countdown time of the preliminary queue. When the first comparison result is that the first sending countdown time is less than the second sending countdown time, the candidate queue is determined as the target forwarding queue, so that the target message can be cached to the target forwarding queue in the subsequent steps. The target message is scheduled through the target forwarding queue, which does not require parameter selection and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
本申请的另一个实施例,对步骤S210进行进一步的说明,步骤S210可以包括但不限于以下步骤:In another embodiment of the present application, step S210 is further described. Step S210 may include but is not limited to the following steps:
当第一比较结果为第一发送倒计时间大于或者等于第二发送倒计时间,将初选队列确定为目标转发队列。When the first comparison result is that the first sending countdown time is greater than or equal to the second sending countdown time, the preliminary selection queue is determined as the target forwarding queue.
在本实施例中,通过将第二发送倒计时间和初选队列的第一发送倒计时间进行比较,得到第一比较结果,当第一比较结果为第一发送倒计时间大于或者等于第二发送倒计时间,将候选队列确定为目标转发队列,以便于后续步骤中将目标报文缓存至目标转发队列,通过目标转发队列对该目标报文进行调度,既无需选择参数,还能够解决报文乱序的问题,同时还 无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。In this embodiment, a first comparison result is obtained by comparing the second sending countdown time with the first sending countdown time of the preliminary selection queue. When the first comparison result is that the first sending countdown time is greater than or equal to the second sending countdown time, the candidate queue is determined as the target forwarding queue, so that the target message is cached to the target forwarding queue in the subsequent steps, and the target message is scheduled by the target forwarding queue. This does not require parameter selection, and can solve the problem of message disorder. There is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
参照图5,本申请的一个实施例,对步骤S130进行进一步的说明,步骤S130可以包括但不限于有步骤S310和步骤S320。5 , an embodiment of the present application further illustrates step S130 , which may include but is not limited to step S310 and step S320 .
步骤S310:获取授权发送时间和转发队列的第三发送倒计时间。Step S310: Obtain the authorized sending time and the third sending countdown time of the forwarding queue.
其中,授权发送时间用于表征允许转发队列发送报文的最长持续时间。对于授权发送时间的具体说明,可以参考上述实施例中的相关说明,此处不再赘述。The authorized sending time is used to indicate the maximum duration of the forwarding queue to send the message. For the specific description of the authorized sending time, reference may be made to the relevant description in the above embodiment, which will not be repeated here.
本步骤中,转发队列(即Deadline队列)的数量有多个,不同的转发队列对应有不同的第三发送倒计时间。其中,对第三发送倒计时间(即Deadline队列的发送倒计时间)的具体说明,可以参考上述实施例中的相关说明,此处不再赘述。In this step, there are multiple forwarding queues (i.e., Deadline queues), and different forwarding queues correspond to different third sending countdown times. For a specific description of the third sending countdown time (i.e., the sending countdown time of the Deadline queue), reference can be made to the relevant description in the above embodiment, which will not be repeated here.
步骤S320:根据授权发送时间、第三发送倒计时间和允许排队时延确定初选队列。Step S320: Determine the preliminary selection queue according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
本实施例中,节点内可以设置有多个转发队列(即Deadline队列),因此,当执行步骤S120得到目标报文的允许排队时延,以及执行步骤S310得到授权发送时间和多个转发队列的第三发送倒计时间之后,可以根据授权发送时间、多个第三发送倒计时间和允许排队时延从多个转发队列中确定初选队列,以便于后续步骤中根据初选队列的第一发送倒计时间和第二发送倒计时间确定目标转发队列,通过该目标转发队列对目标报文进行调度,既无需选择参数,还能够解决报文乱序的问题,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。In this embodiment, multiple forwarding queues (i.e., deadline queues) may be provided in the node. Therefore, after executing step S120 to obtain the allowed queuing delay of the target message, and executing step S310 to obtain the authorized sending time and the third sending countdown times of multiple forwarding queues, a preliminary queue may be determined from the multiple forwarding queues according to the authorized sending time, the multiple third sending countdown times, and the allowed queuing delay, so that in subsequent steps, the target forwarding queue may be determined according to the first sending countdown time and the second sending countdown time of the preliminary queue. The target message may be scheduled through the target forwarding queue, without the need to select parameters and the problem of message disorder may be solved. At the same time, there is no need to carry a local deadline stack in the message, thereby reducing the complexity of message scheduling.
参照图6,本申请的一个实施例,对步骤S320进行进一步的说明,步骤S320可以包括但不限于有步骤S410和步骤S420。6 , an embodiment of the present application further illustrates step S320 , which may include but is not limited to step S410 and step S420 .
步骤S410:将第三发送倒计时间与授权发送时间的和、允许排队时延、第三发送倒计时间进行比较,得到第二比较结果。Step S410: Compare the third sending countdown time with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time to obtain a second comparison result.
在本步骤中,转发队列(即Deadline队列)的数量可以有多个,可以同时将多个转发队列的第三发送倒计时间与授权发送时间的和、允许排队时延、多个转发队列的第三发送倒计时间进行比较;或者,有序地将多个转发队列的第三发送倒计时间与授权发送时间的和、允许排队时延、多个转发队列的第三发送倒计时间进行比较,比如,按照转发队列的第三发送倒计时间对多个转发队列进行排序,依次将多个转发队列的第三发送倒计时间与授权发送时间的和、允许排队时延、多个转发队列的第三发送倒计时间进行比较,等等,在此不做具体限制。In this step, there can be multiple forwarding queues (i.e., Deadline queues), and the third sending countdown times of multiple forwarding queues can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues at the same time; or, the third sending countdown times of multiple forwarding queues can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues in an orderly manner. For example, multiple forwarding queues are sorted according to the third sending countdown times of the forwarding queues, and the third sending countdown times of multiple forwarding queues are compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown times of multiple forwarding queues in turn, and so on. No specific restrictions are made here.
步骤S420:根据第二比较结果确定初选队列。Step S420: Determine a preliminary selection queue according to the second comparison result.
本实施例中,当执行步骤S310得到授权发送时间和转发队列的第三发送倒计时间,以及执行步骤S120得到目标报文的允许排队时延之后,可以将第三发送倒计时间与授权发送时间的和、允许排队时延、第三发送倒计时间进行比较,得到第二比较结果,然后根据第二比较结果确定初选队列,以便于后续步骤中根据初选队列的第一发送倒计时间和第二发送倒计时间确定目标转发队列,通过该目标转发队列对目标报文进行调度,既无需选择参数,还能够解决报文乱序的问题,同时还无需在报文中携带本地截止时间堆栈,以降低报文调度的复杂度。In this embodiment, after executing step S310 to obtain the authorized sending time and the third sending countdown time of the forwarding queue, and executing step S120 to obtain the allowed queuing delay of the target message, the third sending countdown time can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time to obtain a second comparison result, and then a preliminary queue is determined based on the second comparison result, so that in subsequent steps, the target forwarding queue can be determined based on the first sending countdown time and the second sending countdown time of the preliminary queue. The target message is scheduled through the target forwarding queue, which does not require the selection of parameters and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message to reduce the complexity of message scheduling.
本申请的一个实施例,对步骤S410进行进一步的说明,在转发队列的数量有多个,不同的转发队列对应有不同的第三发送倒计时间,不同的转发队列对应有相同的授权发送时间的 情况下,步骤S410可以包括但不限于有以下步骤:In one embodiment of the present application, step S410 is further described. There are multiple forwarding queues, different forwarding queues have different third sending countdown times, and different forwarding queues have the same authorized sending time. In this case, step S410 may include but is not limited to the following steps:
将允许排队时延与各个转发队列的第三发送倒计时间、各个转发队列所对应的第三发送倒计时间与授权发送时间的和进行比较。The allowed queuing delay is compared with the third sending countdown time of each forwarding queue, and the sum of the third sending countdown time corresponding to each forwarding queue and the authorized sending time.
当多个转发队列中存在使得允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的转发队列,得到允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的第二比较结果。When there is a forwarding queue among multiple forwarding queues that makes the allowed queuing delay greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, a second comparison result is obtained that the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time.
可以理解的是,在转发队列(即Deadline队列)的数量有多个,且不同的转发队列对应有不同的第三发送倒计时间,不同的转发队列对应有相同的授权发送时间的情况下,不同的转发队列所对应的第三发送倒计时间与授权发送时间的和不同。It can be understood that when there are multiple forwarding queues (i.e., Deadline queues), and different forwarding queues correspond to different third sending countdown times, and different forwarding queues correspond to the same authorized sending time, the sum of the third sending countdown time and the authorized sending time corresponding to different forwarding queues is different.
在一实施例中,在转发队列(即Deadline队列)的数量有多个的情况下,可以同时将各个转发队列对应的第三发送倒计时间与授权发送时间的和、允许排队时延、各个转发队列的第三发送倒计时间进行比较;或者有序地将各个转发队列的第三发送倒计时间与授权发送时间的和、允许排队时延、各个转发队列的第三发送倒计时间进行比较,比如,按照转发队列的第三发送倒计时间对多个转发队列进行排序,依次将多个转发队列的第三发送倒计时间与授权发送时间的和、允许排队时延、多个转发队列的第三发送倒计时间进行比较,等等,在此不做具体限制。In one embodiment, when there are multiple forwarding queues (i.e., deadline queues), the third sending countdown time corresponding to each forwarding queue can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of each forwarding queue at the same time; or the third sending countdown time of each forwarding queue can be compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of each forwarding queue in an orderly manner. For example, multiple forwarding queues are sorted according to the third sending countdown time of the forwarding queue, and the third sending countdown time of multiple forwarding queues are compared with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time of multiple forwarding queues in turn, and so on. No specific restrictions are made here.
本实施例中,节点内可以设置有多个转发队列(即Deadline队列),因此,当执行步骤S310得到授权发送时间和转发队列的第三发送倒计时间,以及执行步骤S120得到目标报文的允许排队时延之后,可以将允许排队时延与各个转发队列的第三发送倒计时间、各个转发队列所对应的第三发送倒计时间与授权发送时间的和进行比较,当多个转发队列中存在使得允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的转发队列,得到允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的第二比较结果,以便于后续步骤中根据第二比较结果确定初选队列。In this embodiment, a plurality of forwarding queues (i.e., Deadline queues) may be provided in the node. Therefore, after executing step S310 to obtain the authorized sending time and the third sending countdown time of the forwarding queue, and executing step S120 to obtain the allowed queuing delay of the target message, the allowed queuing delay may be compared with the third sending countdown time of each forwarding queue and the sum of the third sending countdown time corresponding to each forwarding queue and the authorized sending time. When there is a forwarding queue among the plurality of forwarding queues for which the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, a second comparison result is obtained in which the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, so as to facilitate determining the preliminary selection queue according to the second comparison result in the subsequent steps.
在一实施例中,对步骤S420进行进一步的说明,在转发队列的数量有多个,不同的转发队列对应有不同的第三发送倒计时间,不同的转发队列对应有相同的授权发送时间的情况下,步骤S420可以包括但不限于以下步骤:In one embodiment, step S420 is further described. When there are multiple forwarding queues, different forwarding queues correspond to different third sending countdown times, and different forwarding queues correspond to the same authorized sending time, step S420 may include but is not limited to the following steps:
当第二比较结果为允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和,将使得允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的转发队列确定为初选队列。When the second comparison result is that the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, the forwarding queue whose allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time is determined as the preliminary queue.
本实施例中,节点内可以设置有多个转发队列(即Deadline队列),因此,当第二比较结果为允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和,将使得允许排队时延大于或者等于第三发送倒计时间且小于第三发送倒计时间与授权发送时间的和的转发队列确定为初选队列,以便于后续步骤中根据初选队列的第一发送倒计时间和第二发送倒计时间确定目标转发队列,通过该目标转发队列对目标报文进行调度,既无需选择参数,还能够解决报文乱序的问题,同时还无需在报文中携带本地截止时间堆栈,以降低报文调度的复杂度。In this embodiment, multiple forwarding queues (i.e., deadline queues) may be provided in the node. Therefore, when the second comparison result is that the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, the forwarding queue whose allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time is determined as the preliminary queue, so that in the subsequent steps, the target forwarding queue is determined according to the first sending countdown time and the second sending countdown time of the preliminary queue. The target message is scheduled through the target forwarding queue, which does not require the selection of parameters and can solve the problem of message disorder. At the same time, there is no need to carry a local deadline stack in the message to reduce the complexity of message scheduling.
具体地,在多个转发队列中,若存在转发队列的第三发送倒计时间CT满足CT<=Q<CT+AT,则将该转发队列确定为初选队列,其中,Q为目标报文的允许排队时延。 假设初选队列为queue-X,OGO对应的候选队列为queue-Y,如果初选队列queue-X的第一发送倒计时间小于OGO所存储的第二发送倒计时间,则放弃初选队列queue-X,而将OGO对应的候选队列queue-Y作为目标转发队列,而目标转发队列的第四发送倒计时间=MAX{初选队列的第一发送倒计时间,OGO所存储的第二发送倒计时间},即目标转发队列的第四发送倒计时间等于初选队列的第一发送倒计时间和OGO所存储的第二发送倒计时间中数值最大的发送倒计时间,其中,“=”不表示赋值,而是表示具体的值;MAX表示取最大值的操作符。Specifically, among the multiple forwarding queues, if there is a forwarding queue whose third sending countdown time CT satisfies CT<=Q<CT+AT, the forwarding queue is determined as the primary selection queue, where Q is the allowed queuing delay of the target message. Assume that the preliminary queue is queue-X and the candidate queue corresponding to OGO is queue-Y. If the first sending countdown time of the preliminary queue queue-X is less than the second sending countdown time stored by OGO, the preliminary queue queue-X is abandoned, and the candidate queue queue-Y corresponding to OGO is used as the target forwarding queue, and the fourth sending countdown time of the target forwarding queue = MAX{the first sending countdown time of the preliminary queue, the second sending countdown time stored by OGO}, that is, the fourth sending countdown time of the target forwarding queue is equal to the largest sending countdown time between the first sending countdown time of the preliminary queue and the second sending countdown time stored by OGO, where "=" does not indicate assignment, but indicates a specific value; MAX indicates an operator for taking the maximum value.
可以理解的是,同一队列中的报文是按照队列的先进先出规则进行调度的,当目标报文并非处于目标转发队列的队首位置时,目标转发队列的调度倒计时间并不等于目标报文的调度倒计时间,即,目标报文需要比队首报文等待更长的时间才能被调度。为了消除这种影响,在某些具体的实现时,还可以进一步在目标报文的允许排队时延Q的基础上扣减一定的余量后选择初选队列,比如根据CT<=Q-k*AT<CT+AT去选择初选队列,其中,0<=k<=1。然而,需要注意的是,其它情况下,目标报文也可能处于目标队列中靠近队首的位置,且目标报文的允许排队时延Q远大于目标队列的剩余倒计时间,即,目标报文只需等待更短的时间就能够被调度。综上所述,且为了方案实现的简洁性,本申请实施例建议根据CT<=Q<CT+AT去选择初选队列,实际上,Deadline队列的调度机制具有时延补偿能力,在当前节点产生的时延偏差会在下游节点得到补偿。It is understandable that the messages in the same queue are scheduled according to the first-in-first-out rule of the queue. When the target message is not at the head of the target forwarding queue, the scheduling countdown time of the target forwarding queue is not equal to the scheduling countdown time of the target message, that is, the target message needs to wait longer than the head message to be scheduled. In order to eliminate this effect, in some specific implementations, the preliminary selection queue can be selected after deducting a certain margin based on the allowed queuing delay Q of the target message, such as selecting the preliminary selection queue according to CT<=Q-k*AT<CT+AT, where 0<=k<=1. However, it should be noted that in other cases, the target message may also be near the head of the target queue, and the allowed queuing delay Q of the target message is much greater than the remaining countdown time of the target queue, that is, the target message only needs to wait for a shorter time to be scheduled. In summary, and for the sake of simplicity in the implementation of the solution, the embodiment of the present application recommends selecting the primary queue based on CT<=Q<CT+AT. In fact, the scheduling mechanism of the Deadline queue has the ability to compensate for delays, and the delay deviation generated at the current node will be compensated at the downstream node.
参照图7,本申请的一个实施例,对步骤S110进行进一步的说明,步骤S110可以包括但不限于有步骤S510和步骤S520。7 , an embodiment of the present application further illustrates step S110 , which may include but is not limited to step S510 and step S520 .
步骤S510:根据预设粒度对目标报文进行归类处理,得到目标报文的归属对象。Step S510: classify the target message according to a preset granularity to obtain the object to which the target message belongs.
其中,预设粒度可以为每“入端口+计划驻留时间”,每“流”,每“入端口”,每“入端口+流”,或者每“计划驻留时间”等等,其中,“流”指的是数据流。具体地,根据每“入端口+计划驻留时间”对目标报文进行归类处理,即将来自相同入端口且具有相同计划驻留时间的目标报文归为同一类;同样地,根据每“流”对目标报文进行归类处理,即将属于同一条数据流的目标报文归为同一类;根据每“入端口”对目标报文进行归类处理,即将来自相同的入端口的目标报文归为同一类;根据每“入端口+流”对目标报文进行归类处理,即将来自相同的入端口的且属于同一条数据流的目标报文归为同一类;根据每“计划驻留时间”对目标报文进行归类处理,指的是将具有相同计划驻留时间的目标报文归为同一类。可以根据实际情况选择预设粒度,在此不做具体限制。Among them, the preset granularity can be per "ingress port + planned residence time", per "flow", per "ingress port", per "ingress port + flow", or per "planned residence time", etc., wherein "flow" refers to data flow. Specifically, the target messages are classified according to each "ingress port + planned residence time", that is, the target messages from the same ingress port and with the same planned residence time are classified into the same category; similarly, the target messages are classified according to each "flow", that is, the target messages belonging to the same data flow are classified into the same category; the target messages are classified according to each "ingress port", that is, the target messages from the same ingress port are classified into the same category; the target messages are classified according to each "ingress port + flow", that is, the target messages from the same ingress port and belonging to the same data flow are classified into the same category; the target messages are classified according to each "planned residence time", which means that the target messages with the same planned residence time are classified into the same category. The preset granularity can be selected according to the actual situation, and no specific restrictions are made here.
步骤S520:将归属对象确定为目标报文所属的有序保证对象。Step S520: Determine the belonging object as the order-guaranteed object to which the target message belongs.
可以理解的是,有序保证对象的数量有多个,属于同一个有序保证对象的目标报文可以有多个,并且属于同一个有序保证对象的目标报文具有一些共同点,比如,来自相同的入端口和/或具有相同计划驻留时间和/或属于同一条数据流等等,该共同点可以预设粒度而得知。其中,当预设粒度为每“入端口+计划驻留时间”,有序保证对象可以用于实现入端口值与计划驻留时间属性值的维护。It is understandable that there are multiple order guarantee objects, and there can be multiple target messages belonging to the same order guarantee object, and the target messages belonging to the same order guarantee object have some common points, such as coming from the same ingress port and/or having the same planned residence time and/or belonging to the same data flow, etc., and the common points can be known by preset granularity. Among them, when the preset granularity is per "ingress port + planned residence time", the order guarantee object can be used to implement the maintenance of the ingress port value and the planned residence time attribute value.
本实施例中,通过采用包括上述步骤S510至步骤S520的报文调度方法,因此,可以根据预设粒度对目标报文进行归类处理,得到目标报文的归属对象,然后将归属对象确定为目标报文所属的有序保证对象,为后续步骤中确定目标转发队列做铺垫。 In this embodiment, by adopting the message scheduling method including the above-mentioned steps S510 to S520, the target message can be classified and processed according to the preset granularity to obtain the belonging object of the target message, and then the belonging object is determined as the ordered guarantee object to which the target message belongs, paving the way for determining the target forwarding queue in the subsequent steps.
本申请的一个实施例,在有序保证对象所存储的转发队列信息对应于候选队列,候选队列对应于最近一次缓存有序保证对象所对应的报文的转发队列的情况下,该报文调度方法还可以包括但不限于有以下步骤:In one embodiment of the present application, when the forwarding queue information stored in the order guarantee object corresponds to the candidate queue, and the candidate queue corresponds to the forwarding queue of the message corresponding to the most recently cached order guarantee object, the message scheduling method may also include but is not limited to the following steps:
当目标报文缓存至目标转发队列,将有序保证对象所存储的转发队列信息更新为目标转发队列的队列信息。When the target message is cached in the target forwarding queue, the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue.
在一实施例中,在目标报文A缓存至目标转发队列a,将有序保证对象所存储的转发队列信息更新为目标转发队列a之后,当需要对目标报文B进行调度时,可以确定目标报文B所属的有序保证对象,若目标报文B所属的有序保证对象与目标报文A所属的有序保证对象相同,此时,目标报文B所属的有序保证对象对应的候选队列为目标转发队列a,即根据有序保证对象的第二发送倒计时间(在没有递减到预设数值前,等于目标转发队列a对应的第四发送倒计时间)、初选队列对应的第一发送倒计时间、目标报文B的允许排队时延对目标报文B进行调度。In one embodiment, after the target message A is cached to the target forwarding queue a and the forwarding queue information stored in the ordered guarantee object is updated to the target forwarding queue a, when the target message B needs to be scheduled, the ordered guarantee object to which the target message B belongs can be determined. If the ordered guarantee object to which the target message B belongs is the same as the ordered guarantee object to which the target message A belongs, at this time, the candidate queue corresponding to the ordered guarantee object to which the target message B belongs is the target forwarding queue a, that is, the target message B is scheduled according to the second sending countdown time of the ordered guarantee object (before it is reduced to a preset value, it is equal to the fourth sending countdown time corresponding to the target forwarding queue a), the first sending countdown time corresponding to the preliminary queue, and the allowed queuing delay of the target message B.
在一实施例中,在有序保证对象所存储的转发队列信息至少包括队列编号或队列名称中的一个的情况下,在将有序保证对象所存储的转发队列信息更新为目标转发队列的队列信息之后,可以利用时间间隔对目标转发队列对应的第四发送倒计时间进行递减,当目标转发队列对应的第四发送倒计时间递减到预设数值,清空有序保证对象所存储的转发队列信息,即清空有序保证对象所存储的目标转发队列的队列信息,其中,该队列信息至少包括队列编号或队列名称中的一个。In one embodiment, when the forwarding queue information stored in the order guarantee object includes at least one of a queue number or a queue name, after the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, the fourth sending countdown time corresponding to the target forwarding queue can be decremented using a time interval. When the fourth sending countdown time corresponding to the target forwarding queue is decremented to a preset value, the forwarding queue information stored in the order guarantee object is cleared, that is, the queue information of the target forwarding queue stored in the order guarantee object is cleared, wherein the queue information includes at least one of a queue number or a queue name.
本申请的一个实施例,在有序保证对象包括用于存储第二发送倒计时间的倒计时间字段的情况下,执行步骤“将有序保证对象所存储的转发队列信息更新为目标转发队列的队列信息”之后,该报文调度方法还可以包括但不限于有以下步骤:In one embodiment of the present application, when the order guarantee object includes a countdown time field for storing the second sending countdown time, after executing the step of “updating the forwarding queue information stored in the order guarantee object to the queue information of the target forwarding queue”, the message scheduling method may also include but is not limited to the following steps:
将倒计时间字段中的第二发送倒计时间更新为目标转发队列对应的第四发送倒计时间。The second sending countdown time in the countdown time field is updated to the fourth sending countdown time corresponding to the target forwarding queue.
利用时间间隔对倒计时间字段中的数值进行递减,直到倒计时间字段中的数值为预设数值,其中,时间间隔根据授权发送时间计算得到。The value in the countdown time field is decremented using a time interval until the value in the countdown time field reaches a preset value, wherein the time interval is calculated based on the authorized sending time.
本步骤中,利用时间间隔对倒计时间字段中的数值进行递减,即是说,每当循环定时器超时时,所有有序保证对象所存储的数值都会被减去循环定时器的时间间隔。In this step, the value in the countdown time field is decremented using the time interval, that is, whenever the cyclic timer times out, the values stored in all order guarantee objects will be subtracted from the time interval of the cyclic timer.
在一实施例中,节点内可以设置一个循环定时器,而时间间隔为循环定时器用于对所有的Deadline队列(即转发队列)的发送倒计时间(比如第一发送倒计时间、第二发送倒计时间、第三发送倒计时间、第四发送倒计时间)进行递减的步进值,并且,时间间隔必须小于或等于授权发送时间,并且循环定时器的时间间隔应该设置得足够精细,以此感知报文之间的时延需求差异,比如,报文之间的时延需求差异仅为几微秒,则循环定时器的时间间隔可以为1微秒。In one embodiment, a cyclic timer can be set in the node, and the time interval is the step value used by the cyclic timer to decrease the sending countdown time (such as the first sending countdown time, the second sending countdown time, the third sending countdown time, and the fourth sending countdown time) of all deadline queues (i.e., forwarding queues), and the time interval must be less than or equal to the authorized sending time, and the time interval of the cyclic timer should be set finely enough to perceive the delay requirement difference between messages. For example, if the delay requirement difference between messages is only a few microseconds, the time interval of the cyclic timer can be 1 microsecond.
一可行的实施方式,预设数值可以为小于或等于所有目标转发队列的初始值最小的第四发送倒计时间的其他取值,比如0微秒或者-1微秒等等。在此不做具体限制。In a feasible implementation manner, the preset value may be other values of the fourth sending countdown time that is less than or equal to the minimum initial value of all target forwarding queues, such as 0 microseconds or -1 microsecond, etc. No specific limitation is made here.
在本实施例中,在有序保证对象包括用于存储第二发送倒计时间的倒计时间字段的情况下,在将有序保证对象所存储的转发队列信息更新为目标转发队列的队列信息之后,可以将倒计时间字段中的第二发送倒计时间更新为目标转发队列对应的第四发送倒计时间,而且可以利用时间间隔对倒计时间字段中的数值进行递减,直到倒计时间字段中的数值为预设数值, 即是说,有序保证对象所记录的发送倒计时间(即第二发送倒计时间)可以与其他转发队列的发送倒计时间(比如第三发送倒计时间)一起随着时间的推移而同步递减。In this embodiment, when the order guarantee object includes a countdown time field for storing the second sending countdown time, after the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, the second sending countdown time in the countdown time field can be updated to the fourth sending countdown time corresponding to the target forwarding queue, and the value in the countdown time field can be decremented using a time interval until the value in the countdown time field is a preset value. That is, the sending countdown time (ie, the second sending countdown time) recorded by the order guarantee object may decrease synchronously with the sending countdown times of other forwarding queues (eg, the third sending countdown time) as time goes by.
可以理解的是,在将有序保证对象所存储的转发队列信息更新为目标转发队列的队列信息之前,有序保证对象对应的倒计时间字段中的第二发送倒计时间也可以与其他转发队列的发送倒计时间一起随着时间的推移而同步递减。It is understandable that before the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, the second sending countdown time in the countdown time field corresponding to the order guarantee object can also decrease synchronously with the sending countdown time of other forwarding queues over time.
本申请的一个实施例,该报文调度方法还可以包括但不限于有以下步骤:In one embodiment of the present application, the message scheduling method may also include but is not limited to the following steps:
当有序保证对象的倒计时间字段中的数值递减到预设数值,保持倒计时间字段中的数值不变,直到有序保证对象所存储的转发队列信息再被更新。When the value in the countdown time field of the order guarantee object decreases to a preset value, the value in the countdown time field is kept unchanged until the forwarding queue information stored in the order guarantee object is updated again.
在一实施例中,假设预设数值为0μs,时间间隔为1μs,倒计时间字段中的数值为3μs,当倒计时间字段中的数值以1μs的时间间隔递减到0μs时,倒计时间字段中的数值将一直维持为0μs,经过一段时间后,有序保证对象所存储的转发队列信息再被更新,若新的目标转发队列对应的第四发送倒计时间为4μs,则此时,有序保证对象的倒计时间字段中的数值0μs将被更新为4μs,在此不做具体限制。In one embodiment, assuming that the preset value is 0μs, the time interval is 1μs, and the value in the countdown time field is 3μs, when the value in the countdown time field decreases to 0μs at a time interval of 1μs, the value in the countdown time field will remain at 0μs. After a period of time, the forwarding queue information stored in the order guarantee object is updated again. If the fourth sending countdown time corresponding to the new target forwarding queue is 4μs, then at this time, the value 0μs in the countdown time field of the order guarantee object will be updated to 4μs. No specific restrictions are made here.
在一实施例中,当有序保证对象对应的倒计时间字段中的第二发送倒计时间(比如候选队列的发送倒计时间)递减到预设数值,可以在有序保证对象中清除该队列的所有记录。In one embodiment, when the second sending countdown time in the countdown time field corresponding to the order guarantee object (such as the sending countdown time of the candidate queue) decreases to a preset value, all records of the queue can be cleared in the order guarantee object.
下面以一个具体示例对确定目标报文所属的有序保证对象进行具体的说明。The following is a specific example to explain in detail how to determine the order guarantee object to which the target message belongs.
参照图8,图8是本申请一个具体示例提供的确定目标报文所属的有序保证对象的示意图。在图8中,假设有m个入端口,即入端口1,入端口2,......,入端口m,其中m为正整数,以及有一个出端口,其中,该出端口按照每“入端口+计划驻留时间”的预设粒度创建不同的有序保证对象。若从某个入端口上收到的具有相应计划驻留时间的目标报文,则可以根据入端口和计划驻留时间对目标报文进行归类处理,得到目标报文的归属对象,将归属对象确定为目标报文所属的有序保证对象。Referring to FIG8 , FIG8 is a schematic diagram of determining the ordered guarantee object to which the target message belongs, provided by a specific example of the present application. In FIG8 , it is assumed that there are m ingress ports, namely, ingress port 1, ingress port 2, ..., ingress port m, where m is a positive integer, and there is one egress port, wherein the egress port creates different ordered guarantee objects according to the preset granularity of each "ingress port + planned residence time". If a target message with a corresponding planned residence time is received from a certain ingress port, the target message can be classified and processed according to the ingress port and the planned residence time to obtain the object to which the target message belongs, and the belonging object is determined as the ordered guarantee object to which the target message belongs.
可以理解的是,上述每个有序保证对象(即OGO)可以是硬件上分配的一个简单的寄存器或内存单元,本实施例对此不做限制。It is understandable that each of the above-mentioned order guarantee objects (ie, OGOs) may be a simple register or memory unit allocated on the hardware, and this embodiment does not impose any limitation on this.
为了更加清楚的说明报文调度方法的处理流程,下面以具体的示例进行说明。In order to more clearly illustrate the processing flow of the message scheduling method, a specific example is given below.
示例一:Example 1:
在网络拓扑中,节点R从其某个入端口收到了一段报文序列,其中,报文P1~P5是属于同一条数据流的5个报文,这5个报文在源端几乎同时被发送。但在报文转发过程中,由于各个报文面临的干扰时延不同,因此,节点R收到报文P2的时间比收到报文P1的时间迟1μs,节点R收到报文P3的时间比收到报文P2的时间迟1μs,节点R收到报文P4的时间比收到报文P3的时间迟1μs,节点R收到报文P5的时间比收到报文P4的时间迟1μs,即是说,节点R依次收到报文P1、报文P2、报文P3、报文P4和报文P5,且每收到的相邻的两个报文之间的时延相差1μs。因此,在节点R上,越迟收到的报文将具有更小的允许排队时延Q。如图9所示,P1的允许排队时延Q为25μs,即P1(25),而P2的允许排队时延Q为24μs,即P2(24),P3的允许排队时延Q为23μs,即P3(23),P4的允许排队时延Q为22μs,即P4(22),P5的允许排队时延Q为21μs,即P5(21)。In the network topology, node R receives a sequence of messages from one of its inbound ports, among which messages P1 to P5 are five messages belonging to the same data stream, and these five messages are sent almost simultaneously at the source end. However, in the process of message forwarding, due to the different interference delays faced by each message, the time when node R receives message P2 is 1μs later than the time when it receives message P1, the time when node R receives message P3 is 1μs later than the time when it receives message P2, the time when node R receives message P4 is 1μs later than the time when it receives message P3, and the time when node R receives message P5 is 1μs later than the time when it receives message P4. That is to say, node R receives messages P1, P2, P3, P4 and P5 in sequence, and the delay between each adjacent message received is 1μs. Therefore, at node R, the later received message will have a smaller allowed queuing delay Q. As shown in Figure 9, the allowed queuing delay Q of P1 is 25μs, that is, P1(25), while the allowed queuing delay Q of P2 is 24μs, that is, P2(24), the allowed queuing delay Q of P3 is 23μs, that is, P3(23), the allowed queuing delay Q of P4 is 22μs, that is, P4(22), and the allowed queuing delay Q of P5 is 21μs, that is, P5(21).
假设节点R维护的Deadline队列(即转发队列)的授权发送时间AT为10μs,用于对Deadline队列的发送倒计时间CT进行递减的时间间隔I为1μs。并且,假设节点R在T0时 刻收到报文P1,在T0+1μs时刻收到报文P2,等等。Assume that the authorized sending time AT of the Deadline queue (i.e., the forwarding queue) maintained by node R is 10 μs, and the time interval I used to decrement the sending countdown time CT of the Deadline queue is 1 μs. Also, assume that node R is at T0 Message P1 is received at time T0+1μs, message P2 is received at time T0+1μs, and so on.
若节点R设置的Deadline队列有queue-A、queue-B、queue-C,假设在T0至T0+1μs的时间间隔内,queue-A的CT、queue-B的CT以及queue-C的CT分别为25μs,15μs,5μs。在T0+1μs至T0+2μs的时间间隔内,queue-A的CT,queue-B的CT以及queue-C的CT分别递减到24μs,14μs,4μs。If the deadline queues set by node R include queue-A, queue-B, and queue-C, and it is assumed that in the time interval from T0 to T0+1μs, the CT of queue-A, the CT of queue-B, and the CT of queue-C are 25μs, 15μs, and 5μs respectively. In the time interval from T0+1μs to T0+2μs, the CT of queue-A, the CT of queue-B, and the CT of queue-C decrease to 24μs, 14μs, and 4μs respectively.
由于在T0至T0+1μs的时间间隔I内,同时收到P1和P2,按照相关技术,比如,报文根据Q>=CT的规则入队,即当报文的允许排队时延大于或者等于发送倒计时间,即可将该报文缓存至该发送倒计时间对应的队列中,则报文P1会插入到queue-A中,P2会插入到queue-B中,又因为queue-B的发送倒计时间小于queue-A的发送倒计时间(即相较于queue-A,queue-B先对报文P2进行调度),所以节点R将会先发送报文P2,再发送报文P1,因此,报文P2和报文P1之间会发生乱序;同样地,报文根据Q<=CT的规则入队也会出现报文乱序的问题,为了避免重复冗余,此处不再赘述。Since P1 and P2 are received at the same time within the time interval I from T0 to T0+1μs, according to relevant technologies, for example, the message is queued according to the rule of Q>=CT, that is, when the allowed queuing delay of the message is greater than or equal to the sending countdown time, the message can be cached in the queue corresponding to the sending countdown time, then message P1 will be inserted into queue-A, and P2 will be inserted into queue-B. Because the sending countdown time of queue-B is less than the sending countdown time of queue-A (that is, compared with queue-A, queue-B schedules message P2 first), node R will send message P2 first, and then send message P1. Therefore, message P2 and message P1 will be out of order. Similarly, when the message is queued according to the rule of Q<=CT, there will be a problem of message out of order. In order to avoid repetition and redundancy, it will not be repeated here.
基于此,可以根据初选队列的第一发送倒计时间和有序保证对象所存储的转发队列信息即可对目标报文进行调度,具体实现过程如下:Based on this, the target message can be scheduled according to the first sending countdown time of the preliminary selection queue and the forwarding queue information stored in the order guarantee object. The specific implementation process is as follows:
首先,由于报文P1~P5在源端几乎同时被发送,因此报文P1~P5的计划驻留时间相同,假设按照每“入端口+计划驻留时间”的预设粒度对目标报文进行归类处理,则上述报文序列属于相同的有序保证对象,则:First, since messages P1 to P5 are sent almost simultaneously at the source end, the planned residence time of messages P1 to P5 is the same. Assuming that the target messages are classified and processed according to the preset granularity of each "inbound port + planned residence time", the above message sequences belong to the same order guarantee object, then:
T0时刻,收到目标报文P1,其中,目标报文P1的允许排队时延Q等于25,因此,可以将目标报文P1缓存至queue-A(此时,队列queue-A的第三发送倒计时间等于25)。具体地,根据授权发送时间、第三发送倒计时间和允许排队时延确定初选队列,由于queue-A的第三发送倒计时间满足25<=25<35,其中,35为queue-A的第三发送倒计时间与授权发送时间的和,即允许排队时延大于或者等于queue-A的第三发送倒计时间且小于queue-A的第三发送倒计时间与授权发送时间的和,因此,将queue-A确定为初选队列;紧接着,假设目标报文P1所属的有序保证对象所记录的第二发送倒计时间为预设数值0,即所选择的初选队列queue-A的第一发送倒计时间(即25)大于有序保证对象所记录的第二发送倒计时间,因此,将初选队列queue-A确定为目标转发队列。当目标报文P1缓存至目标转发队列queue-A后,相应地,有序保证对象所记录的第二发送倒计时间(即0)被更新为目标转发队列queue-A的第四发送倒计时间(即25),此时,有序保证对象所对应的候选队列为queue-A。At time T0, the target message P1 is received, wherein the allowed queuing delay Q of the target message P1 is equal to 25, therefore, the target message P1 can be cached to queue-A (at this time, the third sending countdown time of queue-A is equal to 25). Specifically, the preliminary selection queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay. Since the third sending countdown time of queue-A satisfies 25<=25<35, wherein 35 is the sum of the third sending countdown time of queue-A and the authorized sending time, that is, the allowed queuing delay is greater than or equal to the third sending countdown time of queue-A and less than the sum of the third sending countdown time of queue-A and the authorized sending time, therefore, queue-A is determined as the preliminary selection queue; next, assuming that the second sending countdown time recorded by the ordered guarantee object to which the target message P1 belongs is the preset value 0, that is, the first sending countdown time (i.e. 25) of the selected preliminary selection queue queue-A is greater than the second sending countdown time recorded by the ordered guarantee object, therefore, the preliminary selection queue queue-A is determined as the target forwarding queue. When the target message P1 is cached to the target forwarding queue queue-A, the second sending countdown time (i.e. 0) recorded by the order guarantee object is updated to the fourth sending countdown time (i.e. 25) of the target forwarding queue queue-A. At this time, the candidate queue corresponding to the order guarantee object is queue-A.
在接近T0+1μs时刻(此时各个发送倒计时间暂未跳变),收到目标报文P2,其中,目标报文P2的允许排队时延Q等于24,因此,可以将目标报文P2缓存至queue-A(此时,queue-A的第三发送倒计时间仍然等于25,即将跳变为24)。具体地,根据授权发送时间、第三发送倒计时间和允许排队时延确定初选队列,由于queue-B的第三发送倒计时间满足15<=24<25,其中,25为queue-B的第三发送倒计时间与授权发送时间的和,即允许排队时延大于或者等于queue-B的第三发送倒计时间且小于queue-B的第三发送倒计时间与授权发送时间的和,因此,将queue-B确定为初选队列;紧接着,由于此时有序保证对象所记录的第二发送倒计时间为25(暂未跳变为24),因此,所选择的初选队列queue-B的第一发送倒计时间(即15)小于有序保证对象所记录的第二发送倒计时间(即候选队列queue-A的发送倒计时间25),因此,将候选队列queue-A确定为目标转发队列。当目标报文P2缓存至目标转发队列queue-A 后,相应地,有序保证对象所记录的第二发送倒计时间(即25)被更新为目标转发队列queue-A的第四发送倒计时间(即25,与之前有序保证对象所记录的第二发送倒计时间相同),此时,有序保证对象所对应的候选队列为queue-A。At a time close to T0+1μs (at this time, the sending countdown time has not yet jumped), the target message P2 is received, wherein the allowed queuing delay Q of the target message P2 is equal to 24. Therefore, the target message P2 can be cached to queue-A (at this time, the third sending countdown time of queue-A is still equal to 25, which is about to jump to 24). Specifically, the preliminary queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay. Since the third sending countdown time of queue-B satisfies 15<=24<25, where 25 is the sum of the third sending countdown time of queue-B and the authorized sending time, that is, the allowed queuing delay is greater than or equal to the third sending countdown time of queue-B and less than the sum of the third sending countdown time of queue-B and the authorized sending time, therefore, queue-B is determined as the preliminary queue; then, since the second sending countdown time recorded by the order guarantee object is 25 (not yet changed to 24), therefore, the first sending countdown time (i.e. 15) of the selected preliminary queue queue-B is less than the second sending countdown time recorded by the order guarantee object (i.e. the sending countdown time of the candidate queue queue-A, 25), therefore, the candidate queue queue-A is determined as the target forwarding queue. When the target message P2 is cached to the target forwarding queue queue-A Afterwards, accordingly, the second sending countdown time (i.e. 25) recorded by the order guarantee object is updated to the fourth sending countdown time of the target forwarding queue queue-A (i.e. 25, the same as the second sending countdown time recorded by the previous order guarantee object). At this time, the candidate queue corresponding to the order guarantee object is queue-A.
同样地,在接近T0+2μs时刻,收到目标报文P3,其中,目标报文P3的允许排队时延Q等于23,因此,可以将目标报文P3缓存至queue-A(此时,queue-A的第三发送倒计时间仍然等于24,即将跳变为23)。具体地,根据授权发送时间、第三发送倒计时间和允许排队时延确定初选队列,由于此时queue-B的第三发送倒计时间为14,其满足14<=23<24,因此,将queue-B确定为初选队列;紧接着,由于此时有序保证对象所记录的第二发送倒计时间递减到24(暂未跳变为23),因此,所选择的初选队列queue-B的第一发送倒计时间(即14)小于有序保证对象所记录的第二发送倒计时间(即候选队列queue-A发送倒计时间24),因此,将候选队列queue-A确定为目标转发队列。当目标报文P3缓存至目标转发队列queue-A后,相应地,有序保证对象所记录的第二发送倒计时间(即24)被更新为目标转发队列queue-A的第四发送倒计时间(即24,与之前有序保证对象所记录的第二发送倒计时间相同),此时,有序保证对象所对应的候选队列为queue-A。Similarly, at a time close to T0+2μs, the target message P3 is received, wherein the allowed queuing delay Q of the target message P3 is equal to 23, therefore, the target message P3 can be cached to queue-A (at this time, the third sending countdown time of queue-A is still equal to 24, which is about to jump to 23). Specifically, the preliminary selection queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay. Since the third sending countdown time of queue-B is 14 at this time, it satisfies 14<=23<24, therefore, queue-B is determined as the preliminary selection queue; then, since the second sending countdown time recorded by the order guarantee object is decreased to 24 (not yet jumped to 23), therefore, the first sending countdown time (i.e. 14) of the selected preliminary selection queue queue-B is less than the second sending countdown time recorded by the order guarantee object (i.e. the sending countdown time of the candidate queue queue-A is 24), therefore, the candidate queue queue-A is determined as the target forwarding queue. When the target message P3 is cached to the target forwarding queue queue-A, the second sending countdown time (i.e. 24) recorded by the order guarantee object is updated to the fourth sending countdown time of the target forwarding queue queue-A (i.e. 24, the same as the second sending countdown time recorded by the previous order guarantee object). At this time, the candidate queue corresponding to the order guarantee object is queue-A.
同样地,在接近T0+3μs时刻,目标报文P4也会被缓存至queue-A;在接近T0+4μs时刻,目标报文P5也会被缓存至queue-A,为了避免重复冗余,此处不再赘述。即,节点R可以有序地发送属于同一条数据流中的报文P1~P5。Similarly, at the time close to T0+3μs, the target message P4 will also be cached in queue-A; at the time close to T0+4μs, the target message P5 will also be cached in queue-A. In order to avoid redundancy, it will not be repeated here. That is, node R can send messages P1 to P5 belonging to the same data flow in order.
由此可见,本示例中采用的有序保证对象以及报文调度方法(比如目标报文根据目标报文的允许排队时延和有序保证对象的规则入队),能够解决相关技术中的Deadline转发机制由于时延补偿而导致的报文乱序问题(比如报文根据Q>=CT的规则入队,或者报文根据Q<=CT的规则入队等等),进而有利于满足确定性业务的需求。It can be seen that the ordered guarantee object and message scheduling method used in this example (for example, the target message is queued according to the allowed queuing delay of the target message and the rules of the ordered guarantee object) can solve the message disorder problem caused by delay compensation in the Deadline forwarding mechanism in the related technology (for example, the message is queued according to the rule of Q>=CT, or the message is queued according to the rule of Q<=CT, etc.), which is conducive to meeting the needs of deterministic business.
另外,参照图10,本申请的一个实施例还提供了一种网络设备,该网络设备200包括存储器202、处理器201及存储在存储器202上并可在处理器201上运行的计算机程序。In addition, referring to FIG. 10 , an embodiment of the present application further provides a network device, wherein the network device 200 includes a memory 202 , a processor 201 , and a computer program stored in the memory 202 and executable on the processor 201 .
处理器201和存储器202可以通过总线或者其他方式连接。The processor 201 and the memory 202 may be connected via a bus or other means.
存储器202作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序以及非暂态性计算机可执行程序。此外,存储器202可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施方式中,存储器202可选包括相对于处理器201远程设置的存储器,这些远程存储器可以通过网络连接至该处理器201。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 202, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory 202 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory 202 may optionally include a memory remotely arranged relative to the processor 201, and these remote memories may be connected to the processor 201 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
需要说明的是,本实施例中的网络设备200,可以应用为如图1所示实施例中的任一个节点,本实施例中的网络设备200能够构成图1所示实施例中的网络拓扑的一部分,这些实施例均属于相同的发明构思,因此这些实施例具有相同的实现原理以及技术效果,此处不再详述。It should be noted that the network device 200 in this embodiment can be applied as any node in the embodiment shown in Figure 1. The network device 200 in this embodiment can constitute a part of the network topology in the embodiment shown in Figure 1. These embodiments all belong to the same inventive concept, so these embodiments have the same implementation principles and technical effects, which will not be described in detail here.
实现上述实施例的报文调度方法所需的非暂态软件程序以及指令存储在存储器202中,当被处理器201执行时,执行上述实施例中的报文调度方法,例如,执行以上描述的图3中的方法步骤S110至S140、图4中的方法步骤S210至S220、图5中的方法步骤S310至S320、图6中的方法步骤S410至S420、图7中的方法步骤S510至S520。 The non-transient software programs and instructions required to implement the message scheduling method of the above embodiment are stored in the memory 202. When executed by the processor 201, the message scheduling method in the above embodiment is executed, for example, the method steps S110 to S140 in Figure 3, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7 described above are executed.
以上所描述的设备实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
此外,本申请的一个实施例还提供了一种计算机可读存储介质,该计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被一个处理器或控制器执行,例如,被上述设备实施例中的一个处理器执行,可使得上述处理器执行上述实施例中的报文调度方法,例如,执行以上描述的图3中的方法步骤S110至S140、图4中的方法步骤S210至S220、图5中的方法步骤S310至S320、图6中的方法步骤S410至S420、图7中的方法步骤S510至S520。In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are executed by a processor or controller, for example, by a processor in the above-mentioned device embodiment, so that the above-mentioned processor can execute the message scheduling method in the above-mentioned embodiment, for example, execute the method steps S110 to S140 in Figure 3 described above, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7.
此外,本申请的一个实施例还提供了一种计算机程序产品,包括计算机程序或计算机指令,计算机程序或计算机指令存储在计算机可读存储介质中,计算机设备的处理器从计算机可读存储介质读取计算机程序或计算机指令,处理器执行计算机程序或计算机指令,使得计算机设备执行上述实施例中的报文调度方法,例如,执行以上描述的图3中的方法步骤S110至S140、图4中的方法步骤S210至S220、图5中的方法步骤S310至S320、图6中的方法步骤S410至S420、图7中的方法步骤S510至S520。In addition, an embodiment of the present application also provides a computer program product, including a computer program or computer instructions, the computer program or computer instructions are stored in a computer-readable storage medium, the processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the message scheduling method in the above embodiment, for example, executes the method steps S110 to S140 in Figure 3, the method steps S210 to S220 in Figure 4, the method steps S310 to S320 in Figure 5, the method steps S410 to S420 in Figure 6, and the method steps S510 to S520 in Figure 7 described above.
本申请实施例包括:首先确定目标报文所属的有序保证对象,有序保证对象用于存储最近一次缓存有序保证对象所对应的报文的转发队列信息,然后获取目标报文的允许排队时延,允许排队时延用于表征目标报文在转发队列中等待被发送的最大排队时长,根据允许排队时延确定初选队列,初选队列对应有第一发送倒计时间,因此,可以根据第一发送倒计时间和有序保证对象所存储的转发队列信息对目标报文进行调度,既无需选择参数,还能够避免节点在发送同一条数据流中的目标报文时出现报文乱序的情况,同时还无需在报文中携带本地截止时间堆栈,进而能够降低报文调度的复杂度。因此,本申请实施例能够在无需选择参数的情况下,降低报文调度的复杂度,以及解决报文乱序的问题。The embodiment of the present application includes: firstly determining the ordered guarantee object to which the target message belongs, the ordered guarantee object is used to store the forwarding queue information of the message corresponding to the ordered guarantee object cached most recently, then obtaining the allowed queuing delay of the target message, the allowed queuing delay is used to characterize the maximum queuing time of the target message waiting to be sent in the forwarding queue, determining the preliminary selection queue according to the allowed queuing delay, the preliminary selection queue corresponds to a first sending countdown time, therefore, the target message can be scheduled according to the first sending countdown time and the forwarding queue information stored by the ordered guarantee object, without selecting parameters, and can also avoid the situation that the node sends the target message in the same data stream out of order, and at the same time, there is no need to carry the local deadline stack in the message, thereby reducing the complexity of message scheduling. Therefore, the embodiment of the present application can reduce the complexity of message scheduling and solve the problem of message out of order without selecting parameters.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统可以被实施为软件、固件、硬件及其适当的组合。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。 It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

Claims (17)

  1. 一种报文调度方法,包括:A message scheduling method, comprising:
    确定目标报文所属的有序保证对象,所述有序保证对象用于存储最近一次缓存所述有序保证对象所对应的报文的转发队列信息;Determine the order guarantee object to which the target message belongs, the order guarantee object being used to store the forwarding queue information of the message corresponding to the order guarantee object that was cached most recently;
    获取所述目标报文的允许排队时延,所述允许排队时延用于表征所述目标报文在转发队列中等待被发送的最大排队时长;Acquire an allowed queuing delay of the target message, where the allowed queuing delay is used to represent a maximum queuing time length of the target message waiting to be sent in a forwarding queue;
    根据所述允许排队时延确定初选队列,所述初选队列对应有第一发送倒计时间;Determine a preliminary selection queue according to the allowed queuing delay, wherein the preliminary selection queue corresponds to a first sending countdown time;
    根据所述第一发送倒计时间和所述有序保证对象所存储的转发队列信息对所述目标报文进行调度。The target message is scheduled according to the first sending countdown time and the forwarding queue information stored in the order guarantee object.
  2. 根据权利要求1所述的报文调度方法,其中,所述有序保证对象所存储的转发队列信息包括第二发送倒计时间;The message scheduling method according to claim 1, wherein the forwarding queue information stored in the order guarantee object includes a second sending countdown time;
    所述根据所述第一发送倒计时间和所述有序保证对象所存储的转发队列信息对所述目标报文进行调度,包括:The scheduling of the target message according to the first sending countdown time and the forwarding queue information stored in the order guarantee object includes:
    获取所述有序保证对象所存储的所述第二发送倒计时间;Obtaining the second sending countdown time stored in the order guarantee object;
    将所述第二发送倒计时间和所述第一发送倒计时间进行比较,得到第一比较结果;Comparing the second sending countdown time with the first sending countdown time to obtain a first comparison result;
    根据所述第一比较结果对所述目标报文进行调度。The target message is scheduled according to the first comparison result.
  3. 根据权利要求1所述的报文调度方法,其中,所述有序保证对象所存储的转发队列信息至少包括队列编号或队列名称中的一个;The message scheduling method according to claim 1, wherein the forwarding queue information stored in the order guarantee object includes at least one of a queue number or a queue name;
    所述根据所述第一发送倒计时间和所述有序保证对象所存储的转发队列信息对所述目标报文进行调度,包括:The scheduling of the target message according to the first sending countdown time and the forwarding queue information stored in the order guarantee object includes:
    根据所述有序保证对象所存储的转发队列信息获取第二发送倒计时间;Obtaining a second sending countdown time according to the forwarding queue information stored in the order guarantee object;
    将所述第二发送倒计时间和所述第一发送倒计时间进行比较,得到第一比较结果;Comparing the second sending countdown time with the first sending countdown time to obtain a first comparison result;
    根据所述第一比较结果对所述目标报文进行调度。The target message is scheduled according to the first comparison result.
  4. 根据权利要求2或3所述的报文调度方法,其中,所述根据所述第一比较结果对所述目标报文进行调度,包括:The message scheduling method according to claim 2 or 3, wherein scheduling the target message according to the first comparison result comprises:
    根据所述第一比较结果确定目标转发队列;Determine a target forwarding queue according to the first comparison result;
    将所述目标报文缓存至所述目标转发队列,等待所述目标转发队列对所述目标报文进行调度。The target message is cached in the target forwarding queue, and the target forwarding queue is waited for scheduling the target message.
  5. 根据权利要求4所述的报文调度方法,其中,所述有序保证对象所存储的转发队列信息对应于候选队列,所述候选队列对应于最近一次缓存所述有序保证对象所对应的报文的转发队列;The message scheduling method according to claim 4, wherein the forwarding queue information stored in the order guarantee object corresponds to a candidate queue, and the candidate queue corresponds to a forwarding queue that most recently cached the message corresponding to the order guarantee object;
    所述根据所述第一比较结果确定目标转发队列,包括:The determining the target forwarding queue according to the first comparison result includes:
    当所述第一比较结果为所述第一发送倒计时间小于所述第二发送倒计时间,将所述候选队列确定为所述目标转发队列。When the first comparison result is that the first sending countdown time is less than the second sending countdown time, the candidate queue is determined as the target forwarding queue.
  6. 根据权利要求4所述的报文调度方法,其中,所述根据所述第一比较结果确定目标转发队列,包括:The message scheduling method according to claim 4, wherein determining the target forwarding queue according to the first comparison result comprises:
    当所述第一比较结果为所述第一发送倒计时间大于或者等于所述第二发送倒计时间,将所述初选队列确定为所述目标转发队列。 When the first comparison result is that the first sending countdown time is greater than or equal to the second sending countdown time, the preliminary selection queue is determined as the target forwarding queue.
  7. 根据权利要求1所述的报文调度方法,其中,所述根据所述允许排队时延确定初选队列,包括:The message scheduling method according to claim 1, wherein the determining the preliminary queue according to the allowed queuing delay comprises:
    获取授权发送时间和所述转发队列的第三发送倒计时间,其中,所述授权发送时间用于表征允许所述转发队列发送报文的最长持续时间;Obtaining an authorized sending time and a third sending countdown time of the forwarding queue, wherein the authorized sending time is used to represent the maximum duration for which the forwarding queue is allowed to send a message;
    根据所述授权发送时间、所述第三发送倒计时间和所述允许排队时延确定初选队列。A preliminary queue is determined according to the authorized sending time, the third sending countdown time and the allowed queuing delay.
  8. 根据权利要求7所述的报文调度方法,其中,所述根据所述授权发送时间、所述第三发送倒计时间和所述允许排队时延确定初选队列,包括:The message scheduling method according to claim 7, wherein the determining the preliminary queue according to the authorized sending time, the third sending countdown time and the allowed queuing delay comprises:
    将所述第三发送倒计时间与所述授权发送时间的和、所述允许排队时延、所述第三发送倒计时间进行比较,得到第二比较结果;Compare the third sending countdown time with the sum of the authorized sending time, the allowed queuing delay, and the third sending countdown time to obtain a second comparison result;
    根据所述第二比较结果确定初选队列。A preliminary selection queue is determined according to the second comparison result.
  9. 根据权利要求8所述的报文调度方法,其中,所述转发队列的数量有多个,不同的所述转发队列对应有不同的所述第三发送倒计时间,不同的所述转发队列对应有相同的所述授权发送时间;The message scheduling method according to claim 8, wherein there are multiple forwarding queues, different forwarding queues correspond to different third sending countdown times, and different forwarding queues correspond to the same authorized sending time;
    所述根据所述第二比较结果确定初选队列,包括:The determining of a preliminary selection queue according to the second comparison result includes:
    当所述第二比较结果为所述允许排队时延大于或者等于所述第三发送倒计时间且小于所述第三发送倒计时间与所述授权发送时间的和,将使得所述允许排队时延大于或者等于所述第三发送倒计时间且小于所述第三发送倒计时间与所述授权发送时间的和的转发队列确定为初选队列。When the second comparison result is that the allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time, the forwarding queue whose allowed queuing delay is greater than or equal to the third sending countdown time and less than the sum of the third sending countdown time and the authorized sending time is determined as the preliminary queue.
  10. 根据权利要求1所述的报文调度方法,其中,所述确定目标报文所属的有序保证对象,包括:The message scheduling method according to claim 1, wherein the step of determining the order guarantee object to which the target message belongs comprises:
    根据预设粒度对所述目标报文进行归类处理,得到所述目标报文的归属对象;Classify the target message according to a preset granularity to obtain the object to which the target message belongs;
    将所述归属对象确定为所述目标报文所属的有序保证对象。The belonging object is determined as the order guarantee object to which the target message belongs.
  11. 根据权利要求4所述的报文调度方法,其中,所述有序保证对象所存储的转发队列信息对应于候选队列,所述候选队列对应于最近一次缓存所述有序保证对象所对应的报文的转发队列;The message scheduling method according to claim 4, wherein the forwarding queue information stored in the order guarantee object corresponds to a candidate queue, and the candidate queue corresponds to a forwarding queue that most recently cached the message corresponding to the order guarantee object;
    所述报文调度方法还包括:The message scheduling method also includes:
    当所述目标报文缓存至所述目标转发队列,将所述有序保证对象所存储的转发队列信息更新为所述目标转发队列的队列信息。When the target message is cached in the target forwarding queue, the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue.
  12. 根据权利要求11所述的报文调度方法,还包括:The message scheduling method according to claim 11, further comprising:
    在将所述有序保证对象所存储的转发队列信息更新为所述目标转发队列的队列信息之后,当目标转发队列对应的第四发送倒计时间递减为预设数值,清空所述有序保证对象所存储的转发队列信息。After the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, when the fourth sending countdown time corresponding to the target forwarding queue decreases to a preset value, the forwarding queue information stored in the order guarantee object is cleared.
  13. 根据权利要求11所述的报文调度方法,其中,所述有序保证对象包括用于存储所述第二发送倒计时间的倒计时间字段;The message scheduling method according to claim 11, wherein the order guarantee object includes a countdown time field for storing the second sending countdown time;
    所述将所述有序保证对象所存储的转发队列信息更新为所述目标转发队列的队列信息之后,所述报文调度方法还包括:After the forwarding queue information stored in the order guarantee object is updated to the queue information of the target forwarding queue, the message scheduling method further includes:
    将所述倒计时间字段中的所述第二发送倒计时间更新为所述目标转发队列对应的第四发送倒计时间;Updating the second sending countdown time in the countdown time field to the fourth sending countdown time corresponding to the target forwarding queue;
    利用时间间隔对所述倒计时间字段中的数值进行递减,直到所述倒计时间字段中的数值 为预设数值,其中,所述时间间隔根据授权发送时间计算得到。The value in the countdown time field is decremented using a time interval until the value in the countdown time field is is a preset value, wherein the time interval is calculated according to the authorized sending time.
  14. 根据权利要求13所述的报文调度方法,还包括:The message scheduling method according to claim 13, further comprising:
    当所述倒计时间字段中的数值递减到所述预设数值,保持所述倒计时间字段中的数值不变,直到所述有序保证对象所存储的转发队列信息再被更新。When the value in the countdown time field decreases to the preset value, the value in the countdown time field is kept unchanged until the forwarding queue information stored in the order guarantee object is updated again.
  15. 一种网络设备,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其中,所述处理器执行所述计算机程序时实现如权利要求1至14中任意一项所述的报文调度方法。A network device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the message scheduling method as claimed in any one of claims 1 to 14 when executing the computer program.
  16. 一种计算机可读存储介质,存储有计算机可执行指令,其中,所述计算机可执行指令用于执行权利要求1至14中任意一项所述的报文调度方法。A computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the message scheduling method described in any one of claims 1 to 14.
  17. 一种计算机程序产品,包括计算机程序或计算机指令,其中,所述计算机程序或所述计算机指令存储在计算机可读存储介质中,计算机设备的处理器从所述计算机可读存储介质读取所述计算机程序或所述计算机指令,所述处理器执行所述计算机程序或所述计算机指令,使得所述计算机设备执行如权利要求1至14中任意一项所述的报文调度方法。 A computer program product, comprising a computer program or computer instructions, wherein the computer program or the computer instructions are stored in a computer-readable storage medium, a processor of a computer device reads the computer program or the computer instructions from the computer-readable storage medium, and the processor executes the computer program or the computer instructions, so that the computer device executes the message scheduling method as described in any one of claims 1 to 14.
PCT/CN2023/107728 2022-10-20 2023-07-17 Packet scheduling method, network device, storage medium, and computer program product WO2024082727A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211289451.2 2022-10-20
CN202211289451.2A CN117955928A (en) 2022-10-20 2022-10-20 Message scheduling method, network device, storage medium and computer program product

Publications (1)

Publication Number Publication Date
WO2024082727A1 true WO2024082727A1 (en) 2024-04-25

Family

ID=90736846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/107728 WO2024082727A1 (en) 2022-10-20 2023-07-17 Packet scheduling method, network device, storage medium, and computer program product

Country Status (2)

Country Link
CN (1) CN117955928A (en)
WO (1) WO2024082727A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614956A (en) * 2003-11-03 2005-05-11 阿尔卡特公司 Method and apparatus for scheduling prior packet level
WO2021119675A2 (en) * 2021-01-19 2021-06-17 Futurewei Technologies, Inc. Guaranteed latency based forwarding
CN113783793A (en) * 2021-07-23 2021-12-10 北京邮电大学 Traffic scheduling method for time-sensitive data frame and related equipment
CN114095453A (en) * 2020-07-31 2022-02-25 华为技术有限公司 Method and related device for scheduling data packets

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1614956A (en) * 2003-11-03 2005-05-11 阿尔卡特公司 Method and apparatus for scheduling prior packet level
CN114095453A (en) * 2020-07-31 2022-02-25 华为技术有限公司 Method and related device for scheduling data packets
WO2021119675A2 (en) * 2021-01-19 2021-06-17 Futurewei Technologies, Inc. Guaranteed latency based forwarding
CN113783793A (en) * 2021-07-23 2021-12-10 北京邮电大学 Traffic scheduling method for time-sensitive data frame and related equipment

Also Published As

Publication number Publication date
CN117955928A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
Nayak et al. Time-sensitive software-defined network (TSSDN) for real-time applications
US10326713B2 (en) Data enqueuing method, data dequeuing method, and queue management circuit
US9380577B2 (en) Method and device for collaborative data communication in a radio network
US6477144B1 (en) Time linked scheduling of cell-based traffic
US20230254263A1 (en) Packet forwarding method, packet forwarding apparatus and electronic device
US20070195787A1 (en) Methods and apparatus for per-session uplink/downlink flow scheduling in multiple access networks
KR101106941B1 (en) Method, apparatus and system for guaranteed packet delivery times in asynchronous networks
US20070147422A1 (en) Bandwidth management apparatus
JPH07264216A (en) Local area network and its transmission sequence automatic decision method
CN113141320B (en) System, method and application for rate-limited service planning and scheduling
WO2022222242A1 (en) Method and apparatus for forwarding time-sensitive networking message, terminal, and storage medium
US20220255873A1 (en) Data transmission method and apparatus
JP7241194B2 (en) MEMORY MANAGEMENT METHOD AND APPARATUS
WO2024082727A1 (en) Packet scheduling method, network device, storage medium, and computer program product
US8929216B2 (en) Packet scheduling method and apparatus based on fair bandwidth allocation
Agrawal et al. Contention resolution with message deadlines
US10764191B2 (en) Device and method for managing end-to-end connections
US5706430A (en) Method and system for sequentially broadcasting data according to pre-assigned time slots with and without the reception of a synchronization packet
CN111131066B (en) Traffic shaping method and device
JPH10171667A (en) Task management method
WO2024061114A1 (en) Message scheduling method, electronic device, and computer-readable storage medium
Patt-Shamir et al. The space requirement of local forwarding on acyclic networks
WO2024055675A1 (en) Message scheduling method, network device, storage medium, and computer program product
JP2002281066A (en) Queue assignment system and its method for packet exchange
CN112751777A (en) High-rate flow control method and device