Message forwarding method and device, network equipment and storage medium

By sending virtual containers between network devices as the minimum transmission unit, the problem of uneven load distribution under the drift routing mechanism is solved, and traffic equalization between network devices and network performance is achieved.

CN119155249AActive Publication Date: 2024-12-17CHINA MOBILE COMM LTD RES INST +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310708960.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2024-12-17
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

The drifting equivalent multipath routing mechanism causes uneven load distribution of data flows in the network, resulting in the inability to improve the overall network performance.

Method used

By sending virtual containers as the minimum transmission unit between network devices, packet-by-packet load balancing is achieved, ensuring that messages in the same virtual container are transmitted through the same physical link. Messages from different virtual containers can be passed through different physical links Transmission improves the average link usage efficiency.

Benefits of technology

It realizes traffic equalization between network devices and traffic equalization on each physical link, improving the packet forwarding performance of the entire network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119155249A_ABST
    Figure CN119155249A_ABST
Patent Text Reader

Abstract

The invention discloses a message forwarding method and device, network equipment and a storage medium, and the method comprises the steps that first network equipment of a first network sends a virtual container to second network equipment according to first information and / or second information; wherein the first information represents a selection strategy of an output interface of the first network equipment; the second information represents information for guiding forwarding of the virtual container; the second network device represents a next hop device of the first network device; the maximum capacity of the virtual container is a set value, all the first messages in the same virtual container are sent to the same virtual queue of the destination exit routing equipment from the same entrance routing equipment of the first network, and one virtual queue corresponds to one exit interface and / or the corresponding priority of the destination exit routing equipment.
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 forwarding method, device, network equipment and storage medium. Background Art

[0002] The flow-by-flow equal-cost multi-path routing (ECMP) mechanism is a single-flow single-path traffic scheduling method that forwards packets belonging to the same data flow through the same equal-cost link. This traffic scheduling method easily causes serious uneven load distribution on each equal-cost link, resulting in the inability to improve the performance of the entire network. Summary of the invention

[0003] To solve related technical problems, the embodiments of the present application provide a message forwarding method, apparatus, network device and storage medium.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a message forwarding method, which is applied to a first network device of a first network, and the method includes:

[0006] Sending a virtual container to a second network device according to the first information and / or the second information; wherein,

[0007] The first information represents a selection strategy for an outbound interface of the first network device; the second information represents information guiding the forwarding of a virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one outbound interface and / or a corresponding priority of the destination egress routing device.

[0008] In the above solution, sending the virtual container to the second network device according to the first information and / or the second information includes:

[0009] Determine, according to the first information and / or the second information, a first outbound interface corresponding to the virtual container on the first network device;

[0010] A first message is sent to a second network device corresponding to the first output interface in a virtual container manner.

[0011] In the above solution, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0012] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0013] a second identifier, where the second identifier is used to sort different virtual containers;

[0014] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0015] In the above solution, the second information includes at least one of the following:

[0016] a first identifier carried by the first message in the virtual container, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0017] The destination address carried by the first message in the virtual container;

[0018] a first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of the first network device;

[0019] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0020] In the above scheme, the method further includes:

[0021] A virtual container sent by a third network device is received, where the third network device represents a previous-hop device of the first network device.

[0022] In the above solution, the first network device represents a source routing device or a source network card, and the method further includes:

[0023] Receiving a second message sent by the first computing node;

[0024] The third information is added to the second message to obtain the first message.

[0025] In the above solution, the first network device represents a source routing device or a source network card, and the method of determining that the virtual container is before the first output interface corresponding to the first network device further includes:

[0026] According to the number of bytes of the first message and the number of available bytes of the virtual container, the virtual container to which the first message belongs is determined; wherein,

[0027] The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0028] In the above solution, determining the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container includes one of the following:

[0029] When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container;

[0030] When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container:

[0031] The number of bytes of the first message is greater than the number of available bytes of the first virtual container;

[0032] The lifetime of the first virtual container is reached.

[0033] In the above scheme, the method further includes:

[0034] Record at least one of the following:

[0035] the fifth information;

[0036] An identifier of the virtual container to which the first message belongs;

[0037] Destination address carried in the first message of the virtual container.

[0038] In the above solution, the first network device represents a source routing device or a source network card, and the method further includes:

[0039] When the lifetime of the virtual container is reached, the virtual container is released.

[0040] The embodiment of the present application also provides a message forwarding method, which is applied to a second network device of a first network, and the method includes:

[0041] Receive a virtual container sent by a first network device; wherein,

[0042] The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0043] In the above solution, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0044] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0045] a second identifier, where the second identifier is used to sort different virtual containers;

[0046] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0047] In the above solution, the second network device represents the last hop network device of the first network, and the method further includes at least one of the following:

[0048] discarding the third information carried by the first message in the virtual container, obtaining a second message, and sending the second message to the second computing node;

[0049] The different virtual containers are sorted, and the first message in the sorted virtual container is sent to the second computing node.

[0050] The embodiment of the present application also provides a message forwarding device, including:

[0051] The first sending unit is used to send the virtual container to the second network device according to the first information and / or the second information; wherein,

[0052] The first information represents a selection strategy for an outbound interface of the first network device; the second information represents information guiding the forwarding of a virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one outbound interface and / or a corresponding priority of the destination egress routing device.

[0053] The embodiment of the present application also provides a message forwarding device, including:

[0054] The first receiving unit is used to receive the virtual container sent by the first network device; wherein,

[0055] The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0056] The embodiment of the present application further provides a first network device, including a first processor and a first communication interface, wherein:

[0057] The first communication interface is used to send a virtual container to a second network device according to the first information and / or the second information; wherein the first information represents a selection strategy of an output interface of the first network device; the second information represents information guiding the forwarding of the virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one egress interface and / or a corresponding priority of the destination egress routing device.

[0058] The embodiment of the present application further provides a second network device, including a second processor and a second communication interface, wherein:

