A message transmission method and device

By aggregating multiple outgoing ports in network devices to form a unified aggregation scheduling queue, the problems of limited single-link bandwidth and low reliability are solved, and efficient and reliable message transmission is achieved.

CN116208547BActive Publication Date: 2025-02-21NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211705424.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2025-02-21
Estimated Expiration
2042-12-29

Smart Images

  • Figure CN116208547B_ABST
    Figure CN116208547B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a message transmission method and device, which relates to the field of communication technology. Applied to a network device, the method includes: receiving a message, the message corresponds to multiple egress ports; determining a target egress port from the multiple egress ports, and determining a target aggregate scheduling queue from multiple aggregate scheduling queues; determining a target local scheduling queue corresponding to the target aggregate scheduling queue from multiple local scheduling queues corresponding to the target egress port; caching the message to the target local scheduling queue; when the scheduling period of the target local scheduling queue is reached, forwarding the message cached in the target local scheduling queue through the target egress port. Applying the technical solution provided by the embodiment of the present application can increase the bandwidth of message transmission, and improve the efficiency and reliability of message transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] To ensure deterministic transmission of Internet services, a deterministic network is built based on TSN (Time Sensitive Network) and CSQF (Cyclic Specific Queuing and Forwarding). At present, both TSN-based deterministic networks and CSQF-based deterministic networks generally use a single link for networking. In this deterministic network, firstly, the bandwidth of a single link is limited, which makes the message transmission efficiency low; secondly, once this link fails, the upper-layer services will be blocked, which will lead to low reliability of message transmission. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a message transmission method and device to increase the message transmission bandwidth, improve the message transmission efficiency and reliability. The specific technical solution is as follows:

[0004] In a first aspect of an embodiment of the present application, a message transmission method is provided, which is applied to a network device, wherein the network device includes multiple egress ports, the multiple egress ports correspond to multiple aggregation scheduling queues, and each egress port corresponds to multiple local scheduling queues; the method includes:

[0005] receiving a message, wherein the message corresponds to the multiple output ports;

[0006] Determine a target egress port from the plurality of egress ports, and determine a target aggregation scheduling queue from the plurality of aggregation scheduling queues;

[0007] Determine a target local scheduling queue corresponding to the target aggregation scheduling queue from a plurality of local scheduling queues corresponding to the target egress port;

[0008] Cache the message to the target local scheduling queue;

[0009] When the scheduling period of the target local scheduling queue is reached, the message buffered in the target local scheduling queue is forwarded through the target egress port.

[0010] In some embodiments, in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue;

[0011] The step of determining, from the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue comprises:

[0012] A target local scheduling queue identified as the identifier of the target aggregate scheduling queue is determined from a plurality of local scheduling queues corresponding to the target egress port.

[0013] In some embodiments, the network device further includes a local clock source corresponding to each egress port; the local clock source is aligned with a high-precision time synchronization protocol clock source.

[0014] In some embodiments, the network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port;

[0015] The step of determining, from the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue comprises:

[0016] From the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue is determined according to a mapping relationship between the aggregate scheduling queue and the local scheduling queues corresponding to the target egress port.

[0017] In some embodiments, the mapping relationship is represented by an offset of an identifier of a local scheduling queue corresponding to an egress port relative to an identifier of the aggregate scheduling queue;

[0018] The step of determining, from the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue according to the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port, comprises:

[0019] The identifier of the target aggregation scheduling queue is increased by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue;

[0020] A target local scheduling queue corresponding to the target identifier is determined from a plurality of local scheduling queues corresponding to the target egress port.

[0021] In some embodiments, in the network device, the time width of the scheduling period corresponding to the aggregate scheduling queue and each local scheduling queue is the same.

[0022] In some embodiments, the method further comprises:

[0023] When the network device is started, selecting one of the multiple egress ports as a reference egress port;

[0024] Using multiple local scheduling queues corresponding to the reference egress port as an aggregate scheduling queue;

[0025] According to the mapping relationship between the multiple local scheduling queues corresponding to each egress port and the scheduling period, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port is determined.

[0026] In some embodiments, the method further comprises:

[0027] When a new egress port is started in the network device, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new egress port is determined based on the mapping relationship between the multiple local scheduling queues corresponding to the new egress port and the scheduling period, and the mapping relationship between the multiple aggregate scheduling queues and the scheduling period.

[0028] In some embodiments, the scheduling period difference of the aggregate scheduling queues corresponding to the same deterministic flow in the network device and the upstream device is: the sum of the number of scheduling periods corresponding to the delay between the network device and the upstream device and a preset number of scheduling periods.

[0029] In a second aspect of an embodiment of the present application, a message transmission device is provided, which is applied to a network device, wherein the network device includes multiple egress ports, the multiple egress ports correspond to multiple aggregation scheduling queues, and each egress port corresponds to multiple local scheduling queues; the device includes:

[0030] A receiving module, used for receiving a message, wherein the message corresponds to the multiple output ports;

[0031] A first determining module, configured to determine a target egress port from the plurality of egress ports, and determine a target aggregation scheduling queue from the plurality of aggregation scheduling queues;

[0032] A second determination module is used to determine a target local scheduling queue corresponding to the target aggregation scheduling queue from a plurality of local scheduling queues corresponding to the target egress port;

[0033] A cache module, used for caching the message into the target local scheduling queue;

[0034] The forwarding module is used to forward the message buffered in the target local scheduling queue through the target egress port when the scheduling period of the target local scheduling queue is reached.

[0035] In some embodiments, in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue;

[0036] The second determining module is specifically configured to determine a target local scheduling queue identified as an identifier of the target aggregate scheduling queue from a plurality of local scheduling queues corresponding to the target egress port.

[0037] In some embodiments, the network device further includes a local clock source corresponding to each egress port; the local clock source is aligned with a high-precision time synchronization protocol clock source.

