Path information processing method and related device

By pre-planning data flow paths in a multi-layered network and carrying path information in the message header, the problem of data flow path conflicts is solved, and the efficiency of data transmission and model processing is improved.

WO2025261053A1PCT designated stage Publication Date: 2025-12-26HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2025/095968
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-20
Filing Date
2025-05-20
Publication Date
2025-12-26

AI Technical Summary

Technical Problem

In multi-layered networks, the path selection of different data streams may conflict, affecting the transmission efficiency of the data streams.

Method used

By pre-planning the paths of S data streams and including the path information in the message header, the machine learning model's inference process or the artificial intelligence task nodes and network devices during the training process can select paths based on the information in the message header, thus avoiding path conflicts.

Benefits of technology

It shortens the total data transmission time of the data stream, improves the transmission efficiency of the data stream and the efficiency of the model's inference or training process, and reduces the need for parsing message body information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025095968_26122025_PF_FP_ABST
    Figure CN2025095968_26122025_PF_FP_ABST
Patent Text Reader

Abstract

A path information processing method and a related device, which can be used in the field of communications. An inference process of or a training process for a machine learning model comprises at least two steps, wherein a first step among the at least two steps involves S data flows, a start condition of a second step comprises completion of data transmission of all the S data flows, and the second step is a step next to the first step. The method comprises: an AI task node acquiring path information corresponding to a first data flow among the S data flows, and then transmitting a first packet to a first network device, wherein the first packet belongs to the first data flow, a header of the first packet contains the path information, S paths corresponding to the S data flows are pre-planned, the S paths comprise a first path, and the path information corresponds to the first path. The present application is used for enabling the planned paths to be implemented, thereby helping to reduce the total duration required for data transmission of the S data flows.
Need to check novelty before this filing date? Find Prior Art

Description

A method for processing path information and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202410807955.1, filed with the State Intellectual Property Office of China on June 20, 2024, entitled "A Method for Processing Path Information and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of communications, and in particular to a method for processing path information and related equipment. Background Technology

[0003] In communication networks, when there are no direct links between different communication devices, the data streams exchanged between them need to be forwarded by other network devices. Currently, with increasingly large-scale networks, it may be necessary to use multiple layers of network transmission to enable data stream exchange between different communication devices. In such a multi-layered network, there are often multiple paths between the communication devices corresponding to the source address information and the communication devices corresponding to the destination address information of the data stream. When forwarding data streams, network devices select a path from these multiple paths based on their local policies and forward the data stream based on the locally selected path.

[0004] However, in multi-layer networks, there are often multiple network devices. Since each network device determines its path based on its own local data stream, when there are multiple data streams that need to be transmitted in a multi-layer network, conflicts may occur between the paths of different data streams, which will affect the transmission efficiency of the data streams. Summary of the Invention

[0005] This application provides a method and related equipment for processing path information, which pre-plans S paths corresponding to S data streams to avoid conflicts between paths of different data streams, and then carries the path information corresponding to the planned path in the message header so that the planned path can be implemented, which helps to shorten the total time consumed by the data transmission of S data streams.

[0006] This application provides the following technical solution:

[0007] Firstly, this application provides a method for processing path information. This method can be used in the field of communication and can be applied to the inference or training process of a machine learning model. The inference or training process of the machine learning model includes at least two steps. The first step includes the data transmission of S data streams. The starting condition of the second step in the at least two steps includes the completion of data transmission of all S data streams. In other words, the second step in the at least two steps can only be executed after all the aforementioned S data streams have completed data transmission. The first step is any one of the at least two steps, and the second step is the next step after the first step. S is an integer greater than or equal to 1.

[0008] In this method, after the Artificial Intelligence (AI) task node obtains the path information corresponding to the first data stream (hereinafter referred to as "first path information" for ease of description), it can write the first path information into the first message and then send the first message to the first network device. The first message belongs to the first data stream, and the header of the first message includes the first path information.

[0009] The first data stream is any one of the S data streams mentioned above. The S paths corresponding to the S data streams are pre-planned. The S paths include the first path corresponding to the first data stream, and the information of the first path corresponds to the first path.

[0010] In this implementation, the inference or training process of the machine learning model can be divided into at least two steps. The first step involves the data transmission of S data streams. The second step can only begin after all S data streams have completed data transmission. The S paths corresponding to the S data streams can be pre-planned to avoid conflicts between paths of different data streams. The path information corresponding to the planned paths is then carried in the packet header, allowing the network device transmitting the packet to obtain the planned path information from the packet header. This facilitates the implementation of the planned paths, thereby shortening the total time consumed by the data transmission of the S data streams and improving the transmission efficiency of the data streams. Furthermore, by carrying the path information in the packet header, the network device can obtain the path information only through the packet header without needing to parse the information in the packet body, further shortening the total time consumed by the data transmission of the S data streams and thus improving the model's inference or training process.

[0011] In one possible implementation, the first path information is the first source port number in the header of the first message. The first source port number can be obtained by the AI ​​task node based on the first path and the first rule in the first network device. The first path is the planned path of the first data stream. The function of the first rule is to determine the address information of the next hop based on the source port number in the received message and the first rule.

[0012] For example, the first path indicates that the first data stream is sent by the communication device pointed to by the source address information and received by the destination communication device pointed to by the destination address information. The first path also indicates that the first data stream is transmitted through a first network device and a second network device, where the second network device is the next hop of the first network device. For example, if the multi-layer network used to transmit the first data stream is a two-layer network containing spine nodes and leaf nodes, the first path may include: source AI processor - source leaf - specified spine - destination leaf - destination AI processor, where the first network device can be the source leaf and the second network device can be the specified spine.

[0013] For example, in determining the address information of the next hop, the first network device can determine at least one equivalent path from the first network device to the destination communication device indicated by the destination address information. This at least one equivalent path can also be understood as at least one equivalent path from the source communication device indicated by the source address information to the destination communication device indicated by the destination address information. Based on the source port number and a first rule in the received message, the first network device can select a first path for transmitting the first data stream from the at least one equivalent path, thereby determining the address information of the second network device in the first path, i.e., determining the address information of the next hop. The first source port number carried in the first message is to assist the first network device in selecting a first path that includes the second network device from the at least one equivalent path. Correspondingly, after determining the first path and the first rule used on the first network device, the AI ​​task node can determine the first source port number based on the first path and the first rule used on the first network device.

[0014] In this implementation, when the first path indicates that the first data stream is transmitted through the first network device and the second network device, the first source port number is obtained based on the first rule in the first network device. The function of the first rule is to determine the address information of the next hop based on the source port number in the received packet and the first rule. This realizes the control of which network device forwards the packet in the first data stream by controlling the form of the source port number in the first packet. Since the source port number already exists in the packet and is determined by the sender of the packet, only the determination process of the source port number needs to be adjusted to realize the control of the packet forwarding path, which greatly reduces the implementation difficulty of the method provided in this application and provides a very simple implementation scheme.

[0015] In one possible implementation, the first rule includes performing a hash operation based on the source port number in the received message to select a path for transmitting the first data stream from at least one equivalent path. For example, the first rule could be performing a hash operation on the 5-tuple information in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule could be performing a hash operation on the source port number in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule could be performing a hash operation on both the source port number and the destination port number in the message to select a path for transmitting the first data stream from at least one equivalent path, etc.

[0016] In this implementation, since the communication devices in the multi-layer network already use hash operations based on the five-tuple information to obtain the address information of the next hop, and the first rule in this application is based on hash operations on the source port number in the received message to obtain the address information of the next hop, the solution provided by this application can be compatible with existing solutions, further reducing the implementation difficulty of this solution and making it easier to use the solution provided by this application in more scenarios.

[0017] In one possible implementation, the AI ​​task node can further determine a first source port number based on a first path and a first rule. This first source port number is configured as the source port number used during the link establishment phase corresponding to the first data stream. In this implementation, configuring the source port number as the first source port number during the link establishment phase corresponding to the first data stream determines the first path at that stage. This avoids path conflicts between different data streams during the link establishment phase, further improving data stream transmission efficiency.

[0018] In one possible implementation, the AI ​​task node may include a chain-building module that conforms to the definition of a Transmission Control Protocol (TCP), Remote Direct Data Access Protocol (RDP), or other communication protocols. This chain-building module may include an application programming interface (API) that configures the source port number used in the chain-building phase. For example, the AI ​​task node can configure the source port number used in the chain-building phase corresponding to the first data stream as the first source port number by calling this API.

[0019] In this implementation, an API is added to the chain establishment module. The source port number is configured by calling the API. This allows the source port number in the first message to be configured as the first source port number while minimizing modifications to the chain establishment module, thus further reducing the implementation difficulty of this solution.

[0020] In one possible implementation, the S paths corresponding to the S data streams are obtained based on the communication relationships and topology information of the S data streams. The communication relationship of each of the S data streams includes source address information and destination address information, and the topology information includes the connection relationships between different network devices in the multi-layer network used to transmit the S data streams.

[0021] For example, in the case of a two-layer network containing spine nodes and leaf nodes, the topology information may include the connection relationships between P third network devices and N fourth network devices, where P is an integer greater than 1 and N is an integer greater than or equal to 1. The third network devices can also be understood as leaf nodes, and the fourth network devices can also be understood as spine nodes. The first network device is one of the P third network devices, the second network device is one of the N fourth network devices, and the N fourth network devices are used to forward data streams from one of the P third network devices to another of the P third network devices. Alternatively, in the case of a three-layer network, the topology information may include the connection relationships between different network devices in the aforementioned three-layer network.

[0022] In this implementation, the S paths corresponding to the S data streams are obtained based on the communication relationships and topology information of the S data streams. This topology information includes the connection relationships between different network devices in the multi-layer network used to transmit the S data streams. In other words, the S paths are obtained after path planning based on global information, which helps to further reduce the possibility of conflicts between the transmission paths of different data streams, further improves the transmission efficiency of data streams, and also improves the efficiency of the inference or training process of machine learning models. In addition, the method provided in this application adopts a flow-by-flow planning approach, that is, multiple packets in the same data stream are sent sequentially through the same path, avoiding the situation where the packets received by the receiver are out of order, thereby avoiding the time consumed by retransmitting packets in the data stream after out-of-order transmission, which also helps to improve the transmission efficiency of data streams.