[0059] The second communication interface is used to receive a virtual container sent by the first network device; wherein the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0060] The embodiment of the present application further provides a network device, including a processor and a memory for storing a computer program that can be run on the processor.

[0061] Wherein, when the processor is used to run the computer program, it executes the steps of any method on the first network device side or executes the steps of any method on the second network device side.

[0062] An embodiment of the present application further provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of any of the methods on the first network device side described above, or implements the steps of any of the methods on the second network device side described above.

[0063] The message forwarding method, apparatus, network device and storage medium provided by the embodiment of the present application, the first network device of the first network sends a virtual container to the second network device of the first network according to the first information and / or the second information; the second network device receives the virtual container sent by the first network device. Wherein, the first information represents the selection strategy of the output interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same inlet routing device of the first network to the same virtual queue of the destination outlet routing device, and one virtual queue corresponds to one output interface and / or corresponding priority of the destination outlet routing device. It can be seen that in the embodiment of the present application, in the first network, network devices use fixed-length virtual containers as the minimum unit for transmission, so that the first network supports packet-by-packet load balancing, the port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced; in addition, all first messages in the same virtual container are transmitted through the same physical link, and the first messages in different virtual containers can be transmitted through different physical links, so that messages of the same data stream can be carried in different virtual containers and sent through different forwarding paths, thereby improving the average link utilization efficiency, thereby improving the performance of the entire network, such as the message forwarding performance of the entire network. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 A schematic diagram of the implementation flow of a message forwarding method according to an embodiment of the present application;

[0065] Figure 2 This is an example diagram of forwarding virtual containers between network devices in an embodiment of the present application;

[0066] Figure 3 This is an example diagram of a virtual container according to an embodiment of the present application;

[0067] Figure 4 A schematic diagram of the implementation flow of a message forwarding method according to an embodiment of the present application;

[0068] Figure 5 A schematic diagram of an interactive process of a message forwarding method according to an embodiment of the present application;

[0069] Figure 6 This is a schematic diagram of the structure of a message forwarding device according to an embodiment of the present application;

[0070] Figure 7 This is a schematic diagram of the structure of a message forwarding device according to an embodiment of the present application;

[0071] Figure 8 This is a schematic diagram of the structure of the first network device in the embodiment of the present application;

[0072] Fig. 9 This is a schematic diagram of the second network device structure of an embodiment of the present application. DETAILED DESCRIPTION

[0073] The intelligent computing center is a data computing center dedicated to artificial intelligence (AI), serving as the infrastructure for carrying intelligent computing power; the data flow of the intelligent computing center has the characteristics of large traffic and long duration; a data flow refers to a group of data packets with the same characteristic fields. If the intelligent computing center adopts a flow-based ECMP mechanism for traffic scheduling, it may cause serious traffic congestion, fail to achieve high throughput, and have low performance of the entire network. The specific reasons are as follows: Although the principle of flow-based ECMP is simple to implement, it does not consider whether the path itself is congested; in actual business, although the flow hash is uniform, flow-based ECMP is prone to cause serious uneven load distribution on each equivalent link, which can easily cause traffic congestion and prevent the performance of the entire network from being improved.

[0074] Based on this, in various embodiments of the present application, the first network device of the first network sends a virtual container to the second network device of the first network according to the first information and / or the second information; the second network device receives the virtual container sent by the first network device. The first information represents the selection strategy of the output interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same inlet routing device of the first network to the same virtual queue of the destination outlet routing device, and one virtual queue corresponds to one output interface and / or corresponding priority of the destination outlet routing device. It can be seen that in the embodiment of the present application, in the first network, network devices use fixed-length virtual containers as the minimum unit for transmission, so that the first network supports packet-by-packet load balancing, the port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced; in addition, all first messages in the same virtual container are transmitted through the same physical link, and the first messages in different virtual containers can be transmitted through different physical links, so that messages of the same data stream can be carried in different virtual containers and sent through different forwarding paths, thereby improving the average link utilization efficiency, thereby improving the performance of the entire network, such as the message forwarding performance of the entire network.

[0075] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0076] The embodiment of the present application provides a message forwarding method, which is applied to a first network device of a first network, where the first network represents a message forwarding network or a switching network, such as a distributed forwarding network or a distributed switching network. Figure 1 As shown, the method includes:

[0077] Step 101: Send a virtual container to a second network device according to first information and / or second information.

[0078] Among them, the first information represents the selection strategy of the output interface of the first network device; the second information represents the information guiding the forwarding of the virtual container; the second network device represents the next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one outbound interface and / or corresponding priority of the destination egress routing device.

[0079] Here, the first network device obtains the first information and / or the second information; according to the first information and / or the second information, the virtual container is sent to the second network device. The virtual container can be understood as a virtual container based on the logical composition of the message, which can be called a message container (PKTC, Packet Container) or a virtual message container, etc. The maximum capacity of the virtual container can be set according to the length of the longest service message. The maximum capacity of all virtual containers is the same, and the maximum capacity can be understood as the maximum length or the total number of bytes; a virtual container can accommodate at least one longest service message, and the maximum capacity of the virtual container is as small as possible under the condition that the forwarding capacity and de-sequencing capacity of the network device allow, so as to achieve the purpose of fine segmentation of data streams and fully improve instantaneous load balancing.

[0080] The first information can be understood as a routing strategy for selecting an outbound interface of the first network device to send the virtual container; the first information can be preconfigured in the first network device, or can be issued by an electronic device such as a controller or server of the first network.