[0038] In some embodiments, the network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port;

[0039] The second determination module is specifically configured to determine, from the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue according to a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port.

[0040] In some embodiments, the mapping relationship is represented by an offset of an identifier of a local scheduling queue corresponding to an egress port relative to an identifier of the aggregate scheduling queue;

[0041] The second determination module is specifically used to increase the identifier of the target aggregate scheduling queue by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue; and determine the target local scheduling queue corresponding to the target identifier from multiple local scheduling queues corresponding to the target egress port.

[0042] In some embodiments, in the network device, the time width of the scheduling period corresponding to the aggregate scheduling queue and each local scheduling queue is the same.

[0043] In some embodiments, the apparatus further comprises:

[0044] A selection module is used to select one of the multiple egress ports as a reference egress port after the network device is started; and use the multiple local scheduling queues corresponding to the reference egress port as an aggregate scheduling queue;

[0045] The third determination module is used to determine the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port according to the mapping relationship between the multiple local scheduling queues corresponding to each egress port and the scheduling period.

[0046] In some embodiments, the third determination module is further configured to:

[0047] When a new egress port is started in the network device, a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new egress port is determined based on a mapping relationship between multiple local scheduling queues corresponding to the new egress port and scheduling cycles, and a mapping relationship between the multiple aggregate scheduling queues and scheduling cycles.

[0048] In some embodiments, the scheduling period difference of the aggregate scheduling queues corresponding to the same deterministic flow in the network device and the upstream device is: the sum of the number of scheduling periods corresponding to the delay between the network device and the upstream device and a preset number of scheduling periods.

[0049] In a third aspect of an embodiment of the present application, a network device is provided, including a processor and a memory; the memory is used to store computer programs; the processor is used to implement the method steps described in the first aspect when executing the program stored in the memory.

[0050] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method steps described in the first aspect are implemented.

[0051] Beneficial effects of the embodiments of the present application:

[0052] In the technical solution provided in the embodiment of the present application, the network device aggregates multiple output ports together, corresponding to multiple unified aggregate scheduling queues. For a deterministic flow, it can be sent out from any of the multiple output ports, and they are the same in the dimension of time, that is, the time of the aggregate scheduling queue, thereby realizing the deterministic transmission of the message. Compared with forwarding messages through a single output port, in the embodiment of the present application, the message transmission bandwidth is increased and the message transmission efficiency is improved because the messages are forwarded through multiple output ports aggregated together; and the multiple output ports aggregated together can dynamically back up each other. Even if one of the output ports fails, it can be switched to other output ports to forward the message, thereby improving the reliability of message transmission, ensuring the interoperability between nodes, and ensuring the continuity of upper-layer services.

[0053] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0055] Figure 1 A schematic diagram of periodic forwarding of a deterministic flow within a forwarding node provided in an embodiment of the present application;

[0056] Figure 2 A schematic diagram of a first flow chart of a message transmission method provided in an embodiment of the present application;

[0057] Figure 3 A first schematic diagram of a network structure provided in an embodiment of the present application;

[0058] Figure 4 A second schematic diagram of a network structure provided in an embodiment of the present application;

[0059] Figure 5 A first schematic diagram of a local scheduling queue for each egress port in a network device provided in an embodiment of the present application;

[0060] Figure 6 A second flow chart of the message transmission method provided in the embodiment of the present application;

[0061] Figure 7 A third flow chart of the message transmission method provided in the embodiment of the present application;

[0062] Figure 8 A second schematic diagram of a local scheduling queue for each egress port in a network device provided in an embodiment of the present application;

[0063] Fig. 9 A schematic diagram of the mapping relationship between the local scheduling queue and the scheduling period provided in an embodiment of the present application;

[0064] Fig.10 A third schematic diagram of the network architecture provided in an embodiment of the present application;

[0065] Fig.11 A schematic diagram of the structure of a message transmission device provided in an embodiment of the present application;

[0066] Fig.12 A schematic diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.

[0068] The following is an explanation of the terms that appear in the embodiments of the present application.

[0069] TSN: is a set of Ethernet standards that implements time-synchronized low-latency streaming services through core technologies such as precise time synchronization and timing scheduling, and provides low-latency isochronous standard data for each device in the system, thus providing a basis for the integration of control, measurement, configuration, UI (User Interface) and file exchange infrastructure.

[0070] Time slot: Time is divided into time slots in equal parts, which is the smallest scheduling unit in TSN.

[0071] CSQF: It is a periodic queuing and forwarding mechanism based on segment routing.

[0072] Aggregation: Multiple physical links are bundled together to form a logical link to increase link bandwidth. At the same time, these bundled links can effectively improve link reliability by dynamically backing up each other.

[0073] After decades of rapid development, the Internet has achieved seamless connections between people, people and things, and things and things, and has had a huge impact on people's lives and work. However, in scenarios such as "smart grid", "telemedicine", "audio and video entertainment" and "industrial remote control", deterministic transmission is required, that is, low enough latency and small enough jitter are required to ensure the reliability of data connection. In complex scenarios such as multi-service, high traffic and wide area, end-to-end deterministic transmission is also required.

[0074] A deterministic network refers to a network that can guarantee the deterministic bandwidth, latency, jitter, and packet loss rate indicators of the service. Deterministic network technology is a new type of QoS (Quality of Service) guarantee technology that can be used in emerging scenarios with high real-time requirements, such as autonomous driving, remote surgery, and holographic communications.

[0075] There are two existing deterministic network implementation methods, namely, deterministic networks based on TSN and CSQF.

