Packet forwarding methods, storage medium and electronic apparatus

By obtaining the resident reference value of the packet in the network node and inserting it into the ordered queue or the rotation priority queue, the problems of large cache consumption and message violation deadline are solved, and efficient message forwarding is achieved.

WO2025050611A1PCT designated stage expired Publication Date: 2025-03-13ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/082279
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-05
Filing Date
2024-03-18
Publication Date
2025-03-13

AI Technical Summary

Technical Problem

In the prior art, the cache consumption of network nodes is large and it is prone to problems that packets violate their deadline.

Method used

By obtaining the resident reference value of the message, insert the message into the corresponding position of the ordered queue or the rotation priority queue, and forward it according to the forwarding mode of the queue.

Benefits of technology

It effectively reduces cache consumption and efficiently completes packet forwarding within the deadline, avoiding packet violations of the deadline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024082279_13032025_PF_FP_ABST
    Figure CN2024082279_13032025_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide packet forwarding methods, a storage medium and an electronic apparatus. A method comprises: obtaining a first residence reference value of a first packet, and, on the basis of the first residence reference value, inserting the first packet into a corresponding position of a sorted queue; and forwarding the first packet on the basis of a forwarding mode of the sorted queue.
Need to check novelty before this filing date? Find Prior Art

Description

Message forwarding method, storage medium and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on Chinese patent application CN202311148915.2, filed on September 5, 2023, entitled “Message forwarding method, storage medium and electronic device”, and claims the priority of the patent application, and all the contents disclosed therein are incorporated into this application by reference. Technical Field

[0003] The embodiments of the present disclosure relate to the field of communications, and in particular, to a message forwarding method, a storage medium, and an electronic device. Background Art

[0004] RFC8655 describes the architecture of deterministic networks and defines the Quality of Service (QoS) objectives for deterministic forwarding: minimum and maximum source-to-destination latency, as well as bounded latency jitter; permitted packet loss rate; and an upper bound on out-of-order packet delivery. To achieve these objectives, deterministic networks employ resource reservation, explicit routing, and service protection. Generally, a deterministic path is a strictly explicit path calculated by a centralized controller, with resources reserved at nodes along the path to meet the Service Level Agreement (SLA) requirements of deterministic services.

[0005] Related technologies have proposed a deadline-based forwarding mechanism that uses a single deadline to control packet scheduling for all nodes along a path. This deadline is an offset time that represents the planned dwell time D of a packet within a node. Furthermore, the accumulated dwell time deviation E can be carried in the message, dynamically adjusting the allowed dwell time Q of the message within the node to distinguish between eligible arrival bursts (EAB) and illegitimate arrival bursts (IAB), thereby achieving lower end-to-end delay jitter. This scheme discusses two queue models: a sorted queue (SQ), such as a single first-in, first-out (PIFO) or linked list. Elements in a sorted queue are sorted according to a specific method, and newly arriving elements can be inserted at any position, but packets are always processed from the head of the queue. The other is a rotational priority queue (RPQ), such as the countdown queue group defined in this scheme. Different queues in the group have different countdowns (CTs). Queues with smaller countdowns have higher scheduling priorities and are sent first. A packet is selected to enter a queue with a corresponding CT based on its allowed dwell time. However, this scheme primarily assumes that nodes in the network adopt in-time forwarding (or work-conserving forwarding). This can lead to the accumulation of bursts received at nodes, consuming a large amount of cache. Furthermore, the queue allocation method used in the related art is unreasonable, making it easy for packets to violate their deadlines.

[0006] Summary of the Invention

[0007] The embodiments of the present disclosure provide a message forwarding method, a storage medium, and an electronic device to at least solve the problems in the related art of large cache consumption and the susceptibility of messages to violation of their deadlines.

[0008] According to one embodiment of the present disclosure, a message forwarding method is provided, including: obtaining a first resident reference value of a first message, inserting the first message into a corresponding position of an ordered queue according to the first resident reference value; and forwarding the first message according to a forwarding mode of the ordered queue.

[0009] According to another embodiment of the present disclosure, a message forwarding method is provided, including: obtaining an allowed queuing delay and a second residence reference value of a second message, inserting the second message into a corresponding position of a rotational priority queue according to the allowed queuing delay and the second residence reference value; and forwarding the second message according to the forwarding mode to the rotational priority queue.

[0010] 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.

[0011] According to another embodiment of the present disclosure, an electronic device is provided, 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 one of the above method embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] FIG1 is a hardware structure block diagram of a computer terminal of a message forwarding method according to an embodiment of the present disclosure;

[0013] FIG2 is a schematic diagram of a network architecture for executing a message forwarding method according to an embodiment of the present disclosure;

[0014] FIG3 is a flow chart of a message forwarding method according to an embodiment of the present disclosure;

[0015] FIG4 is a flow chart of a message forwarding method according to an embodiment of the present disclosure;

[0016] FIG5 is a schematic diagram of the relationship between a virtual parent queue and a physical child queue according to an embodiment of the present disclosure;

[0017] FIG6 is a schematic diagram of a relationship between a minimum countdown value and a maximum countdown value according to an embodiment of the present disclosure;

[0018] FIG7 is a schematic diagram of another relationship between the minimum countdown value and the maximum countdown value according to an embodiment of the present disclosure;

[0019] FIG8 is a schematic diagram of delay evaluation according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0020] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0021] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments 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.

[0022] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking operation on a computer terminal as an example, FIG1 is a hardware structure block diagram of a computer terminal of a message forwarding method of an embodiment of the present disclosure. As shown in FIG1 , the computer terminal may include one or more (only one is shown in FIG1 ) 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 computer terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG1 is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include more or fewer components than those shown in FIG1 , or have a configuration different from that shown in FIG1 .

[0023] 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 message forwarding 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 computer 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 combinations thereof.

[0024] The transmission device 106 is used to receive or transmit data via a network. Examples of such networks may include wireless networks provided by a computer 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.

