Packet transmission method and apparatus, and electronic device and medium

By selecting multiple baseline paths with a limited number of overlapping intermediate nodes in the data center network and using virtual port numbers of the paths to bypass faulty switches, the problem of unstable packet transmission caused by switch failures in existing technologies is solved, thereby improving the continuity and reliability of data flow.

WO2026103683A1PCT designated stage Publication Date: 2026-05-21TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2025-11-11
Publication Date
2026-05-21

AI Technical Summary

Technical Problem

Existing network traffic availability enhancement solutions such as TCP and PRR cannot accurately bypass the faulty switch when the switch fails, resulting in a high packet retransmission failure rate and affecting the continuity of data flow.

Method used

By selecting multiple baseline paths, and ensuring that the number of overlapping intermediate nodes between each path meets predetermined conditions, a lookup table is established between the virtual port numbers of the paths and the baseline paths. When a fault occurs, the virtual port numbers of the paths are switched to bypass the faulty switch.

Benefits of technology

This reduces the number of message retransmissions and the time required for new path selection due to switch failures, thereby improving the continuity and reliability of the data flow in message transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025134098_21052026_PF_FP_ABST
    Figure CN2025134098_21052026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present disclosure are a packet transmission method and apparatus, and an electronic device and a medium. The packet transmission method is executed by means of a source node, and comprises: selecting a plurality of packet transmission paths from a source node to a destination node as a plurality of reference paths, wherein each reference path passes through a plurality of intermediate node layers, each intermediate node layer comprises at least one intermediate node, and the number of overlapping intermediate nodes between any two of the plurality of reference paths meets a predetermined condition; transmitting a target packet to the destination node by means of a first reference path among the plurality of reference paths; in response to determining that the transmission of the target packet to the destination node which is performed by means of the first reference path fails, selecting from among the plurality of reference paths a second reference path which is different from the first reference path; and transmitting the target packet to the destination node by means of the second reference path. The embodiments of the present disclosure increase the probability of bypassing a faulty switch after rerouting, thereby improving the continuity of a data flow during packet transmission. The embodiments of the present disclosure are applicable to various scenarios such as data centers.
Need to check novelty before this filing date? Find Prior Art

Description

Message transmission methods, devices, electronic equipment and media

[0001] This application claims priority to Chinese Patent Application No. 202411644564.9, filed on November 15, 2024, entitled "Message Transmission Method, Apparatus, Electronic Equipment and Medium". Technical Field

[0002] This disclosure relates to the field of data communication, and in particular to a message transmission method, apparatus, electronic device, and medium. Background Technology

[0003] A data center network is a network infrastructure composed of network devices such as servers and switches. In a data center network, different servers can transmit messages through switches to achieve reliable message transmission. However, with a large number of switches operating for extended periods, some switches will inevitably fail, causing them to be unable to perform normal message forwarding.

[0004] Currently, the most widely used network traffic availability enhancement schemes include Transmission Control Protocol (TCP) and Protective ReRoute (PRR). When transmitting packets via the original TCP (or conventional TCP), if the path of the transmitted packet encounters a switch failure, the source node server will retransmit the packet through that path after a timeout. If the switch failure has not been resolved, the retransmitted packet will still be discarded. The source node server will continuously retransmit the packet multiple times until the maximum number of retransmissions is reached. If the packet is still not successfully retransmitted when the maximum number of retransmissions is reached, the source node server will randomly select a new path and attempt to transmit the packet again; however, this newly selected path may also pass through a failed switch. Protective rerouting algorithms, when a switch fails, do not repeatedly retransmit packets. Instead, during the first retransmission, they modify the flow label field in the packet header and involve it in the switch's addressing hashing process, thus altering the packet's actual path and potentially bypassing the faulty switch. However, both methods involve random rerouting paths, making it difficult to definitively bypass the faulty switch. The probability of failing to bypass the faulty switch after rerouting is high. Summary of the Invention

[0005] This disclosure provides a message transmission method, apparatus, electronic device, and medium that can increase the probability of bypassing a faulty switch after rerouting and improve the continuity of data flow during message transmission.

[0006] According to one aspect of this disclosure, a message transmission method is provided, performed by a source node, the method comprising:

[0007] Multiple message transmission paths between the source node and the destination node are selected as multiple reference paths. Each reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two reference paths in the multiple reference paths meets a predetermined condition.

[0008] The target message is transmitted to the destination node via the first reference path among the multiple reference paths;

[0009] In response to determining that transmitting the target message to the destination node via the first reference path has failed, a second reference path different from the first reference path is selected from the plurality of reference paths;

[0010] The target message is transmitted to the destination node via the second reference path.

[0011] According to one aspect of this disclosure, a message transmission method is provided, performed by a destination node, the method comprising:

[0012] Receive the target message sent by the source node;

[0013] Multiple response transmission paths between the destination node and the source node are obtained as multiple response reference paths. Each response reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two response reference paths in the multiple response reference paths meets a predetermined condition.

[0014] An acknowledgment response is sent to the source node via the first acknowledgment reference path among the multiple acknowledgment reference paths;

[0015] In response to determining that sending the acknowledgment response to the source node via the first response reference path failed, a second response reference path that is different from the first response reference path is selected from the plurality of response reference paths;

[0016] The acknowledgment response is transmitted to the source node via the second acknowledgment reference path.

[0017] According to one aspect of this disclosure, an electronic device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the message transmission method as described above.

[0018] According to one aspect of this disclosure, a computer-readable storage medium is provided, the storage medium storing a computer program that, when executed by a processor, implements the message transmission method as described above.

[0019] According to one aspect of this disclosure, a computer program product is provided, the computer program product including a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the message transmission method as described above.

[0020] In this embodiment of the disclosure, the number of overlapping intermediate nodes between any two reference paths among multiple reference paths satisfies a predetermined condition. Fewer identical intermediate nodes between reference paths mean that if a fault occurs when transmitting a target packet using one reference path, it is highly likely that a fault will not occur using the other reference path, because the two have fewer identical intermediate nodes. Using the other reference path greatly increases the probability of bypassing the faulty switch. Therefore, the number of packet retransmissions and the time required for new path selection due to switch failures are reduced, thereby reducing packet transmission latency and improving the continuity of data flow during packet transmission.

[0021] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objectives and other advantages of this disclosure may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0022] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.

[0023] Figures 1A and 1B are system architecture diagrams of the message transmission methods applied according to various embodiments of the present disclosure;

[0024] Figure 2 is a schematic diagram of the topology of a data center network to which the message transmission method according to various embodiments of the present disclosure is applied;

[0025] Figure 3A is a flowchart of a message transmission method performed by a source node according to various embodiments of the present disclosure;

[0026] Figure 3B is another flowchart of a message transmission method performed by a source node according to various embodiments of the present disclosure;

[0027] Figure 4 is a schematic diagram of a target comparison table according to various embodiments of the present disclosure;

[0028] Figure 5 is a schematic diagram of the steps of multiple components within a source node performing a message transmission method according to various embodiments of the present disclosure;

[0029] Figure 6 is a schematic diagram of modifying the first path virtual port number of the target message to the second path virtual port number according to various embodiments of the present disclosure;

[0030] Figure 7 is a schematic diagram comparing the response time of message transmission methods according to various embodiments of the present disclosure and existing message transmission methods when facing intermediate node failures.

[0031] Figure 8 is a schematic diagram comparing the throughput of message transmission methods according to various embodiments of the present disclosure and existing message transmission methods when facing intermediate node failures.

[0032] Figure 9 is a flowchart of obtaining multiple baseline paths between a source node and a destination node according to various embodiments of the present disclosure;

[0033] Figure 10 is a schematic diagram of obtaining a set of candidate paths between a source node and a destination node according to various embodiments of the present disclosure;

[0034] Figure 11 is a schematic diagram of calculating the number of intermediate nodes in the candidate path set that overlap with the anchor path, other than the anchor path, according to various embodiments of the present disclosure.

[0035] Figure 12 is a flowchart of obtaining a set of candidate paths between a source node and a destination node according to various embodiments of the present disclosure;

[0036] Figure 13 is a flowchart of determining the third number according to various embodiments of the present disclosure;

[0037] Figure 14 is a flowchart of obtaining a target lookup table according to various embodiments of the present disclosure;

[0038] Figure 15 is a schematic diagram of storing a base path and a corresponding virtual port number of the path according to various embodiments of the present disclosure to generate a target lookup table.

[0039] Figure 16 is a flowchart of configuring hash algorithms and hash seeds according to various embodiments of the present disclosure;

[0040] Figure 17 is a schematic diagram of the configuration hash algorithm and hash seed according to various embodiments of the present disclosure;

[0041] Figure 18 is a flowchart of allocating a set of path virtual port numbers to a plurality of first outgoing ports of a source node according to various embodiments of the present disclosure, and allocating the set of path virtual port numbers to a plurality of second outgoing ports of an intermediate node layer for each intermediate node layer.

[0042] Figure 19 is a schematic diagram of the internal operations performed when an intermediate node identifies the second output port of a probe message according to various embodiments of the present disclosure;

[0043] Figure 20 is a schematic diagram of the first output port of the identification source node outputting the probe message to the access layer according to various embodiments of the present disclosure;

[0044] Figure 21 is a schematic diagram of identifying an intermediate node of the access layer outputting a probe message to the second output port of the access layer according to various embodiments of the present disclosure;

[0045] Figure 22 is a schematic diagram of the intermediate node of the identification convergence layer outputting a probe message to the second output port of the core layer according to various embodiments of the present disclosure;

[0046] Figure 23 is a schematic diagram of the intermediate node of the identification aggregation layer outputting a probe message to the second output port of the access layer according to various embodiments of the present disclosure;

[0047] Figure 24 is a flowchart of determining the path virtual port number corresponding to the base path according to various embodiments of the present disclosure;

[0048] Figure 25 is a schematic diagram of generating a set of virtual port numbers for a single-node path according to various embodiments of the present disclosure;

[0049] Figure 26 is a flowchart of determining the path virtual port number corresponding to the baseline path based on the path virtual port number assigned to the source node and intermediate nodes in the critical node layer on the baseline path, according to various embodiments of the present disclosure.

[0050] Figure 27 is a flowchart illustrating the failure to transmit a target message from the source node to the destination node according to various embodiments of the present disclosure;

[0051] Figure 28 is a flowchart of determining the first path virtual port number according to various embodiments of the present disclosure;

[0052] Figure 29 is a schematic diagram of determining the reference path pointed to by the current pointer in the reference path table according to various embodiments of the present disclosure;

[0053] Figure 30 is a flowchart of adding a first path virtual port number to a target message according to various embodiments of the present disclosure;

[0054] Figure 31 is a schematic diagram of adding a first path virtual port number to a target message according to various embodiments of the present disclosure;

[0055] Figure 32 is a flowchart of determining the reference path pointed to by the next pointer of the current pointer in the reference path table according to various embodiments of the present disclosure;

[0056] Figure 33 is a schematic diagram of incrementing the current pointer by 1 according to various embodiments of the present disclosure;

[0057] Figure 34 is a flowchart illustrating the process of determining that the transmission of the target message has failed if no acknowledgment response is received from the destination node within a preset first time according to various embodiments of the present disclosure.

[0058] Figure 35 is a schematic diagram of the transmission control protocol processing code of the source node according to various embodiments of the present disclosure;

[0059] Figure 36 is a flowchart of determining a second path virtual port number corresponding to a different reference path as described in various embodiments of the present disclosure;

[0060] Figure 37 is a flowchart of determining the virtual port number of the second path corresponding to the second reference path according to various embodiments of the present disclosure;

[0061] Figure 38 is a schematic diagram of the historical selection record of obtaining multiple alternative path virtual port numbers as the second path virtual port number according to various embodiments of the present disclosure;

[0062] Figure 39A is a flowchart of a message transmission method performed by a destination node according to various embodiments of the present disclosure;

[0063] Figure 39B is another flowchart of a message transmission method performed by a destination node according to various embodiments of the present disclosure;

[0064] Figure 40 is a flowchart illustrating the determination of failure to transmit an acknowledgment response from the destination node to the source node according to various embodiments of the present disclosure;

[0065] Figure 41 is a flowchart illustrating the determination of transmission acknowledgment failure if a fourth number of identical target messages are received from the source node according to various embodiments of the present disclosure.

[0066] Figure 42 is a flowchart of modifying a target message after receiving a target message sent by a source node according to various embodiments of the present disclosure;

[0067] Figure 43 is a schematic diagram of modifying the target message after receiving the target message sent by the source node according to various embodiments of the present disclosure;

[0068] Figure 44 is an implementation detail diagram of a message transmission method performed by a source node according to various embodiments of the present disclosure;

[0069] Figure 45A is a block diagram of a message transmission apparatus applied to the source node side according to various embodiments of the present disclosure;

[0070] Figure 45B is another block diagram of a message transmission apparatus applied to the source node side according to various embodiments of the present disclosure;

[0071] Figure 46A is a block diagram of a message transmission apparatus applied to the destination node side according to various embodiments of the present disclosure;

[0072] Figure 46B is another block diagram of a message transmission apparatus applied to the destination node side according to various embodiments of the present disclosure;

[0073] Figure 47 is a terminal structure diagram of performing a message transmission method according to various embodiments of the present disclosure;

[0074] Figure 48 is a server structure diagram of performing a message transmission method according to various embodiments of the present disclosure. Detailed Implementation

[0075] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.

[0076] Before providing a further detailed description of the embodiments of this disclosure, the terms and concepts used in these embodiments are explained, and they are subject to the following interpretations:

[0077] A message is a data unit exchanged and transmitted in a network; it is a block of data that a node sends at one time. Messages are also the unit of network transmission, and during transmission, they are continuously encapsulated into packets, frames, and groups for transmission. Encapsulation can be achieved by adding information segments, which are the data organized in a specific format within the message header. A message contains the complete data information to be sent, and its length varies considerably, being unlimited and variable.

[0078] The underlying physical network, composed of network devices such as switches and routers, and physical links (e.g., fiber optic cables), is responsible for transmitting data packets across the network. Based on traditional data center routing and switching equipment, the underlay network provides reliable network data transmission capabilities. In a data center environment, the underlay network guarantees routable reachability between any two points and incorporates traditional network technologies.

[0079] Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. To prevent packet loss, TCP assigns a sequence number to each byte, which also ensures that packets are received in the correct order from the source node to the destination node. The destination node then sends back an acknowledgment for each successfully received byte. If the source node does not receive an acknowledgment within a reasonable round-trip time, the corresponding data will be retransmitted. TCP uses a checksum function to verify data integrity; the checksum is calculated during both sending and receiving.

[0080] Protective ReRoute (PRR) is a TCP connection algorithm applied in IPv6 networks. PRR can be configured in the switch's routing hash algorithm to include the flow label field in the IPv6 header as part of the hash source. On the endpoint server, TCP timeout retransmission events can be detected by modifying the TCP stack code. Upon detecting a retransmission event, the IPv6 flow label field is modified. Because the flow label field participates in the switch's routing hash, modifying the flow label field changes the physical path of the TCP data stream in the network, potentially bypassing a faulty switch.

[0081] A data center network is a network infrastructure composed of network devices such as servers and switches. In a data center network, different servers can transmit messages through switches to achieve reliable message transmission. However, with a large number of switches operating for extended periods, some switches will inevitably fail, causing them to be unable to perform normal message forwarding.

[0082] Source node: The server that sends the message data.

[0083] Destination node: The server that receives message data.

[0084] Intermediate node: A network switching device on the message transmission path between the source node and the destination node.

[0085] Intermediate Node Layer: Different levels composed of multiple intermediate nodes are called intermediate node layers. For example, a typical three-layer network architecture in a data center includes: access layer, aggregation layer, and core layer.

[0086] The critical node layer refers to the intermediate node layer containing the intermediate nodes corresponding to the path virtual port numbers used when determining the path virtual port numbers corresponding to the baseline path. The critical node layer can include the uplink access layer and the downlink aggregation layer.

[0087] Outgoing port: refers to the exit point used by any node on the message transmission path when forwarding messages. An outgoing port is a physical port.

[0088] First outgoing port: This refers to the physical port used by the source node (server) to connect to the first intermediate node layer (such as an access layer switch). A source node can have multiple first outgoing ports to enable multipathing. This first outgoing port refers to the physical, server port.

[0089] The second outgoing port refers to the physical port of any intermediate node (such as a switch) between the source and destination nodes, connecting to the next network layer device (switch or server). The intermediate node can forward packets to the next hop in its path through this second outgoing port. This second outgoing port is a physical switch port.

[0090] Source port number: Used to identify the port used by the application of the source node server that initiates network communication, usually placed in the source port field of the TCP / UDP header.

[0091] Destination port number: Used to identify the port used by the application acting as the destination node server, in the destination port field of the TCP / UDP header.

[0092] Destination Port Number: This attribute identifies the destination node. This value can be a fixed value and participates in the hash calculation along with the "path virtual port number" to ensure that traffic destined for the same destination is evenly distributed.

[0093] Path Virtual Port Number: Used to uniquely identify a complete baseline path from a source node to a destination node; it can also be called a baseline path identifier. This path virtual port number enables end-to-end deterministic routing. When the source node sends a packet, it writes this path virtual port number into the "Source Port Number" field in the TCP header. Because this path virtual port number is placed in the "Source Port Number" field, it retains the name "port number." Each baseline path corresponds to one or more path virtual port numbers.

[0094] Path Virtual Port Number Set: This is a collection of all available path virtual port numbers in the system. The path virtual port numbers in this set can be consecutive positive integers, and their number can be determined based on the length of the source port field in the TCP / UDP header.

[0095] A base path is a pre-defined physical transmission channel from the source node to the destination node. The number of overlapping intermediate nodes between any two base paths satisfies a predetermined condition: the number of overlapping nodes between any two paths is no greater than N. A base path can consist of a series of physical outgoing ports through which a message travels from the source node to the destination node. A base path can also be called a virtual tunnel.

[0096] Target lookup table: also known as the baseline path-path virtual port number lookup table.

[0097] Currently, the most widely used network traffic availability enhancement schemes include Transmission Control Protocol (TCP) and Protective ReRoute (PRR). When transmitting packets via TCP, if the path of the transmitted packet encounters a switch failure, the source server will retransmit the packet through that path after a timeout. If the switch failure has not been resolved, the retransmitted packet will still be discarded. The source server will retransmit the packet multiple times until the maximum number of retransmissions is reached. If the packet is still not successfully retransmitted when the maximum number of retransmissions is reached, the source server will randomly select a new path and try to transmit the packet again; however, this new path may also pass through a failed switch. In contrast, when a switch failure occurs, the Protective ReRoute algorithm does not retransmit the packet repeatedly. Instead, during the first retransmission, it modifies the flow label field in the packet header and incorporates the flow label field into the hash process during switch addressing, thereby changing the actual path of the packet and potentially bypassing the failed switch. However, the re-selected path by both methods is random and cannot accurately bypass the faulty switch. There is a high probability that the faulty switch still cannot be bypassed after re-selection.

[0098] Based on this, embodiments of this disclosure provide a message transmission method, apparatus, electronic device, and medium. The message transmission method provided in these embodiments does not use the source port number of each hop in the path for routing; instead, it defines a unique virtual port number for the path and uses this virtual port number for routing. While the source port number of each hop in the path changes with each hop, the virtual port number, used to indicate the baseline path between the source node and the destination node, is unique throughout the entire path and possesses relative stability. These embodiments establish a target lookup table between virtual port numbers and baseline paths, wherein the number of overlapping intermediate nodes between any two baseline paths satisfies a predetermined condition. Fewer identical intermediate nodes between baseline paths mean that if a fault occurs when using one baseline path to transmit the target message, using another baseline path is unlikely to cause a fault because the two have fewer identical intermediate nodes, thus bypassing the faulty switch with a high probability. When a failure occurs during the transmission of a target packet via a reference path, this embodiment of the present disclosure identifies a first-path virtual port number unique to this embodiment within the target packet, searches a target lookup table, and replaces it with a second-path virtual port number corresponding to a different reference path than the first-path virtual port number. Since changing the path virtual port number effectively changes the reference path, and the reference path possesses the aforementioned characteristics, it greatly increases the probability of bypassing the faulty switch, thereby improving the continuity of data flow during packet transmission.

[0099] System architecture and scenario description applied in the embodiments of this disclosure

[0100] Figures 1A and 1B are system architecture diagrams applied to the message transmission method according to embodiments of the present disclosure. Figure 1A includes a terminal 140, an Internet 130, a gateway 120, a server 110, etc.