[0023] In one possible implementation, the script (or code) corresponding to the inference or training process of the machine learning model can be used to obtain which logical sequences (ranks) are included in the inference or training process of the machine learning model, the data communication requirements between different logical ranks, and the temporal relationships between different logical ranks; or, the splitting strategy corresponding to the inference or training process of the machine learning model can be used to obtain which logical ranks are included in the inference or training process of the machine learning model, the data communication requirements between different logical ranks, and the temporal relationships between different logical ranks. The splitting strategy can include at least one of the following: splitting all neural network layers included in the machine learning model into several parts, splitting each neural network layer into several parts, or splitting the data to be processed into several parts.

[0024] Based on the temporal relationship between different logical ranks and the set communication algorithm used when communicating data between different logical ranks, the inference or training process of a machine learning model can be divided into at least two steps. That is, it determines which logical ranks and data communication requirements are included in each of the at least two steps. The basis for the division can include: the next step is only executed after all the data involved in the previous step has been transmitted.

[0025] Based on the logical rank and data communication requirements of each step, as well as the mapping relationship between logical rank and AI processors, we obtain the communication behaviors between which AI processors are involved in each step, that is, we obtain the data streams that need to be transmitted in each step, as well as the source address information and destination address information of each data stream.

[0026] Secondly, this application provides a method for processing path information. This method can be used in the field of communication and can be applied to the inference or training process of a machine learning model. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The starting condition of the second step includes that all S data streams have completed data transmission. The second step is the next step after the first step. M is an integer greater than or equal to 1. The method includes: a first network device obtaining path information from the header of a received first message, wherein the first message belongs to a first data stream, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path; the first network device determines the address information of the next hop based on the path information.

[0027] In one possible implementation, the path information is the first source port number in the header of the first message. The first network device determines the address information of the next hop based on the path information, including: the first network device determines the address information of the next hop based on the first source port number and the first rule, wherein the first source port number is obtained based on the first path and the first rule adopted by the first network device.

[0028] The meanings of the terms in the second aspect and their resulting technical effects can be found in the descriptions of the first aspect and its various possible implementations, and will not be repeated here.

[0029] Thirdly, this application provides a method for processing path information, which can be used in the field of communication. In the method, a communication device obtains a first source port number corresponding to a first path of a first data stream. The first path is a planned path of the first data stream. The first source port number is obtained based on the first path and a first rule in the first network device. The function of the first rule is to obtain the address information of the next hop based on the source port number in the received message and the first rule. The communication device sends a first message to the first network device. The first message belongs to the first data stream.

[0030] In the third aspect, the communication device is also used to perform the steps of the AI ​​task node execution in the first aspect. The meaning of the terms in the third aspect and the resulting technical effects can be found in the descriptions of the first aspect and the various possible implementations of the first aspect, and will not be repeated here.

[0031] Fourthly, this application provides a method for processing path information, which can be used in the field of communication. In the method, a first network device obtains a first source port number from a received first message; the first network device determines the address information of the next hop according to the first source port number and a first rule, wherein the first message belongs to a first data stream, the first source port number is obtained based on a first path and a first rule, and the first path is the planned path of the first data stream.

[0032] In the fourth aspect, the communication equipment is also used to perform the steps performed by the first network device in the second aspect. The meanings of the terms in the fourth aspect and the resulting technical effects can be found in the descriptions of the second aspect and various possible implementations of the second aspect above, and will not be repeated here.

[0033] Fifthly, this application provides a path information processing apparatus. The apparatus is applied in an AI task node. The inference or training process of the machine learning model includes at least two steps. One of the at least two steps is a first step, which includes the data transmission of S data streams. The start condition of the second step includes the completion of data transmission of all S data streams. The second step is the next step after the first step. S is an integer greater than or equal to 1. The apparatus includes: an acquisition module, used to acquire path information corresponding to a first data stream, wherein the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, and the S paths include a first path corresponding to the first data stream, and the path information corresponds to the first path; and a sending module, used to send a first message to a first network device, wherein the first message belongs to the first data stream, the header of the first message includes path information, and the first network device is used to transmit the first message.

[0034] In one possible implementation, the path information is the first source port number in the header of the first message. The first source port number is obtained based on the first path and the first rule in the first network device. The function of the first rule is to determine the address information of the next hop based on the source port number in the received message and the first rule.

[0035] In one possible implementation, the first rule includes performing a hash operation based on the source port number in the received message.

[0036] In one possible implementation, the path information processing device further includes: a determination module, used to determine a first source port number based on a first path and a first rule, wherein the first source port number is configured as the source port number during the link establishment phase corresponding to the first data stream.

[0037] In one possible implementation, the chain-building module in the AI ​​task node is equipped with an application programming interface (API). The API's functions include configuring the source port number used in the chain-building phase. The chain-building module conforms to the definition of Transmission Control Protocol (TCP) or Remote Direct Data Access (RDMA) protocol.

[0038] In one possible implementation, the S paths corresponding to the S data streams are obtained based on the communication relationships and topology information of the S data streams. The communication relationship of each data stream in the S data streams includes source address information and destination address information. The topology information includes the connection relationships between different network devices in the multi-layer network used to transmit the S data streams.

[0039] The meanings of the terms in the fifth aspect and the resulting technical effects can be found in the descriptions of the first aspect and its various possible implementations, and will not be repeated here.

[0040] Sixthly, this application provides a path information processing apparatus. The apparatus is applied in a first network device. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition of the second step includes that all S data streams have completed data transmission. The second step is the next step after the first step. M is an integer greater than or equal to 1. The apparatus includes: a receiving module, used to obtain path information from the header of a received first message, wherein the first message belongs to a first data stream, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, and the S paths include a first path corresponding to the first data stream, and the path information corresponds to the first path; and a determining module, used to determine the address information of the next hop based on the path information.

[0041] In one possible implementation, the path information is the first source port number in the header of the first message. The determining module is specifically used to determine the address information of the next hop based on the first source port number and the first rule, wherein the first source port number is obtained based on the first path and the first rule adopted by the first network device.

[0042] In one possible implementation, the first source port number is configured to be the source port number during the link establishment phase corresponding to the first data stream.

[0043] The meanings of the terms in the sixth aspect and the resulting technical effects can be found in the descriptions of the first aspect and its various possible implementations, and will not be repeated here.

[0044] In a seventh aspect, this application provides a path information processing apparatus, which is applied in a communication device. The apparatus includes: an acquisition module, configured to acquire a first source port number corresponding to a first path of a first data stream, wherein the first path is a planned path of the first data stream, and the first source port number is obtained based on the first path and a first rule in a first network device, wherein the function of the first rule is to obtain the address information of the next hop based on the source port number in the received message and the first rule; and a sending module, configured to send a first message to the first network device, wherein the first message belongs to the first data stream.

[0045] In one possible implementation, the inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition of the second step includes the completion of data transmission in all S data streams. The second step is the next step after the first step, where S is an integer greater than or equal to 1. The first data stream is any one of the S data streams, and the S paths corresponding to the S data streams are pre-planned, including the first path of the first data stream.

[0046] In the seventh aspect, the path information processing device is also used to perform the steps of the AI ​​task node execution in the first aspect. The meaning of the terms in the seventh aspect and the resulting technical effects can be found in the descriptions of the first aspect and various possible implementations of the first aspect above, and will not be repeated here.

[0047] Eighthly, this application provides a path information processing apparatus, which is applied in a first network device. The apparatus includes: a receiving module, configured to obtain a first source port number from a received first message; and a determining module, configured to determine the address information of the next hop based on the first source port number and a first rule, wherein the first message belongs to a first data stream, the first source port number is obtained based on a first path and a first rule, and the first path is a planned path of the first data stream.

[0048] In one possible implementation, the inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition of the second step includes the completion of data transmission in all S data streams. The second step is the next step after the first step, where S is an integer greater than or equal to 1. The first data stream is any one of the S data streams, and the S paths corresponding to the S data streams are pre-planned, including the first path of the first data stream.

[0049] In the eighth aspect, the path information processing device is also used to perform the steps performed by the first network device in the second aspect. The meanings of the terms in the eighth aspect and the resulting technical effects can be found in the descriptions of the second aspect and various possible implementations of the second aspect above, and will not be repeated here.

[0050] A ninth aspect of this application provides an apparatus including at least one processor coupled to a memory. The memory is used to store a program or instructions, and the at least one processor is used to execute the program or instructions to cause the apparatus to implement the methods described in the first, second, third, or fourth aspects.

[0051] The tenth aspect of this application provides a computer-readable storage medium for storing computer instructions; when the computer instructions are executed by a processor, the processor is configured to perform the methods described in the first, second, third, or fourth aspects above.

[0052] The eleventh aspect of this application provides a computer program product (or computer program) including instructions that, when executed by a processor, perform the methods described in the first, second, third, or fourth aspects above.

[0053] The twelfth aspect of this application provides a communication system comprising an AI task node and a first network device, wherein the AI ​​task node is configured to perform the method described in the first aspect, and the first network device is configured to perform the method described in the second aspect; or, the communication system comprises a communication device and a first network device, wherein the communication device is configured to perform the method described in the third aspect, and the first network device is configured to perform the method described in the fourth aspect.

[0054] The thirteenth aspect of this application provides a chip system including at least one processor for supporting the implementation of the methods described in the first, second, third, or fourth aspects above.

[0055] In one possible design, the chip system may further include a memory for storing program instructions and data. The chip system may be composed of chips or may include chips and other discrete devices. Optionally, the chip system may also include interface circuitry that provides program instructions and / or data to the at least one processor.

[0056] The technical effects of any of the design methods in aspects nine to ten can be found in the descriptions of aspect one above and various possible implementations of aspect one, and will not be repeated here. Attached Figure Description

