Message forwarding method and device, equipment and storage medium

CN119605235APending Publication Date: 2025-03-11NEW H3C TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202380009223.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In deterministic networks, conflicts between deterministic streams cause end-to-end jitter to be unpredictable and cannot meet the bounded jitter requirements.

Method used

By receiving deterministic flow messages in the network device and cache them to the corresponding scheduling queue, avoiding messages from different incoming ports to the same scheduling queue, ensuring that messages from the same incoming port are only cached to one scheduling queue, and realizing that messages from the same incoming port are cached to only one scheduling queue. Queue in an orderly manner to eliminate deterministic flow conflicts.

Benefits of technology

The jitter boundary of the deterministic network is realized, resource planning is simplified, and the flexibility and efficiency of forwarding resources are improved, and the jitter problem caused by random queueing is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119605235A_ABST
    Figure CN119605235A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a message forwarding method and device, equipment and a storage medium, applied to network equipment, and the method comprises the following steps: receiving a first message of a deterministic flow through a first ingress port; caching the first message to a first scheduling queue corresponding to the first ingress port; and when the scheduling period of the first scheduling queue is reached, forwarding the message in the first scheduling queue. In the technical scheme provided by the embodiment of the invention, the network equipment caches the message to different scheduling queues for forwarding according to different ingress ports for receiving the message, so that the problem that the end-to-end jitter cannot be predicted due to the fact that the messages received by different ingress ports are randomly queued and forwarded in the same scheduling queue is avoided. And since only one message can be received through the same ingress port at the same moment, a conflict problem does not exist in the same scheduling queue, and jitter bounded of the deterministic network is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Message forwarding method, device, equipment and storage medium Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a message forwarding method, apparatus, device and storage medium. Background Art

[0002] In deterministic networks, it is necessary to ensure the consistency of latency and jitter of deterministic flows. However, when conflicts occur between deterministic flows, end-to-end jitter becomes unpredictable, failing to meet the bounded jitter requirement of deterministic networks.

[0003] Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a message forwarding method, apparatus, device, and storage medium to achieve bounded jitter in a deterministic network.

[0005] In a first aspect, an embodiment of the present application provides a message forwarding method, applied to a network device, the method comprising:

[0006] receiving a first message of a deterministic flow through a first ingress port;

[0007] caching the first message in a first scheduling queue corresponding to the first ingress port;

[0008] When the scheduling period of the first scheduling queue is reached, the message in the first scheduling queue is forwarded.

[0009] In some embodiments, after receiving the first packet of the deterministic flow through the first ingress port, the method further includes:

[0010] If a correspondence between the deterministic flow and the second scheduling queue is stored, the first message is cached in the second scheduling queue; when the scheduling period of the second scheduling queue is reached, the message in the second scheduling queue is forwarded;

[0011] If the correspondence between the deterministic flow and the second scheduling queue is not stored, the step of caching the first message in the first scheduling queue corresponding to the first ingress port is performed.

[0012] In some embodiments, the step of caching the first message in a first scheduling queue corresponding to the first ingress port includes:

[0013] Determining a first scheduling queue corresponding to the first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues;

[0014] Cache the first message in the first scheduling queue.

[0015] In some embodiments, the network device includes multiple ingress ports, and one ingress port corresponds to one scheduling queue.

[0016] In some embodiments, the step of caching the first message in a first scheduling queue corresponding to the first ingress port includes:

[0017] Determine, according to a pre-stored correspondence between ingress ports, message attributes, and scheduling queues, a scheduling queue corresponding to the first ingress port and the message attribute of the first message as a first scheduling queue;

[0018] Cache the first message in the first scheduling queue.

[0019] In some embodiments, the message attributes include at least one of the following information: a destination edge device, a destination terminal, and a next hop node.

[0020] In a second aspect, an embodiment of the present application provides a message forwarding device, applied to a network device, the device comprising:

[0021] A receiving module, configured to receive a first message of a deterministic flow through a first ingress port;

[0022] A first cache module, configured to cache the first message in a first scheduling queue corresponding to the first ingress port;