[0101] Terminal 140 can take various forms, including desktop computers, laptops, PDAs (personal digital assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. Terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data.

[0102] Server 110 refers to a computer system capable of providing certain services to terminal 140. Compared to ordinary terminal 140, server 110 has higher requirements in terms of stability, security, and performance. Server 110 can be a single high-performance computer in a network platform, a cluster of multiple high-performance computers, a portion of a single high-performance computer (e.g., a virtual machine), or a combination of portions of multiple high-performance computers (e.g., virtual machines). In a distributed system, multiple servers 110 are interconnected as computing and storage units to transmit data and coordinate task processing using shared communication lines.

[0103] Gateway 120, also known as an internetwork connector or protocol converter, is a computer system or device that acts as a translator, enabling network interconnection at the transport layer. It bridges the gap between two systems using different communication protocols, data formats, languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent from terminal 140 to server 110 are forwarded to the corresponding server 110 via gateway 120. Messages sent from server 110 to terminal 140 are also forwarded to the corresponding terminal 140 via gateway 120.

[0104] In the message transmission method of this embodiment, the source node and destination node are different servers 110. Referring to FIG1B, it is assumed that the source node is server 1 and the destination node is server 2. Server 1 is connected to server 2 via Internet 130, and server 1, server 2, and Internet 130 all communicate with the central controller. It is understood that each server in this embodiment includes a kernel router, a communication connection component, and a proxy component that communicates with the central controller. The proxy component is used to receive information transmitted by the central controller, and includes an event processing unit and a path switching unit. The communication connection component is used to manage all message data sent by the server, and includes an event detection unit and a path control unit. The units inside the communication connection component and the units inside the proxy component will be described one by one below:

[0105] The event detection unit is used to detect whether the server can receive the acknowledgment response corresponding to each sent message data in a timely manner. For example, in Figure 1B, the event detection unit of connection 1 inside server 1 is used to detect whether server 1 has received the acknowledgment response corresponding to the message data sent to server 2 within a predetermined reception time.

[0106] The event handling unit is used to notify the path switching unit to switch the transmission path of the message data in response to an event detected by the event detection unit. For example, if the event detection unit of connection 1 inside server 1 in FIG1B detects that server 1 has not received the acknowledgment response corresponding to the message data sent to server 2 within a predetermined reception time, the event handling unit will notify the path switching unit to switch the transmission path of the message data sent to server 2 in response to this event.

[0107] The path switching unit is used to re-determine the transmission path of message data based on the information transmitted by the main controller after receiving a notification from the event processing unit. After determining the transmission path (new transmission path), in order to transmit the message data according to the re-determined transmission path, the path switching unit sends the re-determined transmission path to the path control unit, so that the path control unit can modify the structure of the message data based on the re-determined transmission path, such as the content of each field in the message header.

[0108] The kernel routing inside the server is used to calculate the next-hop switch for the packet data based on the structure of the packet data, and then send the packet data to the server's next-hop switch.

[0109] This disclosure can be applied to the transmission of large model training data. Referring to Figure 2, which is a schematic diagram of the topology of a data center network to which the message transmission method according to an embodiment of this disclosure is applied. H0-H15 in Figure 2 can represent multiple servers in a computer room. These servers can connect to external applications, receive large model training data sent by external applications, and transmit it to other servers in the data center network.

[0110] Figure 2 shows a data center with three layers of switches: access layer, aggregation layer, and core layer. The access layer switches include LA16-LA31, the aggregation layer switches include LA0-LA15, and the core layer switches include LC0-LC7. Servers connect to the access layer switches. In mainstream data center networks, to increase communication bandwidth and connection reliability between servers, servers typically use two links connected to two switches in the access layer (i.e., each of the server's two network ports is connected to one of the two switches). For example, server H0 uses two links connected to access layer switches LA16 and LA17.

[0111] Furthermore, the network architecture of the data center in Figure 2 will be explained here in conjunction with the process of the server sending large model training data. In Figure 2, the first server, as the source node, can send the large model training data needed for pre-training a certain large model to the second server, which is the destination node. In this process, for example, the first server first sends the large model training data to the first switch of the access layer, which forwards the large model training data to the second switch of the aggregation layer, which then forwards it to the third switch of the core layer. After the core layer receives the large model training data forwarded by the second switch of the aggregation layer, it forwards the large model training data to the fourth switch of the aggregation layer, which then forwards it to the fifth switch of the access layer. Finally, the fifth switch of the access layer forwards the received large model training data to the second server, which is the destination node.

[0112] It is understandable that there are multiple transmission paths consisting of switches between the first server (source node) and the second server (destination node). For example, if server H1 (source node) needs to send large model training data to server H9 (destination node), there are multiple transmission paths. Here, we will explain the process of server H1 sending large model training data A to server H9 using one of these transmission paths. For instance, server H1 first sends the large model training data A to switch LA16 in the access layer. Switch LA16 forwards the large model training data A to switch LA1 in the aggregation layer, which then forwards it to switch LC2 in the core layer. Switch LC2 then forwards the large model training data A to switch LA9 in the aggregation layer, which in turn forwards it to switch LA24 in the access layer. Finally, switch LA24 forwards the large model training data A to server H9.

[0113] It should be understood that the above description only illustrates some application scenarios of this disclosure. The business scenarios to which this disclosure can be applied may include, but are not limited to, the specific embodiments described above.

[0114] General Description of Embodiments in this Disclosure

[0115] Some embodiments of this disclosure provide a message transmission method, apparatus, electronic device, and medium. The source node's server transmits target messages from external applications to the destination node's server to achieve reliable transmission at the sending layer.

[0116] The message transmission method can be applied to application scenarios such as application data transmission and large model training data transmission as shown in Figure 2.

[0117] Figure 3A is a flowchart of a message transmission method performed by a source node according to various embodiments of the present disclosure.

[0118] The message transmission method is executed by the source node, and the method includes:

[0119] Step 301: Select multiple message transmission paths between the source node and the destination node as multiple reference paths. Each reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two reference paths in the multiple reference paths meets a predetermined condition.

[0120] Step 302: Transmit the target message to the destination node through the first reference path among the multiple reference paths.

[0121] Step 303: In response to determining that the transmission of the target message to the destination node through the first reference path has failed, a second reference path different from the first reference path is selected from the plurality of reference paths.

[0122] Step 304: Transmit the target message to the destination node through the second reference path.

[0123] The step of transmitting the target packet to the destination node through the first reference path among the multiple reference paths may include: placing the routing source port number of the target packet into a reserved field of the target packet, wherein the reserved field is different from the routing source port number field of the target packet; adding a first identifier of the first reference path to the routing source port number field; the step of transmitting the target packet to the destination node through the second reference path may include: modifying the first identifier in the routing source port number field to a second identifier of the second reference path.

[0124] The method may further include: obtaining a target lookup table, the target lookup table indicating the correspondence between the plurality of base paths and a series of path virtual port numbers, each base path being identified by one or more path virtual port numbers. Selecting a second base path that is different from the first base path from the plurality of base paths includes: obtaining a first path virtual port number from the target message, the first path virtual port number identifying the first base path; determining a second path virtual port number that is different from the first path virtual port number from the target lookup table, the second path virtual port number identifying the second base path; and selecting the second base path based on the second path virtual port number. That is, the first path virtual port number is the first identifier, and the second path virtual port number is the second identifier.

[0125] The process of obtaining the target lookup table includes: determining a set of path virtual port numbers, the set of path virtual port numbers including the series of path virtual port numbers; assigning the set of path virtual port numbers to multiple first output ports of the source node, and assigning the set of path virtual port numbers to multiple second output ports of at least one intermediate node in each intermediate node layer; determining one or more path virtual port numbers identifying each base path based on the path virtual port numbers assigned to the source node and each intermediate node on each base path; and storing each base path and the one or more path virtual port numbers identifying each base path accordingly to generate the target lookup table.

[0126] The step of allocating the set of path virtual port numbers to multiple first output ports of the source node and allocating the set of path virtual port numbers to multiple second output ports of at least one intermediate node in each intermediate node layer includes: constructing a probe packet for each path virtual port number in the set of path virtual port numbers, the probe packet having the path virtual port number; sending the probe packet from the source node; identifying the first output port from which the source node outputs the probe packet and the second output port from each intermediate node layer, and allocating the path virtual port number to the first output port and the second output port.

[0127] The step of determining the one or more path virtual port numbers corresponding to each baseline path based on the path virtual port numbers assigned to the source node and each intermediate node on each baseline path includes: generating a set of single-node path virtual port numbers for each node among the source node and the multiple intermediate nodes based on the path virtual port numbers assigned to a first outgoing port of the source node and multiple second outgoing ports of the multiple intermediate nodes on each baseline path; taking the intersection of the set of single-node path virtual port numbers corresponding to the source node and each intermediate node, and using at least one path virtual port number in the intersection as the one or more path virtual port numbers corresponding to the baseline path.

[0128] Assigning multiple second outgoing ports to the at least one intermediate node in each intermediate node layer includes: identifying at least one critical node layer from each intermediate node layer; assigning the set of path virtual port numbers to the second outgoing ports of each critical node layer; determining the one or more path virtual port numbers identifying each baseline path based on the path virtual port numbers assigned to the source node and each intermediate node on each baseline path includes: determining the one or more path virtual port numbers corresponding to the baseline path based on a first outgoing port of the source node on each baseline path and the path virtual port numbers assigned to the second outgoing ports of the intermediate nodes in the critical node layer.

[0129] Selecting the multiple reference paths includes: obtaining a set of candidate paths between the source node and the destination node, the set of candidate paths containing a first number of candidate paths, the multiple reference paths containing a second number of reference paths, the first number being greater than the second number, and each candidate path being a message transmission path; taking turns using each candidate path in the set of candidate paths as anchor paths, and for each anchor path, performing the following steps: calculating the number of intermediate nodes that overlap with each second candidate path other than the anchor path in the set of candidate paths, where the anchor path is a first candidate path; if the number of intermediate nodes that overlap with the anchor path of a certain second candidate path is greater than a third number, determining that the second candidate path should be removed from the set of candidate paths; after each candidate path has been used as the anchor path and the above steps have been performed, using the remaining candidate paths in the set of candidate paths as the multiple reference paths, where the remaining candidate paths are the candidate paths after removing the second candidate path determined to be removed from the set of candidate paths.

[0130] The step of obtaining the candidate path set between the source node and the destination node includes: determining a first route number from the source node to at least one intermediate node in the first intermediate node layer based on the total number of first outgoing ports of the source node; determining a second route number from each intermediate node to an intermediate node in the next intermediate node layer based on the total number of second outgoing ports of each intermediate node in the plurality of intermediate node layers; generating a routing topology map between the source node and the destination node based on the first route number and the second route number corresponding to each intermediate node layer; and obtaining a plurality of candidate paths between the source node and the destination node on the routing topology map to generate the candidate path set.

[0131] The third number can be determined by: determining the total number of first output ports of the source node; determining the total number of second output ports of each intermediate node in each intermediate node layer; determining the maximum and minimum values ​​of the total number of first output ports and the total number of second output ports corresponding to each intermediate node layer; and calculating the difference between the maximum and minimum values ​​as the third number.

[0132] The step of determining that the transmission of the target message to the destination node via the first reference path has failed includes: transmitting the target message from the source node to the destination node via the first reference path; and determining that the transmission of the target message has failed if no acknowledgment response is received from the destination node within a preset first time period.

[0133] The message transmission method further includes: obtaining the current pointer corresponding to the destination node, wherein the current pointer refers to the position of the reference path applicable to the target message transmitted from the current source node to the destination node in the reference path table; determining the first reference path pointed to by the current pointer in the reference path table; and searching for the path virtual port number corresponding to the first reference path in the target lookup table, and using it as the first path virtual port number.

[0134] The message transmission method further includes: incrementing the current pointer by 1, so that when transmitting other messages after the target message from the source node to the destination node, the reference path pointed to by the next pointer of the current pointer is determined in the reference path table.

[0135] The step of determining that the transmission of the target message has failed if no acknowledgment response is received from the destination node within a preset first time period may include: inserting first detection logic into the transmission control protocol processing code of the source node; enabling the first detection logic to detect that no acknowledgment response is received from the destination node within a preset first time period, thereby determining that the transmission of the target message has failed.

[0136] The step of determining a second path virtual port number that is different from the first path virtual port number in the target lookup table includes: determining the first base path corresponding to the first path virtual port number in the target lookup table; determining the second base path located after the first base path in the base path table; and determining the second path virtual port number corresponding to the second base path in the target lookup table.

[0137] The step of determining the second path virtual port number corresponding to the second baseline path in the target lookup table includes: determining multiple alternative path virtual port numbers corresponding to the second baseline path in the target lookup table; obtaining records of the multiple alternative path virtual port numbers being selected in the baseline path switching that has occurred; and determining the second path virtual port number from the multiple alternative path virtual port numbers based on the number of times each of the multiple alternative path virtual port numbers has been selected in the records.

[0138] For a detailed description of the features in each step of Figure 3A above, please refer to the description of similar or corresponding features in other figures in other embodiments.

[0139] As shown in Figure 3B, the message transmission method according to an embodiment of this disclosure is executed by the source node. The source node sends the target message to the destination node through multiple intermediate node layers. The message transmission method includes the following steps.

[0140] Step 310: Obtain multiple reference paths between the source node and the destination node. Each reference path passes through at least one intermediate node at each intermediate node layer. The number of overlapping intermediate nodes between any two reference paths satisfies a predetermined condition. The multiple reference paths are selected from multiple message transmission paths between the source node and the destination node.

[0141] Step 320: Obtain the target lookup table. This table indicates the correspondence between base paths and path virtual port numbers. A path virtual port number is a virtual port number added to the target packet when the source node sends it. Each base path corresponds to one or more path virtual port numbers. For example, the correspondence between base paths and path virtual port numbers may be a correspondence between multiple base paths and a series of path virtual port numbers. Each base path is identified by one or more path virtual port numbers.

[0142] Step 330: In response to determining that the transmission of the target packet from the source node to the destination node failed, obtain the first path virtual port number from the target packet. The first path virtual port number identifies the first base path.

[0143] Step 340: In the target lookup table, determine the second path virtual port number, which corresponds to a different base path than the first path virtual port number. The second path virtual port number identifies the second base path.

[0144] Step 350: Modify the first path virtual port number in the target packet to the second path virtual port number so that the target packet reaches the destination node along the base path corresponding to the second path virtual port number.

[0145] Step 310 described above may correspond to step 301 in Figure 3A. Step 320 described above may be included outside the steps in Figure 3A. Steps 330 and 340 described above may be included in step 303 in Figure 3A, and step 350 may be included in step 304.

[0146] The following is a brief description of steps 310-350 above.

[0147] In step 310, multiple reference paths between the source node and the destination node are obtained. Each reference path passes through at least one intermediate node at each intermediate node level. The number of intermediate nodes that overlap between any two reference paths among the multiple reference paths satisfies a predetermined condition.

[0148] The source node can be a server that sends message data, and the destination node can be a server that receives message data. For a single message, the source node and the destination node are two different servers. The destination message refers to the message data that the source node will send to the destination node, and can be simply referred to as a message. When the source node sends the destination message to the destination node, it can pass through multiple intermediate node layers. Intermediate nodes can be switches, which are used to forward destination messages, and an intermediate node layer refers to a hierarchy composed of multiple intermediate nodes. For example, referring to Figure 2, in a data center network, the intermediate node layer can be the access layer connected to the server, which provides network connectivity to the server. The intermediate node layer can also be the aggregation layer connected to the access layer, which acts as the aggregation point for the intermediate nodes of the access layer and is responsible for handling all traffic from the intermediate nodes of the access layer. The intermediate node layer can also be the core layer connected to the aggregation layer, which is used for communication traffic control, forwarding, and routing throughout the data center network.

[0149] It is understood that multiple base paths, selected from multiple message transmission paths, exist between the source node and the destination node. Each base path traverses at least one and at most two intermediate nodes at each intermediate node layer, and the number of overlapping intermediate nodes between any two base paths satisfies a predetermined condition. The number of overlapping intermediate nodes between two base paths refers to the number of identical intermediate nodes traversed by both base paths. This predetermined condition can be determined based on the actual transmission situation. If the data center network has few intermediate nodes, the number of selectable intermediate nodes for forwarding the target message is also relatively small, allowing for a larger predetermined condition. Conversely, if the data center network has many intermediate nodes, the number of selectable intermediate nodes for forwarding the target message is also relatively large, allowing for a smaller predetermined condition.

[0150] For example, the baseline paths are illustrated here with reference to Figure 4: In Figure 4, the source node is server H0 from Figure 2, and the destination node is server H4 from Figure 2. Multiple baseline paths exist between H0 and H4, including baseline path 1, baseline path 2, baseline path 3, and baseline path 4. Taking baseline path 1 and baseline path 2 as examples, the intermediate nodes traversed by baseline path 1 are LA16, LA0, LC0 / LC1 (which can be either LC0 or LC1), LA4, and LA20. The intermediate nodes traversed by baseline path 2 are LA16, LA1, LC2 / LC3 (which can be either LC2 or LC3), LA5, and LA20. LA16 and LA20 belong to the access layer, LA0, LA1, LA4, and LA5 belong to the aggregation layer, and LC0-1 and LC2-3 belong to the core layer. It can be seen that the number of overlapping intermediate nodes between baseline path 1 and baseline path 2 is 2. If the predetermined condition is that the number of overlapping intermediate nodes between any two of the multiple baseline paths shall not exceed 3, then baseline path 1 and baseline path 2 satisfy the predetermined condition.

[0151] In step 320, a target lookup table is obtained. The target lookup table indicates the correspondence between the base path and the path virtual port number. The path virtual port number is the virtual port number added to the target message when the source node sends the target message. Each base path corresponds to one or more path virtual port numbers.

[0152] According to embodiments of this disclosure, the path virtual port number is a virtual port number added to the target packet when the source node sends the target packet. The path virtual port number can indicate the next hop of the target packet for either the source node or an intermediate node. That is, when an intermediate node receives a target packet, it can determine the next-hop intermediate node or the next-hop server based on the virtual port number in the target packet. Alternatively, the path virtual port number can be understood as an identifier of the baseline path from the source node to the destination node, with each baseline path corresponding to one or more path virtual port numbers. When indicating the next hop of a target packet, the path virtual port number, together with other fields in the target packet, can be used through a pre-configured, consistent hash calculation to indicate the next hop for both the source node and intermediate nodes.

[0153] For example, referring to Figure 4, as described above, there are multiple reference paths between H0 and H4, including reference path 1, reference path 2, reference path 3, and reference path 4. In the target lookup table maintained by the source node H0, the virtual port numbers corresponding to reference path 1 are 1 and 2, the virtual port numbers corresponding to reference path 2 are 3 and 4, the virtual port numbers corresponding to reference path 3 are 5 and 6, and the virtual port numbers corresponding to reference path 4 are 7 and 8. It can be seen that if the target message sent by H0 reaches H4 via reference path 1, then the virtual port number added by H0 in the target message can be either 1 or 2.

[0154] In step 330, in response to determining that the transmission of the target message from the source node to the destination node has failed, the first path virtual port number in the target message is obtained.

[0155] According to various embodiments of this disclosure, the first path virtual port number refers to the path virtual port number added in the target packet that the source node failed to transmit to the destination node. Since the source node can use the base path corresponding to the first path virtual port number to transmit the target packet for the first time, but fails, it obtains the first path virtual port number from the target packet. Therefore, the first path virtual port number can also refer to the path virtual port number used by the source node when it first attempts to transmit the target packet. If the source node fails to transmit the target packet to the destination node, it indicates that there is a faulty intermediate node in the base path for transmitting the target packet. The faulty intermediate node cannot forward the target packet to the next-hop intermediate node, resulting in the destination node being unable to receive the target packet and unable to send the corresponding acknowledgment to the source node.

[0156] As described above, the source node can first determine which base path is used to transmit the target message. The process by which the source node determines the base path for transmitting the target message is explained here. As shown in Figure 5, after the communication connection component of the source node determines that the source node has failed to transmit the target message to the destination, it will notify the event handling unit. This allows the event handling unit to respond to the failure and notify the path switching unit to switch the base path promptly. Switching the base path first involves determining which base path of the faulty intermediate node is being used. Based on this, the path switching unit can obtain the first path virtual port number from the target message and look it up in the target lookup table to determine the base path of the faulty intermediate node.

[0157] In step 340, in the target lookup table, a second path virtual port number is determined that corresponds to a different base path than the first path virtual port number.

[0158] According to various embodiments of this disclosure, the second path virtual port number refers to the path virtual port number corresponding to a base path (or second base path) that is different from the base path (or first base path) identified by the first path virtual port number. For example, referring to FIG4, if the first path virtual port number added to the target packet by the source node during the first transmission of the target packet is 1, and the source node fails to transmit the target packet to the destination node for the first time, the source node searches in the target lookup table based on the first path virtual port number and determines that the base path of the faulty intermediate node is base path 1. When rerouting the target packet, the path virtual port number corresponding to base path 2 can be determined as the second path virtual port number. That is, path virtual port number 3 or path virtual port number 4 can be determined as the second path virtual port number.

[0159] In step 350, the first path virtual port number in the target message is modified to the second path virtual port number so that the target message can be transmitted to the destination node through the base path corresponding to the second path virtual port number.

[0160] According to an embodiment of this disclosure, referring to FIG6, after determining the second path virtual port number, the reference path used to transmit the target message can be switched by modifying the first path virtual port number in the target message to the second path virtual port number, so that the target message reaches the destination node according to the reference path corresponding to the second path virtual port number.

[0161] It is understandable that, since the number of overlapping intermediate nodes between the base path corresponding to the second path virtual port number and the base path corresponding to the first path virtual port number is small, when transmitting the target packet according to the base path corresponding to the second path virtual port number, the base path corresponding to the second path virtual port number is unlikely to pass through the faulty intermediate node, thereby achieving the purpose of allowing the target packet to avoid the faulty intermediate node as much as possible and improving the continuity of data flow in packet transmission.

[0162] Referring to Figure 7, the results of testing the original Transmission Control Protocol (TCP), the protective rerouting algorithm, and the message transmission method of this disclosure are described. As shown in Figure 7, when an intermediate node fails at second 0, the source node following the original or conventional TCP will retransmit the message through the failed path after the timeout period, and then perform multiple retransmissions until the maximum number of retransmissions is reached at second 20. Only then will the source node randomly select a new path. During the period from second 0 to second 20, the data center network will experience a prolonged data flow interruption due to the message transmission failure. At second 21, the source node will randomly select the first path. However, this newly selected path may also pass through a failed intermediate node, leading to rerouting failure and resulting in prolonged service unavailability. Even though the protective rerouting algorithm can change the path of the transmitted packet by modifying the flow label field in the packet header during the first retransmission, the path switched by the protective rerouting algorithm still has a high probability of passing through a faulty intermediate node. This may result in the first rerouting failure after 200 milliseconds, the second rerouting failure after 600 milliseconds, until the Kth retransmission when the transmitted packet successfully bypasses the faulty intermediate node. This can also lead to prolonged service unavailability. In contrast, the embodiments of this disclosure can respond to the failure of the source node to transmit the target packet to the destination node within 10 milliseconds by modifying the first path virtual port number in the target packet to the second path virtual port number, so that the target packet avoids the faulty intermediate node as much as possible. In this case, even if the upper layer (e.g., the application or service) experiences short periods of packet loss and no response, the source node can restore the data flow after the first timeout retransmission. In this situation, the upper layer service will not perceive the data flow interruption, nor will it experience service unavailability. Referring to Figure 8, from a throughput perspective, when an intermediate node fails at the 10th second, the throughput of the original Transmission Control Protocol (TCP) will experience a prolonged decrease, only recovering at the 40th second. However, in the embodiments of this disclosure, although the throughput decreases after an intermediate node fails, it recovers quickly. Based on this, it can be determined that, compared to the original TCP and the protective rerouting algorithm, the embodiments of this disclosure can improve the continuity of data flow during message transmission.

[0163] In the embodiments of steps 310 to 350 above, routing is not performed using the source port number of each hop in the path. Instead, a unique path virtual port number is defined in the path, and routing is performed using the path virtual port number. The source port number of each hop in the path changes with each hop, but the path virtual port number, used to indicate the reference path between the source node and the destination node, is unique throughout the entire path and has relative stability. That is, for a target packet being transmitted, the "path virtual port number" carried in its header remains unchanged throughout the entire transmission path. This disclosure establishes a target lookup table between path virtual port numbers and reference paths, wherein the number of overlapping intermediate nodes between any two reference paths among multiple reference paths meets a predetermined condition. Fewer identical intermediate nodes between the various reference paths mean that if a failure occurs when a target packet is transmitted using one reference path, it is very likely that a failure will not occur when using another reference path, because there are fewer identical intermediate nodes between the two, and using another reference path greatly avoids the failure of the switch. When a failure occurs during the transmission of a target packet via a reference path, this embodiment of the present disclosure identifies a first-path virtual port number unique to this embodiment within the target packet, searches a target lookup table, and replaces it with a second-path virtual port number corresponding to a different reference path than the first-path virtual port number. Since changing the path virtual port number effectively changes the reference path, and the reference path possesses the aforementioned characteristics, it greatly increases the probability of bypassing the faulty switch, reducing the number of packet retransmissions and the time required for new path selection due to switch failure. This reduces packet transmission latency and improves the continuity of the data flow during packet transmission.

[0164] The above is a general description of steps 310 to 350. Since step 350 has been described in sufficient detail above, the specific implementation process of steps 310 to 340 will be described in detail below.

[0165] Detailed description of step 310

[0166] Step 310: Obtain multiple reference paths between the source node and the destination node. Each reference path passes through at least one intermediate node at each intermediate node level. The number of intermediate nodes that overlap between any two reference paths among the multiple reference paths satisfies a predetermined condition.

[0167] For example, referring to Figure 9, step 310 includes:

[0168] Step 910: Obtain a set of candidate paths between the source node and the destination node. The set of candidate paths contains a first number of candidate paths, and multiple baseline paths contain a second number of baseline paths. The first number is greater than the second number. Each candidate path is a message transmission path.

[0169] Step 920: Use each candidate path in the candidate path set as an anchor path in turn, and for each anchor path, perform the following steps 930-940:

[0170] Step 930: Calculate the number of intermediate nodes in the candidate path set that overlap with the anchor path for each second candidate path other than the anchor path, where the anchor path is the first candidate path;

[0171] Step 940: If the number of intermediate nodes that overlap with the anchor path in a second candidate path is greater than the third number, determine to remove the second candidate path from the candidate path set.

[0172] Step 950: After all candidate paths have been used as anchor paths and steps 930 and 940 above have been executed, the remaining candidate paths in the candidate path set are used as multiple baseline paths. The remaining candidate paths are the candidate paths after removing the second candidate path determined to be removed from the candidate path set.

[0173] Steps 910 to 950 are described in detail below.

[0174] In step 910, a set of candidate paths between the source node and the destination node is obtained. The set of candidate paths contains a first number of candidate paths, and multiple baseline paths contain a second number of baseline paths. The first number is greater than the second number.

[0175] According to embodiments of this disclosure, a candidate path can be any transmission path between a source node and a destination node, and the candidate path also passes through at least one intermediate node at each intermediate node layer. However, the number of overlapping intermediate nodes between any two candidate paths does not need to meet a predetermined condition. The candidate path set contains a first number of candidate paths, where the first number refers to the total number of candidate paths between the source node and the destination node. For example, referring to FIG10, if the source node is server H2 and the destination node is server H7, the candidate path set contains all candidate paths between H2 and H7.

[0176] It is understandable that the candidate path set includes the baseline path, and the second number is the number of baseline paths in the candidate path set, and the second number is less than the first number. In other words, a baseline path is always a candidate path, but a candidate path is not necessarily a baseline path.

[0177] The specific method for "obtaining the set of candidate paths between the source node and the destination node" will be described in detail below.

[0178] In step 920, each candidate path in the candidate path set is used as an anchor path in turn.

[0179] An anchor path can be understood as a candidate path used for reference. To select a baseline path from the set of candidate paths, the number of overlapping intermediate nodes between any two candidate paths can be calculated. Based on this, to traverse the set of candidate paths, each candidate path in the set can be used as an anchor path in turn to calculate the number of overlapping intermediate nodes between the anchor path and the candidate paths excluding the anchor path.

[0180] For example, if there exists a set of candidate paths between a source node and a destination node, including candidate path 1, candidate path 2, candidate path 3, and candidate path 4, candidate path 1 can be used as the anchor path first, then candidate path 2 as the anchor path, then candidate path 3 as the anchor path, and finally candidate path 4 as the anchor path.

[0181] For each anchor path, in step 930, the number of intermediate nodes that overlap with the anchor path in each of the second candidate paths other than the anchor path in the candidate path set is calculated, and the anchor path is the first candidate path.

[0182] It is understandable that, in order to traverse the number of intermediate nodes that overlap between any two candidate paths in the candidate path set, for each anchor path, we can calculate the number of intermediate nodes that overlap between the anchor path and other candidate paths in the candidate path set.

[0183] For example, referring to FIG10, as described above, the candidate path set includes all candidate paths between H2 and H7. Among them, candidate path 1 is H2-LA18-LA0-LC0-LA4-LA22-H7, candidate path 2 is H2-LA18-LA1-LC2-LA5-LA22-H7, candidate path 3 is H2-LA18-LA0-LC1-LA4-LA23-H7, candidate path 4 is H2-LA19-LA2-LC4-LA6-LA23-H7, and candidate path 5 is H2-LA19-LA3-LC6-LA7-LA23-H7. As shown in Figure 11, if candidate path 1 in the candidate path set is taken as the anchor path, we can find that the number of overlapping intermediate nodes between candidate path 1 and candidate path 2 is 2, the number of overlapping intermediate nodes between candidate path 1 and candidate path 3 is 3, the number of overlapping intermediate nodes between candidate path 1 and candidate path 4 is 0, and the number of overlapping intermediate nodes between candidate path 1 and candidate path 5 is 0.

[0184] For each anchor path, in step 940, if the number of intermediate nodes overlapping with the anchor path in a second candidate path is greater than the third number, then the second candidate path is removed from the candidate path set. (For example, the second candidate path can be marked as to be removed.)

[0185] The third number refers to, for example, the number of overlapping intermediate nodes between any two baseline paths allowed by predetermined conditions. If the number of overlapping intermediate nodes is greater than the third number, it indicates that there are many overlapping intermediate nodes between the second candidate path and the anchor path. If a faulty intermediate node occurs in the anchor path, it is highly likely that the same faulty intermediate node will also exist in the second candidate path. Switching the transmission path of the target message from the anchor path to this second candidate path will likely still result in the target message transmission failure. To mitigate this risk, the second candidate path can be removed from the candidate path set.

[0186] For example, referring to FIG11, as described above, the number of overlapping intermediate nodes between candidate path 1 and candidate path 2 is 2, and the number of overlapping intermediate nodes between candidate path 1 and candidate path 3 is 3. If the third number is 2, then candidate path 3 can be removed from the candidate path set.

[0187] The specific method for determining the third number will be described in detail below.

[0188] In step 950, after all candidate paths have been used as anchor paths, the remaining candidate paths in the candidate path set are used as multiple baseline paths. In this step, if a candidate path is used as an anchor path in turn, but it has already been marked for removal from the candidate path set or has already been removed when other candidate paths were used as anchor paths, then that candidate path can be skipped.

[0189] According to embodiments of this disclosure, after each candidate path has been used as an anchor path, it is stated that one or more second candidate paths with more than a third number of intermediate nodes overlapping with the anchor path have been removed from the candidate path set. That is, at this point, there are no two candidate paths in the candidate path set with more than a third number of overlapping intermediate nodes. Based on this, the candidate paths in the current candidate path set have met the requirements of a baseline path, and the remaining candidate paths in the candidate path set can be used as multiple baseline paths.

[0190] The embodiments of steps 910 to 950 described above can calculate the number of intermediate nodes that overlap with the anchor path in each candidate path other than the anchor path in the candidate path set, and remove candidate paths with more than a third number of overlapping intermediate nodes from the candidate path set, thus reducing the number of identical intermediate nodes between candidate paths in the candidate path set. By using the remaining candidate paths in the candidate path set as multiple reference paths, the reference path re-determined for the target message when the source node fails to transmit the target message to the destination node is more likely to bypass the failed intermediate node, improving the continuity of data flow during message transmission.

[0191] Referring to Figure 12, step 910 includes, for example, the following steps.

[0192] Step 1210: Based on the total number of the first outgoing ports of the source node, determine the first route number from the source node to the intermediate node of the first intermediate node layer.

[0193] Step 1220: Based on the total number of second outgoing ports of a single intermediate node in the intermediate node layer, determine the second route number from a single intermediate node to the intermediate node in the next intermediate node layer.

[0194] Step 1230: Based on the first number of routes and the second number of routes corresponding to each intermediate node layer, generate a routing topology map between the source node and the destination node.

[0195] Step 1240: On the routing topology graph, obtain multiple candidate paths between the source node and the destination node to generate a candidate path set.

[0196] In addition to or within steps 1210-1240 described above, the following steps may be included.

[0197] Step 1210 may also include determining multiple first routes from the source node to multiple intermediate nodes in the first intermediate node layer based on multiple first outgoing ports of the source node.

[0198] Step 1220 may include, for example, step 1221, determining one or more second outgoing ports of each intermediate node (e.g., the j-th intermediate node, j from 1 to k, k being the total number of intermediate node layers) of the i-th intermediate node layer (i from 1 to N-1, where N is the total number of intermediate node layers), and determining one or more second routes from the intermediate node j to the intermediate node of the (i+1)-th intermediate node layer.

[0199] Step 1230 may include generating a routing topology map between the source node and the destination node based on multiple first routes and multiple second routes corresponding to each intermediate node layer.

[0200] Steps 1210 and 1240 are described in detail below.

[0201] In step 1210, the first number of routes from the source node to the intermediate node of the first intermediate node layer is determined based on the total number of the first outgoing ports of the source node.

[0202] According to embodiments of this disclosure, the first outgoing port refers to the port connecting the source node and the intermediate node next hop of the source node; that is, the source node is connected to the intermediate node next hop of the source node through the first outgoing port. The total number of first outgoing ports refers to the number of first outgoing ports of the source node. The intermediate node next hop of the source node is the intermediate node connected to the source node in the first intermediate node layer. The first route number refers to the number of intermediate nodes connected to the source node in the first intermediate node layer.

[0203] It is understandable that since the source node is connected to the intermediate node of the next hop through the first outgoing port, the total number of the first outgoing ports can be determined as the first route number. For example, referring to Figure 2, if the source node is server H0, H0 is connected to intermediate node LA16 through the first outgoing port A and to intermediate node LA17 through the first outgoing port B. The total number of the first outgoing ports of H0 is 2. Based on the total number of the first outgoing ports of H0, the first route number from H0 to the intermediate node in the access layer can be determined to be 2.

[0204] In step 1220, the second number of routes from a single intermediate node to the intermediate node in the next intermediate node layer is determined based on the total number of second outgoing ports of a single intermediate node in the intermediate node layer.

[0205] The second outgoing port refers to the port connecting an intermediate node in the intermediate node layer to its next-hop intermediate node / destination node (because the next hop of an intermediate node could be an intermediate node in another intermediate node layer, or it could be a destination node in the server layer). For example, the first intermediate node connects to the second intermediate node / destination node of its next hop through the second outgoing port. The total number of second outgoing ports refers to the number of second outgoing ports of an intermediate node. The next-hop intermediate node / destination node of an intermediate node is the intermediate node / destination node connected to the intermediate node in the next intermediate node layer / server layer. The second route count refers to the number of intermediate nodes / destination nodes connected to the intermediate node in the next intermediate node layer / server layer.

[0206] It is understandable that since intermediate nodes are connected to their next-hop intermediate / destination nodes via their second outgoing ports, the total number of second outgoing ports can be determined as the second route count. For example, referring to Figure 2, if the intermediate node is LA16 in the access layer, LA16 is connected to intermediate node LA0 via second outgoing port A, to intermediate node LA1 via second outgoing port B, to intermediate node LA2 via second outgoing port C, and to intermediate node LA3 via second outgoing port D. The total number of second outgoing ports for LA16 is 4. Based on this total number of second outgoing ports for LA16, the second route count from LA16 to the intermediate nodes in the aggregation layer can be determined to be 4.

[0207] For example, in step 1220, based on the total number of second outgoing ports of the j-th intermediate node (j from 1 to k, k being the total number of intermediate node layers) in the i-th intermediate node layer (i from 1 to N-1, where N is the total number of intermediate node layers), the second route number from the j-th intermediate node to the intermediate node in the (i+1)-th intermediate node layer can be determined. This step is repeated for each intermediate node layer to determine the route number to the next intermediate node layer.

[0208] In step 1230, a routing topology map between the source node and the destination node is generated based on the first number of routes and the second number of routes corresponding to each intermediate node layer.

[0209] According to embodiments of this disclosure, a routing topology diagram refers to the physical layout of connections between source nodes and destination nodes. The routing topology diagram illustrates the physical connections between source nodes and destination nodes, as well as the data flow path.

[0210] It is understandable that the first routing count can be used to obtain the intermediate node that is the next hop from the source node, and the second routing count can be used to obtain the intermediate node / destination node that is the next hop from each individual intermediate node in each intermediate node layer. Therefore, based on the first routing count and the second routing count corresponding to each intermediate node layer, a complete routing topology map from the source node to the destination node can be generated.

[0211] For example, if the source node is server H0 and the destination node is server H4, the first route count for H0 is 2. In the access layer of the next hop from the source node, the second route count for intermediate node LA16 is 2, and the second route count for intermediate node LA17 is 2. In the aggregation layer of the next hop from the access layer, the second route count for intermediate node LA0 is 2, and the second route count for intermediate node LA1 is 2. In the core layer of the next hop from the aggregation layer, the second route count for intermediate node LC0-1 is 1, and the second route count for intermediate node LC2-3 is 1. In the aggregation layer of the next hop from the core layer, the second route count for intermediate node LA4 is 1, the second route count for intermediate node LA5 is 1, the second route count for intermediate node LA6 is 1, and the second route count for intermediate node LA7 is 1. In the access layer of the next hop from the aggregation layer, the second route count for intermediate node LA20 is 1, and the second route count for intermediate node LA21 is 1. Based on this, a routing topology diagram as shown in Figure 4 can be generated.

[0212] In step 1240, multiple candidate paths between the source node and the destination node are obtained on the routing topology graph to generate a candidate path set.

[0213] According to embodiments of this disclosure, a routing topology diagram can be used to visualize all candidate paths between a source node and a destination node, presenting the routing and forwarding relationships. Based on this, all candidate paths between the source node and the destination node can be clearly obtained on the routing topology diagram, thereby constructing a candidate path set.

[0214] The embodiments of steps 1210 to 1240 described above can generate a routing topology map between the source node and the destination node based on the first number of routes and the second number of routes corresponding to each intermediate node layer. The routing topology map presents the routing and forwarding relationships between the source node and the destination node. Based on the routing topology map, the physical connection between the source node and the destination node can be clearly known, thereby quickly determining all candidate paths between the source node and the destination node.

[0215] Referring to Figure 13, the third number in step 940 is determined in the following manner.

[0216] Step 1310: Determine the total number of first output ports of the source node.

[0217] Step 1320: Determine the total number of second output ports for each individual intermediate node in each intermediate node layer. This step can be performed on each intermediate node in each intermediate node layer.

[0218] Step 1330: Determine the total number of first output ports and the maximum and minimum values ​​of the total number of second output ports corresponding to each intermediate node layer.

[0219] Step 1340: Calculate the difference between the maximum and minimum values, and use it as the third number.

[0220] Steps 1310 and 1340 are described in detail below.

[0221] In step 1310, the total number of first output ports of the source node is determined.

[0222] It's understandable that the total number of first outgoing ports for the source node can be determined by referring to the server's default ports. Alternatively, the total number of first outgoing ports for the source node can be determined by customizing the source node's port. Another approach is to determine the total number of first outgoing ports by referring to the intermediate nodes of the next hop in the routing topology diagram.

[0223] In step 1320, the total number of second output ports of a single intermediate node in each intermediate node layer is determined.

[0224] It is understandable that the total number of the second outgoing ports of an intermediate node can be determined by its LAN address, virtual LAN configuration, or the next-hop intermediate / destination node in the routing topology.

[0225] In step 1330, the maximum and minimum values ​​of the total number of first output ports and the total number of second output ports corresponding to each intermediate node layer are determined.

[0226] According to embodiments of this disclosure, the total number of first outgoing ports reflects the number of intermediate nodes in the next hop of the source node. Since there is only one source node, there is only one total number of first outgoing ports. The total number of second outgoing ports corresponding to a certain intermediate node in each intermediate node layer reflects the number of intermediate / destination nodes in the next hop of that intermediate node. Because there are multiple intermediate nodes between the source node and the destination node, there are multiple total numbers of second outgoing ports. The intermediate node layer containing the intermediate node in the next hop of the intermediate node with the largest total number of second outgoing ports is the intermediate node layer with the most intermediate nodes among all intermediate node layers between the source node and the destination node. That is, in this intermediate node layer, there are more selectable intermediate nodes, and the probability of overlapping selected intermediate nodes is small. The intermediate node layer containing the intermediate node in the next hop of the intermediate node with the smallest total number of second outgoing ports is the intermediate node layer with the fewest intermediate nodes among all intermediate node layers between the source node and the destination node. That is, in this intermediate node layer, there are fewer selectable intermediate nodes, and the probability of overlapping selected intermediate nodes is large.

[0227] In step 1340, the difference between the maximum and minimum values ​​is calculated as the third number.

[0228] According to embodiments of this disclosure, the difference between the maximum and minimum values ​​indicates the difference between the number of intermediate nodes in the intermediate node layer with the most intermediate nodes and the number of intermediate nodes in the intermediate node layer with the fewest intermediate nodes. Because the more complex and larger the data center network, the larger the difference between the maximum and minimum values, and similarly, the simpler and smaller the data center network, the smaller the difference between the maximum and minimum values. By using the difference between the maximum and minimum values ​​as a third number, the third number can be applied to different application scenarios, improving the applicability of the message transmission method of this disclosure.

[0229] For example, referring to Figure 4, the total number of first output ports of the source node in Figure 4 is 2, the maximum value of the total number of second output ports corresponding to each intermediate node layer is 4, and the minimum value of the total number of second output ports corresponding to each intermediate node layer is 1. Therefore, 3 can be used as the third number. The number of identical intermediate nodes in any two baseline paths from the source node H0 to the destination node H4 can be less than 3.

[0230] In the embodiments of steps 1310 to 1340 above, the difference between the maximum and minimum values ​​is larger for more complex and larger data center networks, and similarly, the difference is smaller for simpler and smaller data center networks. However, this disclosure improves the applicability of the message transmission method by determining the maximum and minimum values ​​of the first total number of output ports and the total number of second output ports corresponding to each intermediate node layer, and using the difference between the maximum and minimum values ​​as a third number. This makes the third number applicable to different application scenarios.

[0231] Detailed description of step 320

[0232] In step 320, a target lookup table is obtained. The target lookup table indicates the correspondence between the base path and the path virtual port number. The path virtual port number is the virtual port number added to the target message when the source node sends the target message. Each base path corresponds to one or more path virtual port numbers.

[0233] Referring to Figure 14, step 320 may include, for example, the following steps.

[0234] Step 1410: Obtain the set of path virtual port numbers. This step includes, for example, determining the set of path virtual port numbers. The set of path virtual port numbers includes the series of path virtual port numbers.

[0235] Step 1420: Assign the set of path virtual port numbers to multiple first outgoing ports of the source node, and assign the set of path virtual port numbers to multiple second outgoing ports of each intermediate node layer.

[0236] Step 1430: Determine the path virtual port number corresponding to the base path based on the path virtual port numbers assigned to the source node and each intermediate node on the base path.

[0237] Step 1440: Store the baseline path and the corresponding virtual port number of the path to generate a target lookup table.

[0238] Steps 1410 and 1440 are described in detail below.

[0239] In step 1410, the set of virtual port numbers for the path is obtained.

[0240] According to embodiments of this disclosure, a path virtual port number can be understood as an identifier of a base path, or it can be understood as a field in a destination packet. The length of the field indicates the number of path virtual port numbers, and the set of all path virtual port numbers (e.g., consecutive positive integers) contained in this field is the path virtual port number set. The field refers to the "routing source port number" field in the TCP / UDP header occupied by the path virtual port number.

[0241] For example, if the field related to the path virtual port number in the current target message is 8 bits, then the number of path virtual numbers is 2 to the power of 8, that is, the number of path virtual numbers is 256. The path virtual port number set contains 256 path virtual numbers, and the path virtual port number set can specifically be {1,2,3,4......256}.

[0242] In step 1420, the set of path virtual port numbers is assigned to multiple first outgoing ports of the source node, and for each intermediate node layer, the set of path virtual port numbers is assigned to multiple second outgoing ports of the intermediate node layer.

[0243] According to embodiments of this disclosure, "assigning the set of path virtual port numbers to multiple first outgoing ports of the source node" can also be understood as determining the path virtual port numbers corresponding to the multiple first outgoing ports of the source node. For example, referring to FIG15, if the source node is server H0, H0's first outgoing port A is connected to LA16, and H0's first outgoing port B is connected to LA17. If the set of path virtual port numbers is {1,2,3...12}, it can be seen that the path virtual port number corresponding to the source node's first outgoing port A can be {1,2,3,4,5,6}, and the path virtual port number corresponding to the source node's first outgoing port B can be {7,8,9,10,11,12}.

[0244] According to embodiments of this disclosure, "assigning the set of path virtual port numbers to multiple second outgoing ports of the intermediate node layer for each intermediate node layer" can also be understood as determining the path virtual port numbers corresponding to the multiple second outgoing ports of the intermediate nodes in each intermediate node layer. For example, referring to FIG15, intermediate nodes LA16 and LA17 are two of multiple intermediate nodes between the source node H0 and the destination node H4, and LA16 and LA17 are in the same intermediate node layer. Second outgoing port A of LA16 is connected to intermediate node LA0, and second outgoing port B of LA16 is connected to intermediate node LA1. Second outgoing port C of LA17 is connected to intermediate node LA0, and second outgoing port D of LA17 is connected to intermediate node LA1. If the set of path virtual port numbers is {1,2,3......12}, it can be obtained that the path virtual port number corresponding to the second outgoing port A of LA16 can be {1,5,9}, and the path virtual port number corresponding to the second outgoing port B of LA16 can be {2,6,10}. The virtual port number corresponding to the second output port C of LA17 can be {3,7,11}, and the virtual port number corresponding to the second output port D of LA17 can be {4,8,12}.

[0245] The specific method of "assigning the set of path virtual port numbers to multiple first outgoing ports of the source node, and assigning the set of path virtual port numbers to multiple second outgoing ports of the intermediate node layer for each intermediate node layer" will be described in detail below.

[0246] In step 1430, the path virtual port number corresponding to the base path is determined based on the path virtual port numbers assigned to the source node and each intermediate node on the base path.

[0247] According to embodiments of this disclosure, the baseline path from the source node to the destination node includes the source node, multiple intermediate nodes, and the destination node. Since the destination node is the last hop of the baseline path, it has no outgoing port or path virtual port number. Therefore, when determining the path virtual port number corresponding to the baseline path, it is possible to consider, or only the path virtual port numbers assigned to the source node and each intermediate node along the baseline path need to be considered. Furthermore, the path virtual port number corresponding to the baseline path refers to the path virtual port number assigned to each intermediate node traversed by the baseline path.

[0248] For example, referring to Figure 15, reference path 1 in Figure 15 is H0-LA16-LA0-LC0-1-LA4-LA20-H4, and reference path 2 is H0-LA16-LA1-LC2-3-LA5-LA20-H4. If it is necessary to determine the virtual port number corresponding to reference path 1, it can be determined based on the virtual port numbers assigned to H0, LA16, LA0, LC0-1, LA4, and LA20. Similarly, if it is necessary to determine the virtual port number corresponding to reference path 2, it can be determined based on the virtual port numbers assigned to H0, LA16, LA1, LC2-3, LA5, and LA20.

[0249] The specific method for "determining the path virtual port number corresponding to the baseline path based on the path virtual port numbers assigned to the source node and each intermediate node on the baseline path" will be described in detail below.

[0250] In step 1440, the baseline path and the corresponding virtual port number of the path are stored to generate a target lookup table.

[0251] According to embodiments of this disclosure, after obtaining the virtual port number corresponding to the baseline path, to facilitate the rapid determination of the virtual port number corresponding to the baseline path for the target packet during subsequent routing, the baseline path and the virtual port number corresponding to the baseline path can be stored accordingly. For example, referring to FIG15, the baseline path 1 and the virtual port number {1,5} corresponding to the baseline path 1 can be stored accordingly; the baseline path 2 and the virtual port number {2,6} corresponding to the baseline path 2 can be stored accordingly; the baseline path 3 and the virtual port number {7,11} corresponding to the baseline path 3 can be stored accordingly; and the baseline path 4 and the virtual port number {8,12} corresponding to the baseline path 4 can be stored accordingly, to generate a target lookup table.

[0252] In the embodiments described in steps 1410 to 1440 above, the path virtual port number corresponding to the reference path can be determined based on the path virtual port numbers allocated to the source node and each intermediate node on the reference path. Based on this, it is possible to deterministically route the target packet by adding the path virtual port number corresponding to the reference path to the target packet, reducing the uncertainty in the target packet transmission process. Furthermore, the embodiments of this disclosure can store the reference path and the corresponding path virtual port number, improving the efficiency of determining the path virtual port number corresponding to the reference path for the target packet when routing the target packet subsequently.

[0253] Referring to Figure 16, before step 1420, the following may also be included:

[0254] Step 1610: Configure the same first hash algorithm and first hash seed for multiple servers, where the source node and the destination node are any one of the multiple servers;

[0255] Step 1620: For each intermediate node layer, configure the same second hash algorithm and second hash seed for each intermediate node in that intermediate node layer.

[0256] Steps 1610 to 1620 are described in detail below:

[0257] In step 1610, the same first hash algorithm and first hash seed are configured for multiple servers, wherein the source node and the destination node are any one of the multiple servers.

[0258] It is understood that in this embodiment of the disclosure, the server can be a source node or a destination node. For example, referring to FIG2, the server includes H0-H15. A hash algorithm is an algorithm that converts input data of arbitrary length into output data of fixed length. During the transmission of a target message, the source node and intermediate nodes can calculate the target message based on the hash algorithm to obtain the first output port of the source node and the second output port of the intermediate node, thereby forwarding the target message to the next hop through the first output port / second output port. A hash seed refers to the initial value or initial parameter used in the hash algorithm. By using a hash seed, the randomness and security of the hash function can be increased.

[0259] According to embodiments of this disclosure, by configuring multiple servers with the same first hash algorithm and first hash seed, the multiple servers can have consistent routing results. That is, servers with the same first hash algorithm and first hash seed can use the same routing strategy for data transmission. For example, referring to FIG17, multiple servers can be configured with the same hash algorithm H and the same hash seed H, so that each server can use the same hash algorithm H to route target packets.

[0260] For example, Figure 2 illustrates the concept of "multiple servers having consistent routing results": In a data center network, server H0 sends a target packet with path virtual port number A to server H4. In the base path corresponding to path virtual port number A, the next hop for server H0 is the access layer intermediate node LA16. If server H8 sends a target packet with path virtual port number A to server H12, the next hop for server H8 in the base path corresponding to path virtual port number A is the access layer intermediate node LA24. In other words, the first outgoing port of the target packet sent by server H0 is the same as the first outgoing port of the target packet sent by server H8. Specifically, when servers with the same hash algorithm and hash seed send target packets with the same path virtual port number, the first outgoing port of the target packet sent by multiple servers is consistent.

[0261] In step 1620, for each intermediate node layer, the same second hash algorithm and second hash seed are configured for each intermediate node in that intermediate node layer.

[0262] According to embodiments of this disclosure, by configuring the same second hash algorithm and second hash seed for multiple intermediate nodes in an intermediate node layer, the multiple intermediate nodes can have consistent routing performance. That is, intermediate nodes with the same second hash algorithm and second hash seed follow the same rules and strategies for routing and forwarding. Multiple intermediate nodes in an intermediate node layer can be configured with the same hash algorithm and hash seed, and different hash algorithms and hash seeds can be configured between multiple intermediate node layers.

[0263] For example, referring to Figure 17, multiple intermediate nodes in the access layer can be configured with the same hash algorithm L and the same hash seed L, so that each intermediate node in the access layer can use the same hash algorithm L to forward target packets. Similarly, multiple intermediate nodes in the aggregation layer can be configured with the same hash algorithm S and the same hash seed S, so that each intermediate node in the aggregation layer can use the same hash algorithm S to forward target packets. Finally, multiple intermediate nodes in the core layer can be configured with the same hash algorithm C, so that each intermediate node in the core layer can use the same hash algorithm C to forward target packets.

[0264] For example, Figure 2 is used to illustrate the concept of "multiple intermediate nodes exhibiting consistent routing behavior." As described above, H0 sends a target packet with path virtual port number A to H4. In the base path corresponding to path virtual port number A, the next hop of the aggregation layer intermediate node LA4 is the access layer intermediate node LA20. If the same hash algorithm and hash seed are configured for all aggregation layer intermediate nodes LA0-LA15, and server H8 sends a target packet with path virtual port number A to server H12, it can be seen that in the base path corresponding to path virtual port number A, the next hop of the aggregation layer intermediate node LA12 is the access layer intermediate node LA28. That is, the second outgoing port of the target packet sent from intermediate node LA4 is the same as the second outgoing port of the target packet sent from intermediate node LA12. Specifically, when intermediate nodes with the same hash algorithm and hash seed send target packets with the same path virtual port number, the second outgoing port of the target packet sent by multiple intermediate nodes is consistent.

[0265] In the embodiments described in steps 1610 to 1620 above, configuring the same first hash algorithm and first hash seed for multiple servers ensures consistent routing results for the servers. Configuring the same second hash algorithm and second hash seed for each intermediate node in the intermediate node layer ensures consistent routing performance for the intermediate nodes in each intermediate node layer, reducing the uncertainty of the target packet during transmission.

[0266] Referring to Figure 18, step 1420 may include, for example, the following.

[0267] Step 1810: For each path virtual port number in the path virtual port number set, construct a probe message. The probe message has a transmission protocol number, a path virtual port number, a source address corresponding to the source node, a destination address corresponding to the destination node, and a destination port number corresponding to the destination node.

[0268] Step 1820: Send a probe message from the source node.

[0269] Step 1830: Identify the first output port of the probe message output by the source node and the second output port of the probe message output by each intermediate node layer, and assign the path virtual port number to the first output port and the second output port.

[0270] Steps 1810 to 1830 are described in detail below.

[0271] In step 1810, for each path virtual port number in the path virtual port number set, a probe message is constructed. The probe message has a transmission protocol number, a path virtual port number, a source address corresponding to the source node, a destination address corresponding to the destination node, and a destination port number corresponding to the destination node.

[0272] According to embodiments of this disclosure, a probe message refers to a message sent by a source node to probe the first outgoing port of the source node and the second outgoing port of an intermediate node corresponding to a path virtual port number. As shown in Figure 19, the probe message includes a transport protocol number, a path virtual port number, a source address corresponding to the source node, a destination address corresponding to the destination node, and a destination port number corresponding to the destination node. The source node / intermediate node typically uses a hash algorithm and a hash seed to perform hash calculations on the source address, destination address, transport protocol number, path virtual port number, and destination port number to determine the first outgoing port / second outgoing port mapped by the calculation result, and then forwards the target message to the next hop through the first outgoing port / second outgoing port. This mapped first outgoing port / second outgoing port corresponds to the path virtual port number. The mapped first outgoing port / second outgoing port can refer to the first outgoing port number / second outgoing port number.

[0273] Understandably, to determine the first outgoing port of the source node and the second outgoing port of the intermediate node corresponding to each path virtual port number, a probe packet can be constructed for each path virtual port number in the set of path virtual port numbers. To ensure the accuracy of the routing results, the transport protocol number, source address, destination address, and destination port number are consistent in the multiple constructed probe packets, only the path virtual port number is different.

[0274] For example, if there exists a set of path virtual port numbers {1,2,3,4......16}, a probe packet A with path virtual port number 1 can be constructed first, then a probe packet B with path virtual port number 2, and a probe packet C with path virtual port number 3. This process continues until all path virtual port numbers in the set have been traversed. The transport protocol number, source address, destination address, and destination port number in probe packets A, B, C, etc., are consistent.

[0275] In step 1820, a probe message is sent from the source node.

[0276] According to embodiments of this disclosure, in order to detect the first outgoing port of the source node and the second outgoing port of the intermediate node corresponding to the virtual port number of the path, multiple intermediate nodes traversed by the probe packet during transmission can be determined. Based on this, a probe packet is sent from the source node so that multiple intermediate nodes between the source node and the destination node forward the probe packet.

[0277] In step 1830, the first output port of the probe message output by the source node and the second output port of the probe message output by each intermediate node layer are identified, and the path virtual port number is assigned to the first output port and the second output port.

[0278] According to embodiments of this disclosure, each intermediate node traversed by a probe packet can be identified using a path probing tool on the source node, thereby determining the first output port of the probe packet from the source node and the second output port of the probe packet from each intermediate node layer. Based on this, the path virtual port number carried on the probe packet can be assigned to the first and second output ports, thereby determining the path virtual port number corresponding to each first output port of the source node and the path virtual port number corresponding to each second output port of the intermediate node.

[0279] For example, the process of "assigning the path virtual port number to the first outgoing port" is explained here with reference to Figure 20. When the source node sends a probe packet with a path virtual port number of 1, if the path probing tool set up at the source node detects that the probe packet arrives at the intermediate node L0 of the access layer through the first outgoing port A of the source node, then the path virtual port number 1 can be assigned to the first outgoing port A. Similarly, if the path probing tool detects that the probe packet arrives at the intermediate node L1 of the access layer through the first outgoing port B of the source node, then the path virtual port number 1 can be assigned to the first outgoing port B.

[0280] For example, the process of "assigning a path virtual port number to a second outgoing port" is explained here with reference to Figure 21. When a probe packet with a path virtual port number of 2 is sent from the source node, if the path probing tool set at the source node detects that the probe packet arrives at the aggregation layer intermediate node S0 via the second outgoing port A of the access layer intermediate node L1, then the path virtual port number 2 can be assigned to the second outgoing port A. Similarly, if the path probing tool detects that the probe packet arrives at the aggregation layer intermediate node S1 via the second outgoing port B of the access layer intermediate node L1, then the path virtual port number 2 can be assigned to the second outgoing port B. If the path probing tool detects that the probe packet arrives at the aggregation layer intermediate node S2 via the second outgoing port C of the access layer intermediate node L1, then the path virtual port number 2 can be assigned to the second outgoing port C. If the path probing tool detects that the probe packet arrives at the aggregation layer intermediate node S3 via the second outgoing port D of the access layer intermediate node L1, then the path virtual port number 2 can be assigned to the second outgoing port D.

[0281] For example, the "assignment of path virtual port number to the second outgoing port" is explained here with reference to Figure 22. When the source node sends a probe packet with path virtual port number 2, if the path probing tool set at the source node recognizes that the probe packet reaches the core layer intermediate node C0 through the second outgoing port E of the aggregation layer intermediate node S1, then path virtual port number 2 can be assigned to the second outgoing port E. Similarly, if the path probing tool recognizes that the probe packet reaches the core layer intermediate node C1 through the second outgoing port F of the aggregation layer intermediate node S1, then path virtual port number 2 can be assigned to the second outgoing port F.

[0282] For example, the "assignment of the path virtual port number to the second outgoing port" is explained here with reference to Figure 23. When the source node sends a probe packet with the path virtual port number 2, if the path probing tool set at the source node recognizes that the probe packet reaches the access layer intermediate node L0 through the second outgoing port G of the aggregation layer intermediate node S1, then the path virtual port number 2 can be assigned to the second outgoing port G. Similarly, if the path probing tool recognizes that the probe packet reaches the access layer intermediate node L1 through the second outgoing port H of the aggregation layer intermediate node S1, then the path virtual port number 2 can be assigned to the second outgoing port H.

[0283] The embodiments of steps 1810 to 1830 described above can construct a probe packet for each path virtual port number in the path virtual port number set. Further, by identifying each intermediate node traversed by the probe packet carrying the path virtual port number, the first output port of the probe packet from the source node and the second output port of the probe packet from each intermediate node layer can be determined. This method allows for the rapid determination of the path virtual port number corresponding to each first output port and each second output port, facilitating subsequent precise routing of the target packet based on the path virtual port number.

[0284] Referring to Figure 24, step 1430 may include, for example:

[0285] Step 2410: Generate a set of single-node path virtual port numbers based on the path virtual port numbers assigned to the source node or intermediate node on the baseline path.

[0286] Step 2420: Take the intersection of the set of single-node path virtual port numbers corresponding to the source node and each intermediate node, and use each path virtual port number in the intersection as the path virtual port number corresponding to the base path.

[0287] Steps 2410 and 2420 are described in detail below.

[0288] In step 2410, a set of path virtual port numbers for a single node (the source node or the intermediate node) is generated based on the path virtual port numbers assigned to the source node or intermediate node on the baseline path. This process is performed for each node.

[0289] Understandably, each first outgoing port of a source node can generally correspond to multiple path virtual port numbers, and each second outgoing port of an intermediate node can also correspond to multiple path virtual port numbers. The set of path virtual port numbers for a single node can be the set of multiple path virtual port numbers corresponding to the multiple first outgoing ports of the source node on the baseline path. For a specific intermediate node on the baseline path, the set of path virtual port numbers for a single node can also be the set of multiple path virtual port numbers corresponding to the multiple second outgoing ports of that intermediate node.

[0290] Specifically, referring to Figure 25, when the source node / intermediate node forwards a probe packet, it performs a hash calculation on the transport protocol number, source address, destination address, destination port number, and path virtual port number in the probe packet to find the outgoing port of the probe packet based on the calculation result. Finding the outgoing port of the probe packet based on the calculation result is, for example, determining the outgoing port number of the probe packet based on the hash calculation result, thereby determining the outgoing port.

[0291] Furthermore, for a source node or a single intermediate node, the path virtual port numbers added to probe packets originating from multiple identical outgoing ports can be combined into an outgoing port path virtual port number set. The outgoing port path virtual port number sets corresponding to multiple outgoing ports of the source node / intermediate node are combined into a single-node path virtual port number set. As shown in Figure 25, since each outgoing port has a corresponding outgoing port path virtual port number set, if the source node / intermediate node has K outgoing ports, then there are K outgoing port path virtual port number sets. These K outgoing port path virtual port number sets are combined into the single-node path virtual port number set for that source node / intermediate node.

[0292] In step 2420, the intersection of the single-node path virtual port number sets corresponding to the source node and each intermediate node is taken, and each path virtual port number in the intersection is used as the path virtual port number corresponding to the base path.

[0293] According to embodiments of this disclosure, "using the path virtual port numbers in the intersection as the path virtual port number corresponding to the base path" can be understood as: using the path virtual port number common to a certain outgoing port path virtual number set in the single-node path virtual port number set of the source node and the path virtual port number common to a certain outgoing port path virtual number set in the single-node path virtual port number sets of the multiple intermediate nodes included in the base path as the path virtual port number corresponding to the base path. The set of outgoing port path virtual numbers of the source node / intermediate node required to determine the path virtual port number corresponding to the base path can be determined based on the outgoing port used by the source node / intermediate node in the base path to forward probe packets. For example, if the outgoing port used by source node A to forward probe packets in the base path is outgoing port B, then the set of outgoing port path virtual numbers corresponding to outgoing port B of source node A is used when determining the path virtual port number corresponding to the base path. If the outgoing port used by intermediate node C to forward probe packets in the base path is outgoing port D, then the set of outgoing port path virtual numbers corresponding to outgoing port D of intermediate node C is used when determining the path virtual port number corresponding to the base path.

[0294] For example, referring to Figure 15, there exists a baseline path from source node H0 to destination node H4 as H0-LA16-LA0-LC0-1-LA4-LA20-H4. The intersection (1,5) of the set of virtual outgoing port paths corresponding to H4 (1,2,3,4,5,6), the set of virtual outgoing port paths corresponding to LA16 (1,5,9), and the set of virtual outgoing port paths corresponding to LA4 (1,2,5,6,9,10) can be taken as the virtual port number of the baseline path. In this embodiment, the set of virtual outgoing port paths for upstream intermediate nodes in the aggregation layer, downstream intermediate nodes in the core layer, and downstream intermediate nodes in the access layer are not considered. Therefore, when determining the virtual port number of the baseline path, the sets of virtual outgoing port paths corresponding to LA0, LC0-1, and LA20 are not considered.

[0295] For example, a data center network consists of a host, a leaf, a spine, and a core. When assigning path virtual port numbers to various ports using probe packets containing the transport protocol number, path virtual port number, source address corresponding to the source node, destination address corresponding to the destination node, and destination port number corresponding to the destination node, it is necessary to determine which path virtual port numbers correspond to which switches, given other four tuples (transport protocol number, source address corresponding to the source node, destination address corresponding to the destination node, and destination port number corresponding to the destination node), i.e., to find the mapping from path virtual port numbers to switch sequence numbers. For example, the path virtual port number in the source port number field of the probe packet can be used as input, and the output port of the probe packet on that switch can be uniquely determined by the switch's internal hash algorithm. This step is based on the principle of relative path control, that is, for an XOR (exclusive OR) hash algorithm, a relative change in the input will lead to a definite change in the output. For example, you can find a pair of servers distributed across different Pods (a Pod consists of a server, an aggregation layer switch, and an access layer switch). On one server, use the traceroute tool to probe the other server. The traceroute tool will print the switch IPs along the probe packet's path. By using different path virtual port numbers (keeping other four-tuples unchanged), repeatedly using the traceroute tool to probe the switch IP sequence of the path, you can establish a mapping of all path virtual port numbers to switch sequences. Further processing allows you to group all path virtual port numbers passing through the same switch into one group, resulting in path virtual port number packets for each switch layer (a set of single-node path virtual port numbers). The traceroute result for a cross-Pod flow can have five items, corresponding to the switch IPs reached by the five hops: the sending side Leaf, sending side Spine, Core, receiving side Spine, and receiving side Leaf IPs. When obtaining a path virtual port number packet (referred to as a packet) for a specific layer, you can look at the corresponding item in all the results. For example, when obtaining the Spine packet, you are interested in the second item of the probe result, i.e., the sending side Spine. There is no fixed correspondence between the order of the packets and the actual order of the switches. The actual correspondence depends on the quadruple (five-tuple excluding the path virtual port number) of each flow.

[0296] It's important to note that the path virtual port number packets are different for each layer of switches. The number of path virtual port number packets is from the perspective of a data flow. For example, if each rack has 2 Leaf switches, each Pod has 4 Spine switches, and each Plane has 2 switches, since a flow from a Server / Host may route to one of the two Leaf switches, there will be 2 path virtual port number packets from the Host to the Leaf, called the Host packet, denoted by Hi (i = 0, 1). From a Leaf switch, the flow may route to one of the four Spine switches, so there will be 4 packets from the Leaf switch to the Spine switch (corresponding to the number of Spine switches), called the Spine packet, denoted by Si (i = 0, ..., 3). Similarly, there will be 2 packets from a Spine switch to the Core switch, called the Core packet, denoted by Ci (i = 0, 1). There will also be 2 packets from a Spine switch to the Leaf switch, called the Leaf packet, denoted by Li (i = 0, 1). The path virtual port number packets for each layer of the switch are independent, and each packet can evenly distribute the entire set of path virtual port numbers (e.g., 65535 port numbers). For example, if there are 4 Spine packets, then each packet has approximately 65535 / 4 = 16384 path virtual port numbers.

[0297] We can disregard the virtual port set groups for the third hop (uplink from Spine to Core) and the fourth hop (downlink from Core to Spine). This is because a packet uplinking from a Spine will always reach the same Spine in another Pod; there's no uncertainty. Furthermore, we don't need to consider which specific Core it passes through (the number of Cores is relatively ample). Therefore, we can consider the following:

[0298] a. The upstream route from server to leaf determines which (sending) leaf is selected.

[0299] b. The uplink route from the sending side Leaf to the sending side Spine determines which (sending side) Spine is selected.

[0300] c. The downlink route from the receiving side Spine to the receiving side Leaf determines which (receiving side) Leaf is selected.

[0301] It's worth noting that all these probes, based on a certain routing configuration, can be performed on a pair of servers across Pods, because all servers behave the same, and the same applies to switches at the same layer. Here, "same" refers to the path virtual port number packet results, not the exact routing results.

[0302] The embodiments of steps 2410 and 2420 described above can determine the path virtual port number corresponding to the base path based on the path virtual port numbers in the intersection of the sets of single-node path virtual port numbers corresponding to the source node and each intermediate node. Through these steps, the path virtual port number corresponding to each base path can be quickly determined. Subsequently, after determining the base path used to transmit the target packet, the path virtual port number corresponding to the base path can be directly added to the target packet, reducing the uncertainty in the target packet transmission process and improving the continuity of the data flow during packet transmission.

[0303] Referring to Figure 26, step 1420 may include, for example:

[0304] Step 2610: Identify the key node layer from each intermediate node layer;

[0305] Step 2620: For each critical node layer, allocate the set of path virtual port numbers to multiple second outgoing ports of the critical node layer;

[0306] Step 1430 includes:

[0307] Step 2630: Determine the path virtual port number corresponding to the baseline path based on the path virtual port numbers assigned to the source node and intermediate nodes in the critical node layer on the baseline path.

[0308] Steps 2610 to 2630 are described in detail below:

[0309] In step 2610, the critical node layer is identified from each intermediate node layer.

[0310] It is understandable that the critical node layer refers to the intermediate node layer containing the intermediate nodes corresponding to the path virtual port numbers used when determining the path virtual port numbers corresponding to the baseline path. In this embodiment of the disclosure, the critical node layer includes the uplink access layer and the downlink aggregation layer. This is because, in the data center network shown in Figure 2, after a packet travels uplink from an intermediate node in the aggregation layer, regardless of which intermediate node in the core layer it reaches, it will definitely reach the intermediate node in the aggregation layer of another network module at the same location. This process is without uncertainty, so the critical node layer may not include the uplink aggregation layer and the downlink core layer. Secondly, since the next hop in the downlink access layer is always the destination node, and this process is also without uncertainty, the critical node layer may not include the downlink access layer.

[0311] For example, referring to FIG15, as described above, when determining the path virtual port number corresponding to the baseline path H0-LA16-LA0-LC0-1-LA4-LA20-H4, it is not necessary to pay attention to the set of outgoing port path virtual numbers corresponding to LA0 (corresponding to the intermediate node of the uplink aggregation layer), the set of outgoing port path virtual numbers corresponding to LC0-1 (corresponding to the intermediate node of the downlink core layer), and the set of outgoing port path virtual numbers corresponding to LA20 (corresponding to the intermediate node of the downlink access layer).

[0312] In step 2620, for each critical node layer, the set of path virtual port numbers is allocated to multiple second outgoing ports of the critical node layer.

[0313] It is understood that step 2620 may include: constructing a probe message for each path virtual port number in the path virtual port number set, the probe message having a transport protocol number, a path virtual port number, a source address corresponding to the source node, a destination address corresponding to the destination node, and a destination port number corresponding to the destination node; sending the probe message from the source node; identifying the first output port of the probe message output by the source node and the second output port of the probe message output by each intermediate node layer of the critical node layer, and assigning the path virtual port number to the first output port and the second output port. This step is similar to the specific implementation of steps 1810 to 1830 above, and will not be described in detail here.

[0314] In step 2630, the path virtual port number corresponding to the baseline path is determined based on the path virtual port numbers assigned to the source node and intermediate nodes in the critical node layer on the baseline path.

[0315] It is understood that step 2630 includes: generating a set of single-node path virtual port numbers based on the path virtual port numbers assigned to the intermediate nodes of the source node or critical node layer on the baseline path; taking the intersection of the single-node path virtual port number sets corresponding to the source node and each intermediate node of the critical node layer, and using each path virtual port number in the intersection as the path virtual port number corresponding to the baseline path. This process is similar to the specific implementation of steps 2410 to 2420 above, and will not be described in detail here.

[0316] In the embodiments of steps 2610 to 2630 described above, when determining the path virtual port number corresponding to the baseline path, in addition to the set of single-node path virtual port numbers corresponding to the source node, only the set of single-node path virtual port numbers corresponding to the intermediate nodes of the critical node layer needs to be considered, without needing to consider other intermediate node layers besides the critical node layer. This reduces the computational load when determining the path virtual port number corresponding to the baseline path and improves the efficiency of determining the path virtual port number corresponding to the baseline path.

[0317] Detailed description of step 330

[0318] In step 330, in response to determining that the transmission of the target message from the source node to the destination node has failed, the first path virtual port number in the target message is obtained.

[0319] Referring to Figure 27, step 330 may include only step 2730 below, or it may also include steps 2720 to 2730. Steps 2720 and 2730 may be included in the transmission of the target message.

[0320] Step 2710: Add the first path virtual port number to the target message.

[0321] Step 2720: Transmit the target message from the source node to the destination node.

[0322] Step 2730: If no acknowledgment response is received from the destination node within the preset first time, it is determined that the transmission of the target message has failed.

[0323] Steps 2710 to 2730 are described in detail below.

[0324] In step 2710, the first path virtual port number is added to the target message.

[0325] It is understandable that, in this embodiment of the disclosure, the source node and intermediate nodes determine the first and second outgoing ports for forwarding the target packet based on the path virtual port number. Without the path virtual port number, the source node cannot know which first outgoing port to use when forwarding the target packet, and the destination node cannot know which second outgoing port to use. Therefore, after determining the baseline path for transmitting the target packet and obtaining the first path virtual port number corresponding to the baseline path, the first path virtual port number can be added to the target packet so that the source node and intermediate nodes can forward the target packet based on the first path virtual port number.

[0326] The specific method for "adding the first path virtual port number to the target message" will be described in detail below.

[0327] In step 2720, the target message is transmitted from the source node to the destination node.

[0328] According to embodiments of this disclosure, after adding a first path virtual port number to the target packet, the source node can transmit the target packet to the destination node, so that the intermediate nodes between the source node and the destination node forward the target packet according to the base path corresponding to the first path virtual port number.

[0329] In step 2730, if no acknowledgment response is received from the destination node within a preset first time period, it is determined that the transmission of the target message has failed.

[0330] According to embodiments of this disclosure, the first time refers to the sum of the time allowed by the source node to transmit the target message to the destination node and the time taken by the destination node to return an acknowledgment response. The first time can be predetermined based on the actual message transmission situation. If the data center network used to transmit the target message is complex, the first time can be set to be longer. If the data center network used to transmit the target message is simple, the first time can be set to be shorter. If the application scenario has high requirements for the continuity of the data flow in message transmission, the first time can be set to be shorter. If the application scenario does not have high requirements for the continuity of the data flow in message transmission, the first time can be set to be longer.

[0331] Understandably, after successfully receiving the target message from the source node, the destination node will return an acknowledgment to the source node, informing it that the destination node has successfully received the target message. If the source node does not receive an acknowledgment from the destination node immediately, it means that the destination node has not successfully received the target message. In other words, there is a faulty intermediate node in the baseline path for transmitting the target message, causing the target message to accumulate or even be lost among the intermediate nodes.

[0332] For example, referring to Figure 15, if the virtual port number of the first path added in the target message is 2, the source node H0 forwards the target message to the destination node H4 according to the base path 2. The base path 2 is H0-LA16-LA1-LC2-3-LA5-LA20-H4. If the first time interval is 10 milliseconds, and H0 does not receive an acknowledgment response from H4 within 10 milliseconds, it is determined that the transmission of the target message has failed. At this time, it can be determined that there is a faulty intermediate node in the base path 2.

[0333] The specific method for determining that "if no acknowledgment response is received from the destination node within the preset first time, the transmission of the target message has failed" will be described in detail below.

[0334] In the embodiments of steps 2710 to 2730 above, if the source node does not receive an acknowledgment response from the destination node within a preset first time period, it is determined that the transmission of the target message has failed. This first time period can be predetermined based on the actual application scenario. If the application scenario has high requirements for the continuity of the data stream during message transmission, the first time period can be set shorter. If the application scenario does not have high requirements for the continuity of the data stream during message transmission, the first time period can be set longer. Based on this, the message transmission method of this disclosure embodiment can be applied to different application scenarios, increasing the adaptability of this disclosure embodiment.

[0335] Referring to Figure 28, before step 2710, the message transmission method may further include:

[0336] Step 2810: Obtain the current pointer corresponding to the destination node;

[0337] Step 2820: In the base path table, determine the base path that the current pointer points to;

[0338] Step 2830: In the target lookup table, find the virtual port number corresponding to the baseline path and use it as the first path virtual port number.

[0339] Steps 2810 to 2830 are described in detail below:

[0340] In step 2810, the current pointer corresponding to the destination node is obtained.

[0341] According to embodiments of this disclosure, a pointer describes the position of data in a reference path table. The current pointer refers to the position in the reference path table of the reference path applicable to the target message transmitted from the current source node to the destination node. The source node maintains both a target lookup table and a reference path table. For a single destination node, the reference path table stores all reference paths from the source node to that destination node. For example, referring to FIG29, the source node maintains multiple reference paths from the source node to different destination nodes.

[0342] In step 2820, the reference path currently pointed to by the pointer is determined in the reference path table.

[0343] Understandably, to reduce the probability of base path congestion, for a single destination node, the current pointer in the base path table maintained by the source node changes as the source node determines the base path for the target packet. Specifically, whenever the source node determines the base path for the target packet to be transmitted and sets the virtual port number corresponding to the base path as the first virtual port number, the current pointer changes in a predetermined order. This predetermined order will be explained later. These steps ensure that packet traffic is evenly distributed across multiple base paths, preventing packet traffic from concentrating on a single base path.

[0344] For example, referring to Figure 29, if the source node wants to transmit a target message to destination node 1, it first obtains the current pointer corresponding to destination node 1. From the reference path table from the source node to destination node 1 in Figure 29, it can be seen that the current pointer corresponding to destination node 1 points to reference path 2. Based on this, reference path 2 can be used as the transmission path to transmit the target message. Similarly, if the source node wants to transmit a target message to destination node 2, it first obtains the current pointer corresponding to destination node 2. From the reference path table from the source node to destination node 2 in Figure 29, it can be seen that the current pointer corresponding to destination node 2 points to reference path 11. Based on this, reference path 11 can be used as the transmission path to transmit the target message.

[0345] In step 2830, the virtual port number corresponding to the baseline path is found in the target lookup table and used as the first virtual port number.

[0346] According to embodiments of this disclosure, after determining the reference path pointed to by the current pointer in the reference path table, the path virtual port number corresponding to the reference path can be looked up in the target lookup table maintained on the source node side. As shown in Figure 4, in the target lookup table, a reference path generally corresponds to multiple path virtual port numbers. In this case, a path virtual port number can be randomly selected from the multiple path virtual port numbers corresponding to the reference path as the first path virtual port number.

[0347] For example, referring to FIG29, as described above, if the source node wants to transmit a target message to the destination node 1, the current pointer of the destination node 1 points to the base path 2. If the base path 2 in the target lookup table corresponds to path virtual port number 3, path virtual port number 4, and path virtual port number 5, any one of path virtual port number 3, path virtual port number 4, and path virtual port number 5 can be used as the first path virtual port number.

[0348] The embodiments of steps 2810 to 2830 described above determine the base path based on the current pointer corresponding to the destination node, and the current pointer changes as the source node determines the base path for the target packet. These steps ensure that packet traffic is evenly distributed across multiple base paths, achieving load balancing and preventing packet traffic from concentrating on a single base path.

[0349] Referring to Figure 30, step 2710 may include, for example, the following steps.

[0350] Step 3010: Place the routing source port number from the routing source port number field in the target packet into the reserved field of the target packet. Alternatively, this step can involve placing the routing source port number of the target packet into the reserved field of the target packet, where the reserved field is different from the routing source port number field of the target packet.

[0351] Step 3020: Add the first path virtual port number to the routing source port number field. This step can also be to add the first identifier of the first base path to the routing source port number field. The first identifier refers to the first path virtual port number.

[0352] Steps 3010 and 3020 are described in detail below:

[0353] The reserved fields of the target message may include a first reserved field and a second reserved field. In step 3010, the route source port number in the route source port number field of the target message is placed into the first reserved field of the target message.

[0354] It is understandable that adding the first path virtual port number to the target packet also includes: putting the route destination port number in the route destination port number field of the target packet into the second reserved field of the target packet.

[0355] Existing packets typically include a source port number, a destination port number, a transport protocol number, a source address corresponding to the source node, and a destination address corresponding to the destination node. When forwarding packets, source nodes and intermediate nodes perform hash calculations on the source port number, destination port number, transport protocol number, source address, and destination address to determine the next hop. However, in this embodiment, when forwarding a target packet, a hash calculation is performed on the path virtual port number, destination port number, transport protocol number, source address, and destination address to determine the next hop. Based on this, the data structure of the target packet can be modified by adding a path virtual port number and a destination port number to the existing packet data structure. The destination port number and the path virtual port number are similar and both belong to the path attributes defined in this embodiment. The path virtual port number can be understood as an identifier of the base path, and the destination port number can be understood as an identifier of the destination node. Generally, for different target packets, if their destination nodes are the same, their destination port numbers are also the same.

[0356] Further, as shown in Figure 31, the source port number field stores the source port number, the destination port number field stores the destination port number, and the reserved field stores custom data. To allow the first-path virtual port number and destination port number to participate in routing, the source port number and destination port number can first be excluded from the routing process. Therefore, the source port number from the source port number field and the destination port number from the destination port number field in the destination packet can be placed into the reserved field of the destination packet.

[0357] In step 3020, the first path virtual port number is added to the route source port number field.

[0358] It is understandable that adding the first path virtual port number to the target packet also includes: adding the pre-selected destination port number to the route destination port number field; and modifying the length of the checksum field and the address header field of the target packet.

[0359] According to embodiments of this disclosure, when routing a target packet, the source node and intermediate nodes generally determine the next hop based on data in predetermined fields of the target packet (e.g., fields storing the source port number, destination port number, transport protocol number, source address, and destination address). Therefore, after placing the source port number from the source port number field and the destination port number from the destination port number field into the reserved fields of the target packet, the first path virtual port number can be added to the source port number field, and the destination port number can be added to the destination port number field.

[0360] Furthermore, after adding the first path virtual port number to the routing source port number field and the destination port number to the routing destination port number field, since the lengths of the routing source port number field and the destination port number field change, the lengths of the checksum field and the address header field of the target packet can be modified accordingly. The checksum field stores a Cyclic Redundancy Check (CRC) code. After receiving the target packet, the destination node can check the CRC code to determine if the target packet contains errors. The address header field contains control and routing information to ensure that the target packet can be correctly transmitted from the source node to the destination node.

[0361] The embodiments of steps 3010 and 3020 described above exclude the routing source port number and routing destination port number from the routing process by placing both the routing source port number from the routing source port number field and the routing destination port number from the routing destination port number field in the reserved fields of the target packet. Furthermore, by adding the first path virtual port number to the routing source port number field and the destination port number to the routing destination port number field, the source node and intermediate nodes can perform routing based on the path virtual port number, destination port number, transport protocol number, source address, and destination address. Through these steps, the routing process of the source node and the intermediate node can be changed without interfering with the transmission of the target packet.

[0362] Referring to Figure 32, after step 2710, the message transmission method may further include:

[0363] Step 3210: Increment the current pointer by 1, so that when transmitting other packets after the target packet from the source node to the destination node, the reference path pointed to by the next pointer in the reference path table is determined. The current pointer is a circular pointer.

[0364] Step 3210 will be described in detail below:

[0365] As explained in step 2820 above, to reduce the probability of base path congestion, whenever the source node determines a base path for the target packet to be transmitted and sets the virtual port number corresponding to the base path as the first virtual port number, the current pointer will change in a predetermined order. This predetermined order means that the current pointer in the base path table is incremented by 1, that is, the pointer used to determine the base path in the base path table changes from the current pointer to the next pointer. When transmitting other packets after the target packet from the source node to the destination node, the base path pointed to by the next pointer of the current pointer in the base path table is determined as the transmission path for the other packets.

[0366] For example, referring to Figure 33, if the source node wants to transmit a target message to the destination node 1, the current pointer of the destination node 1 points to the base path 2. After adding the path virtual port number (i.e., the first path virtual port number) corresponding to the base path 2 to the target message, the current pointer is incremented by 1. When transmitting other messages after the target message from the source node to the destination node 1, the base path 3 is determined as the transmission path for other messages in the base path table.

[0367] In the embodiment of step 3210 above, after adding the first path virtual port number to the target packet, the current pointer is incremented by 1. This allows the source node to use the reference path pointed to by the next pointer as the transmission path for other packets after the target packet when transmitting them to the destination node. These steps ensure that packet traffic is evenly distributed across multiple reference paths, achieving load balancing and preventing packet traffic from concentrating on a single reference path.

[0368] Referring to Figure 34, step 2730 may include, for example:

[0369] Step 3410: Insert the first detection logic into the transmission control protocol processing code of the source node.

[0370] Step 3420: Activate the first detection logic to detect if no acknowledgment response is received from the destination node within a preset first time period, thereby determining that the transmission of the target message has failed.

[0371] Steps 3410 and 3420 are described in detail below:

[0372] In step 3410, the first detection logic is inserted into the transmission control protocol processing code of the source node.

[0373] According to embodiments of this disclosure, the Transmission Control Protocol (TCP) processing code refers to the code written on the source node side to enable the transmission of the target packet. Only by writing TCP processing code on the source node side can the source node route the target packet and transmit it to the destination node. As shown in Figure 35, the first detection logic is new code added to the existing processing logic in the TCP processing code. By inserting the first detection logic into the TCP processing code, the source node can actively detect whether it can receive an acknowledgment response from the destination node within a preset first time.

[0374] As can be understood, referring to Figure 35, similar to the first detection logic, the path switching logic, path control logic, and event handling logic are all new code added to the existing processing logic in the transmission control protocol processing code. Specifically, the event handling logic handles events detected by the first detection logic where no acknowledgment response is received from the destination node within a preset first time period. The path control logic determines the base path for transmitting the target packet. The path switching logic modifies the data structure of the target packet based on the virtual port number corresponding to the base path determined by the path control logic.

[0375] In step 3420, the first detection logic is enabled to detect that no acknowledgment response is received from the destination node within a preset first time period, thereby determining that the transmission of the target message has failed.

[0376] It is understood that the operation of the source node detecting whether it has received an acknowledgment response from the destination node in the first time frame in this embodiment of the disclosure relies on the first detection logic inserted in the transmission control protocol processing code. Therefore, whenever the source node sends a target packet, the first detection logic can be enabled to detect in real time whether the destination node has successfully received the target packet.

[0377] The embodiments of steps 3410 and 3420 above, by inserting first detection logic into the transmission control protocol processing code of the source node, actively detect whether the destination node has successfully received the target packet, based on the original processing logic. These steps can quickly capture events indicating failed transmission of the target packet, facilitating subsequent responses by modifying the first path virtual port number in the target packet to the second path virtual port number, thus improving the continuity of the data flow during packet transmission.

[0378] Detailed description of step 340

[0379] In step 340, the second path virtual port number, which corresponds to a different base path than the first path virtual port number, is determined in the target lookup table.

[0380] Referring to Figure 36, step 340 may include, for example, the following steps.

[0381] Step 3610: In the target lookup table, determine the first base path corresponding to the first path virtual port number.

[0382] Step 3620: In the baseline path table, determine the second baseline path located after the first baseline path.

[0383] Step 3630: In the target lookup table, determine the virtual port number of the second path corresponding to the second baseline path.

[0384] Steps 3610 to 3630 are described in detail below:

[0385] In step 3610, the first base path corresponding to the first path virtual port number is determined in the target lookup table.

[0386] According to embodiments of this disclosure, a source node can retransmit a target packet in response to a failure to transmit the target packet from the source node to the destination node. However, if the base path used for retransmission of the target packet remains unchanged, it may lead to retransmission failure. Therefore, the base path used for target packet transmission can be changed. When modifying the base path used for target packet transmission, the base path corresponding to the first path virtual port number can first be determined, i.e., the first base path. In embodiments of this disclosure, the first base path can also be understood as the base path used by the source node when it first transmitted the target packet.

[0387] The specific method for "determining the first baseline path corresponding to the first path virtual port number in the target lookup table" will be described in detail below.

[0388] In step 3620, the second reference path located after the first reference path is determined in the reference path table.

[0389] According to embodiments of this disclosure, the second reference path refers to the reference path listed in the reference path table after the first reference path, and the number of intermediate nodes overlapping between the second reference path and the first reference path satisfies a predetermined condition. The second reference path can also be understood as the reference path used by the source node when retransmitting the target message.

[0390] For example, referring to Figure 15, if the source node H0 determines that the transmission of the target message from the source node H0 to the destination node H4 has failed, and the first path virtual port number in the obtained target message is 6, then the first reference path corresponding to the first path virtual port number can be determined to be reference path 2 based on the target lookup table. In the reference path table, the second reference path located after reference path 2 can be determined to be reference path 3.

[0391] In step 3630, the virtual port number of the second path corresponding to the second reference path is determined in the target lookup table.

[0392] According to embodiments of this disclosure, the second path virtual port number refers to the path virtual port number corresponding to the second reference path in the target lookup table. The source node can modify the first path virtual port number in the target packet to the second path virtual port number, so that the target packet reaches the destination node along the second reference path.

[0393] For example, referring to FIG15, as described above, if the source node H0 determines that the transmission of the target message from the source node H0 to the destination node H4 has failed, it determines that the second reference path following the reference path 2 is the reference path 3. The path virtual port number 7 can be determined as the second path virtual port number corresponding to the second reference path, or the path virtual port number 11 can be determined as the second path virtual port number corresponding to the second reference path.

[0394] The embodiments of steps 3610 to 3630 described above can modify the virtual port number of the first path in the target packet to the virtual port number of the second path by determining a second reference path located after the first reference path and determining the virtual port number of the second path based on the second reference path, so that the target packet reaches the destination node along the second reference path. Since there are few common intermediate nodes between the first reference path and the second reference path, it means that if a failure occurs when the first reference path transmits the target packet, it is very likely that a failure will not occur when using the second reference path, because there are few common intermediate nodes between the two. Using another reference path greatly bypasses the faulty switch, improving the continuity of data flow in packet transmission.

[0395] Referring to Figure 37, step 3610 may include, for example, the following steps.

[0396] Step 3710: In the target lookup table, determine the virtual port numbers of multiple alternative paths corresponding to the second baseline path.

[0397] Step 3720: Obtain historical selection records of multiple alternative path virtual port numbers being selected as the second path virtual port number. This step can also involve obtaining records of the multiple alternative path virtual port numbers being selected in previous baseline path switching events.

[0398] Step 3730: Based on the number of times each of the multiple candidate path virtual port numbers in the historical selection record has been selected as the second path virtual port number, determine the second path virtual port number from among the multiple candidate path virtual port numbers. Alternatively, this step can be based on the number of times each of the multiple candidate path virtual port numbers has been selected in the record, determining the second path virtual port number from among the multiple candidate path virtual port numbers.

[0399] Steps 3710 to 3730 are described in detail below.

[0400] In step 3710, multiple alternative path virtual port numbers corresponding to the second baseline path are determined in the target lookup table.

[0401] It is understood that the alternative path virtual port numbers are multiple path virtual port numbers corresponding to the second baseline path in the target lookup table. For example, referring to Figure 38, if the second baseline path is determined to be baseline path 3, then the multiple alternative path virtual port numbers corresponding to the second baseline path are 7, 11, and 15.

[0402] In step 3720, the historical selection records of multiple alternative path virtual port numbers being selected as the second path virtual port number are obtained.

[0403] It is understandable that the historical selection record of the alternative path virtual port number as the second path virtual port number includes the number of times multiple alternative path virtual port numbers have been selected as the second path virtual port number in the past time period. The selection of an alternative path virtual port number as the second path virtual port number can be understood as the selection of the alternative path virtual port number as the identifier of the second base path when switching from any first base path to this second base path in the past.

[0404] Historical selection records can be used to demonstrate the reliability of each alternative path virtual port number. The more times an alternative path virtual port number is selected as the second path virtual port number in the historical selection records, the higher its reliability. Conversely, the fewer times an alternative path virtual port number is selected as the second path virtual port number in the historical selection records, the lower its reliability.

[0405] For example, referring to Figure 38, as described above, the virtual port numbers of the multiple alternative paths corresponding to the second baseline path are 7, 11, and 15. It can be seen that in the historical selection records, path virtual port number 7 was selected as the second path virtual port number 66 times, path virtual port number 11 was selected as the second path virtual port number 77 times, and path virtual port number 15 was selected as the second path virtual port number 55 times. Based on this, it can be determined that the reliability of path virtual port number 15 is lower, and the reliability of path virtual port number 11 is higher.

[0406] In step 3730, the second path virtual port number is determined from among the multiple candidate path virtual port numbers based on the number of times each candidate path virtual port number has been selected as the second path virtual port number in the historical selection record.

[0407] According to embodiments of this disclosure, the higher the number of times a candidate path virtual port number is selected as the second path virtual port number in the historical selection record, the higher the reliability of that candidate path virtual port number. Therefore, the candidate path virtual port number that is selected as the second path virtual port number more times in the historical selection record can be used as the second path virtual port number to increase the reliability of target packet retransmission.

[0408] For example, referring to FIG38, as described above, the reliability of path virtual port number 15 is low, while the reliability of path virtual port number 11 is high. In this case, path virtual port number 11 can be used as the second path virtual port number, and the first path virtual port number in the target packet can be modified to path virtual port number 11, so that the target packet reaches the destination node along the base path 3.

[0409] In the embodiments described in steps 3710 to 3730 above, the historical selection record can be used to reflect the reliability of each candidate path virtual port number. The higher the number of times a candidate path virtual port number is selected as the second path virtual port number in the historical selection record, the higher the reliability of that candidate path virtual port number. Conversely, the lower the number of times a candidate path virtual port number is selected as the second path virtual port number in the historical selection record, the lower the reliability of that candidate path virtual port number. The embodiments of this disclosure determine the second path virtual port number from among multiple candidate path virtual port numbers based on the number of times they are selected as the second path virtual port number in the historical selection record. This allows for the selection of highly reliable candidate path virtual port numbers as the second path virtual port number, increasing the reliability of target packet retransmission.

[0410] A detailed description of the message transmission method executed by the destination node.

[0411] Figure 39A is a flowchart illustrating a message transmission method performed by a destination node according to various embodiments of the present disclosure. Referring to Figure 39A, the message transmission method is performed by the destination node, which sends acknowledgment responses to the source node through multiple intermediate node layers. The message transmission method may include the following steps.

[0412] Step 3901: Receive the target message sent by the source node.

[0413] Step 3902: Obtain multiple response transmission paths between the destination node and the source node as multiple response reference paths. Each response reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two response reference paths in the multiple response reference paths meets a predetermined condition.

[0414] Step 3903: Send an acknowledgment response to the source node through the first acknowledgment reference path among the multiple acknowledgment reference paths.

[0415] Step 3904: In response to the determination that sending the acknowledgment response to the source node through the first response reference path failed, a second response reference path that is different from the first response reference path is selected from the plurality of response reference paths.

[0416] Step 3905: Transmit the acknowledgment response to the source node through the second response reference path.

[0417] Figure 39B is another flowchart illustrating the message transmission method performed by the destination node according to various embodiments of the present disclosure. Referring to Figure 39B, the message transmission method is performed by the destination node, which sends an acknowledgment response to the source node through multiple intermediate node layers. The message transmission method may include the following steps.

[0418] Step 3910: Receive the target message sent by the source node. Step 3910 can correspond to step 3901.

[0419] Step 3920: Obtain multiple response baseline paths between the destination node and the source node. Each response baseline path passes through at least one intermediate node at each intermediate node layer. The number of overlapping intermediate nodes between any two response baseline paths satisfies a predetermined condition. Step 3920 can correspond to step 3902.

[0420] Step 3930: Obtain the target response lookup table. The target response lookup table indicates the correspondence between the response baseline path and the path virtual port number. The path virtual port number is a virtual port number added to the acknowledgment response when the destination node sends an acknowledgment response. Each response baseline path corresponds to one or more path virtual port numbers. Step 3930 may include steps 3903 or be outside the steps described in Figure 39A.

[0421] Step 3940: In response to the failure to transmit the acknowledgment response from the destination node to the source node, obtain the third path virtual port number from the acknowledgment response.

[0422] Step 3950: In the target response lookup table, determine the fourth path virtual port number that corresponds to a different response baseline path as the third path virtual port number.

[0423] Steps 3940 and 3950 may be included in step 3904.

[0424] Step 3960: Modify the third path virtual port number in the acknowledgment response to the fourth path virtual port number, so that the acknowledgment response reaches the source node along the response baseline path corresponding to the fourth path virtual port number. Step 3960 may include step 3905.

[0425] Since a server can act as both a source node and a destination node for another server, the methods described in the various embodiments executed by the source node and the destination node can be executed by the same server. Alternatively, the acknowledgment response described above can be the target message in other embodiments.

[0426] Steps 3910 to 3960 are described in detail below:

[0427] In step 3910, the target message sent by the source node is received.

[0428] According to embodiments of this disclosure, the source node determines a reference path for transmitting the target packet based on multiple reference paths between the source node and the destination node. The virtual port number corresponding to this reference path is then added to the target packet, so that the target packet reaches the destination node along the reference path corresponding to the virtual port number, and the destination node receives the target packet sent by the source node.

[0429] In step 3920, multiple response reference paths between the destination node and the source node are obtained. Each response reference path passes through at least one intermediate node at each intermediate node layer. The number of intermediate nodes that overlap between any two response reference paths among the multiple response reference paths meets a predetermined condition.

[0430] According to embodiments of this disclosure, multiple acknowledgment reference paths are further established between the destination node and the source node. The acknowledgment reference path is similar to the reference path. The reference path refers to the transmission path maintained by the source node for transmitting the target message to the destination node, while the acknowledgment reference path refers to the transmission path maintained by the destination node for sending an acknowledgment response corresponding to the target message to the source node. Specifically, after successfully receiving the target message sent by the source node, the destination node returns an acknowledgment response to the target message to the source node, so that the source node is aware that the destination node has received the target message.

[0431] It is understood that the specific implementation of the embodiment of this disclosure of "obtaining multiple response reference paths between the destination node and the source node, wherein the response reference path passes through at least one intermediate node at each intermediate node layer, and the number of intermediate nodes overlapping between any two response reference paths in the multiple response reference paths satisfies a predetermined condition" is similar to the specific implementation of step 310 above, and will not be described in detail here.

[0432] In step 3930, a target response lookup table is obtained. The target response lookup table indicates the correspondence between the response baseline path and the path virtual port number. The path virtual port number is a virtual port number added in the acknowledgment response when the destination node sends an acknowledgment response. Each response baseline path corresponds to one or more path virtual port numbers.

[0433] According to embodiments of this disclosure, the destination node maintains a target-response lookup table. Similar to the target lookup table maintained by the source node, the target lookup table indicates the correspondence between the base path and the path virtual port number, while the target-response lookup table indicates the correspondence between the response base path and the path virtual port number.

[0434] It is understood that the specific implementation of the embodiment of this disclosure of "obtaining a target response lookup table, the target response lookup table indicating the correspondence between the response reference path and the path virtual port number, the path virtual port number being the virtual port number added in the acknowledgment response when the destination node sends an acknowledgment response, and each response reference path corresponding to one or more path virtual port numbers" is similar to the specific implementation of step 320 above, and will not be described in detail here.

[0435] In step 3940, in response to determining that the transmission of the acknowledgment response from the destination node to the source node failed, the third path virtual port number in the acknowledgment response is obtained.

[0436] According to embodiments of this disclosure, the third path virtual port number refers to the path virtual port number added in the acknowledgment response that the destination node fails to transmit to the source node. If the destination node fails to transmit the acknowledgment response to the source node, it indicates that there is a faulty intermediate node in the acknowledgment base path that transmits the acknowledgment response. The faulty intermediate node cannot forward the acknowledgment response to the next-hop intermediate node, thereby causing the source node to be unable to receive the acknowledgment response and also unable to confirm whether the destination node has successfully received the target packet.

[0437] In step 3950, in the target response lookup table, the fourth path virtual port number that corresponds to a different response baseline path as the third path virtual port number is determined.

[0438] According to embodiments of this disclosure, the fourth path virtual port number refers to the path virtual port number corresponding to a response reference path that is different from the response reference path identified by the third path virtual port number.

[0439] It is understood that the specific implementation of "determining the fourth path virtual port number in the target response lookup table that corresponds to a different response baseline path as the third path virtual port number" in this embodiment of the present disclosure is similar to the specific implementation of step 340 above, and will not be described in detail here.

[0440] In step 3960, the third path virtual port number in the acknowledgment response is modified to the fourth path virtual port number so that the acknowledgment response reaches the source node along the response reference path corresponding to the fourth path virtual port number.

[0441] It is understood that the specific implementation of "modifying the third path virtual port number in the confirmation response to the fourth path virtual port number so that the confirmation response reaches the source node along the response reference path corresponding to the fourth path virtual port number" in this embodiment of the present disclosure is similar to the specific implementation of step 350 above, and will not be described in detail here.

[0442] The embodiments described in steps 3910 to 3960 establish a target response lookup table between path virtual port numbers and response reference paths. The number of overlapping intermediate nodes between any two response reference paths satisfies a predetermined condition. Fewer identical intermediate nodes between response reference paths mean that if a failure occurs when transmitting an acknowledgment response using one response reference path, it is highly likely that a failure will not occur using another response reference path, as the two have fewer identical intermediate nodes. Using another response reference path significantly bypasses the faulty switch. In this embodiment, when a failure occurs while transmitting an acknowledgment response through one response reference path, the third path virtual port number, unique to this embodiment, is identified in the acknowledgment response. The target response lookup table is searched, and the virtual port number is replaced with a fourth path virtual port number corresponding to a different response reference path than the third path virtual port number. Since changing the path virtual port number effectively changes the response reference path, and the response reference path has the aforementioned characteristics, the faulty switch is bypassed with a very high probability, improving the continuity of data flow during message transmission.

[0443] Referring to Figure 40, step 3940 may include, for example:

[0444] Step 4010: Add the third path virtual port number to the confirmation response.

[0445] Step 4020: Transmit an acknowledgment response from the destination node to the source node.

[0446] Step 4030: If the fourth identical target message is received from the source node, determine that the transmission acknowledgment response has failed.

[0447] Steps 4010 to 4030 are described in detail below:

[0448] In step 4010, the third path virtual port number is added to the confirmation response.

[0449] It is understood that the specific implementation of "adding a third path virtual port number in the confirmation response" in this embodiment of the present disclosure is similar to the specific implementation of step 2710 above, and will not be described in detail here.

[0450] In step 4020, an acknowledgment response is transmitted from the destination node to the source node.

[0451] It is understood that the specific implementation of "transmitting an acknowledgment response from the destination node to the source node" in this embodiment is similar to the specific implementation of step 2720 above, and will not be described in detail here.

[0452] In step 4030, if a fourth identical target message is received from the source node, it is determined that the transmission acknowledgment response has failed.

[0453] According to embodiments of this disclosure, the fourth number refers to the number of identical target packets sent by the source node that the destination node is allowed to receive if the source node has successfully received the acknowledgment response. The fourth number can be determined based on the actual acknowledgment response transmission situation. If the data center network used for transmitting the acknowledgment response is complex, the fourth number can be set larger. If the data center network used for transmitting the acknowledgment response is simple, the fourth number can be set smaller. If the application scenario has high requirements for the continuity of the data flow in packet transmission, the fourth number can be set smaller. If the application scenario does not have high requirements for the continuity of the data flow in packet transmission, the fourth number can be set larger.

[0454] Understandably, if the destination node receives the fourth identical target message sent by the source node, it means that the destination node has not successfully received the acknowledgment response. In other words, there is a faulty intermediate node in the acknowledgment response transmission path, causing the acknowledgment responses to accumulate or even be lost among intermediate nodes.

[0455] The specific method for "determining that the transmission acknowledgment response has failed if a fourth identical target message is received from the source node" will be described in detail below.

[0456] In the embodiments of steps 4010 to 4030 above, if the destination node receives a fourth number of identical target messages sent by the source node, the transmission acknowledgment response fails. This fourth number can be determined based on the actual application scenario. If the application scenario has high requirements for the continuity of the data flow in message transmission, the fourth number can be set smaller. If the application scenario does not have high requirements for the continuity of the data flow in message transmission, the fourth number can be set larger. Based on this, the message transmission method of this disclosure embodiment can be applied to different application scenarios, increasing the adaptability of this disclosure embodiment.

[0457] Referring to Figure 41, step 4030 may include, for example:

[0458] Step 4110: Insert the second detection logic into the transmission control protocol processing code of the destination node.

[0459] Step 4120: Enable the second detection logic to detect the receipt of a fourth number of identical target packets sent by the source node, thereby determining that the transmission acknowledgment response has failed.

[0460] Steps 4110 and 4120 are described in detail below.

[0461] In step 4110, a second detection logic is inserted into the transmission control protocol processing code of the destination node.

[0462] According to embodiments of this disclosure, the second detection logic is added to the original processing logic in the transmission control protocol processing code. By inserting the second detection logic into the transmission control protocol processing code, the destination node can actively count the identical target packets received from the source node, and determine whether the transmission acknowledgment response has failed based on the number of identical target packets received.

[0463] In step 4120, the second detection logic is enabled to detect the receipt of a fourth number of identical target messages sent by the source node, thereby determining that the transmission acknowledgment response has failed.

[0464] It is understood that the operation of the destination node detecting the number of identical target packets received from the source node in this embodiment relies on the second detection logic inserted in the transmission control protocol processing code. Therefore, whenever the destination node sends an acknowledgment, the second detection logic can be enabled to detect the number of identical target packets received from the source node in real time, in order to determine whether the transmission acknowledgment has failed.

[0465] The embodiments of steps 4110 and 4120 above, by inserting second detection logic into the transmission control protocol processing code of the destination node, actively count the received identical target packets sent by the source node, based on the original processing logic. These steps allow for rapid detection of transmission acknowledgment failure events, facilitating subsequent responses to transmission acknowledgment failures by modifying the third-path virtual port number in the acknowledgment to the fourth-path virtual port number, thus improving the continuity of the data flow during packet transmission.

[0466] Referring to Figure 42, after step 3910, or after step 3901 in Figure 39A, the message transmission method may include:

[0467] Step 4210: Delete the path virtual port number in the route source port number field of the target packet and the destination port number in the route destination port number field of the target packet.

[0468] Step 4220: Put the route source port number from the reserved field in the target message into the route source port number field, and put the route destination port number from the reserved field into the route destination port number field.

[0469] Step 4230: Modify the length of the checksum field and the address header field of the target message.

[0470] Steps 4210 to 4230 are described in detail below.

[0471] In step 4210, the path virtual port number in the routing source port number field of the target packet and the destination port number in the routing destination port number field of the target packet are deleted.

[0472] After receiving the target packet from the source node, the destination node can restore the data structure of the target packet (which includes the source port number, destination port number, transport protocol number, source address, and destination address) to its original structure. This makes the processing of the target packet in this embodiment transparent to the transport control protocol layer. Furthermore, the reason for making the processing of the target packet transparent to the transport protocol layer is that the destination node needs to verify the data structure of the target packet upon receipt to determine if the data is erroneous. If the destination node cannot restore the original data structure of the target packet, the data in the target packet will be deemed erroneous.

[0473] It is understandable that, since the first path virtual port number and the destination port number are path attributes defined in this embodiment of the disclosure and do not belong to the original data structure of the target packet, the path virtual port number in the routing source port number field of the target packet and the destination port number in the routing destination port number field of the target packet can be deleted first.

[0474] In step 4220, the route source port number in the reserved field of the target message is placed into the route source port number field, and the route destination port number in the reserved field is placed into the route destination port number field.

[0475] Understandably, after deleting the path virtual port number from the source port number field and the destination port number from the destination port number field in the destination packet, the source port number and destination port number fields in the destination packet become empty. At this point, the source port number from the reserved field can be placed into the source port number field, and the destination port number from the reserved field can be placed into the destination port number field, as shown in Figure 43.

[0476] In step 4230, the length of the checksum field and the length of the address header field of the target message are modified.

[0477] Understandably, after placing the source port number from the reserved field in the destination packet into the source port number field and the destination port number from the reserved field into the destination port number field, since the lengths of both the source and destination port number fields have been restored, the lengths of the checksum field and the address header field in the destination packet can be modified accordingly to completely restore the data structure of the destination packet to its original state. In this case, after the destination node verifies the restored data structure of the destination packet, the data in the destination packet will be determined to be error-free.

[0478] The embodiments of steps 4210 to 4230 above, by deleting the path virtual port number in the routing source port number field and the destination port number in the routing destination port number field of the target packet, eliminate the path attribute defined in this embodiment of the disclosure, and initially restore the data structure of the target packet. Furthermore, by placing the routing source port number from the reserved field in the target packet into an empty routing source port number field, placing the routing destination port number into an empty routing destination port number field, and modifying the length of the checksum field and the address header field of the target packet, the data structure of the target packet is completely restored to its original structure. Through the above steps, the processing of the target packet can be made transparent to the transmission control protocol layer while changing the routing process of the source node and the intermediate node, avoiding interference with the transmission of the target packet.

[0479] Detailed implementation diagrams of the message transmission method according to the embodiments of this disclosure.

[0480] Referring to FIG44, the implementation details of the message transmission method of this disclosure embodiment, executed by the source node, including the overall controller and the internal processing logic of the source node, will be described in detail by way of exemplary embodiment.

[0481] In step 4411, the path control logic is used to obtain a set of candidate paths between the source node and the destination node. The set of candidate paths contains a first number of candidate paths, and multiple baseline paths contain a second number of baseline paths. The first number is greater than the second number.

[0482] Obtaining a set of candidate paths between the source node and the destination node may include: determining the first route number from the source node to the intermediate node of the first intermediate node layer based on the total number of the first outgoing ports of the source node; determining the second route number from a single intermediate node to the intermediate node of the next intermediate node layer based on the total number of the second outgoing ports of a single intermediate node in the intermediate node layer; generating a routing topology graph between the source node and the destination node based on the first route number and the second route number corresponding to each intermediate node layer; and obtaining multiple candidate paths between the source node and the destination node on the routing topology graph to generate a set of candidate paths.

[0483] In step 4412, the path control logic is used to take turns using each candidate path in the candidate path set as the anchor path; and to calculate the number of intermediate nodes that overlap with the anchor path in other candidate paths in the candidate path set.

[0484] In step 4413, if the number of overlapping intermediate nodes is greater than the third number, the path control logic is used to remove other candidate paths from the candidate path set.

[0485] The third number can be determined as follows: determine the total number of first output ports of the source node; determine the total number of second output ports of a single intermediate node in each intermediate node layer; determine the maximum and minimum values ​​of the total number of first output ports and the total number of second output ports corresponding to each intermediate node layer; calculate the difference between the maximum and minimum values ​​as the third number.

[0486] In step 4414, the path control logic is used to use the remaining candidate paths in the candidate path set as multiple baseline paths after each candidate path has been used as an anchor path.

[0487] In step 4421, the main controller is used to obtain the set of path virtual port numbers.

[0488] The main controller can also be used to configure the same first hash algorithm and first hash seed for multiple servers, where the source node and the destination node are any one of the multiple servers; and for each intermediate node layer, configure the same second hash algorithm and second hash seed for each intermediate node in the intermediate node layer.

[0489] In step 4422, the main controller is used to allocate the set of path virtual port numbers to multiple first output ports of the source node, and to allocate the set of path virtual port numbers to multiple second output ports of the intermediate node layer for each intermediate node layer.

[0490] Assigning the set of path virtual port numbers to multiple first output ports of the source node, and assigning the set of path virtual port numbers to multiple second output ports of each intermediate node layer, for example, may include: constructing a probe message for each path virtual port number in the set of path virtual port numbers, the probe message having a transport protocol number, a path virtual port number, a source address corresponding to the source node, a destination address corresponding to the destination node, and a destination port number corresponding to the destination node; sending the probe message from the source node; identifying the first output port of the probe message output by the source node and the second output ports of the probe message output by each intermediate node layer, and assigning the path virtual port number to the first output port and the second output port.

[0491] For each intermediate node layer, the set of path virtual port numbers is assigned to multiple second outgoing ports of the intermediate node layer. For example, this may include: identifying key node layers from each intermediate node layer; and assigning the set of path virtual port numbers to multiple second outgoing ports of the key node layer for each key node layer.

[0492] In step 4423, the path control logic is used to determine the path virtual port number corresponding to the base path based on the path virtual port numbers assigned to the source node and each intermediate node on the base path.

[0493] Based on the path virtual port numbers assigned to the source node and each intermediate node on the baseline path, the path virtual port number corresponding to the baseline path is determined. For example, it may include: generating a set of single-node path virtual port numbers based on the path virtual port numbers assigned to the source node or intermediate node on the baseline path; taking the intersection of the set of single-node path virtual port numbers corresponding to the source node and each intermediate node, and using each path virtual port number in the intersection as the path virtual port number corresponding to the baseline path.

[0494] Based on the path virtual port numbers assigned to the source node and each intermediate node on the baseline path, the path virtual port number corresponding to the baseline path is determined. For example, it may include: determining the path virtual port number corresponding to the baseline path based on the path virtual port numbers assigned to the source node and intermediate nodes in the critical node layer on the baseline path.

[0495] In step 4424, the path control logic is used to store the baseline path and the corresponding virtual port number of the path to generate a target lookup table.

[0496] In step 4431, the path control logic is used to obtain multiple reference paths between the source node and the destination node. Each reference path passes through at least one intermediate node at each intermediate node layer. The number of intermediate nodes that overlap between any two reference paths meets a predetermined condition. A target lookup table is obtained, which indicates the correspondence between reference paths and path virtual port numbers. The path virtual port number is a virtual port number added to the target message when the source node sends the target message. Each reference path corresponds to one or more path virtual port numbers.

[0497] In step 4432, the path switching logic is used to add the first path virtual port number to the target packet.

[0498] Before adding the first path virtual port number to the target message, the path control logic can be used to: obtain the current pointer corresponding to the destination node; determine the base path pointed to by the current pointer in the base path table; and find the path virtual port number corresponding to the base path in the target lookup table, and use it as the first path virtual port number.

[0499] After adding the first path virtual port number to the target message, the path control logic can be used to: increment the current pointer by 1, so that when transmitting other messages after the target message from the source node to the destination node, the reference path pointed to by the next pointer of the current pointer is determined in the reference path table.

[0500] The path switching logic can be used to put the routing source port number in the routing source port number field of the target packet into the reserved field of the target packet; and to add the first path virtual port number to the routing source port number field.

[0501] The path switching logic can also be used to put the route destination port number in the route destination port number field of the target packet into the reserved field of the target packet; add the pre-selected destination port number to the route destination port number field; and modify the length of the checksum field and the address header field of the target packet.

[0502] In step 4433, the path switching logic is used to transmit the target message from the source node to the destination node.

[0503] In step 4434, if no acknowledgment response is received from the destination node within a preset first time period, the first detection logic is used to determine that the transmission of the target message has failed.

[0504] In step 4435, the event handling logic is used to determine that the transmission of the target message has failed and to request the path control logic to switch routes.

[0505] In step 4441, the path control logic is used to determine the first base path corresponding to the first path virtual port number in the target lookup table.

[0506] In step 4442, the path control logic is used to determine the second reference path located after the first reference path in the reference path table.

[0507] In step 4443, the path control logic is used to determine the second path virtual port number corresponding to the second baseline path in the target lookup table.

[0508] In the target lookup table, the virtual port number of the second path corresponding to the second baseline path is determined. This may include, for example, determining multiple alternative virtual port numbers corresponding to the second baseline path in the target lookup table; obtaining historical selection records of the multiple alternative virtual port numbers being selected as the second path virtual port number; and determining the second path virtual port number from among the multiple alternative virtual port numbers based on the number of times the multiple alternative virtual port numbers were selected as the second path virtual port number in the historical selection records. The historical selection records of the multiple alternative virtual port numbers being selected as the second path virtual port number are records of the multiple alternative virtual port numbers being selected in previously occurred baseline path switching.

[0509] In step 4444, the path switching logic is used to modify the first path virtual port number in the target packet to the second path virtual port number, so that the target packet reaches the destination node along the base path corresponding to the second path virtual port number.

[0510] Description of apparatus and devices according to embodiments of this disclosure

[0511] It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0512] In various specific embodiments of this application, when processing data related to object characteristics, such as object attribute information or sets of attribute information, is required, the object's permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. Additionally, when embodiments of this application require obtaining object attribute information, separate permission or consent from the object is obtained through pop-ups or redirection to a confirmation page. Only after obtaining the object's separate permission or consent is the necessary object-related data required for the proper functioning of these embodiments is obtained.

[0513] Figure 45A is a schematic diagram of a message transmission device provided in an embodiment of this disclosure. The message transmission device is disposed in a source node, which sends a target message to a destination node through multiple intermediate node layers. The message transmission device includes:

[0514] The first unit is used to select multiple message transmission paths between the source node and the destination node as multiple reference paths. Each reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two reference paths in the multiple reference paths satisfies a predetermined condition.

[0515] The second unit is used to transmit the target message to the destination node through the first reference path among the multiple reference paths;

[0516] The third unit is configured to select a second reference path, which is different from the first reference path, among the multiple reference paths in response to determining that the transmission of the target message to the destination node via the first reference path has failed.

[0517] The fourth unit is used to transmit the target message to the destination node via the second reference path.

[0518] The specific descriptions of the first unit, second unit, third unit, and fourth unit mentioned above, as well as their relationship with the first acquisition unit 4510, second acquisition unit 4520, first response unit 4530, first determination unit 4540, and first modification unit 4550, can be found in the descriptions in the method embodiments.

[0519] Figure 45B is another structural schematic diagram of the message transmission device provided in an embodiment of this disclosure. This message transmission device is disposed in the source node, which sends the target message to the destination node through multiple intermediate node layers. The message transmission device includes:

[0520] The first acquisition unit 4510 is used to acquire multiple reference paths between the source node and the destination node. Each reference path passes through at least one intermediate node at each intermediate node layer, and the number of overlapping intermediate nodes between any two reference paths satisfies a predetermined condition. The first acquisition unit 4510 may be included in the first unit or may be interchanged with it.

[0521] The second acquisition unit 4520 is used to acquire a target lookup table. The target lookup table indicates the correspondence between the base path and the path virtual port number. The path virtual port number is a virtual port number added to the target message when the source node sends the target message. Each base path corresponds to one or more path virtual port numbers. The target lookup table indicates the correspondence between the multiple base paths and a series of path virtual port numbers. Each base path is identified by one or more path virtual port numbers.

[0522] The first response unit 4530 is used to obtain the first path virtual port number in the target message in response to the determination that the transmission of the target message from the source node to the destination node has failed.

[0523] The first determining unit 4540 is used to determine, in the target lookup table, a second path virtual port number that corresponds to a different reference path than the first path virtual port number.

[0524] The first response unit 4530 and the first determination unit 4540 may be included in the third unit described above.

[0525] The first modification unit 4550 is used to modify the first path virtual port number in the target packet to the second path virtual port number, so that the target packet reaches the destination node along the base path corresponding to the second path virtual port number. The first modification unit 4550 may be included in the fourth unit described above.

[0526] For example, the second acquisition unit 4520 is specifically used for:

[0527] Determine the set of path virtual port numbers; the set of path virtual port numbers includes the series of path virtual port numbers;

[0528] Assign the set of path virtual port numbers to multiple first outgoing ports of the source node, and for each intermediate node layer, assign the set of path virtual port numbers to multiple second outgoing ports of the intermediate node layer.

[0529] Based on the path virtual port numbers assigned to the source node and each intermediate node on the baseline path, determine the path virtual port number corresponding to the baseline path.

[0530] The baseline path and the corresponding virtual port number of the path are stored to generate a target lookup table.

[0531] For example, the second acquisition unit 4520 is specifically used for:

[0532] For each path virtual port number in the path virtual port number set, construct a probe message. The probe message has a transport protocol number, path virtual port number, source address corresponding to the source node, destination address corresponding to the destination node, and destination port number corresponding to the destination node.

[0533] Send a probe message from the source node;

[0534] Identify the first output port of the probe message output by the source node and the second output port of the probe message output by each intermediate node layer, and assign the path virtual port number to the first output port and the second output port.

[0535] For example, the second acquisition unit 4520 is specifically used for:

[0536] Based on the path virtual port numbers assigned to the source node or intermediate node on the baseline path, generate a set of single-node path virtual port numbers.

[0537] Take the intersection of the set of single-node path virtual port numbers corresponding to the source node and each intermediate node, and use each path virtual port number in the intersection as the path virtual port number corresponding to the base path.

[0538] For example, the second acquisition unit 4520 generates a set of single-node path virtual port numbers for each of the source node and the intermediate nodes based on the path virtual port numbers assigned to a first output port of the source node and the multiple second output ports of the intermediate nodes on each reference path; takes the intersection of the single-node path virtual port number sets corresponding to the source node and each intermediate node, and uses at least one path virtual port number in the intersection as the one or more path virtual port numbers corresponding to the reference path.

[0539] For example, the second acquisition unit 4520 is specifically used for:

[0540] Identify the key node layers from each intermediate node layer;

[0541] For each critical node layer, the set of path virtual port numbers is allocated to multiple second outgoing ports of the critical node layer;

[0542] Based on the path virtual port numbers assigned to the source node and intermediate nodes in the critical node layer on the baseline path, the path virtual port number corresponding to the baseline path is determined.

[0543] For example, the second acquisition unit 4520 identifies at least one key node layer from each intermediate node layer; and assigns the set of path virtual port numbers to the second outgoing port of each key node layer. The step of determining the one or more path virtual port numbers identifying each base path based on the path virtual port numbers assigned to the source node and each intermediate node on each base path includes: determining the one or more path virtual port numbers corresponding to the base path based on a first outgoing port of the source node on each base path and the path virtual port numbers assigned to the second outgoing ports of the intermediate nodes in the key node layer.

[0544] For example, the first acquisition unit 4510 is specifically used for:

[0545] Obtain a set of candidate paths between the source node and the destination node. The set of candidate paths contains a first number of candidate paths, and multiple baseline paths contain a second number of baseline paths. The first number is greater than the second number.

[0546] Each candidate path in the candidate path set is used as an anchor path in turn, and for each anchor path, the following steps are performed: calculate the number of intermediate nodes that overlap with the anchor path in each second candidate path other than the anchor path in the candidate path set, where the anchor path is the first candidate path; if the number of intermediate nodes that overlap with the anchor path in a certain second candidate path is greater than a third number, it is determined that the second candidate path should be removed from the candidate path set.

[0547] After all candidate paths have been used as anchor paths and the above steps have been performed, the remaining candidate paths in the candidate path set are used as multiple baseline paths. The remaining candidate paths are the candidate paths after removing the second candidate path determined to be removed from the candidate path set.

[0548] For example, the first acquisition unit 4510 is specifically used for:

[0549] Based on the total number of the first outgoing ports of the source node, determine the first route number from the source node to the intermediate node of the first intermediate node layer;

[0550] Based on the total number of second outgoing ports of a single intermediate node in the intermediate node layer, determine the second route number from a single intermediate node to the intermediate node in the next intermediate node layer;

[0551] Based on the first number of routes and the second number of routes corresponding to each intermediate node layer, a routing topology map between the source node and the destination node is generated.

[0552] On the routing topology graph, obtain multiple candidate paths between the source node and the destination node to generate a candidate path set.

[0553] For example, the first acquisition unit 4510 is specifically used for:

[0554] Determine the total number of the first output ports of the source node;

[0555] Determine the total number of second output ports for a single intermediate node in each intermediate node layer;

[0556] Determine the maximum and minimum values ​​of the total number of first output ports and the total number of second output ports corresponding to each intermediate node layer;

[0557] Calculate the difference between the maximum and minimum values, and use it as the third number.

[0558] For example, the second acquisition unit 4520 is specifically used for:

[0559] Configure the same first hash algorithm and first hash seed for multiple servers, where the source node and the destination node are any one of the multiple servers;

[0560] For each intermediate node layer, configure the same second hash algorithm and second hash seed for each intermediate node in the intermediate node layer.

[0561] For example, the first response unit 4530 is specifically used for:

[0562] Add the first path virtual port number to the target message;

[0563] Transmit the target message from the source node to the destination node;

[0564] If no acknowledgment response is received from the destination node within the preset first time, the transmission of the target message is deemed to have failed.

[0565] For example, the first response unit 4530 is specifically used for:

[0566] Obtain the current pointer corresponding to the destination node. The current pointer refers to the position of the reference path applicable to the target message transmitted from the current source node to the destination node in the reference path table.

[0567] In the baseline path table, determine the first baseline path that the current pointer points to;

[0568] In the target lookup table, find the virtual port number corresponding to the first baseline path and use it as the first path virtual port number.

[0569] For example, the first response unit 4530 is specifically used for:

[0570] Increment the current pointer by 1, so that when transmitting other packets after the target packet from the source node to the destination node, the reference path pointed to by the next pointer in the reference path table is determined.

[0571] For example, the first response unit 4530 is specifically used for:

[0572] Insert the first detection logic into the transmission control protocol processing code of the source node;

[0573] The first detection logic is enabled to detect if no acknowledgment response is received from the destination node within a preset first time period, thereby determining that the transmission of the target message has failed.

[0574] For example, the first response unit 4530 is specifically configured to: place the routing source port number from the routing source port number field in the target packet into the reserved field of the target packet; and add the first path virtual port number to the routing source port number field. For example, the first response unit 4530 places the routing source port number of the target packet into the reserved field of the target packet, the reserved field being different from the routing source port number field of the target packet; and adds the first identifier of the first base path to the routing source port number field.

[0575] For example, the first response unit 4530 is specifically used for:

[0576] Place the destination port number from the destination port number field in the destination packet into the reserved field of the destination packet;

[0577] Add the pre-selected destination port number to the route destination port number field;

[0578] Modify the length of the checksum field and the address header field of the target message.

[0579] For example, the first determining unit 4540 is specifically used for:

[0580] In the target lookup table, determine the first baseline path corresponding to the first path virtual port number;

[0581] In the baseline path table, determine the second baseline path that follows the first baseline path;

[0582] In the target lookup table, determine the virtual port number of the second path corresponding to the second baseline path.

[0583] For example, the first determining unit 4540 is specifically used for:

[0584] In the target lookup table, determine the virtual port numbers of multiple alternative paths corresponding to the second baseline path;

[0585] Retrieve historical selection records of multiple alternative path virtual port numbers that were selected as the second path virtual port number;

[0586] Based on the number of times each of the multiple candidate path virtual port numbers in the historical selection record has been selected as the second path virtual port number, the second path virtual port number is determined from the multiple candidate path virtual port numbers.

[0587] The historical selection record of the multiple alternative path virtual port numbers being selected as the second path virtual port number is the record of the multiple alternative path virtual port numbers being selected in the baseline path switching that has occurred.

[0588] Figure 46A is a schematic diagram of the structure of a message transmission device provided in an embodiment of this disclosure. The message transmission device provided in an embodiment of this disclosure may include:

[0589] The fifth unit is used to receive the target message sent by the source node;

[0590] The sixth unit is used to obtain multiple response transmission paths between the destination node and the source node as multiple response reference paths. Each response reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two response reference paths in the multiple response reference paths meets a predetermined condition.

[0591] The seventh unit is used to send an acknowledgment response to the source node through the first acknowledgment reference path among the multiple acknowledgment reference paths;

[0592] The eighth unit is configured to select a second response reference path that is different from the first response reference path among the plurality of response reference paths in response to determining that sending the acknowledgment response to the source node through the first response reference path has failed.

[0593] The ninth unit is used to transmit the acknowledgment response to the source node via the second response reference path.

[0594] Figure 46B is a schematic diagram of the structure of a message transmission device 4600 provided in an embodiment of this disclosure. The message transmission device 4600 is disposed in a destination node, and the destination node sends acknowledgment responses to the source node through multiple intermediate node layers. The message transmission device 4600 includes:

[0595] The first receiving unit 4610 is used to receive the target message sent by the source node;

[0596] The third acquisition unit 4620 is used to acquire multiple response reference paths between the destination node and the source node. Each response reference path passes through at least one intermediate node at each intermediate node layer. The number of intermediate nodes that overlap between any two response reference paths in the multiple response reference paths meets a predetermined condition.

[0597] The fourth acquisition unit 4630 is used to acquire the target response lookup table. The target response lookup table indicates the correspondence between the response baseline path and the path virtual port number. The path virtual port number is the virtual port number added in the acknowledgment response when the destination node sends the acknowledgment response. Each response baseline path corresponds to one or more path virtual port numbers.

[0598] The second response unit 4640 is used to obtain the third path virtual port number in the acknowledgment response in response to the determination that the transmission of the acknowledgment response from the destination node to the source node has failed.

[0599] The second determining unit 4650 is used to determine, in the target response lookup table, the fourth path virtual port number that corresponds to a different response baseline path as the third path virtual port number.

[0600] The second modification unit 4660 is used to modify the third path virtual port number in the acknowledgment response to the fourth path virtual port number, so that the acknowledgment response reaches the source node along the response reference path corresponding to the fourth path virtual port number.

[0601] Referring to Figures 46A and 46B, the third acquisition unit 4620 may correspond to the sixth unit, the fourth acquisition unit 4630 may be included in the seventh unit, or may be included outside the device described in Figure 46A, and the second response unit 4640 and the second determination unit 4650 may be included in the ninth unit.

[0602] For example, the second response unit 4640 is specifically used for:

[0603] Add the third-path virtual port number to the confirmation response;

[0604] Transmit an acknowledgment response from the destination node to the source node;

[0605] If a fourth identical target message is received from the source node, it is determined that the transmission acknowledgment response has failed.

[0606] For example, the second response unit 4640 is specifically used for:

[0607] Insert a second detection logic into the transmission control protocol processing code at the destination node;

[0608] A second detection logic is enabled to detect the receipt of a fourth number of identical target packets sent by the source node, thereby determining that the transmission acknowledgment response has failed.

[0609] For example, the message transmission device 4600 also includes a message recovery unit, which is specifically used for:

[0610] Delete the path virtual port number in the route source port number field of the target packet and the destination port number in the route destination port number field of the target packet;

[0611] Place the route source port number from the reserved field in the target message into the route source port number field, and place the route destination port number from the reserved field into the route destination port number field.

[0612] Modify the length of the checksum field and the address header field of the target message.

[0613] Referring to Figure 47, which is a structural block diagram of a portion of a terminal implementing the message transmission method of this disclosure, the terminal includes: a radio frequency (RF) circuit 4710, a memory 4715, an input unit 4730, a display unit 4740, a sensor 4750, an audio circuit 4760, a wireless fidelity (WiFi) module 4770, a processor 4780, and a power supply 4790, among other components. Those skilled in the art will understand that the terminal structure shown in Figure 47 does not constitute a limitation on a mobile phone or computer, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0614] The RF circuit 4710 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and processes it with the processor 4780; in addition, it transmits uplink data to the base station.