[0025] The embodiment of the present application can be run on the network architecture shown in Figure 2. Figure 2 is a schematic diagram of the network architecture for running the message forwarding method of the embodiment of the present disclosure. As shown in Figure 2, the network architecture includes: an input port, an output port, storage / forwarding (S&F), processing, an internal switching network, and a deadline scheduler. Assume that the time when the message arrives at the input port is A1, and then after the node forwarding delay (F) composed of storage / forwarding (S&F), processing, and the internal switching network, the time when it reaches the deadline scheduler of the output port is A2, and then after a queuing delay (Q), it is sent to the output port. In other words, the residence delay of the message in the node is simply composed of F and Q, where F is generally a fixed value (the actual maximum value of the node forwarding delay can be selected as F), and Q is not fixed.

[0026] In this embodiment, a message forwarding method running on the above-mentioned computer terminal or network architecture is provided. FIG3 is a flow chart of the message forwarding method according to an embodiment of the present disclosure. As shown in FIG3 , the flow chart includes the following steps:

[0027] Step S302: obtaining a first resident reference value of the first message, and inserting the first message into a corresponding position of the ordered queue according to the first resident reference value;

[0028] In an exemplary embodiment, the first residence reference value is the sum of the time when the first packet arrives at the ingress port of the node, the planned residence time of the first packet in the node, and the accumulated residence time deviation carried by the first packet.

[0029] In actual implementation, the time when the first message arrives at the node ingress port is A1, the planned residence time of the first message in the node is D, and the accumulated residence time deviation carried by the first message is E. Then the first residence reference value is A1+D+E.

[0030] In an exemplary embodiment, the first message is inserted into the corresponding position of the ordered queue according to the first residence reference value, including: the smaller the first residence reference value, the closer the position of the first message inserted into the ordered queue is to the head of the queue; when the first residence reference value is equal, the smaller the planned residence time is, the closer the position of the first message inserted into the ordered queue is to the head of the queue; when the first residence reference value and the planned residence time are both equal, the first message that arrives at the output port of the node first is inserted into the ordered queue closer to the head of the queue.

[0031] In actual implementation, if the first dwell reference values ​​(A1+D+E) of two packets are equal, the packet with the shorter planned dwell time (D) is placed first and inserted closer to the head of the ordered queue. If the first dwell reference values ​​(A1+D+E) of two packets are equal and their planned dwell time (D) is also equal, they are inserted according to the order of arrival at the deadline scheduler, with the packet that arrives at the scheduler first being placed first.

[0032] Step S304: forward the first message according to the forwarding mode of the ordered queue.

[0033] In an exemplary embodiment, forwarding the first message according to the forwarding mode of the ordered queue includes: when the forwarding mode is timely forwarding, obtaining the first message from the head of the ordered queue for forwarding.

[0034] In an exemplary embodiment, the first message is forwarded according to the forwarding mode of the ordered queue, including: when the forwarding mode is on-time forwarding, determining whether the first resident reference value of the first message at the head of the ordered queue is less than or equal to the current time, and if so, forwarding the first message.

[0035] In actual implementation, the first message is forwarded according to the ordered queue's forwarding mode. This requires that the ordered queue must be non-empty. In the just-in-time forwarding mode, the first message is forwarded from the head of the ordered queue. In the on-time forwarding mode, if the ordered queue is not empty and the A1+D+E of the head message is equal to or earlier than the current time, the head message is sent; otherwise, it is not sent. After each head message is sent, the system checks for new head messages to determine whether to send them.

[0036] The above steps provide a message forwarding method, comprising: obtaining a first resident reference value for a first message; inserting the first message into a corresponding position in an ordered queue based on the first resident reference value; and forwarding the first message based on the forwarding mode of the ordered queue. This method solves the problems of high cache consumption and the susceptibility of messages to deadline violations in related technologies, thereby reducing cache consumption and efficiently completing message forwarding within deadlines.

[0037] The present disclosure also provides a message forwarding method. FIG4 is a flow chart of the message forwarding method according to the present disclosure. As shown in FIG4 , the flow chart includes the following steps:

[0038] Step S402: obtaining the allowed queuing delay and the second residence reference value of the second message, and inserting the second message into the corresponding position of the rotating priority queue according to the allowed queuing delay and the second residence reference value;

[0039] In an exemplary embodiment, the value of the allowable queuing delay is the sum of the planned residence time of the second message in the node and the accumulated residence time deviation carried by the second message, minus the difference in the forwarding delay of the second message in the node; the second residence reference value is the difference between the planned residence time of the second message in the node and the forwarding delay of the second message in the node.

[0040] In actual implementation, the planned residence time of the second message in the node is D, the accumulated residence time deviation carried by the second message is E, and the forwarding delay of the second message in the node is F. Then, the value of the allowed queuing delay is Q = D + EF. The second residence reference value is DF.

[0041] In actual implementation, a virtual parent queue is selected according to the value of the allowed queuing delay, and a physical sub-queue in the virtual parent queue is selected according to the value of the second resident reference value.

[0042] In an exemplary embodiment, a second message is inserted into a corresponding position of a rotational priority queue according to an allowed queuing delay and a second residence reference value, including: selecting a virtual parent queue of the rotational priority queue according to the allowed queuing delay, wherein the first priority of the selected virtual parent queue is less than or equal to the allowed queuing delay, and the sum of the first priority and the priority arithmetic interval AT is greater than the allowed queuing delay; the priority arithmetic interval is the difference between the first priorities of adjacent virtual parent queues; and selecting a physical subqueue of the virtual parent queue according to the second residence reference value, wherein the difference between the delay level of the selected physical subqueue and the second residence reference value is the smallest, and the delay level is less than or equal to the second residence reference value.

[0043] In actual implementation, a countdown CT may be used to represent the first priority.

[0044] Step S404: forward the second message according to the forwarding mode of the rotating priority queue.

[0045] In an exemplary embodiment, forwarding the second message according to the forwarding mode of the rotating priority queue includes: when the forwarding mode is timely forwarding, selecting the second message in the virtual parent queue with the highest priority in the rotating priority queue for forwarding.

[0046] In actual implementation, in in-time forwarding mode, as long as any virtual parent queue is not empty, packets are always retrieved and sent from the non-empty virtual parent queue with the current highest priority. In one embodiment, packets are retrieved and sent from the non-empty physical subqueues of the virtual queue, starting from the physical subqueue with the lowest latency level to the physical subqueue with the highest latency level. Only when a physical subqueue is empty will the next non-empty physical subqueue be read.