[0023] The first forwarding module is configured to forward the message in the first scheduling queue when the scheduling period of the first scheduling queue is reached.

[0024] In some embodiments, the apparatus further comprises: a second cache module and a second forwarding module;

[0025] The second cache module is configured to cache the first message of the deterministic flow in the second scheduling queue after receiving the first message of the deterministic flow through the first ingress port if a correspondence between the deterministic flow and the second scheduling queue is stored;

[0026] The second forwarding module is configured to forward the message in the second scheduling queue when the scheduling period of the second scheduling queue is reached;

[0027] The first cache module is specifically configured to cache the first message to the first scheduling queue corresponding to the first ingress port if the correspondence between the deterministic flow and the second scheduling queue is not stored.

[0028] In some embodiments, the first cache module includes:

[0029] A first determining submodule, configured to determine a first scheduling queue corresponding to the first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues;

[0030] The first buffer submodule is configured to buffer the first message into the first scheduling queue.

[0031] In some embodiments, the network device includes multiple ingress ports, and one ingress port corresponds to one scheduling queue.

[0032] In some embodiments, the first cache module includes:

[0033] a second determining submodule, configured to determine, according to a pre-stored correspondence between an ingress port, a message attribute, and a scheduling queue, a scheduling queue corresponding to the first ingress port and the message attribute of the first message, as a first scheduling queue;

[0034] The second cache submodule is configured to cache the first message into the first scheduling queue.

[0035] In some embodiments, the message attributes include at least one of the following information: a destination edge device, a destination terminal, and a next hop node.

[0036] In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0037] Memory for storing computer programs;

[0038] The processor is configured to implement any one of the method steps provided in the first aspect when executing a program stored in the memory.

[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the method steps provided in the first aspect is implemented.

[0040] In the technical solution provided by the embodiment of the present application, the network device can cache the messages received through the same inlet port into the same scheduling queue, and cache the messages received through different inlet ports into different scheduling queues, thereby avoiding the conflict problem caused by caching the messages received through different inlet ports into the same scheduling queue, that is, avoiding the random queuing of messages in the scheduling queue caused by the conflict of deterministic flows, which in turn leads to the problem of unpredictable end-to-end jitter; in addition, there is only one message of the deterministic flow passing through the same inlet port at the same time, and there will be no conflict problem of deterministic flows when caching the messages received through the same inlet port into the same scheduling queue. Therefore, the technical solution provided by the embodiment of the present application is used to forward messages of deterministic flows, thereby achieving bounded jitter in the deterministic network. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0042] FIG1 is a schematic diagram of a message queuing and forwarding principle in the prior art;

[0043] FIG2 is a schematic diagram of the structure of a first deterministic network architecture in the prior art;

[0044] FIG3 is a schematic diagram of the structure of a second deterministic network architecture in the prior art;

[0045] FIG4 is a schematic diagram of a first flow chart of a message forwarding method provided in an embodiment of the present application;

[0046] FIG5 is a schematic diagram of a first structural example of a deterministic network architecture provided in an embodiment of the present application;

[0047] FIG6 is a schematic diagram of a second flow chart of a message forwarding method provided in an embodiment of the present application;

[0048] FIG7 is a schematic diagram of a first detailed flow chart of step S42 provided in an embodiment of the present application;

[0049] FIG8 is a schematic diagram of a second detailed flow chart of step S42 provided in an embodiment of the present application;

[0050] FIG9 is a schematic diagram of a second structural example of a deterministic network architecture provided in an embodiment of the present application;

[0051] FIG10 is a schematic structural diagram of a message forwarding device provided in an embodiment of the present application;

[0052] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0053] To make the objectives, technical solutions, and advantages of this application more clearly understood, the present application is further described below with reference to the accompanying drawings and examples. It is apparent that the described examples are only a portion of the embodiments of this application, and not all of them. All other embodiments derived by persons of ordinary skill in the art based on the examples in this application are intended to fall within the scope of protection of this application.

