A data processing method, switching node and related system

By exchanging control information received by nodes in a distributed computing system and optimizing data transmission paths, the problem of low efficiency in multi-node multicast communication is solved, and efficient and reliable multicast data transmission is achieved.

CN119232681BActive Publication Date: 2025-11-11HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411175488.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2023-06-29
Filing Date
2023-10-11
Publication Date
2025-11-11
Estimated Expiration
2043-10-11

AI Technical Summary

Technical Problem

In high-performance computing scenarios, multicast communication between multiple nodes is inefficient, especially when the amount of multicast data is huge, and existing technologies are difficult to solve effectively.

Method used

In a distributed computing system, switching nodes receive control information from computing nodes, dynamically establish multicast tasks, and process multicast data through chained paths and cross-connect units. This avoids congestion caused by limited buffer capacity, optimizes data transmission paths, and ensures accurate data transmission by utilizing tag and address information.

Benefits of technology

It improves multicast efficiency, reduces buffer usage and data transmission latency of switching nodes, avoids congestion problems, and ensures the reliability and accuracy of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232681B_ABST
    Figure CN119232681B_ABST
Patent Text Reader

Abstract

This application provides a data processing method, a switching node, and a related system, applied to a distributed computing system including multiple computing nodes and at least one first switching node. Each first switching node is connected to at least one of the multiple computing nodes. After receiving control information from the computing nodes, the first switching node establishes a multicast task based on the received control information. This multicast task includes multicast purpose information. Then, the first switching node obtains multicast data according to the multicast task and sends the multicast data to the computing nodes. In this distributed computing system, when multiple computing nodes execute services requiring multicast, they do not need to pre-configure relevant multicast information. Instead, when multicast is needed, the computing nodes participating in the multicast send control information to the switching node, which then establishes a multicast task based on the control information to complete the multicast. This simplifies the control plane process when implementing multicast and improves multicast efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202311324100.5 and the original application date is October 11, 2023. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to a data processing method, a switching node, and a related system. Background Technology

[0003] As the computational scale of tasks in High Performance Computing (HPC) scenarios increases significantly, the proportion of communication between multiple nodes in HPC applications has risen dramatically, especially broadcast and multicast. For example, in the high-performance Linpack (HPL) benchmark, the main communication is multicast, and the amount of data in each multicast is enormous. Therefore, how to implement multicast between multiple nodes is a pressing technical problem that needs to be solved in HPC tasks. Summary of the Invention

[0004] This application provides a data processing method, a switching node, and a related system, which can simplify the control plane process when multicast needs to be implemented in a distributed system and improve multicast efficiency.

[0005] In a first aspect, this application provides a data processing method applied to a distributed computing system comprising multiple computing nodes and at least one first switching node, wherein each first switching node is connected to some or all of the aforementioned multiple computing nodes. During the execution of services by the distributed computing system, the first switching node receives control information sent by at least one computing node, wherein each control information includes an indication field for indicating whether the computing node sending the control information is a multicast source or a multicast destination; after receiving the control information, the first switching node establishes a multicast task based on the received control information, the multicast task including multicast destination information, which indicates the destination information of the multicast data to be sent by the multicast task; then the first switching node acquires the multicast data and sends the multicast data to the computing nodes according to the multicast task.

[0006] In this distributed computing system, when multiple computing nodes execute services that require multicast, they do not need to configure relevant multicast information in advance. Instead, when multicast is required during the execution of the service, the computing nodes participating in the multicast send control information to the switching nodes. The switching nodes that receive the control information establish multicast tasks based on the control information and then complete the multicast. This simplifies the control plane process for implementing multicast services and improves multicast efficiency.

[0007] In one possible implementation, the first switching node is connected to a multicast source, and the control information sent by the multicast source also includes the address information of the multicast data; then the multicast task established by the first switching node connected to the multicast source also includes the address information of the multicast data; the first switching node obtaining the multicast data includes: the first switching node sending a data read request to the multicast source according to the address information; and obtaining the multicast data from the read response returned by the received multicast source; wherein, the multicast source is one of the plurality of computing nodes; the read response includes that the multicast data is part or all of the data to be multicast indicated by the control information sent by the multicast source.

[0008] When the amount of data to be multicast in the multicast source is large, the switching node has limited buffer capacity for caching multicast data. The switching node reads the data to be multicast from the data source by sending read requests to the multicast source. The switching node can control the rate at which it sends data read requests, thereby controlling the amount of data transmitted between the switching node and the multicast source, as well as the amount of data passing through the switching node's port. This avoids congestion caused by the switching node's limited buffer capacity being unable to process data in a timely manner when the multicast source actively sends data.

[0009] In one possible implementation, the distributed computing system further includes a second switching node connected to the first switching node. The method further includes: the first switching node sending control information to the second switching node. This control information includes a field indicating whether the first switching node is connected to a multicast source and a field indicating whether the first switching node is connected to a multicast destination. If the control information sent by the first switching node indicates that the first switching node is connected to a multicast source, the first switching node acquiring multicast data includes: the first switching node receiving notification information sent by the second switching node, which instructs the first switching node to acquire multicast data from the multicast source; after receiving the notification information, the first switching node sends a data read request to the multicast source based on address information; the first switching node receives a read response returned by the multicast source, obtaining the multicast data, wherein the read response includes the multicast data, which is part or all of the data to be multicast as indicated by the control information sent by the multicast source.

[0010] In a distributed computing system comprising multiple layers of switching nodes, where multicast requires the participation of a second switching node above the first switching node, the first switching node establishing the multicast task also needs to send control information to the connected second switching node. Upon receiving the control information from the first switching node connected to the multicast source, the second switching node can instruct the first switching node to retrieve multicast data from the multicast source and then send it to the second switching node. The second switching node then forwards the multicast data to the first switching node participating in the multicast. All switching nodes participating in the multicast will send control information to the second switching node.

[0011] In one possible implementation, if the control information sent by the first switching node indicates that the first switching node is not connected to the multicast source, the first switching node acquiring multicast data includes: the first switching node receiving multicast data sent by the second switching node, which is sent to the second switching node by another first switching node connected to the multicast source.

[0012] In one possible implementation, the first switching node includes a processing unit and ports, which form a chain path, meaning that the ports can exchange data through the chain path.

[0013] In one possible implementation, the first switching node includes a processing unit and multiple ports. The first switching node sends multicast data to at least one computing node according to a multicast task, including: the processing unit sending multicast data to a first port of the chained path; if the first port is a target port, then after receiving the multicast data, the first port copies the multicast data to its corresponding buffer; and sending the multicast data to the computing node connected to the first port through the first port; wherein the first port is one of multiple ports included in the first switching node; and the target port is the port indicated by the multicast destination information that needs to send multicast data.

[0014] The aforementioned chain path also includes a path between the processing unit and the first port; the aforementioned first switching node also includes a crossbar (xbar), through which the processing unit can interact with each port to exchange data. The processing unit can send multicast data to the first port through the chain path between the processing unit and the first port; it can also send multicast data to the first port through the crossbar.

[0015] Each port of the switching node has a buffer. After multicast data is sent to the port, the port copies and buffers the multicast data that needs to be sent. This avoids copying the data multiple times in the processing unit and then sending it to each target port. This reduces the occupation of the main buffer area corresponding to the processing unit, reduces the congestion problem caused by the main buffer of the switching node being full and unable to process multicast data obtained from the multicast source in a timely manner, and improves multicast efficiency.

[0016] In one possible implementation, after the first port replicates and buffers the multicast data, it sends one copy of the multicast data to the next port in the chain.

[0017] In one possible implementation, the processing unit sends multicast data to the first port of the chain path; if the first port does not belong to the target port, the first port does not copy the multicast data after receiving it, and instead sends the multicast data directly to the next port of the chain path.

[0018] In one possible implementation, the multicast task further includes address information for each multicast destination; this address information is used to indicate the storage address of the multicast destination after receiving the multicast data. The method further includes: a processing unit generating multiple message headers based on the multicast task, wherein each message header includes the storage address of a multicast destination, and the address information of the multicast destinations in each message header is different; the processing unit sending the multiple message headers to a target port through a cross-connect unit, wherein one target port corresponds to one message header; the sending of multicast data from the first port to the computing node connected to the first port includes: the first port obtaining a target message based on the message headers and multicast data obtained from the first port, and sending the target message to the computing node connected to the first port.

[0019] A switching node can send data to various ports via two paths, avoiding the situation where all data is sent to ports via a single path. This further reduces the possibility of congestion within the switching node and improves multicast efficiency.

[0020] In one possible implementation, the first switching node includes one or more chain paths. If the first switching node includes one chain path, this chain path connects all ports of the switching node, and multicast data can reach all ports through this chain path. If the first switching node includes multiple chain paths, each of these multiple chain paths can connect some or all of all ports of the switching node.