[0047] In an exemplary embodiment, the second message is forwarded according to the forwarding mode of the rotational priority queue, including: when the forwarding mode is just-in-time forwarding, in the virtual parent queue of the rotational priority queue whose countdown CT is less than or equal to 0, the second message in the virtual parent queue with the highest priority is selected for forwarding.

[0048] In the actual implementation process, when the scheduler is configured in the on-time forwarding mode, packets are always obtained from the non-empty current highest-priority virtual parent queue (and CT <= 0) for transmission. In one embodiment, among the multiple non-empty physical sub-queues under this virtual queue, packets are sequentially obtained from the non-empty physical sub-queues in the direction from the physical sub-queue with a smaller delay level to the physical sub-queue with a larger delay level for transmission. Only after a physical sub-queue is emptied, the next non-empty physical sub-queue is read. Note that any virtual parent queue with CT > 0 is not allowed to send packets.

[0049] In an exemplary embodiment, the second packet in the virtual parent queue with the highest priority is selected for forwarding. The non-empty virtual parent queue with the smallest countdown CT is selected from all virtual parent queues as the virtual parent queue with the highest priority; the second packet is obtained from the non-empty physical sub-queues for forwarding in the order of increasing delay levels of the physical sub-queues of the virtual parent queue.

[0050] In an exemplary embodiment, after selecting the non-empty virtual parent queue with the smallest countdown CT from all virtual parent queues as the virtual parent queue with the highest priority, it further includes: in the case where the forwarding mode is in-time forwarding, flipping the CT value of the virtual parent queue whose minimum achievable CT value in all virtual parent queues is -2*AT to the preset maximum CT value;

[0051] In the actual implementation process, when the deadline scheduler using the countdown queue is configured in the in-time forwarding mode, the maximum countdown value is the preset N*AT. For example, N is 100 and AT is 10 us; the minimum countdown value can reach -2*AT, but will immediately be flipped to N*AT. The total number of virtual parent queues is N + 2. Any virtual parent queue in the sending state (even if it is a virtual parent queue with CT <= 0) can always receive new packets simultaneously, that is, newly arrived packets always select the virtual parent queue with the corresponding CT according to CT <= Q < CT + AT according to their allowed queuing delay Q, regardless of whether the virtual parent queue is in the sending state.

[0052] In an exemplary embodiment, after selecting the non-empty virtual parent queue with the smallest countdown CT from all virtual parent queues as the virtual parent queue with the highest priority, it further includes: in the case where the forwarding mode is on-time forwarding, flipping the CT value of the virtual parent queue whose minimum achievable CT value in all virtual parent queues is -(N + 1)*AT to the preset maximum CT value, where N is the preset number of delay levels.

[0053] In the actual implementation process, when the deadline scheduler using the countdown queue is configured in the on-time forwarding mode, the maximum countdown value is the preset N*AT. For example, N is 100 and AT is 10 us. The minimum countdown value can reach -(N + 1)*AT, but it will immediately flip to N*AT. The total number of virtual parent queues is 2*N + 1. The advantage of this method is that any virtual parent queue in the sending state (even the virtual parent queue with CT <= 0) can always receive new packets simultaneously. That is, the newly arrived packets always select the virtual parent queue with the corresponding CT according to CT <= Q < CT + AT based on their allowed queuing delay Q, regardless of whether the virtual parent queue is in the sending state.

[0054] Through the description of the above implementation manners, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is a better implementation manner. Based on such an understanding, the technical solution of the embodiments of the present disclosure, in essence or the part that contributes to the related art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present disclosure.

[0055] In this embodiment, a packet forwarding device is further provided. This device is used to implement the above embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0056] The embodiments of the present disclosure provide a packet forwarding device, including: a first insertion module configured to obtain a first residence reference value of a first packet and insert the first packet into a corresponding position in an ordered queue according to the first residence reference value; a first forwarding module configured to forward the first packet according to the forwarding mode of the ordered queue.

[0057] The embodiments of the present disclosure provide a packet forwarding device, which may further include: a second insertion module that obtains the allowed queuing delay and a second residence reference value of a second packet and inserts the second packet into a corresponding position in a rotating priority queue according to the allowed queuing delay and the second residence reference value; a second forwarding module configured to forward the second packet according to the forwarding mode of the rotating priority queue.

[0058] In the actual implementation process, the process of message forwarding by the above-mentioned message forwarding device can be operated by referring to the steps of the message forwarding method in the above-mentioned embodiment. In one embodiment, different modules execute different steps of the message forwarding method through different units, which will not be described in detail here.

[0059] 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.

[0060] 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 running.

[0061] 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.

[0062] 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 execute the steps in any one of the above method embodiments.

[0063] 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.

[0064] The examples in this embodiment can refer to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0065] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present disclosure can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented using program codes executable by the computing device, so that 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 made into individual integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the embodiments of the present disclosure are not limited to any specific combination of hardware and software.

[0066] In order to enable those skilled in the art to better understand the technical solutions of the embodiments of the present disclosure, the following is an elaboration with reference to specific scenario embodiments.

[0067] Scenario Example 1

[0068] The embodiment of the present disclosure sets a deadline scheduler for different queues including an ordered queue and a priority queue.

[0069] The characteristic of an ordered queue is that the elements it contains are sorted according to a certain method (for example, deadline), and newly arrived elements can be inserted into any position in the queue, but the message is always taken from the head of the queue for processing.

[0070] In the embodiment of the present disclosure, the following method for inserting a message into an ordered queue is defined:

[0071] a) The method for inserting a message into an ordered queue is:

[0072] i) Obtain the A1+D+E (or A2+D+EF) value of the message, which is the first residence reference value in the above embodiment. The smaller the value, the closer the insertion position is to the head of the queue. Among them, A1 represents the moment when the message arrives at the input port, A2 represents the moment when the message arrives at the scheduler (as shown in Figure 2, it can be seen that A2=A1+F), D represents the planned residence time allowed for the message in the node, E represents the accumulated residence time deviation carried in the message, and F represents the forwarding delay of the message in the node. According to Figure 2, A1 is the moment when the message arrives at the input port, A2 is the moment when the message arrives at the output port, and is also the moment when it arrives at the deadline scheduler. Q represents the queuing delay, F is the forwarding delay of the message in the node, and the residence delay of the message in the node is composed of F and Q, wherein F is generally a fixed value and Q is generally not fixed.