[0057] Figure 1 is a schematic diagram of a multilayer network provided in this application;

[0058] Figure 2 is a schematic diagram of the relationship between the M AI task nodes and the assigned subtasks provided in an embodiment of this application;

[0059] Figure 3 is a flowchart illustrating a path information processing method provided in an embodiment of this application.

[0060] Figure 4 is a schematic diagram of another method for processing path information provided in an embodiment of this application;

[0061] Figure 5 is a schematic diagram of the path planning provided in an embodiment of this application;

[0062] Figure 6 is another schematic diagram of path planning provided in an embodiment of this application;

[0063] Figure 7 is a schematic diagram of a path planning system provided in an embodiment of this application;

[0064] Figure 8 is a schematic diagram of a path information processing device provided in an embodiment of this application;

[0065] Figure 9 is a schematic diagram of another structure of the path information processing device provided in an embodiment of this application;

[0066] Figure 10 is a schematic diagram of another structure of the path information processing device provided in the embodiment of this application;

[0067] Figure 11 is a schematic diagram of another structure of the path information processing device provided in an embodiment of this application;

[0068] Figure 12 is a schematic diagram of the structure of a device provided in an embodiment of this application. Detailed Implementation

[0069] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0070] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0071] In the embodiments of this application, "send" and "receive" refer to the direction of signal transmission. For example, "send information to device XX" can be understood as the destination of the information being device XX, which may include direct transmission via the air interface or indirect transmission by other units or modules via the air interface. "Receive information from device YY" can be understood as the source of the information being device YY, which may include direct reception from device YY via the air interface or indirect reception from device YY via other units or modules via the air interface. "Send" can also be understood as the "output" of the chip interface, and "receive" can also be understood as the "input" of the chip interface. In other words, sending and receiving can occur between devices or within devices, for example, through buses, traces, or interfaces between components, modules, chips, software modules, or hardware modules within a device. It is understood that information may undergo necessary processing, such as encoding and modulation, between the source and destination of information transmission, but the destination can understand the valid information from the source. Similar expressions in this application can be understood in a similar way and will not be elaborated further.

[0072] In the embodiments of this application, "instruction" can include direct and indirect instructions, as well as explicit and implicit instructions. The information indicated by a certain piece of information (hereinafter referred to as instruction information) is called the information to be instructed. In specific implementation, there are many ways to indicate the information to be instructed, such as, but not limited to, directly indicating the information to be instructed, such as the information to be instructed itself or its index. It can also indirectly indicate the information to be instructed by indicating other information, where there is an association between the other information and the information to be instructed; or it can indicate only a part of the information to be instructed, while the other parts are known or pre-agreed upon. For example, the instruction can be implemented by using a pre-agreed (e.g., protocol predefined) arrangement of various information, thereby reducing the instruction overhead to a certain extent. This application does not limit the specific method of instruction. It is understood that for the sender of the instruction information, the instruction information can be used to indicate the information to be instructed; for the receiver of the instruction information, the instruction information can be used to determine the information to be instructed.

[0073] In a communication network, where there is no direct link between different communication devices, the data flow between different communication devices needs to be forwarded by other network devices. These other network devices can be referred to as forwarding devices, such as routers, switches, or virtual machines. It should be noted that the terms "communication network" and "communication system" in this application can be used interchangeably.

[0074] As the scale of the network increases, it may be necessary to use multiple layers of network forwarding to enable data flow interaction between different communication devices. In other words, after the data flow is sent from the source communication device indicated by the source address information, it needs to be forwarded through multiple layers of network before being received by the destination communication device indicated by the destination address information. That is, different network devices among the aforementioned network devices can form a multi-layer network. For example, the multi-layer network can be a two-layer network containing spine nodes and leaf nodes; or it can be a three-layer network including an access layer, a aggregation layer, and a core layer, or other implementations, which are not limited in this application.

[0075] To better understand this solution, please refer to Figure 1. Figure 1 is a schematic diagram of a multi-layer network provided in this application. Figure 1 uses a two-layer network containing Spine nodes and Leaf nodes as an example. The server in Figure 1 can be understood as a communication device that needs to generate or receive data streams, and the Spine and Leaf nodes can be understood as network devices that forward data streams. Each Leaf node can connect to one or more servers, and data streams between different servers can be forwarded through Leaf nodes. When two servers are connected to the same Leaf node, the data streams between these two servers can be exchanged through the forwarding of the same Leaf node. When two servers are connected to different Leaf nodes, the data streams between these two servers need to be forwarded through their respective connected Leaf nodes and Spine nodes to achieve interaction. The method provided in this application is applied to the aforementioned scenarios where forwarding through their respective connected Leaf nodes and Spine nodes is required. For example, in a scenario where data flow between two servers needs to be forwarded through their respective connected Leaf nodes and Spine nodes to achieve interaction, the communication devices corresponding to the source address information of the data flow and the communication devices corresponding to the destination address information of the data flow are both included in the multiple servers shown in Figure 1. It should be understood that the example in Figure 1 is only for the convenience of understanding this solution and is not intended to limit this solution.

[0076] It should be noted that, for ease of description, the methods provided in this application are mainly described using the case of a multi-layer network including a two-layer network in the following embodiments. However, in practical applications, the methods provided in this application involve communication processes in other networks. For example, they can be applied to a three-layer network including an access layer, an aggregation layer, and a core layer. Exemplarily, network devices in the access network can use the methods provided in this application to determine path information, network devices in the aggregation layer can use the methods provided in this application to determine path information, and so on.

[0077] Optionally, the data in the data stream transmitted through the aforementioned multi-layer network can be data generated during the inference or training process of a machine learning model. For example, when the method provided in this application is applied to the inference or training process of a machine learning model, the communication device corresponding to the source address information of the data stream can be represented as an artificial intelligence (AI) task node. Optionally, the communication device corresponding to the destination address information of the data stream can also be represented as an AI task node.

[0078] For example, an AI task node can be represented as a server for performing AI tasks. Optionally, the server may include at least one central processing unit (CPU) for performing general-purpose computing; the server may also include at least one processor for performing AI computing, such as a graphics processing unit (GPU), a tensor processing unit (TPU), a neural network processing unit (NPU), or other processors for performing AI computing, etc., which are not exhaustively listed in this application; it should be noted that, for ease of description, we use the term "AI processor" to refer to the processor for performing AI computing in the following description.

[0079] The data processed by the machine learning model in this application may include images, text, speech or other types of data. Optionally, the machine learning model may be a large language model (LLM), or it may be a fully connected neural network, a recurrent neural network or other types of neural network, which can be determined in combination with the actual application scenario.

[0080] For example, the inference process of a machine learning model may include: inputting the data to be processed into the machine learning model, and obtaining the prediction result generated by the machine learning model corresponding to the aforementioned data to be processed. The training process of a machine learning model may include: inputting the data to be processed into the machine learning model, obtaining the prediction result generated by the machine learning model corresponding to the aforementioned data to be processed, and updating the weight parameters of the machine learning model based on the aforementioned prediction result. The aforementioned data to be processed may include one or more data samples. Optionally, the aforementioned data to be processed may include a batch (epoch) of data samples, the specifics of which can be determined according to the actual application scenario.

[0081] Furthermore, during the training process of the machine learning model, gradient values ​​can be generated based on the prediction results, and then the weight parameters of the machine learning model are updated using the backpropagation algorithm based on these gradient values.

[0082] To facilitate understanding of this solution, before describing the method provided in this application in detail, we will first introduce the scenario where AI tasks generated during the inference or training process of a machine learning model are assigned to multiple AI task nodes. For example, the aforementioned multiple AI task nodes include a total of M AI processors, where M is an integer greater than 1. These M AI processors are used to execute the computations generated during the inference or training process of the machine learning model. For example, based on a splitting strategy, all computational tasks generated during the inference or training process of the machine learning model can be split into multiple subtasks. In this application, the term "subtask" can also be replaced by "logical sequence (rank)," and "splitting strategy" can also be replaced by "splitting strategy," "parallel strategy," or other names. Each subtask includes a portion of the AI ​​tasks from all the aforementioned computational tasks, and these multiple subtasks can be assigned to the M AI processors for execution. Optionally, a rank table can also be used to record the mapping relationship between each subtask and the AI ​​processors, that is, the rank table records which of the M AI processors executes each subtask.

[0083] For example, a splitting strategy may include distributing different neural network layers in a machine learning model to different AI processors, which can also be called a pipelined parallel strategy; and / or, a splitting strategy may also include distributing all computations generated by the same neural network layer to different AI processors, which can also be called a tensor parallel strategy; and / or, a splitting strategy may also split the data to be processed, with different AI processors used to process different data, which can also be called a data parallel strategy, etc.

[0084] To further understand this scheme, let's take an example with M equal to 64. For instance, the 64 AI processors can be numbered 0-63. Combining this with the above explanation of multi-layer networks, an AI task node can include one or more AI processors, and a Leaf node can connect to one or more AI task nodes. For example, this machine learning model includes 10 neural network layers: Layer 1, Layer 2, Layer 3, Layer 4, Layer 5, Layer 6, Layer 7, Layer 8, Layer 9, and Layer 10. The splitting strategy used includes: splitting each neural network layer into 8 parts, splitting the data to be processed into 4 parts, including sub-data 1, sub-data 2, sub-data 3, and sub-data 4, and splitting the 10 neural network layers into 2 parts.