[0021] If the switching node includes multiple chain paths, the first switching node can replicate the multicast data multiple times, and each copy of the multicast data is sent through a chain path, which can reduce the time it takes for the multicast data to reach each port, reduce latency, and improve multicast efficiency.

[0022] In one possible implementation, the message header includes a first tag, and the multicast data includes a second tag; the processing unit sends multicast data to the first port of the chain path, and further includes: if the first port has the same first tag and the second tag, the first port determines that the first port is the target port.

[0023] A switching node may need to handle multiple different multicast tasks. By carrying tags in the packet header and multicast data, it is possible to avoid combining the packet headers and multicast data of different multicast tasks, which could result in the multicast destination receiving incorrect multicast data.

[0024] In one possible implementation, the control information sent by the multicast destination further includes first quantity information, which indicates the number of multicast destinations connected to the first switching node; the first switching node sends a data read request to the multicast source according to the address information of the multicast data, including: after receiving the control information indicating the number of the first quantity information, the first switching node sends a data read request to the multicast source according to the address information.

[0025] Since the storage resources of the switching nodes are limited, the first switching node sends a data read request to the computing nodes only after confirming that it has received control information from all the computing nodes connected to it. This avoids the problem of acquiring multicast data without confirming all multicast destinations, which would cause the multicast data read first to need to be cached for a long time and occupy storage resources.

[0026] In one possible implementation, the control information sent by the multicast destination further includes first quantity information, which is used to indicate the number of multicast destinations connected to the first switching node; the first switching node sending control information to the second switching node includes: after receiving control information indicating the number from the first quantity information, the first switching node sends control information to the second switching node.

[0027] Because the storage resources of the switching nodes are limited, the first switching node sends control information to the second switching node only after confirming that it has received control information from all the computing nodes connected to it. This avoids the second switching node starting to process the task corresponding to the control information as soon as it receives it, thus avoiding consuming the resources of the second switching node. At the same time, it also avoids the problem that the second switching node notifies the first switching node to retrieve multicast data before the first switching node has determined all the multicast destinations, which would cause the multicast data to be read first to need to be cached for a long time and occupy storage resources.

[0028] In one possible implementation, the control information sent by the first switching node further includes second quantity information, which indicates the number of first switching nodes connected to the second switching node; the aforementioned notification information is sent by the second switching node to the first switching node connected to the multicast source after receiving the control information indicating the number of second quantity information.

[0029] Because the storage resources of the switching nodes are limited, the second switching node only notifies the first switching nodes connected to the multicast source to obtain multicast data after confirming that it has received all the first switching nodes participating in this multicast. This avoids the problem that if the second switching node obtains multicast data without confirming all the first switching nodes participating in this multicast, the multicast data obtained earlier will need to be cached in the second switching node for a long time, occupying storage resources.

[0030] In one possible implementation, the multicast destination information includes port information indicating the port through which the first switching node receives control information sent by the computing node, and is used to indicate that the first switching node needs to send multicast data through the port indicated by the port information.

[0031] The first switching node needs to send multicast data through the ports through which it receives control information. Therefore, by recording the port information, the target port can be quickly determined.

[0032] In one possible implementation, the multicast source and multicast destination are central processing units (CPU), graphics processing units (GPU), neural network processing units (NPU), tensor processing units (TPU), or dedicated artificial intelligence (AI) processing chips, etc.; the switching nodes can be switching chips or switching devices with switching functions.

[0033] Secondly, this application provides a switching node, which includes a processing unit and multiple ports forming a chain path, wherein: the processing unit is used to send multicast data to a first port of the chain path, the first port being one of the aforementioned multiple ports; the first port is used to copy the multicast data to a buffer corresponding to the first port and send the multicast data to a computing node connected to the first port; wherein the first port is a target port, and the target port includes one or more ports that need to send the multicast data.

[0034] Each port of the switching node has a buffer. After the processing unit obtains multicast data, it sends the multicast data to the port. The port then copies the multicast data and buffers the multicast data that the port needs to send in its corresponding buffer area. This avoids copying the data multiple times in the processing unit and then sending it to each target port. This reduces the occupation of the main buffer area corresponding to the processing unit, reduces the risk of the switching node's main buffer being full and unable to process the multicast data obtained from the multicast source in a timely manner, and thus improves multicast efficiency.

[0035] The aforementioned chain path also includes a path between the processing unit and the first port; the aforementioned first switching node also includes a cross-connect unit, through which the processing unit can interact with each port for data. The processing unit can send multicast data to the first port through the chain path between the processing unit and the first port; it can also send multicast data to the first port through the cross-connect unit.

[0036] In one possible implementation, the first port is also used to send one copy of the multicast data to the next port in the chain path after the multicast data has been copied and buffered.

[0037] In one possible implementation, the processing unit further includes a second port, which, if the second port does not belong to the target port, is used to send the multicast data to the next port in the chain path after acquiring the multicast data.

[0038] Each port of a switching node can determine whether it needs to send received multicast data. If a port determines that it needs to send the multicast data, it copies the multicast data to the corresponding buffer and sends it to the next port in the chain. This method of determining whether a port receiving multicast data is the target port reduces the amount of data processed by the processing unit and improves multicast efficiency.

[0039] In one possible implementation, the multicast task further includes address information for each multicast destination, wherein the multicast destination includes at least one first computing node; the processing unit is further configured to generate multiple message headers according to the multicast task, wherein each message header includes address information for a multicast destination, and the address information for the multicast destination in each message header is different; the processing unit is further configured to send multiple message headers to a target port through a cross-connect unit, wherein one target port corresponds to one message header; the first port is specifically configured to: obtain a target message based on the message headers obtained from the first port and the multicast data, and send the target message to the computing node connected to the first port.

[0040] A switching node can send data to various ports via two paths, avoiding the situation where all data is sent to ports via a single path. This further reduces the possibility of congestion within the switching node and improves multicast efficiency.

[0041] In one possible implementation, the first switching node includes one or more chain paths. If the first switching node includes one chain path, this chain path connects all ports of the switching node, and multicast data can reach all ports through this chain path. If the first switching node includes multiple chain paths, each of these multiple chain paths can connect some or all of all ports of the switching node.

[0042] If the switching node includes multiple chain paths, the first switching node can replicate the multicast data multiple times, and each copy of the multicast data is sent through a chain path, which can reduce the time it takes for the multicast data to reach each port, reduce latency, and improve multicast efficiency.

[0043] In one possible implementation, the above-mentioned message header includes a first label, and the above-mentioned multicast data includes a second label; the above-mentioned first port is further used to: compare the first label in the message header with the second label in the multicast data, and if the first label and the second label are the same, determine that the first port is the target port.

[0044] A switching node may need to handle multiple different multicast tasks. By carrying tags in the packet header and multicast data, it is possible to avoid combining the packet headers and multicast data of different multicast tasks, which could result in the multicast destination receiving incorrect multicast data.

[0045] In one possible implementation, the aforementioned switching node is a switching chip or a switching device with switching functionality, and this switching node has a transport layer. Because this switching node has a transport layer, the message header is sent through the protocol stack in the processing unit, which can ensure data reliability and improve multicast reliability.

[0046] Thirdly, this application provides a data processing system comprising a plurality of computing nodes and at least one first switching node, wherein each of the at least one first switching node is connected to some or all of the plurality of computing nodes, wherein each computing node is used to perform the operations implemented by the computing node in the first aspect or any possible implementation thereof; and each first switching node is used to perform the methods described in the first aspect or any possible implementation thereof.

[0047] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a computing device, cause the computing device to perform the operations implemented by the computing node in the first aspect or any possible implementation of the first aspect.

[0048] Fifthly, this application provides a computer-readable storage medium storing instructions that, when executed on a switching node, cause a computing device to perform the operation implemented by the first switching node in the first aspect or any possible implementation of the first aspect, or to perform the operation described in the second aspect or any possible implementation of the second aspect.

[0049] In a sixth aspect, this application provides a computer program product that, when run on a computing device, causes the computing device to perform the operations implemented by the computing node in the first aspect or any possible implementation of the first aspect.

[0050] In a seventh aspect, this application provides a computer program product that, when run on a device, causes the computing device to perform the operation implemented by the first switching node in the first aspect or any possible implementation of the first aspect, or to perform the operation described in the second aspect or any possible implementation of the second aspect. Attached Figure Description

[0051] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.

[0052] Figure 1 This is a schematic diagram of a computing device cluster provided in an embodiment of this application;

[0053] Figure 2 This is a schematic diagram of a distributed computing system provided in an embodiment of this application;