[0081] The second information can be carried in the first message in the virtual container, or it can be stored locally, for example, the queue depth of the virtual queue corresponding to the outgoing interface of the second network device in the first network device. Of course, the second information can also be sent by the second network device. For example, the second information can be the queue depth of the virtual queue corresponding to the outgoing interface of the destination egress routing device in the second network device, the link load degree and / or port occupancy rate of the outgoing interface of the second network device, etc. A virtual queue corresponds to an outgoing interface of a network device and / or the priority corresponding to the outgoing interface. The virtual queue can be a dynamic global scheduling queue (DGSQ, Dynamic Global Scheduling Queue) or a virtual output queue (VOQ, Virtual Output Queue). The outgoing interface of the destination egress routing device and the outgoing interface of the second network device are determined according to the destination address carried by the first message in the virtual container. The destination egress routing device is also called the destination routing device. The destination routing device can be understood as the last hop routing device of the first network determined according to the destination address carried by the first message in the message container. For example, the destination routing device is the routing device to which the outgoing interface (final outgoing interface) corresponding to the destination address in the forwarding table belongs. The entry routing device is also called a source routing device, and the source routing device can be understood as the first-hop routing device of the first network.

[0082] It should be noted that sending a virtual container to the second network device can be understood as sending a first message to the second network device in the form of a virtual container. The first message generally refers to any message in the virtual container, or any message sent in the form of a virtual container. Figure 2 As shown, the first network device can send different first messages through the same virtual container at different times; that is, when the first network device detects a first message, it sends the first message to the second network device in the form of a virtual container, rather than storing multiple first messages in the virtual container and then sending them. The first message is generated by the first network device (source routing device, source network card) according to the received original message, and the virtual container is generated or created by the network device that generates the first message; the virtual container is forwarded between different network devices. Among them, when the total number of bytes of the first messages sent through the same virtual container at different times is close to or equal to the maximum capacity of the virtual container, the state of the virtual container is switched from available to unavailable. At this time, a new virtual container needs to be created to send the first message.

[0083] The first network device includes at least one of the following: a source routing device, a source network card, a destination routing device, a destination network card, an intermediate routing device between the source routing device and the destination routing device, etc. The routing device includes a router and / or a switch. The previous hop device of the source network card is a computing node that sends a message, and the next hop device of the source network card is a source routing device; the previous hop device of the destination network card is a destination routing device, and the next hop device of the destination network card is a computing node that receives a message. A computing node can be understood as a node with computing capabilities, such as a computing card, a server, a terminal, etc. The computing card and the network card can be separately set on different devices, or they can be combined on the same device. The intermediate routing device can be a spine switch or a convergence switch. When the network architecture of the first network is a leaf-spine network architecture, the source routing device and the destination routing device can be leaf switches, and the intermediate routing device is a spine switch.

[0084] For example, when the first network device is a source network card, since there is usually only one forwarding path between a source network card and a source routing device, that is, the source network card has only one output interface connected to the source routing device, the first network device sends the virtual container to the second network device according to the second information.

[0085] For another example, when the first network device is a source routing device, and the same source routing device is connected to at least two second network devices, the first network device sends a virtual container to the second network device according to the first information and / or the second information. Wherein, when the first message is the first message of the virtual container, the first network device sends the virtual container to the second network device according to the first information and the second information; since all the first messages in the same virtual container are forwarded through the same forwarding path, therefore, when the first message is not the first message of the virtual container, it is not necessary to select the output interface of the first network device according to the first information, and send the virtual container to the second network device according to the second information. It should be noted that all the first messages in the same virtual container are forwarded through the same forwarding path, which can be understood as: all the first messages in the same virtual container are load balanced to a unique path for forwarding in the first network, so that different messages in the same virtual container are no longer out of order, so as to reduce the de-ordering pressure of the destination routing device or the destination network card. De-ordering can be understood as reorganizing the received messages out of order.

[0086] For another example, when the first network device is an intermediate routing device, and the same intermediate routing device is connected to at least two next-hop routing devices, the first network device sends a virtual container to the second network device according to the first information and / or the second information. When the first network device is a destination routing device, and an output interface of the same destination routing device corresponds to a destination network card or computing node, the first network device sends a virtual container to the second network device according to the second information. When the first network device is a destination routing device, and different output interfaces of the same destination routing device are connected to the same computing node, the first network device can send a virtual container to the second network device according to the first information.

[0087] In order to facilitate the first network device to select the output interface of the virtual container and facilitate the destination routing device or the destination network card to reassemble the received virtual containers out of order, in one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0088] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0089] a second identifier, where the second identifier is used to sort different virtual containers;

[0090] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0091] Here, the third information can be carried in the header of the first message, and the header can be understood as a virtual container header or a message container header, and the virtual container can be understood as a message carrying a virtual container header or a message container header. The first identifier can be an identifier or number of a virtual container, which is used to instruct the first network device to select the output interface of the virtual container; the second identifier can be understood as the sequence number of the virtual container, which is used by the destination routing device or the destination network card to sort the different virtual containers received to send the first messages in different virtual containers in the correct order, and the sequence numbers of different virtual containers are different; the third identifier can be described or represented by two bits, such as 10 represents the first message in the virtual container, and 01 represents the last message in the virtual container. The third identifier is used for the destination routing device or the destination network card to determine whether all the first messages sent through the same virtual container are received.

[0092] It should be noted that the third information carried by all first messages in the same virtual container is the same. The third information may also include an identifier of a data flow corresponding to the first message (flow identifier).

[0093] In the case where the first message in the virtual container carries the third information, in one embodiment, the first network device represents a source routing device or a source network card, and the method further includes:

[0094] Receiving a second message sent by the first computing node;

[0095] The third information is added to the second message to obtain the first message.

[0096] Here, adding the third information to the second message to obtain the first message can be understood as loading the second message into a virtual container. The second message generally refers to the original message received, and the second message can be an Ethernet message. The third information is carried in the Header of the second message, which can be called a virtual container Header. The Header can be a standard extension header added outside the second message, or a media access control layer (MAC) header in the second message. The Header can also be located after the MAC header or Internet Protocol (IP) header of the second message.

[0097] The third information in the Header of all first messages in the same virtual container is the same, such as Figure 3 As shown, first messages with the same third information logically form a virtual container. The first identifier and the second identifier contained in the third information carried by the first messages in different virtual containers are different.