[0085] For example, since neural network layer 1 is divided into 8 parts and the data to be processed is divided into 4 parts, the operations generated when processing the data to be processed by each neural network layer can be divided into 32 (8*4) sub-tasks. Among them, AI processors numbered 0-31 can execute the 32 sub-tasks generated by each neural network layer from neural network layer 1 to neural network layer 5, and AI processors numbered 32-63 can execute the 32 sub-tasks generated by each neural network layer from neural network layer 6 to neural network layer 10. Alternatively, AI processors numbered 0-31 can execute the 32 sub-tasks generated by neural network layer 1, AI processors numbered 32-63 can execute the 32 sub-tasks generated by neural network layer 2, AI processors numbered 0-31 can execute the 32 sub-tasks generated by neural network layer 3, AI processors numbered 32-63 can execute the 32 sub-tasks generated by neural network layer 4, AI processors numbered 0-31 can execute the 32 sub-tasks generated by neural network layer 5, and so on, until all 32 sub-tasks generated by each of the 10 neural network layers in the machine learning model are allocated in processing the data to be processed, so as to obtain the prediction result corresponding to the data to be processed.

[0086] To more intuitively understand this solution, please refer to Figure 2. Figure 2 is a schematic diagram illustrating the relationship between the M AI task nodes and the assigned subtasks provided in this embodiment of the application. For example, neural network layer 1 is divided into neural network layer 1-1, neural network layer 1-2, neural network layer 1-3, neural network layer 1-4, neural network layer 1-5, neural network layer 1-6, neural network layer 1-7, and neural network layer 1-8. The mapping relationship between the 32 subtasks generated by neural network layer 1 and the 32 AI processors can include: the operations generated when sub-data 1 is processed by neural network layer 1-1 through AI processor 0; the operations generated when sub-data 1 is processed by neural network layer 1-2 through AI processor 1; the operations generated when sub-data 1 is processed by neural network layer 1-3 through AI processor 2; the operations generated when sub-data 1 is processed by neural network layer 1-4 through AI processor 3; the operations generated when sub-data 1 is processed by neural network layer 1-5 through AI processor 4; and the operations generated when sub-data 1 is processed by neural network layer 1-6 through AI processor 5. The operations generated during processing are as follows: Operations generated when neural network layers 1-7 process sub-data 1 are executed by AI processor 6; operations generated when neural network layers 1-8 process sub-data 1 are executed by AI processor 7; operations generated when neural network layers 1-1 to 1-8 process sub-data 2 are executed by AI processors numbered 8-15; operations generated when neural network layers 1-1 to 1-8 process sub-data 3 are executed by AI processors numbered 16-23; operations generated when neural network layers 1-1 to 1-8 process sub-data 4 are executed by AI processors numbered 24-31. And so on. Neural network layer 2 can be divided into neural network layers 2-1, 2-2, 2-3, 2-4, 2-5, 2-6, 2-7, and 2-8. It should be understood that the example in Figure 2 is only for illustrative purposes and is not intended to limit the scope of this scheme.

[0087] If the method provided in this application is used in the training process of a machine learning model, after obtaining the prediction result corresponding to the data to be processed, the gradient value will be obtained based on the prediction result, and then the backpropagation algorithm will be used to update the weight parameters in the neural network layer on each AI processor. For example, the processors numbered 32-63 can first update the weight parameters in neural network layer 10 to neural network layer 6, and then the AI ​​processors numbered 0-31 can update the weight parameters in neural network layer 5 to neural network layer 1. Alternatively, processors numbered 32-63 can first update the weight parameters in neural network layer 10, then AI processors numbered 0-31 can update the weight parameters in neural network layer 9, processors numbered 32-63 can update the weight parameters in neural network layer 8, AI processors numbered 0-31 can update the weight parameters in neural network layer 7, processors numbered 32-63 can update the weight parameters in neural network layer 6, AI processors numbered 0-31 can update the weight parameters in neural network layer 5, and so on, until all the computations generated by each of the 10 neural network layers in the machine learning model during the weight parameter update process have been allocated. It should be noted that the above example with reference to Figure 2 is only for the convenience of understanding the concepts of "the computations generated by the inference or training process of the machine learning model are divided into multiple sub-tasks" and "the sub-tasks allocated to each AI processor". In actual applications, the specific splitting strategy can be determined according to the actual situation, and no limitation is made here.

[0088] Since the data obtained by multiple AI task nodes after completing a subtask may need to be passed to other AI task nodes, there will be a need for data flow transmission between different AI task nodes. In other words, different AI task nodes will need to transmit data flow, and the data flow transmitted between different AI task nodes can be forwarded through the above-mentioned multi-layer network.

[0089] For example, referring to the above description, during the computation generated when neural network layer 1 processes the data to be processed by processors numbered 0-31, AI processors numbered 0-7, after completing their respective subtasks, can aggregate their data to obtain intermediate data 1-1 generated by neural network layer 1 processing data 1. This aggregation process requires data flow transmission between different AI processors numbered 0-7. Similarly, after completing their respective subtasks, AI processors numbered 8-15 can aggregate their data to obtain intermediate data 1-2 generated by neural network layer 1 processing data 2. This aggregation process also requires data flow transmission between different AI processors numbered 8-15. Likewise, after completing their respective subtasks, AI processors numbered 16-23 can aggregate their data to obtain intermediate data 1-3 generated by neural network layer 1 processing data 3. This aggregation process also requires data flow transmission between different AI processors numbered 16-23. Meanwhile, after each AI processor (numbered 24-31) has completed its own subtask, it can aggregate the data it has obtained to obtain intermediate data 1-4 generated by the entire neural network layer 1 after processing data 4. The aforementioned aggregation process will cause different AI processors in AI processors (numbered 24-31) to need to transmit data streams.

[0090] Furthermore, intermediate data 1-1, intermediate data 1-2, intermediate data 1-3, and intermediate data 1-4 need to be aggregated to obtain intermediate data 1 generated by the entire neural network layer 1 after processing the entire data to be processed. The aforementioned aggregation process leads to a data flow transmission requirement between AI processors numbered (0, 8, 16, 24), between AI processors numbered (1, 9, 17, 25), between AI processors numbered (2, 10, 18, 26), and so on. All data flow transmission requirements generated during the aforementioned aggregation process are not exhaustively listed here. It should be noted that the examples here are only for the convenience of understanding that different AI task nodes will have communication requirements and are not intended to limit this solution.

[0091] In multi-layered networks, multiple paths often exist between the communication devices corresponding to the source and destination addresses of data streams. When forwarding data streams, network devices select a path from these multiple paths based on their local policies and forward the data stream based on the locally selected path. However, in multi-layered networks, there are often multiple network devices. Since each network device determines its path based on its own local data stream, conflicts may occur between the paths of different data streams when multiple data streams need to be transmitted in a multi-layered network, affecting the transmission efficiency.

[0092] To address the aforementioned issues, this application provides a method that discloses the following: If there are S data streams that need to be transmitted in parallel in a multi-layer network, where S is a positive integer greater than or equal to 1, and the S paths corresponding to the S data streams can be pre-planned, then the path information corresponding to each of the S data streams can be obtained, and the path information corresponding to each data stream can be carried in the header of the message in that data stream; for example, the first data stream is any one of the S data streams, and the first data stream includes at least one first message, then the header of the first message can include the path information corresponding to the first path (for ease of description, it will be referred to as "first path information" hereinafter).

[0093] This application allows for the pre-planning of S paths corresponding to S data streams to avoid conflicts between paths of different data streams. The planned path information is then carried in the packet header, enabling network devices transmitting packets to obtain the planned path information from the header. This ensures the planned paths are implemented, thereby reducing the total transmission time of the S data streams and improving transmission efficiency. Furthermore, by including the path information in the packet header, network devices can obtain the path information solely from the header, eliminating the need to parse information from the packet body. This further reduces the total transmission time of the S data streams, thus improving the model's inference or training process.

[0094] Based on the above description, the detailed implementation process of the path information processing method provided in this application will be described below. Specifically, please refer to Figure 3, which is a schematic flowchart of a path information processing method provided in an embodiment of this application. The path information processing method provided in an embodiment of this application may include:

[0095] 301. The AI ​​task node obtains the first path information corresponding to the first data stream.

[0096] Optionally, when the method provided in this application is applied to the inference or training process of a machine learning model, since the inference or training process of the machine learning model is divided into multiple sub-tasks, and these sub-tasks are assigned to M AI processors for execution, there will be a need for data flow transmission between different AI processors among the M AI processors during the inference or training process of the aforementioned machine learning model. The entire inference or training process of the machine learning model can be considered as being divided into at least two steps. The first step of the at least two steps includes the data transmission of S data streams, and the starting condition of the second step of the at least two steps includes the completion of data transmission of all S data streams. In other words, the second step of the at least two steps can only be executed after all S data streams have completed data transmission. The first step is any one of the at least two steps, and the second step is the next step after the first step. S is an integer greater than or equal to 1. In subsequent embodiments of this application, we will introduce the factors on which the entire inference or training process of the machine learning model is divided into at least two steps, which will not be elaborated here.

[0097] For example, the first step could be to obtain intermediate data 1-1, intermediate data 1-2, intermediate data 1-3, and intermediate data 1-4. The S data streams included in the first step are: the data streams that AI processors numbered 0-7 need to transmit when they summarize their data to obtain intermediate data 1-1 after completing their respective subtasks; the data streams that AI processors numbered 8-15 need to transmit when they summarize their data to obtain intermediate data 1-2 after completing their respective subtasks; the data streams that AI processors numbered 16-23 need to transmit when they summarize their data to obtain intermediate data 1-3 after completing their respective subtasks; and the data streams that AI processors numbered 24-31 need to transmit when they summarize their data to obtain intermediate data 1-4 after completing their respective subtasks. It should be understood that this example is only for the convenience of understanding this solution.

[0098] Optionally, the S paths corresponding to the S data streams can be pre-planned, and the first data stream is any one of the S data streams. For example, the first path corresponding to the first data stream indicates that the first data stream is sent by the source AI processor pointed to by the source address information and received by the destination AI processor pointed to by the destination address information. This first path also indicates which network devices the first data stream needs to pass through during its transmission from the source AI processor to the destination AI processor; that is, the first path also indicates which network devices forward the first data stream to the destination AI processor after it is sent from the source AI processor. For example, if the above-mentioned multi-layer network is a two-layer network containing spine nodes and leaf nodes, the first path used to transmit the first data stream can include: source AI processor - source leaf - designated spine - destination leaf - destination AI processor. Here, the source leaf, designated spine, and destination leaf can be understood as network devices used to forward the first data stream. It should be understood that this example is only for the convenience of understanding this scheme and is not intended to limit this scheme.