[0054] Figure 3 This is a schematic diagram of another distributed computing system provided in an embodiment of this application;

[0055] Figure 4 This is a flowchart illustrating a data processing method provided in an embodiment of this application;

[0056] Figure 5 This is a schematic diagram of the structure of a switching node provided in an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of another data processing method provided in an embodiment of this application;

[0058] Figure 7This is a schematic diagram of a computing device provided in an embodiment of this application. Detailed Implementation

[0059] The embodiments of this application are described below with reference to the accompanying drawings.

[0060] Currently, with the development of HPC and Artificial Intelligence (AI) technologies, the computing scale of applications is becoming increasingly larger. To solve the problem of large-scale data computation, distributed computing has emerged. Distributed computing processes data through multiple computing nodes, and then completes the computation through data exchange between these nodes. Therefore, the proportion of communication between multiple computing nodes in applications has significantly increased. For example, in the benchmark tests of HPL and HPL-AI, the main communication is multicast, and the amount of data in each multicast is very large. Therefore, how to implement multicast between multiple computing nodes is a technical problem that needs to be solved.

[0061] This application provides a distributed computing system and a data processing method applied to the distributed computing system. The distributed computing system includes multiple computing nodes and at least one first switching node, each first switching node being connected to at least one of the multiple computing nodes. In this distributed computing system, if multiple computing nodes need to multicast during computation, the participating computing nodes send control information to the connected switching node to enable the switching node to establish a multicast task. These multiple computing nodes include a multicast source and a multicast destination. The multicast source refers to the computing node that needs to send data, and the multicast destination refers to the computing node that receives the data sent by the multicast source. The multicast task includes port information, which instructs the switching node to send data to the multicast destination through the port indicated by the port information. After receiving the data, the switching node sends the data to the multicast destination according to the multicast task.

[0062] The distributed computing system provided in the embodiments of this application is described in detail below with reference to the accompanying drawings.

[0063] This application provides a computing device cluster, such as Figure 1 As shown, Figure 1 This is a schematic diagram of a computing device cluster provided in an embodiment of this application. The computing device cluster includes one or more computing devices. When the computing device cluster includes multiple computing devices, the multiple computing devices are connected through a network. The network can be a carrier network or a network composed of optical cables and data transmission equipment. This embodiment of the application does not impose specific limitations.

[0064] The aforementioned cluster of computing devices can constitute a distributed computing system, and each computing device in the cluster can also function independently as a distributed computing system. For example... Figure 2 As shown, Figure 2 This is a schematic diagram of a distributed computing system provided in an embodiment of this application. The distributed computing system includes multiple computing nodes and at least one first switching node. Each of the at least one first switching node is connected to at least one of the multiple computing nodes. Figure 2 As shown, Figure 2 Taking a distributed computing system consisting of four computing nodes (C0 to C3) and three first exchange nodes (S0 to S2) as an example, the four computing nodes and the three first exchange nodes are connected in a fully connected manner.

[0065] like Figure 3 As shown, Figure 3 This is a schematic diagram of another distributed computing system provided in an embodiment of this application. The distributed computing system includes multiple computing nodes, at least one first switching node, and at least one second switching node. Each of the at least one first switching node is connected to at least one of the multiple computing nodes; each of the at least one second switching node is connected to some of the at least one first switching node. Figure 3 As shown, Figure 3 Taking this distributed computing system, which includes 8 computing nodes (C0-C7), 6 first switching nodes (S0-S5), and 6 second switching nodes (S6-S11), as an example, the connection relationships between multiple computing nodes and at least one first switching node, as well as between at least one first switching node and at least one second switching node, are described in [reference needed]. Figure 3 .

[0066] In this embodiment of the application, the computing node may be a central processing unit (CPU), a graphics processing unit (GPU), a neural network processing unit (NPU), a tensor processing unit (TPU), or a dedicated AI processing chip, etc.; the switching node may be a switching chip or a switching device with switching function, such as a switch.

[0067] It should be understood that the above Figure 2 and Figure 3The diagram illustrates the logical connections between compute nodes and switching nodes. These compute nodes can be located on the same physical device or on different physical devices. When multiple compute nodes are located on multiple different physical devices, these physical devices can be located in the same server rack, as shown above. Figure 3 The compute nodes C0-C3 shown are located on the same server, and compute nodes C4-C7 are located on another server. These two servers are located in the same rack and are connected through a switching node within the rack. When the aforementioned compute nodes are compute nodes located on the same physical device, the aforementioned switching node can be a switching chip within that physical device, or it can be a switching device different from the physical device, and the switching node has a transport layer.

[0068] It should be understood that the above combination Figure 2 and Figure 3 The described topology of the distributed computing system is merely an example and should not be construed as a specific limitation. The distributed computing system can also have other topologies. For example, it may include more or fewer computing nodes or switching nodes, or more layers of switching nodes. The connection relationships between computing nodes and switching nodes, and the connection relationships between at least one first switching node and at least one second switching node, are merely examples and should not be construed as specific limitations. Other connection relationships between computing nodes and switching nodes are also possible, and the embodiments of this application do not impose specific limitations.

[0069] The following are respectively based on Figure 2 and Figure 3 The system shown illustrates the data processing method provided in the embodiments of this application.

[0070] like Figure 4 As shown, Figure 4 This is a flowchart illustrating a data processing method provided in an embodiment of this application, which includes the following steps S401 to S404.

[0071] S401. The first switching node receives control information sent by at least one computing node.

[0072] In this embodiment, the computing node includes a multicast source and a multicast destination. A multicast source refers to a computing node that needs to multicast data during service execution, and a multicast destination refers to a computing node that needs to obtain multicast data from the multicast source during service execution. The multicast data from the multicast source is sent to the multicast destination through a first switching node. For a first switching node, the at least one computing node connected to it may include only a multicast source, or it may include a multicast source and one or more multicast destinations, or it may include one or more multicast destinations.

[0073] When a multicast source needs to send data to other computing nodes during service execution, it sends control information to the first exchange node it's connected to, enabling the first exchange node to establish a multicast task based on the control information. Similarly, when a multicast destination needs to obtain data from a multicast source during service execution, it sends control information to the first exchange node it's connected to, enabling the first exchange node to establish a multicast task based on the control information. After obtaining the data, the first exchange node sends the data to the multicast destination according to the multicast task. Both the control information sent by the multicast source and the control information sent by the multicast destination include an indicator field. This indicator field indicates whether the computing node sending the control information is a multicast source or a multicast destination. For example, if the indicator field value is 1, it indicates that the computing node sending the control information is a multicast source; if the indicator field value is 0, it indicates that the computing node sending the control information is a multicast destination.

[0074] The following sections describe the control information sent by the multicast destination and the control information sent by the multicast source.

[0075] When the computing node is a multicast destination, if the multicast destination needs to obtain data from the multicast source during the execution of its services, for example, by executing an operator that instructs the multicast destination to obtain data from the multicast source, the multicast destination will generate control information and send the control information to the first switching node. The indication field in the control information sent by the multicast destination carries a first identifier, which indicates that the computing node sending the control information is the multicast destination. In this embodiment, for ease of description, the control information carrying the first identifier is referred to as the first control information.

[0076] In one possible implementation, the first control information may also include other information. Table 1 below shows the fields included in the first control information and the meanings of the corresponding fields. In addition to the first identifier carried in the indicator field, the first control information may also include any one or more of the other fields shown in Table 1. It should be understood that the fields listed in Table 1 are merely examples, and the first control information may include more or fewer fields; this application embodiment does not impose specific limitations.

[0077] Table 1

[0078] Fields meaning Task fields Used to indicate a task Operator field Task type used to instruct the first switching node to perform the task. Data volume field The amount of data used to indicate the data to be multicast. Indicator Field Used to indicate whether the control information is being sent from a multicast source or a multicast destination. Address field Used to indicate the storage address after multicast destination receives multicast data. Quantity field The number of multicast destinations used to indicate the first switching node's connection.

[0079] The aforementioned indicator field is used to indicate whether the control information was sent by a multicast source. If the indicator field in the control information carries a first identifier, it indicates that the control information was sent by a multicast destination, i.e., the control information is the aforementioned first control information; if the indicator field carries a second identifier, it indicates that the control information was sent by a multicast source. For example, if the indicator field includes one bit, the first identifier can be 0 and the second identifier can be 1. Therefore, if a computing node is a multicast destination, when sending control information, it sets the value of the indicator field in the control information to 0 to obtain the first control information, and then sends it to the first switching node of the connection; if a computing node is a multicast source, when sending control information, it sets the value of the indicator field in the control information to 1, and then sends it to the first switching node of the connection.