[0098] When the first network device is an intermediate routing device, a destination routing device or a destination network card, before the first network device sends a virtual container, it needs to receive a virtual container sent by a previous hop device. Based on this, in one embodiment, a virtual container sent by a third network device is received, and the third network device represents the previous hop device of the first network device.

[0099] Here, the network devices use the virtual container as the smallest unit for transmission, and the same virtual container carries a first message at the same time, so that the first network supports packet-by-packet load balancing.

[0100] In one embodiment, sending the virtual container to the second network device according to the first information and / or the second information includes:

[0101] Determine, according to the first information and / or the second information, a first outbound interface corresponding to the virtual container on the first network device;

[0102] A first message is sent to a second network device corresponding to the first output interface in a virtual container manner.

[0103] Here, the first network device determines the next hop device of the first network device to obtain the second network device. For example, the second network device is determined according to the destination address carried by the first message in the virtual container, and the number of the second network devices is greater than or equal to 1; according to the first information and / or the second information, a second output interface that meets the set requirements is determined among the output interfaces of all second network devices that can reach the destination address; according to the second network device to which the second output interface belongs and the topological structure of the first network, the output interface of the first network device connected to the second network device is determined to obtain the first output interface of the virtual container corresponding to the first network device; and the first message is sent to the second network device corresponding to the first output interface in the form of a virtual container.

[0104] It should be noted that if there is only one second network device and there is only one outbound interface on the second network device that can reach the destination address, then the outbound interface is the second outbound interface. The setting requirements may include at least one of the following:

[0105] The link status is optimal;

[0106] The maximum available queue depth;

[0107] The queue depth is minimal;

[0108] Minimum load;

[0109] Minimum congestion.

[0110] It should be noted that, as mentioned above, the second information may be at least one of the following:

[0111] A queue depth of a virtual queue corresponding to an outbound interface of the second network device in the first network device;

[0112] The queue depth of the virtual queue corresponding to the outbound interface of the destination egress routing device in the second network device;

[0113] The link load level and / or port occupancy rate of the outbound interface of the second network device.

[0114] Correspondingly, the selection strategy of the outbound interface represented by the first information may be at least one of the following: optimal link status, maximum available queue depth, minimum queue depth, and lowest congestion level.

[0115] The queue depth can be understood as the queue depth of the virtual queue. When the queue depth is minimum, the available queue depth is maximum. The available queue depth is determined by the total number of bytes that can be cached by the virtual queue and the total number of bytes occupied.

[0116] In this embodiment, the first network device may select the link with the best link status to send the virtual container, so as to reduce the probability of traffic congestion occurring in the second network device.

[0117] In one embodiment, the second information includes at least one of the following:

[0118] a first identifier carried by the first message in the virtual container, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0119] The destination address carried by the first message in the virtual container;

[0120] a first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of the first network device;

[0121] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0122] Here, the second information is used to select the output interface corresponding to the virtual container on the first network device, and the first data table and the first hash value can be stored in the first network device. The implementation process of selecting the output interface corresponding to the virtual container on the first network device is as follows:

[0123] When the first network device is a source routing device or a source network card, if the first message is the first message of the virtual container, the first network device needs to determine the output interface of the second network device according to the destination address carried by the first message in the virtual container, thereby determining the output interface corresponding to the virtual container of the first network device. If the first message is not the first message of the virtual container, the first network device determines the virtual container to which the first message belongs, and queries the output interface corresponding to the virtual container to which the first message belongs in the first data table. The method by which the first network device determines the virtual container to which the first message belongs can be any of the following:

[0124] Method 1: The first network device determines the virtual container to which the first message belongs based on the first identifier and / or destination address carried by the first message. Specifically, the comparison result can be obtained by comparing the first identifier carried by the first message with the first identifier of each virtual container recorded by the first network device, and the virtual container to which the first message belongs is determined based on the comparison result. The destination address carried by the first message can be compared with the destination address of the first first message sent through the virtual container, and the virtual container to which the first message belongs is determined based on the comparison result. The virtual container to which the first message belongs can be understood as the virtual container corresponding to the first message, or the virtual container that carries the first message.

[0125] Method 2: The first network device calculates a second hash value of the first identifier carried by the first message, compares the second hash value with the first hash value corresponding to the first first message sent through the virtual container, and determines the virtual container to which the first message belongs based on the comparison result.

[0126] When the first network device is an intermediate routing device, a destination routing device or a destination network card, the first network device directly receives the virtual container. If the first data table stores a correspondence between the first identifier and the output interface, the first network device can query the first data table according to the first identifier carried by the first message in the received virtual container to obtain the output interface corresponding to the received virtual container; if the first data table stores a correspondence between the first hash value and the output interface, the first network device determines the second hash value of the first identifier carried by the first message in the received virtual container, and determines the output interface corresponding to the first hash value that is the same as the second hash value in the first data table to obtain the output interface corresponding to the received virtual container.

[0127] Before sending the first message in the form of a virtual container, it is necessary to first determine the virtual container to which the first message belongs, so as to ensure that all first messages in the same virtual container are transmitted through the same physical link, so that different messages in the same virtual container are no longer out of order, so as to reduce the de-ordering pressure of the destination routing device or the destination network card. Based on this, in one embodiment, when the first network device represents the source routing device or the source network card, the method of determining that the virtual container is before the first output interface corresponding to the first network device also includes:

[0128] According to the number of bytes of the first message and the number of available bytes of the virtual container, the virtual container to which the first message belongs is determined; wherein,

