Data communication method, system, electronic device, computer-readable storage medium and computer program product
By establishing a mapping relationship between switch and host resources in the PCIe Switch system, fast port forwarding is achieved, solving the problem of low communication efficiency of PCIe non-transparent bridges and improving the communication efficiency and flexibility of large-scale computing systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LANGCHAO ELECTRONIC INFORMATION IND CO LTD
- Filing Date
- 2025-03-14
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for inter-GPU communication via PCIe non-transparent bridges suffer from cascading depth limitations, resulting in low communication efficiency and increased latency, making it difficult to meet the communication needs of large-scale computing systems.
By mapping the resource information allocated by the switches to their respective connected computing units to the resource information allocated by the host to all computing units within its own system, a routing mapping relationship is established, enabling fast port forwarding between switches and avoiding reliance on upstream port forwarding, thus achieving single-hop or multi-hop point-to-point communication between any computing units.
It improves the efficiency of point-to-point communication, reduces hardware overhead and address translation latency, supports the expansion of computing unit scale, and enhances the communication efficiency and flexibility of large-scale data communication systems.
Smart Images

Figure CN120017619B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a data communication method, system, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] As user data volumes and the demand for high-speed data processing increase, different types of computing units are now used within the same computing system to collaboratively complete tasks. Related technologies utilize PCIe (Peripheral Component Interconnect Express) and NTB (Non-Transparent Bridge) technologies to achieve P2P (Point-to-Point) communication between computing units. This method relies on the complex logic of the NTB controller in the PCIe switch to map the address space of remote nodes to the local address space via the NTB to open point-to-point access paths. This cross-domain address mapping and interrupt mechanism introduce additional latency and hardware overhead, resulting in relatively low communication efficiency. Summary of the Invention
[0003] This invention provides a data communication method, system, electronic device, computer-readable storage medium, and computer program product that not only eliminates the need for additional latency and hardware overhead but also effectively improves point-to-point communication efficiency.
[0004] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0005] This invention provides a data communication method applied to a data communication system comprising at least two computing nodes, wherein at least two computing nodes include at least one set of computing units, and the same set of computing units is connected to the same switch, comprising:
[0006] When the source computing unit receives an access request to the target computing unit, it determines the resource allocation information of the target switch to which the target computing unit belongs based on the routing mapping relationship and the target resource allocation information of the target computing unit carried in the access request; the source computing unit and the target computing unit belong to different computing nodes; based on the resource allocation information and the switch routing information of the source switch corresponding to the source computing unit, it determines the intermediate forwarding port, and forwards the access request to the target communication port of the target switch through the intermediate forwarding port;
[0007] The access request is forwarded again to the target computing unit using the target communication port and the target resource allocation information.
[0008] The routing mapping relationship is the correspondence between host resource allocation information and switch resource allocation information of the same computing unit. The host resource allocation information is the resource information allocated by the host to the computing unit, the switch resource allocation information is the resource information allocated by the switch to the computing unit, and the switch routing information includes the port information corresponding to the data communication path between different switches.
[0009] The present invention also provides an electronic device, including a memory and a processor, wherein the processor is used to implement the steps of any of the above-described data communication methods when executing a computer program stored in the memory.
[0010] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described data communication methods.
[0011] The present invention also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the above-described data communication methods.
[0012] Finally, the present invention also provides a data communication system, including a host having a first computing node, a second computing node and a routing controller, wherein the host stores host resource allocation information;
[0013] The first computing node includes at least a first switch and a second switch; the first switch connects at least a first computing unit and a second computing unit, and the second switch connects at least a third computing unit and a fourth computing unit; both the first and second switches store their respective switch resource allocation information and switch routing information.
[0014] The second computing node includes at least a third switch and a fourth switch; the third switch connects at least a fifth computing unit and a sixth computing unit, and the fourth switch connects at least a seventh computing unit and an eighth computing unit; both the third and fourth switches store their respective switch resource allocation information and switch routing information.
[0015] The routing controller is used to implement any of the above data communication methods when executing a computer program, either when the first computing node accesses each computing unit or when the computing units access each other.
[0016] The advantages of the technical solution provided by this invention lie in mapping the resource information allocated by the switches to their respective connected computing units to the resource information allocated by the host to all the computing units within it. This address mapping allows for rapid location of the information of the switch to which the desired computing unit is connected. Routing information exists between the switches, enabling fast port forwarding between computing units connected to different switches. This allows point-to-point communication between any computing units via single or multi-hop routing, eliminating the need for upstream port forwarding and avoiding additional hardware overhead and address translation latency, thus effectively improving point-to-point communication efficiency. Furthermore, increasing the number of switches not only increases the scale of computing units in computing nodes but also expands the number of computing nodes contained in the host. Even with an expanded data communication system, efficient routing path determination between any computing units can still be achieved, thereby improving point-to-point communication in large-scale data communication systems. This provides a more efficient, lower-latency, flexible, and scalable routing deployment and management method for multi-card PCIe Switch system topologies, improving the overall system communication efficiency and, to some extent, addressing the bandwidth limitations of parallel communication requirements between computing units and the host. Furthermore, the present invention also provides corresponding implementation systems, electronic devices, computer-readable storage media, and computer program products for data communication methods, further making the methods more practical, and the systems, electronic devices, computer-readable storage media, and computer program products have corresponding advantages. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the present invention or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of data communication methods in related technologies;
[0019] Figure 2 This invention provides a schematic diagram of the system framework in an exemplary application scenario.
[0020] Figure 3 A flowchart illustrating a data communication method provided by the present invention;
[0021] Figure 4 This invention provides a data access diagram illustrating an exemplary application scenario.
[0022] Figure 5This is a data access diagram illustrating another exemplary application scenario provided by the present invention;
[0023] Figure 6 This is a data access diagram illustrating another exemplary application scenario provided by the present invention;
[0024] Figure 7 This is a structural framework diagram of an exemplary embodiment of the data communication device provided by the present invention;
[0025] Figure 8 This is a structural framework diagram of an exemplary embodiment of the data communication system provided by the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. In this specification and the aforementioned drawings, the terms "first," "second," "third," "fourth," etc., are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. The term "exemplary" means "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as superior to or better than other embodiments.
[0027] As user data volumes and the demand for high-speed data processing increase, different types of computing units are now used in the same computing system to complete tasks together. For example, multiple GPUs (Graphics Processing Units) are inserted into a server to work alongside the CPU (Central Processing Unit). In the field of artificial intelligence (AI), traditional AI servers typically only support small-scale (e.g., 8 GPUs) expansions, and memory data exchange between computing nodes is achieved via DMA (Direct Memory Access). To meet the growing training and inference needs of large AI models, AI servers are interconnecting more GPUs, such as through switches, or through scale-up (vertical scaling). This allows the system topology to expand to 16 GPUs or even more nodes, significantly increasing overall computing power, enhancing AI server resources, and thus improving the performance and capacity of the AI server. Point-to-point communication between computing units can be achieved through Ethernet and RDMA (Remote Direct Memory Access). RDMA technology allows data to be directly transferred between the memory of different computing nodes without going through the traditional network protocol stack. However, relying on Ethernet to build a multi-card point-to-point interconnection topology inevitably introduces additional switch nodes, which leads to additional time overhead in terms of performance, and also has certain limitations in terms of congestion control, space, cost, and scalability.
[0028] As the number of computing units increases, the demand for low-cost and low-latency point-to-point communication between them grows. Related technologies utilize PCIe switches to expand computing units, such as GPUs, for data exchange. PCIe switches provide a more direct data transmission path, eliminating the need for complex network protocols or multi-layered network devices, thus reducing latency overhead and potential congestion and bandwidth bottlenecks under high load. To meet the frequent data exchange between computing units, they also offer good communication efficiency. Building upon this, related technologies use NTB (Network Modules) in PCIe interconnect systems to achieve multi-host communication. Figure 1As shown, the system includes two hosts: a local host (HOST0) and a remote host (HOST1). Each host is connected to a PCIe switch and integrates GPU heterogeneous communication software. Each host has a GPU (local GPU and remote GPU), which interact with the host via DSP (Digital Signal Processing). The two PCIe switches, PCIe Switch0 and PCIe Switch1, are connected via a crosslink. The PCIe switch ports are configured in NTB mode, and the local and remote GPUs communicate with each other through NTB. The hosts are interconnected via the PCIe crosslink, using NTB for cross-host memory access, and then using DMA within the PCIe switch for data transfer. The base address register space of the remote GPU is opened in the local NTB. The local GPU initiates access to the base address register space of the remote GPU through DMA. In other words, by mapping the address space of the remote node to the local address space through the NTB, the access path between the two GPUs is opened, thereby realizing P2P transmission.
[0029] However, this method is implemented through a Virtual Switch, where the address domains at both ends are completely isolated, thus requiring complex logic from the NTB controller. Furthermore, cross-host communication topologies require the NTB ports of the two switches to be interconnected. Cross-domain address mapping and interrupt mechanisms introduce additional latency and hardware overhead. The NTB control logic has a cascading depth limit, increasing with the number of PCIe Switch levels in the inter-GPU communication link, leading to correspondingly higher latency overhead. Typically, only two levels of switch links are supported; multiple levels of switches significantly reduce communication efficiency, thus limiting system scalability.
[0030] In view of this, in order to solve the problem of cascading depth limitation in realizing inter-GPU communication through PCIe non-transparent bridges, this invention maps the resource information allocated by the switches to the computing units they connect to with the resource information allocated by the host to all computing units within its own system. Furthermore, there is routing information between the switches that enables communication. Through port forwarding, P2P communication can be realized between any computing nodes in the PCIe Switch interconnect system via single-hop or multi-hop communication without the need for upstream forwarding. This provides good flexibility and scalability and improves the communication efficiency of the entire system.
[0031] Based on the technical solution of the present invention described above, and considering the specific application environment architecture or specific hardware architecture upon which the execution of the data communication method depends, the specific application environment architecture or specific hardware architecture is described here:
[0032] One application scenario of the embodiments of the present invention is as follows: Figure 2 As shown, in this application scenario, the server acts as the host, with two CPUs, CPU0 and CPU1. Each CPU can act as a supernode. Each CPU includes four root nodes, such as RC (root complex) 0, RC1, RC2, and RC3. Each switch is connected to its corresponding RC. The entire system includes eight switches: Switch01, Switch02, Switch03, Switch04, Switch05, Switch06, Switch07, and Switch08. Switches on the same CPU are connected, and switches on different CPUs are connected to each other in symmetrical positions, thus forming a fully interconnected data communication system with 32 GPUs. Each switch connects to multiple GPUs and locally stores the resource information allocated to the connected GPUs (i.e., switch resource allocation information) and communication routing information for data communication with other switches (i.e., switch routing information). The server internally stores the resource allocation information for all its internal GPUs, also known as host resource allocation information. CPU0 and CPU1 can share this host resource allocation information. To enable point-to-point communication, a mapping relationship is established between the switch resource allocation information and the host resource allocation information, also known as a routing mapping relationship.
[0033] Based on the aforementioned data communication system, when CPU0 and CPU1 access any GPU within the host, they send a request carrying the host address and host bus number allocated to that GPU. According to the host address, host bus number, and routing mapping, the host resource allocation information is mapped to the switch resource allocation information corresponding to that GPU. Then, based on this switch resource allocation information, the GPU can be accessed. For access between GPUs on different switches within the same CPU, the process is as follows: The source GPU sends an access request carrying at least the switch address and bus information of the GPU to be accessed. Based on this information and the routing mapping, the identifier of the target switch to which the GPU belongs is determined. Based on the switch routing information of the source switch to which the source computing unit belongs, the communication port for communication between the source switch and the target switch is determined. The access request is then forwarded to the target switch through this communication port. The target switch then forwards the access request to the GPU to be accessed based on the switch address of the GPU to be accessed. The access process between GPUs located on different CPUs can be as follows: The source GPU sends an access request carrying at least the switch address and bus information of the GPU to be accessed. Based on this information and the routing mapping relationship, the identification information of the target switch connected to the GPU to be accessed is determined. Based on the switch routing information of the source switch to which the source GPU belongs, the first communication port for communicating with the target switch is determined. The first communication port is the port of an intermediate switch connected to the source switch. The intermediate switch and the source switch belong to the same CPU, and the intermediate switch is connected to the target switch. The access request is forwarded to the intermediate switch through the first communication port. Based on the switch routing information of the intermediate switch, the second communication port for communicating with the target switch is determined. The access request is forwarded to the target switch through the second communication port. The second target switch forwards the access request to the GPU to be accessed through the switch address of the GPU to be accessed. Thus, point-to-point communication with the shortest path is achieved through a three-level access method.
[0034] It should be noted that the above application scenarios are only shown to facilitate understanding of the ideas and principles of the present invention, and the embodiments of the present invention are not limited in any way. On the contrary, the embodiments of the present invention can be applied to any applicable scenario. After introducing the technical solution of the present invention, various non-limiting embodiments of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0035] Please see first. Figure 3 , Figure 3This is a flowchart illustrating a data communication method provided in this embodiment. The data communication method is applied to a data communication system. The data communication system in this embodiment includes at least one host, on which multiple computing nodes are deployed. Each computing node connects to multiple computing units through at least one switch. That is, each computing unit is deployed on the host. Computing units in the same group are connected to the same switch, while computing units in different groups are connected to different switches. The switches can be connected via actual physical links or communicate through predefined ports, as long as data communication between the switches is possible. This embodiment may include the following:
[0036] S101: When the source computing unit receives an access request to the target computing unit, it determines the resource allocation information of the target switch to which the target computing unit belongs based on the routing mapping relationship and the target resource allocation information of the target computing unit carried in the access request.
[0037] In this embodiment, the source computing unit is the computing unit that issues the access request, and the target computing unit is the computing unit to which the access request is to be received, that is, the computing unit that needs to be accessed. The source computing unit and the target computing unit belong to different computing nodes. In other words, the access request in this embodiment refers to a computing unit of a computing node in the data communication system accessing a computing unit of another computing node. The switches to which these two computing units belong are located on different computing nodes. The routing mapping relationship is the correspondence between host resource allocation information and switch resource allocation information for the same computing unit. Host resource allocation information is the resource information allocated by the host to the computing unit. The resource information may include at least a unique bus number and a unique address. Switch resource allocation information is the resource information allocated by the switch to the computing unit. The resource information may include at least a unique bus number and a unique address. For the same computing unit, the resource information allocated by the host and the resources allocated by the switch are mapped. Regardless of the type of information carried in the access request to identify the computing unit, the address mapping can uniquely and quickly locate the switch connected to the computing unit. For ease of description, the switch connected to the target computing unit is defined as the target switch. Once the switch is determined, the relevant information identifying the target switch can be obtained. For ease of description, this embodiment defines it as resource allocation information.
[0038] S102: Determine the intermediate forwarding port based on the resource allocation information and the switch routing information of the source switch corresponding to the source computing unit. Forward the access request to the target communication port of the target switch through the intermediate forwarding port, and then forward the access request to the target computing unit again through the target communication port and the target resource allocation information.
[0039] In this embodiment, the source switch is the switch connected to the source computing unit. The switch stores switch routing information, which includes communication routing information between different switches. The communication routing information includes at least the identification information of each switch, as well as the port information corresponding to the data communication path between different switches. Each switch in the data communication system not only stores the information allocated to the computing unit it is connected to, but also stores the routing information for its data communication with other switches. In this embodiment, this information is defined as switch routing information. After determining the resource allocation information of the target switch in the previous step, the path to the target switch can be determined by querying the switch routing information. Since this embodiment involves access to computing units of different computing nodes, at least one port for forwarding the access request and one communication port from that port to the target switch can be determined. For ease of description, the port that forwards the access request to the target switch is defined as the intermediate forwarding port. The access request of one computing node is sent to another computing node through the intermediate forwarding port. The port of the target switch that receives the access request is defined as the target communication port. The access request can be sent to the target switch through the target communication port. The target switch can locate the target computing unit through the target resource allocation information of the target computing unit, and thus forward the access request to the target computing unit, thereby realizing access to the target computing unit.
[0040] This invention enables point-to-point communication between any computing units through address mapping and port forwarding. Compared to address mapping technology within the switch and the need for upstream ports for cross-switch communication requests (e.g., at the CPU RC level), this method not only allows P2P communication between computing units within the same switch using the shortest route, but also reduces communication latency for cross-switch communication requests because it does not require upstream port forwarding. Figure 4As shown, the host-based forwarding process is as follows: GPU0 of Switch01 accesses GPU3 of Switch04. GPU0 of Switch01 initiates a communication request containing information about GPU3 of Switch04. It checks whether the identification information of the uplink switch (Switch01) is the same as that of the target switch (Switch04). If they are the same, the routing is completed within the Switch based on the address allocated to the target computing unit in the routing table of Switch01, which contains the address information of all computing units, thus establishing communication. If they are different, the switch address of the data packet is mapped to the host switch address, routed to the uplink port RC1 of the Switch, and reported to the host. The host locates the target Switch and forwards the request, then forwards it to the target computing unit according to the routing table information within the target Switch. Forwarding through the upstream port greatly increases data transmission overhead and reduces communication efficiency and the overall system's computing efficiency.
[0041] In the technical solution provided in this embodiment, the resource information allocated by the switches to the computing units they connect to is mapped to the resource information allocated by the host to all the computing units within it. This address mapping allows for quick location of the information of the switch to which the computing unit to be accessed is connected. Routing information exists between the switches, enabling communication. Computing units connected to different switches can achieve fast port forwarding through the switch routing information, thus enabling point-to-point communication between any computing units via single or multi-hop connections. This eliminates the need for upstream port forwarding and avoids additional hardware overhead and address translation latency, effectively improving point-to-point communication efficiency. Furthermore, increasing the number of switches not only increases the scale of computing units in the computing nodes but also expands the number of computing nodes contained in the host. Even with an expanded data communication system, efficient routing path determination between any computing units can still be achieved, thereby improving point-to-point communication in large-scale data communication systems. This provides a more efficient, lower-latency, flexible, and scalable routing deployment and management method for expanding multi-card PCIeSwitch system topologies, thereby improving the overall system communication efficiency and, to some extent, solving the bandwidth limitation problem of parallel communication requirements between computing units and the host.
[0042] It should be noted that there is no strict order of execution between the steps in this invention. As long as they conform to the logical order, these steps can be executed simultaneously or in a certain preset order. Figure 3 This is just an illustrative example and does not mean that this is the only possible execution order.
[0043] In the above embodiments, no limitation is made on how to generate switch resource allocation information. Based on the above embodiments, the present invention also provides an exemplary method for generating switch resource allocation information, which may include the following:
[0044] A switch resource allocation table can be pre-built. This table includes at least switch identification information, bus identification information of computing units, and switch addresses of the computing units. Each switch shares this table. Each switch enumerates all connected computing units, assigning an identification information to each unit during enumeration, thus obtaining the switch bus identification information for each unit. It also assigns an address to each computing unit, thus obtaining the switch address for each unit. For ease of communication, each switch has unique switch identification information. By filling the switch identification information, the bus identification information of each computing unit, and the switch address into the corresponding positions in the switch resource allocation table, switch resource allocation information can be generated. In other words, the correctly filled switch resource allocation table is the switch resource allocation information and stored locally.
[0045] To make the process clearer to those skilled in the art, this embodiment also uses an example comprising four switches: Switch01, Switch02, Switch03, and Switch04, each switch including four computing units, namely GPU00, GPU01, GPU02, and GPU03. The computing unit is a GPU, the switch identification information is GPU Switch ID, the computing unit identification information is GPUBUS, and the computing unit switch address is GPU Address. This example illustrates the process of generating switch resource allocation information. The switch resource allocation information can be represented as GPU Switch Info: Before startup, the host establishes an address field number, i.e., GPU Switch ID, for all PCIe Switch numbers within it. Each switch enumerates and allocates resources for the downlink GPUs. The BUS number and address of each switch are independent, with the following format:
[0046] Switch01: #GPU Switch Info
[0047] {
[0048] GPU00:{
[0049] "GPU Switch ID" = "0x01";
[0050] "GPU BUS" = "0x01";
[0051] “GPU Address”=“0x1_0000_0000”;
[0052] },
[0053] …
[0054] GPU03:{
[0055] “GPU Switch ID”=“0x01”;
[0056] “GPU BUS”=“0x04”;
[0057] “GPU Address”=“0x4_0000_0000”;
[0058] }
[0059] }
[0060] …
[0061] Switch04:#GPU Switch Info
[0062] {
[0063] GPU00:{
[0064] “GPU Switch ID”=“0x04”;
[0065] “GPU BUS”=“0x01”;
[0066] “GPU Address”=“0x1_0000_0000”;
[0067] },
[0068] …
[0069] GPU03:{
[0070] “GPU Switch ID”=“0x04”;
[0071] “GPU BUS”=“0x04”;
[0072] “GPU Address”=“0x4_0000_0000”;
[0073] }
[0074] }。
[0075] Among them, GPU Switch ID is the number of each interconnected switch in the data communication system, GPU BUS is the BUS (bus) number enumerated by the switch for the GPU, and GPU Address is the address assigned by the switch to the GPU. For ease of description, it is defined as the switch address.
[0076] As can be seen from the above, this embodiment can quickly generate switch resource allocation information by filling in the template. By using the bus number and address as the information allocated by the switch, the switch can quickly and accurately locate the computing unit it is connected to, which is beneficial to improving data communication efficiency.
[0077] In the above embodiments, no limitation is made on how to generate host resource allocation information. Based on the above embodiments, the present invention also provides an exemplary method for generating host resource allocation information, which may include the following:
[0078] The host can pre-build a host resource allocation table, which includes at least the host bus identifier information and host address of each computing unit. During startup, the host enumerates each internal computing unit. When enumerating each unit, it assigns a bus identifier to all its owned computing units; for ease of description, this can be defined as the main bus identifier information, thus obtaining the main bus identifier information for each computing unit. The host also assigns addresses to each computing unit, thus obtaining the address of each computing unit; for ease of description, this can be defined as the host address. Finally, the host bus identifier information and host address of each computing unit are filled into the corresponding positions in the host resource allocation table, generating the host resource allocation information. In other words, the host resource allocation information is a correctly filled host resource allocation table. This correctly filled host resource allocation table is used as the host resource allocation information and stored locally for all CPUs to share.
[0079] To make the process clearer to those skilled in the art, this embodiment further illustrates the generation process of host resource allocation information using an example comprising four switches, each switch including four computing units, with a total of 16 GPUs, namely GPU00, GPU01, GPU02, ..., GPU15, where the computing unit is a GPU, the computing unit bus identification information is GPU HOST BUS, and the host address is GPU HOST Address. The host resource allocation information can be represented as GPU HOST Info: During startup, the HOST can enumerate and allocate resources to all GPU devices through the Basic Input / Output System, with the following format:
[0080] #GPU HOST Info
[0081] {
[0082] GPU00:{
[0083] "GPU HOST BUS" = "0x50";
[0084] "GPU HOST Address" = "0x1_0000_0000";
[0085] },
[0086] GPU01:{
[0087] "GPU HOST BUS" = "0x51";
[0088] "GPU HOST Address" = "0x2_0000_0000";
[0089] },
[0090] …
[0091] GPU15:{
[0092] "GPU HOST BUS" = "0x5F";
[0093] "GPU HOST Address" = "0x10_0000_0000";
[0094] },
[0095] }
[0096] Among them, GPU HOST BUS is the BUS number enumerated by the host for each GPU, and GPU HOST Address is the address assigned by the host to the GPU, which is also the host address.
[0097] After obtaining the GPU Switch Info and GPU HOST Info, the switch can establish a one-to-one correspondence between the host resource information of each GPU and the switch's resource information for route mapping. When a host initiates access to a GPU, it can use the BUS number and host address from the GPU HOST Info. Based on the routing mapping relationship within the switch, this address is translated into the address in the GPU Switch Info, thus enabling access to the GPU. For example:
[0098] HOST-GPU15:{
[0099] "GPU HOST BUS" = "0x5F";
[0100] "GPU HOST Address" = "0xF_0000_0000";
[0101] },
[0102] Mapped to:
[0103] Switch04-GPU03:{
[0104] "GPU Switch ID" = "0x04";
[0105] "GPU BUS" = "0x04";
[0106] "GPU Address" = "0x4_0000_0000";
[0107] }
[0108] As can be seen from the above, this embodiment can quickly generate host resource allocation information by filling in a template. Using the bus number and address as the information allocated to the host, it is easy for the host to quickly and accurately locate the computing unit it is connected to, enabling direct data communication between the host and the connected computing unit. In the above embodiments, no limitations are made on how to generate switch routing information. Based on the above embodiments, the present invention also provides an exemplary method for generating switch routing information, which may include the following:
[0109] The host contains a computing node, which includes multiple switches. Each switch stores switch routing information, which is the actual communication route between the switch and other switches. If the host contains two computing nodes, when each computing node's switch communicates with another switch, it can forward the communication through an intermediate forwarding port. This intermediate forwarding port can be pre-bound to a switch. For ease of description, it is defined as an intermediate switch. That is, forwarding is done through this intermediate switch. In other words, an intermediate switch can be pre-specified for forwarding. The shortest path P2P communication between any computing units is realized through the communication path of the three-level cascaded switches. In this implementation, for any switch, for ease of description, it is defined as the first switch. The first switch and the second switch belong to the same CPU, while the communication routing information of the third switch and the fourth switch belong to another CPU. Then, the switch routing information of the first switch includes the communication routing information of the second switch, the communication routing information of the third switch, and the communication routing information of the fourth switch. Among them, the communication routing information of the second switch includes at least the second switch identification information and the port information for communication between the first switch and the second switch; the communication routing information of the third switch includes at least the third switch identification information and the first intermediate conversion port information; the communication routing information of the fourth switch includes at least the fourth switch identification information and the second intermediate conversion port information; among them, the switch routing information of the first target intermediate switch to which the first intermediate port corresponding to the first intermediate conversion port information belongs includes at least the communication routing information between the third switch and the target intermediate switch; the switch routing information of the second target intermediate switch to which the second intermediate port corresponding to the second intermediate conversion port information belongs includes at least the communication routing information between the fourth switch and the second target intermediate switch.
[0110] To enable those skilled in the art to more clearly understand the technical solution of this invention, this invention uses the switch port as the Fabric (port name) type and establishes switch routing information within each switch of the data communication system. This switch routing information includes all switches except itself. In the scenario of the same computing node, the computing node includes 4 switches. The Switch Routing Info format of the first switch can be as follows:
[0111] Switch01: #Switch Routing Info
[0112] {
[0113] Switch02:{
[0114] "Switch ID" = "0x02";
[0115] "Egress Fabric Port" = "0x02";
[0116] },
[0117] …
[0118] Switch04:{
[0119] "Switch ID" = "0x04";
[0120] "Egress Fabric Port" = "0x04";
[0121] },
[0122] }
[0123] Switch02: #Switch Routing Info
[0124] {
[0125] Switch01:{
[0126] "Switch ID" = "0x01";
[0127] "Egress Fabric Port" = "0x01";
[0128] },
[0129] …
[0130] Switch04:{
[0131] "Switch ID" = "0x04";
[0132] "Egress Fabric Port" = "0x04";
[0133] },
[0134] }
[0135] In a scenario with two compute nodes, each compute node includes four switches, with the middle switch being Switch04. The Switch Routing Info format for the first switch can be as follows:
[0136] Switch01: #Switch Routing Info
[0137] {
[0138] Switch02:{
[0139] “Switch ID”=“0x02”;
[0140] “Egress Fabric Port”=“0x02”;
[0141] },
[0142] Switch03:{
[0143] “Switch ID”=“0x03”;
[0144] “Egress Fabric Port”=“0x03”;
[0145] },
[0146] Switch04:{
[0147] “Switch ID”=“0x04”;
[0148] “Egress Fabric Port”=“0x04”;
[0149] },
[0150] Switch05:{
[0151] “Switch ID”=“0x05”;
[0152] “Egress Fabric Port”=“0x04”;
[0153] },
[0154] Switch06:{
[0155] “Switch ID”=“0x06”;
[0156] “Egress Fabric Port”=“0x04”;
[0157] },
[0158] Switch07:{
[0159] “Switch ID”=“0x07”;
[0160] “Egress Fabric Port”=“0x04”;
[0161] },
[0162] Switch08:{
[0163] “Switch ID”=“0x08”;
[0164] "Egress Fabric Port" = "0x04";
[0165] }
[0166] }
[0167] As can be seen from the above, in scenarios involving multiple computing nodes, this embodiment routes and forwards cross-computing node communication through an intermediate switch. The shortest path P2P communication between any computing unit is achieved through the communication path of the three-level cascaded switches, effectively improving the point-to-point communication efficiency between computing units across computing nodes.
[0168] It is understandable that each switch has a limited number of ports. As the number of computing units included in a data communication system increases, connecting all switches would not only complicate physical link cabling but also place certain demands on the physical space of the data communication system. Therefore, this invention provides various methods for determining switch routing information based on different scenarios, which may include the following:
[0169] For small-scale data communication systems or applications that allow for complex cabling, all switches in the data communication system can be interconnected. That is, switches of different computing units can be connected through a target bus, such as a PCIe bus. In other words, the switches are connected through a real physical link. Obtain the first port and the second port on the physical link between the target switch and the source switch. The first port and the source switch belong to the same computing node. Use the first port as an intermediate forwarding port and the second port as the target communication port. Forward the access request to the second port through the first port.
[0170] For large-scale data communication systems, such as topologies containing 16 or more computing units, there may be more than 4 switches in the system. Since the number of ports on a single switch is limited, physical links cannot achieve full interconnection between switches. Communication ports between each switch can be pre-specified. These communication ports are used to define the routing path when the switch communicates with the target switch, without directly connecting to the target switch. That is, the switches are not connected through a real physical link, i.e., the target bus. For source switches and target switches that are not connected through the target bus, routing paths for communication with other switches in the communication system can be pre-configured for the switches. For the current access request, for ease of description, the routing path between the source switch and the target switch is defined as the target routing path. This target routing path includes at least a first port and a second port. The first port receives the request sent by the source switch, and the second port sends the request from the first port to the target switch. Based on the routing paths of the source switch, switch routing information is generated. In this way, the corresponding routing path between the source switch and the target switch can be determined based on the switch routing information, and the access request can be forwarded to the target computing unit through the routing path. In other words, based on the switch routing information, the intermediate forwarding port can be determined as the first port, and the target communication port as the second port; the access request is forwarded to the second port through the first port. As can be seen from the above, this embodiment provides different methods for determining switch routing information according to the scale of the data communication system. It does not increase the difficulty of physical link cabling, nor is it limited by the physical space of the data communication system. While improving the overall communication efficiency of the data communication system, it also helps to support the continuous expansion of the scale of the data communication system.
[0171] Based on the above embodiments, the present invention also provides various data access implementation methods for data communication systems in different application scenarios. These various data access methods are listed side-by-side and may include the following:
[0172] As an example application scenario, for point-to-point communication between computing units within the same switch, each switch will form internal routing information based on the switch allocation information of each computing unit it connects to. This internal routing information is shared by all ports of the switch. Data access between different computing units connected to the same switch can be directly communicated through this internal routing information, effectively improving the point-to-point communication efficiency of the data communication system.
[0173] As another exemplary application scenario, a data communication system includes a computing node CPU0, which comprises four root nodes and all switches, such as... Figure 5As shown, Switch01, Switch02, Switch03 and Switch04 are all connected to the same computing node CPU0. Each switch is connected to at least one computing unit. The computing units of the same switch are a group of computing units. Accordingly, each group of computing units is deployed on the first computing node.
[0174] In this scenario, an exemplary case involves a host accessing various computing units, meaning the access request is issued by the host. Accordingly, the host resource allocation information for the target computing unit is defined as target host resource allocation information. This target resource allocation information comprises some or all of the parameters in the target host resource allocation information of the target computing unit. For example, the host resource allocation information includes host bus identification information and host address. The target resource allocation information can consist of host bus identification information and host address, or it can contain only the host address. Upon receiving an access request for the target computing unit, the target host resource allocation information is mapped to target switch resource allocation information based on the target resource allocation information and the routing mapping relationship. Then, based on the target switch resource allocation information, the access request is forwarded to the target computing unit via the target switch.
[0175] In this scenario, another exemplary scenario is the mutual access between computing units on different switches. For ease of description, the computing unit that issues the access request is defined as the source computing unit, the switch connected to the source computing unit is defined as the source switch, and the computing unit to which the access request arrives is defined as the target computing unit. The source computing unit and the target computing unit are not connected to the same switch. The switch resource allocation information of the target computing unit is defined as the target switch resource allocation information, and the switch connected to the target computing unit is defined as the target switch. The source computing unit issues an access request, which carries target resource allocation information. This information may be some or all of the parameters from the target switch's resource allocation information. For example, if the switch resource allocation information includes switch identification information, computing unit bus identification information, and switch address, then the target resource allocation information may include the computing unit bus identification information and switch address. Upon receiving the access request for the target computing unit, the resource allocation information of the target switch to which the target computing unit belongs is determined based on the target switch resource allocation information and routing mapping relationship. This information may be, for example, the unique identification information of the target switch. Based on the switch routing information of the source switch to which the source computing unit belongs, the target communication port for communication between the source switch and the target switch is determined. The access request is then forwarded to the target switch through the target communication port, so that the target switch can send the access request to the target computing unit according to its resource allocation information. Figure 5For example, when GPU00 of Switch01 initiates a communication request to GPU03 of Switch04, Switch01 uses the GPU Address as an index to look up the correspondence between the GPU HOST Info and GPU Switch Info, and obtains the target Switch ID=0x04. Based on the Switch Routing Info of Switch01, it obtains the Fabric port 0x04 used for communication with Switch04 and forwards the request to Switch04. Switch04 then uses the GPU Address, 0x4_0000_0000, to look up the GPU Switch Info and route it to the specified GPU03.
[0176] As another exemplary application scenario, the data communication system includes at least two computing nodes, that is, at least a first computing node and a second computing node. Both the first and second computing nodes are equipped with at least one switch, and each switch connects to at least one computing unit. The computing units on the same switch constitute a group of computing units; that is, both the first and second computing nodes are equipped with at least one group of computing units. For example... Figure 6 As shown, CPU0 and CPU1, each CPU can act as a supernode. Each CPU includes four root nodes, such as RC0, RC1, RC2, and RC3. Each switch is connected to the corresponding RC. The entire system includes eight switches, namely Switch01, Switch02, Switch03, Switch04, Switch05, Switch06, Switch07, and Switch08. Switches under the same CPU are connected. Switches of different CPUs located in symmetrical positions are connected, that is, Switch01 is connected to Switch07, Switch02 to Switch08, Switch03 to Switch05, and Switch04 to Switch06. As the number of computing nodes increases, the number of switches in the data communication system also increases. The intermediate forwarding ports in the switch routing information of the above embodiment can be adjusted to change the location of the switch they reside on. In other words, for large-scale data communication systems, based on experience or preset conditions, such as the minimum number of services being run and the best physical performance, a switch can be selected from the data communication system. For ease of description, this switch is defined as an intermediate switch. From the ports of the intermediate switch, one port is selected as an intermediate forwarding port. As a simple implementation method, the port identifier of the selected port of the intermediate switch can be directly changed to the port identifier information of the intermediate forwarding port in the switch routing information.
[0177] In this scenario, an exemplary case is that a first computing node accesses various computing units within itself, or a first computing node accesses various computing units within a second computing node. The access request is issued by the first node. Similarly, the host resource allocation information of the target computing unit is defined as target host resource allocation information. This target resource allocation information consists of some or all of the parameters in the target host resource allocation information of the target computing unit. For example, the host resource allocation information includes host bus identification information and host address, and the target resource allocation information can be host bus identification information and host address. Upon receiving an access request for the target computing unit, the target host resource allocation information is mapped to target switch resource allocation information based on the target computing unit's target resource allocation information and routing mapping relationship. Then, based on the target switch resource allocation information, the access request is forwarded to the target computing unit via the target switch.
[0178] In this scenario, another exemplary scenario is a computing unit on the first computing node, which, for ease of description, is defined as the first target computing unit. This first target computing unit accesses various computing units on the second computing node, which, for ease of description, are defined as the second target computing unit. The access request is an access request from the first target computing unit of the first computing node to access the second target computing unit of the second computing node. The target resource allocation information is some or all of the parameters in the second target host resource allocation information of the second target computing unit. For example, if the switch resource allocation information includes switch identification information, computing unit bus identification information, and switch address, then the second target host resource allocation information may include the computing unit bus identification information and switch address corresponding to the second target computing unit. In the first computing node, an intermediate switch that meets preset conditions is identified among the switches, and one port of the intermediate switch is adjusted to the port identification information corresponding to the intermediate forwarding port in the switch routing information. When an access request for the target computing unit is received, the resource allocation information of the second target switch to which the second target computing unit is connected is determined according to the resource allocation information and routing mapping relationship of the second target switch. According to the switch routing information of the first source switch to which the first target computing unit belongs, the first target communication port for communicating with the second target switch is determined. The first target communication port is the port of the intermediate switch connected to the first source switch. The intermediate switch belongs to the first computing node and is connected to the second target switch. The access request is forwarded to the intermediate switch through the first target communication port, and the second target communication port for communicating with the second target switch is determined through the switch routing information of the intermediate switch. The access request is forwarded to the second target switch through the second target communication port, so that the second target switch forwards the access request to the target computing unit through the resource allocation information of the second target switch. Taking the intermediate switch as Switch04, when GPU00 of Switch01 initiates a communication request to GPU03 of Switch08, the GPU HOST Info and GPU Switch Info are looked up in Switch01 using the GPU Address as the index to obtain the target SwitchID=0x08 of the request route to Switch08; based on the Switch Routing Info of Switch01, the Fabric port 0x04 used by the intermediate switch Switch04 for communication is determined, and the request is forwarded to Switch04.The request packet is routed to Switch04 via Fabric port 0x04 of Switch01. No target Switch is matched. Switch04 determines its communication port 0x08 with Switch08 based on Switch04's Switch Routing Info and sends the packet to Switch08 via communication port 0x08. Switch08 then looks up the GPU Switch Info based on the GPUAddress and routes it to the specified GPU.
[0179] As can be seen from the above, this embodiment provides different point-to-point communication implementation methods for different application scenarios, allowing shortest-path P2P communication between any computing units in a single-host scalable data communication system without relying on upstream port forwarding and without introducing additional hardware overhead and address translation latency. For point-to-point communication across computing nodes, a communication path is achieved by specifying intermediate switches to implement a 3-level switch cascade, realizing shortest-path P2P communication and improving the communication efficiency of the entire data communication system. Furthermore, a computing node is treated as a superpoint, such as... Figure 6 As shown, a 16-card Switch interconnect system can be regarded as a supernode, that is, all computing units of the same computing node are interconnected through the bus, which appears as a larger server. It can support a single host to be expanded into a large-scale computing system through the Switch, realize flexible expansion, and build a supernode system with 32 cards or more.
[0180] It is understandable that the above embodiments, when performing point-to-point communication between computing units across computing nodes, pre-specify an intermediate switch in the switch routing information, thereby determining an optimal communication path for point-to-point communication between computing units across computing nodes. Although this method can effectively avoid the problem of slow system response due to optimal path optimization when system resources are limited, it can also ensure a certain degree of high communication efficiency for the entire system, such as when the intermediate switch is assigned fewer tasks or has the best hardware resource configuration and performance among all switches in the system. However, this method obviously relies on human experience and requires subsequent service configuration. If the intermediate switch is incorrectly specified, or if the switch malfunctions, or if the switch is under heavy service pressure, this will lead to a decrease in overall communication efficiency. Based on this, the present invention also provides another embodiment, which can store the switch routing information in a target register, and the target register is connected to a pre-specified user port, which may include the following:
[0181] When the communication time of computing units across computing nodes exceeds a preset time threshold, a switch performance detection thread is started to detect whether the intermediate switch is faulty or whether the service data is excessive. If a switch is found to be faulty or the service pressure is high, an intermediate switch re-determination thread is started. This intermediate switch re-determination thread can call the optimal path optimization algorithm, and at the same time obtain the physical parameters and service operation data of other switches in the current data communication system. Based on the optimal path optimization algorithm, a new intermediate switch is determined. At the same time, through the pre-set user port, multiple register configuration threads are called to adjust the relevant data of the intermediate switch in the switch routing information of each switch.
[0182] As can be seen from the above, this embodiment, by monitoring the operation of the intermediate switch in real time, can ensure that the data communication system can always use the optimal switch to perform port forwarding tasks without affecting the operation of user services, thus ensuring high efficiency of point-to-point communication between computing units across computing nodes.
[0183] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0184] This invention also provides a corresponding apparatus for the data communication method, further enhancing the practicality of the method. The following description will specifically introduce the functions of each program module in this embodiment. The data communication apparatus described below and the data communication method described above can be referred to interchangeably. From the perspective of functional modules, see... Figure 7 This embodiment provides a data communication device for a data communication system comprising multiple sets of computing units, wherein each computing unit in the same set is connected to the same switch. The device may include:
[0185] The switch determination module 701 is used to determine the resource allocation information of the target switch to which the target computing unit belongs when it receives an access request for the target computing unit, based on the routing mapping relationship and the target resource allocation information of the target computing unit carried in the access request. The routing mapping relationship is the correspondence between the host resource allocation information and the switch resource allocation information of the same computing unit. The host resource allocation information is the resource information allocated by the host to the computing unit, and the switch resource allocation information is the resource information allocated by the switch to the computing unit.
[0186] The routing determination module 702 is used to determine the intermediate forwarding port based on the resource allocation information and the switch routing information of the source switch corresponding to the source computing unit, and forward the access request to the target communication port of the target switch through the intermediate forwarding port; and forward the access request to the target computing unit again through the target communication port and the target resource allocation information; wherein the source computing unit and the target computing unit belong to different computing nodes; the switch routing information includes the port information corresponding to the data communication path between different switches.
[0187] For example, in some embodiments of this example, the routing determination module 702 can also be used as follows: for a host accessing a computing unit within the same computing node, the access request is issued by the host, and the target resource allocation information is some or all of the parameters in the target host resource allocation information of the target computing unit. After receiving the host's access request to the target computing unit, the target host resource allocation information is mapped to the target switch resource allocation information according to the target resource allocation information and the routing mapping relationship; and the access request is forwarded to the target computing unit through the target switch according to the target switch resource allocation information.
[0188] For example, in other embodiments of this embodiment, the routing determination module 702 can also be used for: for access between different computing units within the same computing node, where the access request is issued by the source computing unit, the target resource allocation information is some or all parameters in the target switch resource allocation information of the target computing unit, and the source computing unit and the target computing unit are not connected to the same switch, determining the resource allocation information of the target switch to which the target computing unit belongs based on the target switch resource allocation information and the routing mapping relationship; determining the target communication port for communication between the source switch and the target switch based on the switch routing information of the source switch to which the source computing unit belongs; and forwarding the access request to the target switch through the target communication port so that the target switch sends the access request to the target computing unit based on the target switch resource allocation information.
[0189] For example, in some other embodiments of this embodiment, the switch determination module 701 can also be used for: switches of different groups of computing units are connected through a target bus, obtaining a first port and a second port on the physical link between the target switch and the source switch, wherein the first port and the source switch belong to the same computing node; using the first port as an intermediate forwarding port and the second port as a target communication port; and forwarding the access request to the second port through the first port.
[0190] For example, in some other embodiments of this embodiment, the switch determination module 701 can also be used for: switches of different groups of computing units are not connected through a target bus, and the source switch and the target switch are not connected through a target bus; pre-configuring a target routing path for the source switch to communicate with the target switch; the target routing path includes at least a first port and a second port; the first port receives a request sent by the source switch, and the second port sends the request from the first port to the target switch; generating switch routing information according to the target routing path; determining the intermediate forwarding port as the first port and the target communication port as the second port according to the switch routing information; and forwarding the access request to the second port through the first port.
[0191] For example, in some other embodiments of this embodiment, the routing determination module 702 can also be used as follows: the data communication system has at least a first computing node and a second computing node, each of the first computing node and the second computing node deploys at least one set of computing units, the access request is an access request from the first computing node to access the target computing unit of the second computing node, the target resource allocation information is some or all of the parameters in the target host resource allocation information of the target computing unit, the target host resource allocation information is mapped to the target switch resource allocation information according to the target resource allocation information of the target computing unit and the routing mapping relationship, and the access request is forwarded to the target computing unit through the target switch according to the target switch resource allocation information.
[0192] For example, in other embodiments of this embodiment, the routing determination module 702 can also be used as follows: the data communication system has at least a first computing node and a second computing node, each of the first and second computing nodes deploys at least one set of computing units, the access request is an access request from the first target computing unit of the first computing node to access the second target computing unit of the second computing node, the target resource allocation information is some or all of the parameters in the second target host resource allocation information of the second target computing unit, the intermediate switch that meets the preset conditions is determined among the switches of the first computing node, and one port of the intermediate switch is adjusted to the port identification information corresponding to the intermediate forwarding port in the switch routing information; based on the resource allocation information of the second target switch and the routing mapping relationship, determine... The resource allocation information of the second target switch to which the second target computing unit is connected; the first target communication port for communicating with the second target switch is determined according to the switch routing information of the first source switch to which the first target computing unit belongs; the first target communication port is the port of the intermediate switch connected to the first source switch, the intermediate switch belongs to the first computing node, and the intermediate switch is connected to the second target switch; the access request is forwarded to the intermediate switch through the first target communication port, and the second target communication port for communicating with the second target switch is determined through the switch routing information of the intermediate switch, and the access request is forwarded to the second target switch through the second target communication port, so that the second target switch forwards the access request to the target computing unit through the resource allocation information of the second target switch.
[0193] For a description of the features in the embodiments corresponding to the data communication device, please refer to the relevant descriptions in the embodiments corresponding to the data communication method, which will not be repeated here.
[0194] The data communication device mentioned above is described from the perspective of functional modules. Furthermore, the present invention also provides an electronic device, which is described from the perspective of hardware. Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. The electronic device includes a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above-described data communication method embodiments.
[0195] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described data communication method embodiments at runtime.
[0196] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0197] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described data communication method embodiments.
[0198] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described data communication method embodiments.
[0199] Finally, the present invention also provides a data communication system, please refer to [link / reference]. Figure 8 The data communication system includes at least one host 800, which may include at least a first computing node 801, a routing controller 802, and a second computing node 803. The host stores host resource allocation information. The first computing node 801...
[0200] The first computing node 801 includes at least a first switch and a second switch; the first switch connects at least a first computing unit and a second computing unit, and the second switch connects at least a third computing unit and a fourth computing unit; both the first and second switches store their respective switch resource allocation information and switch routing information. The second computing node 803 includes at least a third switch and a fourth switch; the third switch connects at least a fifth computing unit and a sixth computing unit, and the fourth switch connects at least a seventh computing unit and an eighth computing unit; both the third and fourth switches store their respective switch resource allocation information and switch routing information. The routing controller 802 is used to implement the steps of the data communication method described in any of the above method embodiments when executing a computer program during access to each computing unit by the first computing node 801, or when the computing units access each other.
[0201] For example, the aforementioned switch can generate switch resource allocation information and store it locally. For ease of description, this embodiment uses the first switch as an example to describe the process. The generation concept of switch resource allocation information for other switches is the same as that for the first switch. The first switch is also configured to: enumerate each connected computing unit to obtain the bus identification information of each computing unit; allocate addresses to each computing unit to obtain the switch address of each computing unit; fill the switch identification information of the first switch, the bus identification information of each computing unit, and the switch address into the corresponding positions of the switch resource allocation table, and store it locally as switch resource allocation information; wherein, the switch resource allocation table includes at least the switch identification information, the computing unit bus identification information, and the computing unit switch address.
[0202] For example, the host is further configured to: enumerate each internal computing unit during startup to obtain the main bus identification information of each computing unit; allocate an address to each computing unit to obtain the host address of each computing unit; fill the host bus identification information and host address of each computing unit into the corresponding position of the host resource allocation table and store it as host resource allocation information; wherein the host resource allocation table includes at least the computing unit host bus identification information and the computing unit host address.
[0203] To achieve flexible expansion of the data communication system and build a large-scale data communication system, a computing node can be regarded as a supernode, enabling flexible expansion and constructing a supernode system. Based on this, the host also includes at least a second computing node; the first computing node 801 and the second computing node 803 each serve as supernodes; the first computing node 801 includes at least a first root node and a second root node, the first root node being connected to the first switch, the second root node to the second switch, and the first and second switches being connected; the second computing node 802 includes at least a third root node and a third root node, the third root node being connected to the third switch, the fourth root node to the fourth switch, the fourth switch to the third switch, the third switch to the first switch, and the second and fourth switches being connected; the third switch connects at least the fifth and sixth computing units, and the fourth switch connects at least the seventh and eighth computing units; both the third and fourth switches store their respective switch resource allocation information and switch routing information. Figure 6 For example, a 16-card Switch interconnected system can be viewed as a supernode, allowing for flexible expansion to build 32-card or higher supernode systems. Furthermore, a single-machine expansion of a fully interconnected 32-card Switch system can be considered as a single host node, further enabling the construction of even larger-scale supernode systems.
[0204] For example, the aforementioned switch can generate switch routing information and store it locally. For ease of description, this embodiment uses the first switch as an example to describe the process. The generation concept of switch routing information for other switches is the same as that for the first switch. The switch routing information of the first switch includes communication routing information of the second switch, communication routing information of the third switch, and communication routing information of the fourth switch. Among them, the communication routing information of the second switch includes at least the identification information of the second switch and the port information for communication between the first switch and the second switch; the communication routing information of the third switch includes at least the identification information of the third switch and the information of the first intermediate conversion port; the communication routing information of the fourth switch includes at least the identification information of the fourth switch and the information of the second intermediate conversion port; wherein, the switch routing information of the first target intermediate switch to which the first intermediate port corresponding to the first intermediate conversion port information belongs includes at least the communication routing information between the third switch and the target intermediate switch; the switch routing information of the second target intermediate switch to which the second intermediate port corresponding to the second intermediate conversion port information belongs includes at least the communication routing information between the fourth switch and the second target intermediate switch.
[0205] As can be seen from the above, the data communication system of this embodiment has efficient, low-latency, flexible and scalable routing management, allowing computing units to achieve shortest path P2P communication through single or multi-hop, and can also be flexibly expanded to build a large-scale data communication system.
[0206] The foregoing has provided a detailed description of a data communication method, system, electronic device, computer-readable storage medium, and computer program product provided by the present invention. The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Whether the units and algorithm steps of the various examples described in the disclosed embodiments are executed in electronic hardware or computer software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, and such implementations should not be considered beyond the scope of the present invention. Several improvements and modifications can be made to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A data communication method, characterized in that, Applied to a data communication system comprising at least two computing nodes, wherein the system has at least two computing nodes with a set of computing units connected to the same switch, including: When the source computing unit receives an access request to the target computing unit, it determines the resource allocation information of the target switch to which the target computing unit belongs based on the routing mapping relationship and the target resource allocation information of the target computing unit carried in the access request; the source computing unit and the target computing unit belong to different computing nodes; based on the resource allocation information of the target switch and the switch routing information of the source switch corresponding to the source computing unit, it determines the intermediate forwarding port, and forwards the access request to the target communication port of the target switch through the intermediate forwarding port; The access request is forwarded to the target computing unit via the target communication port and the target resource allocation information; The routing mapping relationship is the correspondence between host resource allocation information and switch resource allocation information of the same computing unit. The host resource allocation information is the resource information allocated by the host to the computing unit, the switch resource allocation information is the resource information allocated by the switch to the computing unit, and the switch routing information includes the port information corresponding to the data communication path between different switches. Wherein, for access between different computing units within the same computing node, the target resource allocation information is some or all of the parameters in the target switch resource allocation information of the target computing unit, and the source computing unit and the target computing unit belong to the same computing node but are not connected to the same switch, it also includes: Based on the target switch resource allocation information and the routing mapping relationship, the resource allocation information of the target switch to which the target computing unit belongs is determined; based on the switch routing information of the source switch to which the source computing unit belongs, the target communication port for communication between the source switch and the target switch is determined; the access request is forwarded to the target switch through the target communication port, so that the target switch sends the access request to the target computing unit according to the target switch resource allocation information.
2. The data communication method according to claim 1, characterized in that, For a host accessing a computing unit within the same computing node, the access request is issued by the host, and the target resource allocation information is some or all of the parameters in the target host resource allocation information of the target computing unit, further including: Upon receiving the host's access request to the target computing unit, the target host resource allocation information is mapped to the target switch resource allocation information based on the target resource allocation information and the routing mapping relationship. Based on the resource allocation information of the target switch, the access request is forwarded to the target computing unit through the target switch.
3. The data communication method according to claim 1, characterized in that, Switches of different computing units are connected via a target bus. The step of determining an intermediate forwarding port based on the resource allocation information and the switch routing information of the source switch corresponding to the source computing unit, and forwarding the access request to the target communication port of the target switch through the intermediate forwarding port, includes: Obtain the first port and the second port on the physical link between the target switch and the source switch, wherein the first port and the source switch belong to the same computing node; Use the first port as an intermediate forwarding port and the second port as the target communication port; The access request is forwarded to the second port through the first port.
4. The data communication method according to claim 1, characterized in that, At least two switches are not connected via the target bus. The step of determining an intermediate forwarding port based on the resource allocation information and the switch routing information of the source switch corresponding to the source computing unit, and forwarding the access request to the target communication port of the target switch through the intermediate forwarding port, includes: The source switch and the target switch are not connected via a target bus. A target routing path for communication between the source switch and the target switch is pre-configured. The target routing path includes at least a first port and a second port. The first port receives requests from the source switch, and the second port forwards the requests from the first port to the target switch. Based on the target routing path, switch routing information is generated, and based on the switch routing information, the intermediate forwarding port is determined to be the first port, and the target communication port is determined to be the second port; The access request is forwarded to the second port through the first port.
5. The data communication method according to any one of claims 1 to 4, characterized in that, The data communication system has at least a first computing node and a second computing node. Both the first and second computing nodes deploy at least one set of computing units. The access request is an access request from the first computing node to access a target computing unit of the second computing node. The target resource allocation information is some or all parameters in the target host resource allocation information of the target computing unit. Upon receiving the access request for the target computing unit, the system further includes: Based on the target resource allocation information and routing mapping relationship of the target computing unit, the target host resource allocation information is mapped to the target switch resource allocation information; Based on the resource allocation information of the target switch, the access request is forwarded to the target computing unit through the target switch.
6. The data communication method according to any one of claims 1 to 4, characterized in that, The data communication system has at least a first computing node and a second computing node. Both the first and second computing nodes deploy at least one set of computing units. The access request is an access request from a first target computing unit of the first computing node to access a second target computing unit of the second computing node. The target resource allocation information is some or all parameters in the second target host resource allocation information of the second target computing unit. After receiving the access request for the target computing unit, the system further includes: In each switch of the first computing node, an intermediate switch that meets the preset conditions is identified, and one port of the intermediate switch is adjusted to the port identification information corresponding to the intermediate forwarding port in the switch routing information. Based on the resource allocation information of the second target switch and the routing mapping relationship, the resource allocation information of the second target switch to which the second target computing unit is connected is determined; Based on the switch routing information of the first source switch to which the first target computing unit belongs, a first target communication port for communicating with the second target switch is determined; the first target communication port is a port of an intermediate switch connected to the first source switch, the intermediate switch belongs to the first computing node, and the intermediate switch is connected to the second target switch; The access request is forwarded to the intermediate switch through the first target communication port, and the second target communication port for communicating with the second target switch is determined through the switch routing information of the intermediate switch. The access request is then forwarded to the second target switch through the second target communication port, so that the second target switch forwards the access request to the target computing unit through the resource allocation information of the second target switch.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the data communication method as described in any one of claims 1 to 6 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data communication method as described in any one of claims 1 to 6.
9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the data communication method according to any one of claims 1 to 6.
10. A data communication system, characterized in that, It includes a host having a first computing node, a second computing node, and a routing controller, wherein the host stores host resource allocation information; The first computing node includes at least a first switch and a second switch; the first switch connects at least a first computing unit and a second computing unit, and the second switch connects at least a third computing unit and a fourth computing unit; both the first and second switches store their respective switch resource allocation information and switch routing information. The second computing node includes at least a third switch and a fourth switch; the third switch connects at least a fifth computing unit and a sixth computing unit, and the fourth switch connects at least a seventh computing unit and an eighth computing unit; both the third and fourth switches store their respective switch resource allocation information and switch routing information. The routing controller is configured to implement the steps of the data communication method as described in any one of claims 1 to 6 when executing a computer program, in the case of the first computing node accessing each computing unit or the computing units accessing each other.
11. The data communication system according to claim 10, characterized in that, The first switch is further configured to: enumerate each connected computing unit to obtain the bus identification information of each computing unit; allocate an address to each computing unit to obtain the switch address of each computing unit; fill the switch identification information of the first switch, the bus identification information of each computing unit and the switch address into the corresponding positions of the switch resource allocation table, and store them locally as switch resource allocation information. The switch resource allocation table includes at least switch identification information, computing unit bus identification information, and computing unit switch address.
12. The data communication system according to claim 10, characterized in that, The host is also configured to: during startup, enumerate each internal computing unit to obtain the main bus identification information of each computing unit; allocate addresses to each computing unit to obtain the host address of each computing unit; fill the host bus identification information and host address of each computing unit into the corresponding position of the host resource allocation table and store it as host resource allocation information. The host resource allocation table includes at least the computing unit host bus identification information and the computing unit host address.
13. The data communication system according to any one of claims 10 to 12, characterized in that, The first computing node and the second computing node each serve as supernodes; The first computing node includes at least a first root node and a second root node. The first root node is connected to the first switch, the second root node is connected to the second switch, and the first switch and the second switch are connected. The second computing node includes at least a third root node and a fourth root node. The third root node is connected to the third switch, the fourth root node is connected to the fourth switch, the fourth switch is connected to the third switch, the third switch is connected to the first switch, and the second switch is connected to the fourth switch.
14. The data communication system according to claim 13, characterized in that, The first switch's routing information includes the second switch's communication routing information, the third switch's communication routing information, and the fourth switch's communication routing information; The second switch communication routing information includes at least the second switch identification information and the port information for communication between the first switch and the second switch; the third switch communication routing information includes at least the third switch identification information and the first intermediate conversion port information; and the fourth switch communication routing information includes at least the fourth switch identification information and the second intermediate conversion port information. Wherein, the switch routing information of the first target intermediate switch to which the first intermediate port corresponding to the first intermediate conversion port information belongs includes at least the communication routing information between the third switch and the target intermediate switch; the switch routing information of the second target intermediate switch to which the second intermediate port corresponding to the second intermediate conversion port information belongs includes at least the communication routing information between the fourth switch and the second target intermediate switch.
Citation Information
Patent Citations
System and method of High-Speed Data Communication Frame For Cloud Gaming Data Storage and Retrieval
CN112422606A
Abnormality detection method and device, electronic equipment, distributed computing system and storage medium
CN118012680A