[0076] The above two methods are based on clock synchronization for networking. Clock synchronization means that the clocks of the entire network are synchronized. The clocks of terminal devices and network devices are the same, and the network card also adds a hard timestamp to the transmitted messages. There are currently two main clock synchronization methods. One is the master-slave mode, that is, the most accurate clock is selected as the master clock, and the other clocks are used as slave clocks. The time of the slave clock is adjusted based on the time of the master clock. The other is the voting mode. For example, there are 9 devices in a network domain, the time of 5 devices is 1:00, and the time of 4 devices is 1:01. According to the voting results, the minority obeys the majority, and all devices are adjusted to 1:00.

[0077] The deterministic network based on TSN is suitable for deterministic transmission within a small range. This deterministic transmission is achieved through time slot planning. The time slot generally refers to the transmission resource in the time dimension of the network device's egress port. For example, if the egress port bandwidth is 1Gbps, that is, 1G bits can be transmitted in 1s. Assuming that a message has 1500Bytes, that is, 12000bits, its transmission will occupy a certain section of the egress port 12000 / 1G = 12μs time slot resources. Which section is occupied is determined by the start time of its transmission. Since most industrial traffic is periodically sent messages smaller than the MTU (Maximum Transmission Unit), the start time of the terminal's message transmission can be controlled. Through global time slot planning (time division multiplexing), each message is "triggered" to be sent only at the time calculated in advance, ensuring that the time slots occupied by the egress port transmission of each hop network device do not conflict with each other, thereby avoiding the generation of polycasting and bursts, and achieving "punctual and accurate" transmission.

[0078] The deterministic network based on CSQF is suitable for deterministic transmission in a large range. This deterministic transmission is achieved through CSQF. CSQF introduces the idea of ​​periodic forwarding based on the traditional IP (Internet Protocol) network. It divides the forwarding node into multiple time slices T in a time-division manner. The message of a deterministic flow can only be sent within the time slice specified for it. Therefore, the transmission delay jitter in the forwarding node is limited to within 1 time slice. Figure 1 It represents the periodic forwarding of deterministic flows within the forwarding node. Figure 1 In the example, the deterministic flow packet is set to be sent within the T2 time slice. The earliest time for sending each message in the deterministic flow packet is T2 start, and the latest time is T2 end. Therefore, the maximum delay jitter in the forwarding node is one time slice width. The CSQF technology can theoretically ensure that the maximum end-to-end delay jitter is two time slice widths. Figure 1 The example of the example in which four forwarding nodes 1-4 are included between the sending end and the receiving end is used for explanation, and it is not limiting. The sending end, the receiving end, and the forwarding nodes 1-4 are scheduled by the controller, and the SID (Segment Identifiers) of each forwarding node 1-4 is calculated based on the acquisition request of the sending end, such as Figure 1 1011, 2032, 3054, 4076 in the packet, and assign the calculated SID of the forwarding node 1-4 to the forwarding node 1-4; the forwarding node 1-4 parses the SID at the top of the stack in the packet, obtains the egress port and specific forwarding time period for the current forwarding node packet forwarding, that is, the scheduling period, thereby achieving deterministic transmission.

[0079] At present, both TSN-based deterministic networks and CSQF-based deterministic networks generally use a single link for networking. In this deterministic network, first, the bandwidth of a single link is limited, which makes the message transmission efficiency low; second, once this link fails, the upper layer services will be blocked, which will lead to low reliability of message transmission.

[0080] In order to improve the message transmission bandwidth, improve the message transmission efficiency and reliability, the embodiment of the present application provides a message transmission method, which is applied to any network device in a deterministic network, and the network device can be a router, a switch, etc. In the method, the network device aggregates multiple output ports together, corresponding to a unified multiple aggregation scheduling queue, and for a deterministic flow, it can be sent out from any output port of the multiple output ports, and it is the same in the dimension of time, that is, the time of the aggregation scheduling queue, thereby realizing the deterministic transmission of the message. Compared with forwarding messages through a single output port, in the embodiment of the present application, the message transmission bandwidth is increased and the message transmission efficiency is improved by forwarding messages through multiple output ports aggregated together; and, the multiple output ports aggregated together can be dynamically backed up with each other, even if one of the output ports fails, it can be switched to other output ports to forward messages, thereby improving the reliability of message transmission, ensuring the interoperability between nodes, and ensuring the continuity of upper-layer services.

[0081] The message transmission method provided in the embodiment of the present application is described in detail below through specific examples.

[0082] like Figure 2 As shown, an embodiment of the present application provides a message transmission method, which is applied to a network device, the network device includes multiple egress ports, the multiple egress ports correspond to multiple aggregation scheduling queues, and each egress port corresponds to multiple local scheduling queues. Figure 3 In the network structure shown, the network device RA includes multiple egress ports, namely GE1 / 0 / 1, GE1 / 0 / 2, and GE1 / 0 / 3, and the three links between RA and RB connected by GE1 / 0 / 1, GE1 / 0 / 2, and GE1 / 0 / 3 are combined into one path. At this time, GE1 / 0 / 1, GE1 / 0 / 2, and GE1 / 0 / 3 correspond to the same multiple aggregation scheduling queues, and GE1 / 0 / 1 corresponds to multiple local scheduling queues, GE1 / 0 / 2 corresponds to multiple local scheduling queues, and GE1 / 0 / 3 corresponds to multiple local scheduling queues.

[0083] In the embodiment of the present application, the above-mentioned message transmission method includes the following steps:

[0084] Step S21, receiving a message, the message corresponds to multiple output ports.

[0085] In the embodiment of the present application, the message received by the network device is any message in the deterministic flow. The network device receives a message of the deterministic flow, that is, the message corresponds to the above-mentioned multiple egress ports. These multiple egress ports are aggregated ports. Figure 3 As shown, the network device RA receives a message of a deterministic flow, and the message is sent to the egress ports GE1 / 0 / 1, GE1 / 0 / 2, and GE1 / 0 / 3.

[0086] Step S22: determining a target egress port from the plurality of egress ports, and determining a target aggregation scheduling queue from the plurality of aggregation scheduling queues.