[0129] The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0130] Here, when the first network device obtains the first message, if the virtual container created by the first network device is empty and the first message is the first message of the virtual container, then the first message belongs to the virtual container, and the output interface of the virtual container on the first network device is selected, and the first message is sent from the selected output interface in the form of a virtual container. If the virtual container created by the first network device is not empty and the first message is not the first message of the virtual container, then the first network device determines the virtual container corresponding to the first message according to the first or second method described above; determines whether the virtual container can accommodate the first message according to the number of bytes of the first message and the number of available bytes of the virtual container; if the virtual container can accommodate the first message, then the first message belongs to the virtual container; if the virtual container cannot accommodate the first message, then the first message does not belong to the virtual container, and a new virtual container needs to be created to send the first message.

[0131] It should be noted that the number of bytes of the first message refers to the total number of bytes of the first message. The maximum capacity of the virtual container is in bytes (B), and the number of bytes can be understood as the number of bytes. The threshold is a set value and is less than or equal to the maximum capacity.

[0132] In order to accurately determine the virtual container to which the first message belongs, in one embodiment, determining the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container includes one of the following:

[0133] When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container;

[0134] When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container:

[0135] The number of bytes of the first message is greater than the number of available bytes of the first virtual container;

[0136] The lifetime of the first virtual container is reached.

[0137] Here, the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, indicating that the first virtual container can accommodate the first message; the number of bytes of the first message is greater than the number of available bytes of the first virtual container, indicating that the first virtual container cannot accommodate the first message.

[0138] In order to more quickly determine to which virtual container the first message belongs, so as to improve message forwarding efficiency, in one embodiment, the method further includes:

[0139] Record at least one of the following:

[0140] the fifth information;

[0141] An identifier of the virtual container to which the first message belongs;

[0142] Destination address carried in the first message of the virtual container.

[0143] Here, the identifier of the virtual container to which the first message belongs is the first identifier mentioned above.

[0144] In one embodiment, the first network device represents a source routing device or a source network card, and the method further includes:

[0145] When the life time of the virtual container is reached, the virtual container is released.

[0146] Here, when the first network device generates or creates a virtual container, it also sets the life span of the virtual container. If the life span of the virtual container is reached or exceeded, the virtual container is unavailable and the virtual container is released to save resources of the first network device. Releasing a virtual container can also be understood as destroying a virtual container. It should be noted that after releasing a virtual container, another virtual container can be created according to the actual message forwarding requirements. As long as the first message and / or the second message exist in the first network device, the virtual container always exists in the first network device.

[0147] Based on the relevant description of the above embodiment, correspondingly, the embodiment of the present application also provides a message forwarding method, which is applied to the second network device of the first network. Figure 4 , the method comprising:

[0148] Step 401: Receive a virtual container sent by a first network device.

[0149] Among them, the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0150] Here, all first messages in the same virtual container are transmitted through the same physical link, and different first messages in the same virtual container can arrive in sequence.

[0151] If the second network device is an intermediate routing device, such as a spine switch or an aggregation switch, the second network device acts as the first network device and forwards the virtual container according to the method described above.

[0152] If the second network device is a destination network device or a destination network card, the second network device decapsulates the first message in the virtual container to obtain a second message, and sends the second message to the second computing node.

[0153] In order to facilitate the destination routing device or the destination network card to reassemble the received virtual containers out of order, in one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0154] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0155] a second identifier, where the second identifier is used to sort different virtual containers;

[0156] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0157] In one embodiment, the second network device represents a last-hop network device of the first network, and the method further includes at least one of the following:

[0158] discarding the third information carried by the first message in the virtual container, obtaining a second message, and sending the second message to the second computing node;

[0159] The different virtual containers are sorted, and the first message in the sorted virtual container is sent to the second computing node.

[0160] Here, in the case where the second network device is the destination network device or the destination network card, since different first messages of the same virtual container can arrive in order, the second network device does not need to sort the different first messages in the same virtual container. If the second network device receives different first messages of the same virtual container, the second network device decapsulates the first message to remove the Head used to carry the third information in the first message, and discards the Head, thereby discarding the third information carried by the first message, obtaining the second message, and sending the second message to the second computing node.

[0161] If the second network device receives first messages of different virtual containers, the second network device determines whether all first messages sent through the same virtual container are received according to the third identifier carried by the first message, and when all first messages in each virtual container are received, the second network device sorts all virtual containers according to the second identifier carried by the first message to obtain a virtual container sequence; for the first message in each virtual container in the virtual container sequence, the first message is decapsulated according to the above method to obtain a corresponding second message, and the second message is sent to the second computing node.

[0162] The following takes the first network as a distributed switching network with a leaf-spine network architecture as an example, and further describes the present application in detail in combination with application examples.

[0163] Figure 5 The message forwarding method shown includes:

[0164] Step 1: The first computing node sends a second message to the source switch.

[0165] Here, the source switch is a leaf switch.

[0166] Step 2: The source switch receives the second message, adds the third information to the second message, and obtains the first message.

[0167] In one embodiment, the third information includes at least one of the following:

[0168] A first identifier, where the first identifier is used to select an outbound interface of the virtual container;

[0169] a second identifier, where the second identifier is used to sort different virtual containers;

[0170] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0171] Here, the third information carried by all first messages sent through the same virtual container is the same. The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same source switch (leaf switch) of the first network to the same virtual queue of the destination switch (another leaf switch), and one virtual queue corresponds to an outbound interface of the destination switch and / or the priority of the outbound interface.

[0172] Step 3: The source switch determines the first outbound interface corresponding to the virtual container on the source switch according to the first information and / or the second information.

[0173] Here, the first information represents the selection strategy of the outbound interface of the source switch; the second information represents the information guiding the forwarding of the virtual container. The method for determining the first outbound interface can refer to the relevant description above, which will not be repeated here.

[0174] In one embodiment, the second information includes at least one of the following:

[0175] a first identifier carried by a first message in the virtual container, where the first identifier is used to select an outbound interface of the virtual container;

[0176] The destination address carried by the first message in the virtual container;

[0177] A first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of a source switch;

[0178] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0179] Here, the first identifier is used to select the outbound interface corresponding to the virtual container on the source switch.