[0054] Deterministic networking is a hot research topic in the communications field. The Internet Engineering Task Force (IETF) has established a dedicated working group focused on research related to network reliability, latency, and jitter. Currently, technologies such as CSQF (Cycle Specified Queuing and Forwarding) and RCQF (Resilient Cycle Queuing and Forwarding) are already available in the industry to ensure bounded jitter when there are no conflicts in deterministic flows.

[0055] The basic idea of ​​CSQF and RCQF is to divide each node into multiple equal time slices with a scheduling period of T. These deterministic flows are then uniformly scheduled to forward within the specified time slices. Assume that each port on each node has 16 scheduling periods, from T1 to T16. Figure 1 illustrates the queuing and forwarding principle. Packet X is forwarded along the path of nodes A, B, C, and D. It arrives at node A and forwards it during scheduling period T1. Based on prior measurement and planning, node B can forward it during scheduling period T3, node C during scheduling period T4, and node D during scheduling period T6. In this way, any packet received by node A during period T1 will be forwarded according to this schedule, thus ensuring end-to-end latency stability.

[0056] These technologies can control end-to-end jitter within a certain range, such as 20μs or 30μs. However, if conflicts occur between deterministic flows, end-to-end jitter may still be unpredictable.

[0057] As shown in Figure 2, in the deterministic network architecture, CE (Customer Edge) devices include CE1, CE2, CE3, and CE4, and PE (Provider Edge) devices include PE1, PE2, PE3, and P (Provider) devices. CE1 sends deterministic flow 1 to PE1, which is forwarded to CE3 via P and PE2. CE2 sends deterministic flow 2 to PE1, which is forwarded to CE4 via P and PE2. Deterministic flows 1 and 2 correspond to the same scheduling queue on the same egress of PE1. Assuming that the port rates from CE1 and CE2 to PE1 are both 10G, and the port rates between PE1 and the P node are also 10G, a 2-to-1 situation will instantly form at the egress of PE1, meaning that packets from multiple ingress ports will compete to be sent out of the same egress port. This requires queuing and forwarding packets from the deterministic flows of CE1 and CE2 in a scheduling queue at the egress of PE1. However, the queuing is random, resulting in four possible scenarios, as shown in Figure 2: 1234, 1324, 3412, and 3142. In Figure 2, each rectangular box represents a packet from a deterministic flow, and the number within the box indicates the packet number. Packets 1 and 2 are from deterministic flow 1, while packets 3 and 4 are from deterministic flow 2.

[0058] Thus, jitter in the queuing time of both deterministic flow 1 and deterministic flow 2 exists. Furthermore, as network nodes increase, such as forwarding from PE3 to P, then from P to PE2, and finally from PE2 to CE3 and CE4, jitter is further compounded, making it impossible to meet the bounded jitter requirement for deterministic networks.

[0059] For ease of description, the messages of the deterministic flow are referred to as deterministic messages below.

[0060] One solution to this problem is to stagger the times at which CE1 and CE2 send deterministic messages to PE1, thereby eliminating conflicts. Figure 3 shows a deterministic network architecture. Each rectangular box represents a message in a deterministic flow, and the numbers within the boxes indicate the message numbers. In Figure 3, CE1 can be configured to always send deterministic messages to PE1 before CE2. This ensures that the deterministic messages sent by CE1 and CE2 to PE1 do not arrive at the same time, thus preventing conflicts. As shown in Figure 3, deterministic messages 1 through 4 are always forwarded in the order 1, 2, 3, and 4 until they are forwarded to CE3 and CE4.

[0061] This solution can meet the requirement of bounded deterministic network jitter. However, it requires that terminals under CE coordinate the timing of message forwarding to ensure that deterministic messages do not conflict when they reach PE1. This is impossible in practice because there is no relationship between terminals. In addition, in large-scale networks, it is impossible to require that terminals maintain a certain order in forwarding deterministic messages, making this solution difficult to implement.