[0087] In an embodiment of the present application, the network device can determine the target egress port from multiple egress ports according to a specified rule. The specified rule can be set according to actual needs. For example, the specified rule can be: perform a Hash calculation on the five-tuple of the message, and obtain the egress port corresponding to the calculated Hash value as the target egress port. For another example, the specified rule can be: randomly select an egress port from multiple egress ports as the target egress port. The network device can determine the target aggregation scheduling queue from multiple aggregation scheduling queues according to the five-tuple or destination SID of the message. For example, the network device pre-stores the correspondence between the SID and the aggregation scheduling queue. The network device obtains the aggregation scheduling queue corresponding to the destination SID of the message as the target aggregation scheduling queue based on the pre-stored correspondence between the SID and the aggregation scheduling queue.

[0088] Here, an egress port is determined from the multiple egress ports of the aggregation as the target egress port, thus achieving aggregation load sharing. In addition, for a deterministic flow, the control plane cannot confirm its actual forwarding egress port in advance, but no matter which physical egress port is forwarded from, the determined target aggregation scheduling queue is the same, and the scheduling period (i.e., forwarding time slot) of each scheduling queue is fixed. Therefore, from the perspective of time, when forwarding a message through any of the multiple egress ports of the aggregation, the forwarding time slot is the same. Figure 4 The network structure shown in the figure includes network devices RA, RB, RD and RF. A line between two adjacent devices in RA, RB, RD and RF represents a link, corresponding to an egress port. The circled link represents an aggregated link, corresponding to multiple aggregated egress ports. Figure 4 It can be seen that for a deterministic flow, the target aggregation scheduling queue determined by RA is LagcycleA, the target aggregation scheduling queue determined by RB is LagcycleB, the target aggregation scheduling queue determined by RD is LagcycleC, and the target aggregation scheduling queue determined by RF is LagcycleD. This can ensure the deterministic transmission of deterministic flows.

[0089] Step S23: Determine a target local scheduling queue corresponding to the target aggregation scheduling queue from the multiple local scheduling queues corresponding to the target egress port.

[0090] In an embodiment of the present application, an egress port is located on a single board, and multiple scheduling queues are set on the single board, that is, multiple local scheduling queues corresponding to the egress port on the single board. The network device pre-sets the correspondence between the aggregation scheduling queue and the local scheduling queue. After determining the target aggregation scheduling queue, the network device determines the local scheduling queue corresponding to the target aggregation scheduling queue from the multiple local scheduling queues corresponding to the target egress port as the target local scheduling queue according to the pre-set correspondence between the aggregation scheduling queue and the local scheduling queue.

[0091] Step S24, buffering the message into the target local scheduling queue.

[0092] After determining the target local scheduling queue, the network device caches the message in the target local scheduling queue.

[0093] Step S25: when the scheduling period of the target local scheduling queue is reached, forward the message buffered in the target local scheduling queue through the target egress port.

[0094] Each scheduling queue has its own scheduling cycle, i.e., forwarding time slot. The network device can detect the forwarding time slot in real time. When it detects that the scheduling cycle of the target local scheduling queue has been reached, it forwards all the messages cached in the target local scheduling queue through the target egress port.

[0095] In some embodiments, the scheduling period difference of the aggregate scheduling queue corresponding to the same deterministic flow in the network device and the upstream device is: the sum of the number of scheduling periods corresponding to the delay between the network device and the upstream device and the preset number of scheduling periods. In the embodiment of the present application, the network device can absorb the network jitter between devices and eliminate the network jitter introduced by the scheduling period deviation of the scheduling queue by setting a redundant period, that is, the above-mentioned preset number of scheduling periods.

[0096] In the technical solution provided in the embodiment of the present application, the network device aggregates multiple output ports together, corresponding to multiple unified aggregate scheduling queues. For a deterministic flow, it can be sent out from any of the multiple output ports, and they are the same in the dimension of time, that is, the time of the aggregate scheduling queue, thereby realizing the deterministic transmission of the message. Compared with forwarding messages through a single output port, in the embodiment of the present application, the message transmission bandwidth is increased and the message transmission efficiency is improved because the messages are forwarded through multiple output ports aggregated together; and the multiple output ports aggregated together can dynamically back up each other. Even if one of the output ports fails, it can be switched to other output ports to forward the message, thereby improving the reliability of message transmission, ensuring the interoperability between nodes, and ensuring the continuity of upper-layer services.

[0097] In addition, in the technical solution provided in the embodiment of the present application, each network device adopts a unified aggregate scheduling queue to facilitate the scheduling queue mapping between upstream and downstream devices, and converts the original scheduling queue related to the link and interface into one related only to the network device, thereby simplifying the scheduling queue mapping relationship.

[0098] In some embodiments, in a network device, the identifiers of local scheduling queues with the same scheduling cycle are the same as the identifiers of aggregate scheduling queues. For example, the scheduling cycle of local scheduling queue a is T1, and the scheduling cycle of aggregate scheduling queue b is T1. The scheduling cycles of local scheduling queue a and aggregate scheduling queue b are the same, so the identifier of local scheduling queue a is the same as the identifier of aggregate scheduling queue b. Based on this, the identifiers (cycle id) of the local scheduling queues of all outbound ports at the same time are completely consistent. Figure 5 The local scheduling queue diagram of each output port in the network device shown in FIG. Figure 5 The network device shown includes 4 boards, which are the boards where the outgoing ports Port1-Port4 are located. Each board is set with 4 local scheduling queues cycle1-cycle4, and the aggregate scheduling queues are Lagcycle1-Lagcycle4. The aggregate scheduling queues Lagcycle1-Lagcycle4 are arranged from left to right, and the scheduling cycle increases successively. The local scheduling queues cycle1-cycle4 on each board are arranged from left to right, and the scheduling cycle increases successively. Figure 5 It can be seen that the identifiers of the local scheduling queues with the same scheduling period are the same as the identifier of the aggregate scheduling queue, and the identifiers of the local scheduling queues of all egress ports at the same time are completely consistent. Figure 5 In the example, the values ​​in the aggregate scheduling queue and the local scheduling queue are the identifiers.