[0099] For example, in one scenario, the first path includes complete path information, meaning the first path indicates the transmission of the first data stream through a first network device and a second network device. Optionally, the first network device can be a network device directly connected to the AI ​​task node, and the second network device is the next hop of the first network device. The first path information can be represented as the first source port number in the header of the first message. For instance, if the aforementioned multi-layer network is a two-layer network containing Spine nodes and Leaf nodes, the first network device can be the source Leaf, and the second network device can be the designated Spine.

[0100] Before executing step 301, the AI ​​task node can determine the first source port number corresponding to the first data stream based on the first path corresponding to the first data stream. Step 301 may include: whenever the AI ​​task node needs to send the first message included in the first data stream, it can directly obtain the aforementioned first source port number and then write the first source port number into the header of the first message.

[0101] Optionally, the first source port number is obtained based on the address information of the second network device and a first rule in the first network device. The first rule is a rule used by the first network device to determine the address information of the next hop, and its function is to determine the address information of the next hop based on the source port number in the received packet and the first rule. For example, the AI ​​task node determining the first source port number corresponding to the first data stream based on the first path can include: the AI ​​task node determining the first source port number based on the first path and the first rule.

[0102] For example, in determining the address information of the next hop, the first network device can determine at least one equivalent path from the first network device to the destination communication device indicated by the destination address information. The aforementioned at least one equivalent path can also be understood as at least one equivalent path from the source communication device indicated by the source address information to the destination communication device indicated by the destination address information. The first network device can select a first path for transmitting the first data stream from the aforementioned at least one equivalent path based on the source port number and the first rule in the received message. For example, the first network device can determine the number of the first path based on the source port number and the first rule in the received message. Then, the first network device can determine the address information of the second network device in the first path, that is, determine the address information of the next hop.

[0103] Optionally, the first rule includes performing a hash operation based on the source port number in the received message; for example, the first rule is to perform a hash operation on the 5-tuple information in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule is to perform a hash operation on the source port number in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule is to perform a hash operation on the source port number and the destination port number in the message to select a path for transmitting the first data stream from at least one equivalent path, etc., which can be determined according to the actual application scenario.

[0104] Since communication devices in multi-layer networks already use hash operations based on 5-tuple information to obtain the address information of the next hop, and the first rule in this application is based on hash operations on the source port number in the received message to obtain the address information of the next hop, the solution provided in this application can be compatible with existing solutions, further reducing the implementation difficulty of this solution and making it easier to use the solution provided in this application in more scenarios.

[0105] Alternatively, the first rule can be a rule agreed upon by the first network device and the second network device. For example, based on the last digit in the source port number, a path for transmitting the first data stream can be selected from at least one equivalent path; or based on the first digit in the source port number, a path for transmitting the first data stream can be selected from at least one equivalent path, etc. The specific rule can be determined in combination with the actual application scenario.

[0106] In this embodiment, when the first path indicates that the first data stream is transmitted through the first network device and the second network device, the first source port number is obtained based on the first rule in the first network device. The function of the first rule is to determine the address information of the next hop based on the source port number in the received packet and the first rule. This realizes the control of which network device forwards the packet in the first data stream by controlling the form of the source port number in the first packet. Since the source port number is already present in the packet and is determined by the sender of the packet, the forwarding path of the packet can be controlled by adjusting the determination process of the source port number. This greatly reduces the implementation difficulty of the method provided in this application and provides a very simple implementation scheme.

[0107] In another scenario, if the first path includes the aforementioned first source port number, then the AI ​​task node can also obtain the first source port number from the first path. The method for determining the first source port number can be found in the description of the previous scenario, and will not be repeated here.

[0108] In another scenario, the first path information may include complete path information. For example, the first path information may include the address information of all network devices used to forward the first data stream. In this case, the AI ​​task node may determine the first path information based on the first path each time it needs to send the first message included in the first data stream, and then write the first path information into the header of the first message.

[0109] 302. The AI ​​task node sends a first message to the first network device. The first message belongs to the first data stream. The header of the first message includes the first path information. The first network device is used to transmit the first message.

[0110] The first network device is a downstream network device of the AI ​​task node. For example, in the case of a two-layer network containing spine nodes and leaf nodes, the first network device can be a source leaf that is directly connected to the AI ​​task node.

[0111] In this embodiment, S paths corresponding to S data streams can be pre-planned to avoid conflicts between paths of different data streams. The path information corresponding to the planned paths is then carried in the packet header, so that the network device used to transmit the packet can obtain the planned path information from the packet header. This helps to ensure that the planned paths are implemented, thereby shortening the total time consumed by the data transmission of the S data streams and improving the data stream transmission efficiency. In addition, by carrying the path information in the packet header, the network device can obtain the path information only through the packet header, without needing to parse the information in the packet body. This further helps to shorten the total time consumed by the data transmission of the S data streams, thereby improving the inference or training process of the model.

[0112] Optionally, based on the embodiment corresponding to Figure 3 above, please refer to Figure 4. Figure 4 is another schematic flowchart of the path information processing method provided in the embodiments of this application. The path information processing method provided in the embodiments of this application may include:

[0113] 401. The scheduling node obtains the S paths corresponding to the S data streams.

[0114] Step 401 is an optional step. For example, the scheduling node can first determine the S data streams that need to be transmitted, and then perform path planning for the S data streams to obtain S paths corresponding to the S data streams.

[0115] Optionally, if the method provided in this application is applied to the inference or training process of a machine learning model, the scheduling node can obtain the collective communication behavior generated during the inference or training process of the machine learning model. This collective communication behavior includes: which AI processors are involved in each of the at least two steps in the inference or training process of the machine learning model, that is, it can determine which data streams need to be transmitted in each of the aforementioned at least two steps; wherein, the communication behavior between AI processors included in each step can also be referred to as the communication relationship between AI processor pairs included in each step.

[0116] For example, in one implementation, the scheduling node can obtain a script (or code) corresponding to the inference or training process of the machine learning model. Pre-compiling the script generates an intermediate representation (IR) graph corresponding to the inference or training process of the machine learning model. Based on this IR graph, the decomposition method of the machine learning model can be determined, thereby determining which logical ranks (or subtasks) can be decomposed from the inference or training process of the machine learning model, the data communication requirements between different logical ranks, and the temporal relationships between different logical ranks. After determining each logical rank and the data communication requirements between different logical ranks, the scheduling node can decompose the inference or training process of the machine learning model into at least two steps according to the temporal relationships between different logical ranks and the set communication algorithm used when communicating data between different logical ranks. This determines which logical ranks and data communication requirements are included in each of the at least two steps. For example, the basis for decomposition may include: the next step is executed only after all data involved in the previous step has been transmitted. Based on the mapping relationship between logical ranks and AI processors in the ranktable, the scheduling node determines which AI processor executes each logical rank. Based on the logical ranks included in the aforementioned at least two steps, as well as the data communication requirements and the mapping relationship indicated by the ranktable, the scheduling node can determine which AI processors' communication behaviors are included in each of the at least two steps, thereby determining which data streams need to be transmitted in each step and the source address information and destination address information of each data stream that needs to be transmitted in each step.

[0117] For example, the aforementioned set communication algorithms include, but are not limited to: ring algorithms, halving-doubling (HD) algorithms, recursive halving-doubling algorithms, or other types of communication algorithms. It should be noted that the inference or training process of this machine learning model can use the same set communication algorithm or multiple different set communication algorithms. For example, the set communication algorithm used for data communication between different logical ranks generated based on the data parallelism strategy can be the halving-doubling algorithm. The specific algorithm can be determined based on the actual application scenario.

[0118] In another implementation, the scheduling node can obtain a splitting strategy (or parallel strategy) corresponding to the inference or training process of the machine learning model. For example, the splitting strategy may include at least one of the following: splitting all neural network layers of the machine learning model into several parts, splitting each neural network layer into several parts, or splitting the data to be processed into several parts. Based on the splitting strategy corresponding to the inference or training process of the machine learning model, the scheduling node can determine which logical ranks (or subtasks) can be split into in the inference or training process of the machine learning model, the data communication requirements between different logical ranks, and the temporal relationships between different logical ranks. After determining each logical rank and the data communication requirements between different logical ranks, the scheduling node can split the inference or training process of the machine learning model into at least two steps based on the temporal relationships between different logical ranks and the set communication algorithm used when communicating data between different logical ranks, thereby determining which logical ranks and data communication requirements are included in each of the at least two steps. The scheduling node can determine which data streams need to be transmitted in each of the aforementioned at least two steps, as well as the source address information and destination address information of each data stream to be transmitted in each step, based on the logical rank included in the aforementioned at least two steps and the mapping relationship indicated by the data communication requirements and the ranktable.

[0119] In another implementation, the scheduling node can also directly obtain the first information and the ranktable. The first information indicates which logical ranks and data communication requirements are included in each of the above at least two steps. Then, based on the logical ranks and data communication requirements included in the above at least two steps and the mapping relationship indicated by the ranktable, it determines which data streams need to be transmitted in each of the above at least two steps and determines the source AI processor and destination AI processor for each data stream that needs to be transmitted in each step.

[0120] After determining all data streams included in each of the at least two steps in the inference or training process of the machine learning model, the scheduling node can perform path planning for all data streams included in each of the aforementioned at least two steps. For ease of description, in this embodiment, any one of the at least two steps is referred to as the first step, which includes S data streams that need to be transmitted. It should be noted that the S data streams represent S data streams that need to be transmitted in parallel through a multi-layer network. When the method provided in this application is applied to other scenarios, the S data streams can also be determined in other ways, and this application does not impose any limitations.