[0080] The aforementioned task fields are used to carry task identifiers (jobidentity, jobID). A task identifier indicates a task, and each task corresponds to a unique task identifier. The first exchange node may include multiple different tasks to be executed, with different task identifiers indicating different tasks. For example, if multiple processes run on each compute node, and processes with the same process identifier on different compute nodes need to perform multiple multicasts, then different task numbers can be assigned sequentially as task identifiers to different multicast tasks. The task identifier can also include a process identifier and a task number. Multicast tasks initiated by the same process are assigned task numbers sequentially; therefore, while the process identifiers of multicast tasks initiated by the same process are the same, the task numbers are different. In multicast tasks initiated by different processes, the task numbers in the task identifiers may be the same, but the process identifiers are different, thus enabling the differentiation of different multicast tasks through task identifiers.

[0081] For example, among multiple computing nodes connected to the same first switching node, some computing nodes are used to execute a first service, and some are used to execute a second service. Computing nodes executing the same service need to exchange data. These computing nodes executing the same service are considered as a single communication domain, and different communication domains are assigned different communication domain identifiers. Among the computing nodes executing different services, some need to perform multicast through the first switching node. Therefore, the task identifier includes the communication domain identifier, process, and task number. Thus, multicast tasks with the same task number initiated by the same process identifier in different communication domains can be distinguished based on the communication domain identifier.

[0082] It should be noted that a single switching node can process multiple multicast tasks in parallel, distinguishing different multicast tasks by different task identifiers. However, the processing procedure for any single multicast task is the same for the first switching node. Therefore, in this embodiment, the data processing method adopted by this embodiment is described using the example of a switching node processing a single multicast task.

[0083] It should be understood that if a distributed computing system is used to execute only one multicast service at a time, the task field may not be included in the control information.

[0084] The aforementioned operator field is used to carry an operator identifier, which indicates the type of task performed by the first switching node. In this embodiment, the task type is multicast or broadcast.

[0085] The above data volume field is used to carry the data volume, which indicates the amount of data to be multicast in the multicast source.

[0086] The address field mentioned above is used to carry address information. For multicast destinations, the address field is used to carry the address information of the multicast destination, which is used to indicate the storage address of the multicast destination after receiving multicast data.

[0087] The aforementioned quantity field carries first quantity information, which indicates the number of multicast destinations connected to the first switching node that received the first control information. For example, in the above... Figure 2 In the distributed computing system shown, the multicast source is compute node C0, and the multicast destinations include compute nodes C1 and C3. Therefore, the value of the quantity field in the control information sent by compute nodes C1 and C3 is 2.

[0088] When a computing node is a multicast source, if the multicast source needs to multicast data during the execution of its services—for example, when it executes a multicast operator that indicates the computing node needs to multicast data—the multicast source will generate control information and send it to the first switching node. The control information sent by the multicast source includes an indication field carrying a second identifier and an address field carrying the address information of the data to be multicast. The second identifier indicates that the computing node sending the control information is a multicast source; the address information indicates the storage address of the data to be multicast within the multicast source, such as the starting address of the data. In this embodiment, for ease of description, the control information carrying the second identifier is referred to as the second control information.

[0089] In one possible implementation, the second control information may also include other information. Table 2 below shows the fields included in the second control information and the meanings of the corresponding fields. In addition to the second identifier carried in the indication field and the address information in the address field, the second control information may also include any one or more of the other fields shown in Table 2. The specific meanings of some fields in Table 2 can be found in the description of the meanings of the fields in Table 1 above. It should be understood that the fields listed in Table 2 are merely examples, and the second control information may include more or fewer fields; this application embodiment does not impose specific limitations.

[0090] Table 2

[0091] Fields meaning Task fields Used to indicate a task Operator field Task type used to instruct the first switching node to perform the task. Data volume field The amount of data used to indicate the data to be multicast. Indicator Field Used to indicate whether the control information is being sent from a multicast source or a multicast destination. Address field Used to indicate the storage address of the data to be multicast in the multicast source.

[0092] S402. The first switching node establishes a multicast task based on the received control information.

[0093] After receiving control information from a computing node, the first switching node establishes a multicast task based on the received control information. This multicast task includes at least multicast destination information, which indicates the purpose of the multicast data sent by the multicast task, or indicates the port on which the first switching node sends the multicast data.

[0094] After receiving control information, the first switching node establishes different multicast tasks based on the task identifier in the control information, and writes the information in the control information into the multicast task corresponding to the task identifier. The method for the first switching node to establish different multicast tasks is the same; therefore, this embodiment uses the establishment of one multicast task as an example for description.

[0095] The aforementioned multicast destination information includes port information, which indicates the port through which control information was received. Port information also indicates the port through which the first switching node sends multicast data; that is, the first switching node needs to send the acquired multicast data through the ports through which it received the control information from the multicast destination. For example, the first switching node has a bitmap corresponding to each port, with each port corresponding to a bit in the bitmap. After a port of the first switching node receives a first control message, it sets the corresponding bit in the bitmap. For instance, if the first switching node has 5 ports, and the bitmap is "00000", it means the first switching node did not receive any first control information. If the bitmap is "00110", since the 2nd and 3rd bits are set to 1, it means the first switching node received the first control information through the second and third ports respectively, or it means the first switching node received the first control information through ports number 2 and 3 respectively. Furthermore, after receiving a first control message, the first switching node establishes a port information table to record the port IDs of the ports that received the first control information.

[0096] It should be understood that a single multicast session includes multiple multicast destinations. Therefore, if a first switching node is connected to multiple compute nodes, and these compute nodes are all multicast destinations, the first switching node will receive first control information sent by the multiple multicast destinations. After receiving a first control message through a port, the first switching node will set the corresponding bit position in the bitmap corresponding to that port. In some possible implementations, the first switching node can connect to a compute node through multiple ports. Therefore, in the bitmap corresponding to the ports, one logical port can correspond to one bit, and one logical port can include one or more physical ports, with the physical ports included in a logical port connected to the same compute node.

[0097] In one possible implementation, the multicast task may also include other information. Table 3 below shows the fields included in the multicast task and their meanings. In addition to the port information recorded in the port field, the multicast task may include any one or more of the other fields shown in Table 3. The specific meaning of each field in Table 3 can be found in the explanation of the meanings of the fields in Table 1 above. It should be understood that the fields listed in Table 3 are only examples, and the first control information may include more or fewer fields. For example, such as... Figure 2 The distributed computing system shown has only one layer of switching nodes, and multicast tasks may not include the switching node field; this application embodiment does not impose specific limitations.

[0098] Table 3

[0099] Fields meaning Task fields Used to indicate a task Data volume field The amount of data used to indicate the data to be multicast. port field Port used to indicate the receipt of control information Destination address field Used to indicate the storage address after multicast destination receives multicast data. Source address field Used to indicate the storage address of the data to be multicast in the multicast source. Source tag field Used to indicate whether the first switching node is connected to the multicast source. Root tag field Used to indicate whether the first exchange node is the root node. Exchange node fields Used to indicate the upper-layer switching node to which the first switching node connects.

[0100] The aforementioned destination address field is used to record the port ID of the port receiving the first control information and the address information of the multicast destination carried in the address field of the first control information. After the first switching node receives a first control information through a port, it writes the port ID of that port and the address information of the multicast destination carried in the address field of the first control information into the destination address field of the multicast task. That is, the destination address field records the correspondence between the port ID and the address information of the multicast destination.

[0101] The source address field mentioned above is used to record the address information of the data to be multicast from the multicast source. It is used to indicate the storage address of the data to be multicast in the multicast source. For example, the address information can be the starting address of the data to be multicast.

[0102] The aforementioned source tag field is used to indicate whether the first switching node establishing the multicast task is connected to the multicast source. If the source tag field is a third identifier, it indicates that the first switching node is connected to the multicast source. After receiving the control information, the first switching node determines whether the computing node sending the control information is a multicast source based on the indicator field in the control information. If it is a multicast source, the source tag field is set to an identifier indicating that it is connected to the multicast source. For example, the source tag field includes one bit. When this bit is set to 1, it indicates that the first switching node establishing the multicast task is connected to the multicast source; when this bit is set to 0, it indicates that the first switching node establishing the multicast task is not connected to the multicast source.

[0103] The root label above indicates whether the exchange node that created the multicast task is the root node of the multicast task. A root node is an exchange node that, after receiving multicast data, does not need to send the multicast data to higher-level exchange nodes when executing a multicast task. For example... Figure 2 In the distributed computing system shown, if the switching node S0 receives control information, since S0 is connected to each computing node in the distributed computing system, after obtaining multicast data from the multicast source, the switching node S0 can send the multicast data to each multicast destination. Therefore, the switching node S0 is the root node. Figure 3 In the distributed computing system shown, if the computing nodes participating in multicast include 6 nodes from C0 to C5, with C0 being the multicast source and the remaining computing nodes being the multicast destinations, then after S0 obtains the multicast data from C0, it needs to send the data to the switching node S6 or S7. S6 or S7 then sends the multicast data to S3, and S3 then sends it to C4 and C5. Therefore, the root node is either S6 or S7.

