Message scheduling method and forwarding device
By adopting the message scheduling method in the periodic scheduling technology, using the time slot rotation and message squeezing mechanism, the problem of the queue cache packets cannot guarantee deterministic jitter when they exceed the maximum time slot carrying bit resources, and the effect of high bandwidth utilization and deterministic jitter is achieved.
Patent Information
- Application Number
- PCT/CN2024/121981
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-31
- Filing Date
- 2024-09-27
- Publication Date
- 2025-05-08
AI Technical Summary
The existing periodic scheduling technology cannot guarantee deterministic jitter of 2T when queue cache messages exceed the maximum bearing bit resources in the time slot, and reducing aggregation traffic will lead to a significant reduction in bandwidth utilization.
A message scheduling method is adopted to schedule messages in the associated cache queue through time slot rotation. When the messages of the current dispatch queue exceed the time slot scheduling quantity, the remaining messages are squeezed to the next time slot, and the current queue number is carried in the remaining messages.
While increasing bandwidth utilization, the deterministic jitter of 2T is ensured and does not rely on the precise orchestration of the control plane.
Smart Images

Figure CN2024121981_08052025_PF_FP_ABST
Abstract
Description
Message scheduling method and forwarding device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure is based on and claims the priority of Chinese patent application No. 202311440546.4 filed on October 31, 2023, and all the disclosed contents thereof are incorporated into this disclosure by reference. Technical Field
[0003] The present disclosure relates to the field of communications, and in particular to a message scheduling method and forwarding device. Background Art
[0004] The Internet Engineering Task Force (IETF) has proposed a deterministic networking technology based on periodic scheduling. This mechanism involves multiple queues, each associated with a time slot (T, for example, 10 μs) and the number of queues (N). Packets in these queues are scheduled in a round-robin fashion. This technology can limit end-to-end service jitter to less than 2 T, making it a popular deterministic networking technology.
[0005] Existing periodic scheduling technology solutions cannot guarantee 2T deterministic jitter when the queue buffers messages that exceed the maximum bit resources of the time slot. If the queue buffers messages, it will cause a significant reduction in bandwidth utilization.
[0006] Summary of the Invention
[0007] The embodiments of the present disclosure provide a periodic scheduling method and forwarding device to at least solve the problem in the related art that when the aggregated traffic exceeds the maximum carrying bit resources of the time slot, the deterministic jitter of 2T cannot be guaranteed, and if the aggregated traffic is reduced, the bandwidth utilization will be greatly reduced.
[0008] According to an embodiment of the present disclosure, a method for scheduling a message is provided, which is applied to a forwarding device.
[0009] The forwarding device includes multiple buffer queues, each buffer queue is associated with a scheduled time slot, and the method includes:
[0010] Schedule the messages in the associated cache queue in a time slot round-robin manner;
[0011] When the number of messages in the currently scheduled cache queue exceeds the scheduling amount of the associated time slot, the remaining messages in the currently scheduled cache queue after the scheduling of the associated time slot ends are squeezed into the next time slot for scheduling and sending, and the number of the currently scheduled cache queue is carried in the remaining messages.
[0012] According to another embodiment of the present disclosure, a forwarding device is provided. The forwarding device includes multiple buffer queues, each buffer queue is associated with a scheduled time slot, and the device includes:
[0013] A first scheduling module is configured to schedule messages in an associated cache queue in a time slot round-robin manner;
[0014] The second scheduling module is configured to squeeze the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends into the next time slot for scheduling when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, and carry the number of the currently scheduled cache queue in the remaining messages.
[0015] According to another embodiment of the present disclosure, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.
[0016] According to another embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] FIG1 is a hardware structure block diagram of a mobile terminal of a method for scheduling messages according to an embodiment of the present disclosure;
[0018] FIG2 is a flow chart of a method for scheduling messages according to an embodiment of the present disclosure;
[0019] FIG3 is a schematic diagram of message scheduling for squeezed time slots according to an embodiment of the present disclosure (I);
[0020] FIG4 is a schematic diagram of a scheduling mode and a configuration of a maximum allowed scheduling amount of packets according to an embodiment of the present disclosure;
[0021] FIG5 is a schematic diagram (II) of message scheduling for squeezed time slots according to an embodiment of the present disclosure;
[0022] FIG6 is a schematic diagram (III) of message scheduling for squeezed time slots according to an embodiment of the present disclosure;
[0023] FIG7 is a schematic diagram of a processing flow of a forwarding device according to an embodiment of the present disclosure;
[0024] FIG8 is a schematic diagram (four) of message scheduling for squeezed time slots according to an embodiment of the present disclosure;
[0025] FIG9 is a schematic diagram of a southbound message format according to an embodiment of the present disclosure;
[0026] FIG10 is a schematic diagram of another southbound message format according to an embodiment of the present disclosure;
[0027] FIG11 is a schematic diagram (V) of message scheduling for squeezed time slots according to an embodiment of the present disclosure;
[0028] FIG12 is a schematic diagram of scheduling mode configuration parameters of the control plane according to an embodiment of the present disclosure;
[0029] FIG13 is a structural block diagram of a forwarding device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0032] The periodic scheduling mechanism in deterministic network technology includes multiple queues. Each queue can be associated with a time slot. The time slot size is recorded as T (for example, T = 10us), and the number of queues is recorded as N. The messages in the associated queues are scheduled in a time slot round-robin manner.
[0033] In each time slot T, the number of bits that can be scheduled from the queue is a fixed value, namely T*Cap, where Cap is the port rate. When the packets buffered in the queue exceed T*Cap, they may be discarded or buffered until the next physical cycle scheduling, resulting in packet loss or failure to guarantee 2T jitter. Assuming that each T can send m*bit packets, the number of buffered packets in queue 0 is n*bit, and n>m, then the packets buffered in queue 0 cannot be emptied in time slot 0. In the best case, there will still be (nm)*bit packets that cannot be sent. If the remaining (nm)*bit packets are squeezed into time slot 0 of the next physical cycle for transmission, additional N*T jitter will be introduced on the local node, making it impossible to meet the deterministic end-to-end jitter.
[0034] To improve bandwidth utilization and service access, the industry is exploring precise timeslot scheduling technology based on the control plane. This technology calculates paths and reserves resources based on the remaining bits in a timeslot, preventing queues from accumulating packets exceeding T*Cap. However, this technology is currently immature and faces numerous challenges, such as high algorithm complexity and device-side jitter, when multiple services coexist.
[0035] Another current strategy is to reduce reliance on control plane orchestration, keep the forwarding plane simple and efficient, and admit service packets based on arrival time. This strategy has the advantage of being relatively simple. However, this approach can easily cause the queue buffer to exceed T*Cap at the aggregation point. If bandwidth expansion is taken into account, bandwidth utilization may be reduced, and the carrying efficiency of deterministic services cannot be improved.
[0036] In response to the above-mentioned problem that determinism cannot be guaranteed when the queue cache messages exceed T*Cap, the present disclosure proposes a periodic scheduling method, the technical concept of which is to schedule the messages in the associated cache queue in a time slot rotation manner; when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the scheduling of the associated time slot is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages, thereby improving bandwidth utilization while ensuring 2T jitter, and at the same time not relying on the precise orchestration of the control plane.
[0037] The method embodiments provided in the embodiments of the present disclosure can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal of a periodic scheduling method of an embodiment of the present disclosure. As shown in Figure 1, the mobile terminal may include one or more (only one is shown in Figure 1) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the above-mentioned mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that the structure shown in Figure 1 is only for illustration and does not limit the structure of the above-mentioned mobile terminal. For example, the mobile terminal may also include more or fewer components than those shown in Figure 1, or have a configuration different from that shown in Figure 1.
[0038] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the periodic scheduling method in the embodiment of the present disclosure. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal 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 a combination thereof.
[0039] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0040] In this embodiment, a method for scheduling packets is provided, which is applied to a forwarding device. The forwarding device includes multiple cache queues, each of which is associated with a scheduled time slot. FIG2 is a flow chart of the method for scheduling packets according to an embodiment of the present disclosure. As shown in FIG2 , the flow includes the following steps:
[0041] Step S201 : Schedule the messages in the associated cache queue in a time slot round-robin manner.
[0042] Step S202: When the number of messages in the currently scheduled cache queue exceeds the scheduling amount of the associated time slot, the remaining messages in the currently scheduled cache queue after the associated time slot scheduling is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages.
[0043] In embodiments of the present disclosure, a forwarding device may include multiple cache queues. Each cache queue may carry a queue number. Each cache queue may be associated with a scheduled time slot, and each time slot may correspond to a time slot number. Messages in the associated cache queues may be scheduled using a round-robin schedule. When the number of messages cached in a queue exceeds the scheduled capacity of its associated time slot, the messages in the queue that exceed the scheduled capacity may be squeezed into subsequent time slots for scheduling.
[0044] For example, let T be the timeslot size (e.g., T = 10us), and N be the number of queues. Within each timeslot T, the number of bits that can be scheduled from the queue is a fixed value, T*Cap, where Cap is the port rate. Assume a queue holds n*bits of buffered packets and can send m*bits of packets per T. If n > m, then the buffered packets in the queue cannot be drained within its corresponding timeslot. This means that the buffered packets in the queue exceed T*Cap. Packets (nm)*bits in the queue that exceed the preset message threshold can be squeezed into subsequent timeslots for transmission.
[0045] As an example, during the time slot rotation, the messages in the currently scheduled cache queue may be obtained to determine whether the messages in the currently scheduled cache queue exceed the scheduling amount of the time slot associated with the queue.
[0046] As an example, when the number of messages in the buffer queue does not exceed the scheduling amount of the associated time slot, scheduling can be performed directly in the current time slot.
[0047] As an example, when the number of messages in the cache queue exceeds the scheduling amount of the associated time slot, the messages that do not exceed the scheduling amount of the associated time slot can be scheduled in the associated time slot, and the remaining messages after the scheduling of the associated time slot is completed can be squeezed into the next time slot for scheduling.
[0048] For example, Figure 3 is a schematic diagram (1) of message scheduling for squeezed time slots according to an embodiment of the present disclosure. As shown in Figure 3, at the end of the scheduled time slot 0, there is still 1 cached message left in the current sending queue 0, then the message is allowed to be squeezed into time slot 1 and continue to be sent.
[0049] In the embodiments of the present disclosure, a message may carry the number of the currently scheduled cache queue as the time slot scheduling number. For example, assuming the device currently scheduling the cache queue is an upstream forwarding device, the upstream forwarding device may schedule and send a message carrying the queue number to a downstream forwarding device. The downstream forwarding device may calculate a time slot mapping relationship based on the queue number carried in the message forwarded by the upstream device and the number of the time slot in which the message is received by the downstream forwarding device, thereby deterministically scheduling the message and ensuring end-to-end determinism.
[0050] In the embodiment of the present disclosure, since the messages exceeding the scheduling amount of the associated time slot can be squeezed into the next time slot for transmission, the messages in the buffer queue can be allowed to exceed the T*Cap limit during aggregation.
[0051] In the embodiment of the present disclosure, messages in the associated cache queue are scheduled in a time slot rotation manner; when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the associated time slot scheduling is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages. This solves the problem in the related art that when the queue cache messages exceed the maximum carrying bit resources of the time slot, 2T deterministic jitter cannot be guaranteed, and if the queue cache messages are reduced, the bandwidth utilization will be greatly reduced. Therefore, 2T jitter can be guaranteed while improving bandwidth utilization, and at the same time does not rely on the precise arrangement of the control plane.
[0052] In an exemplary embodiment, when the number of messages in a currently scheduled cache queue exceeds the scheduling amount of the associated time slot, messages remaining in the currently scheduled cache queue after the associated time slot ends are squeezed into the next time slot for transmission, and the number of the currently scheduled cache queue is carried in the remaining messages, including:
[0053] When the number of messages in the currently scheduled buffer queue exceeds the scheduling amount of the associated time slot, obtaining message scheduling configuration information set by the control plane, the message scheduling configuration information including a squeeze scheduling mode parameter;
[0054] When the squeeze scheduling mode parameter is on, the remaining messages in the currently scheduled cache queue after the associated time slot scheduling is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages.
[0055] As an example, the scheduling mode parameters of the forwarding device can be configured on the control plane, and the maximum allowed scheduling amount of packets can be set.
[0056] For example, Figure 4 is a schematic diagram of the scheduling mode and the maximum allowed scheduling amount of the message according to an embodiment of the present disclosure. As shown in Figure 4, the controller can be used to configure the device through the southbound interface to turn on / off the scheduling mode. The interface channel protocol may include but is not limited to the Network Configuration Protocol (Netconf), Border Gateway Protocol (BGP), etc.; the device can also be configured at a single point through the Command Line Interface (CLI) command front end.
[0057] It should be noted that the southbound interface can be used to manage network management systems or devices from other manufacturers, that is, an interface provided to the user. The controller primarily controls the network through the southbound interface protocol, including link discovery, topology management, policy formulation, and entry distribution. The present disclosure does not impose any restrictions on the southbound interface.
[0058] In addition, whether a device turns on the scheduling mode can be negotiated between forwarding devices, and this disclosure does not impose any restrictions on this.
[0059] As an example, when the squeeze scheduling mode is turned on, the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends can be squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue can be carried in the remaining messages.
[0060] In an exemplary embodiment, when the number of packets in the currently scheduled buffer queue exceeds the scheduling amount of the associated time slot, the remaining packets in the currently scheduled buffer queue after the associated time slot scheduling ends are squeezed into the next time slot for scheduling, further comprising:
[0061] When the number of packets in the currently scheduled cache queue exceeds the scheduling amount of the associated time slot but does not exceed twice the scheduling amount of the associated time slot, the remaining packets in the currently scheduled cache queue after the scheduling of the associated time slot is squeezed into the next time slot for scheduling.
[0062] For example, referring to Figure 3 , assume that the number of messages cached in queue 0 is n*bit, the scheduling capacity of the time slot associated with queue 0 is m*bit, and twice the scheduling capacity of the time slot is 2m*bit. When m<n≤2m, that is, the number of messages cached in queue 0 exceeds the scheduling capacity of the associated time slot but does not exceed twice the scheduling capacity of the associated time slot, then the m*bit messages in the cache queue that do not exceed the preset message threshold can be scheduled in time slot 0, and the (nm)*bit messages in the cache queue that exceed the scheduling capacity of the associated time slot can be squeezed into the next time slot 1 for transmission.
[0063] In an exemplary embodiment, the message scheduling configuration information further includes a maximum allowed scheduling amount of messages. When the number of messages in the currently scheduled buffer queue exceeds the scheduling amount of the associated time slot, the messages remaining in the currently scheduled buffer queue after the associated time slot scheduling ends are squeezed into the next time slot for scheduling, further comprising:
[0064] When the number of messages in the currently scheduled cache queue exceeds twice the scheduling amount of the associated time slot and does not exceed the maximum allowed squeezing amount of the message, the remaining messages in the currently scheduled cache queue after the next time slot scheduling ends are squeezed into the next time slot scheduling.
[0065] As an example, the packet scheduling method of the disclosed embodiments does not allow for unlimited squeeze scheduling. For example, when the number of packets buffered in a queue exceeds T*Cap*N, the scheduled time slot will inevitably span two physical cycles, inevitably introducing additional jitter. Therefore, the packet scheduling mechanism of the disclosed embodiments cannot exceed T*Cap*N at any time in the queue buffer, meaning that the maximum allowable number of packets cannot be exceeded.
[0066] As an example, when the number of messages cached in a queue exceeds 2m*bit, twice the scheduling amount of the associated time slot, the messages exceeding 2m*bit, can be squeezed into the next time slot of the next time slot associated with the cache queue for scheduling. For example, the number of messages cached in queue 0 is n*bit, the scheduling amount of the time slot associated with queue 0 is m*bit, and n>2m, that is, the number of messages cached in queue 0 is greater than 2m*bit, twice the scheduling amount of the associated time slot. Then, after the m*bit messages cached in queue 0 are scheduled in time slot 0, the remaining m*bit messages can be squeezed into time slot 1 for scheduling, and after the scheduling of time slot 1 is completed, the remaining (n-2m)*bit messages can be squeezed into time slot 2 for scheduling.
[0067] Figure 5 is a scheduling diagram (II) of message squeezing time slots according to an embodiment of the present disclosure. As shown in Figure 5, the amount of bits that can be sent in each time slot is T*Cap=m*bit. When the message cached in queue 0 is n*bit and n>2*m, the first m*bit message in queue 0 can be scheduled in time slot 0, the second m*bit message can be squeezed into time slot 1 to complete scheduling, and the (n-2m)*bit message can be squeezed into time slot 2 to complete scheduling. That is, the message cached in queue 0 will be squeezed into time slot 2 for transmission; when the message cached in queue 0 is emptied, according to the current message scheduling mechanism, time slot 2 will continue to schedule the message b*bit in the corresponding cache queue 2. At this time, the a*bit message cached in queue 1 is skipped and does not get a scheduling opportunity, resulting in the message cached in queue 1 being squeezed into the next round of physical period scheduling cycle, thereby introducing jitter.
[0068] To solve the above problem, the embodiment of the present disclosure modifies the existing scheduling process. When there is remaining time in the current time slot and the previous sending queue is empty, it is not the message in the queue associated with the time slot that is scheduled, but the message in the next queue after the empty queue.
[0069] In an exemplary embodiment, after squeezing the remaining packets in the currently scheduled buffer queue after the associated time slot is scheduled to the next time slot for scheduling, and carrying the number of the currently scheduled buffer queue in the remaining packets, the following steps may be further included:
[0070] Step S1, determining whether the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1;
[0071] Step S2: When the difference between the message carrying the number of the currently scheduled cache queue and the number of the current time slot is not greater than 1, scheduling the message in the cache queue associated with the current time slot;
[0072] Step S3: When the difference between the message carrying the number of the currently scheduled buffer queue and the current time slot number is greater than 1, scheduling the message in the next non-empty queue of the currently scheduled buffer queue.
[0073] For example, FIG6 is a schematic diagram (III) of message scheduling for squeezed time slots according to an embodiment of the present disclosure. As shown in FIG6 , the message cached in queue 0 is sent when it is squeezed into time slot 2. If there is remaining time in time slot 2, the next message a*bit cached in queue 1 can be scheduled. At this time, the scheduling amount of time slot 2 remains (3m-na)*bit, so the messages in queue 2 can be scheduled again, and the message (3m-na)*bit in queue 2 is scheduled to time slot 2 for continued transmission, and the message (a+b+n-3m)*bit remaining in queue 2 is scheduled to time slot 3, the next time slot 2, for continued transmission.
[0074] In an embodiment of the present disclosure, a switch for the squeeze scheduling mode can be set. When the squeeze scheduling mode is turned on, when the messages in the cache queue are emptied, the messages in the next non-empty queue of the cache queue can be scheduled; when the squeeze scheduling mode is turned off, when the messages in the cache queue are emptied, the messages in the queue associated with the current time slot can be scheduled.
[0075] As an example, referring to Figure 5, the cached messages in queue 0 are squeezed into time slot 2 for scheduling. After the messages in queue 0 are emptied, there is remaining time in time slot 2. At this time, it can be judged that the difference between the number of time slot 2 and the number of queue 0 is 2, which is greater than 1. Then the message in queue 1, the next queue of queue 0, can be scheduled.
[0076] As an example, if the difference between the message carrying the number of the currently scheduled buffer queue and the number of the current time slot is not greater than 1, the message in the buffer queue associated with the current time slot can be scheduled.
[0077] In an exemplary embodiment, when the number of packets in the currently scheduled buffer queue exceeds the maximum allowed scheduling amount of packets, the packets in the currently scheduled buffer queue that exceed the maximum allowed scheduling amount of packets are discarded.
[0078] As an example, the maximum allowed scheduling capacity of packets in the packet scheduling mechanism of the forwarding device can be pre-configured through the control panel. The packet scheduling mechanism of the embodiment of the present disclosure does not allow the queue buffer capacity to exceed T*Cap*N at any time, that is, it does not allow the maximum allowed scheduling capacity of packets to be exceeded.
[0079] As an example, when the number of packets in the currently scheduled buffer queue exceeds the maximum allowed scheduling amount of packets, the packets may be discarded, thereby avoiding the introduction of additional jitter.
[0080] FIG7 is a schematic diagram of a processing flow of a forwarding device according to an embodiment of the present disclosure, as shown in FIG7 , specifically including the following steps:
[0081] 1) Obtain the message scheduling configuration information set by the controller / CLI, which includes the squeeze scheduling mode parameters and the maximum allowed scheduling amount of messages;
[0082] When the squeeze scheduling mode in the message squeeze configuration information is enabled, the forwarding device may squeeze the messages remaining in the currently scheduled buffer queue after the associated time slot scheduling is completed into the next time slot for scheduling.
[0083] 2) When the squeeze scheduling mode is on, determine whether the current time slot number minus the sending queue number is greater than 1. If not, go to 3); otherwise, go to 4);
[0084] 3) Schedule the message in the queue corresponding to the current time slot, and go to 5);
[0085] 4) Schedule the next queue of the sending queue;
[0086] 5) Check the number of messages cached in the queue corresponding to the current time slot to determine whether it exceeds the maximum allowed scheduling amount of messages. If so, go to 6), otherwise go to 7);
[0087] 6) Discard the messages in the queue that exceed the maximum allowed scheduling amount;
[0088] 7) Schedule the messages in the queue according to the squeeze scheduling mode until the messages in the current sending queue are emptied, and then go to 2).
[0089] In order to facilitate those skilled in the art to understand the present disclosure, the present disclosure is further illustrated below through some examples.
[0090] Example 1
[0091] Figure 8 is a schematic diagram (four) of message scheduling using squeezed time slots according to an embodiment of the present disclosure. Assume, as shown in Figure 8, that the message scheduling mechanism consists of four queues, the time slot length T = 10 μs, and the port rate is 10 Gbps. The bit capacity that can be carried within each T is 100,000 bits. The control plane sends configuration information to each node on the forwarding plane, including parameters such as enabling squeeze scheduling mode and setting the maximum allowable message scheduling capacity to 300,000 bits.
[0092] Figure 9 is a schematic diagram of a southbound message format according to an embodiment of the present disclosure, and Figure 10 is a schematic diagram of another southbound message format according to an embodiment of the present disclosure. As shown in Figures 9 and 10, assuming that the control plane is extended based on the Path Computation Element Protocol (PCEP) through the southbound parameter delivery interface, the Object-Class field and Object Type (OT) field in the PCEP protocol message can be flexibly defined to specify the message type. The Object-Class value range is 1 to 255, and the OT value range is 1 to 15. Figure 10 defines the values of the Object-Class and OT fields in the PCEP message.
[0093] Assume that the buffered packets in queues are 230,000 bits in queue 0, 0 bits in queue 1, 50,000 bits in queue 2, and 60,000 bits in queue 3.
[0094] The message volume in queue 0, 230,000 bits, is less than 300,000 bits. This allows queue 0 to drain. When queue 0's message scheduling is complete, the message is squeezed into time slot 2. Scheduling can continue from the next non-empty queue. As shown in Figure 8, queue 0's message is squeezed into time slot 2. At this point, time slot 2 has 80,000 bits of resources remaining. Since queue 1 is empty, scheduling can continue from queue 2, ensuring deterministic message delivery.
[0095] Example 2
[0096] Figure 11 is a schematic diagram (V) of message scheduling for timeslot squeezing according to an embodiment of the present disclosure. As shown in Figure 11 , assuming the message scheduling mechanism consists of four queues, a timeslot length T = 10 μs, and a port rate of 10 Gbps, the bit capacity that can be carried within each T is 100,000 bits. The control plane sends configuration information to each node on the forwarding plane, including parameters: enabling squeeze scheduling mode and setting the maximum allowable message scheduling capacity to 300,000 bits.
[0097] FIG12 is a schematic diagram of scheduling mode configuration parameters of a control plane according to an embodiment of the present disclosure. As shown in FIG12 , it is assumed that the control plane sends squeeze scheduling mode parameters through NETCONF.
[0098] Assume that the buffered packets in queues are 230,000 bits in queue 0, 50,000 bits in queue 1, 50,000 bits in queue 2, and 60,000 bits in queue 3.
[0099] The message volume in queue 0, 230,000 bits, is less than 300,000 bits, allowing the messages in queue 0 to drain. When queue 0 drains, the messages are squeezed into time slot 2. According to the message scheduling mechanism of the present disclosure, scheduling can be started from queue 1, the next queue after queue 0 is drained. As shown in Figure 11, the messages in queue 0 are squeezed into time slot 2. At this time, there are 80,000 bits of resources left in time slot 2. Scheduling can be started from queue 1, and then queue 2 buffered messages can be scheduled. Similarly, the messages in queue 2 will be squeezed into time slot 3 for continued transmission, thus ensuring the sequential transmission and determinism of messages.
[0100] The message scheduling method in this example can improve bandwidth utilization while ensuring 2T jitter. It does not rely on the precise orchestration of the control plane and can be used in products.
[0101] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0102] This embodiment also provides a forwarding device for implementing the above-mentioned embodiments and exemplary implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0103] FIG13 is a structural block diagram of a forwarding device according to an embodiment of the present disclosure. As shown in FIG13 , the forwarding device includes multiple cache queues, each of which is associated with a scheduled time slot. The device includes:
[0104] A first scheduling module 1301 is configured to schedule messages in an associated cache queue in a time slot round-robin manner;
[0105] The second scheduling module 1302 is configured to squeeze the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends into the next time slot for scheduling when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, and carry the number of the currently scheduled cache queue in the remaining messages.
[0106] In an exemplary embodiment, the method further includes:
[0107] A judging module configured to judge whether the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1;
[0108] A third scheduling module is configured to schedule the message in the cache queue associated with the current time slot when the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is not greater than 1;
[0109] The fourth scheduling module is configured to schedule a message in a next non-empty queue of the currently scheduled cache queue when the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1.
[0110] In an exemplary embodiment, the second scheduling module 1302 includes:
[0111] an acquisition submodule, configured to acquire, when the number of messages in the currently scheduled buffer queue exceeds the scheduling amount of the associated time slot, message scheduling configuration information set by the control plane, the message scheduling configuration information including a squeeze scheduling mode parameter;
[0112] The first scheduling submodule is configured to squeeze the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends to the next time slot for scheduling when the squeeze scheduling mode parameter is turned on, and carry the number of the currently scheduled cache queue in the remaining messages.
[0113] In an exemplary embodiment, the second scheduling module 1302 further includes:
[0114] The second scheduling submodule is configured to squeeze the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends into the next time slot for scheduling when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot and do not exceed twice the scheduling amount of the associated time slot.
[0115] In an exemplary embodiment, the message scheduling configuration information further includes a maximum allowed scheduling amount of messages, and the second scheduling module 1302 further includes:
[0116] The third scheduling submodule is configured to squeeze the remaining messages in the currently scheduled cache queue after the next time slot scheduling ends to the next time slot scheduling when the messages in the currently scheduled cache queue exceed twice the scheduling amount of the associated time slot and do not exceed the maximum allowed squeezing amount of the message.
[0117] In an exemplary embodiment, it is characterized by further comprising:
[0118] The discarding module is configured to discard the messages in the buffer queue currently scheduled when the messages in the buffer queue currently scheduled exceed the maximum allowed scheduling amount of the messages.
[0119] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0120] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0121] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0122] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0123] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0124] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0125] Obviously, those skilled in the art should understand that the modules or steps of the present disclosure described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed across a network composed of multiple computing devices, they can be implemented using program code executable by the computing device, and thus, they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be performed in a different order than herein, or they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present disclosure is not limited to any particular combination of hardware and software.
[0126] The foregoing is merely an exemplary embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will readily appreciate that the present disclosure is susceptible to various modifications and variations. Any modifications, equivalent substitutions, improvements, and the like made within the principles of the present disclosure shall be included within the scope of protection of the present disclosure.
Claims
1. A method for scheduling a message, applied to a forwarding device, wherein the forwarding device comprises a plurality of cache queues, each of the cache queues being associated with a scheduled time slot, the method comprising: Scheduling the messages in the associated cache queue in a time slot round-robin manner; When the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the scheduling of the associated time slot is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages.
2. The method according to claim 1, wherein: After the remaining messages in the currently scheduled cache queue after the associated time slot scheduling is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages, the method further includes: Determine whether the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1; When the difference between the message carrying the number of the currently scheduled cache queue and the number of the current time slot is not greater than 1, scheduling the message in the cache queue associated with the current time slot; When the difference between the message carrying the number of the currently scheduled buffer queue and the current time slot number is greater than 1, the message in the next non-empty queue of the currently scheduled buffer queue is scheduled.
3. The method according to claim 1, wherein: When the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the remaining messages in the currently scheduled cache queue after the associated time slot ends are squeezed into the next time slot for transmission, and the number of the currently scheduled cache queue is carried in the remaining messages, including: When the number of messages in the currently scheduled cache queue exceeds the scheduling amount of the associated time slot, obtaining message scheduling configuration information set by the control plane, wherein the message scheduling configuration information includes a squeeze scheduling mode parameter; When the squeeze scheduling mode parameter is turned on, the remaining messages in the currently scheduled cache queue after the associated time slot scheduling is completed are squeezed into the next time slot for scheduling, and the number of the currently scheduled cache queue is carried in the remaining messages.
4. The method according to claim 3, wherein: In the case where the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the scheduling of the associated time slot is completed are squeezed into the next time slot for scheduling, and further comprising: When the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot but do not exceed twice the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the scheduling of the associated time slot ends are squeezed into the next time slot for scheduling.
5. The method according to claim 4, wherein: The message scheduling configuration information also includes a maximum allowed scheduling amount of messages, and when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, the messages remaining in the currently scheduled cache queue after the scheduling of the associated time slot ends are squeezed into the next time slot for scheduling, and also includes: When the messages in the currently scheduled cache queue exceed twice the scheduling amount of the associated time slot and do not exceed the maximum allowed squeezing amount of the messages, the messages remaining in the currently scheduled cache queue after the next time slot scheduling ends are squeezed into the next time slot scheduling.
6. The method according to claim 5, wherein: Also includes: In the case that the number of messages in the currently scheduled buffer queue exceeds the maximum allowed scheduling amount of messages, the number of messages in the currently scheduled buffer queue exceeding the maximum allowed scheduling amount of messages is discarded.
7. A forwarding device, comprising a plurality of cache queues, each of the cache queues being associated with a scheduled time slot, the device comprising: A first scheduling module, configured to schedule messages in an associated cache queue in a time slot round-robin manner; The second scheduling module is configured to squeeze the remaining messages in the currently scheduled cache queue after the associated time slot scheduling ends into the next time slot for scheduling when the messages in the currently scheduled cache queue exceed the scheduling amount of the associated time slot, and carry the number of the currently scheduled cache queue in the remaining messages.
8. The device according to claim 7, wherein: Also includes: A judgment module, configured to judge whether the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1; A third scheduling module is configured to schedule the message in the cache queue associated with the current time slot when the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is not greater than 1; The fourth scheduling module is configured to schedule the message in the next non-empty queue of the currently scheduled cache queue when the difference between the message carrying the number of the currently scheduled cache queue and the current time slot number is greater than 1.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data transmitting method, device, computer equipment and storage medium
CN108337187A
Traffic control method, device and equipment and readable storage medium
CN114640630A
Queue dispatching method and apparatus in data network
CN1773955A
Queue management system
US20200394584A1