[0615] The memory 4715 can be used to store software programs and modules, and the processor 4780 executes various functional applications and data processing of the content terminal by running the software programs and modules stored in the memory 4715.

[0616] The input unit 4730 can be used to receive input numeric or character information, and to generate key signal inputs related to the settings and function control of the content terminal. Specifically, the input unit 4730 may include a touch panel 4731 and other input devices 4732.

[0617] Display unit 4740 can be used to display input or provided information, as well as various menus of the content terminal. Display unit 4740 may include display panel 4741.

[0618] Audio circuitry 4760, speaker 4761, and microphone 4762 provide an audio interface.

[0619] In this embodiment, the processor 4780 included in the terminal can execute the message transmission method of the previous embodiment.

[0620] The terminals disclosed in this embodiment include, but are not limited to, mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle terminals, and aircraft. The embodiments of this invention can be applied to various scenarios, including but not limited to cloud service transmission and large model training data transmission.

[0621] Figure 48 is a partial structural block diagram of a server implementing the message transmission method of this disclosure. The server can vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 4822 (e.g., one or more processors) and memory 4832, and one or more storage media 4830 (e.g., one or more mass storage devices) storing application programs 4842 or data 4844. The memory 4832 and storage media 4830 may be temporary or persistent storage. The program stored in the storage media 4830 may include one or more modules (not shown in the figure), each module including a series of instruction operations on the server. Furthermore, the CPU 4822 may be configured to communicate with the storage media 4830 and execute the series of instruction operations in the storage media 4830 on the server.