[0180] In one embodiment, the source switch determines that the virtual container is before the first outbound interface corresponding to the source switch, and the method further includes:

[0181] The source switch determines the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container; wherein,

[0182] The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0183] In one embodiment, the source switch determines the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container, including one of the following:

[0184] When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container;

[0185] When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container:

[0186] The number of bytes of the first message is greater than the number of available bytes of the first virtual container;

[0187] The lifetime of the first virtual container is reached.

[0188] Step 4: The source switch sends the first message to the spine switch corresponding to the first output interface in a virtual container.

[0189] In one embodiment, the source switch records at least one of the following items each time it sends a first message:

[0190] the fifth information;

[0191] An identifier of the virtual container to which the first message belongs;

[0192] Destination address carried in the first message of the virtual container.

[0193] In one embodiment, when the lifetime of the virtual container is reached, the source switch releases the virtual container.

[0194] Step 5: The spine switch receives the virtual container sent by the source switch, where the virtual container carries the first message.

[0195] Step 6: The spine switch determines the second outbound interface corresponding to the virtual container on the spine switch based on the first information and / or the second information.

[0196] Here, step 6 is similar to step 3. Please refer to the above description for the specific implementation process, which will not be repeated here. The first information represents the selection strategy of the outbound interface of the spine switch; the second information represents the information guiding the forwarding of the virtual container. Among them, the second information includes at least one of the following:

[0197] A first identifier carried by a first message in the virtual container;

[0198] The destination address carried by the first message in the virtual container;

[0199] A first data table, the first data table is used to indicate the correspondence between the virtual container and the outbound interface of the spine switch;

[0200] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0201] Here, the first identifier is used to select the output interface corresponding to the virtual container on the spine switch.

[0202] Step 7: The spine switch sends the virtual container to the destination switch corresponding to the second outbound interface.

[0203] Step 8: The destination switch receives the virtual container sent by the spine switch and sends a second message to the second computing node.

[0204] Here, the destination switch is a leaf switch. Sending a second message to the second computing node includes at least one of the following:

[0205] discarding the third information carried by the first message in the virtual container, obtaining a second message, and sending the second message to the second computing node;

[0206] The different virtual containers are sorted, and the first message in the sorted virtual container is sent to the second computing node.

[0207] Based on the above embodiments, network devices use fixed-length virtual containers as minimum units for transmission, so that the first network supports packet-by-packet load balancing, the port traffic of different network devices is basically balanced, and the traffic on each physical link is also balanced; in addition, all first messages in the same virtual container are transmitted through the same physical link, and messages in different virtual containers can be transmitted through different physical links, so that messages of the same data flow can be carried in different virtual containers and sent through different forwarding paths, thereby improving the average link utilization efficiency, thereby improving the performance of the entire network.

[0208] In order to implement the message forwarding method of the embodiment of the present application, the embodiment of the present application also provides a message forwarding device, which is arranged on a first network device of the first network, such as Figure 6 As shown, the device comprises:

[0209] The first sending unit 601 is used to send a virtual container to a second network device according to the first information and / or the second information; wherein the first information represents a selection strategy of an output interface of the first network device; the second information represents information guiding the forwarding of the virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or a corresponding priority of the destination egress routing device.

[0210] In one embodiment, the device further comprises:

[0211] A first determining unit, configured to determine a first outbound interface corresponding to the virtual container on the first network device according to the first information and / or the second information;

[0212] The first sending unit 601 is specifically configured to send a first message to a second network device corresponding to the first output interface in a virtual container manner.

[0213] In one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0214] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0215] a second identifier, where the second identifier is used to sort different virtual containers;

[0216] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0217] In one embodiment, the second information includes at least one of the following:

[0218] a first identifier carried by the first message in the virtual container, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0219] The destination address carried by the first message in the virtual container;

[0220] a first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of the first network device;

[0221] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0222] In one embodiment, the device further comprises:

[0223] The second receiving unit is configured to receive a virtual container sent by a third network device, where the third network device represents a previous hop device of the first network device.

[0224] In one embodiment, the first network device represents a source routing device or a source network card, and the apparatus further includes:

[0225] A third receiving unit, configured to receive a second message sent by the first computing node;

[0226] The generating unit is used to add third information to the second message to obtain the first message.

[0227] In one embodiment, the first network device represents a source routing device or a source network card, and the apparatus further includes:

[0228] The second determining unit is used to determine the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container; wherein,

[0229] The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0230] In one embodiment, the second determining unit is specifically used for one of the following:

[0231] When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container;

[0232] When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container:

[0233] The number of bytes of the first message is greater than the number of available bytes of the first virtual container;

[0234] The lifetime of the first virtual container is reached.

[0235] In one embodiment, the device further comprises:

[0236] A recording unit, used to record at least one of the following:

[0237] the fifth information;

[0238] An identifier of the virtual container to which the first message belongs;

[0239] Destination address carried in the first message of the virtual container.

[0240] In one embodiment, the first network device represents a source routing device or a source network card, and the apparatus further includes:

[0241] The release unit is used to release the virtual container when the life time of the virtual container is reached.

[0242] In actual application, the first sending unit 601, the second receiving unit and the third receiving unit can be implemented by a communication interface combined with a processor in the message forwarding device, and the first determination unit, the second determination unit, the generation unit and the release unit can be implemented by a processor in the message forwarding device.

[0243] In order to implement the message forwarding method of the embodiment of the present application, the embodiment of the present application also provides a message forwarding device, which is arranged on the second network device of the first network, such as Figure 7 As shown, the device comprises:

[0244] The first receiving unit 701 is used to receive a virtual container sent by a first network device; wherein:

[0245] The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0246] In one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0247] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0248] a second identifier, where the second identifier is used to sort different virtual containers;

[0249] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0250] In one embodiment, the second network device represents a last-hop network device of the first network, and the apparatus further includes at least one of the following:

[0251] A forwarding unit, configured to discard the third information carried by the first message in the virtual container, obtain a second message, and send the second message to the second computing node;