[0062] In order to achieve bounded jitter in a deterministic network, as shown in FIG4 , an embodiment of the present application provides a message forwarding method applied to a network device, the method comprising the following steps.

[0063] Step S41: Receive a first message of a deterministic flow through a first ingress port.

[0064] Step S42: Buffer the first message into a first scheduling queue corresponding to the first ingress port.

[0065] Step S43: When the scheduling period of the first scheduling queue is reached, forward the message in the first scheduling queue.

[0066] In the technical solution provided by the embodiment of the present application, the network device can cache the messages received through the same inlet port into the same scheduling queue, and cache the messages received through different inlet ports into different scheduling queues, thereby avoiding the conflict problem caused by caching the messages received through different inlet ports into the same scheduling queue, that is, avoiding the random queuing of messages in the scheduling queue caused by the conflict of deterministic flows, which in turn leads to the problem of unpredictable end-to-end jitter; in addition, there is only one message of the deterministic flow passing through the same inlet port at the same time, and there will be no conflict problem of deterministic flows when caching the messages received through the same inlet port into the same scheduling queue. Therefore, the technical solution provided by the embodiment of the present application is used to forward messages of deterministic flows, thereby achieving bounded jitter in the deterministic network.

[0067] In the above step S41, the network device includes one or more ingress ports, the first ingress port can be any ingress port of the network device, the first message can be any message of the deterministic flow, and the deterministic flow can be one or more. In an embodiment of the present application, the network device receives the first message in the deterministic flow through the first ingress port. Here, the network device receives messages in different deterministic flows through multiple ingress ports at the same time. For example, in the deterministic network architecture shown in Figure 5, each rectangular box represents a message of a deterministic flow, and the numbers in the rectangular box represent the message numbers. PE1 receives message 1 and message 3 of deterministic flow 1 through port s1, and receives message 2 and message 4 of deterministic flow 2 through port s2. Message 1 and message 2 are received at the same time, and message 3 and message 4 are received at the same time.

[0068] In step S42 above, one or more scheduling queues exist on an egress port, and the first scheduling queue is any scheduling queue on the egress port. After receiving the first message, the network device determines the egress port (e.g., the target egress port) corresponding to the deterministic flow to which the first message belongs, further determines the first scheduling queue corresponding to the first ingress port on the target egress port, and caches the first message in the first scheduling queue.

[0069] As shown in Figure 5, the egress port corresponding to both deterministic flows 1 and 2 on PE1 is port s3. Port s3 includes scheduling queues Q1 and Q2. Port s1 corresponds to scheduling queue Q1, and port s2 corresponds to scheduling queue Q2. After PE1 receives packets 1 and 3 from deterministic flow 1 through port s1, it caches them in scheduling queue Q1 on port s3. After PE1 receives packets 2 and 4 from deterministic flow 2 through port s2, it caches them in scheduling queue Q2 on port s3.

[0070] In step S43, each scheduling queue can store one or more messages, and each scheduling queue corresponds to a scheduling period. Taking the first scheduling queue as an example, when the scheduling period of the first scheduling queue is reached, the network device forwards the messages in the first scheduling queue.

[0071] As shown in Figure 5, the scheduling period of scheduling queue Q1 is T1, and the scheduling period of scheduling queue Q2 is T2. When scheduling period T1 is reached, messages 1 and 3 stored in scheduling queue Q1 are forwarded. When scheduling period T2 is reached, messages 2 and 4 stored in scheduling queue Q2 are forwarded.

[0072] Through the above embodiment, even if the network device receives messages of different deterministic flows through different ingress ports at the same time, the messages of different deterministic flows will be mapped to different scheduling queues of the egress port. Based on the ingress port dimension, the effect of "ordered queuing shaping" is achieved, and the incast mode (many-to-one communication mode) can be directly eliminated. At the same time, it is a one-to-one relationship, thereby meeting the delay jitter requirements in the case of deterministic flow conflicts. In addition, in the embodiment of the present application, the network device does not need to care about the information of the specific flow, which simplifies the difficulty of achieving deterministic forwarding and the complexity of the system.