[0104] The aforementioned switching node field is used to record the identifier of the upper-layer switching node that establishes the connection between the first switching node and the multicast task, indicating the upper-layer switching node that established the connection between the first switching node and the multicast task. For example, the above... Figure 3 The distributed computing system shown includes two layers of switching nodes. Each first switching node in the first layer is connected to two second switching nodes in the second layer. When establishing a multicast task, each first switching node records the identifiers of the two second switching nodes it is connected to in its switching node field. For example, if the first switching node S0 receives control information and establishes a multicast task, the first switching node will record the IDs of the second switching nodes S6 and S7.

[0105] In one possible implementation, the multicast task described above also includes a source identifier field, which is used to record the ID of the multicast source.

[0106] In one possible implementation, the multicast task further includes a destination identifier field, which records the ID of the computing node sending the first control information. If the multicast task includes a target identifier field, the multicast destination information also includes the ID of the computing node recorded in the destination identifier field.

[0107] After receiving a control message, the first switching node determines whether the computing node sending the control message is a multicast source or a multicast destination based on the indication field. If it is a multicast source, the node's ID is recorded in the source identifier field; if it is a multicast destination, the node's ID is recorded in the destination identifier field. The control message sent by the computing node may carry its corresponding ID, which the first switching node retrieves from the control message. The first switching node may also maintain a mapping relationship between port IDs and computing node IDs, including multiple sets of port identifiers and computing node IDs. Each set of port identifiers and computing node IDs indicates that the port corresponding to the port identifier is connected to the computing node represented by the computing node ID. The first switching node can determine the identifier of the computing node sending the control message based on the port of the received control message and this mapping relationship.

[0108] It should be noted that after the first switching node receives control information from any computing node (which can be a multicast source or a multicast destination), it can start creating a multicast task. After receiving control information from other computing nodes, the first switching node updates the multicast task based on the received control information.

[0109] For example, if a first switching node receives control information from a computing node, the first switching node creates a multicast task and obtains the specific contents of the task field and data volume field in the multicast task shown in Table 3 above, based on the control information. If the indication field in the control information records a first identifier, it indicates that the computing node sending the control information is the multicast destination. The first switching node writes the address recorded in the address field of the control information into the destination address field of the multicast task, and sets the corresponding bit in the bitmap to 1 according to the port that received the control information. The first switching node can also obtain the ID of the upper-layer switching node it is connected to and write it into the switching node field in the multicast task.

[0110] If the first switching node receives the second control information, and the indication field in the control information still records the first identifier, then the address recorded in the address field of the control information is written into the destination address field of the multicast task, and the corresponding bit in the bitmap is set to 1 according to the port that received the control information.

[0111] If the first switching node receives a control message and the indicator field in the control message records the second identifier, it indicates that the computing node that sent the control message is a multicast source. The first switching node writes the address recorded in the address field of the control message into the source address field of the multicast task, sets the corresponding bit in the bitmap to 1 according to the port that received the control message, and sets the source tag field to 1.

[0112] In one possible implementation, if the first control information sent by the multicast destination includes a quantity field, for a multicast task, the first switching node determines that the multicast task has been created after receiving a first quantity of control information carrying the first identifier. If the first switching node is connected to a multicast source, it determines that the multicast task has been created after receiving control information sent by the multicast source and a first quantity of control information carrying the first identifier. It should be understood that receiving a first quantity of control information carrying the first identifier in the embodiments of this application actually refers to receiving a first quantity of control information with the same task identifier and carrying the first identifier, where the first quantity is the number of multicast destinations connected to the first switching node as indicated by the quantity field.

[0113] S403. The first switching node obtains multicast data according to the multicast task.

[0114] If the first switching node is connected to the multicast source, after the first switching node establishes the multicast task, it obtains the multicast data from the multicast source according to the address information of the data to be multicast in the source address field of the multicast task, and sends the obtained multicast data to at least one of the above computing nodes.

[0115] In one possible implementation, the first switching node sends a data read request to the multicast source to read the data to be multicast. This data read request includes the starting address and length of the data to be read. Upon receiving a data read request, the multicast source retrieves the corresponding multicast data based on the starting address and data length in the data read request, and then returns a read response to the first switching node. This read response includes the multicast data retrieved according to the data read request. After receiving the returned read response, the first switching node retrieves the multicast data from the read response and sends the multicast data to each multicast destination.

[0116] Specifically, the multicast data read in this data read request is part or all of the data to be multicast, that is, part or all of the data indicated by the address field and data volume field in the control information sent by the multicast source. If a data read request can only read a part of the data to be multicast, the first switching node sends multiple data read requests to the multicast source to read all the data to be multicast.

[0117] For example, the first switching node generates multiple data read requests based on the starting address, data volume, and maximum payload size (MPS) of the data to be multicast. Each data read request includes a starting address and a read length, used to read a segment of data starting from the starting address with a length equal to the read length. It should be noted that the first switching node may also generate one or more data read requests based on the starting address, data length, and maximum read request size (MRRS), but this embodiment does not impose specific limitations.

[0118] Optionally, if the sum of the total amount of uncompleted multicast data and the total amount of data to be received by the first switching node is greater than or equal to the buffer capacity, the first switching node can suspend sending data read requests to the multicast source. Here, the total amount of uncompleted multicast data refers to the total amount of data that has not yet been sent to the multicast destination, and the total amount of data to be received refers to the total amount of data that could be read from data read requests that have been sent but have not yet received a read response. This is to avoid congestion between the first switching node and the multicast source.

[0119] In another possible implementation, after establishing the multicast task, the first switching node sends a notification message to the multicast source. This notification message includes the starting address and the amount of data to be multicast. Upon receiving this notification message, the multicast source sends the data to be multicast to the first switching node.

[0120] S404. The first switching node sends multicast data to at least one of the aforementioned computing nodes according to the multicast task.

[0121] In this embodiment, after obtaining multicast data, the first switching node needs to send the multicast data to the multicast destinations connected to each port through multiple ports. The process of the first switching node performing multicast is described below.

[0122] After receiving a read response, the first switching node parses the multicast data from the response and transmits the multicast data to the first port P1, where P1 is one of multiple ports included in the first switching node. The first switching node then determines whether P1 is the target port. If P1 is the target port, it copies the multicast data to the buffer corresponding to the first port and then sends the multicast data to the compute nodes connected to the first port. The target port is the port indicated by the multicast destination information as the port from which the multicast data needs to be sent.

[0123] After determining whether P1 belongs to the target port, the first switching node sends the multicast data to the second port P2, regardless of whether P1 belongs to the target port. Then the first switching node determines whether P2 belongs to the target port. If it determines that P2 does not belong to the target port, it does not replicate the multicast data and sends the multicast data to the third port P3.

[0124] The first switching node generates multiple message headers based on the multicast task. Each target port corresponds to one message header, and the destination address in each message header is different. The destination address in each message header is the address information of a multicast destination, that is, the storage address of the multicast destination after receiving the multicast data. After obtaining the multicast data, the first switching node determines the target port to send the multicast data based on the multicast destination information, and then determines the destination address corresponding to the target port based on the target port and the destination address field in the multicast task. Specifically, the first switching node can determine the target port based on the port information recorded in the port field of the multicast task, and then determine the multicast destination address information in the control information received by the port based on the port ID and destination address field of a target port, which serves as the destination address corresponding to the port, and thus generate the corresponding message header. If the multicast task includes a destination identifier field, the first switching node can also determine the target port based on the compute node ID recorded in the destination identifier field and the mapping relationship between the port ID and the compute node ID. Then, based on the port ID and destination address field of a target port, it determines the address information of the multicast destination in the control information received by that port as the destination address corresponding to that port, and then generates the corresponding message header.

[0125] For example, the first switching node determines, based on the multicast destination information, that multicast data needs to be sent to the computing node connected to P1 via P1, i.e., P1 belongs to the target port. The first switching node then determines the multicast destination address information corresponding to P1 based on P1's port ID and the destination address field in the multicast task, generates a message header based on this address information, and sends it to P1. If P3 also belongs to the target port, the first switching node determines the multicast destination address information corresponding to P3 based on P3's port ID and the destination address field in the multicast task, generates a message header based on this address information, and sends it to P3. For other ports determined to be target ports, the corresponding message headers are generated using the same method and sent to the corresponding ports.