[0252] The sorting unit is used to sort different virtual containers and send the first message in the sorted virtual container to the second computing node.

[0253] In actual application, the first receiving unit 701 and the forwarding unit can be implemented by a communication interface in the message forwarding device in combination with a processor, and the sorting unit can be implemented by a processor in the message forwarding device.

[0254] It should be noted that: the message forwarding device provided in the above embodiment only uses the division of the above program modules as an example when forwarding messages. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the message forwarding device provided in the above embodiment and the message forwarding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0255] Based on the hardware implementation of the above program module, and in order to implement the method of the first network device side of the embodiment of the present application, the embodiment of the present application also provides a first network device, such as Figure 8 As shown, the first network device 800 includes:

[0256] The first communication interface 801 is capable of exchanging information with other network nodes;

[0257] The first processor 802 is connected to the first communication interface 801 to implement information exchange with other network nodes, and is used to execute the method provided by one or more technical solutions of the first network device side when running a computer program. The computer program is stored in the first memory 803.

[0258] Specifically, the first communication interface 801 is used to send a virtual container to the second network device according to the first information and / or the second information; wherein the first information represents a selection strategy of an output interface of the first network device; the second information represents information guiding the forwarding of the virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or a corresponding priority of the destination egress routing device.

[0259] In one embodiment, the first processor 802 is configured to determine a first outbound interface corresponding to the virtual container on the first network device according to the first information and / or the second information;

[0260] The first communication interface 801 is specifically configured to send a first message to a second network device corresponding to the first output interface in a virtual container manner.

[0261] In one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0262] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0263] a second identifier, where the second identifier is used to sort different virtual containers;

[0264] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0265] In one embodiment, the second information includes at least one of the following:

[0266] a first identifier carried by the first message in the virtual container, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0267] The destination address carried by the first message in the virtual container;

[0268] a first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of the first network device;

[0269] A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

[0270] In one embodiment, the first communication interface 801 is further configured to receive a virtual container sent by a third network device, where the third network device represents a previous hop device of the first network device.

[0271] In one embodiment, the first network device represents a source routing device or a source network card, and the first communication interface 801 is further used to receive a second message sent by the first computing node;

[0272] The first processor 802 is further configured to add third information to the second message to obtain the first message.

[0273] In one embodiment, the first network device represents a source routing device or a source network card, and the first processor 802 is further configured to determine the virtual container to which the first message belongs according to the number of bytes of the first message and the number of available bytes of the virtual container; wherein,

[0274] The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

[0275] In one embodiment, the first processor 802 is specifically configured to do one of the following:

[0276] When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container;

[0277] When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container:

[0278] The number of bytes of the first message is greater than the number of available bytes of the first virtual container;

[0279] The lifetime of the first virtual container is reached.

[0280] In one embodiment, the first processor 802 is further configured to record at least one of the following:

[0281] the fifth information;

[0282] An identifier of the virtual container to which the first message belongs;

[0283] Destination address carried in the first message of the virtual container.

[0284] In one embodiment, the first network device represents a source routing device or a source network card, and the first processor 802 is further configured to release the virtual container when the lifetime of the virtual container is reached.

[0285] It should be noted that the specific processing process of the first processor 802 and the first communication interface 801 can be understood by referring to the above method.

[0286] Of course, in actual application, the various components in the first network device 800 are coupled together through the bus system 804. It can be understood that the bus system 804 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 804 .

[0287] The first memory 803 in the embodiment of the present application is used to store various types of data to support the operation of the first network device 800. Examples of such data include: any computer program used to operate on the first network device 800.

[0288] The method disclosed in the above embodiment of the present application can be applied to the first processor 802, or implemented by the first processor 802. The first processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the first processor 802 or an instruction in the form of software. The above-mentioned first processor 802 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 802 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 803, and the first processor 802 reads the information in the first memory 803 and completes the steps of the above method in combination with its hardware.

[0289] In an exemplary embodiment, the first network device 800 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.

[0290] Based on the hardware implementation of the above program module, and in order to implement the method of the second network device side of the embodiment of the present application, the embodiment of the present application also provides a second network device, such as Fig. 9 As shown, the second network device 900 includes:

[0291] The second communication interface 901 is capable of exchanging information with other network nodes;

[0292] The second processor 902 is connected to the second communication interface 901 to implement information exchange with other network nodes, and is used to execute the method provided by one or more technical solutions of the second network device side when running a computer program. The computer program is stored in the second memory 903.

[0293] Specifically, the second communication interface 901 is used to receive a virtual container sent by the first network device; wherein the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

[0294] In one embodiment, each first message in the virtual container carries third information, and the third information includes at least one of the following:

[0295] a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device;

[0296] a second identifier, where the second identifier is used to sort different virtual containers;

[0297] A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

[0298] In one embodiment, the second network device represents the last hop network device of the first network.

[0299] The second processor 902 is used to sort different virtual containers, send the sorted first message in the virtual container to the second computing node, and / or discard the third information carried by the first message in the virtual container to obtain a second message;

[0300] The second communication interface 901 is further used to send the second message to the second computing node.

[0301] It should be noted that the specific processing process of the second processor 902 and the second communication interface 901 can be understood by referring to the above method.

[0302] Of course, in actual application, the various components in the second network device 900 are coupled together through the bus system 904. It can be understood that the bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as bus system 904.

[0303] The second memory 903 in the embodiment of the present application is used to store various types of data to support the operation of the second network device 900. Examples of such data include: any computer program used to operate on the second network device 900.

[0304] The method disclosed in the above embodiment of the present application can be applied to the second processor 902, or implemented by the second processor 902. The second processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the second processor 902 or an instruction in the form of software. The above-mentioned second processor 902 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 902 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the second memory 903, and the second processor 902 reads the information in the second memory 903 and completes the steps of the above method in combination with its hardware.

