Multicast method and apparatus, and related device

By maintaining communication groups and reusing RDMA QP in nodes, efficient multicast communication in a distributed computing environment is achieved, solving the problem of high CPU overhead caused by RDMA protocol only supporting unicast, and improving multicast efficiency and task completion consistency.

WO2026158238A1PCT designated stage Publication Date: 2026-07-30HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2026-01-19
Publication Date
2026-07-30

AI Technical Summary

Technical Problem

In a distributed computing environment, the RDMA protocol only supports point-to-point unicast communication. Multicast requires multiple unicasts, which results in high CPU overhead for the source node and affects multicast efficiency and task completion time.

Method used

By maintaining communication groups in nodes, each communication group contains multiple queue pairs (QPNs), only one multicast request needs to be sent during multicast, multicast message transmission is carried out using existing QPs, QPs for non-multicast RDMA communication are reused, preset packet sequence numbers are set to avoid conflicts, and dynamic management is performed through communication group identifiers.

Benefits of technology

It reduces the CPU overhead of nodes during multicast, improves multicast efficiency, reduces the difference in task completion time, and optimizes the communication performance of data center networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026073470_30072026_PF_FP_ABST
    Figure CN2026073470_30072026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a multicast method and apparatus, and a related device. The method comprises: a first node acquiring a multicast request, wherein the multicast request comprises a first operation identifier and a first communication group identifier, and the first operation identifier is configured to instruct the first node to perform multicast; the first node determining, on the basis of the first operation identifier, that multicast needs to be performed, and then determining a target communication group on the basis of the first communication group identifier, wherein the first node maintains at least one communication group, each of the at least one communication group comprises a plurality of queue pair numbers, and each communication group corresponds to one communication group identifier; and finally, the first node generating a plurality of first packets for multicast, and sending the first packets on the basis of queue pairs corresponding to a plurality of queue pair numbers comprised in the target communication group. By means of the above method, overhead of a CPU side of a node during a multicast implementation process can be reduced. Since the CPU side does not need to issue multiple multicast requests to a communication unit, the efficiency of implementing multicast by the node can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

A multicast method, apparatus and related equipment

[0001] This application claims priority to Chinese Patent Application No. 202510113564.4, filed on January 23, 2025, entitled "A Multicast Method, Apparatus and Related Equipment", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computer technology, and in particular to a multicast method, apparatus and related equipment. Background Technology

[0003] In the field of distributed computing, such as high-performance computing (HPC), distributed machine learning, distributed storage, and distributed databases, there is a common need for single-node multicast communication. Multicast is one of the basic transmission modes in networks, characterized by one node sending the same data to multiple other nodes.

[0004] Transport layer protocols based on Remote Direct Memory Access (RDMA) technology are becoming the mainstream transport protocols in data center networks. RDMA achieves zero-copy, kernel-bypass data transmission by offloading protocol stack processing in hardware, providing low latency, high throughput, and low central processing unit (CPU) overhead, which aligns with the demands of computing and storage-intensive / storage-intensive applications in data center networks. However, in current network environments using general-purpose switches, RDMA only supports point-to-point unicast communication. For a source node to implement multicast functionality, it needs to send data to multiple destination nodes via multiple unicasts. This implementation requires the source node's CPU to send multiple unicast tasks to the network interface card (NIC), increasing the CPU overhead on the source node side. Summary of the Invention

[0005] This application provides a multicast method, apparatus, and related equipment that can reduce the CPU overhead of nodes during multicast implementation and improve multicast efficiency.

[0006] In a first aspect, this application provides a multicast method, the method comprising: a first node acquiring a multicast request, the multicast request including a first operation identifier and a first communication group identifier, wherein the first operation identifier is used to instruct the first node to perform multicast; the first communication group identifier is used to indicate the destination node for which multicast is required; the first node determines that multicast is required based on the first operation identifier, and then determines the target communication group based on the first communication group identifier; wherein the first node maintains at least one communication group, each communication group including multiple queue pair numbers (QPNs), and each communication group corresponding to a communication group identifier; finally, the first node generates multiple first messages for multicast, and sends the first messages according to the queue pairs (QPs) corresponding to the multiple QPNs included in the target communication group.

[0007] In a system that uses RDMA for communication, nodes establish connections via QPs. A communication group is created by connecting the destination node of a multicast to the QPNs connected to the source node. Each node maintains one or more communication groups, and each group contains multiple QPNs. The nodes connected to the QPs corresponding to these QPNs are the destination nodes of the multicast. When a node needs to perform a multicast, if the node triggering the multicast is a program or process running on that node, the node's CPU only needs to send a multicast request to the communication unit implementing the multicast, carrying the communication group identifier. The communication unit then only needs to send the generated multicast message according to the QP corresponding to the QPN in the communication group to achieve multicast. If the node triggering the multicast is not the multicast source, it sends a multicast request to the communication unit implementing the multicast, carrying the communication group identifier. The communication unit can parse the multicast request, determine the communication group based on the communication group identifier in the multicast request, and then send the generated multicast message according to the QP corresponding to the QPN in the communication group to achieve multicast. The above method can reduce the CPU overhead of nodes in the process of implementing multicast. Since the CPU does not need to send multiple multicast requests to the communication unit, the efficiency of nodes in implementing multicast can be improved.