[0099] In order to ensure that the identifiers of the local scheduling queues of all outbound ports are completely consistent at the same time, the network device can use the PTP (Precision Time Protocol) protocol to ensure high-precision synchronization of the time between each single board, that is, the cycle id of each outbound port is directly calculated based on the PTP time. For example, the PTP time is in units of 10μs, and the remainder of the deterministic scheduling cycle number N is taken, and then 1 is added to obtain the cycle id. For example, if the deterministic scheduling cycle number N is 15, the cycle id calculated by the PTP protocol ranges from 1 to 15.

[0100] By ensuring high-precision synchronization of time between each single board through the PTP protocol, it is relatively simple to achieve that the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue, and no special response processing is required when the single board is restarted. However, the PTP clock source must remain stable and cannot jump, otherwise the scheduling queue mapping relationship will change. In some embodiments, in order to avoid changes in the scheduling queue mapping relationship due to jumps in the PTP clock source, a method of assisting the local clock source of the single board can be adopted, that is, the network device also includes a local clock source corresponding to each output port; the local clock source is aligned with the high-precision time synchronization protocol clock source.

[0101] In the embodiment of the present application, a local clock source is reserved in the hardware, and when the system starts, the local clock source and the PTP clock source are aligned. After that, the local clock source can no longer be synchronized with the PTP clock source, and only the frequency is synchronized to ensure that the cycle id calculation does not produce deviations. At this time, the cycle id calculation can be performed based on the local clock source.

[0102] The identifier of the local scheduling queue based on the same scheduling period is the same as the identifier of the aggregate scheduling queue, such as Figure 6 As shown, the embodiment of the present application also provides a message transmission method, which may include the following steps:

[0103] Step S61, receiving a message, the message corresponds to multiple output ports, which is the same as the above step S21.

[0104] Step S62, determining a target egress port from the multiple egress ports, and determining a target aggregation scheduling queue from the multiple aggregation scheduling queues, which is the same as the above step S22.

[0105] Step S63: Determine a target local scheduling queue identified as the identifier of the target aggregate scheduling queue from the multiple local scheduling queues corresponding to the target egress port.

[0106] After determining the target aggregation scheduling queue, the network device obtains the identifier of the target aggregation scheduling queue, and then determines the local scheduling queue identified as the identifier of the target aggregation scheduling queue from multiple local scheduling queues corresponding to the target egress port as the target local scheduling queue.

[0107] For example, Figure 5 As shown, the network device determines that the target aggregation scheduling queue is Lagcycle1, that is, the identifier of the target aggregation scheduling queue is 1, and the target egress port is Port1. Then the network device obtains the local scheduling queue with the identifier 1 from cycle1-cycle4 on the board where Port1 is located, that is, the target local scheduling queue cycle1.

[0108] Step S64, buffering the message in the target local scheduling queue, which is the same as the above step S24.

[0109] Step S65, when the scheduling period of the target local scheduling queue is reached, forward the message buffered in the target local scheduling queue through the target egress port. This is the same as the above step S25.

[0110] In the embodiment of the present application, there is an error in the PTP time between each single board, and the calculated cycle id may have a deviation of 1 scheduling cycle. In the embodiment of the present application, by setting the above redundant cycle, the network jitter introduced by the PTP error can be eliminated.

[0111] In addition, in the embodiment of the present application, since the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue, the aggregate scheduling queue can be omitted.

[0112] In the technical solution provided in the embodiment of the present application, the identifiers of the local scheduling queues corresponding to all the output ports in the network device are consistent, which can quickly determine the target local scheduling queue and improve the deterministic transmission efficiency.

[0113] In some embodiments, a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port is stored in the network device. In some embodiments, to ensure deterministic transmission, the scheduling period corresponding to the aggregate scheduling queue and each local scheduling queue has the same time width. Here, time synchronization of each board is not required, phase synchronization is not required, and frequency synchronization is sufficient.

[0114] Based on the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each outbound port stored in the network device, such as Figure 7 As shown, the embodiment of the present application also provides a message transmission method, which may include the following steps:

[0115] Step S71, receiving a message, the message corresponds to multiple output ports, which is the same as the above step S21.

[0116] Step S72, determining a target egress port from the multiple egress ports, and determining a target aggregation scheduling queue from the multiple aggregation scheduling queues, which is the same as the above step S22.

[0117] Step S73 , determining a target local scheduling queue corresponding to a target aggregation scheduling queue from a plurality of local scheduling queues corresponding to a target egress port according to a mapping relationship between the aggregation scheduling queue and the local scheduling queue corresponding to the target egress port.

[0118] After determining the target aggregate scheduling queue, the network device searches for a mapping relationship including the target aggregate scheduling queue according to the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port. The local scheduling queue in the found mapping relationship is the target local scheduling queue.

[0119] In some embodiments, the mapping relationship is represented by the offset of the identifier of the local scheduling queue corresponding to the outbound port relative to the identifier of the aggregate scheduling queue. Figure 8 The local scheduling queue diagram of each output port in the network device shown in FIG. Figure 8 The network device shown includes 4 boards, which are the boards where the egress ports Port1-Port4 are located. Each board is provided with 4 local scheduling queues cycle1-cycle4, and the aggregate scheduling queues are Lagcycle1-Lagcycle4. The aggregate scheduling queues Lagcycle1-Lagcycle4 are arranged from left to right, and the scheduling cycles increase successively. The local scheduling queues cycle1-cycle4 on each board are arranged from left to right, and the scheduling cycles increase successively. For Port1, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregate scheduling queue is 1; for Port2, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregate scheduling queue is 3; for Port3, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregate scheduling queue is 0; for Port4, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregate scheduling queue is 2.