[0126] After obtaining the multicast data and the corresponding message header, each target port obtains the target message based on the obtained message header and multicast data, and then sends the target message to the computing node it is connected to.

[0127] The aforementioned first switching node includes a processing unit and multiple ports. After acquiring multicast data, the processing unit sends the multicast data to the ports. The processing unit is also used to generate the aforementioned multiple message headers and send them to the target ports. The following section combines... Figure 5 This section describes how multicast data is sent from the processing unit to the port in the first switching node, how multicast data is sent from one port to another, and how the message header is sent from the processing unit to each target port.

[0128] This application also provides a switching node. For example... Figure 5 As shown, Figure 5 This is a schematic diagram of a switching node provided in an embodiment of this application. The switching node includes a processing unit and multiple ports. Figure 5 Taking a system with 16 ports (P1 to P16) as an example, the processing unit and multiple ports can communicate through different paths, including the xbar shown in the figure and the chain paths formed by the various ports. A switching node can include one or more chain paths. If a switching node includes one chain path, this chain path connects all ports of the switching node, and multicast data can reach all ports from the processing unit through this chain path. If a switching node includes multiple chain paths, each of these chain paths can connect some or all of the ports of the switching node, but the ports included in the multiple chain paths should cover all ports of the switching node. Figure 5 Taking the Sino-Israeli chain link as an example, there are two chain paths: one link connecting the processing unit and ports P1 to P8, and another link connecting the processing unit and ports P9 to P16.

[0129] After a switching node receives a read response through a port, it transmits the read response to the processing unit via xbar. The processing unit parses the multicast data from the read response. The processing unit sends the multicast data through a chained path. The port receiving the multicast data determines whether it is the target port. For example, if the first port P1 receives the multicast data and determines that it is the target port, then P1 copies the multicast data to its corresponding buffer, and then sends one copy of the multicast data to the compute node it is connected to, and sends another copy of the multicast data to the next port P2 in the chained path. If P1 determines that it is not the target port, then P1 does not copy the multicast data, but sends the multicast data to the next port P2 in the chained path. Figure 5 If P2 is not the target port, then P2 does not replicate multicast data, nor does it obtain the target packet based on the packet header and multicast data.

[0130] After receiving multicast data, if P2 determines that it belongs to the target port, P2 copies the multicast data to its corresponding buffer, then sends a copy of the multicast data to the compute node it is connected to, and also sends the multicast data to the next port P3 in the chain. If P2 determines that it does not belong to the target port, P2 does not copy the multicast data, but sends the multicast data to the next port P3 in the chain. Other ports that receive multicast data perform the same operations as P1 and P2 described above, which will not be repeated here.

[0131] The above Figure 5 The shown switching node includes two links. After acquiring the multicast data, the processing unit copies the multicast data to obtain two copies, and then sends one copy of the multicast data to each link. For example, the processing unit sends one copy of the multicast data to P1 and P16 respectively, and then the multicast data in each link is transmitted to other connected ports through a chain path.

[0132] In this embodiment, the processing unit further generates multiple message headers based on the multicast task and sends the corresponding message headers to each port via xbar. The destination address in each message header is the address information of a multicast destination, i.e., the storage address of the multicast destination after receiving the multicast data. After obtaining the multicast data, the processing unit determines the target port from which the multicast data needs to be sent based on the multicast destination information, and then determines the destination address corresponding to the target port based on the target port and the destination address field in the multicast task. Specifically, the processing unit can determine the target port based on the port information recorded in the port field of the multicast task, and then determine the address information of the multicast destination in the control information received by the target port based on the port ID and destination address field of the target port, using this as the destination address corresponding to the target port, and thus generate the corresponding message header. If the multicast task includes a destination identifier field, the processing unit can also determine the target port based on the compute node ID recorded in the destination identifier field and the mapping relationship between the port ID and the compute node ID, and then determine the address information of the multicast destination in the control information received by the port based on the port ID and destination address field of the target port, using this as the destination address corresponding to the port, and thus generate the corresponding message header.

[0133] For example, the processing unit determines, based on the multicast destination information, that multicast data needs to be sent from P1 to the computing node connected to P1, i.e., P1 is a target port. The processing unit then determines the address information of the multicast destination corresponding to P1 based on P1's port ID and the destination address field in the multicast task, and generates a message header based on this address information, sending it to P1 via xbar. If P3 is also a target port, the processing unit determines the address information of the multicast destination corresponding to P3 based on P3's port ID and the destination address field in the multicast task, and generates a message header based on this address information, sending it to P3 via xbar. For other ports determined to be target ports, the corresponding message headers are generated using the same method and sent to the corresponding ports.

[0134] After each target port determines itself as the target port, it combines the multicast data and the received message header into a target message, and then sends the target message carrying the multicast data to the connected computing node, thereby realizing multicast.

[0135] In this embodiment, the processing unit carries a first tag when sending the packet header to each target port, and carries a second tag in the multicast data sent to each port. The first and second tags can be task identifiers corresponding to the multicast tasks. After receiving multicast data, a port compares the second tag with the first tag. If the second tag is the same as the first tag, the port determines that it belongs to a target port.

[0136] The data processing method provided by this application is illustrated above with reference to the accompanying drawings when the distributed computing system includes only one layer of switching nodes. The data processing method provided by this application is described below when the distributed computing system includes two layers of switching nodes. Figure 3 The distributed computing system shown is an example. Figure 6 As shown, Figure 6 This is a schematic diagram of another data processing method provided in the embodiments of this application.

[0137] S601. The computing node sends control information to the first switching node.

[0138] The computing node includes a multicast source and a multicast destination. In this embodiment, the control information sent by the multicast source and the multicast destination to the first switching node includes the content described in the relevant section S401 above, and will not be repeated here.

[0139] It should be noted that if the distributed computing system includes multiple layers of switching nodes, a single multicast may require multiple first-level switching nodes to establish a multicast task. For example, in... Figure 3In the distributed computing system shown, eight computing nodes (C0 to C7) participate in a multicast, with C0 being the multicast source and the other nodes being the multicast destination. If four computing nodes (C0 to C3) send control information to S0, and four computing nodes (C4 to C7) send control information to S3, then both S0 and S3 will establish a multicast task.

[0140] S602. The first switching node establishes a multicast task based on the received control information.

[0141] The process by which the first switching node establishes a multicast task based on the received control information can be referred to the description in S402 above, and will not be repeated here.

[0142] S603. The first switching node sends control information to the second switching node.

[0143] After establishing a multicast task, the first switching node sends control information to the second switching node it is connected to. This control information includes a source indication field and a destination indication field. The source indication field indicates whether the first switching node is connected to a multicast source, and the destination indication field indicates whether the first switching node is connected to a multicast destination. For example, each field includes one bit: a value of 1 indicates that the first switching node is connected to a multicast source, and a value of 0 indicates that the first switching node is not connected to a multicast source; a value of 1 indicates that the first switching node is connected to a multicast destination, and a value of 0 indicates that the first switching node is not connected to a multicast destination. In this embodiment, for ease of description, the control information sent by the first switching node is referred to as third control information.

[0144] After establishing a multicast task, the first switching node determines whether a multicast source and destination are connected based on the multicast task, and sets the source indicator field and destination indicator field in the third control information to the corresponding values. For example, if the first switching node is connected to both a multicast source and a multicast destination, then both the source indicator field and the destination indicator field are set to 1.

[0145] Optionally, the third control information can also use only one field to indicate whether the first switching node is connected to the multicast source and multicast destination. For example, this field includes two bits: when the value of the first bit is 1, it indicates that the first switching node is connected to the multicast source; when the value of the first bit is 0, it indicates that the first switching node is not connected to the multicast source. Similarly, when the value of the first bit is 1, it indicates that the first switching node is connected to the multicast destination; when the value of the first bit is 0, it indicates that the first switching node is not connected to the multicast destination. This application does not impose specific limitations on the embodiments.

[0146] In one possible implementation, the third control information may also include other information. Table 4 below shows the fields included in the third control information and the meanings of the corresponding fields. In addition to the fields indicating whether the first switching node is connected to the multicast source and multicast destination, the third control information may also include any one or more of the other fields shown in Table 4. It should be understood that the fields listed in Table 1 are merely examples, and the third control information may include more or fewer fields; this application embodiment does not impose specific limitations.

[0147] Table 4

[0148] Fields meaning Task fields Used to indicate a task Operator field Task type used to instruct the first switching node to perform the task. Data volume field The amount of data used to indicate the data to be multicast. Source Indicator Field Used to indicate whether the first switching node is connected to the multicast source. Source address field Used to indicate the storage address of the data to be multicast in the first switching node. Purpose Indication Field Used to indicate whether the first switching node is connected to the multicast destination. Destination address field This is used to indicate the storage address after the first switching node receives multicast data sent by the second switching node. Quantity field Used to indicate the number of first switching nodes connected to the second switching node.