[0622] The server may also include one or more power supplies 4826, one or more wired or wireless network interfaces 4850, one or more input / output interfaces 4858, and / or one or more operating systems 4841, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0623] The central processing unit 4822 in the server can be used to execute the message transmission method of the embodiments of this disclosure.

[0624] This disclosure also provides a computer-readable storage medium for storing program code for executing the message transmission methods of the foregoing embodiments.

[0625] This disclosure also provides a computer program product comprising a computer program. A processor of a computer device reads and executes the computer program, causing the computer device to perform the message transmission method described above.

[0626] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar terms and are not necessarily used to describe a particular order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this disclosure described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “including,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0627] It should be understood that in this disclosure, "at least one item" refers to one or more items, and "more than one item" refers to two or more items. "And / or" is used to describe the relationship between related content, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related content are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0628] It should be understood that in the description of the embodiments disclosed herein, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0629] In the embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0630] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0631] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0632] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server 130, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0633] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects.

[0634] The above is a detailed description of the embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A message transmission method, characterized in that, Executed by the source node, the method includes: Multiple message transmission paths between the source node and the destination node are selected as multiple reference paths. Each reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two reference paths in the multiple reference paths meets a predetermined condition. The target message is transmitted to the destination node via the first reference path among the multiple reference paths; In response to determining that transmitting the target message to the destination node via the first reference path has failed, a second reference path different from the first reference path is selected from the plurality of reference paths; The target message is transmitted to the destination node via the second reference path.