[0008] In one possible implementation, the QPN in each of the above communication groups is the QPN corresponding to the QP established by the node for non-multicast RDMA communication.

[0009] In a system that uses RDMA for communication, each node establishes a connection through QP. The QP in each of the above communication groups is the QPN corresponding to the QP used by non-multicast RDMA. In other words, the QP used by multicast is also the QP used by nodes in the system to achieve non-multicast RDMA communication. Therefore, the above multicast method does not require additional QP overhead.

[0010] In one possible implementation, the first message includes a first packet sequence number (PSN), which is a first preset value.

[0011] In this application, the node reuses the QP used by the node to implement non-multicast RDMA communication during multicast. The PSN in the multicast message is set to a preset value, which can avoid conflict with the PSN in the non-multicast message, so as not to affect the non-multicast RDMA communication.

[0012] In one possible implementation, the first message includes a second operation identifier, which indicates that the first message is a message multicast by the first node.

[0013] In one possible implementation, the first message includes a communication group identifier field, and the first message includes a first communication group identifier, which is carried in the communication group identifier field.

[0014] The multicast message carries the communication group identifier to which the multicast destination node belongs. After the multicast destination node receives the multicast message, it can carry the communication group identifier in the acknowledgment message returned to the first node. In this way, the first node can delete the destination QPN in the communication group represented by the communication group identifier based on the communication group identifier and the destination QPN in the acknowledgment message, thereby realizing dynamic management of the communication group.

[0015] In one possible implementation, before the first node obtains the multicast request, the method further includes: the first node receiving a second message sent by the second node through the QP corresponding to the first QPN. The second message includes a third operation identifier and a first communication group identifier. The third operation identifier indicates that the second node requests to join a communication group, and the first communication group identifier indicates that the second node requests to join the communication group represented by the first communication group identifier, i.e., the target communication group. The first node determines whether it maintains the target communication group. If the first node determines that the target communication group is present in at least one communication group maintained by the first node, the first node adds the first QPN to the target communication group. If the first node determines that the target communication group is not present in at least one communication group maintained by the first node, the first node creates the target communication group identified by the first communication group identifier and adds the first QPN to the target communication group.

[0016] When a node needs to join a communication group, the node sends a message to the first node, which carries a third operation identifier and the communication group identifier of the communication group to be joined. The first node can then add the QPN corresponding to the QP connected to the node to the corresponding communication group according to the message, thereby realizing dynamic management of the communication group.

[0017] In one possible implementation, the target communication group includes a second QPN among the multiple QPNs. After sending the first message according to the QP corresponding to the multiple QPNs included in the target communication group, the method further includes: the first node receiving a third message sent by the third node through the QP corresponding to the second QPN. The third message includes a fourth operation identifier, a first communication group identifier, and a second QPN. The fourth identifier is used to indicate that the third message is an acknowledgment message. The first node determines that the third node has received the first message according to the fourth operator. Then, the first node deletes the second QPN from the target communication group represented by the first communication group identifier according to the third message.

[0018] In one possible implementation, the target communication group further includes address information, which indicates the address of the multicast data to be multicast; the first node generating the first message includes: the first node obtaining the address information, obtaining the multicast data according to the address information, and then generating the first message according to the multicast data.

[0019] Secondly, this application provides a multicast device, comprising: an acquisition module, configured to acquire a multicast request, the multicast request including a first operation identifier and a first communication group identifier, the first operation identifier being used to instruct a first node to perform multicast; a multicast module, configured to determine that multicast is required based on the first operation identifier and to determine a target communication group based on the first communication group identifier; wherein the multicast device maintains at least one communication group, each communication group including multiple QPNs, and each communication group corresponding to a communication group identifier; a generation module, configured to generate multiple first messages for multicast; and a communication module, configured to send the first messages through the QPs corresponding to the multiple QPNs included in the target communication group.

[0020] In one possible implementation, the first message includes a second operation identifier, which is used to indicate that the first message is a multicast message.

[0021] In one possible implementation, the first message includes a first PSN, which is a preset value.

[0022] In one possible implementation, the first message includes a communication group identifier field, the first message includes a first communication group identifier, and the first communication group identifier is carried in the communication group identifier field of the first message.

[0023] In one possible implementation, the communication module is further configured to receive a second message sent by the second node through the QP corresponding to the first QPN. The second message includes a third operation identifier and a first communication group identifier. The third operation identifier indicates that the second node requests to join a communication group, and the first communication group identifier indicates that the second node requests to join a target communication group. The multicast module is further configured to determine whether a communication group represented by the first communication group identifier, i.e., the target communication group, is maintained. The multicast module is further configured to add the first QPN to the target communication group when it is determined that the target communication group is present in at least one of the maintained communication groups, or to create a target communication group identified by the first communication group identifier and add the first QPN to the target communication group when it is determined that the target communication group is not present in at least one of the maintained communication groups.