[0120] Based on the above offset, step S73 may be: increasing the identifier of the target aggregate scheduling queue by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue; and determining the target local scheduling queue corresponding to the target identifier from multiple local scheduling queues corresponding to the target egress port.

[0121] For example, Figure 8As shown, the network device determines that the target aggregation scheduling queue is Lagcycle1, that is, the identifier of the target aggregation scheduling queue is 1, and the target egress port is Port2. For Port2, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregation scheduling queue is 3, then the network device determines the target identifier as 1+3=4, and obtains the local scheduling queue with an identifier of 4 from cycle1-cycle4 on the board where Port2 is located, that is, the target local scheduling queue cycle4.

[0122] Step S74, buffering the message into the target local scheduling queue, which is the same as the above step S24.

[0123] Step S75, when the scheduling period of the target local scheduling queue is reached, forward the message buffered in the target local scheduling queue through the target egress port. This is the same as the above step S25.

[0124] In the embodiment of the present application, the start time of the scheduling cycle between each single board may be different, and the calculated cycle id may have a deviation of 1 scheduling cycle. In the embodiment of the present application, by setting the above redundant cycle, the network jitter introduced by the start time error can be eliminated.

[0125] In the technical solution provided in the embodiment of the present application, each single board in the network device can retain its own local scheduling queue, and based on the aggregated scheduling queue, uniformly schedule the local scheduling queues on multiple single boards to achieve deterministic transmission, without the need to specifically adjust the local scheduling queues on each single board, thereby simplifying the complexity of deterministic transmission.

[0126] In some embodiments, the network device can determine the mapping relationship between the aggregate scheduling queue and the local scheduling queue through the following steps: when the network device is started, select one of the multiple output ports as the benchmark output port; use the multiple local scheduling queues corresponding to the benchmark output port as the aggregate scheduling queue; and determine the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each output port based on the mapping relationship between the multiple local scheduling queues corresponding to each output port and the scheduling period.

[0127] For example, Figure 8As shown, the network device selects Port3 as the reference egress port, that is, cycle1-cycle4 corresponding to Port3 is used as the aggregate scheduling queue Lagcycle1-Lagcycle4. At this time, for Port3, the offset of the identifier of the local scheduling queue relative to the identifier of the aggregate scheduling queue is 0. In addition, in combination with the mapping relationship between the multiple local scheduling queues corresponding to other egress ports and the scheduling cycle, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port is determined. As described above, the offset of the identifier of the local scheduling queue corresponding to other egress ports relative to the identifier of the aggregate scheduling queue is determined.

[0128] In the embodiment of the present application, after the mapping relationship is determined, the aggregate scheduling queue may no longer be switched. Even if the board where the initially selected output port is located is restarted, it is not necessary to reselect other output ports as the reference output ports, and the previously determined mapping relationship can be still used.

[0129] When a new output port is started in the network device, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new output port can be determined based on the mapping relationship between multiple local scheduling queues corresponding to the new output port and the scheduling period, and the mapping relationship between multiple aggregate scheduling queues and the scheduling period.

[0130] In the embodiment of the present application, the new output port can be started by a newly inserted single board in the network device, or it can be restarted after the original single board is down. The mapping relationship between the multiple local scheduling queues and the scheduling cycle corresponding to the new output port has been pre-calculated. After the new single board is started, that is, after the new output port is started, the mapping relationship between the aggregated scheduling queue and the local scheduling queue corresponding to the new output port can be determined according to the calculated mapping relationship between the local scheduling queue and the scheduling cycle, such as the mapping relationship between the new aggregated scheduling queue and the local scheduling queue corresponding to the new output port.

[0131] Because the local scheduling queues of the corresponding ports of each output port are not unified, it is necessary to measure the mapping relationship between the local scheduling queue and the scheduling cycle. Network equipment can use the PTP protocol to ensure high-precision synchronization of time between each board, so the corresponding relationship between the local scheduling queue and PTP time of each output port can be obtained, so that the local scheduling queues of each output port corresponding port at the same time can be calculated, and thus the cycle mapping can be obtained.

[0132] For example, Fig. 9The mapping relationship between the local scheduling queue and the scheduling cycle is shown. Forwarding node A includes a main control board, single board 1 and single board 2. Single board 1 and single board 2 are controlled by the CPU of the main control board. Each single board includes components such as CPU, NP (Network Processor) and FPGA (Field-Programmable Gate Array). Among them, single board 1 and single board 2 receive a message at the same time. Single board 1 reads the time slot scheduling queue Cycle_I corresponding to the FPGA timestamp Ts_I, and single board 2 reads the scheduling queue Cycle_E corresponding to the FPGA timestamp Ts_E; single board 2 converts Ts_E into timestamp Ts_I. At this time, timestamp Ts_I corresponds to scheduling queue Cycle_E'. Considering the network jitter introduced by PTP error, Cycle_E' is Cycle_E-1, Cycle_E or Cycle_E+1.

[0133] Combine the following Fig.10 The network architecture shown provides a detailed description of the message transmission method provided in the embodiment of the present application.

[0134] Fig.10 The network architecture shown includes network devices RA, RB, RC, RD, RE, and RF. A line between two adjacent devices in RA, RB, RD, and RF represents a link, corresponding to an egress port. The circled link represents an aggregated link, corresponding to multiple aggregated egress ports. There are equal-cost paths from RA to RF, namely, path 1 and path 2.

[0135] When RA sends a message of a deterministic flow (such as message 1) to RF, RA copies message 1 on path 1 and path 2 respectively, and then transmits message 1 to RF through path 1 and path 2 respectively, thereby improving the reliability of message transmission. The message transmission mode between two adjacent network devices on path 1 and path 2 is the same. The following takes the message transmission between RA and RB on path 1 as an example, which is not limiting.