[0121] Optionally, since the source AI processor and destination AI processor of some data streams may be directly connected to the same network device, for example, the source AI processor and destination AI processor of some data streams may be directly connected to the same Leaf node, after the scheduling node has determined all the data streams included in each of the at least two steps in the inference process or training process of the machine learning model, it can also filter all the data streams included in each step. The filtered data streams need to be forwarded through the above-mentioned multi-layer network to realize the transmission from the source AI processor to the destination AI processor.

[0122] Optionally, the S paths corresponding to the S data streams can be obtained based on the communication relationship and topology information of the S data streams. The communication relationship of each data stream in the S data streams includes source address information and destination address information. The topology information may include the connection relationship between different network devices in the multi-layer network used to transmit the aforementioned S data streams.

[0123] For example, in the case where the multi-layer network is a two-layer network containing spine nodes and leaf nodes, the topology information can include the connection relationships between P third network devices and N fourth network devices, where P is an integer greater than 1 and N is an integer greater than or equal to 1. The third network devices can also be understood as leaf nodes, and the fourth network devices can also be understood as spine nodes. The first network device is one of the P third network devices, and the second network device is one of the N fourth network devices. The N fourth network devices are used to forward data streams from one of the P third network devices to another of the P third network devices. For the case where the multi-layer network specifically manifests as a two-layer network, please refer to the above description of Figure 2 for understanding; it will not be repeated here.

[0124] Alternatively, if the multi-layer network is a three-layer network or other types of network, the topology information may include the connection relationships between different network devices in the three-layer or more-layer network. Examples will not be given in this application embodiment.

[0125] For example, step 401 may include: the scheduling node can determine a path corresponding to each of the S data streams based on the communication relationship and topology information of the S data streams using a path planning algorithm, thereby obtaining S paths corresponding to the S data streams, in order to maximize the utilization of bandwidth in the multi-layer network, reduce the total time consumed in the transmission process of the entire S data streams, and thus improve the efficiency of the entire transmission process of the S data streams. For example, the path planning algorithm can be: depth-first search algorithm, breadth-first search algorithm, or other types of path planning algorithms, which can be determined according to the actual application scenario; the meaning of each path in the S paths can be referred to the description of the first path in the embodiment corresponding to Figure 3 above, and will not be repeated here.

[0126] Optionally, if the bandwidth of the connection links between different network devices in the multi-layer network is different, step 401 may further include: the scheduling node can determine the S paths corresponding to the S data streams by using a path planning algorithm based on the communication relationship, topology information and bandwidth information of the S data streams. The bandwidth information may include the bandwidth between different network devices in the multi-layer network used to transmit the aforementioned S data streams, so as to further improve the bandwidth utilization efficiency in the multi-layer network while minimizing the total time consumed in the transmission of the entire S data streams.

[0127] To provide a more intuitive understanding of this scheme, Figures 5 and 6 are used to illustrate the path planning process of the scheduling node. Figures 5 and 6 use a depth-first search algorithm and a two-layer network (spine and leaf nodes) as examples. After determining the communication relationships of S data streams, the scheduling node attempts to add the path (source AI processor - source leaf - specified spine - destination leaf - destination AI processor) corresponding to each of the S data streams to the topology link. Since each AI processor is contained within an AI task node, and the communication link between the AI ​​task node and the leaf is fixed, the path planning process mainly involves determining the source and destination leaves of a data stream and then selecting which spine to forward that data stream. The principle for selecting the spine includes: the newly planned path cannot conflict with already planned paths. After planning the path for the new data stream, the link status can be updated.

[0128] For example, referring to Figure 5, which is a schematic diagram of path planning provided in an embodiment of this application, since the path planning mainly involves selecting which spine to forward the message in a two-layer network, Figure 5 only shows the Leaf and Spine portion. Figure 5 includes two sub-schemes, an upper one and a lower one. In Figure 5, the dark gray thick lines represent the uplink links occupied by the planned paths, the light gray thick lines represent the downlink links occupied by the planned paths, the dashed lines represent the links occupied by the newly planned paths, and the thin lines represent unoccupied links. Referring to the upper sub-scheme of Figure 5, it can be seen that there is no conflict between the links occupied by the newly planned paths and the already planned paths. Therefore, the newly planned paths are added to the topology links, resulting in the topology links shown in the lower sub-scheme of Figure 5. It should be understood that the example in Figure 5 is only for the convenience of understanding this solution and is not intended to limit this solution.

[0129] In the process of path planning based on the principle that the newly planned path cannot conflict with the already planned path, if there is no path available for the new data flow, the previously selected path can be rolled back and the path planning for the previous data flow can be redone.

[0130] For example, referring to Figure 6, which is another schematic diagram of path planning provided in the embodiments of this application, since the path planning mainly involves selecting which spine to forward the data, Figure 6 only shows the Leaf and Spine parts. Figure 6 includes two sub-schematic diagrams, an upper one and a lower one. In Figure 6, the dark gray thick lines represent the uplinks occupied by the planned paths, the light gray thick lines represent the downlinks occupied by the planned paths, the thin lines represent the unoccupied links, and the dashed lines represent the links occupied by the newly planned paths. Referring to the upper sub-schematic diagram of Figure 6, it can be seen that it is no longer possible to plan a path for the new data flow. The uplink between Leaf1 and Spine(N-1) is backed up, and the uplink between Leaf1 and SpineN is reselected. Thus, the new path planned for the data flow is: Leaf1-Spine(N-1)-Leaf2, resulting in the topology shown in the lower sub-schematic diagram of Figure 6. It should be understood that the example in Figure 6 is only for the convenience of understanding this solution and is not intended to limit this solution.

[0131] In this embodiment, the S paths corresponding to the S data streams are obtained based on the communication relationships and topology information of the S data streams. The topology information includes the connection relationships between different network devices in the multi-layer network used to transmit the S data streams. In other words, the S paths are obtained after path planning based on global information, which is beneficial to further reduce the possibility of conflicts between the transmission paths of different data streams, further improve the transmission efficiency of data streams, and also improve the efficiency of the inference or training process of machine learning models. In addition, the method provided in this application adopts a flow-by-flow planning approach, that is, multiple packets in the same data stream are sent sequentially through the same path, avoiding the situation where the packets received by the receiver are out of order, thereby avoiding the time consumed by retransmitting packets in the data stream after out of order, which is also beneficial to improving the transmission efficiency of data streams.

[0132] 402. The scheduling node sends the first path corresponding to the first data stream to the communication device. The first data stream is any one of the S data streams, and the S paths include the first path corresponding to the first data stream.

[0133] In this embodiment, step 402 is an optional step. Since the data in the S data streams can be generated by at least one communication device, after the scheduling node obtains the S paths corresponding to the S data streams, it can send the S paths corresponding to the S data streams to each of the aforementioned at least one communication device. Each communication device can obtain the first path corresponding to the first data stream from the aforementioned S paths corresponding to the S data streams according to the first data stream it needs to send.

[0134] Alternatively, after obtaining the S paths corresponding to the S data streams, the scheduling node can also send the path corresponding to the data stream that each communication device needs to send to each communication device based on which communication device the source address information of each of the S data streams is located in, that is, based on the correspondence between the S data streams and at least one communication device.

[0135] 403. The communication device obtains the first path information corresponding to the first data stream.

[0136] The specific implementation of step 403 by the communication device and the meaning of the terms in step 403 can be found in the description of step 301 in the embodiment corresponding to Figure 3 above. The difference is that the AI ​​task node in the embodiment corresponding to Figure 3 is replaced by the communication device. The repeated parts will not be described again here.

[0137] For example, during the link establishment phase corresponding to the first data stream, the communication device can determine the first source port number based on the first path and the first rule. The first source port number is configured as the source port number during the link establishment phase corresponding to the first data stream.

[0138] The communication device may include a link establishment module that conforms to the definitions of Transmission Control Protocol (TCP), Remote Direct Memory Access (RDMA) protocol, or other communication protocols. Optionally, the link establishment module may include an application programming interface (API) that configures the source port number used in the link establishment phase. For example, the communication device can configure the source port number used in the link establishment phase corresponding to the first data stream as the first source port number by calling the API.

[0139] In this embodiment, the source port number is configured as the first source port number during the link establishment stage corresponding to the first data stream. This determines the first path during the link establishment stage, thus avoiding path conflicts between different data streams and improving data stream transmission efficiency. Furthermore, an API is added to the link establishment module to configure the source port number. This allows for configuring the source port number in the first packet as the first source port number with minimal modifications to the link establishment module, further reducing the implementation difficulty of this solution.

[0140] 404. The communication device sends a first message to the first network device. The first message belongs to the first data stream. The header of the first message includes first path information. The first network device is used to transmit the first message.

[0141] The specific implementation of step 403 by the communication device and the meaning of the terms in step 403 can be found in the description of step 302 in the embodiment corresponding to Figure 3 above. The difference is that the AI ​​task node in the embodiment corresponding to Figure 3 is replaced by the communication device. The repeated parts will not be described again here.

[0142] 405. The first network device determines the address information of the next hop based on the first path information.

[0143] For example, after receiving the first message, the first network device can determine the address information of the next hop based on the first path information included in the header of the first message.

[0144] In one scenario, the first path information is the first source port number in the header of the first message. In this case, step 405 may include: the first network device determining the address information of the next hop based on the first source port number and the first rule; wherein the first source port number is obtained based on the address information of the second network device and the first rule, the first path includes transmitting the first data stream through the first network device and the second network device, and the second network device is the next hop of the first network device.

[0145] For example, in the process of determining the address information of the next hop, the first network device can determine at least one equivalent path between the first network device and the destination communication device indicated by the destination address information. The first network device can select a first path for transmitting the first data stream from the aforementioned at least one equivalent path based on the source port number and the first rule in the received message, and thus determine the address information of the second network device in the first path, that is, determine the address information of the next hop.

[0146] Optionally, the first rule includes performing a hash operation based on the source port number in the received message; for example, the first rule is to perform a hash operation on the 5-tuple information in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule is to perform a hash operation on the source port number in the message to select a path for transmitting the first data stream from at least one equivalent path; or, the first rule is to perform a hash operation on the source port number and the destination port number in the message to select a path for transmitting the first data stream from at least one equivalent path, etc., which can be determined according to the actual application scenario.