[0024] In one possible implementation, the target communication group includes a second QPN among the multiple QPNs. After sending the first message according to the QP corresponding to the multiple QPNs included in the target communication group, the communication module is further configured to receive a third message sent by the third node through the QP corresponding to the second QPN. The third message includes a fourth operation identifier, a first communication group identifier, and a second QPN. The fourth identifier is used to indicate that the third message is an acknowledgment message. The multicast module is further configured to determine that the third node has received the first message according to the fourth operator. The second QPN is deleted from the target communication group represented by the first communication group identifier according to the third message.

[0025] In one possible implementation, the target communication group further includes address information, which indicates the address of the multicast data to be multicast; the generation module is specifically used to: obtain the address information, obtain the multicast data based on the address information, and then generate a first message based on the multicast data.

[0026] Thirdly, this application provides a communication device including a processor and a memory, wherein the processor is configured to execute instructions stored in the memory to cause the communication device to implement the operation steps of the method described in the first aspect and any possible implementation thereof.

[0027] Fourthly, this application provides a computing device, which includes a central processing unit and the communication device described in the third aspect above.

[0028] Fifthly, this application provides a computer-readable storage medium storing computer program instructions that, when executed by a device, implement the operational steps of the method described in the first aspect or any possible implementation thereof.

[0029] Sixthly, this application provides a computer program product comprising a computer program that, when executed by a device, implements the operational steps of the method as described in the first aspect or any possible implementation thereof.

[0030] In a seventh aspect, this application provides a chip system including a processor and a power supply circuit, the power supply circuit being used to supply power to the processor, and the processor being used to execute the operation steps corresponding to the method described in the first aspect or any possible implementation of the first aspect.

[0031] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0032] Figure 1 is a schematic diagram of a cluster provided in this application;

[0033] Figure 2 is a flowchart illustrating a multicast method provided in this application;

[0034] Figure 3 is a schematic diagram of a basic transmission header provided in this application;

[0035] Figure 4 is a schematic diagram of a multicast process provided in this application;

[0036] Figure 5 is a schematic diagram of a process for establishing a communication group provided in this application;

[0037] Figure 6 is a schematic diagram of creating a communication group according to this application;

[0038] Figure 7 is a schematic diagram of deleting a communication group according to this application;

[0039] Figure 8 is a schematic diagram of a multicast device provided in this application;

[0040] Figure 9 is a schematic diagram of a computing device provided in this application. Detailed Implementation

[0041] The multicast method provided in this application is described below with reference to the accompanying drawings.

[0042] Remote direct memory access (RDMA) technology is becoming the mainstream transport protocol for data center networks. RDMA achieves zero-copy, kernel-bypass data transmission by offloading protocol stack processing in hardware, providing low latency, high throughput, and low central processing unit (CPU) overhead, perfectly meeting the demands of computing and storage-intensive / storage-intensive applications in data center networks. However, in current network environments using general-purpose switches, RDMA only supports point-to-point unicast communication. For a source node to implement multicast functionality, it needs to send data to multiple destination nodes via multiple unicasts. This requires the source node's CPU to issue multiple unicast tasks to the network interface card (NIC), i.e., multiple work queue elements (WQEs), to complete the multicast task. This increases the CPU overhead on the source node side. Furthermore, the large number of transactions the CPU needs to handle also affects the completion time of different multicast tasks, resulting in significant differences in completion times.

[0043] This application provides a multicast method where nodes maintain at least one communication group in their storage space. Each communication group corresponds to a communication group identifier (ID), and each communication group includes multiple queue pair numbers (QPNs). When multicast is needed, a multicast request is sent to the node to trigger the multicast task. This multicast request includes a communication group identifier. After receiving the multicast request, the node determines the target communication group from the at least one communication group based on the communication group identifier, generates a multicast message, and sends the message through multiple queue pairs (QPs) corresponding to the multiple QPNs included in the target communication group to complete the multicast task. Each QP connects to one node, and the node connected to each QP is the destination node of the multicast task. Using this method, when implementing multicast via RDMA, only one multicast request needs to be sent to the node implementing the multicast to complete the multicast task, eliminating the need for multiple WQEs on the CPU side and reducing CPU overhead.

[0044] The multicast method provided in this application is applicable to cluster systems of distributed computing or distributed storage. Referring to Figure 1, which is a schematic diagram of a cluster provided in this application, the cluster includes multiple nodes connected through a communication network. Each node in the cluster can act as both a multicast source and a multicast destination. These nodes can be computing devices such as servers or computers. Each node includes a CPU and a communication unit, which can be a data processing unit (DPU), a network interface card (NIC), or other hardware devices with communication and data processing capabilities; this application does not specifically limit its capabilities. It should be noted that the communication group can be stored in the memory of the node or in the memory of the communication unit, such as the memory of the DPU; this application does not specifically limit its capabilities.

[0045] The multicast method provided in this application is described below, as shown in Figure 2. Figure 2 is a flowchart of a multicast method provided in this application, which includes steps S201 to S203.

[0046] S201. The first node obtains a multicast request, which includes a first operation identifier and a first communication group identifier. The first operation identifier is used to instruct the first node to perform multicast.

[0047] In this application, the multicast request may be sent by another node in the cluster to the first node to trigger the first node to perform multicast. The node that sends the multicast request may be the destination node for the first node to perform multicast, or it may not be the destination node for the first node to perform multicast. The multicast request may also be generated by an application or process in the first node, and this application does not impose any specific restrictions on this.

