Message forwarding method, storage medium and electronic device
By obtaining the resident reference value of the packet in the network node, inserting it into an ordered queue or a rotation priority queue, and forwarding according to the forwarding mode of the queue, the problem of large cache consumption and message violation deadline is solved, and efficient message forwarding is achieved within the deadline.
Patent Information
- Application Number
- CN202311148915.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-05
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the cache consumption of network nodes is large and it is prone to problems that packets violate their deadline.
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.
It reduces cache consumption and efficiently completes message forwarding within the deadline, avoiding the phenomenon of message violating the deadline.
Smart Images

Figure CN119583464A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a message forwarding method, a storage medium, and an electronic device. Background Art
[0002] RFC8655 describes the architecture of deterministic networks and defines the Quality of Service (QoS) objectives for deterministic forwarding: minimum and maximum delays from source to destination, as well as bounded delay jitter; allowed packet loss rate; upper bound for out-of-order packet delivery. In order to achieve these goals, deterministic networks use resource reservation, explicit routing, service protection and other means. In general, a deterministic path is a strictly explicit path that relies on a centralized controller to calculate, and reserves resources at nodes along the path to meet the Service Level Agreement (SLA) requirements of deterministic services.
[0003] In the related art, a deadline-based forwarding mechanism is proposed, which uses a single deadline to control the message scheduling of all nodes along the path. This deadline is an offset time, which indicates the planned residence time D of the message allowed in the node. In addition, the accumulated residence time deviation E can be carried in the message, and the allowed residence time Q of the message in the node can be dynamically adjusted to distinguish between the Eligibility Arrvial Burst (EAB) and the Ineligibility Arrvial Burst (IAB), and obtain lower end-to-end delay jitter. The scheme discusses two queue models. One is the Sorted Queue (SQ), such as a single Put-In First-Out (PIFO) or linked list. The elements in the ordered queue are sorted according to a certain method. The newly arrived elements can be inserted into any position, but the message is always taken from the head of the queue for processing; the other is the Rotation Priority Queue (RPQ), such as the countdown queue group defined in the scheme. Different queues in the group have different countdowns (CT). The queue with a smaller countdown has a higher scheduling priority and sends messages first. A message will be selected to enter the queue with the corresponding countdown CT according to its allowed residence time. However, the scheme mainly assumes that the nodes in the network adopt the forwarding behavior of timely forwarding in-time (or work-conserving forwarding), which will cause the bursts received on the nodes to accumulate and consume a lot of cache. In addition, the queue allocation method of the existing queue mechanism is unreasonable, which easily leads to the phenomenon that the message violates its deadline. Summary of the invention
[0004] The embodiments of the present invention 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 easy occurrence of message violation of its deadline.
[0005] According to one embodiment of the present invention, a message forwarding method is provided, comprising: 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.
[0006] According to another embodiment of the present invention, 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.
[0007] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0008] According to yet another embodiment of the present invention, there is provided 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.
[0009] The present invention provides a message forwarding method, comprising: 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. The present invention solves the problems of large cache consumption and easy occurrence of message violation of its deadline in the related art, and achieves the effect of reducing cache consumption and efficiently completing message forwarding within the deadline. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a hardware structure block diagram of a computer terminal of a message forwarding method according to an embodiment of the present invention;
[0011] Figure 2 A schematic diagram of a network architecture for running a message forwarding method according to an embodiment of the present invention;
[0012] Figure 3 is a flow chart of a message forwarding method according to an embodiment of the present invention;
[0013] Figure 4is a flow chart of a message forwarding method according to an embodiment of the present invention;
[0014] Figure 5 is a schematic diagram of the relationship between a virtual parent queue and a physical child queue according to a scenario embodiment of the present invention;
[0015] Figure 6 is a schematic diagram of a relationship between a minimum countdown value and a maximum countdown value according to a scenario embodiment of the present invention;
[0016] Figure 7 is another schematic diagram of the relationship between the minimum countdown value and the maximum countdown value according to a scenario embodiment of the present invention;
[0017] Figure 8 2 is a schematic diagram of delay evaluation according to a scenario embodiment of the present invention. DETAILED DESCRIPTION
[0018] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0019] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0020] 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 running on a computer terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal of a message forwarding method according to an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 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 / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0021] 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 invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. 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 examples, the memory 104 may further include a memory remotely arranged 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.
[0022] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0023] The present application embodiment can be run on Figure 2 In the network architecture shown, Figure 2 A schematic diagram of a network architecture for running a message forwarding method according to an embodiment of the present invention is shown in FIG. Figure 2 As shown in FIG. 1 , the network architecture includes: ingress port, egress port, storage / forwarding (S&F), processing, internal switching network, and deadline scheduler. Assume that the time when the message arrives at the ingress port is A1, and then after the node forwarding delay (F) composed of storage / forwarding (S&F), processing, and internal switching network, the time when it reaches the deadline scheduler of the egress port is A2, and then after a queuing delay (Q), it is sent to the egress 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.
[0024] In this embodiment, a message forwarding method running on the above-mentioned computer terminal or network architecture is provided. Figure 3 is a flow chart of a message forwarding method according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:
[0025] 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;
[0026] In an exemplary embodiment, the first residence reference value is the sum of the time when the first message arrives at the node ingress port, the planned residence time of the first message in the node, and the accumulated residence time deviation carried by the first message.
[0027] 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.
[0028] 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 values are equal, the smaller the planned residence time, 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 equal, the first message that arrives at the egress port of the node first is inserted into the ordered queue closer to the head of the queue.
[0029] In the actual implementation process, if the first residence reference values of two messages, i.e., A1+D+E values, are equal, the message with the smaller planned residence time D is placed in front and inserted closer to the head of the ordered queue. If the first residence reference values of two messages, i.e., A1+D+E values, are equal and the planned residence time D is also equal, they are inserted according to the order of arrival at the deadline scheduler, and the message that arrives at the scheduler first is placed in front.
[0030] Step S304: forward the first message according to the forwarding mode of the ordered queue.
[0031] 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.
[0032] In an exemplary embodiment, forwarding a first message according to a forwarding mode of an ordered queue includes: when the forwarding mode is just-in-time forwarding, determining whether a first resident reference value of a first message at the head of the ordered queue is less than or equal to a current time, and if so, forwarding the first message.
[0033] In the actual implementation process, the first message is forwarded according to the forwarding mode of the ordered queue. The ordered queue must not be empty. When the forwarding mode is timely forwarding, the first message is obtained from the head of the ordered queue for forwarding. 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. Every time the head message is sent, the new head message is checked to decide whether to send it.
[0034] Through the above steps, 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. The problem of large cache consumption and easy occurrence of message violation of its deadline in the related art is solved, and the effect of reducing cache consumption and efficiently completing message forwarding within the deadline is achieved.
[0035] The embodiment of the present invention also provides a message forwarding method. Figure 4 is a flow chart of a message forwarding method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:
[0036] 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;
[0037] In an exemplary embodiment, 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 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.
[0038] 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. The above allowed queuing delay value is Q = D + EF. The second residence reference value is DF.
[0039] 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.
[0040] In an exemplary embodiment, inserting a second message into a corresponding position of a rotational priority queue according to an allowed queuing delay and a second residence reference value includes: selecting a virtual parent queue of the rotational priority queue according to the allowed queuing delay, wherein a first priority of the selected virtual parent queue is less than or equal to the allowed queuing delay, and a sum of the first priority and the priority arithmetic interval AT is greater than the allowed queuing delay; the priority arithmetic interval is a difference between first priorities of adjacent virtual parent queues; selecting a physical subqueue of the virtual parent queue according to the second residence reference value, wherein a difference between a 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.
[0041] In actual implementation, a countdown (CT) may be used to represent the first priority.
[0042] Step S404: forward the second message according to the forwarding mode of the rotation priority queue.
[0043] 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.
[0044] In the actual implementation process, in the in-time forwarding mode, as long as any virtual parent queue is not empty, the message is always obtained from the non-empty virtual parent queue with the current highest priority for transmission. Specifically, among the multiple non-empty physical subqueues under the virtual queue, along the direction from the physical subqueue with a small delay level to the physical subqueue with a large delay level, the message is obtained from the non-empty physical subqueues for transmission. Only when a physical subqueue is emptied, the next non-empty physical subqueue is read.
[0045] 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.
[0046] In the actual implementation process, when the scheduler is configured to on-time forwarding mode, it always obtains messages from the non-empty virtual parent queue with the current highest priority (and CT <= 0) for transmission. Specifically, among the multiple non-empty physical subqueues under the virtual queue, along the direction from the physical subqueue with a small delay level to the physical subqueue with a large delay level, it obtains messages from the non-empty physical subqueues for transmission. Only when a physical subqueue is emptied, the next non-empty physical subqueue is read. Note that any virtual parent queue with CT>0 is not allowed to send messages.
[0047] In an exemplary embodiment, the second packet in the virtual parent queue with the highest priority is selected for forwarding, and the non-empty virtual parent queue with the smallest countdown CT among all virtual parent queues is selected as the virtual parent queue with the highest priority; the second packet is obtained from the non-empty physical sub-queues for forwarding in ascending order of the delay levels of the physical sub-queues of the virtual parent queue.
[0048] In an exemplary embodiment, after selecting the non-empty virtual parent queue with the smallest countdown CT among all virtual parent queues as the virtual parent queue with the highest priority, it further includes: in the case where the forwarding mode is immediate forwarding, flipping the CT value of the virtual parent queue whose minimum achievable CT value among all virtual parent queues is -2*AT to the preset maximum CT value;
[0049] In the actual implementation process, when the deadline scheduler of 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 it will immediately flip to N*AT. The total number of virtual parent queues is N + 2. Any virtual parent queue in the sending state (even if the CT <= 0 virtual parent queue) 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 sending state.
[0050] In an exemplary embodiment, after selecting the non-empty virtual parent queue with the smallest countdown CT among 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 among all virtual parent queues is -(N + 1)*AT to the preset maximum CT value, where N is the preset number of delay levels.
[0051] In the actual implementation process, when the deadline scheduler of 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 if the CT <= 0 virtual parent queue) 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 sending state.
[0052] 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 a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the relevant technology, 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), and includes a number of instructions for 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 invention.
[0053] In the present embodiment, a message forwarding device is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description that has been made is not repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.
[0054] An embodiment of the present invention provides a message forwarding device, including: a first insertion module, used to obtain a first resident reference value of a first message, and insert the first message into a corresponding position of an ordered queue according to the first resident reference value; a first forwarding module, used to forward the first message according to a forwarding mode of the ordered queue.
[0055] An embodiment of the present invention provides a message forwarding device, which may also include: a second insertion module, which obtains the allowed queuing delay and the second residence reference value of the second message, and inserts the second message into the corresponding position of the rotation priority queue according to the allowed queuing delay and the second residence reference value; a second forwarding module, which is used to forward the second message according to the forwarding mode of the rotation priority queue.
[0056] In the actual implementation process, the process of message forwarding by the above-mentioned message forwarding device can be operated with reference to the specific 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.
[0057] It should be noted that the above modules can be implemented by 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.
[0058] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0059] 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.
[0060] An embodiment of the present invention further provides an electronic device, 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 execute the steps in any one of the above method embodiments.
[0061] 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.
[0062] 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 herein.
[0063] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general 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 by a program code executable by a 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 executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0064] In order to enable those skilled in the art to better understand the technical solution of the present invention, it is described below in conjunction with specific scenario embodiments.
[0065] Scenario Example 1
[0066] The embodiment of the present invention sets a deadline scheduler for different queues including an ordered queue and a priority queue.
[0067] 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 messages are always taken from the head of the queue for processing.
[0068] In an embodiment of the present invention, the following method for inserting a message into an ordered queue is defined:
[0069] a) The method of inserting a message into an ordered queue is:
[0070] i) Obtain the A1+D+E (or A2+D+EF) value of the message, that is, the first resident 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 time when the message arrives at the ingress port, and A2 represents the time when the message arrives at the scheduler (such as Figure 2 As shown in the figure, 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. Figure 2 It can be seen that A1 is the time when the message arrives at the input port, A2 is the time when the message arrives at the output port, and it is also the time when it reaches 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, among which F is generally a fixed value and Q is generally not fixed.
[0071] 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).
[0072] 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.
[0073] b) The scheduler is configured to in-time forwarding mode (timely forwarding mode)
[0074] In the 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 sending.
[0075] c) The scheduler is configured to on-time forwarding mode (punctual forwarding mode)
[0076] In 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. Every time the head message is sent, the new head message is checked to decide whether to send it.
[0077] Under this forwarding method, the end-to-end delay experienced by a message corresponding to a specific delay level when violating the deadline is at most the duration of the delay level.
[0078] The characteristic of a rotating priority queue is that the priority of the queue changes every time a certain time interval passes. For a countdown queue, it is a specific implementation of a rotating priority queue, that is, the countdown is used to represent the priority. The smaller the countdown of a queue, the higher its priority.
[0079] The embodiment of the present invention further defines the following functions.
[0080] a) Allocation method of rotating priority queue
[0081] The rotating priority queue includes multiple virtual parent queues, each of which further includes multiple physical child queues. Figure 5 Schematic diagram of the relationship between the virtual parent queue and the physical child queue according to the scenario embodiment of the present invention, Figure 5 As shown, different virtual parent queues have different priorities. Every time a certain time interval passes, the priority of each virtual parent queue will change. The buffer of each virtual parent queue is not actually allocated a fixed size. Instead, all virtual parent queues share a buffer of a preset size, which is dynamically allocated on demand.
[0082] Different physical subqueues are maintained under each virtual parent queue according to different delay levels (delay_level), and the messages are actually stored in the physical subqueues. Physical subqueues with small delay levels are placed before physical subqueues with large 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 according to whether there are messages 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 relevant 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. .
[0083] The message entry method is:
[0084] i) Obtain the allowed queuing delay Q=D+EF of the message, where the allowed queuing delay in this scenario embodiment is the same as the allowed queuing delay in the above embodiment, and select a suitable virtual parent queue according to Q. Wherein, 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.
[0085] For example, when the queue uses countdown (CT) to represent its priority, a virtual parent queue with a corresponding CT is selected according to CT <= Q < CT + AT, where AT is the CT difference between adjacent virtual parent queues.
[0086] ii) Then, under the selected virtual parent queue, a suitable physical sub-queue is selected according to the 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.
[0087] b) The scheduler is configured in the in-time forwarding mode
[0088] In the in-time forwarding mode, as long as any virtual parent queue is not empty, packets are always obtained from the non-empty current highest-priority virtual parent queue for transmission. Specifically, among the multiple non-empty physical sub-queues under this virtual queue, packets are obtained 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 after a physical sub-queue is emptied, the next non-empty physical sub-queue is read.
[0089] Figure 6 It is a schematic diagram of a relationship between the minimum countdown value and the maximum countdown value according to the scenario embodiment of the present invention. As Figure 6 shown, 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 transmission 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 allowed queuing delay Q, regardless of whether the virtual parent queue is in the transmission state.
[0090] 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, 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 up to 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 will surely have decreased to between (-2*AT, -AT).
[0091] c) The scheduler is configured in the on-time forwarding mode
[0092] Since the rotating priority queue using general priority values cannot judge 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. Specifically, among multiple non-empty physical sub-queues under this virtual queue, in the direction from the physical sub-queue with a smaller delay level to the physical sub-queue with a larger delay level, packets are sequentially obtained from the non-empty physical sub-queues 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.
[0093] Figure 7 It is another schematic diagram of the relationship between the minimum countdown value and the maximum countdown value according to the scenario embodiment of the present invention. As Figure 7 shown, 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 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 according to their allowed queuing delay Q, regardless of whether the virtual parent queue is in the sending state.
[0094] Under this method, for the packets corresponding to a specific delay level, when the end-to-end delay violates the deadline, the exceeded size is at most the duration of this delay level.
[0095] 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 current virtual parent queues, the CT of the virtual parent queue queue-x is the smallest, ranging between (-AT, 0). At this time, bursts of all delay_levels are received concurrently, and according to CT <= Q < CT + AT, all these bursts will choose to be inserted into queue-x. Since the transmission of all bursts can take up to N*AT at most, after queue-x waits for the transmission of these bursts to complete, its CT must have decreased to a value ranging between (-(N + 1)*AT, -N*AT).
[0096] Scenario Embodiment Two
[0097] Based on the settings of the forwarding method 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.
[0098] 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, the bursts contributed by the bandwidth resources of each delay level within any time interval are ignored, that is, it is assumed that the transmission duration consumed by the burst upper limits of each delay level is approximately one AT. In addition, it is also assumed that the in-node forwarding delay F and the link propagation delay are both 0.
[0099] Assume that at time T0, the ordered queue of the scheduler is initially empty.
[0100] 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.
[0101] At time T0, assume that the eligible bursts that arrive at the scheduler from multiple ingress ports are b10, b20, b30, b40, b50, and b100. Note that the meaning of an eligible burst is that the cumulative delay deviation E of the burst is 0. Then 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. It can be seen that in the ordered queue, from the head to the tail, the elements are b10, b20, b30, b40, b50, and b100, and b10 will be sent immediately.
[0102] At T0+10us, b10 is sent without violating its deadline of 10us. At this time, there are still elements b20, b30, b40, b50, and b100 in the ordered queue. Assuming that a legal burst b90 is received from the ingress port, b90 will be compared and inserted into the ordered queue according to the value T0+10+90, and because its delay level d90 is smaller than the delay level d100 of the existing element b100 in the queue, it will be inserted before b100, that is, the elements in the ordered queue are b20, b30, b40, b50, b90, and b100, and b20 will be sent immediately.
[0103] At T0+20us, b20 is sent without violating its deadline of 20us. At this time, there are still elements b30, b40, b50, b90, and b100 in the ordered queue. Assuming that a legal burst b80 is received from the ingress port at this time, b80 will be compared and inserted into the ordered queue according to the value T0+20+80, and because its delay level d80 is smaller than the delay level d90 of the existing element b90 in the queue, it will be inserted before b90, that is, the elements in the ordered queue are b30, b40, b50, b80, b90, and b100, and b30 will be sent immediately.
[0104] 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.
[0105] If the method of the embodiment of the present invention is not adopted, b60, b70, b80, b90, and b100 will not be correctly sorted in the ordered queue, resulting in some bursts therein violating their deadlines.
[0106] Scenario Example 3
[0107] This scenario embodiment describes the scheduling of ordered queues in on-time forwarding mode.
[0108] 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, which are 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 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 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.
[0109] Assume that at time T0, the scheduler's ordered queue is initially empty.
[0110] 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.
[0111] At time T0, assuming that the legitimate burst arriving at the scheduler is b100, it will be inserted into the ordered queue according to the value of T0+100. At this time, the element in the ordered queue is b100. Due to the on-time forwarding mode, b100 will not be sent until T0+100us.
[0112] At T0+10us, assuming that the legitimate burst arriving at the scheduler is b90, it will be inserted into the ordered queue according to the value of T0+10+90, and because its latency level d90 is smaller than the latency level d100 of the existing element b100 in the queue, it is inserted before b100, that is, the elements in the ordered queue are b90, b100. Due to the on-time forwarding mode, b90 will not be sent until T0+100us.
[0113] By analogy, the legal bursts b80, b70, b60, b50, b40, b30, b20, and b10 arrive every 10us, making the elements in the ordered queue b10, b20, b30, b40, b50, b60, b70, b80, b90, and b100. Due to the on-time forwarding mode, they will not be sent until T0+100us.
[0114] At 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.
[0115] At T0+110us, the first element b20 is sent, which takes 10us. It can be seen that b20 exceeds its deadline by 20us. That is, the cumulative delay deviation E of b20 will be assigned a value of -20us.
[0116] By analogy, the burst corresponding to each delay level will exceed its deadline, and the excess amount is the duration of the corresponding delay level.
[0117] If the method of the embodiment of the present invention 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 us.
[0118] Figure 8 is a schematic diagram of delay evaluation according to a scenario embodiment of the present invention, such as Figure 8 As shown, the deadline violation phenomenon is not cumulative as the number of hops increases, that is, when a burst's end-to-end delay violates the deadline, the excess is at most the duration of the delay level corresponding to the burst. Figure 8 It illustrates the situation that after the per-hop delay faced by the observed flow f (corresponding to delay level d100) at node u exceeds the deadline of 100us according to the above process, it continues to be delayed by other interfering flows at the downstream node v.
[0119] Assume that the legal burst arriving at the local time T0+10us of node v is b90, the legal burst arriving at time T0+20us is b80, ..., and the legal burst arriving at time T0+90us is b10. At this time, the elements in the ordered queue are b10, b20, b30, b40, b50, b60, b70, b80, b90.
[0120] Then the illegal (note: because E = -100us) burst that arrives at T0+100us is observed as b100. It will be inserted into the ordered queue according to the value of 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. At this time, the elements in the ordered queue are b10, b20, b30, b40, b50, b60, b70, b80, b90, b100. This means that b100 will not be sent until T0+200us, that is, the actual residence delay experienced on node v is 100us, which is consistent with the planned residence delay of 100us. The accumulated delay deviation E is not updated and E is still -100us.
[0121] Scenario Example 4
[0122] This scenario embodiment describes the scheduling of the countdown queue in the in-time forwarding mode.
[0123] 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, which are 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 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 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.
[0124] 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:
[0125] parent-queue-A(CT=-10)
[0126] parent-queue-B(CT=0)
[0127] parent-queue-C(CT=10)
[0128] parent-queue-D(CT=20)
[0129] parent-queue-E(CT=30)
[0130] parent-queue-F(CT=40)
[0131] parent-queue-G(CT=50)
[0132] parent-queue-H(CT=60)
[0133] parent-queue-I(CT=70)
[0134] parent-queue-J(CT=80)
[0135] parent-queue-K(CT=90)
[0136] parent-queue-L(CT=100)
[0137] 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.
[0138] At time T0, assume that the eligible bursts that arrive at the scheduler from multiple ingress ports are b10, b20, b30, b40, b50, and b100. Note that the meaning of an eligible burst is that the cumulative delay deviation E of the burst is 0. Then b10 will be inserted into parent-queue-C according to the value Q=D+EF=10, b20 will be inserted into parent-queue-D according to the value Q=D+EF=20, and so on. b100 will be inserted into parent-queue-L according to Q=D+EF=100. The queue status is as follows, and b10 starts to be sent immediately.
[0139] parent-queue-A(CT=-10)
[0140] parent-queue-B(CT=0)
[0141] parent-queue-C(CT=10)
[0142] sub-queue-d10:b10
[0143] parent-queue-D(CT=20)
[0144] sub-queue-d20:b20
[0145] parent-queue-E(CT=30)
[0146] sub-queue-d30:b30
[0147] parent-queue-F(CT=40)
[0148] sub-queue-d40:b40
[0149] parent-queue-G(CT=50)
[0150] sub-queue-d50:b50
[0151] parent-queue-H(CT=60)
[0152] parent-queue-I(CT=70)
[0153] parent-queue-J(CT=80)
[0154] parent-queue-K(CT=90)
[0155] parent-queue-L(CT=100)
[0156] sub-queue-d100:b100
[0157] At T0+10us, b10 is sent and does not violate its deadline of 10us. At this time, there are still elements b20, b30, b40, b50, and b100 in the entire countdown queue. The CT of each virtual parent queue decreases by 10. Assuming that a legal burst b90 is received from the ingress port at this time, b90 will be inserted into parent-queue-L according to Q=D+EF=90. The queue status is as follows, and b20 starts to be sent immediately.
[0158] parent-queue-A(CT=100)
[0159] parent-queue-B(CT=-10)
[0160] parent-queue-C(CT=0)
[0161] parent-queue-D(CT=10)
[0162] sub-queue-d20:b20
[0163] parent-queue-E(CT=20)
[0164] sub-queue-d30:b30
[0165] parent-queue-F(CT=30)
[0166] sub-queue-d40:b40
[0167] parent-queue-G(CT=40)
[0168] sub-queue-d50:b50
[0169] parent-queue-H(CT=50)
[0170] parent-queue-I(CT=60)
[0171] parent-queue-J(CT=70)
[0172] parent-queue-K(CT=80)
[0173] parent-queue-L(CT=90)
[0174] sub-queue-d90:b90
[0175] sub-queue-d100:b100
[0176] By analogy, the subsequent bursts of b80, b70, b60, etc. that arrive in sequence 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, b100, and each burst does not exceed its deadline.
[0177] If the method of the embodiment of the present invention is not adopted, b60, b70, b80, b90, and b100 will not be correctly sorted in the countdown queue, causing some of the bursts therein to violate their deadlines.
[0178] Scenario Example 5
[0179] This scenario embodiment describes the scheduling of a countdown queue in an on-time forwarding mode.
[0180] 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, which are 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 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 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.
[0181] 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:
[0182] parent-queue-A(CT=-100)
[0183] parent-queue-B(CT=-90)
[0184] parent-queue-C(CT=-80)
[0185] parent-queue-D(CT=-70)
[0186] parent-queue-E(CT=-60)
[0187] parent-queue-F(CT=-50)
[0188] parent-queue-G(CT=-40)
[0189] parent-queue-H(CT=-30)
[0190] parent-queue-I(CT=-20)
[0191] parent-queue-J(CT=-10)
[0192] parent-queue-K(CT=0)
[0193] parent-queue-L(CT=10)
[0194] parent-queue-M(CT=20)
[0195] parent-queue-N(CT=30)
[0196] parent-queue-O(CT=40)
[0197] parent-queue-P(CT=50)
[0198] parent-queue-Q(CT=60)
[0199] parent-queue-R(CT=70)
[0200] parent-queue-S(CT=80)
[0201] parent-queue-T(CT=90)
[0202] parent-queue-U(CT=100)
[0203] 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.
[0204] At time T0, assuming that the legal 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 messages.
[0205] 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.
[0206] And so on, the legal bursts b80, b70, b60, b50, b40, b30, b20, and b10 arrive every 10 us, and they are all inserted into parent-queue-U.
[0207] At T0+100us, the status of the countdown queue is as follows:
[0208] parent-queue-A(CT=10)
[0209] parent-queue-B(CT=20)
[0210] parent-queue-C(CT=30)
[0211] parent-queue-D(CT=40)
[0212] parent-queue-E(CT=50)
[0213] parent-queue-F(CT=60)
[0214] parent-queue-G(CT=70)
[0215] parent-queue-H(CT=80)
[0216] parent-queue-I(CT=90)
[0217] parent-queue-J(CT=100)
[0218] parent-queue-K(CT=-100)
[0219] parent-queue-L(CT=-90)
[0220] parent-queue-M(CT=-80)
[0221] parent-queue-N(CT=-70)
[0222] parent-queue-O(CT=-60)
[0223] parent-queue-P(CT=-50)
[0224] parent-queue-Q(CT=-40)
[0225] parent-queue-R(CT=-30)
[0226] parent-queue-S(CT=-20)
[0227] parent-queue-T(CT=-10)
[0228] parent-queue-U(CT=0)
[0229] sub-queue-d10:b10
[0230] sub-queue-d20:b20
[0231] sub-queue-d30:b30
[0232] sub-queue-d40:b40
[0233] sub-queue-d50:b50
[0234] sub-queue-d60:b60
[0235] sub-queue-d70:b70
[0236] sub-queue-d80:b80
[0237] sub-queue-d90:b90
[0238] sub-queue-d100:b100
[0239] At T0+100us, b10 is sent, which takes 10us. It can be seen that b10 exceeds its deadline by 10us, that is, the accumulated delay deviation E of b10 will be assigned a value of -10us.
[0240] At T0+110us, b20 is sent, which takes 10us. It can be seen that b20 exceeds its deadline by 20us. That is, the cumulative delay deviation E of b20 will be assigned a value of -20us.
[0241] By analogy, the burst corresponding to each delay level will exceed its deadline, and the excess amount is the duration of the corresponding delay level.
[0242] If the method of the embodiment of the present invention 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 us.
[0243] It should be noted that this deadline violation phenomenon is not cumulative as the number of hops increases, that is, when a burst's end-to-end delay violates the deadline, the excess is at most the duration of the delay level corresponding to the burst. Figure 8 After the per-hop delay faced by the observed flow f (corresponding to delay level d100) at node u exceeds the deadline by 100us, it continues to be delayed by other interfering flows at the downstream node v.
[0244] Assume that the legal burst arriving at the local time T0+10us of node v is b90, which is inserted into queue-x (CT=90); the legal burst arriving at time T0+20us is b80, ..., and the legal burst arriving at time T0+90us is b10. These bursts are all inserted into the same virtual parent queue queue-x, and the CT of queue-x becomes 10.
[0245] Then the illegal (note: because E = -100us) burst that arrives at T0+100us is the observed b100. It will also be inserted into queue-x (at this time, CT of queue-x becomes 0) according to Q = D + EF = 0. At this time, the elements in the virtual parent queue queue-x are b10, b20, b30, b40, b50, b60, b70, b80, b90, b100. This means that b100 will not be sent until T0+200us, that is, the actual residence delay experienced on node v is 100us, which is consistent with the planned residence delay of 100us. The accumulated delay deviation E is not updated and E is still -100us.
[0246] In summary, the embodiment of the present invention provides a message forwarding method, in which a deadline queue scheduler is created for a specific egress port in 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 guarantee. In the actual implementation process, the description of the deadline scheduling mechanism of the link (such as configuring a deadline scheduler instance, in-time or on-time forwarding mode, supported delay levels, and intervals between delay levels) contained in the public user configuration guide manual, the planned residence time and accumulated delay deviation carried in the message, or interoperability testing between multiple vendors, packet capture, can be used to verify whether the method provided by the embodiment of the present invention is adopted.
[0247] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A message forwarding method, characterized in that: include: 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, characterized in that in, 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, characterized in that 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, characterized in that: 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, characterized in that: 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, characterized in that: include: 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, characterized in that in, 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that: 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, characterized in that 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, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the method described in any one of claims 1 to 12 when executed by a processor.
14. 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 method described in any one of claims 1 to 12 is implemented.
Citation Information
Cited By
Queue management method and device
CN122420263A
Packet forwarding methods, storage medium and electronic apparatus
EP4757275A1