[0073] ii) If the A1+D+E values ​​of two messages are equal, the message with the smaller D is placed in front (i.e., closer to the head of the queue).

[0074] iii) If the A1+D+E values ​​of two messages are equal and D is also equal, the message that arrives at the scheduler first will be ranked first.

[0075] b) The scheduler is configured to in-time forwarding mode (timely forwarding mode)

[0076] In in-time forwarding mode, as long as the ordered queue is not empty, the message is always obtained from the head of the queue for transmission.

[0077] c) The scheduler is configured to on-time forwarding mode (punctual forwarding mode)

[0078] In on-time forwarding mode, if the ordered queue is not empty and the A1+D+E of the first message in the queue is equal to or earlier than the current time, the first message in the queue is sent; otherwise, it is not sent. Every time the first message in the queue is sent, the new first message in the queue is checked to decide whether to send it.

[0079] Under this forwarding method, the end-to-end delay experienced by a message of a specific delay level, when violating the deadline, exceeds the delay level by at most the duration of the delay level.

[0080] The characteristic of a rotating priority queue is that the queue's priority changes every time a certain interval passes. A countdown queue is a specific implementation of a rotating priority queue, which uses a countdown to represent priority. The smaller the countdown, the higher the priority.

[0081] The present disclosure further defines the following functions.

[0082] a) Allocation method of rotating priority queue

[0083] The rotating priority queue includes multiple virtual parent queues, each of which further includes multiple physical child queues. Figure 5 is a schematic diagram of the relationship between virtual parent queues and physical child queues according to an embodiment of the present disclosure. As shown in Figure 5, different virtual parent queues have different priorities. The priority of each virtual parent queue changes every certain time interval. The buffer of each virtual parent queue is not actually allocated a fixed size. Instead, all virtual parent queues share a preset buffer size, which is dynamically allocated on demand.

[0084] Different physical subqueues are maintained under each virtual parent queue according to different delay levels (delay_level), and packets are actually stored in the physical subqueues. Physical subqueues with lower delay levels are queued before physical subqueues with higher delay levels. The actual cache overhead of a virtual parent queue is contributed by all the physical subqueues it contains. The cache overhead of each physical subqueue is not fixed and is dynamically allocated based on whether packets are inserted. However, the maximum cache overhead of a physical subqueue is equal to the burst resource upper limit of the corresponding delay level (Note: For the value of the burst resource upper limit corresponding to the delay level, please refer to the schedulability conditions in the related technology draft-peng-detnet-deadline-based-forwarding-06). However, it should be noted that the physical subqueues corresponding to the same delay level of all virtual parent queues cannot reach the maximum cache overhead at the same time.

[0085] The message enqueue method is:

[0086] i) Obtain the allowable queuing delay Q of the packet, where Q = D + E - F. The allowable queuing delay in this scenario embodiment is the same as that in the above embodiment. Select a suitable virtual parent queue according to Q. Here, D represents the planned residence time of the packet in the node, E represents the accumulated residence time deviation carried in the packet, and F represents the forwarding delay of the packet in the node.

[0087] For example, when the queue uses countdown (CT) to represent its priority, select the virtual parent queue with the corresponding CT according to CT <= Q < CT + AT, where AT is the CT difference between adjacent virtual parent queues.

[0088] ii) Then, under the selected virtual parent queue, select a suitable physical sub-queue according to D - F of the packet (where D - F is the second residence reference value in the above embodiment), so that the delay level delay_level corresponding to the selected physical sub-queue is closest to and less than D - F.

[0089] b) The scheduler is configured in the in-time forwarding mode

[0090] In the in-time forwarding mode, as long as any virtual parent queue is not empty, always obtain the packet from the non-empty current highest-priority virtual parent queue for transmission. In one embodiment, among the multiple non-empty physical sub-queues under this virtual queue, obtain the packets from the non-empty physical sub-queues in sequence in the direction from the physical sub-queue with a smaller delay level to the physical sub-queue with a larger delay level. Only when a physical sub-queue is emptied, read the next non-empty physical sub-queue.

[0091] Figure 6 is a schematic diagram of a relationship between the minimum countdown value and the maximum countdown value according to an embodiment of the present disclosure. As shown in Figure 6, when the deadline scheduler using the countdown queue is configured in the in-time forwarding mode, the maximum countdown value is the preset N * AT. For example, N is 100 and AT is 10 us; the minimum countdown value can reach -2 * AT, but will immediately flip to N * AT. The total number of virtual parent queues is N + 2. The advantage of this method is that any virtual parent queue in the sending state (even the virtual parent queue with CT <= 0) can always receive new packets at the same time. That is, the newly arrived packets always select the virtual parent queue with the corresponding CT according to CT <= Q < CT + AT according to their allowable queuing delay Q, regardless of whether the virtual parent queue is in the sending state.

[0092] It should be noted that the reason why the minimum countdown value can reach -2*AT is based on the following considerations: Assume that among all current virtual parent queues, the CT of virtual parent queue queue-x is the smallest, which is between (-AT, 0). At this time, a burst volume corresponding to the minimum delay_level is received, and according to CT <= Q < CT+AT, this burst volume will be selected to be inserted into queue-x. Assume that the transmission of this burst volume takes one AT (according to draft-peng-detnet-deadline-based-forwarding-06, the transmission time of the burst volume for each delay level does not exceed one AT). Then, after queue-x waits for the transmission of this burst volume to complete, its CT must have decreased to between (-2*AT, -AT).

[0093] c) The scheduler is configured in the on-time forwarding mode

[0094] Since the rotating priority queue using general priority values cannot determine timeliness only based on the priority value, the deadline scheduler using the countdown queue is discussed here. At this time, when the scheduler is configured in the on-time forwarding mode, packets are always obtained from the non-empty current highest-priority virtual parent queue (and CT <= 0) for transmission. In one embodiment, among the multiple non-empty physical sub-queues under this virtual queue, packets are obtained from the non-empty physical sub-queues in sequence from the physical sub-queue with a smaller delay level to the physical sub-queue with a larger delay level. Only after a physical sub-queue is emptied, the next non-empty physical sub-queue is read. Note that any virtual parent queue with CT > 0 is not allowed to send packets.