[0048] The first operation identifier is used to instruct the first node to perform multicast, and the first communication group identifier is used to instruct the destination node of the multicast, so that the first node performs multicast according to the first communication group identifier after encapsulating the message to be multicast.

[0049] S202. The first node determines the target communication group based on the first communication group identifier, which includes multiple QPNs.

[0050] In this application, the first node maintains one or more communication groups, each corresponding to a communication group identifier. After receiving a multicast request, the first node determines, based on a first operation identifier, that the request is for the first node to perform multicast. The first node then determines, based on the first communication group identifier in the multicast request, the communication group represented by the first communication group identifier from the maintained one or more communication groups; this is the target communication group. The target communication group includes multiple QPNs. These multiple QPNs can be QPNs of QPs in the first node, or QPNs of QPs in the destination node of the multicast.

[0051] It should be understood that if the QPN included in the target communication group is the QPN of a QP in the first node, then the first node sends messages through the QP corresponding to the QPN included in the target communication group when performing multicast. If the QPN included in the target communication group is the QPN of a QP in the destination node of the multicast, then the first node needs to determine multiple target QPNs connected to these multiple QPNs in the first node based on the multiple QPNs included in the target communication group and the queue pair context (QPC) when performing multicast, and then send messages through these multiple target QPNs. In this application, the example is taken as the QPN included in the target communication group being the QPN of a QP in the first node.

[0052] S203. The first node generates a first message and sends the first message according to the QP corresponding to the multiple QPNs included in the target communication group.

[0053] After determining that multicast is to be performed, the first node generates multiple first messages and sends these messages through the QPs corresponding to the multiple QPNs included in the target communication group. Each QPN corresponds to one QP, and each QP sends one first message. It should be understood that each first message includes a destination QPN, and the destination QP refers to the QPN corresponding to the QP in the destination node used to receive the first message. If the QPNs in the target communication group are the first node's QPNs, the first node iterates through the multiple QPNs in the target communication group, determines the multiple target QPNs connected to these QPNs based on the multiple QPNs and QPCs included in the target communication group, and generates multiple first messages based on these target QPCs. When the first node iterates through the multiple QPNs in the target communication group, it uses a doorbell mechanism to ring a doorbell for each QPN's corresponding QP to wake up a new thread to handle the multicast task. For example, if the first node implements the above multicast through the DPU, the DPU uses the doorbell mechanism to knock a doorbell on the QP corresponding to each QPN to wake up a new DPU thread to handle the multicast task.

[0054] It should be noted that the multiple QPNs included in the target communication group are QPs established when nodes interact with each other via non-multicast RDMA. In other words, the QP used by the first node for multicast is the QP used for non-multicast RDMA communication between nodes, and is not a QP created by the node for multicast.

[0055] In one possible implementation, the first message further includes a second operation identifier, which is used to indicate that the first message is a message multicast by the first node.

[0056] In one possible implementation, the first message also includes a first packet sequence number (PSN), the value of which is a first preset value. Optionally, the first PSN is carried in the PSN field of the message header, for example, in the PSN field of the basic transport header (BTH) of the message. In this application, the PSN in the multicast message is a preset value. Since nodes reuse the QP (Queries Per Node) for RDMA communication when performing multicast, and since nodes also perform RDMA communication, to avoid conflicts with the PSN in messages of non-multicast RDMA communication, the PSN of the multicast message is set to a preset value, for example, the PSN value in the multicast message is set to all 1s (0xffff).

[0057] In one possible implementation, the first message includes a communication group ID field, and the first message includes the aforementioned first communication group identifier, which is carried in the communication group ID field.

[0058] As described above, the first message includes any one or more of the second operation identifier, the first PSN, or the first communication group identifier, and the first message also includes the destination QPN. The second operation identifier, the first PSN, the first communication group identifier, and the destination QPN can all be carried in fields included in the message header, such as in fields included in the base transport header (BTH). For example, see Figure 3, which is a schematic diagram of a base transport header provided in this application. The BTH includes 16 bytes, where bits 0-3 are part of the opcode field. For example, bits 24-31 in the figure are the opcode field. The opcode field can be used to carry the second operation identifier; for example, the second operation identifier can be 00011000, or it can be other values. This application does not specifically limit this.

[0059] A portion of the bits in bytes 4-7 of the BTH are the destination QP field, specifically bits 0-23 of bytes 4-7 in the diagram. This destination QP field can be used to carry the destination QP. A portion of the bits in bytes 8-11 of the BTH are the PSN field, specifically bits 0-23 of bytes 8-11 in the diagram. This PSN field can be used to carry the first PSN. A portion of the bits in bytes 12-15 of the BTH are the communication group ID field, specifically bits 0-23 of bytes 12-15 in the diagram. This communication group ID field can be used to carry the first communication group identifier.

[0060] In one possible implementation, each communication group maintained by the first node also includes address information. When the first node determines the target communication group based on the first communication group identifier, it obtains the address information from the target communication group, then obtains data from the storage area indicated by the address information, and generates a first message based on the obtained data.

