Data processing method, switching node, and related system
By using technologies such as switching nodes and chain paths in distributed computing systems, the problem of low multicast communication efficiency in high-performance computing is solved, efficient multicast data transmission is achieved, and congestion with insufficient cache capacity is avoided. Improve multicast efficiency and reliability.
Patent Information
- Application Number
- PCT/CN2024/101536
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-11
- Filing Date
- 2024-06-26
- Publication Date
- 2025-01-02
AI Technical Summary
In high-performance computing scenarios, multicast communication between multiple nodes is low, and the prior art is difficult to effectively realize the efficient transmission of multicast data, especially when the multicast data volume is large, it is easy to cause insufficient cache capacity and congestion problems of switching nodes. .
By introducing switching nodes in the distributed computing system, using switching nodes to receive control information sent by computing nodes to establish multicast tasks, and control data transmission rate through the read request mechanism to avoid congestion caused by insufficient cache capacity of switching nodes. The path and the crossing unit perform data copying and transmission, reducing the data copying burden of the processing unit and improving multicast efficiency.
It realizes efficient data transmission of multi-cast in high-performance computing scenarios, avoids congestion caused by insufficient buffer capacity of switching nodes, improves multicast efficiency and reliability, and reduces the time and delay of multicast data reaching each port. .
Smart Images