[0095] Figure 7 is another schematic diagram of the relationship between the minimum countdown value and the maximum countdown value according to an embodiment of the present disclosure. As shown in Figure 7, when the deadline scheduler using the countdown queue is configured in the on-time forwarding mode, the maximum countdown value is the preset N*AT. For example, N is 100 and AT is 10 us; the minimum countdown value can reach -(N + 1)*AT, but will immediately flip to N*AT. The total number of virtual parent queues is 2*N + 1. The advantage of this method is that any virtual parent queue in the transmission state (even the virtual parent queue with CT <= 0) can always receive new packets simultaneously, that is, the newly arrived packets always select the virtual parent queue with the corresponding CT according to CT <= Q < CT+AT according to their allowed queuing delay Q, regardless of whether the virtual parent queue is in the transmission state.

[0096] In this method, for packets corresponding to a specific delay level, when the end-to-end delay exceeds the deadline, the excess size is at most the duration of this delay level.

[0097] It should be noted that the reason why the minimum countdown value can reach -(N + 1)*AT is based on the following consideration. Assume that among all the virtual parent queues currently, the CT of the virtual parent queue queue-x is the smallest, between (-AT, 0). At this time, bursts of all delay_levels are received concurrently, and according to CT <= Q < CT + AT, these bursts will all be selected to be inserted into queue-x. Since the transmission of all bursts can take a maximum of N*AT, after queue-x waits for these bursts to be transmitted, its CT will surely have decreased to between (-(N + 1)*AT, -N*AT).

[0098] Scenario Embodiment Two

[0099] Based on the settings of the forwarding methods for different sequences and forwarding modes in Scenario Embodiment One, in this Scenario Embodiment Two, the scheduling of the ordered queue in the in-time forwarding mode is specifically described.

[0100] According to the delay levels and their burst resources described in draft-peng-detnet-deadline-based-forwarding-06, assume that the scheduler supports 10 delay levels, denoted as d10, d20,..., d100 respectively, that is, the smallest delay level is 10 us, followed by 20 us, and so on, and the largest delay level is 100 us. The interval between adjacent delay levels is 10 us, that is, the value of AT is 10 us. Assume that the burst upper limits corresponding to each delay level are b10, b20,..., b100 respectively. For simplicity, ignore the bursts contributed by the bandwidth resources of each delay level within any time interval, that is, assume that the transmission duration consumed by the burst upper limit of each delay level is approximately one AT. In addition, it is also assumed that the forwarding delay F within the node and the link propagation delay are both 0.

[0101] Assume that at time T0, the ordered queue of the scheduler is initially empty.

[0102] The following is the order of bursts arriving at the scheduler, aiming to cause as much backlog as possible in the queue and verify whether these backlogs violate their deadlines.

[0103] At time T0, assume that the eligible bursts arriving concurrently at the scheduler from multiple ingress ports are b10, b20, b30, b40, b50, and b100. Note that an eligible burst means its cumulative delay variation E is 0. b10 will be compared and inserted into the ordered queue according to the value T0+10, b20 will be compared and inserted into the ordered queue according to the value T0+20, and so on. b100 will be inserted into the ordered queue according to the value T0+100. As can be seen, in the ordered queue, from the front to the back, the elements are b10, b20, b30, b40, b50, and b100, and transmission of b10 begins immediately.

[0104] At time T0+10us, b10 is sent, within its 10us deadline. At this point, the remaining elements in the ordered queue are b20, b30, b40, b50, and b100. Assume that a valid burst b90 is received from the ingress port. b90 is compared and inserted into the ordered queue based on the value T0+10+90. Since its latency d90 is smaller than the latency d100 of the existing element b100 in the queue, b90 is inserted before b100. Therefore, the elements in the ordered queue are b20, b30, b40, b50, b90, and b100, and b20 begins to be sent immediately.

[0105] At time T0+20us, b20 is sent, without violating its deadline of 20us. At this point, the remaining elements in the ordered queue are b30, b40, b50, b90, and b100. Assume that a valid burst b80 is received from the ingress port. b80 is compared and inserted into the ordered queue according to the value T0+20+80. Since its latency level d80 is lower than the latency level d90 of the existing element b90 in the queue, it is inserted before b90. That is, the elements in the ordered queue are b30, b40, b50, b80, b90, and b100, and b30 begins to be sent immediately.

[0106] By analogy, the subsequent bursts such as b70, b60, etc. that arrive in sequence can be compared with the existing elements in the ordered queue and inserted into the appropriate positions, so that the next bursts sent in sequence are b40, b50, b60, b70, b80, b90, b100, and each burst does not exceed its deadline.

[0107] If the method of the embodiment of the present disclosure is not adopted, b60, b70, b80, b90, and b100 will not be correctly sorted in the ordered queue, causing some of the bursts to violate their deadlines.

[0108] Scenario Example 3

[0109] This scenario embodiment describes the scheduling of ordered queues in on-time forwarding mode.

[0110] According to the delay levels and burst resources described in draft-peng-detnet-deadline-based-forwarding-06, it is assumed that the scheduler supports 10 delay levels, denoted as d10, d20, ..., d100, that is, the smallest delay level is 10us, followed by 20us, and so on, and the largest delay level is 100us. The interval between adjacent delay levels is 10us, that is, the value of AT is 10us. Assume that the burst upper limit corresponding to each delay level is b10, b20, ..., b100 respectively. For simplicity, ignore the burst contributed by the bandwidth resources of each delay level in any time interval, that is, assume that the transmission time consumed by the burst upper limit of each delay level is approximately one AT. In addition, it is also assumed that the intra-node forwarding delay F and the link propagation delay are both 0.

[0111] Assume that at time T0, the scheduler's ordered queue is initially empty.

[0112] The following bursts arrive at the scheduler in order, with the goal of creating as much backlog as possible in the queue and verifying whether these backlogs violate their deadlines.