[0061] The following is a specific example illustrating the multicast process performed by nodes in this application. Referring to Figure 4, which is a schematic diagram of a multicast process provided in this application, Figure 4 includes a multicast trigger node, a multicast source node, and multiple multicast destination nodes. Taking the communication unit (DPU) of the aforementioned nodes as an example, the CPU of the multicast trigger node sends a trigger request to the DPU. This trigger request includes a first operation identifier and a communication group identifier, for example, x. After receiving the trigger request, the DPU of the multicast trigger node generates a trigger message based on the first operation identifier and the communication group identifier x, and sends the trigger message to the multicast source node through the QP0, which has established a connection with the multicast source node. The trigger message includes the first operation identifier and the communication group identifier from the trigger request. After receiving the trigger message through QP0 connected to the multicast trigger node, the DPU of the multicast source node parses the trigger message and determines that the message is a multicast trigger message based on the first operation identifier in the trigger message. Then, the DPU of the multicast source node obtains the communication group identifier x from the trigger message, searches for the communication group with identifier x from one or more communication groups maintained by the multicast source node, and obtains the QPNs included in the communication group. As shown in Figure 4, the communication group includes three QPNs, namely QP2, QP3 and QP4.

[0062] After acquiring the QPN in the communication group, the DPU determines the QPN of the three QP connections based on the QPC, which is the destination QPN for the multicast. As shown in Figure 4, QP2 is connected to QP5 of a node, QP3 is connected to QP6 of a node, and QP4 is connected to QP7 of a node. Therefore, the destination QPNs are the QPNs of QP5, QP6, and QP7, respectively. Then, the DPU generates three multicast messages (equivalent to the first message mentioned above) based on the destination QPNs, with a different destination QPN in each multicast message. Figure 4 shows an example of the BTH header of the multicast message sent to QP5, where the Opcode field value is the second operation identifier, used to indicate that the message is a multicast message. As shown in Figure 4, the second operation identifier is 'a', the destination QP field value is the QPN of QP5, the PSN field value is 0xffff, and the communication group identifier is 'x'. Finally, the DPU of the multicast source sends the corresponding multicast messages through QP2, QP3, and QP4, respectively.

[0063] In this application, before performing multicast, the first node needs to establish one or more communication groups. The process of establishing a communication group by the first node is described below. See Figure 5, which is a schematic diagram of a communication group establishment process provided in this application.

[0064] S501. The second node sends a second message to the first node. The second message includes a third operation identifier and a communication group identifier.

[0065] When a second node needs to join a communication group of a first node to receive multicast messages from the first node to that communication group, the second node sends a second message to the first node. This second message includes a third operation identifier and a communication group identifier. The third operation identifier indicates that the second message is an application to join a communication group, meaning the second node is requesting to join a communication group from the first node. The communication group identifier in the second message indicates the communication group the second node is requesting to join. For example, if the communication group identifier in the second message is the first communication group identifier, it means the second node is requesting to join the aforementioned target communication group. It should be understood that the communication group identifier carried in the second message can also be other communication group identifiers. The communication group identifier carried in the second message may or may not already exist in the first node; this application does not impose any limitations on this. The connection between the second node and the first node is established through a QP (Queries Pointer). When the second node sends a second message to the first node, it sends the message through a QP of the second node to a QP of the first node.

[0066] S502. The first node receives the second message through the QP corresponding to the first QPN, and determines whether there is a communication group represented by the communication group identifier in the first node. If there is a communication group represented by the communication group identifier in the first node, execute S503. If there is no communication group represented by the communication group identifier in the first node, execute S504.

[0067] After receiving the second message through the QP corresponding to the first QPN, the first node parses the second message and determines that it is a message used to request joining a communication group based on the third operation identifier carried in the second message. Then, the first node obtains the communication group identifier from the second message, for example, if the second message carries the first communication group identifier. It then queries whether the communication group represented by the first communication group identifier, i.e., the aforementioned target communication group, exists among one or more communication groups currently maintained by the first node. If the target communication group already exists in the first node, the first node executes S503; if the target communication group does not exist in the first node, the first node executes S504.

[0068] S503. The first node adds the first QPN to the communication group represented by the communication group identifier carried in the second message.

[0069] If the first node determines that it already has a communication group represented by the communication group identifier carried in the second message, it adds the first QPN to that communication group. For example, if the second message carries a first communication group identifier, the first QPN is added to the aforementioned target communication group. It should be understood that if the second message carries a destination QPN, the first node can determine to add the first QPN to the target communication group based on the destination QPN in the second message. The first node can also determine that the QP received in the second message corresponds to the first QPN, and then add the first QPN to the target communication group.

[0070] S504. The first node creates a new communication group and adds the first QPN to the new communication group, wherein the communication group identifier of the new communication group is the communication group identifier carried in the second message.

[0071] If the first node determines that there is currently no communication group represented by the communication group identifier carried in the second message, then the first node creates a new communication group and uses the communication group identifier carried in the second message as the identifier of the new communication group. For example, if the second message carries the identifier of the first communication group, the first node creates a new communication group, and the new communication group is represented by the identifier of the first communication group. Then the first node adds the first QPN to the newly created communication group.