[0149] The source address field in the aforementioned third control information is the storage address after the first switching node obtains the data to be multicast when the first switching node is connected to a multicast source. If the second switching node reads the data to be multicast from the first switching node, this storage address is carried in the data read request sent by the second switching node to the first switching node.

[0150] The destination address field in the aforementioned third control information is the storage address after the first switching node receives multicast data sent by the second switching node, when the first switching node is connected to a multicast destination. It is used by the second switching node to write multicast data to the first switching node.

[0151] The quantity field in the aforementioned third control information is used to carry a second quantity, which indicates the number of multicast destinations connected to the first switching node that received the first control information. For example, in the above... Figure 3 In the distributed computing system shown, eight computing nodes (C0 to C7) participate in a multicast, with C0 acting as the multicast source and the other nodes as multicast destinations. If four computing nodes (C0 to C3) send control information to S0, and four computing nodes (C4 to C7) send control information to S3, then both S0 and S3 will establish a multicast task. After establishing the multicast task, if S0 and S3 choose to send the third control information to the second switching node S6, then the value of the quantity field in the third control information will be 2.

[0152] In one possible implementation, the aforementioned third control information also includes an exchange node identifier field, which carries the ID of the first exchange node that sent the third control information.

[0153] In this embodiment, since the first exchange node is also connected to one or more second exchange nodes, each first exchange node needs to select a target second exchange node to participate in the multicast task after establishing the multicast task. As mentioned above, after S0 and S3 establish the multicast task, since both S0 and S3 are connected to S6 and S7, S0 and S3 need to select the same second exchange node to complete the multicast. In this embodiment, the first exchange node can select the target second exchange node by using a hash modulo operation. For example, the first exchange node performs a hash operation using the task identifier as a hash factor, takes the remainder of the hash operation result modulo n, and selects the target second exchange node based on the remainder, where n is the number of second exchange nodes connected to the first exchange node. For example, S0 performs a hash operation using the task identifier as a hash factor, takes the remainder of the hash operation result modulo 2, and if the remainder is 0, it selects to send the third control information to S6; if the remainder is 1, it selects to send the third control information to S7.

[0154] Since the task identifiers for the same multicast are the same, the hash operations performed on the task identifiers by different first exchange nodes participating in the same multicast will yield the same results and remainders. Therefore, it can be ensured that different first exchange nodes participating in the same multicast can select the same second exchange node as the target second exchange node. Furthermore, in the case of multiple multicast tasks in a distributed computing system, load balancing can be achieved.

[0155] After determining the target second switching node, the first switching node updates the ID of the switching node recorded in the switching node field of the multicast task, retaining only the ID of the target second switching node.

[0156] S604. The second switching node establishes a multicast task based on the received control information.

[0157] After receiving control information from a first switching node, the second switching node establishes a multicast task based on the received control information. This multicast task includes at least destination switching node information, which indicates the destination of the multicast data sent by the multicast task, or indicates the port on which the second switching node sends the multicast data.

[0158] After receiving the third control information, the second switching node establishes different multicast tasks based on the task identifier in the third control information, and writes the information in the third control information into the multicast task corresponding to the task identifier. The method for the second switching node to establish different multicast tasks is the same; therefore, this embodiment of the application will use the establishment of one multicast task as an example for description.

[0159] The aforementioned purpose of exchanging node information includes port information. Port information indicates the port through which the third control information was received; it also indicates the port through which the second exchange node sends multicast data. That is, the second exchange node needs to send the acquired multicast data through the ports through which it received the third control information from the first exchange node. For example, the second exchange node has a bitmap corresponding to its ports, with each port corresponding to one bit. After a port of the second exchange node receives a third control information, it sets the corresponding bit in the bitmap. For instance, if the second exchange node has four ports, a bitmap of "0000" indicates that the second exchange node did not receive any third control information; a bitmap of "0011" indicates that the second exchange node received the third control information through the first and second ports respectively, or through ports numbered 1 and 2 respectively. Furthermore, after receiving a third control information, the second exchange node establishes a port information table to record the port IDs of the ports that received the third control information.

[0160] In one possible implementation, the multicast task may also include other information. Table 5 below shows the fields included in the multicast task established by the second switching node and their corresponding meanings. In addition to the port information recorded in the port field, the multicast task may include any one or more of the other fields shown in Table 5. The specific meaning of each field in Table 5 can be found in the description of the corresponding fields in Table 4 above, i.e., the fields in Table 4 included in the third control information. The second switching node also records the multicast task when establishing it. It should be understood that the fields listed in Table 5 are only examples, and the third control information may include more or fewer fields.

[0161] Table 5

[0162]

[0163] The destination address field is used to record the port ID of the port receiving the third control information and the storage address carried in the destination address field of the third control information. After the second switching node receives a third control information through a port, it writes the port ID of that port and the storage address in the third control information into the destination address field of the multicast task. That is, the destination address field records the correspondence between multiple sets of port IDs and the address information of the multicast destination.

[0164] In one possible implementation, the multicast task established by the second switching node also includes a source identifier field, which is used to record the ID of the first switching node connected to the multicast source.

[0165] In one possible implementation, the multicast task established by the second switching node also includes a destination identifier field, which records the ID of the first switching node that sent the multicast message without a connected multicast source. If the multicast task includes a destination identifier field, the aforementioned destination switching node information also includes the ID of the first switching node recorded in the destination identifier field.

[0166] It should be noted that after the second switching node receives the third control information sent by any of the first switching nodes, it can start creating a multicast task. After receiving control information sent by other first switching nodes, the second switching node updates the multicast task based on the received third control information.

[0167] In one possible implementation, if the third control information sent by the first switching node includes a quantity field, for a multicast task, the second switching node determines that the multicast task has been created after receiving a second quantity of third control information. Here, the second quantity is the number of first switching nodes connected to the second switching node, as indicated by the quantity field in the third control information.

[0168] S605. The second switching node sends a notification message to the first switching node connected to the multicast source, instructing the first switching node connected to the multicast source to acquire multicast data.

[0169] Upon receiving a third control message, if the source indication field of the third control message indicates that the first exchange node sending the third control message is connected to a multicast source, the second exchange node sends a notification message to the first exchange node; or, after establishing a multicast task, the second exchange node sends a notification message to the first exchange node connected to the multicast source. This notification message instructs the first exchange node connected to the multicast source to retrieve multicast data from the multicast source. For example, if the distributed computing system executes only one multicast task at a time, this notification message could be a response message to the third control message sent by the first exchange node. If the third control message includes a task field, the notification message includes the aforementioned task identifier, instructing the first exchange node to retrieve the multicast data corresponding to that task identifier.

[0170] In one possible implementation, if the third control information includes the source address field in Table 4 above, the notification information may be a data read request carrying the storage address recorded in the source address field of the third control information. Optionally, the notification information may also include a task identifier.

[0171] S606. The first switching node connected to the multicast source receives notification information, obtains multicast data from the multicast source, and sends the multicast data to the second switching node.

[0172] After receiving the notification information, the first switching node connected to the multicast source obtains multicast data from the multicast source. The method by which the first switching node obtains multicast data from the multicast source can be referred to the relevant description in S403 above, and will not be repeated here.

[0173] If the notification information includes a task identifier, the first switching node queries the multicast task based on the task identifier, and then obtains the multicast data according to the multicast task and the method in S403. If the notification information is a data read request, and the data read request does not include a task identifier, the first switching node finds the corresponding multicast task based on the storage address in the data read request, and then obtains the multicast data according to the multicast task and the method in S403.

[0174] S607. The second switching node sends multicast data to the first switching node.

[0175] After acquiring the multicast data, the second switching node sends the multicast data to the first switching node according to the multicast task established by the second switching node, that is, it sends the multicast data to the first switching node that sent the third control information. The method by which the second switching node sends the multicast data to the first switching node can refer to S404 above. Figure 5 The method by which the first switching node sends multicast data to at least one computing node, as described in the relevant description, will not be repeated here. The second switching node, however, has... Figure 5 The same structure as the exchange nodes.

[0176] S608. The first switching node sends multicast data to the computing node.

[0177] Upon receiving multicast data from the second switching node, the first switching node, based on its own established multicast task, sends the received multicast data to the computing node. The method by which the first switching node sends multicast data to the computing node according to the multicast task can be referred to S404 above. Figure 5 The relevant descriptions will not be repeated here.

[0178] It should be understood that the above Figure 2 and Figure 3 The distributed computing system described above is merely an example. Distributed computing systems can also have other architectures, such as including three or more layers of switching nodes. The connection relationships between switching nodes and computing nodes, as well as between switching nodes at different layers, can also be implemented in other ways. Methods for implementing multicast or broadcast in other distributed computing systems can refer to the methods described in the above embodiments, and will not be repeated here.