[0073] In some embodiments, as shown in FIG6 , an embodiment of the present application further provides a message forwarding method, which is applied to a network device and may include the following steps.

[0074] Step S61 , receiving a first message of a deterministic flow through a first ingress port, is the same as the above step S41 .

[0075] Step S62, determine whether a corresponding relationship between the deterministic flow and the second scheduling queue is stored, if so, execute step S63; if not, execute step S65.

[0076] Step S63: Cache the first message into the second scheduling queue.

[0077] Step S64: When the scheduling period of the second scheduling queue is reached, forward the message in the second scheduling queue.

[0078] Step S65 , buffering the first message in the first scheduling queue corresponding to the first ingress port, is the same as the above step S42 .

[0079] Step S66: when the scheduling period of the first scheduling queue is reached, forward the message in the first scheduling queue, which is the same as the above step S43.

[0080] In the technical solution provided by the embodiment of the present application, the correspondence between the deterministic flow and the scheduling queue can be stored in the network device. When the scheduling queue corresponding to the deterministic flow is stored (such as the second scheduling queue), the message is forwarded according to the correspondence between the deterministic flow and the scheduling queue. The resource planning granularity in the scheme of mapping and forwarding messages according to the flow is smaller than the resource planning granularity in the scheme of mapping and forwarding messages according to the ingress port. Therefore, by adopting the technical solution provided by the embodiment of the present application, it is possible to ensure the stable forwarding of some important business flows while achieving bounded jitter in the deterministic network, thereby improving the flexibility and efficiency of forwarding resource planning.

[0081] In the above step S62, the network device may store the correspondence between the deterministic flow and the second scheduling queue, that is, for some special deterministic flows, the scheduling queues corresponding to these deterministic flows may be pre-configured. For example, for the sending of instant messages, the corresponding scheduling queue may be configured to forward them as quickly as possible; for important business flows, the corresponding fixed scheduling queue may be configured, that is, a fixed scheduling period, to forward them stably and periodically. For non-special deterministic flows, the scheduling queues corresponding to these deterministic flows may not be configured, that is, the messages of these deterministic flows are mapped to the corresponding scheduling queues according to the ingress ports. Since the number of ingress ports is much smaller than the number of deterministic flows, the complexity of resource planning according to the ingress ports is much smaller than the complexity of resource planning according to the deterministic flows. Therefore, the embodiment of the present application simplifies the complexity of resource planning and reduces the labor cost of configuring and adjusting the correspondence between scheduling queues.

[0082] The network device determines whether a correspondence between the deterministic flow and the second scheduling queue is stored based on the pre-stored correspondence between the flow and the scheduling queue. If a correspondence between the deterministic flow and the second scheduling queue is stored, step S63 is executed to cache the message in the deterministic flow in the second scheduling queue and forward the message in the second scheduling queue when the scheduling period of the second scheduling queue is reached. If a correspondence between the deterministic flow and the second scheduling queue is not stored, step S65 is executed to cache the first message in the first scheduling queue and forward the message in the first scheduling queue when the scheduling period of the first scheduling queue is reached. The first scheduling queue and the second scheduling queue can be the same or different.

[0083] In some embodiments, the correspondence between the input ports and the scheduling queues may be pre-stored in the network device, and the above step S42 may include the following steps, as shown in FIG. 7 .

[0084] Step S71 : determining a first scheduling queue corresponding to a first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues.

[0085] In the embodiment of the present application, the network device may include multiple ingress ports, each of which corresponds to one scheduling queue. For example, as shown in FIG4 , the network device PE1 includes ports s1 and s2 , port s1 corresponds to scheduling queue Q1 , and port s2 corresponds to scheduling queue Q2 .

[0086] In the embodiment of the present application, as the number of ingress ports changes, the scheduling queue on the egress port can be expanded or reduced to implement the technical solution provided in the embodiment of the present application.

[0087] Step S72: Cache the first message into the first scheduling queue.