[0072] The following is a specific example illustrating the process of creating a communication group in this application. Refer to Figure 6, which is a schematic diagram of creating a communication group according to this application. Figure 6 includes multicast member nodes and multicast source nodes. Taking the communication unit (DPU) in the above nodes as an example, the CPU of the multicast member node sends a group creation request to the DPU. This request includes a third operation identifier and a communication group identifier, for example, the third operation identifier is b and the communication group identifier is x. After receiving the group creation request, the DPU of the multicast trigger node generates a group creation message (equivalent to the second message mentioned above) based on the third operation identifier and the communication group identifier x, and sends the group creation message to the multicast source node through the QP connected to the multicast source node. The group creation message includes the third communication identifier and the communication group identifier x from the group creation request. As shown in Figure 6, if the QP5 of the multicast member node is connected to the QP2 of the multicast source node, the DPU sends the aforementioned group creation message through QP5. Figure 6 shows an example of the BTH header of the group creation message sent to QP2.

[0073] After receiving the group establishment message through QP2, the DPU of the multicast source node parses the message and determines that it is a message for establishing a communication group based on the third operation identifier in the message. Then, the DPU of the multicast source node obtains the communication group identifier x from the message and searches for the communication group with identifier x in the maintained communication groups. If the communication group with identifier x already exists in the multicast source node, the DPU adds the QPN corresponding to QP2 to that communication group; if the communication group with identifier x does not exist in the multicast source node, the DPU creates a communication group with identifier x and then adds the QPN corresponding to QP2 to that communication group.

[0074] After receiving the group creation message, the multicast source node returns an acknowledgment message to the multicast member node that sent the message, in order to notify the multicast member node that it has received the group creation message.

[0075] In one possible implementation, after the first node multicasts the first message, the destination node that receives the first message sends an acknowledgment of receipt to the first node. For example, if a third node is among the destination nodes, after receiving the first message, the third node sends a third message to the first node. This third message includes a fourth operation identifier, a first communication group identifier, and a second QPN. The second QPN is the QPN corresponding to the destination QP of the third message, which is the QPN corresponding to the QP to which the first node receives the third message. The first communication group identifier indicates the communication group to which the third node belongs, and the fourth operation identifier indicates that the message is an acknowledgment message, signifying that the third node has received the first message. After receiving the third message through the QP corresponding to the second QPN, the first node parses the message and, based on the fourth operation identifier, confirms that the third message is an acknowledgment message indicating that a destination node (i.e., the third node) in the multicast has received the first message. Then, the first node finds the communication group corresponding to the first communication group identifier, i.e., the aforementioned target communication group, and determines to remove the second QPN from the target communication group based on the second QPN carried in the message.

[0076] The following is a specific example illustrating the process of deleting a communication group in this application. Refer to Figure 7, which is a schematic diagram of deleting a communication group provided in this application. Figure 7 includes a multicast destination node and a multicast source node. Taking the communication unit (DPU) in the above-mentioned nodes as an example, after receiving a multicast message, for example, if the multicast destination node is the node containing QP6 in Figure 5, the DPU generates an acknowledgment message (equivalent to the third message mentioned above) based on the fourth operation identifier and the communication group identifier x. The DPU then sends the acknowledgment message to the multicast source node through QP6, which has established a connection with the multicast source node. The acknowledgment message includes the fourth communication identifier and the communication group identifier x from the multicast message. The fourth communication identifier can be c. The destination QPN in the acknowledgment message is the QPN that has established a connection with the QP that received the multicast message, i.e., the QPN corresponding to QP3 of the multicast source node in Figure 5. As shown in Figure 7, if the QP6 of the multicast destination node is connected to the QP3 of the multicast source node, the DPU sends the aforementioned acknowledgment message through QP6.

[0077] After receiving the acknowledgment message via QP3, the DPU of the multicast source node parses the message. Based on the fourth operation identifier in the acknowledgment message, it determines that the message confirms receipt of the multicast message. Then, the DPU retrieves the communication group identifier 'x' from the acknowledgment message, searches for the communication group with identifier 'x' in the maintained communication groups, and deletes the QPN corresponding to QP3 from that communication group, based on the destination QPN in the acknowledgment message. Each multicast destination node corresponding to this communication group returns an acknowledgment message after receiving the multicast message. The DPU deletes the corresponding QPN based on the received acknowledgment messages. Once the DPU confirms that all QPNs in the communication group have been deleted, it deletes the entire communication group.

[0078] It should be noted that the first node described above in this application can also perform the various operations performed by the second and third nodes. For example, when the first node acts as the destination node for multicast and needs to join a communication group of another node, it may do so through the operations performed by the second node. Similarly, when the first node acts as the destination node for multicast and receives a multicast message, it can also perform the operations performed by the third node, generating an acknowledgment message and returning it to the node that sent the multicast message. The first node completes the method described in Figures 1-7 through a communication unit.

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