[0113] At time T0, if the legitimate burst arriving at the scheduler is b100, it will be inserted into the ordered queue at the value of T0+100. At this point, the element in the ordered queue is b100. Due to the on-time forwarding mode, b100 will not be sent until time T0+100us.

[0114] At time T0+10us, if a legitimate burst arrives at the scheduler, b90, it will be inserted into the ordered queue according to the value T0+10+90. Since its latency d90 is smaller than the latency d100 of the existing element b100 in the queue, it is inserted before b100, resulting in the elements in the ordered queue being b90, b100. Due to the on-time forwarding mode, b90 will not be sent until T0+100us.

[0115] Similarly, legitimate bursts b80, b70, b60, b50, b40, b30, b20, and b10 arrive every 10 us, bringing the ordered queue to b10, b20, b30, b40, b50, b60, b70, b80, b90, and b100. Because of the on-time forwarding mode, these bursts are not sent until T0+100 us.

[0116] At time T0+100us, the first element b10 is sent, which takes 10us. It can be seen that b10 exceeds its deadline by 10us, that is, the cumulative delay deviation E of b10 will be assigned a value of -10us.

[0117] At time T0+110us, the first element b20 is sent, which takes 10us. Therefore, b20 exceeds its deadline by 20us. Therefore, the cumulative delay deviation E of b20 is assigned a value of -20us.

[0118] By analogy, the burst corresponding to each delay level will exceed its deadline, and the excess is the duration of the corresponding delay level.

[0119] If the method of the embodiment of the present disclosure is not adopted, in the above example, the burst corresponding to each delay level is uncertain when it exceeds its deadline. For example, b10 may exceed its deadline by 100 μs.

[0120] Figure 8 is a schematic diagram of latency assessment according to an embodiment of the present disclosure. As shown in Figure 8, deadline violations do not accumulate as the number of hops increases. That is, when a burst's end-to-end latency violates the deadline, the delay exceeds it by at most the duration of the latency level corresponding to the burst. Figure 8 illustrates the situation where, following the above process, the per-hop latency of observed flow f (corresponding to latency level d100) at node u exceeds the deadline by 100µs, and is then further delayed by other interfering flows at downstream node v.

[0121] Assume that the legal burst arriving at node v at time T0+10us is b90, the legal burst arriving at time T0+20us is b80, ..., and the legal burst arriving at time T0+90us is b10. The elements in the ordered queue are b10, b20, b30, b40, b50, b60, b70, b80, and b90.

[0122] Then, the illegal (note: because E = -100us) burst that arrives at time T0+100us is observed as b100. It is inserted into the ordered queue according to the value T0+100+100-100. Since its delay level d100 is greater than the delay level d90 of the existing element b90 in the queue, it is inserted after b90. The elements in the ordered queue are now b10, b20, b30, b40, b50, b60, b70, b80, b90, and b100. This means that b100 will not be sent until T0+200us. In other words, the actual residence delay experienced at node v is 100us, which is consistent with the planned residence delay of 100us. The accumulated delay deviation E is not updated and remains -100us.

[0123] Scenario Example 4

[0124] This scenario embodiment describes the scheduling of a countdown queue in an in-time forwarding mode.

[0125] According to the delay levels and burst resources described in draft-peng-detnet-deadline-based-forwarding-06, it is assumed that the scheduler supports 10 delay levels, denoted as d10, d20, ..., d100, that is, the smallest delay level is 10us, followed by 20us, and so on, and the largest delay level is 100us. The interval between adjacent delay levels is 10us, that is, the value of AT is 10us. Assume that the burst upper limit corresponding to each delay level is b10, b20, ..., b100 respectively. For simplicity, ignore the burst contributed by the bandwidth resources of each delay level in any time interval, that is, assume that the transmission time consumed by the burst upper limit of each delay level is approximately one AT. In addition, it is also assumed that the intra-node forwarding delay F and the link propagation delay are both 0.

[0126] Assume that at time T0, the scheduler's countdown queue is initially empty, and the CT values ​​of each virtual parent queue are as follows: parent-queue-A (CT=-10) parent-queue-B (CT=0) parent-queue-C (CT=10) parent-queue-D (CT=20) parent-queue-E (CT=30) parent-queue-F (CT=40) parent-queue-G (CT=50) parent-queue-H (CT=60) parent-queue-I (CT=70) parent-queue-J (CT=80) parent-queue-K (CT=90) parent-queue-L (CT=100)

[0127] The following bursts arrive at the scheduler in order, with the goal of creating as much backlog as possible in the queue and verifying whether these backlogs violate their deadlines.

[0128] At time T0, assume that the eligible bursts arriving concurrently at the scheduler from multiple ingress ports are b10, b20, b30, b40, b50, and b100. Note that a valid burst means its cumulative delay variation, E, is 0. b10 will be inserted into parent-queue-C with a value of Q = D + EF = 10, b20 will be inserted into parent-queue-D with a value of Q = D + EF = 20, and so on. b100 will be inserted into parent-queue-L with a value of Q = D + EF = 100. The queue states are as follows, and b10 begins sending immediately.

[0129] parent-queue-A(CT=-10)

[0130] parent-queue-B(CT=0)

[0131] parent-queue-C(CT=10)

[0132] sub-queue-d10:b10

[0133] parent-queue-D(CT=20)

[0134] sub-queue-d20:b20

[0135] parent-queue-E(CT=30)

[0136] sub-queue-d30:b30

[0137] parent-queue-F(CT=40)

[0138] sub-queue-d40:b40

[0139] parent-queue-G(CT=50)

[0140] sub-queue-d50:b50

[0141] parent-queue-H(CT=60)

[0142] parent-queue-I(CT=70)

[0143] parent-queue-J(CT=80)

[0144] parent-queue-K(CT=90)

[0145] parent-queue-L(CT=100)

[0146] sub-queue-d100:b100

[0147] At time T0+10us, b10 is sent, within its 10us deadline. At this point, elements b20, b30, b40, b50, and b100 remain in the countdown queue. The CT of each virtual parent queue decreases by 10. Suppose a legitimate burst b90 is received from the ingress port. b90 is inserted into parent-queue-L with Q = D + EF = 90. The queue status is as follows, and b20 begins to be sent immediately.

[0148] parent-queue-A(CT=100)

[0149] parent-queue-B(CT=-10)