[0088] In the technical solution provided by the embodiment of the present application, a correspondence between ingress ports and scheduling queues is pre-stored in the network device. After the network device receives the first message of the deterministic flow through the first ingress port, it searches for the correspondence including the first ingress port from the pre-stored correspondence between ingress ports and scheduling queues. When the correspondence is found, the scheduling queue included in the found correspondence is used as the first scheduling queue corresponding to the first ingress port, and the first message is cached in the first scheduling queue. This improves the efficiency of message forwarding while avoiding deterministic flow conflicts.

[0089] In some embodiments, the network device may pre-store the correspondence between the input port, the message attribute and the scheduling queue, and the above step S42 may include the following steps, as shown in FIG8 .

[0090] Step S81 : According to the pre-stored correspondence between the ingress port, the message attribute and the scheduling queue, a scheduling queue corresponding to the first ingress port and the message attribute of the first message is determined as the first scheduling queue.

[0091] In an embodiment of the present application, the message attributes may include at least one of the following information: a destination edge device, a destination terminal, and a next-hop node. For example, taking the message attributes including the destination edge device as an example, in the deterministic network architecture shown in Figure 9, the destination edge device of deterministic flow 1 (flow1) and deterministic flow 2 (flow2) is PE2, that is, the destination edge device of the messages in flow1 and flow2 is PE2; the destination edge device of deterministic flow 3 (flow3) and deterministic flow 4 (flow4) is PE3, that is, the destination edge device of the messages in flow3 and flow4 is PE3. PE1 receives the messages of deterministic flow 1 and deterministic flow 3 through port s1, and receives the messages of deterministic flow 2 and deterministic flow 4 through port s2. On PE1, deterministic flow 1 and deterministic flow 2 correspond to the same egress port s3, and deterministic flow 3 and deterministic flow 4 correspond to the same egress port s4. At this time, PE1 can pre-store the correspondence between s1, PE2, Q1 and the correspondence between s2, PE2, Q2 on port s3, as well as the correspondence between s1, PE3, Q3 and the correspondence between s2, PE3, Q4 on port s4. Among them, Q1 and Q2 are scheduling queues included on port s3, and Q3 and Q4 are scheduling queues included on port s4.

[0092] Step S82: Cache the first message into the first scheduling queue.

[0093] In the embodiment of the present application, after the network device determines the first scheduling queue in step S81, it caches the first message in the first scheduling queue for subsequent forwarding.

[0094] In the embodiment of the present application, in the deterministic network architecture shown in FIG9 , congestion queuing is bound to occur in the incast mode. For example, if deterministic flow 1 and deterministic flow 2 go to PE2 at the same time, a 2-to-1 situation will appear at the egress port s3 of PE1. Due to the randomness of the queue, the delay jitter of deterministic flow 1 and deterministic flow 2 is uncertain. Applying the solution provided in the embodiment of the present application, multiple scheduling sequences are set at the egress port s3, including Q1 and Q2, and deterministic flow 1 and deterministic flow 2 are cached to scheduling sequences Q1 and Q2 respectively according to the ingress port and message attributes, thereby eliminating jitter. Similarly for egress port s4, multiple scheduling sequences are set at the egress port s4, including Q3 and Q4, and deterministic flow 3 and deterministic flow 4 are cached to scheduling sequences Q3 and Q4 respectively according to the ingress port and message attributes, thereby eliminating jitter.

[0095] In the embodiment of the present application, the deterministic flow coming from the same ingress port may go anywhere. The ingress port and message attributes are used as the basis for resource planning. The correspondence between the ingress port, message attributes and the scheduling queue is used to realize the queuing and forwarding of the deterministic flow, which facilitates the subsequent resource planning of the deterministic flow forwarding. Here, the deterministic flow cached to the same scheduling queue can be regarded as an aggregate flow, that is, the deterministic flow with the same ingress port and message attributes can be regarded as an aggregate flow. For example, the deterministic flow 5 (not shown in the figure) received from port s1 is the same as the deterministic flow 1 in Figure 9 above. The destination edge device of the deterministic flow 5 is also PE2. Then the deterministic flow 1 and the deterministic flow 5 can be regarded as an aggregate flow and cached in the same scheduling queue.