2. The message transmission method according to claim 1, characterized in that, The transmission of the target message to the destination node via the first reference path among the multiple reference paths includes: The routing source port number of the target packet is placed in the reserved field of the target packet, and the reserved field is different from the routing source port number field of the target packet; Add the first identifier of the first base path to the route source port number field; The transmission of the target message to the destination node via the second reference path includes: Modify the first identifier in the routing source port number field to the second identifier of the second base path.

3. The message transmission method according to claim 1 or 2, characterized in that, The method further includes: Obtain a target lookup table, which indicates the correspondence between the multiple base paths and a series of path virtual port numbers, with each base path identified by one or more path virtual port numbers; Selecting a second reference path that is different from the first reference path from the plurality of reference paths includes: Obtain the first path virtual port number from the target message, where the first path virtual port number identifies the first base path; In the target lookup table, a second path virtual port number that is different from the first path virtual port number is determined, and the second path virtual port number identifies the second base path; The second base path is selected based on the virtual port number of the second path.

4. The message transmission method according to claim 3, characterized in that, The acquisition of the target lookup table includes: Determine a set of path virtual port numbers, the set of path virtual port numbers including the series of path virtual port numbers; The set of path virtual port numbers is assigned to multiple first outgoing ports of the source node, and the set of path virtual port numbers is assigned to multiple second outgoing ports of at least one intermediate node in each intermediate node layer. Based on the path virtual port numbers assigned to the source node and each intermediate node on each baseline path, determine the one or more path virtual port numbers that identify each baseline path. Each baseline path and the corresponding virtual port number of the path that identifies each baseline path are stored to generate the target lookup table.