[0136] RA can select one or more egress ports from egress port 1 and egress port 2 by hashing, such as selecting egress port 1; determining aggregate scheduling queue 1 corresponding to message 1, and then determining local scheduling queue 1 corresponding to aggregate scheduling queue 1 from multiple local scheduling queues corresponding to egress port 1; caching message 1 to local scheduling queue 1 corresponding to egress port 1; and forwarding the message cached in local scheduling queue 1 through egress port 1 when the scheduling period of local scheduling queue 1 is reached.

[0137] In the embodiment of the present application, if RA selects multiple egress ports from egress port 1 and egress port 2, it can realize the transmission of messages through multiple egress ports at the same time, realize dynamic backup of aggregated links, and further improve the reliability of message transmission. In addition, if RA selects one egress port from egress port 1 and egress port 2, it can realize load sharing among multiple egress ports, that is, realize load sharing of aggregated links, which can ensure the reliability of deterministic transmission and improve the effective transmission bandwidth.

[0138] Corresponding to the above-mentioned message transmission method, the embodiment of the present application also provides a message transmission device, such as Fig.11 As shown, it is applied to a network device, the network device includes multiple egress ports, the multiple egress ports correspond to multiple aggregation scheduling queues, and each egress port corresponds to multiple local scheduling queues; the device includes:

[0139] The receiving module 111 is used to receive a message, and the message corresponds to multiple output ports;

[0140] A first determining module 112, configured to determine a target egress port from a plurality of egress ports, and determine a target aggregation scheduling queue from a plurality of aggregation scheduling queues;

[0141] A second determination module 113 is used to determine a target local scheduling queue corresponding to a target aggregation scheduling queue from a plurality of local scheduling queues corresponding to a target egress port;

[0142] The cache module 114 is used to cache the message to the target local scheduling queue;

[0143] The forwarding module 115 is used to forward the message buffered in the target local scheduling queue through the target egress port when the scheduling period of the target local scheduling queue is reached.

[0144] In some embodiments, in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue;

[0145] The second determining module 113 may be specifically configured to determine a target local scheduling queue identified as an identifier of a target aggregate scheduling queue from a plurality of local scheduling queues corresponding to a target egress port.

[0146] In some embodiments, the network device further includes a local clock source corresponding to each egress port; the local clock source is aligned with a high-precision time synchronization protocol clock source.

[0147] In some embodiments, a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port is stored in the network device;

[0148] The second determination module 113 may be specifically configured to determine a target local scheduling queue corresponding to a target aggregate scheduling queue from a plurality of local scheduling queues corresponding to a target egress port according to a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port.

[0149] In some embodiments, the mapping relationship is represented by an offset of the identifier of the local scheduling queue corresponding to the egress port relative to the identifier of the aggregate scheduling queue;

[0150] The second determination module is specifically used to increase the identifier of the target aggregate scheduling queue by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue; and determine the target local scheduling queue corresponding to the target identifier from multiple local scheduling queues corresponding to the target egress port.

[0151] In some embodiments, in a network device, the time width of the scheduling period corresponding to the aggregate scheduling queue and each local scheduling queue is the same.

[0152] In some embodiments, the message transmission device may further include:

[0153] The selection module is used to select one of the multiple egress ports as a reference egress port after the network device is started; and use the multiple local scheduling queues corresponding to the reference egress port as an aggregate scheduling queue;

[0154] The third determination module is used to determine the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port according to the mapping relationship between the multiple local scheduling queues corresponding to each egress port and the scheduling period.

[0155] In some embodiments, the third determination module may also be used to:

[0156] When a new output port is started in the network device, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new output port is determined according to the mapping relationship between multiple local scheduling queues corresponding to the new output port and the scheduling period, and the mapping relationship between multiple aggregate scheduling queues and the scheduling period.

[0157] In some embodiments, the scheduling period difference of the aggregate scheduling queues corresponding to the same deterministic flow in the network device and the upstream device is: the sum of the number of scheduling periods corresponding to the delay between the network device and the upstream device and a preset number of scheduling periods.

[0158] In the technical solution provided in the embodiment of the present application, the network device aggregates multiple output ports together, corresponding to multiple unified aggregate scheduling queues. For a deterministic flow, it can be sent out from any of the multiple output ports, and they are the same in the dimension of time, that is, the time of the aggregate scheduling queue, thereby realizing the deterministic transmission of the message. Compared with forwarding messages through a single output port, in the embodiment of the present application, the message transmission bandwidth is increased and the message transmission efficiency is improved because the messages are forwarded through multiple output ports aggregated together; and the multiple output ports aggregated together can dynamically back up each other. Even if one of the output ports fails, it can be switched to other output ports to forward the message, thereby improving the reliability of message transmission, ensuring the interoperability between nodes, and ensuring the continuity of upper-layer services.

[0159] Corresponding to the above-mentioned message transmission method, the embodiment of the present application also provides a network device, such as Fig.12 As shown, the processor 121 and the memory 122 are included; the memory 122 is used to store computer programs; the processor 121 is used to execute the programs stored in the memory 122 to implement the above Figure 1-10 Any of the steps of the message transmission method described above.

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

[0161] The 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, discrete hardware components.

[0162] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, any of the above-mentioned steps of the message transmission method is implemented.

[0163] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any step of the message transmission method in the above-mentioned embodiments.

[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, 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 may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may 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 may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may 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 integrated. The available medium may 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 Solid State Disk (SSD)), etc.

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