[0150] parent-queue-C(CT=0)

[0151] parent-queue-D(CT=10)

[0152] sub-queue-d20:b20

[0153] parent-queue-E(CT=20)

[0154] sub-queue-d30:b30

[0155] parent-queue-F(CT=30)

[0156] sub-queue-d40:b40

[0157] parent-queue-G(CT=40)

[0158] sub-queue-d50:b50

[0159] parent-queue-H(CT=50)

[0160] parent-queue-I(CT=60)

[0161] parent-queue-J(CT=70)

[0162] parent-queue-K(CT=80)

[0163] parent-queue-L(CT=90)

[0164] sub-queue-d90:b90

[0165] sub-queue-d100:b100

[0166] By analogy, subsequent bursts such as b80, b70, and b60 can be inserted into the physical subqueue of parent-queue-L, so that the next bursts sent in sequence are b40, b50, b60, b70, b80, b90, and b100, and each burst does not exceed its deadline.

[0167] If the method of the embodiment of the present disclosure is not adopted, b60, b70, b80, b90, and b100 will not be correctly sorted in the countdown queue, causing some of the bursts to violate their deadlines.

[0168] Scenario Example 5

[0169] This scenario embodiment describes the scheduling of a countdown queue in an on-time forwarding mode.

[0170] According to the delay levels and burst resources described in draft-peng-detnet-deadline-based-forwarding-06, it is assumed that the scheduler supports 10 delay levels, denoted as d10, d20, ..., d100, that is, the smallest delay level is 10us, followed by 20us, and so on, and the largest delay level is 100us. The interval between adjacent delay levels is 10us, that is, the value of AT is 10us. Assume that the burst upper limit corresponding to each delay level is b10, b20, ..., b100 respectively. For simplicity, ignore the burst contributed by the bandwidth resources of each delay level in any time interval, that is, assume that the transmission time consumed by the burst upper limit of each delay level is approximately one AT. In addition, it is also assumed that the intra-node forwarding delay F and the link propagation delay are both 0.

[0171] Assume that at time T0, the countdown queue of the scheduler is initially empty, and the CT values ​​of each virtual parent queue are as follows: parent-queue-A (CT=-100) parent-queue-B (CT=-90) parent-queue-C (CT=-80) parent-queue-D (CT=-70) parent-queue-E (CT=-60) parent-queue-F (CT=-50) parent-queue-G (CT=-40) parent-queue-H (CT=-30) parent-queue-I (CT=-20) parent-queue-J (CT=-10) parent-queue-K (CT=0) parent-queue-L (CT=10) parent-queue-M (CT=20) parent-queue-N (CT=30) parent-queue-O (CT=40) parent-queue-P (CT=50) parent-queue-Q (CT=60) parent-queue-R(CT=70) parent-queue-S(CT=80) parent-queue-T(CT=90) parent-queue-U(CT=100)

[0172] The following bursts arrive at the scheduler in order, with the goal of creating as much backlog as possible in the queue and verifying whether these backlogs violate their deadlines.

[0173] At time T0, assuming the legitimate burst arriving at the scheduler is b100, it will be inserted into parent-queue-U according to Q = D + EF = 100. Due to the on-time forwarding mode, all virtual parent queues with CT > 0 will not send packets.

[0174] At time T0+10us, assuming that the legal burst arriving at the scheduler is b90, it will also be inserted into parent-queue-U according to Q=D+EF=90.

[0175] And so on. Every 10 us, the legal bursts b80, b70, b60, b50, b40, b30, b20, and b10 arrive in sequence and are inserted into parent-queue-U.

[0176] At time T0+100us, the status of the countdown queue is as follows: parent-queue-A (CT=10) parent-queue-B (CT=20) parent-queue-C (CT=30) parent-queue-D (CT=40) parent-queue-E (CT=50) parent-queue-F (CT=60) parent-queue-G (CT=70) parent-queue-H (CT=80) parent-queue-I (CT=90) parent-queue-J (CT=100) parent-queue-K (CT=-100) parent-queue-L (CT=-90) parent-queue-M (CT=-80) parent-queue-N (CT=-70) parent-queue-O (CT=-60) parent-queue-P (CT=-50) parent-queue-Q (CT=-40) parent-queue-R (CT=-30) parent-queue-S(CT=-20) parent-queue-T(CT=-10) parent-queue-U(CT=0) sub-queue-d10:b10 sub-queue-d20:b20 sub-queue-d30:b30 sub-queue-d40:b40 sub-queue-d50:b50 sub-queue-d60:b60 sub-queue-d70:b70 sub-queue-d80:b80 sub-queue-d90:b90 sub-queue-d100:b100

[0177] At time T0+100us, b10 is sent, which takes 10us. It can be seen that b10 exceeds its deadline by 10us, that is, the cumulative delay deviation E of b10 will be assigned a value of -10us.

[0178] At time T0+110us, b20 is sent, which takes 10us. Therefore, b20 exceeds its deadline by 20us. Therefore, the cumulative delay deviation E of b20 is assigned a value of -20us.

[0179] By analogy, the burst corresponding to each delay level will exceed its deadline, and the excess is the duration of the corresponding delay level.

[0180] If the method of the embodiment of the present disclosure is not adopted, in the above example, the burst corresponding to each delay level is uncertain when it exceeds its deadline. For example, b10 may exceed its deadline by 100 μs.

[0181] It's important to note that deadline violations don't accumulate as the number of hops increases. That is, when a burst's end-to-end delay violates the deadline, it only exceeds the duration of the delay class corresponding to the burst. Still referring to Figure 8, after observed flow f (corresponding to delay class d100) experiences a per-hop delay exceeding the deadline by 100µs at node u, it continues to be delayed by other interfering flows at downstream node v.

[0182] Assume that a valid burst arrives at node v at time T0+10us, called b90, and is inserted into queue-x (CT=90). A valid burst arrives at time T0+20us, called b80, and so on, and a valid burst arrives at time T0+90us, called b10. These bursts are all inserted into the same virtual parent queue, queue-x. At this point, queue-x's CT becomes 10.