[0096] In the technical solution provided by the embodiment of the present application, the network device pre-stores the correspondence between the input port, the message attribute and the scheduling queue. After the network device receives the first message of the deterministic flow through the first input port, it searches for the correspondence between the first input port and the message attribute from the pre-stored correspondence between the input port, the message attribute and the scheduling queue. When the correspondence is found, the scheduling queue included in the found correspondence is used as the first scheduling queue corresponding to the first input port and the message attribute, and the first message is cached in the first scheduling queue. By increasing the correspondence between the message attribute and the scheduling queue, the flexibility and efficiency of resource planning are improved while avoiding deterministic flow conflicts.

[0097] Corresponding to the above-mentioned message forwarding method, an embodiment of the present application further provides a message forwarding device, as shown in FIG10 , which is applied to a network device and includes:

[0098] A receiving module 101 is configured to receive a first message of a deterministic flow through a first ingress port;

[0099] A first buffer module 102, configured to buffer the first message into a first scheduling queue corresponding to the first ingress port;

[0100] The first forwarding module 103 is configured to forward the message in the first scheduling queue when the scheduling period of the first scheduling queue is reached.

[0101] In the technical solution provided by the embodiment of the present application, the network device can cache the messages received through the same inlet port into the same scheduling queue, and cache the messages received through different inlet ports into different scheduling queues, thereby avoiding the conflict problem caused by caching the messages received through different inlet ports into the same scheduling queue, that is, avoiding the random queuing of messages in the scheduling queue caused by the conflict of deterministic flows, which in turn leads to the problem of unpredictable end-to-end jitter; in addition, there is only one message of the deterministic flow passing through the same inlet port at the same time, and there will be no conflict problem of deterministic flows when caching the messages received through the same inlet port into the same scheduling queue. Therefore, the technical solution provided by the embodiment of the present application is used to forward messages of deterministic flows, thereby achieving bounded jitter in the deterministic network.

[0102] In some embodiments, the message forwarding device may further include:

[0103] a second cache module and a second forwarding module;

[0104] a second cache module configured to, after receiving a first message of a deterministic flow through the first ingress port, cache the first message in the second scheduling queue if a correspondence between the deterministic flow and the second scheduling queue is stored;

[0105] A second forwarding module, configured to forward the message in the second scheduling queue when the scheduling period of the second scheduling queue is reached;

[0106] The first buffer module 102 may be specifically configured to buffer the first message into the first scheduling queue corresponding to the first ingress port if the correspondence between the deterministic flow and the second scheduling queue is not stored.

[0107] In some embodiments, the first cache module 102 may include:

[0108] A first determining submodule, configured to determine a first scheduling queue corresponding to a first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues;

[0109] The first buffer submodule is configured to buffer the first message into the first scheduling queue.

[0110] In some embodiments, the network device may include multiple ingress ports, and one ingress port corresponds to one scheduling queue.

[0111] In some embodiments, the first cache module 102 may include:

[0112] a second determining submodule, configured to determine, according to a pre-stored correspondence between an ingress port, a message attribute, and a scheduling queue, a scheduling queue corresponding to the first ingress port and the message attribute of the first message, as a first scheduling queue;

[0113] The second buffer submodule is configured to buffer the first message into the first scheduling queue.

[0114] In some embodiments, the message attributes may include at least one of the following information: a destination edge device, a destination terminal, and a next hop node.

[0115] The embodiment of the present application further provides an electronic device, as shown in FIG11 , including a processor 111 , a communication interface 112 , a memory 113 , and a communication bus 114 , wherein the processor 111 , the communication interface 112 , and the memory 113 communicate with each other via the communication bus 114 ;

[0116] Memory 113, for storing computer programs;

[0117] The processor 111 is configured to implement any of the above-mentioned message forwarding methods when executing the program stored in the memory 113 .

[0118] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0119] The communication interface is used for communication between the above electronic device and other devices.