[0147] In another scenario, the first path information may include complete path information, in which case the first network device may also directly obtain the next-hop address information from the header of the first message.

[0148] After determining the address information of the next hop (i.e., the address information of the second network device), the first network device can send a first message to the second network device. The second network device then determines the address information of the next hop and forwards the first message until the first message is transmitted from the source communication device to the destination communication device through the multi-layer network.

[0149] To further understand the method provided in this application, please refer to Figure 7. Figure 7 is a schematic diagram of a path planning system provided in an embodiment of this application. Figure 7 uses the application of the method provided in this application to the inference or training process of a machine learning model as an example. The multi-layer network shown in Figure 7 is a two-layer network containing spine nodes and leaf nodes. The scheduling node can obtain the communication relationships and topology information of S data streams, and determine S paths corresponding to the S data streams based on the communication relationships and topology information. The scheduling node can send the first path corresponding to the first data stream to the path planning module of the AI ​​task node. The AI ​​task node may include a CPU for performing general-purpose operations and an NPU for performing AI calculations. The path planning module of the AI ​​task node configures the source port number, for example, configuring the source port number used in the link establishment stage corresponding to the first data stream as the first source port number. Multiple AI task nodes are connected to Leaf nodes in a multi-layer network. The multi-layer network is used to transmit data streams. For example, the first message sent by the source AI task node may include the first source port number. The source Leaf node can determine which Spine node to forward the first message based on the first source port number. After the Spine node forwards the first message to the destination Leaf node, the Leaf node forwards the first message to the destination AI task node. It should be understood that the example in Figure 7 is only for the convenience of understanding this scheme and is not intended to limit this scheme.

[0150] Optionally, the method provided in this application can be applied to scenarios where the overall network bandwidth is sufficient. Sufficient overall network bandwidth means that, assuming there are n data streams occupying bandwidth d in the multi-layer network, which need to be distributed among m equivalent links with bandwidth capacity c, if nd > mc, it indicates that the overall network bandwidth is insufficient, and the congestion problem may not be solved by the load balancing mechanism alone. In this case, a collaborative scheduling algorithm or a congestion control algorithm can be used to solve the network congestion problem. When the method provided in this application is applicable to scenarios where nd ≤ mc, load balancing of the data stream transmission process in the multi-layer network can be achieved solely through the method provided in this application.

[0151] Based on the embodiments corresponding to Figures 1 to 7 above, please refer to Figure 8. Figure 8 is a structural schematic diagram of a path information processing device provided in this application embodiment. The path information processing device 800 is applied in an AI task node. The inference process or training process of the machine learning model includes at least two steps. One of the at least two steps is the first step, which includes the data transmission of S data streams. The starting condition of the second step includes the completion of data transmission of all S data streams. The second step is the next step after the first step. S is an integer greater than or equal to 1. The path information processing device 800 includes: an acquisition module 801, used to acquire path information corresponding to a first data stream, wherein the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include a first path corresponding to the first data stream, and the path information corresponds to the first path; and a sending module 802, used to send a first message to a first network device. The first message belongs to the first data stream, and the header of the first message includes path information. The first network device is used to transmit the first message.

[0152] Optionally, the path information is the first source port number in the header of the first message. The first source port number is obtained based on the first path and the first rule in the first network device. The function of the first rule is to determine the address information of the next hop based on the source port number in the received message and the first rule.

[0153] Optionally, the first rule includes performing a hash operation based on the source port number in the received message.

[0154] Optionally, the path information processing device 800 further includes: a determination module 803, used to determine a first source port number based on the first path and the first rule, wherein the first source port number is configured as the source port number during the link establishment phase corresponding to the first data stream.

[0155] Optionally, the chain-building module in the AI ​​task node is equipped with an application programming interface (API). The API's functions include configuring the source port number used in the chain-building phase. The chain-building module conforms to the definition of Transmission Control Protocol (TCP) or Remote Direct Data Access Protocol (RDMA).

[0156] Optionally, the S paths corresponding to the S data streams are obtained based on the communication relationship and topology information of the S data streams. The communication relationship of each data stream in the S data streams includes source address information and destination address information. The topology information includes the connection relationship between different network devices in the multi-layer network used to transmit the S data streams.

[0157] It should be noted that the path information processing device 800 can realize the functions of the AI ​​task nodes and communication devices in the various method embodiments corresponding to Figures 1 to 7 above. The information interaction and execution process between the modules / units in the path information processing device 800 are based on the same concept as the various method embodiments corresponding to Figures 1 to 7 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0158] Please refer to Figure 9, which is a schematic diagram of another structure of the path information processing device provided in this application embodiment. The path information processing device 900 is applied in a first network device. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The starting condition of the second step includes that all S data streams have completed data transmission. The second step is the next step after the first step. M is an integer greater than or equal to 1. The path information processing device 900 includes: a receiving module 901, used to obtain path information from the header of a received first message, wherein the first message belongs to a first data stream, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path; and a determining module 902, used to determine the address information of the next hop based on the path information.

[0159] Optionally, the path information is the first source port number in the header of the first message. The determination module 902 is specifically used to determine the address information of the next hop based on the first source port number and the first rule, wherein the first source port number is obtained based on the first path and the first rule adopted by the first network device.

[0160] Optionally, the first source port number is configured to be the source port number during the link establishment phase corresponding to the first data stream.

[0161] It should be noted that the path information processing device 900 can realize the functions of the first network device in the various method embodiments corresponding to Figures 1 to 7 above. The information interaction and execution process between the modules / units in the path information processing device 900 are based on the same concept as the various method embodiments corresponding to Figures 1 to 7 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0162] Please refer to Figure 10, which is a schematic diagram of another structure of the path information processing device provided in the embodiment of this application. The path information processing device 1000 is applied in a communication device. The path information processing device 1000 includes: an acquisition module 1001, used to acquire a first source port number corresponding to a first path of a first data stream, wherein the first path is a planned path of the first data stream, and the first source port number is obtained based on the first path and a first rule in the first network device. The function of the first rule is to obtain the address information of the next hop based on the source port number in the received message and the first rule; and a sending module 1002, used to send a first message to the first network device, wherein the first message belongs to the first data stream.

[0163] Optionally, the inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition of the second step includes that all S data streams have completed data transmission. The second step is the next step after the first step, and S is an integer greater than or equal to 1. The first data stream is any one of the S data streams, and the S paths corresponding to the S data streams are pre-planned, including the first path of the first data stream.

[0164] It should be noted that the path information processing device 1000 can realize the functions of the AI ​​task nodes and communication devices in the various method embodiments corresponding to Figures 1 to 7 above. The information interaction and execution process between the modules / units in the path information processing device 1000 are based on the same concept as the various method embodiments corresponding to Figures 1 to 7 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0165] Please refer to Figure 11. Figure 11 is a schematic diagram of another structure of the path information processing device provided in the embodiment of this application. The path information processing device 1100 is applied in a first network device. The path information processing device 1100 includes: a receiving module 1101, used to obtain a first source port number from a received first message; and a determining module 1102, used to determine the address information of the next hop according to the first source port number and a first rule. The first message belongs to a first data stream, the first source port number is obtained based on a first path and a first rule, and the first path is the planned path of the first data stream.

[0166] Optionally, the inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition of the second step includes that all S data streams have completed data transmission. The second step is the next step after the first step, and S is an integer greater than or equal to 1. The first data stream is any one of the S data streams, and the S paths corresponding to the S data streams are pre-planned, including the first path of the first data stream.

[0167] It should be noted that the path information processing device 1100 can realize the functions of the first network device in the various method embodiments corresponding to Figures 1 to 7 above. The information interaction and execution process between the modules / units in the path information processing device 1100 are based on the same concept as the various method embodiments corresponding to Figures 1 to 7 in this application. For details, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.

[0168] This application also provides a device, as shown in FIG12, which is a schematic diagram of the structure of the device provided in this application embodiment. Optionally, the device 1200 performs the functions of the AI ​​task node and / or communication device in the various method embodiments corresponding to FIG1 to FIG7; or, the device 1200 performs the functions of the first network device in the various method embodiments corresponding to FIG1 to FIG7.

[0169] The device 1200 includes a memory 1202 and at least one processor 1201. Optionally, the processor 1201 implements the methods in the above embodiments by reading instructions stored in the memory 1202, or the processor 1201 may also implement the methods in the above embodiments by internally stored instructions. When the processor 1201 implements the methods in the above embodiments by reading instructions stored in the memory 1202, the memory 1202 stores instructions for implementing the methods provided in the above embodiments of this application.

[0170] Optionally, at least one processor 1201 is one or more CPUs, including single-core and multi-core CPUs. The memory 1202 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, or optical memory. The memory 1202 stores operating system instructions. After the program instructions stored in the memory 1202 are read by the at least one processor 1201, the device 1200 executes the corresponding operations in the foregoing embodiments.

[0171] Optionally, the device 1200 also includes a network interface 1203, which can be a wired interface or a wireless interface. The network interface 1203 is used to perform data transmission and reception in the various method embodiments corresponding to Figures 1 to 7.

[0172] It should be understood that network interface 1203 has the functions of receiving and sending data. The functions of "receiving data" and "sending data" can be integrated into the same transceiver interface, or the functions of "receiving data" and "sending data" can be implemented in different interfaces, which is not limited here. In other words, network interface 1203 may include one or more interfaces for implementing the functions of "receiving data" and "sending data".

[0173] After the processor 1201 reads the program instructions from the memory 1202, other functions that the device 1200 can perform are described in the preceding method embodiments.

[0174] Optionally, the device 1200 also includes a bus 1204, through which the processor 1201 and memory 1202 are typically interconnected, or in other ways.