5. The message transmission method according to claim 4, characterized in that, The step of allocating the set of path virtual port numbers to multiple first outgoing ports of the source node, and allocating the set of path virtual port numbers to multiple second outgoing ports of at least one intermediate node in each intermediate node layer, includes: For each path virtual port number in the set of path virtual port numbers, a probe packet is constructed, and the probe packet contains the path virtual port number; The probe message is sent from the source node; Identify the first output port of the probe packet output by the source node and the second output port of the probe packet output by each intermediate node layer, and assign the path virtual port number to the first output port and the second output port.

6. The message transmission method according to claim 4 or 5, characterized in that, The step of determining the one or more path virtual port numbers corresponding to each base path based on the path virtual port numbers assigned to the source node and each intermediate node on each base path includes: Based on the path virtual port numbers assigned to a first outgoing port of the source node and multiple second outgoing ports of multiple intermediate nodes on each baseline path, a set of single-node path virtual port numbers for each of the source node and multiple intermediate nodes is generated. Take the intersection of the set of single-node path virtual port numbers corresponding to the source node and each intermediate node, and take at least one path virtual port number in the intersection as the one or more path virtual port numbers corresponding to the base path.

7. The message transmission method according to any one of claims 4 to 6, characterized in that, Assigning multiple second output ports to the at least one intermediate node in each intermediate node layer, including: Identify at least one key node layer from each intermediate node layer; Assign the set of virtual port numbers for the path to the second outgoing port of each critical node layer; The process of determining the one or more path virtual port numbers that identify each base path based on the path virtual port numbers assigned to the source node and each intermediate node on each base path includes: Based on the path virtual port number assigned to a first outgoing port of the source node on each baseline path and a second outgoing port of the intermediate node in the critical node layer, determine the one or more path virtual port numbers corresponding to the baseline path.