[0166] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the message transmission device, network device, storage medium and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0167] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A message transmission method, characterized in that: Applied to a network device, the network device includes a plurality of egress ports, the plurality of egress ports correspond to a plurality of aggregate scheduling queues, and each egress port corresponds to a plurality of local scheduling queues; the method includes: receiving a message, wherein the message corresponds to the multiple output ports; Determine a target egress port from the plurality of egress ports, and determine a target aggregation scheduling queue from the plurality of aggregation scheduling queues; Determine a target local scheduling queue corresponding to the target aggregation scheduling queue from a plurality of local scheduling queues corresponding to the target egress port; Cache the message to the target local scheduling queue; When the scheduling period of the target local scheduling queue is reached, forwarding the message buffered in the target local scheduling queue through the target egress port; In the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregation scheduling queue; the step of determining the target local scheduling queue corresponding to the target aggregation scheduling queue from the multiple local scheduling queues corresponding to the target egress port includes: determining the target local scheduling queue identified as the identifier of the target aggregation scheduling queue from the multiple local scheduling queues corresponding to the target egress port; or The network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port; the step of determining the target local scheduling queue corresponding to the target aggregate scheduling queue from the multiple local scheduling queues corresponding to the target egress port includes: determining the target local scheduling queue corresponding to the target aggregate scheduling queue from the multiple local scheduling queues corresponding to the target egress port according to the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port.

2. The method according to claim 1, characterized in that If in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue, the network device further includes a local clock source corresponding to each egress port; the local clock source is aligned with the high-precision time synchronization protocol clock source.

3. The method according to claim 1, characterized in that If the network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port, the mapping relationship is represented by an offset of the identifier of the local scheduling queue corresponding to the egress port relative to the identifier of the aggregate scheduling queue; The step of determining, from the multiple local scheduling queues corresponding to the target egress port, a target local scheduling queue corresponding to the target aggregate scheduling queue according to the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target egress port, comprises: The identifier of the target aggregation scheduling queue is increased by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue; A target local scheduling queue corresponding to the target identifier is determined from a plurality of local scheduling queues corresponding to the target egress port.

4. The method according to claim 1, characterized in that If the network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port, then in the network device, the scheduling period corresponding to the aggregate scheduling queue and each local scheduling queue has the same time width.

5. The method according to claim 1, characterized in that If the network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port, the method further includes: When the network device is started, selecting one of the multiple egress ports as a reference egress port; Using multiple local scheduling queues corresponding to the reference egress port as an aggregate scheduling queue; According to the mapping relationship between the multiple local scheduling queues corresponding to each egress port and the scheduling period, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port is determined.

6. The method according to claim 5, characterized in that The method further comprises: When a new egress port is started in the network device, the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new egress port is determined based on the mapping relationship between the multiple local scheduling queues corresponding to the new egress port and the scheduling period, and the mapping relationship between the multiple aggregate scheduling queues and the scheduling period.

7. The method according to any one of claims 1 to 6, characterized in that: In the network device and the upstream device, the scheduling period difference of the aggregation scheduling queue corresponding to the same deterministic flow is: the sum of the number of scheduling periods corresponding to the delay between the network device and the upstream device and a preset number of scheduling periods.

8. A message transmission device, characterized in that: Applied to a network device, the network device includes a plurality of egress ports, the plurality of egress ports correspond to a plurality of aggregate scheduling queues, and each egress port corresponds to a plurality of local scheduling queues; the device includes: A receiving module, used for receiving a message, wherein the message corresponds to the multiple output ports; A first determining module, configured to determine a target egress port from the plurality of egress ports, and determine a target aggregation scheduling queue from the plurality of aggregation scheduling queues; A second determination module is used to determine a target local scheduling queue corresponding to the target aggregation scheduling queue from a plurality of local scheduling queues corresponding to the target egress port; A cache module, used for caching the message into the target local scheduling queue; A forwarding module, configured to forward the message cached in the target local scheduling queue through the target egress port when the scheduling period of the target local scheduling queue is reached; In the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregation scheduling queue; the second determination module is specifically used to determine the target local scheduling queue identified as the identifier of the target aggregation scheduling queue from the multiple local scheduling queues corresponding to the target egress port; The network device stores a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each output port; the second determination module is specifically used to determine the target local scheduling queue corresponding to the target aggregate scheduling queue from multiple local scheduling queues corresponding to the target output port according to the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the target output port.

9. The device according to claim 8, characterized in that If in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue, the network device further includes a local clock source corresponding to each egress port; the local clock source is aligned with the high-precision time synchronization protocol clock source.

10. The device according to claim 8, characterized in that If in the network device, the identifier of the local scheduling queue with the same scheduling period is the same as the identifier of the aggregate scheduling queue, the mapping relationship is represented by the offset of the identifier of the local scheduling queue corresponding to the egress port relative to the identifier of the aggregate scheduling queue; The second determination module is specifically used to increase the identifier of the target aggregate scheduling queue by the offset corresponding to the target egress port to obtain the target identifier of the target local scheduling queue; and determine the target local scheduling queue corresponding to the target identifier from multiple local scheduling queues corresponding to the target egress port.

11. The device according to claim 8, characterized in that The device also includes: A selection module is used to select one of the multiple egress ports as a reference egress port after the network device is started; and use the multiple local scheduling queues corresponding to the reference egress port as an aggregate scheduling queue; The third determination module is used to determine the mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to each egress port according to the mapping relationship between the multiple local scheduling queues corresponding to each egress port and the scheduling period.

12. The device according to claim 11, characterized in that The third determination module is further used for: When a new egress port is started in the network device, a mapping relationship between the aggregate scheduling queue and the local scheduling queue corresponding to the new egress port is determined based on a mapping relationship between multiple local scheduling queues corresponding to the new egress port and scheduling cycles, and a mapping relationship between the multiple aggregate scheduling queues and scheduling cycles.

Citation Information

Patent Citations

  • Port aggregation method and device

    CN104852869A

  • Message forwarding method and device

    CN110798400A