[0175] The device 1200 provided in this application embodiment is used to execute the methods executed by the AI ​​task node or communication device in the above-described method embodiments, and to achieve the corresponding beneficial effects; or, the device 1200 provided in this application embodiment is used to execute the methods executed by the first network device in the above-described method embodiments, and to achieve the corresponding beneficial effects. The specific implementation of the device 1200 shown in Figure 12 can be referred to the descriptions in the foregoing method embodiments, and will not be repeated here.

[0176] This application also provides a computer-readable storage medium storing a program that, when run on a computer, causes the computer to perform the steps executed by the AI ​​task node and / or communication device in the methods described in the embodiments shown in Figures 1 to 7; or causes the computer to perform the steps executed by the first network device in the methods described in the embodiments shown in Figures 1 to 7.

[0177] This application also provides a computer program product, which includes a program that, when run on a computer, causes the computer to perform the steps performed by the AI ​​task node and / or communication device in the methods described in the embodiments shown in Figures 1 to 7; or causes the computer to perform the steps performed by the first network device in the methods described in the embodiments shown in Figures 1 to 7.

[0178] This application also provides a circuit system, which includes a processing circuit configured to execute the steps performed by the AI ​​task node and / or communication device in the methods described in the embodiments shown in Figures 1 to 7; or, to execute the steps performed by the first network device in the methods described in the embodiments shown in Figures 1 to 7.

[0179] This application embodiment also provides a communication system, which includes an artificial intelligence (AI) task node and a first network device. For example, the AI ​​task node is used to obtain path information corresponding to a first data stream, wherein the first data stream is any one of S data streams, the S paths corresponding to the S data streams are pre-planned, and the S paths include a first path corresponding to the first data stream, and the path information corresponds to the first path; the AI ​​task node sends a first message to the first network device, the first message belonging to the first data stream, the header of the first message including path information, and the first network device is used to transmit the first message. The first network device is used to obtain the path information from the header of the received first message and determine the address information of the next hop based on the path information. Alternatively,

[0180] The communication system includes a communication device and a first network device. For example, the communication device is used to obtain a first source port number corresponding to a first path of a first data stream. The first path is a planned path of the first data stream. The first source port number is obtained based on the first path and a first rule in the first network device. The function of the first rule is to obtain the address information of the next hop based on the source port number in the received packet and the first rule; and to send a first packet to the first network device, the first packet belonging to the first data stream. The first network device is used to obtain the first source port number from the received first packet, and determine the address information of the next hop according to the first source port number and the first rule, wherein the first source port number is obtained based on the first path and the first rule, and the first path is a planned path of the first data stream.

[0181] The device provided in this application embodiment can specifically be a chip, which includes a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, pins, or circuits. The processing unit can execute computer execution instructions stored in the storage unit to cause the chip to execute the methods described in the embodiments shown in Figures 1 to 7. Optionally, the storage unit can be a storage unit within the chip, such as a register or cache. Alternatively, the storage unit can be a storage unit located outside the chip within the wireless access device, such as a read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions, such as random access memory (RAM).

[0182] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and 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 modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0183] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CLUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0184] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0185] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

Claims

1. A method for processing path information, characterized in that, The method is applied to the inference or training process of a machine learning model. The inference or training process includes at least two steps. One of the at least two steps, the first step, includes the data transmission of S data streams. The start condition for the second step includes the completion of data transmission for all S data streams. The second step is the next step after the first step. S is an integer greater than or equal to 1. The method includes: The AI ​​task node acquires path information corresponding to the first data stream, wherein the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path; The AI ​​task node sends a first message to the first network device. The first message belongs to the first data stream, and the header of the first message includes the path information. The first network device is used to transmit the first message.

2. The method according to claim 1, characterized in that, The path information is the first source port number in the header of the first message. The first source port number is obtained based on the first path and the first rule in the first network device. The function of the first rule is to determine the address information of the next hop based on the source port number in the received message and the first rule.

3. The method according to claim 2, characterized in that, The first rule includes performing a hash operation based on the source port number in the received message.

4. The method according to claim 2, characterized in that, The method further includes: The AI ​​task node determines the first source port number based on the first path and the first rule. The first source port number is configured as the source port number during the chain-building phase corresponding to the first data stream.

5. The method according to claim 4, characterized in that, The chain-building module in the AI ​​task node is equipped with an application programming interface (API). The API's functions include configuring the source port number used in the chain-building phase. The chain-building module conforms to the definition of Transmission Control Protocol (TCP) or Remote Direct Data Access Protocol (RDMA).

6. The method according to any one of claims 1 to 3, characterized in that, The S paths corresponding to the S data streams are obtained based on the communication relationships and topology information of the S data streams. The communication relationship of each data stream in the S data streams includes source address information and destination address information. The topology information includes the connection relationships between different network devices in the multi-layer network used to transmit the S data streams.

7. A method for processing path information, characterized in that, The method is applied to the inference or training phase of a machine learning model. The inference or training phase includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition for the second step includes the completion of data transmission for all S data streams. The second step is the next step after the first step. M is an integer greater than or equal to 1. The method includes: The first network device obtains path information from the header of the received first packet, wherein the first packet belongs to the first data stream, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path; The first network device determines the address information of the next hop based on the path information.

8. The method according to claim 7, characterized in that, The path information is the first source port number in the header of the first message. The first network device determines the address information of the next hop based on the path information, including: The first network device determines the address information of the next hop based on the first source port number and the first rule, wherein the first source port number is obtained based on the first path and the first rule adopted by the first network device.

9. The method according to claim 7 or 8, characterized in that, The first source port number is configured as the source port number during the link establishment phase corresponding to the first data stream.

10. A method for processing path information, characterized in that, The method includes: The communication device obtains a first source port number corresponding to a first path of the first data stream. The first path is the planned path of the first data stream. The first source port number is obtained based on the first path and a first rule in the first network device. The function of the first rule is to obtain the address information of the next hop based on the source port number in the received packet and the first rule. The communication device sends a first message to the first network device, and the first message belongs to the first data stream.

11. The method according to claim 10, characterized in that, The method is applied to the inference or training phase of a machine learning model. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps is a first step, which includes S data streams. The start condition of the second step includes the completion of data transmission of all S data streams. The second step is the next step after the first step. S is an integer greater than or equal to 1. Wherein, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, and the S paths include the first path of the first data stream.

12. A method for processing path information, characterized in that, The method includes: The first network device obtains the first source port number from the received first message; The first network device determines the address information of the next hop based on the first source port number and the first rule, wherein the first packet belongs to the first data stream, the first source port number is obtained based on the first path and the first rule, and the first path is the planned path of the first data stream.

13. The method according to claim 12, characterized in that, The method is applied to the inference or training phase of a machine learning model. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps is a first step, which includes S data streams. The start condition of the second step includes the completion of data transmission of all S data streams. The second step is the next step after the first step. M is an integer greater than or equal to 1. Wherein, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, and the S paths include the first path of the first data stream.

14. A path information processing apparatus, characterized in that, The device is applied in an artificial intelligence (AI) task node. The inference or training process of the machine learning model includes at least two steps. One of these at least two steps, the first step, includes the data transmission of S data streams. The starting condition for the second step includes the completion of data transmission for all S data streams. The second step is the next step after the first step. S is an integer greater than or equal to 1. The device includes: The acquisition module is used to acquire path information corresponding to the first data stream, wherein the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path; The sending module is used to send a first message to a first network device. The first message belongs to the first data stream, and the header of the first message includes the path information. The first network device is used to transmit the first message.

15. A path information processing apparatus, characterized in that, The device is applied in a first network device. The inference or training phase of the machine learning model includes at least two steps. One of the at least two steps, the first step, includes S data streams. The start condition for the second step includes the completion of data transmission for all S data streams. The second step is the next step after the first step. M is an integer greater than or equal to 1. The device includes: The receiving module is used to obtain path information from the header of the received first message, wherein the first message belongs to the first data stream, the first data stream is any one of the S data streams, the S paths corresponding to the S data streams are pre-planned, the S paths include the first path corresponding to the first data stream, and the path information corresponds to the first path. The determination module is used to determine the address information of the next hop based on the path information.

16. A path information processing apparatus, characterized in that, The device is used in a communication device, and the device includes: The acquisition module is used to acquire the first source port number corresponding to the first path of the first data stream. The first path is the planned path of the first data stream. The first source port number is obtained based on the first path and the first rule in the first network device. The function of the first rule is to obtain the address information of the next hop based on the source port number in the received packet and the first rule. The sending module is used to send a first message to the first network device, wherein the first message belongs to the first data stream.

17. A path information processing apparatus, characterized in that, The device is used in a first network device, and the device includes: The receiving module is used to obtain the first source port number from the received first message; The determination module is used to determine the address information of the next hop based on the first source port number and the first rule, wherein the first packet belongs to the first data stream, the first source port number is obtained based on the first path and the first rule, and the first path is the planned path of the first data stream.

18. A device, characterized in that, The device includes a processor coupled to a memory for storing programs or instructions, and the processor for executing the programs or instructions to enable the device to perform the method as described in any one of claims 1 to 13.

19. A computer-readable storage medium, characterized in that, The medium stores instructions that, when executed by a processor, implement the method of any one of claims 1 to 13.

20. A computer program product, characterized in that, The computer program product includes instructions that, when executed on a processor, implement the method as described in any one of claims 1 to 13.

21. A communication system, characterized in that, The communication system includes an artificial intelligence (AI) task node and a first network device, wherein the AI ​​task node is used to execute the method as described in any one of claims 1 to 6, and the first network device is used to execute the method as described in any one of claims 7 to 9; or... The communication system includes a communication device and a first network device, wherein the communication device is used to perform the method as described in claim 10 or 11, and the first network device is used to perform the method as described in claim 12 or 13.

Citation Information

Patent Citations

  • Path determination method and related equipment

    CN117527675A

  • Data stream forwarding method and device, SDN controller and storage medium

    CN118101565A

  • Adaptive network control of traffic flows in a secure network

    US20230188470A1

Cited By

  • Path planning method and system for cross-host set communication of data center network

    CN121567634A