8. The message transmission method according to any one of claims 1 to 7, characterized in that, Selecting the multiple baseline paths includes: Obtain a set of candidate paths between the source node and the destination node. The set of candidate paths contains a first number of candidate paths, and the multiple reference paths contain a second number of reference paths. The first number is greater than the second number, and each candidate path is a message transmission path. Each candidate path in the candidate path set is used as an anchor path in turn, and for each anchor path, the following steps are performed: Calculate the number of intermediate nodes that overlap with the anchor path in each second candidate path other than the anchor path in the candidate path set, where the anchor path is the first candidate path; If the number of intermediate nodes that overlap with the anchor path in a second candidate path is greater than the third number, it is determined that the second candidate path should be removed from the candidate path set. After each candidate path has been used as the anchor path and the above steps have been completed, the remaining candidate paths in the candidate path set are used as the multiple baseline paths. The remaining candidate paths are the candidate paths after removing the second candidate path determined to be removed from the candidate path set.

9. The message transmission method according to claim 8, characterized in that, The step of obtaining the candidate path set between the source node and the destination node includes: Based on the total number of first outgoing ports of the source node, determine the first number of routes from the source node to at least one intermediate node of the first intermediate node layer; Based on the total number of second outgoing ports of each intermediate node in the multiple intermediate node layers, determine the second number of routes from each intermediate node to the intermediate node in the next intermediate node layer. Based on the first number of routes and the second number of routes corresponding to each intermediate node layer, a routing topology map is generated between the source node and the destination node; On the routing topology graph, multiple candidate paths between the source node and the destination node are obtained to generate the candidate path set.