[0080] The above-described multicast method provided in this application is illustrated in the accompanying drawings. The multicast device, communication equipment, and computing device provided in this application are described below with reference to the accompanying drawings. Referring to Figure 8, which is a schematic diagram of a multicast device 800 provided in this application, the multicast device 800 includes an acquisition module 810, a multicast module 820, a generation module 830, and a communication module 840. The acquisition module 810 is used to acquire a multicast request, which includes a first operation identifier and a first communication group identifier. The first operation identifier is used to instruct a first node to perform multicast. The multicast module 820 is used to determine the need for multicast based on the first operation identifier and to determine the target communication group based on the first communication group identifier. The multicast device maintains at least one communication group, and each communication group includes multiple QPNs, with each communication group corresponding to a communication group identifier. The generation module 830 is used to generate multiple first messages for multicast. The communication module 840 includes multiple QPs and is used to send the first messages through the QPs corresponding to the multiple QPNs included in the target communication group.

[0081] In one possible implementation, the communication module 840 is further configured to receive a second message sent by the second node via the QP corresponding to the first QPN. The second message includes a third operation identifier and a first communication group identifier. The third operation identifier indicates that the second node is requesting to join a communication group, and the first communication group identifier indicates that the second node is requesting to join a target communication group. The multicast module 820 is further configured to determine whether a communication group represented by the first communication group identifier, i.e., the target communication group, is maintained. The multicast module 820 is further configured to add the first QPN to the target communication group when it is determined that at least one maintained communication group contains the target communication group; or, when it is determined that at least one maintained communication group does not contain the target communication group, create a target communication group identified by the first communication group identifier and add the first QPN to the target communication group.

[0082] In one possible implementation, the target communication group includes a second QPN among the multiple QPNs. After sending the first message according to the QP corresponding to the multiple QPNs included in the target communication group, the communication module 840 is further configured to receive a third message sent by the third node through the QP corresponding to the second QPN. The third message includes a fourth operation identifier, a first communication group identifier, and a second QPN. The fourth identifier is used to indicate that the third message is an acknowledgment message. The multicast module 820 is further configured to determine that the third node has received the first message according to the fourth operator. The second QPN is deleted from the target communication group represented by the first communication group identifier according to the third message.

[0083] In one possible implementation, the target communication group further includes address information, which indicates the address of the multicast data to be multicast; the generation module is specifically used to: obtain the address information, obtain the multicast data based on the address information, and then generate a first message based on the multicast data.

[0084] Specifically, the multicast device 800 includes an acquisition module 810, a multicast module 820, a generation module 830, and a communication module 840. The methods for implementing their respective functions can be referred to in the method embodiments corresponding to Figures 1-7 above. The operation of the first node implementing each function will not be repeated here.

[0085] This application provides a communication device, which may be a data processing unit (DPU), a network interface card (NIC), or other hardware device with communication and data processing capabilities; this application does not specifically limit this. The communication device includes a processor and a memory. The processor includes the aforementioned acquisition module 810, multicast module 820, generation module 830, and communication module 840. The memory stores instructions, and the processor executes the instructions stored in the memory. Through the aforementioned modules, the operations implemented by the first computing node in the method embodiments corresponding to Figures 1-7 are achieved.

[0086] This application also provides a computing device, as shown in FIG9, which is a schematic diagram of a computing device provided in this application. The computing device 900 includes a bus 902, a processor 904, a memory 906, and a communication device 908. The processor 904, the memory 906, and the communication device 908 communicate with each other via the bus 902. The computing device 900 can be a server or a computer, etc. It should be understood that this application does not limit the number of processors, memories, and communication devices in the computing device 900.

[0087] Bus 902 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one line is used in Figure 9, but this does not indicate that there is only one bus or one type of bus. Bus 902 can include pathways for transmitting information and data between various components of computing device 900 (e.g., memory 906, processor 904, communication device 908).

[0088] The processor 904 mentioned above can be a central processing unit (CPU), or it can include a CPU and other hardware chips. The hardware chips can be of various types, such as coprocessor units including graphics processing units (GPUs), tensor processing units (TPUs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or digital signal processors (DSPs). The computing device 900 can include one or more hardware chips of any of the above types, or it can include multiple types of the above hardware chips. This application does not make any specific limitation.

[0089] Memory 906 may include volatile memory, such as random access memory (RAM). Memory 906 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0090] The memory 906 stores executable program code, and the processor 904 executes the executable program code to implement the method implemented by the CPU in the first or second node in the method embodiments corresponding to Figures 1-7 above.

[0091] The communication device 908 is used to communicate with other computing devices. For example, it receives the aforementioned trigger request, receives a third message, and implements the operations performed by the first node in the method embodiments corresponding to Figures 1-7.

[0092] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any available medium. When the computer program product runs on at least one computing device, it causes the computing device to implement the operation implemented in the first node of the method embodiments corresponding to Figures 1-7, or to implement the method implemented by the CPU in the first or second node of the method embodiments corresponding to Figures 1-7.

[0093] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium, or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to implement the operation implemented by the first node in the method embodiments corresponding to Figures 1-7, or to implement the method implemented by the CPU in the first or second node of the method embodiments corresponding to Figures 1-7.

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

Claims

1. A method of multicasting, characterized by, The method includes: The first node obtains a multicast request, the multicast request including a first operation identifier and a first communication group identifier, the first operation identifier being used to instruct the first node to perform multicast; The first node determines that multicast needs to be performed based on the first operation identifier, and determines the target communication group based on the first communication group identifier; wherein, the first node maintains at least one communication group, each of the at least one communication group includes multiple queue pairs numbered QPN, and each communication group corresponds to a communication group identifier; The first node generates a first message and sends the first message to the QP according to the queues corresponding to the multiple QPNs included in the target communication group.