[0305] In an exemplary embodiment, the second network device 900 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.

[0306] It can be understood that the memory (first memory 803, second memory 903) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0307] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 803 storing a computer program, and the computer program can be executed by the first processor 802 of the first network device 800 to complete the steps of the aforementioned first network device side method. For another example, a second memory 903 storing a computer program can be executed by the second processor 902 of the second network device 900 to complete the steps of the aforementioned second network device side method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.

[0308] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0309] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.

[0310] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

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

Claims

1. A message forwarding method, characterized in that: A first network device applied to a first network, the method comprising: Sending a virtual container to a second network device according to the first information and / or the second information; wherein, The first information represents a selection strategy for an outbound interface of the first network device; the second information represents information guiding the forwarding of a virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one outbound interface and / or a corresponding priority of the destination egress routing device.

2. The method according to claim 1, characterized in that The sending of the virtual container to the second network device according to the first information and / or the second information includes: Determine, according to the first information and / or the second information, a first outbound interface corresponding to the virtual container on the first network device; A first message is sent to a second network device corresponding to the first output interface in a virtual container manner.

3. The method according to claim 1, characterized in that Each first message in the virtual container carries third information, and the third information includes at least one of the following: a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device; a second identifier, where the second identifier is used to sort different virtual containers; A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

4. The method according to any one of claims 1 to 3, characterized in that: The second information includes at least one of the following: a first identifier carried by the first message in the virtual container, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device; The destination address carried by the first message in the virtual container; a first data table, wherein the first data table is used to indicate a correspondence between a virtual container and an outbound interface of the first network device; A first Hash value, where the first Hash value is determined by a first identifier carried by a first message in the virtual container.

5. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A virtual container sent by a third network device is received, where the third network device represents a previous-hop device of the first network device.

6. The method according to claim 3, characterized in that The first network device represents a source routing device or a source network card, and the method further includes: Receiving a second message sent by the first computing node; The third information is added to the second message to obtain the first message.

7. The method according to any one of claims 1 to 3 and 6, characterized in that: The first network device represents a source routing device or a source network card, and the method of determining that the virtual container is before the first output interface corresponding to the first network device further includes: According to the number of bytes of the first message and the number of available bytes of the virtual container, the virtual container to which the first message belongs is determined; wherein, The number of available bytes of the virtual container is determined according to fourth information and fifth information, wherein the fourth information represents the maximum capacity or threshold of the virtual container, and the fifth information represents the total number of bytes of all first messages sent through the same virtual container at different times.

8. The method according to claim 7, characterized in that The determining, according to the number of bytes of the first message and the number of available bytes of the virtual container, to which the first message belongs, comprises one of the following: When the number of bytes of the first message is less than or equal to the number of available bytes of the first virtual container, determining that the first message belongs to the first virtual container; When at least one of the following conditions is met, a second virtual container is created, and it is determined that the first message belongs to the second virtual container: The number of bytes of the first message is greater than the number of available bytes of the first virtual container; The lifetime of the first virtual container is reached.

9. The method according to claim 7, characterized in that: The method further comprises: Record at least one of the following: the fifth information; An identifier of the virtual container to which the first message belongs; Destination address carried in the first message of the virtual container.

10. The method according to any one of claims 1 to 3 and 6, characterized in that: The first network device represents a source routing device or a source network card, and the method further includes: When the lifetime of the virtual container is reached, the virtual container is released.

11. A message forwarding method, characterized in that: A second network device applied to a first network, the method comprising: Receive a virtual container sent by a first network device; wherein, The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

12. The method according to claim 11, characterized in that Each first message in the virtual container carries third information, and the third information includes at least one of the following: a first identifier, where the first identifier is used to select an outbound interface corresponding to the virtual container on the first network device; a second identifier, where the second identifier is used to sort different virtual containers; A third identifier, where the third identifier is used to indicate the first message or the last message in the virtual container.

13. The method according to claim 12, characterized in that The second network device represents a last-hop network device of the first network, and the method further includes at least one of the following: discarding the third information carried by the first message in the virtual container, obtaining a second message, and sending the second message to the second computing node; The different virtual containers are sorted, and the first message in the sorted virtual container is sent to the second computing node.

14. A message forwarding device, characterized in that: include: The first sending unit is used to send the virtual container to the second network device according to the first information and / or the second information; wherein, The first information represents a selection strategy for an outbound interface of the first network device; the second information represents information guiding the forwarding of a virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one outbound interface and / or a corresponding priority of the destination egress routing device.

15. A message forwarding device, characterized in that: include: The first receiving unit is used to receive the virtual container sent by the first network device; wherein, The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

16. A first network device, characterized in that: comprising a first processor and a first communication interface, wherein: The first communication interface is used to send the virtual container to the second network device according to the first information and / or the second information; wherein, The first information represents a selection strategy for an outbound interface of the first network device; the second information represents information guiding the forwarding of a virtual container; the second network device represents a next-hop device of the first network device; the maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of a destination egress routing device, and one virtual queue corresponds to one outbound interface and / or a corresponding priority of the destination egress routing device.

17. A second network device, characterized in that: comprising a second processor and a second communication interface, wherein: The second communication interface is used to receive the virtual container sent by the first network device; wherein, The maximum capacity of the virtual container is a set value, and all first messages in the same virtual container are sent from the same ingress routing device of the first network to the same virtual queue of the destination egress routing device, and one virtual queue corresponds to one egress interface and / or corresponding priority of the destination egress routing device.

18. A network device, characterized in that: comprising a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 10, or executes the steps of the method described in any one of claims 11 to 13.

19. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented, or the steps of the method according to any one of claims 11 to 13 are implemented.

Citation Information

Patent Citations

  • Message transmission method and related device

    CN111181871A

  • Data processing method and device

    CN114095458A

  • Message processing method and device, electronic equipment and readable storage medium

    CN114430394A

  • Control method and apparatus for communication between containers

    WO2023035670A1