[0179] For the sake of simplicity, the above method embodiments are described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the present invention. Other reasonable combinations of steps that those skilled in the art can conceive based on the above description also fall within the scope of protection of the present invention.

[0180] This application also provides a data processing system, which includes the above-described... Figure 2 or Figure 3 The distributed computing system shown can be referred to the above. Figure 2 or Figure 3 The corresponding introductions and related explanations will not be repeated here. The operations performed by the computing nodes and switching nodes in this distributed computing system can be referred to the above. Figures 4 to 6 The relevant descriptions in the corresponding embodiments will not be repeated here.

[0181] This application also provides a computing device, such as... Figure 7 As shown, Figure 7 This is a schematic diagram of a computing device provided in an embodiment of this application. The computing device 700 includes a host 710, multiple computing nodes 720, a communication interface 730, and a memory 740. The host 710, multiple computing nodes 720, communication interface 730, and memory 740 are interconnected via a bus 750.

[0182] In this system, the host 710 can be a CPU, and the computing node 720 can be a CPU, GPU, NPU, TPU, or a dedicated AI processing chip. The host 710 is used to acquire topology information of the distributed computing system, which is then used by the computing node 720 to generate control information. For example, the topology information includes the number of computing nodes connected to each first switching node. The operations performed by the computing node 720 can be described as described above. Figures 4-6 The operations performed by the computing nodes in the corresponding embodiments will not be described in detail here.

[0183] The communication interface 730 can be a wired or wireless interface for communicating with other modules or devices. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., while the wireless interface can be a cellular network interface or a wireless LAN interface.

[0184] Memory 740 can be non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Memory 740 can also be volatile memory, which can be random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).

[0185] The memory 740 can also be used to store program instructions and data, so that the host 710 can call the program instructions stored in the memory 740 to execute the operation steps of obtaining topology information. Furthermore, the computing device 700 may include, compared to... Figure 7 The number of components displayed may be more or less, or there may be different component configurations.

[0186] Bus 750 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 750 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0187] The computing device 700 may also include at least one switching chip 760. The operation performed by the switching chip 760 can refer to the operation performed by the first switching node or the second switching node in the above embodiment, and will not be described again here.

[0188] Specifically, the specific implementation of various operations performed by the computing device 700 can be referred to the specific operations performed by the distributed computing system in the above method embodiment, and will not be repeated here.

[0189] This application also provides a computer-readable storage medium storing instructions. When the instructions are executed, they can implement the method steps implemented by the computing node or the switching node in the above method embodiments, which will not be repeated here.

[0190] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0191] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can 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) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0192] The steps in the method of this application embodiment can be adjusted, merged, or deleted in order according to actual needs; the modules in the device of this application embodiment can be divided, merged, or deleted according to actual needs.

[0193] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

[0194] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.

Claims

1. A data processing method, characterized in that, This is applied to a distributed computing system, which includes multiple computing nodes and at least one first switching node, wherein... The first switching node receives control information sent by at least one computing node connected to it, wherein the control information includes an indication field, the indication field being used to indicate that the computing node sending the control information is a multicast source or a multicast destination, and the at least one computing node is some or all of the plurality of computing nodes; The first switching node establishes a multicast task based on the received control information. The multicast task includes multicast destination information, which is used to indicate the purpose of the multicast data sent by the multicast task. The first switching node acquires multicast data and sends the multicast data to the at least one computing node according to the multicast task. The distributed computing system further includes a second switching node, which is connected to the first switching node, and the method further includes: The first switching node sends control information to the second switching node. The control information sent by the first switching node includes a field indicating whether the first switching node is connected to a multicast source and a field indicating whether the first switching node is connected to a multicast destination. When the control information sent by the first switching node indicates that the first switching node is not connected to the multicast source, the first switching node acquires multicast data, including: The first switching node receives the multicast data sent by the second switching node, wherein the multicast data is sent to the second switching node by other first switching nodes connected to a multicast source.

2. The method according to claim 1, characterized in that, The first switching node is connected to a multicast source, and the control information sent by the multicast source also includes the address information of the multicast data; the multicast task established by the first switching node includes the address information of the multicast data; wherein, the multicast source is one of the plurality of computing nodes; The first switching node acquires multicast data, including: The first switching node sends a data read request to the multicast source based on the address information; The first switching node receives a read response returned by the multicast source to obtain the multicast data, wherein the read response includes the multicast data, and the multicast data is part or all of the data to be multicast indicated by the control information sent by the multicast source.

3. The method according to claim 1, characterized in that, When the control information sent by the first switching node indicates that the first switching node is connected to a multicast source, the first switching node acquires multicast data, including: The first switching node receives a notification message sent by the second switching node, the notification message instructing the first switching node to obtain the multicast data from the multicast source; The first switching node sends a data read request to the multicast source based on the address information; The first switching node receives a read response returned by the multicast source to obtain the multicast data, wherein the read response includes the multicast data, and the multicast data is part or all of the data to be multicast indicated by the control information sent by the multicast source.

4. The method according to claim 2, characterized in that, The first switching node includes a processing unit and multiple ports, which form a chain path.

5. The method according to claim 4, characterized in that, Sending the multicast data to the at least one computing node according to the multicast task includes: The processing unit sends the multicast data to the first port of the chain path, where the first port is one of the plurality of ports; The first port belongs to the target port, and the multicast data is copied to the buffer corresponding to the first port; wherein, the target port is the port indicating the multicast destination information for sending the multicast data; The first port sends the multicast data to the computing node connected to the first port.

6. The method according to claim 5, characterized in that, The method further includes: the first port sending the multicast data to the next port of the chained path.

7. The method according to claim 4, characterized in that, Sending the multicast data to the at least one computing node according to the multicast task includes: The processing unit transmits the multicast data to the first port of the chain path, where the first port is one of the plurality of ports; The first port is not a target port, and the first port sends the multicast data to the next port in the chain path; wherein, the target port is the port indicating the multicast destination information for sending the multicast data.

8. The method according to claim 5 or 6, characterized in that, The multicast task also includes address information for each multicast destination; the method further includes: The processing unit generates multiple message headers according to the multicast task, wherein each message header includes the address information of a multicast destination, and the address information of the multicast destination in each message header is different. The processing unit sends the multiple message headers to the target port through the cross unit xbar, wherein one target port corresponds to one message header; The first port sends the multicast data to the computing node connected to the first port, including: The first port obtains the target message based on the message header and multicast data obtained from the first port, and sends the target message to the computing node connected to the first port.

9. The method according to claim 8, characterized in that, The message header includes a first tag, and the multicast data includes a second tag; The processing unit sends the multicast data to the first port of the chain path, and further includes: If the first port is the same as the second label, then the first port is determined to be the target port.

10. The method according to claim 2, characterized in that, The control information sent by the multicast destination also includes first quantity information, which is used to indicate the number of multicast destinations connected to the first switching node. The first switching node sends a data read request to the multicast source based on the address information, including: After receiving the control information indicating the quantity of the first quantity information, the first switching node sends the data read request to the multicast source according to the address information of the multicast data.

11. The method according to claim 3, characterized in that, The control information sent by the multicast destination also includes first quantity information, which is used to indicate the number of multicast destinations connected to the first switching node. The first switching node sends control information to the second switching node, including: After receiving the control information indicating the quantity from the first quantity information, the first exchange node sends control information to the second exchange node.

12. The method according to claim 11, characterized in that, The control information sent by the first switching node also includes second quantity information, which indicates the number of first switching nodes connected to the second switching node; the notification information is sent by the second switching node to the first switching node connected to the multicast source after receiving the control information indicating the number of second quantity information.

13. The method according to claim 1, characterized in that, The multicast destination information includes port information, which indicates the port through which the first switching node receives control information sent by the computing node, and is used to indicate that the first switching node needs to send the multicast data through the port indicated by the port information.

14. The method according to claim 1, characterized in that, The multicast source and multicast destination are central processing units (CPU), image processors (GPU), neural network processors (NPU), tensor processors (TPU), or dedicated artificial intelligence (AI) processing chips, and the switching nodes are switching chips or switching devices with switching functions.

15. A distributed computing system, characterized in that, The data processing system includes multiple computing nodes and at least one first switching node. Each computing node is used to send control information to the first switching node, and each first switching node is used to execute the method as described in any one of claims 1-14.

Citation Information

Patent Citations

  • System and method for supporting efficient virtual output queue (VOQ) resource utilization in a networking device

    CN107005487A

  • Network system, multicast traffic transmission method and device

    CN115426323A