[0183] Then, the illegal (note: because E = -100us) burst that arrives at time T0+100us is observed as b100. It will also be inserted into queue-x (at this time, queue-x's CT becomes 0) according to Q = D + EF = 0. At this point, the elements in the virtual parent queue, queue-x, are b10, b20, b30, b40, b50, b60, b70, b80, b90, and b100. This means that b100 will not be sent until T0+200us. In other words, the actual residence delay experienced at node v is 100us, which is consistent with the planned residence delay of 100us. The accumulated delay deviation E is not updated and remains -100us.

[0184] In summary, the embodiment of the present disclosure provides a message forwarding method, which creates a deadline queue scheduler for a specific egress port within a node in the network, which can be an ordered queue or a rotating priority queue. For the ordered queue, a method for inserting a message into the queue is defined, and the in-time and on-time forwarding modes based on the method are described. For the rotating priority queue, a queue allocation method is defined, including multiple virtual parent queues and physical child queues, and the in-time and on-time forwarding modes based on the method are described. Ultimately, in the in-time forwarding mode, the sending of the message will not violate its deadline, and in the on-time forwarding mode, the sending of the message has strict jitter protection. In the actual implementation process, the description of the deadline scheduling mechanism of the link (such as configuring the deadline scheduler instance, in-time or on-time forwarding mode, supported delay levels, and the interval between delay levels) contained in the public user configuration guide manual, information such as the planned residence time and accumulated delay deviation carried in the message, or interoperability testing and packet capture between multiple manufacturers can be used to verify whether the method provided by the embodiment of the present disclosure is adopted.

[0185] The above description is merely a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Those skilled in the art will appreciate that various modifications and variations of the present disclosure are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present disclosure should be included within the scope of protection of the present disclosure.

Claims

1. A message forwarding method, comprising: Obtaining a first resident reference value of a first message, and inserting the first message into a corresponding position of an ordered queue according to the first resident reference value; The first message is forwarded according to the forwarding mode of the ordered queue.

2. The method according to claim 1, wherein: The first residence reference value is the sum of a deviation of a time when the first message arrives at an ingress port of a node, a planned residence time of the first message in the node, and a cumulative residence time carried by the first message.

3. The method according to claim 2, wherein: Inserting the first message into a corresponding position of an ordered queue according to the first resident reference value includes: The smaller the first resident reference value is, the closer the position of the first message inserted into the ordered queue is to the head of the queue; When the first residence reference values ​​are equal, the first message with a smaller planned residence time is inserted closer to the head of the ordered queue; When the first residence reference value and the planned residence time are equal, the first message that arrives at the egress port of the node first is inserted into the ordered queue at a position closer to the head of the queue.

4. The method according to claim 2, wherein: Forwarding the first message according to the forwarding mode of the ordered queue includes: When the forwarding mode is timely forwarding, the first message is obtained from the head of the ordered queue for forwarding.

5. The method according to claim 2, wherein: Forwarding the first message according to the forwarding mode of the ordered queue includes: When the forwarding mode is on-time forwarding, it is determined whether the first resident reference value of the first message at the head of the ordered queue is less than or equal to the current time, and if so, the first message is forwarded.

6. A message forwarding method, comprising: Acquire an allowed queuing delay and a second residence reference value of a second message, and insert the second message into a corresponding position of the rotation priority queue according to the allowed queuing delay and the second residence reference value; The second message is forwarded according to the forwarding mode of the rotational priority queue.

7. The method according to claim 6, wherein: The value of the allowed queuing delay is the sum of the planned residence time of the second message in the node and the accumulated residence time deviation carried by the second message, minus the forwarding delay of the second message in the node; The second residence reference value is a difference between a planned residence time of the second message in the node and a forwarding delay of the second message in the node.

8. The method according to claim 7, wherein: Inserting the second message into a corresponding position of the rotation priority queue according to the allowed queuing delay and the second residence reference value includes: Selecting a virtual parent queue of the rotational priority queue according to the allowed queuing delay, wherein the first priority of the selected virtual parent queue is less than or equal to the allowed queuing delay, and the sum of the first priority and the priority equal difference interval AT is greater than the allowed queuing delay; the priority equal difference interval is the difference between the first priorities of adjacent virtual parent queues; A physical subqueue of the virtual parent queue is selected according to the second resident reference value, wherein the difference between the latency level of the selected physical subqueue and the second resident reference value is the smallest, and the latency level is less than or equal to the second resident reference value.

9. The method according to claim 7, wherein: Forwarding the second message according to the forwarding mode of the rotational priority queue includes: When the forwarding mode is timely forwarding, the second message in the virtual parent queue with the highest priority in the rotational priority queue is selected for forwarding.

10. The method according to claim 7, wherein: Forwarding the second message according to the forwarding mode of the rotational priority queue includes: When the forwarding mode is just-in-time forwarding, in the virtual parent queue of the rotational priority queue whose countdown CT is less than or equal to 0, the second message in the virtual parent queue with the highest priority is selected for forwarding.

11. The method according to any one of claims 9 or 10, wherein: Selecting the second message in the virtual parent queue with the highest priority for forwarding includes: Selecting a non-empty virtual parent queue with a minimum countdown CT from all the virtual parent queues as the virtual parent queue with the highest priority; According to the order of latency levels of the physical subqueues of the virtual parent queue from small to large, the second message is obtained from the non-empty physical subqueue for forwarding.

12. The method according to claim 11, wherein: After selecting a non-empty virtual parent queue with a minimum countdown CT from all the virtual parent queues as the virtual parent queue with the highest priority, the method further includes: When the forwarding mode is timely forwarding, the CT value of the virtual parent queue whose minimum CT value among all the virtual parent queues is -2*AT is flipped to the preset maximum CT value; When the forwarding mode is just-in-time forwarding, the CT value of the virtual parent queue whose minimum CT value among all the virtual parent queues is -(N+1)*AT is flipped to a preset maximum CT value, where N is the preset number of delay levels.

13. A computer-readable storage medium having a computer program stored therein, wherein: When the computer program is executed by a processor, the method described in any one of claims 1 to 12 is implemented.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 12 when executing the computer program.

Citation Information

Patent Citations

  • Data sending method and device

    CN114666809A

  • Message scheduling method, network device, storage medium and computer program product

    CN116436863A

  • Guaranteed latency based forwarding

    WO2021119675A2