[0120] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0121] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0122] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned message forwarding methods are implemented.

[0123] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any message forwarding method in the above embodiments.

[0124] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0125] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0126] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, refer to the descriptions of the method embodiments.

[0127] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A message forwarding method, characterized in that: Applied to a network device, the method comprises: Receiving a first message of a deterministic flow through a first ingress port; Cache the first message in a first scheduling queue corresponding to the first ingress port; When the scheduling period of the first scheduling queue is reached, the message in the first scheduling queue is forwarded.

2. The method according to claim 1, characterized in that After receiving the first message of the deterministic flow through the first ingress port, the method further includes: If the corresponding relationship between the deterministic flow and the second scheduling queue is stored, the first message is cached in the second scheduling queue; when the scheduling period of the second scheduling queue is reached, the message in the second scheduling queue is forwarded; If the correspondence between the deterministic flow and the second scheduling queue is not stored, the step of caching the first message to the first scheduling queue corresponding to the first ingress port is performed.

3. The method according to claim 1 or 2, characterized in that: The step of caching the first message in a first scheduling queue corresponding to the first ingress port includes: Determine a first scheduling queue corresponding to the first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues; The first message is cached in the first scheduling queue.

4. The method according to claim 3, characterized in that The network device includes a plurality of ingress ports, and one ingress port corresponds to one scheduling queue.

5. The method according to claim 1 or 2, characterized in that: The step of caching the first message in a first scheduling queue corresponding to the first ingress port includes: According to the pre-stored correspondence between the ingress port, the message attribute and the scheduling queue, determine the scheduling queue corresponding to the first ingress port and the message attribute of the first message as the first scheduling queue; The first message is cached in the first scheduling queue.

6. The method according to claim 5, characterized in that The message attributes include at least one of the following information: a destination edge device, a destination terminal, and a next hop node.

7. A message forwarding device, characterized in that: Applied to network equipment, the device comprises: A receiving module, configured to receive a first message of a deterministic flow through a first input port; A first cache module, used to cache the first message to a first scheduling queue corresponding to the first ingress port; The first forwarding module is used to forward the message in the first scheduling queue when the scheduling period of the first scheduling queue is reached.

8. The device according to claim 7, characterized in that The device further includes: a second cache module and a second forwarding module; The second cache module is configured to cache the first message of the deterministic flow to the second scheduling queue after receiving the first message of the deterministic flow through the first ingress port if a corresponding relationship between the deterministic flow and the second scheduling queue is stored; The second forwarding module is used to forward the message in the second scheduling queue when the scheduling period of the second scheduling queue is reached; The first cache module is specifically configured to cache the first message to the first scheduling queue corresponding to the first ingress port if the corresponding relationship between the deterministic flow and the second scheduling queue is not stored.

9. The device according to claim 7 or 8, characterized in that The first cache module includes: A first determining submodule, configured to determine a first scheduling queue corresponding to the first ingress port according to a pre-stored correspondence between ingress ports and scheduling queues; The first cache submodule is used to cache the first message into the first scheduling queue.

10. The device according to claim 9, characterized in that The network device includes a plurality of ingress ports, and one ingress port corresponds to one scheduling queue.

11. The device according to claim 7 or 8, characterized in that The first cache module includes: A second determination submodule, configured to determine, according to a pre-stored correspondence between an ingress port, a message attribute, and a scheduling queue, a scheduling queue corresponding to the first ingress port and the message attribute of the first message, as a first scheduling queue; The second cache submodule is used to cache the first message into the first scheduling queue.

12. The device according to claim 11, characterized in that The message attributes include at least one of the following information: a destination edge device, a destination terminal, and a next hop node.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Queue scheduling method and device

    CN102223311A

  • Message forwarding method and device and electronic equipment

    CN112585914A

  • Queue information processing method and device

    CN113872881A

  • Network optimization method and device, gateway equipment and storage medium

    CN114143378A

  • Message hybrid scheduling method and device, electronic equipment and storage medium

    CN114221911A