2. The method of claim 1, wherein, The first message includes a second operation identifier, which is used to indicate that the first message is a message multicast by the first node.

3. The method according to claim 1 or 2, characterized in that, The first message includes a first packet sequence number (PSN), and the first PSN is a first preset value.

4. The method according to any one of claims 1 to 3, characterized in that, The first message includes a communication group identifier field, and the first message includes a first communication group identifier, which is carried in the communication group identifier field.

5. The method according to any one of claims 1 to 4, characterized in that, Before the first node obtains the multicast request, the method further includes: The first node receives a second message sent by the second node through the QP corresponding to the first QPN. The second message includes a third operation identifier and a first communication group identifier. The third operation identifier is used to instruct the second node to apply to join a communication group, and the first communication group identifier is used to instruct the second node to apply to join the target communication group. The first node determines whether it maintains the target communication group; The first node determines that the target communication group exists in at least one communication group maintained by the first node, and adds the first QPN to the target communication group, or... The first node determines that the target communication group is not in at least one communication group maintained by the first node, creates the target communication group identified by the first communication group identifier, and adds the first QPN to the target communication group.

6. The method according to any one of claims 1 to 5, characterized in that, The target communication group includes a second QPN among its multiple QPNs. After sending the first message according to the QP corresponding to the multiple QPNs included in the target communication group, the method further includes: The first node receives a third message sent by the third node through the QP corresponding to the second QPN. The third message includes a fourth operation identifier, the first communication group identifier, and the second QPN. The fourth identifier is used to indicate that the third message is an acknowledgment message. The first node determines that the third node has received the first message based on the fourth operator; The first node removes the second QPN from the target communication group indicated by the first communication group identifier according to the third message.

7. The method according to any one of claims 1 to 6, characterized in that, The target communication group also includes address information, which is used to indicate the address of the multicast data that needs to be multicast; The first node generates a first message, including: The first node obtains the address information and then obtains multicast data based on the address information; The first node generates the first message based on the multicast data.

8. A multicast device, characterized by include: The acquisition module is used to acquire a multicast request, wherein the multicast request includes a first operation identifier and a first communication group identifier, and the first operation identifier is used to instruct the first node to perform multicast; The multicast module is used to determine the need for multicast based on the first operation identifier and to determine the target communication group based on the first communication group identifier; wherein, the multicast device maintains at least one communication group, each of the at least one communication group includes multiple queue pairs numbered QPN, and each communication group corresponds to a communication group identifier; The generation module is used to generate multiple first packets for multicast. The communication module is used to send the first message to the QP through the queues corresponding to the multiple QPNs included in the target communication group.

9. The apparatus of claim 8, wherein, The first message includes a second operation identifier, which indicates that the first message is a multicast message.

10. The apparatus of claim 8 or 9, wherein, The first message includes a first packet sequence number (PSN), which is a preset value.

11. The device of any of claims 8-10, wherein, The first message includes a communication group identifier field, and the first message includes a first communication group identifier, which is carried in the communication group identifier field.

12. The device of any one of claims 8-11, wherein, The device also includes a communication module. The communication module is used to receive a second message sent by the second node through the QP corresponding to the first QPN. The second message includes a third operation identifier and a first communication group identifier. The third operation identifier indicates that the second node requests to join a communication group. The first communication group identifier is used to indicate that the second node requests to join the target communication group. The multicast module is also used to determine whether the target communication group is maintained; The multicast module is further configured to, when it is determined that the target communication group is present in at least one communication group being maintained, add the first QPN to the target communication group, or, If it is determined that the target communication group is not present in at least one of the communication groups being maintained, a target communication group is created with the identifier of the first communication group, and the first QPN is added to the target communication group.

13. The device of any one of claims 8-12, wherein, The device further includes a communication module, wherein the target communication group includes a second QPN among the multiple QPNs, and after sending the first message according to the QP corresponding to the multiple QPNs included in the target communication group, The communication module is further configured to receive a third message sent by a third node through the QP corresponding to the second QPN. The third message includes a fourth operation identifier, a first communication group identifier, and the second QPN. The fourth identifier is used to indicate that the third message is an acknowledgment message. The multicast module is further configured to determine, based on the fourth operator, that the third node has received the first message; The multicast module is further configured to delete the second QPN from the target communication group indicated by the first communication group identifier according to the third message.

14. The apparatus of any one of claims 8-13, wherein, The target communication group also includes address information, which is used to indicate the address of the multicast data that needs to be multicast; The generation module is specifically used for: Obtain the address information, and obtain multicast data based on the address information; The first message is generated based on the multicast data.

15. A communication device, characterized by It includes a processor and a memory, the processor being configured to execute instructions stored in the memory to implement the method as claimed in any one of claims 1 to 7.

16. A computing device, comprising: It includes a central processing unit and a communication device, the communication device being used to implement the method as described in any one of claims 1 to 7.

17. A computer readable storage medium characterized by: It includes computer program instructions that, when executed by a computing device, cause the computing device to perform the method as described in any one of claims 1 to 7.