10. The message transmission method according to claim 8 or 9, characterized in that, The third number is determined in the following manner: Determine the total number of the first output ports of the source node; Determine the total number of second output ports for each intermediate node in each intermediate node layer; Determine the maximum and minimum values ​​of the total number of the first output ports and the total number of the second output ports corresponding to each intermediate node layer; The difference between the maximum value and the minimum value is calculated as the third number.

11. The message transmission method according to any one of claims 1 to 10, characterized in that, The determination that the transmission of the target message to the destination node via the first reference path failed includes: The target message is transmitted from the source node to the destination node via the first reference path; If no acknowledgment response is received from the destination node within a preset first time, the transmission of the target message is deemed to have failed.

12. The message transmission method according to any one of claims 3 to 11, characterized in that, The message transmission method further includes: Obtain the current pointer corresponding to the destination node. The current pointer refers to the position of the reference path applicable to the target message transmitted from the current source node to the destination node in the reference path table. In the baseline path table, determine the first baseline path that the current pointer points to; In the target lookup table, find the virtual port number corresponding to the first reference path and use it as the first path virtual port number.

13. The message transmission method according to claim 12, characterized in that, The message transmission method further includes: The current pointer is incremented by 1, thereby determining the reference path pointed to by the next pointer in the reference path table when transmitting other packets after the target packet from the source node to the destination node.

14. The message transmission method according to any one of claims 11 to 13, characterized in that, The step of determining that the transmission of the target message has failed if no acknowledgment response is received from the destination node within a preset first time period includes: Insert the first detection logic into the transmission control protocol processing code of the source node; The first detection logic is enabled to detect that no acknowledgment response is received from the destination node within a preset first time period, thereby determining that the transmission of the target message has failed.

15. The message transmission method according to any one of claims 3 to 7, 12 to 14, characterized in that, Determining a second path virtual port number that is different from the first path virtual port number in the target lookup table includes: In the target lookup table, determine the first base path corresponding to the first path virtual port number; In the baseline path table, determine the second baseline path that is located after the first baseline path; In the target lookup table, determine the virtual port number of the second path corresponding to the second reference path.

16. The message transmission method according to claim 15, characterized in that, Determining the virtual port number of the second path corresponding to the second reference path in the target lookup table includes: In the target lookup table, determine the virtual port numbers of multiple alternative paths corresponding to the second baseline path; Obtain records of the virtual port numbers of the multiple alternative paths that were selected in the baseline path switching that has already occurred; Based on the number of times each of the plurality of alternative path virtual port numbers in the record is selected, the second path virtual port number is determined from the plurality of alternative path virtual port numbers.

17. A message transmission method, characterized in that, The method, executed by the destination node, includes: Receive the target message sent by the source node; Multiple response transmission paths between the destination node and the source node are obtained as multiple response reference paths. Each response reference path passes through multiple intermediate node layers, and each intermediate node layer includes at least one intermediate node. The number of intermediate nodes that overlap between any two response reference paths in the multiple response reference paths meets a predetermined condition. An acknowledgment response is sent to the source node via the first acknowledgment reference path among the multiple acknowledgment reference paths; In response to determining that sending the acknowledgment response to the source node via the first response reference path failed, a second response reference path that is different from the first response reference path is selected from the plurality of response reference paths; The acknowledgment response is transmitted to the source node via the second acknowledgment reference path.

18. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the message transmission method according to any one of claims 1 to 17.

19. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the message transmission method according to any one of claims 1 to 17.

20. A computer program product comprising a computer program that is read and executed by a processor of a computer device, causing the computer device to perform the message transmission method according to any one of claims 1 to 17.