Figure CN2024101536_02012025_PF_FP_ABST
Abstract
Description
A data processing method, switching node and related system
[0001] This application claims priority to the Chinese patent applications filed with the State Intellectual Property Office of China on June 29, 2023, with application number 202310794531.1 and application name “A data multicast method”, and filed with the State Intellectual Property Office of China on October 11, 2023, with application number 202311324100.5 and application name “A data processing method, switching node and related system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data processing method, a switching node, and related systems. Background Art
[0003] As the scale of tasks in High-Performance Computing (HPC) scenarios continues to grow, the proportion of multi-node communication in HPC applications has increased significantly, especially broadcast and multicast. For example, in the High-Performance Linpack (HPL) benchmark, multicast is the primary form of communication, and each multicast involves a massive amount of data. Therefore, implementing multicast between multiple nodes is a pressing technical challenge in HPC tasks.
[0004] Summary of the Invention
[0005] The present 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 the multicast efficiency.
[0006] In a first aspect, the present application provides a data processing method, which is applied to a distributed computing system including multiple computing nodes and at least one first switching node, wherein each first switching node is connected to some or all of the multiple computing nodes. During the execution of a service in 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 that 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, the multicast destination information being used to indicate the destination information of the multicast data to be sent by the multicast task; then, the first switching node obtains the multicast data and sends the multicast data to the computing node according to the multicast task.
[0007] In this distributed computing system, when multiple computing nodes execute services that require multicast, there is no 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 node. The switching node that receives the control information establishes a multicast task based on the control information and then completes the multicast. This can simplify the control plane process required to implement multicast services and improve multicast efficiency.
[0008] 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 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 obtains the multicast data including: the first switching node sends a data read request to the multicast source according to the address information; and obtains the multicast data from a read response returned by the received multicast source; wherein the multicast source is one of the multiple computing nodes; and 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.
[0009] When the amount of data to be multicasted in the multicast source is large, since the cache capacity used to cache multicast data in the switching node is limited, the data to be multicasted is read from the data source by sending a read request to the multicast source by the switching node. The switching node can control the rate of sending data read requests, and thus control the amount of data transmitted between the switching node and the multicast source and the amount of data passing through the port of the switching node, avoiding congestion caused by the switching node's inability to process data in a timely manner when the multicast source actively sends data due to limited cache capacity.
[0010] 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, the control information sent by the first switching node including a field for indicating whether the first switching node is connected to a multicast source and a field for 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 obtaining multicast data includes: the first switching node receiving notification information sent by the second switching node, the notification information instructing the first switching node to obtain multicast data from the multicast source; after receiving the notification information, the first switching node sending a data read request to the multicast source based on the address information; and the first switching node receiving a read response returned by the multicast source to obtain the multicast data, wherein the read response includes the multicast data, which is part or all of the data to be multicast indicated by the control information sent by the multicast source.
[0011] In a distributed computing system comprising multiple layers of switching nodes, where multicasting requires participation from a second switching node in a higher layer than a first switching node, the first switching node that has established a multicast task must also send control information to the second switching node in the higher layer. 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 obtain multicast data from the multicast source and then send it to the second switching node. The second switching node then sends the multicast data to the first switching node participating in the secondary multicast. All participating switching nodes will also send control information to the second switching node.
[0012] 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 obtains the multicast data, including: the first switching node receives the multicast data sent by the second switching node, and the multicast data is sent to the second switching node by another first switching node connected to the multicast source.
[0013] In a possible implementation, the first switching node includes a processing unit and ports, and the multiple ports form a chain path, that is, the multiple ports can exchange data through the chain path.
[0014] 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 the multicast data to a first port of the chain path; if the first port is a target port, the first port, after receiving the multicast data, copies the multicast data to a cache corresponding to the first port; and sending the multicast data to the computing node connected to the first port via the first port; wherein the first port is one of the multiple ports included in the first switching node; and the target port is a port indicated by the multicast destination information as requiring the multicast data to be sent.
[0015] The chain path also includes a path between the processing unit and the first port; the first switching node also includes a crossbar (xbar), through which the processing unit can exchange data with each port. The processing unit can send multicast data to the first port via the chain path between the processing unit and the first port; and can also send multicast data to the first port via the crossbar.
[0016] Each port of the switching node has a cache. After the multicast data is sent to the port, the port copies and caches the multicast data that needs to be sent by the port. This can avoid copying multiple copies of the data in the processing unit before sending them to each target port. It can reduce the occupancy of the main cache area corresponding to the processing unit, reduce the congestion problem caused by the switching node's main cache being full and unable to process the multicast data obtained from the multicast source in time, and improve multicast efficiency.
[0017] In a possible implementation, after copying and buffering the multicast data, the first port sends a copy of the multicast data to the next port in the chain path.
[0018] 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, after receiving the multicast data, the first port does not copy the multicast data, and the first port directly sends the multicast data to the next port of the chain path.
[0019] In one possible implementation, the multicast task also includes address information of each multicast destination; the address information is used to indicate the storage address of the multicast destination after receiving the multicast data. The above method also includes: the processing unit generates multiple message headers based on the multicast task, wherein each message header includes a storage address of a multicast destination, and the address information of the multicast destination in each message header is different; the processing unit sends the above multiple message headers to the target port through the cross unit, wherein one target port corresponds to one message header; the above first port sends multicast data to the computing node connected to the first port, including: the first port obtains a target message based on the message header and multicast data obtained by the first port, and sends the target message to the computing node connected to the first port.
[0020] The switch node can send data to each port through two paths, avoiding all data being sent to the port through one path. This can further reduce the possibility of congestion in the switch node and improve multicast efficiency.
[0021] 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 the chain path; if the first switching node includes multiple chain paths, each of the multiple chain paths can connect some or all of all ports of the switching node.
[0022] If the switching node includes multiple chain paths, the first switching node can copy 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.
[0023] In one possible implementation, the message header includes a first label, and the multicast data includes a second label; the processing unit sends the multicast data to the first port of the chain path, further comprising: when the first label and the second label are the same, the first port determines that the first port is the target port.
[0024] A switching node may need to process multiple different multicast tasks. By carrying labels in the packet header and multicast data, it can avoid combining the packet headers and multicast data of different multicast tasks, resulting in the multicast destination receiving incorrect multicast data.
[0025] In one possible implementation, the control information sent by the multicast destination also includes first quantity information, and the first quantity information is used to indicate the number of multicast destinations connected to the first switching node; the above-mentioned first switching node sends a data read request to the multicast source according to the address information of the multicast data, including: after the first switching node receives the control information indicating the quantity of the first quantity information, the first switching node sends a data read request to the multicast source according to the address information.
[0026] Since the storage resources of the switching node are limited, the first switching node sends a data read request to the computing node only after confirming that it has received control information sent by all the computing nodes to which it is connected. This can avoid obtaining multicast data without determining all multicast destinations, resulting in the multicast data read first needing to be cached for a long time and occupying storage resources.
[0027] In one possible implementation, the control information sent for the multicast destination also includes first quantity information, and the first quantity information 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 of the quantity indicated by the first quantity information, the first switching node sends control information to the second switching node.
[0028] Since the storage resources of the switching node are limited, the first switching node sends control information to the second switching node only after confirming that it has received control information sent by all the computing nodes connected to it. This can avoid the second switching node starting to process the task corresponding to the control information immediately after receiving the control information, thereby avoiding occupying the resources of the second switching node. At the same time, it can also avoid the problem that the second switching node notifies the first switching node to obtain multicast data without confirming all the multicast destinations, resulting in the multicast data read first needing to be cached for a long time and occupying storage resources.
[0029] In one possible implementation, the control information sent by the first switching node also includes second quantity information, and the second quantity information is used to indicate the number of first switching nodes connected to the second switching node; the above-mentioned notification information is sent by the second switching node to the first switching node connected to the multicast source after receiving the control information of the number indicated by the second quantity information.
[0030] Since the storage resources of the switching nodes are limited, the second switching node notifies the first switching node connected to the multicast source to obtain the multicast data only after confirming that it has received all the first switching nodes participating in the multicast. This can avoid the problem that the second switching node obtains the multicast data without confirming all the first switching nodes participating in the multicast, resulting in the multicast data being cached in the second switching node for a long time and occupying storage resources.
[0031] In a possible implementation, the multicast destination information includes port information, which indicates the port through which the first switching node receives the control information sent by the computing node and is used to instruct the first switching node to send multicast data through the port indicated by the port information.
[0032] The first switching node needs to send multicast data through the ports through which it receives the control information. Therefore, by recording the port information, the target port can be quickly determined through the port information.
[0033] In one possible implementation, the multicast source and multicast destination are a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), a tensor processing unit (TPU), or a dedicated artificial intelligence (AI) processing chip, etc.; the switching node can be a switching chip or a switching device with switching function.
[0034] In a second aspect, the present application provides a switching node, which includes a processing unit and multiple ports, and the multiple ports form a chain path, wherein: the processing unit is used to send multicast data to a first port of the chain path, and the first port is one of the above-mentioned multiple ports; the first port is used to copy the multicast data to a cache corresponding to the first port, and send the multicast data to a computing node connected to the first port; wherein the first port belongs to a target port, and the target port includes one or more ports that need to send the multicast data.
[0035] Each port of the switching node has a cache. After the processing unit obtains multicast data and sends the multicast data to the port, the port copies the multicast data and the cache area corresponding to the port caches the multicast data to be sent by the port. This can avoid copying multiple copies of data in the processing unit before sending them to each target port, can reduce the occupancy of the main cache area corresponding to the processing unit, reduce the congestion problem caused by the switching node's main cache being full and unable to process multicast data obtained from the multicast source in time, and improve multicast efficiency.
[0036] The chain path also includes a path between the processing unit and the first port; the first switching node also includes a cross-connect unit, through which the processing unit can exchange data with each port. The processing unit can send multicast data to the first port via the chain path between the processing unit and the first port; and can also send multicast data to the first port via the cross-connect unit.
[0037] In one possible implementation, the first port is further configured to, after replicating and caching the multicast data, send a copy of the multicast data to the next port in the chain path. In another possible implementation, the processing unit further includes a second port, which, if the second port is not a target port, is configured to, after receiving the multicast data, send the multicast data to the port next to the second port in the chain path.
[0038] Each port on a switching node can determine whether received multicast data needs to be sent. If a port determines that the multicast data needs to be sent, it copies the multicast data to its corresponding buffer and sends the multicast data to the next port in the chain via a chain path. The port that receives the multicast data determines whether it is the destination port, which reduces the amount of data processed by the processing unit and improves multicast efficiency.
[0039] In one possible implementation, the multicast task also includes address information for each multicast destination, where the multicast destination includes at least one first computing node. The processing unit is further configured to generate multiple message headers based on the multicast task, wherein each message header includes address information for a multicast destination, and the address information for the multicast destinations in each message header is different. The processing unit is further configured to send the multiple message headers to the target port via the cross-connect unit, wherein each target port corresponds to one message header. The first port is specifically configured to obtain a target message based on the message header and multicast data obtained by the first port, and to send the target message to the computing node connected to the first port. The switching node can send data to each port via two paths, preventing all data from being sent to the port via a single path. This can further reduce the possibility of congestion within the switching node and improve multicast efficiency.
[0040] 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 the chain path; if the first switching node includes multiple chain paths, each of the multiple chain paths can connect some or all of all ports of the switching node.
[0041] If the switching node includes multiple chain paths, the first switching node can copy 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.
[0042] In one possible implementation, the message header includes a first label, and the multicast data includes a second label; the first port is further used to compare the first label in the message header with the second label in the multicast data, and determine that the first port is the target port when the first label and the second label are the same.
[0043] A switching node may need to process multiple different multicast tasks. By carrying labels in the packet header and multicast data, it can avoid combining the packet headers and multicast data of different multicast tasks, resulting in the multicast destination receiving incorrect multicast data.
[0044] In one possible implementation, the switching node is a switching chip or a switching device with switching functionality, and the switching node includes a transport layer. Because the switching node includes a transport layer, the message header is sent via a protocol stack in the processing unit, ensuring data reliability and improving multicast reliability.
[0045] In a third aspect, the present application provides a data processing system, which includes multiple computing nodes and at least one first switching node, each of the at least one first switching node is connected to some or all of the multiple computing nodes above, wherein each computing node is used to execute the operations implemented by the computing node in the above-mentioned first aspect or any possible implementation of the first aspect; each first switching node is used to execute the method described in the above-mentioned first aspect or any possible implementation of the first aspect.
[0046] In a fourth aspect, the present application provides a computer-readable storage medium storing instructions, which, when executed on a computing device, enables the computing device to perform the operations implemented by the computing node in the first aspect or any possible implementation of the first aspect.
[0047] In a fifth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a switching node, the computing device executes the operations implemented by the first switching node in the first aspect or any possible implementation of the first aspect, or executes the operations described in the second aspect or any possible implementation of the second aspect.
[0048] In a sixth aspect, the present application provides a computer program product, which, when running on a computing device, enables the computing device to perform the operations implemented by the computing node in the first aspect or any possible implementation of the first aspect.
[0049] In a seventh aspect, the present application provides a computer program product, which, when running on a device, enables the computing device to perform the operations implemented by the first switching node in the first aspect or any possible implementation of the first aspect, or to perform the operations described in the second aspect or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0051] FIG1 is a schematic diagram of a computing device cluster provided in an embodiment of the present application;
[0052] FIG2 is a schematic diagram of a distributed computing system provided in an embodiment of the present application;
[0053] FIG3 is a schematic diagram of another distributed computing system provided in an embodiment of the present application;
[0054] FIG4 is a flow chart of a data processing method provided in an embodiment of the present application;
[0055] FIG5 is a schematic diagram of the structure of a switching node provided in an embodiment of the present application;
[0056] FIG6 is a schematic diagram of another data processing method provided in an embodiment of the present application;
[0057] FIG7 is a schematic diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] The embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application.
[0059] With the development of HPC and artificial intelligence (AI) technologies, the computing scale of applications is increasing. Distributed computing has emerged to address large-scale data computing challenges. Distributed computing processes data through multiple computing nodes, and then completes the computation through data exchange between these nodes. As a result, the proportion of communication between multiple computing nodes in applications has increased significantly. For example, in the HPL and HPL-AI benchmarks, collective communications such as broadcast and multicast are primarily multicast. Each multicast carries a very large amount of data, so implementing multicast between multiple computing nodes is a technical challenge that needs to be addressed.
[0060] The present 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, and each first switching node is connected to at least one computing node among the above-mentioned multiple computing nodes. In the distributed computing system, if multiple computing nodes need to perform multicasting during the calculation process, the multiple computing nodes participating in the calculation send control information to the connected switching node to enable the switching node to establish a multicast task. Among them, 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 above-mentioned multicast task includes port information, and the port information indicates that the switching node needs to send data to the multicast destination through the port indicated by the port information. After obtaining the data, the switching node sends the data to the multicast destination according to the above-mentioned multicast task.
[0061] The distributed computing system provided by the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0062] The present application provides a computing device cluster, as shown in FIG1 , which is a schematic diagram of a computing device cluster provided in an embodiment of the present 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 via a network. The network can be a carrier network or a network consisting of optical cables and data transmission equipment, and the present application does not impose specific limitations thereon.
[0063] The above-mentioned computing device cluster can constitute a distributed computing system, and each computing device in the cluster can also independently serve as a distributed computing system. As shown in Figure 2, Figure 2 is a schematic diagram of a distributed computing system provided in an embodiment of the present application. The distributed computing system includes a plurality of computing nodes and at least one first switching node (switch). Each of the at least one first switching node is connected to at least one computing node among the plurality of computing nodes. As shown in Figure 2, Figure 2 takes a distributed computing system including 4 computing nodes (C0~C3) and 3 first switching nodes (S0~S2) as an example, and the 4 computing nodes and the 3 first switching nodes are connected in a fully connected manner.
[0064] As shown in Figure 3, Figure 3 is a schematic diagram of another distributed computing system provided by an embodiment of the present application. The distributed computing system includes multiple computing nodes, at least one first switching node, and at least one second switching node. Each first switching node in the at least one first switching node is connected to at least one computing node in the multiple computing nodes; each second switching node in the at least one second switching node is connected to some of the first switching nodes in the at least one first switching node. As shown in Figure 3, Figure 3 takes the example of the distributed computing system including 8 computing nodes (C0~C7), 6 first switching nodes (S0~S5) and 6 second switching nodes (S6~S11). The connection relationship between the multiple computing nodes and the at least one first switching node and the at least one first switching node and the at least one second switching node is shown in Figure 3.
[0065] In an embodiment of the present 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.
[0066] It should be understood that the aforementioned Figures 2 and 3 illustrate the logical connection relationship between computing nodes and switching nodes. The aforementioned multiple computing nodes may be computing nodes located on the same physical device, or computing nodes located on different physical devices. When multiple computing nodes are located on multiple different physical devices, these multiple physical devices may be physical devices located on the same cabinet. For example, computing nodes C0 to C3 shown in Figure 3 are located on the same server, and computing nodes C4 to C7 are located on another server. These two servers are located in the same cabinet and are connected via a switching node within the cabinet. When the aforementioned multiple computing nodes are computing nodes located on the same physical device, the aforementioned switching node may be a switching chip within the physical device, or a switching device different from the physical device, and the switching node may have a transport layer.
[0067] It should be understood that the above description in conjunction with FIG. 2 and FIG. 3 is merely an example of the topology of the distributed computing system provided by the present application and should not be construed as a specific limitation. The distributed computing system may also have other topologies. For example, the distributed computing system may include more or fewer computing nodes or switching nodes, or may include more layers of switching nodes. The connection relationship between the computing nodes and the switching nodes, as well as the connection relationship between at least one first switching node and at least one second switching node, is merely an example and should not be construed as a specific limitation. Other connection relationships between computing nodes and switching nodes may also be used, and are not specifically limited in the embodiments of the present application.
[0068] The data processing method provided in the embodiments of the present application is introduced below using the systems shown in Figures 2 and 3 respectively.
[0069] As shown in FIG4 , FIG4 is a flow chart of a data processing method provided in an embodiment of the present application, and the method includes the following S401 to S404 .
[0070] S401. A first switching node receives control information sent by at least one computing node.
[0071] In an embodiment of the present application, a computing node includes a multicast source and a multicast destination. A multicast source refers to a computing node that needs to multicast data while executing a service, and a multicast destination refers to a computing node that needs to obtain data multicasted by the multicast source while executing a service. The data multicasted by the multicast source is sent to the multicast destination via a first switching node. For a first switching node, at least one computing node connected to the first switching node may include only a multicast source, a multicast source and one or more multicast destinations, or one or more multicast destinations.
[0072] When a multicast source needs to send data to other computing nodes during the execution of its services, it will send control information to the first connected switching node so that the first switching node can establish a multicast task based on the control information. When a multicast destination needs to obtain data from a multicast source during the execution of its services, it will send control information to the first connected switching node so that the first switching node can establish a multicast task based on the control information. After the first switching node obtains the data, it sends the data to the multicast destination according to the multicast task. The control information sent by the multicast source and the control information sent by the multicast destination both include an indication field, which is used to indicate whether the computing node sending the control information is the multicast source or the multicast destination. For example, if the value of the indication field is 1, it indicates that the computing node sending the control information is the multicast source; if the value of the indication field is 0, it indicates that the computing node sending the control information is the multicast destination.
[0073] The following describes the control information sent by the multicast destination and the control information sent by the multicast source.
[0074] If a computing node is a multicast destination and needs to obtain data from a multicast source while executing its services, for example, by executing an operator that instructs the multicast source to obtain data, the multicast destination generates control information and sends it to the first switching node. The indication field in the control information sent by the multicast destination carries a first identifier, indicating that the computing node sending the control information is a multicast destination. In the embodiments of the present application, for ease of description, the control information carrying the first identifier is referred to as first control information.
[0075] In one possible implementation, the first control information may further include other information. As shown in Table 1 below, Table 1 shows the fields included in the first control information and the meanings represented by the corresponding fields. In addition to the first identifier carried in the indication 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 only examples, and the first control information may include more or fewer fields, and the embodiments of the present application do not impose specific limitations.
[0076] Table 1
[0077] The above-mentioned indication field is used to indicate whether the control information is sent by a multicast source. If the indication field in the control information carries the first identifier, it indicates that the control information is sent by a multicast destination, that is, the control information is the above-mentioned first control information; if the indication field in the control information carries the second identifier, it indicates that the control information is sent by a multicast source. For example, if the indication 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, the computing node sets the value of the indication field in the control information to 0, obtains the first control information, and then sends it to the first connected switching node; if a computing node is a multicast source, when sending control information, the computing node sets the value of the indication field in the control information to 1, and then sends it to the first connected switching node.
[0078] The task field is used to carry a task identifier (job identity, jobID), which is used to indicate a task, and each task corresponds to a unique task identifier. The first switching node may include multiple different tasks to be executed, and different task identifiers are used to indicate different tasks. For example, each computing node runs multiple processes, and processes with the same process identifier in different computing nodes need to be multicast multiple times. In this case, different task numbers can be assigned to different multicast tasks in sequence as task identifiers. The task identifier can also include a process identifier and a task number. Among them, multicast tasks initiated by the same process are assigned task numbers in sequence; therefore, although the process identifiers in the task identifiers corresponding to the 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, thereby achieving the distinction between different multicast tasks through task identifiers.
[0079] For example, among multiple compute nodes connected to the same first switching node, some are used to execute a first service, while others are used to execute a second service. Computing nodes executing the same service need to exchange data. These computing nodes are considered a communication domain, with different communication domains assigned different communication domain identifiers. Computing nodes executing different services all need to multicast through the first switching node. Therefore, a task identifier includes the communication domain identifier, process, and task number. 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.
[0080] It should be noted that a switching node can process multiple multicast tasks in parallel, distinguishing different multicast tasks by different task identifiers, but the first switching node processes any multicast task in the same manner. Therefore, in the embodiments of the present application, the data processing method adopted in the embodiments of the present application is described by taking the switching node processing a multicast task as an example.
[0081] It should be understood that if a distributed computing system is used to execute only one multicast service at a time, the control information may not include the task field.
[0082] The operator field is used to carry an operator identifier, and the operator identifier is used to indicate the type of task executed by the first switching node. In the embodiment of the present application, the task type is multicast or broadcast.
[0083] The data volume field is used to carry the data volume, and the data volume indicates the data volume of the data to be multicast in the multicast source.
[0084] The above-mentioned address field is used to carry address information. For a multicast destination, the address field is used to carry the address information of the multicast destination. The address information of the multicast destination is used to indicate the storage address of the multicast destination after receiving the multicast data.
[0085] The quantity field is used to carry first quantity information, which indicates the number of multicast destinations connected to the first switching node that receives the first control information. For example, in the distributed computing system shown in Figure 2 , the multicast source is computing node C0, and the multicast destinations include computing nodes C1 and C3. The value of the quantity field in the control information sent by computing nodes C1 and C3 is both 2.
[0086] In the case where the computing node is a multicast source, if the multicast source needs to multicast data during the execution of its services, for example, if a multicast operator is executed, and the operator indicates that data needs to be multicasted from the computing node, the multicast source will generate control information and send the control information to the first switching node. The indication field of the control information sent by the multicast source carries a second identifier, and the address field carries address information of the data to be multicast. The second identifier is used to indicate that the computing node sending the control information is a multicast source; the address information is used to indicate the storage address of the data to be multicast in the multicast source, such as the starting address of the data to be multicast. In the embodiment of the present application, for ease of description, the control information carrying the second identifier is referred to as second control information.
[0087] In one possible implementation, the second control information may also include other information. As shown in Table 2 below, Table 2 shows the fields included in the second control information and the meanings represented by the corresponding fields. In addition to the second identifier carried in the indication field and the address information of the address field, the second control information may also include any one or more of the other fields shown in Table 2. Among them, the specific meanings of some fields in Table 2 can refer to the introduction to the meanings of the fields in Table 1 above. It should be understood that the fields listed in Table 2 are only used as an example, and the second control information may include more or fewer fields, and the embodiments of the present application do not impose specific restrictions.
[0088] Table 2
[0089] S402. The first switching node establishes a multicast task based on the received control information.
[0090] After receiving control information sent by a computing node, the first switching node establishes a multicast task based on the received control information. The multicast task includes at least multicast destination information, which is used to indicate the destination of multicast data sent by the multicast task or to indicate the port of the first switching node to send multicast data.
[0091] After receiving the control information, the first switching node establishes different multicast tasks based on the task identifier in the control information. After receiving the control information, the first switching node writes the information in the control information into the multicast task corresponding to the task identifier based on the task identifier. The method for the first switching node to establish different multicast tasks is the same, so the present embodiment uses establishing a multicast task as an example.
[0092] The multicast destination information includes port information, which indicates the port that received the control information. The port information also indicates the port through which the first switching node transmits the multicast data. Specifically, the first switching node receives the control information for the multicast destination through which it transmits the received multicast data. For example, the first switching node has a bitmap corresponding to the ports, with each port corresponding to a bit in the bitmap. After a port of the first switching node receives the first control information, the bit corresponding to the port in the bitmap is set. For example, if the first switching node includes five ports, if the bitmap is "00000," it indicates that the first switching node did not receive the first control information. If the bitmap is "00110," since the second and third bits of the bitmap are set to 1, it indicates that the first switching node received the first control information through the second and third ports, respectively, or that the first switching node received the first control information through ports 2 and 3, respectively. For another example, after receiving the first control information, the first switching node establishes a port information table to record the port IDs of the ports that received the first control information.
[0093] It should be understood that a single multicast includes multiple multicast destinations. Therefore, if a first switching node is connected to multiple computing nodes, and these multiple computing nodes are all multicast destinations, the first switching node will receive first control information sent by multiple multicast destinations. After receiving the first control information through a port, the first switching node sets the corresponding bit in the bitmap corresponding to that port. In some possible implementations, the first switching node can be connected to a computing node through multiple ports. Therefore, in the port-corresponding bitmap, one logical port may correspond to one bit. A logical port includes one or more physical ports, and the physical ports included in a logical port are connected to the same computing node.
[0094] In one possible implementation, the multicast task may also include other information. As shown in Table 3 below, Table 3 shows the fields included in the multicast task and the meanings represented by the corresponding fields. In addition to the port information recorded in the port field, the multicast task may also include any one or more of the other fields shown in Table 3. The specific meaning of each field in Table 3 can refer to the introduction to the meaning of each field in Table 1 above. It should be understood that the fields listed in Table 3 are only used as an example, and the first control information may include more or fewer fields. For example, if there is only one layer of switching nodes in the distributed computing system as shown in Figure 2, the multicast task may not include the switching node field; this embodiment of the present application does not impose specific restrictions.
[0095] Table 3
[0096] The destination address field is used to record the port ID of the port that received the first control information and the multicast destination address information 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 the port and the multicast destination address information carried in the address field of the first control information into the destination address field of the multicast task. In other words, the destination address field records the correspondence between the port ID and the multicast destination address information.
[0097] The source address field is used to record the address information of the data to be multicasted by the multicast source, and is used to indicate the storage address of the data to be multicasted in the multicast source. For example, the address information may be the starting address of the data to be multicasted.
[0098] The above-mentioned source label field is used to indicate whether the first switching node that establishes the multicast task is connected to the multicast source. If the source label field is the third identifier, it means 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 that sent the control information is a multicast source based on the indication field in the control information. If it is a multicast source, the source label field is set to an identifier indicating that the multicast source is connected. For example, the source label field includes 1 bit. When the bit is 1, it indicates that the first switching node that establishes the multicast task is connected to the multicast source. When the bit is 0, it indicates that the first switching node that establishes the multicast task is not connected to the multicast source.
[0099] The root tag indicates whether the switch node creating the multicast task is the root node of the multicast task. A root node is a switch node that, after receiving multicast data during a multicast task, does not need to send the multicast data to upper-layer switch nodes. In the distributed computing system shown in Figure 2, if switch node S0 receives control information, since S0 is connected to all compute nodes in the distributed computing system, after receiving multicast data from the multicast source, it can send the multicast data to all multicast destinations. Therefore, switch node S0 is the root node. In the distributed computing system shown in Figure 3, if the participating compute nodes include six nodes, C0 to C5, with C0 being the multicast source and the remaining compute nodes being the multicast destinations, then after receiving the multicast data from C0, S0 needs to send the data to switch node S6 or switch node S7. S6 or S7 then sends the multicast data to S3, which then sends the data to C4 and C5. Therefore, the root node is S6 or S7.
[0100] The switching node field is used to record the identifier of the upper-layer switching node to which the first switching node establishing a multicast task is connected, indicating the upper-layer switching node to which the first switching node establishing the multicast task is connected. For example, the distributed computing system shown in FIG3 includes two layers of switching nodes, where 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 establishing a multicast task records the identifiers of the two second switching nodes to which it is connected in the switching node field. For example, if the first switching node S0 receives control information to establish a multicast task, the first switching node will record the IDs of the second switching node S6 and the second switching node S7.
[0101] In a possible implementation, the multicast task further includes a source identification field, and the source identification field is used to record the ID of the multicast source.
[0102] In one possible implementation, the multicast task further includes a destination identification field, which is used to record the ID of the computing node that sends the first control information. If the multicast task includes a target identification field, the multicast destination information further includes the ID of the computing node recorded in the destination identification field.
[0103] After receiving a control message, the first switching node determines whether the computing node that sent the control message is a multicast source or a multicast destination based on the indication field. If it is a multicast source, the ID of the computing node is recorded in the source identification field; if it is a multicast destination, the ID of the computing node is recorded in the destination identification field. The control message sent by the computing node can carry its corresponding ID, and the first switching node obtains the ID of the computing node from the control message. The first switching node can also store a mapping relationship between the port ID and the computing node ID, and the mapping relationship includes multiple groups of port identifiers and computing node IDs. A group 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 ID of the computing node that sent the control message based on the port that received the control message and the mapping relationship.
[0104] It should be noted that after the first switching node receives control information sent by any computing node (which can be a multicast source or a multicast destination), it can start creating a multicast task. After receiving control information sent by other computing nodes, the first switching node updates the multicast task based on the received control information.
[0105] For example, if a first switching node receives control information sent by 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 based on the control information. If the indicator field in the control information records the first identifier, indicating that the computing node sending the control information is the multicast destination, the first switching node writes the address recorded in the address field in the control information into the destination address field of the multicast task and sets the corresponding bit in the bitmap to 1 based on the port that received the control information. The first switching node can also obtain the ID of the upper-layer switching node to which it is connected and write it into the switching node field in the multicast task.
[0106] If the first switching node receives the second control information and the indication field in the control information still records the first identifier, the address recorded in the address field in the control information is written into the destination address field of the multicast task, and the corresponding bit position in the bitmap is set to 1 according to the port that receives the control information.
[0107] If the first switching node receives a control message, and the indication field in the control message records the second identifier, it indicates that the computing node sending the control message is a multicast source. The first switching node writes the address recorded in the address field in the control message into the source address field of the multicast task, sets the corresponding bit position in the bitmap to 1 according to the port that receives the control message, and sets the source tag field to 1.
[0108] 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 the first quantity of control information carrying the first identifier. If the first switching node is connected to a multicast source, the multicast task is determined to have been created after receiving the control information sent by the multicast source and the first quantity of control information carrying the first identifier. It should be understood that the "receiving the first quantity of control information carrying the first identifier" in the embodiment of the present application actually refers to receiving the first quantity of control information having the same task identifier and carrying the first identifier, and the first quantity is the number of multicast destinations connected to the first switching node as indicated by the quantity field.
[0109] S403. The first switching node obtains multicast data according to the multicast task.
[0110] If the first switching node is connected to the multicast source, after establishing the multicast task, the first switching node 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 the at least one computing node.
[0111] In one possible implementation, a first switching node sends a data read request to a multicast source to read data to be multicasted. The data read request includes a starting address and a read length of the data to be read. After receiving the data read request, the multicast source obtains the corresponding multicast data based on the starting address and data length in the data read request. The multicast source then returns a read response to the first switching node, including the multicast data obtained based on the data read request. After receiving the returned read response, the first switching node obtains the multicast data in the read response and sends the multicast data to each multicast destination.
[0112] The multicast data read by the 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 the data amount field in the control information sent by the multicast source. If a data read request can only read part of the data to be multicast, the first switching node sends multiple data read requests to the multicast source to read all of the data to be multicast.
[0113] 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, and is used to read a segment of data starting from the starting address and having 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), which is not specifically limited in the embodiments of the present application.
[0114] Optionally, if the sum of the total amount of unfinished multicast data and the total amount of data to be received on the first switching node is greater than or equal to its cache capacity, the first switching node may suspend sending data read requests to the multicast source. The total amount of unfinished 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 can be read by data read requests that have been sent but for which no read response has been received. This prevents congestion between the first switching node and the multicast source.
[0115] In another possible implementation, after establishing the multicast task, the first switching node sends a notification message to the multicast source, the notification message including the starting address and the data volume of the data to be multicast. After receiving the notification message, the multicast source sends the data to be multicast to the first switching node.
[0116] S404. The first switching node sends multicast data to the at least one computing node according to the multicast task.
[0117] In the embodiment of the present application, 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 following describes the process of the first switching node performing multicast.
[0118] After receiving a read response, the first switching node extracts the multicast data from the read response and transmits the multicast data to a first port P1, one of the multiple ports included in the first switching node. The first switching node then determines whether P1 is a target port. If so, the first switching node copies the multicast data to the cache corresponding to the first port and then sends the multicast data through the first port to the computing node connected to the first port. The target port is the port indicated by the multicast destination information as the port to which the multicast data should be sent.
[0119] After the first switching node determines whether P1 belongs to the target port, regardless of whether P1 belongs to the target port, P1 sends the multicast data to the second port P2. Then, the first switching node determines whether P2 belongs to the target port. If it is determined that P2 does not belong to the target port, the multicast data is not copied, and P2 sends the multicast data to the third port P3.
[0120] The first switching node generates multiple message headers based on the multicast task, wherein each target port corresponds to a 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 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. Among them, the first switching node can determine the target port based on the port information recorded in the port field in the multicast task, 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 a target port as the destination address corresponding to the port, and then generate the corresponding message header. If the multicast task includes a destination identification field, the first switching node can also determine the target port based on the ID of the computing node recorded in the destination identification field and the mapping relationship between the port ID and the computing 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 a target port as the destination address corresponding to the port, and then generate the corresponding message header.
[0121] Exemplarily, 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. That is, if P1 is a target port, the first switching node 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, generates a message header based on this address information, and sends it to P1. If P3 is also a target port, the first switching node 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, generates a message header based on this address information, and sends it to P3. For other ports determined as target ports, corresponding message headers are generated using the same method described above and sent to the corresponding ports.
[0122] After acquiring the multicast data and the corresponding message header, each target port obtains a target message according to the obtained message header and multicast data, and then sends the target message to the computing node to which it is connected.
[0123] The first switching node includes a processing unit and multiple ports. After receiving multicast data, the processing unit sends the multicast data to the ports. The processing unit is also configured to generate the multiple message headers and send them to the destination ports. The following, with reference to Figure 5, describes how multicast data is sent from the processing unit to the ports, how multicast data is sent from one port to another, and how message headers are sent from the processing unit to the destination ports in the first switching node.
[0124] An embodiment of the present application also provides a switching node. As shown in Figure 5, Figure 5 is a schematic diagram of the structure of a switching node provided by an embodiment of the present application. The switching node includes a processing unit and multiple ports. Figure 5 takes 16 ports (P1 to P16) as an example. The processing unit and the multiple ports can communicate through different paths, including the xbar shown in the figure and the chain path formed by each port. Among them, the switching node can include one or more chain paths. If the 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 the switching node includes multiple chain paths, each of these multiple chain paths can connect some or all of all ports of the switching node, but the ports included in the multiple chain paths should cover all ports of the switching node. Figure 5 takes the example of a chain link including two chain paths, one link connecting the processing unit and ports P1 to P8 in the figure, and one link connecting the processing unit and ports P9 to P16.
[0125] After a switching node receives a read response from a port, it transmits the response to the processing unit via xbar. The processing unit then parses the multicast data from the response. The processing unit then sends the multicast data via a chain path. The port that receives the multicast data determines whether it is the target port. For example, if the first port P1 receives the multicast data, if P1 determines that it is the target port, P1 copies the multicast data to its corresponding cache. P1 then sends one copy of the multicast data to the connected compute node and another copy of the multicast data to P2, the next port in the chain path. If P1 determines that it is not the target port, P1 does not copy the multicast data and instead sends the multicast data to P2, the next port in the chain path. In Figure 5, taking P2 as an example, where P2 is not the target port, P2 does not copy the multicast data and does not obtain the target message based on the message header and multicast data.
[0126] After receiving the multicast data, if P2 determines that it is the target port, P2 copies the multicast data to its corresponding cache. P2 then sends a copy of the multicast data to its connected compute node and sends the multicast data to P2's next port, P3, via the chain path. If P2 determines that it is not the target port, P2 does not copy the multicast data and sends the multicast data to P2's next port, P3, via the chain path. Other ports that receive the multicast data perform the same operations as P1 and P2 above, and will not be repeated here.
[0127] The switching node shown in Figure 5 includes two links. After receiving multicast data, the processing unit replicates the data within the processing unit 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 one copy to P16. The multicast data on each link is then transmitted to the other connected ports via a chained path.
[0128] In an embodiment of the present application, 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 to 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. The processing unit can determine the target port based on the port information recorded in the port field in 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 the destination address field of the target port as the destination address corresponding to the target port, thereby generating the corresponding message header. If the multicast task includes a destination identification field, the processing unit can also determine the target port based on the ID of the computing node recorded in the destination identification field and the mapping relationship between the port ID and the computing 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 the destination address field of the target port as the destination address corresponding to the port, thereby generating the corresponding message header.
[0129] Exemplarily, the processing unit determines, based on the multicast destination information, that multicast data needs to be sent via P1 to the computing node connected to P1. That is, if P1 is a target port, the processing unit 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, generates a message header based on this address information, and sends 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, generates a message header based on this address information, and sends it to P3 via xbar. For other ports determined as target ports, corresponding message headers are generated using the same method as described above and sent to the corresponding ports.
[0130] After each destination port determines that it is the destination 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.
[0131] In an embodiment of the present application, the processing unit carries a first label when sending a message header to each target port, and carries a second label in the multicast data sent to each port. The first label and the second label may be task identifiers corresponding to corresponding multicast tasks. After receiving the multicast data, a port compares the second label with the first label. If the second label matches the first label, the port determines that it is a target port.
[0132] The data processing method provided by this application is described above in conjunction with the accompanying drawings, when a distributed computing system includes only one layer of switching nodes. The following describes the data processing method provided by this application, when a distributed computing system includes two layers of switching nodes. Take the distributed computing system shown in FIG. 3 as an example. FIG. 6 is a schematic diagram of another data processing method provided by an embodiment of this application.
[0133] S601. The computing node sends control information to the first switching node.
[0134] The computing node includes a multicast source and a multicast destination. In the embodiment of the present application, the content of the control information sent by the multicast source and the multicast destination to the first switching node is included in the relevant description in the above S401 and will not be repeated here.
[0135] It should be noted that if a distributed computing system includes multiple layers of switching nodes, a multicast may require multiple first switching nodes to establish multicast tasks. For example, in the distributed computing system shown in Figure 3, the computing nodes participating in a multicast include eight computing nodes, C0 through C7, with C0 being the multicast source and the other computing nodes being the multicast destinations. If computing nodes C0 through C3 send control information to S0, and computing nodes C4 through C7 send control information to S3, both S0 and S3 will establish multicast tasks.
[0136] S602. The first switching node establishes a multicast task based on the received control information.
[0137] The process of the first switching node establishing the multicast task based on the received control information can refer to the description of S402 above, which will not be repeated here.
[0138] S603. The first switching node sends control information to the second switching node.
[0139] After establishing the multicast task, the first switching node sends control information to the second switching node to which it is connected. The control information sent by the first switching node includes a source indication field and a destination indication field. The source indication field is used to indicate whether the first switching node is connected to a multicast source, and the destination indication field is used to indicate whether the first switching node is connected to a multicast destination. For example, the source indication field and the destination indication field each include one bit. When the value of the source indication field is 1, it indicates that the first switching node is connected to the multicast source. When the value of the source indication field is 0, it indicates that the first switching node is not connected to the multicast source. When the value of the destination indication field is 1, it indicates that the first switching node is connected to the multicast destination. When the value of the destination indication field is 0, it indicates that the first switching node is not connected to the multicast destination. In the embodiment of the present application, for the convenience of description, the control information sent by the first switching node is referred to as the third control information.
[0140] After establishing the multicast task, the first switching node determines whether the multicast source and the multicast destination are connected based on the multicast task, and sets the source indication field and the destination indication field in the third control information to corresponding values. For example, if the first switching node is connected to the multicast source and the multicast destination, both the source indication field and the destination indication field are set to 1.
[0141] Optionally, the third control information may also use only one field to indicate whether the first switching node is connected to a multicast source and a multicast destination. For example, the field includes two bits, where a value of the first bit is 1, indicating that the first switching node is connected to the multicast source; a value of the first bit is 0, indicating that the first switching node is not connected to the multicast source; a value of the first bit is 1, indicating that the first switching node is connected to the multicast destination; a value of the first bit is 0, indicating that the first switching node is not connected to the multicast destination. This embodiment of the present application does not impose specific limitations.
[0142] In one possible implementation, the third control information may also include other information. Table 4 below lists the fields included in the third control information and the meanings of the corresponding fields. In addition to 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, which is not specifically limited in this embodiment of the present application.
[0143] Table 4
[0144] The source address field in the third control information indicates the storage address of the data to be multicast after the first switching node obtains it 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, the storage address is carried in the data read request sent by the second switching node to the first switching node.
[0145] The destination address field in the third control information indicates the storage address of the multicast data sent by the second switching node after the first switching node receives the multicast data when the first switching node is connected to a multicast destination, and is used by the second switching node to write the multicast data to the first switching node.
[0146] The quantity field in the third control information is used to carry a second quantity, and the first quantity is used to indicate the number of multicast destinations connected to the first switching node that receives the first control information. For example, in the distributed computing system shown in FIG3 , the computing nodes participating in a multicast include eight computing nodes, C0 to C7, where C0 is the multicast source and the other computing nodes are multicast destinations. If the four computing nodes C0 to C3 send the control information to S0, and the four computing nodes C4 to C7 send the control information to S3, then both S0 and S3 will establish a multicast task. After S0 and S3 establish the multicast task, if S0 and S3 choose to send the third control information to the second switching node S6, the value of the quantity field in the third control information is 2.
[0147] In a possible implementation, the third control information further includes a switching node identification field, which is used to carry the ID of the first switching node that sends the third control information.
[0148] In an embodiment of the present application, since the first switching node is also connected to one or more second switching nodes, each first switching node needs to select a target second switching node to participate in the multicast task after establishing the multicast task. As described above, after S0 and S3 establish the multicast task, since S0 and S3 are both connected to S6 and S7, S0 and S3 need to select the same second switching node to complete the multicast. In an embodiment of the present application, the first switching node can select the target second switching node using a hashing method. For example, the first switching node performs a hash operation using the task identifier as a hash factor, calculates the remainder of the hash operation by n, and selects the target second switching node based on the remainder, where n is the number of second switching nodes connected to the first switching node. Exemplarily, S0 uses the task identifier as a hash factor and performs a hash operation using the remainder of the hash operation by 2. If the remainder is 0, S0 selects to send the third control information to S6; if the remainder is 1, S0 selects to send the third control information to S7.
[0149] Since the task identifiers of the same multicast are the same, the hash operations performed on the task identifiers by different first switching nodes participating in the same multicast obtain the same results and the same remainders. This ensures that different first switching nodes participating in the same multicast can select the same second switching node as the target second switching node, and when there are multiple multicast tasks in the distributed computing system, load balancing can be achieved.
[0150] After determining the target second switching node, the first switching node updates the ID of the switching node recorded in the switching node field in the multicast task, and only retains the ID of the target second switching node.
[0151] S604. The second switching node establishes a multicast task based on the received control information.
[0152] After receiving control information sent by the first switching node, the second switching node establishes a multicast task based on the received control information. The multicast task includes at least destination switching node information, which is used to indicate the destination of the multicast data sent by the multicast task or to indicate the port of the second switching node to send the multicast data.
[0153] After receiving the third control information, the second switching node establishes a different multicast task based on the task identifier in the third control information. After receiving the third control information, the second switching node writes the information in the third control information into the multicast task corresponding to the task identifier based on the task identifier. The method for establishing different multicast tasks by the second switching node is the same, so the present embodiment uses establishing a multicast task as an example.
[0154] The destination switching node information includes port information, which indicates the port that received the third control information. The port information also indicates the port through which the second switching node transmits multicast data. Specifically, the second switching node receives the third control information from the first switching node through which ports, and therefore needs to transmit the received multicast data through these ports. For example, the second switching node has a bitmap corresponding to ports, with each port corresponding to a bit in the bitmap. After a port of the second switching node receives a piece of third control information, the bit corresponding to that port in the bitmap is set. For example, if the second switching node includes four ports, if the bitmap is "0000," it indicates that the second switching node did not receive the third control information. If the bitmap is "0011," since the first and second bits of the bitmap are set to 1, it indicates that the second switching node received the third control information through the first and second ports, respectively, or that the second switching node received the third control information through ports numbered 1 and 2, respectively. For another example, after receiving a piece of third control information, the second switching node establishes a port information table to record the port IDs of the ports that received the third control information.
[0155] In one possible implementation, the multicast task may also include other information. As shown in Table 5 below, Table 5 shows the fields included in the multicast task established by the second switching node and the meanings represented by the corresponding fields. In addition to the port information recorded in the port field, the multicast task may also include any one or more of the other fields shown in Table 5. The specific meaning of each field in Table 5 can be referred to the introduction to the meaning of the corresponding field in Table 4 above, that is, the fields in Table 4 included in the third control information. The second switching node will also record the multicast task when establishing the multicast task. It should be understood that the fields listed in Table 5 are only used as an example, and the third control information may include more or fewer fields.
[0156] Table 5
[0157] The destination address field is used to record the port ID of the port that received 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 piece of third control information through a port, it writes the port ID of the port and the storage address in the third control information into the destination address field of the multicast task. In other words, the destination address field records the correspondence between multiple sets of port IDs and multicast destination address information.
[0158] In a possible implementation, the multicast task established by the second switching node further includes a source identification field, where the source identification field is used to record the ID of the first switching node connected to the multicast source.
[0159] In one possible implementation, the multicast task established by the second switching node further includes a destination identification field, which is used to record the ID of the first switching node that is not connected to the multicast source. If the multicast task includes a target identification field, the destination switching node information further includes the ID of the first switching node recorded in the destination identification field.
[0160] It should be noted that the second switching node can start creating a multicast task after receiving the third control information sent by any first switching node. 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.
[0161] 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 is complete after receiving a second number of pieces of third control information. The second number is the number of first switching nodes to which the second switching node is connected, as indicated by the quantity field in the third control information.
[0162] S605. The second switching node sends notification information to the first switching node connected to the multicast source, instructing the first switching node connected to the multicast source to obtain multicast data.
[0163] After receiving a third control message, if the source indication field of the third control message indicates that the first switch node sending the third control message is connected to a multicast source, the second switch node sends a notification message to the first switch node; or after establishing a multicast task, the second switch node sends a notification message to the first switch node connected to the multicast source. The notification message is used to instruct the first switch node connected to the multicast source to obtain multicast data from the multicast source. For example, if the distributed computing system only executes one multicast task at a time, the notification message can be a response message in response to the third control message sent by the first switch node. If the third control message includes a task field, the notification message includes the aforementioned task identifier, which is used to instruct the first switch node to obtain the multicast data corresponding to the task identifier.
[0164] In one possible implementation, if the third control information includes the source address field in Table 4, the notification information may be a data read request that carries the storage address recorded in the source address field in the third control information. Optionally, the notification information may also include a task identifier.
[0165] S606. The first switching node connected to the multicast source receives the notification information, obtains the multicast data from the multicast source, and sends the multicast data to the second switching node.
[0166] After receiving the notification information, the first switching node connected to the multicast source obtains the multicast data from the multicast source. The method for the first switching node to obtain the multicast data from the multicast source can refer to the relevant description in S403 above and will not be repeated here.
[0167] If the notification information includes a task identifier, the first switching node searches for 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 searches for 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.
[0168] S607. The second switching node sends multicast data to the first switching node.
[0169] After receiving 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, i.e., sends the multicast data to the first switching node that sent the third control information. The method for the second switching node to send multicast data to the first switching node can be referred to above as S404 and the method for the first switching node to send multicast data to at least one computing node as described in the related description of FIG5 , and is not further described here. The second switching node has the same structure as the switching node in FIG5 .
[0170] S608. The first switching node sends multicast data to the computing node.
[0171] The first switching node, having received the multicast data from the second switching node, sends the received multicast data to the computing node based on the multicast task established by the first switching node. The method for the first switching node to send the multicast data to the computing node based on the multicast task can be described in S404 and the related description of FIG5 , and will not be repeated here.
[0172] It should be understood that the distributed computing systems shown in Figures 2 and 3 are merely examples. Distributed computing systems may also employ other architectures, for example, including three or more layers of switching nodes. The connections between switching nodes and computing nodes, and between switching nodes at different layers, may also be implemented in other ways. Methods for implementing multicast or broadcast in distributed computing systems with other architectures can refer to the methods in the aforementioned embodiments and will not be further elaborated here.
[0173] For the above method embodiments, for simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the present invention is not limited to the order of the actions described. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present invention. Other reasonable step combinations that can be conceived by those skilled in the art based on the above description also fall within the scope of protection of the present invention.
[0174] The present application also provides a data processing system, which includes the distributed computing system shown in FIG. 2 or FIG. 3 . The distributed computing system can refer to the introduction and related descriptions corresponding to FIG. 2 or FIG. 3 , and will not be described in detail here. The operations performed by the computing nodes and switching nodes in the distributed computing system can refer to the relevant descriptions in the embodiments corresponding to FIG. 4 to FIG. 6 , and will not be described in detail here.
[0175] The present application also provides a computing device, as shown in FIG7 , which is a schematic diagram of a computing device provided by the present 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, the communication interface 730, and the memory 740 are interconnected via a bus 750.
[0176] The host 710 may be a CPU, and the computing node 720 may be a CPU, GPU, NPU, TPU, or dedicated AI processing chip. The host 710 is configured to obtain topology information of the distributed computing system, etc., for the computing node 720 to generate control information. For example, the topology information may include the number of computing nodes connected to each first switching node. The operations performed by the computing node 720 may refer to the operations performed by the computing node in the embodiments corresponding to Figures 4-6 above, and will not be repeated here.
[0177] The communication interface 730 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc. The wireless interface may be a cellular network interface or a wireless local area network interface.
[0178] Memory 740 may be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or flash memory. Memory 740 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (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 link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM).
[0179] 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. In addition, the computing device 700 may include more or fewer components than shown in Figure 7, or have different component configurations.
[0180] Bus 750 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. Bus 750 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, FIG7 shows only one thick line, but this does not mean that there is only one bus or only one type of bus.
[0181] The computing device 700 may further include the at least one switching chip 760 . Operations performed by the switching chip 760 may refer to the operations performed by the first switching node or the second switching node in the above embodiment, and are not described in detail here.
[0182] Specifically, the specific implementation of various operations performed by the computing device 700 may refer to the specific operations performed by the distributed computing system in the above method embodiment, which will not be described in detail here.
[0183] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions. When the instructions are executed, the method steps implemented by the computing node or the switching node in the above method embodiment can be implemented, which will not be repeated here.
[0184] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0185] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions described in accordance with the embodiments of the present invention are generated in whole or in part. 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, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium, or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0186] The steps in the method of the embodiment of the present application can be adjusted in order, combined or deleted according to actual needs; the modules in the device of the embodiment of the present application can be divided, combined or deleted according to actual needs.
[0187] The above is a detailed introduction to the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0188] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A data processing method, characterized in that: Applied to a distributed computing system, the distributed computing system comprises a plurality of computing nodes and at least one first switching node, each of the at least one first switching node is connected to some or all of the computing nodes in the plurality of computing nodes, wherein: The first switching node receives control information sent by at least one computing node, wherein each control information includes an indication field, and the indication field is used to indicate that the computing node sending the control information is a multicast source or a multicast destination; The first switching node establishes a multicast task based on the received control information, wherein the multicast task includes multicast destination information, and the multicast destination information is used to indicate a destination of multicast data sent by the multicast task; The first switching node obtains multicast data, and sends the multicast data to the at least one computing node according to the multicast task.
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 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 multiple computing nodes; The first switching node acquires multicast data, including: The first switching node sends a data read request to the multicast source according to 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 The distributed computing system further includes a second switching node, the second switching node being connected to the first switching node, and the method further includes: The first switching node sends control information to the second switching node, where the control information sent by the first switching node includes a field for indicating whether the first switching node is connected to a multicast source and a field for indicating whether the first switching node is connected to a multicast destination; The control information sent by the first switching node indicates that the first switching node is connected to a multicast source, and the first switching node obtains multicast data, including: The first switching node receives notification information sent by the second switching node, where the notification information instructs 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 according to 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 1, characterized in that: The distributed computing system further includes a second switching node, the second switching node being connected to the first switching node, and the method further includes: The first switching node sends control information to the second switching node, where the control information sent by the first switching node includes a field for indicating whether the first switching node is connected to a multicast source and a field for indicating whether the first switching node is connected to a multicast destination; The control information sent by the first switching node indicates that the first switching node is not connected to a multicast source, and the first switching node obtains multicast data, including: The first switching node receives the multicast data sent by the second switching node, where the multicast data is sent to the second switching node by other first switching nodes connected to a multicast source.
5. The method according to any one of claims 2 to 4, characterized in that: The first switching node includes a processing unit and a plurality of ports, and the plurality of ports form a chain path.
6. The method according to claim 5, characterized in that The 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 a first port of the chain path, the first port being one of the plurality of ports; The first port is a target port, and the first port copies the multicast data to a cache corresponding to the first port; wherein the target port is a port for sending the multicast data indicated by the multicast destination information; The first port sends the multicast data to a computing node connected to the first port.
7. The method according to claim 6, characterized in that The method further includes: the first port sending the multicast data to a next port of the chain path.
8. The method according to claim 5, characterized in that The 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 a first port of the chain path, the first port being 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 of the chain path; wherein the target port is the port for sending the multicast data indicated by the multicast destination information.
9. The method according to claim 6 or 7, characterized in that: The multicast task also includes address information of each multicast destination; the method also includes: The processing unit generates a plurality of message headers according to the multicast task, wherein each message header includes address information of a multicast destination, and the address information of the multicast destinations in the message headers 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 sending the multicast data to a computing node connected to the first port includes: The first port obtains a target message according to the message header obtained by the first port and the multicast data, and sends the target message to a computing node connected to the first port.
10. The method according to claim 9, characterized in that The message header includes a first label, and the multicast data includes a second label; The processing unit sends the multicast data to the first port of the chain path, further comprising: When the first tag and the second tag are the same, the first port determines that the first port is the target port.
11. The method according to any one of claims 2 to 10, characterized in that: The control information sent by the multicast destination also includes first quantity information, where the first quantity information 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 according to the address information, including: After receiving the control information of the quantity indicated by the first quantity information, the first switching node sends the data reading request to the multicast source according to the address information of the multicast data.
12. The method according to claim 3, characterized in that The control information sent by the multicast destination further includes first quantity information, where the first quantity information is used to indicate the quantity of multicast destinations connected to the first switching node; The first switching node sending control information to the second switching node includes: After receiving the control information of the quantity indicated by the first quantity information, the first switching node sends control information to the second switching node.
13. The method according to claim 12, characterized in that The control information sent by the first switching node also includes second quantity information, and the second quantity information is used to indicate 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 of the number indicated by the second quantity information.
14. The method according to any one of claims 1 to 13, characterized in that: The multicast destination information includes port information, which indicates a port at which the first switching node receives control information sent by a 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.
15. The method according to any one of claims 1 to 14, characterized in that: The multicast source and the multicast destination are a central processing unit CPU, a graphics processor GPU, a neural network processor NPU, a tensor processor TPU or a dedicated artificial intelligence AI processing chip, and the switching node is a switching chip or a switching device with a switching function.
16. A switching node, characterized in that: The switching node comprises a processing unit and a plurality of ports, wherein the plurality of ports form a chain path, wherein: The processing unit is configured to send multicast data to a first port of the chain path, wherein the first port is one of the plurality of ports; The first port is used to copy the multicast data to a cache corresponding to the first port; wherein the first port belongs to a target port, and the target port includes one or more ports that need to send the multicast data; The first port is also used to send the multicast data to the computing node connected to the first port.
17. The switching node according to claim 16, characterized in that: The first port is also used to send the multicast data to the next port of the chain path.
18. The switching node according to claim 16 or 17, characterized in that: The switching node also includes a second port; The second port is used to send the multicast data to the next port of the second port in the chain path after acquiring the multicast data; wherein the second port does not belong to the target port.
19. The switching node according to any one of claims 16 to 18, characterized in that: The multicast task also includes address information of each multicast destination, and the multicast destination includes at least one first computing node; The processing unit is further used to generate a plurality of message headers according to the multicast task, wherein each message header includes address information of a multicast destination, and the address information in each message header is different; The processing unit is further configured to send 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 is specifically used for: A target message is obtained according to the message header obtained by the first port and the multicast data, and the target message is sent to a computing node connected to the first port.
20. The switching node according to claim 19, characterized in that: The message header includes a first label, and the multicast data includes a second label; The first port is further used to determine that the first port is a target port when the first tag and the second tag are the same.
21. The switching node according to any one of claims 16 to 20, characterized in that: The switching node is a switching chip or a switching device with a switching function, and the switching node has a transmission layer.
22. A distributed computing system, characterized in that: The data processing system includes multiple computing nodes and at least one first switching node, each of the at least one first switching node is connected to some or all of the multiple computing nodes, wherein 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 described in any one of claims 1-15.
Citation Information
Patent Citations
Data processing method, switching node and related system
CN119232680A
Multicast duplication method, device and system
CN103222230A
Multicast routing system and method based on PAAS cloud platform
CN110391978A
Cache processing method and device, switching equipment and storage medium
CN116320003A
System and method to use all incoming multicast packets as a basis for GUID to lid cache contents in a high performance computing environment
US20190007346A1