Data transmission methods and apparatuses, and electronic device, computer-readable storage medium and computer program product
By setting corresponding routing paths for the network cards of computing devices, the problem of low data transmission rates between computing devices is solved, load balancing and resource optimization are achieved, and data transmission efficiency and stability are improved.
Patent Information
- Application Number
- PCT/CN2025/108616
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-29
- Filing Date
- 2025-07-15
- Publication Date
- 2026-03-05
AI Technical Summary
In existing technologies, the data transmission rate between computing devices is low, resulting in low data transmission efficiency, especially when training artificial intelligence models. Furthermore, hash functions may cause uneven load on switches when determining routing paths, leading to local hotspots and reduced communication bandwidth.
By setting corresponding routing paths for each network interface card (NIC) in a multi-layer network architecture, and utilizing access layer and aggregation layer switches for data transmission, the switch load is balanced, and the time and resource consumption of randomly determining routing paths are reduced.
It achieves load balancing of data transmission between computing devices, improves data transmission rate and resource utilization, and enhances data transmission efficiency and stability.
Smart Images

Figure CN2025108616_05032026_PF_FP_ABST
Abstract
Description
Data transmission methods, apparatus, electronic devices, computer-readable storage media, and computer program products
[0001] Cross-reference to related applications
[0002] This application is based on and claims priority to Chinese Patent Application No. 202411201394.7, filed on August 29, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of data processing technology, and in particular to a data transmission method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0004] With the development of technology, users have increasingly higher demands for computing devices. In related technologies, when the first computing device and the second computing device need to transmit data, the first computing device can randomly send a data transmission request to the switch, and then the switch can send the data transmission request to the second computing device. That is, the routing path consists of the path between the first computing device and the randomly determined switch, and the path between the randomly determined switch and the second computing device. It is equivalent to the routing path being randomly determined. The randomly determined routing path will lead to an unbalanced load on the switch, resulting in a low data transmission rate between computing devices, that is, low efficiency of data transmission between computing devices. Summary of the Invention
[0005] This application provides a data transmission method, apparatus, electronic device, storage medium, and program product that can improve data transmission efficiency.
[0006] The technical solution provided in this application is implemented as follows:
[0007] This application provides a data transmission method applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the method including:
[0008] For any network interface card (NIC) in the first computing device, obtain a routing path for transmitting data to the NIC, wherein the routing path passes through the access layer and the aggregation layer;
[0009] The routing path is sent to a second access switch in the access layer, the second access switch being connected to at least one second computing device;
[0010] The second access switch is used to forward data sent by the second computing device to the network card corresponding to the destination address, based on the routing path.
[0011] This application embodiment also provides a data transmission method applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the aggregation layer including at least one aggregation sub-layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the aggregation sub-layer including multiple aggregation switches, the method including:
[0012] The second access switch in the access layer receives the routing path used to transmit data to the network card in the first computing device, and the routing path has a one-to-one correspondence with the network card;
[0013] The second access switch is connected to at least one second computing device, and the second access switch and the first access switch belong to different blocks.
[0014] After receiving data from the second computing device corresponding to the network card at the destination address, the data is sent to the network card based on the routing path.
[0015] This application embodiment also provides a data transmission device applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the aggregation layer including at least one aggregation sub-layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the aggregation sub-layer including multiple aggregation switches, the device comprising:
[0016] The acquisition module is configured to acquire a routing path for transmitting data to any network interface card (NIC) in the first computing device, wherein the routing path has a one-to-one correspondence with the NIC;
[0017] The first sending module is configured to send the routing path to the second access switch in the access layer, wherein the second access switch is connected to at least one second computing device, and the second access switch and the first access switch belong to different blocks;
[0018] The second access switch is used to forward data sent by the second computing device to the network card corresponding to the destination address, based on the routing path.
[0019] This application embodiment also provides a data transmission device applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the aggregation layer including at least one aggregation sub-layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the aggregation sub-layer including multiple aggregation switches, the device comprising:
[0020] The receiving module is configured as the second access switch in the access layer, and receives the routing path used to transmit data to the network card in the first computing device, wherein the routing path has a one-to-one correspondence with the network card;
[0021] The second access switch is connected to at least one second computing device, and the second access switch and the first access switch belong to different blocks.
[0022] The second sending module is configured to, after receiving data from the network interface card (NIC) corresponding to the destination address sent by the second computing device, send the data to the NIC based on the routing path.
[0023] This application provides an electronic device, the electronic device comprising:
[0024] Memory is used to store executable instructions or computer programs.
[0025] When a processor executes computer-executable instructions or computer programs stored in the memory, it implements the data transmission method provided in the embodiments of this application.
[0026] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions or computer program, which, when executed by a processor, implements the data transmission method provided in this application.
[0027] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the data transmission method provided in this application.
[0028] The embodiments of this application have the following beneficial effects:
[0029] In the data transmission method provided in this application embodiment, for any network interface card (NIC) in the first computing device, a routing path for transmitting data to the NIC can be obtained. The routing path passes through the access layer and the aggregation layer. The routing path is sent to a second access switch in the access layer. The second access switch is connected to at least one second computing device. The second access switch is used to forward data sent by the second computing device to the NIC corresponding to the destination address to the NIC based on the routing path.
[0030] In other words, in the data transmission method provided in this application embodiment, any network interface card (NIC) of the first computing device has a corresponding routing path. The second computing device can send data to any NIC of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, the routing path corresponding to the NIC can be used for data transmission, which can achieve load balancing of the switch for data transmission between the first computing device and the second computing device. Furthermore, it can save the time and resources of randomly determining the routing path, thereby improving the data transmission rate and resource utilization. That is, the data transmission method provided in this application embodiment can improve the efficiency of data transmission and improve the resource utilization of data transmission. Attached Figure Description
[0031] Figure 1A is a schematic diagram of the data transmission system provided in an embodiment of this application;
[0032] Figure 1B is a schematic diagram of the multi-layer network architecture provided in an embodiment of this application;
[0033] Figure 2A is a schematic diagram of the structure of the first electronic device provided in an embodiment of this application;
[0034] Figure 2B is a schematic diagram of the structure of the second electronic device provided in an embodiment of this application;
[0035] Figure 3A is a schematic diagram of the multi-layer network architecture provided in an embodiment of this application;
[0036] Figure 3B is a schematic diagram of the multi-layer network architecture provided in the embodiment of this application.
[0037] Figure 4 is a schematic diagram of the data transmission method provided in an embodiment of this application;
[0038] Figure 5 is a flowchart illustrating the data transmission method provided in an embodiment of this application;
[0039] Figure 6 is a schematic flowchart of the data transmission method provided in an embodiment of this application;
[0040] Figure 7 is a schematic diagram of the routing path provided in an embodiment of this application;
[0041] Figure 8 is a schematic diagram of the routing path provided in an embodiment of this application;
[0042] Figure 9 is a flowchart illustrating the data transmission method provided in an embodiment of this application.
[0043] Figure 10 is a schematic flowchart of the data transmission method provided in an embodiment of this application;
[0044] Figure 11 is a flowchart illustrating the data transmission method provided in an embodiment of this application.
[0045] Figure 12 is a schematic diagram of the routing path provided in the embodiment of this application;
[0046] Figure 13 is a flowchart illustrating the data transmission method provided in an embodiment of this application.
[0047] Figure 14 is a schematic diagram of the routing path provided in an embodiment of this application;
[0048] Figure 15 is a schematic diagram of the connection relationship between the computing device and the access switch provided in an embodiment of this application;
[0049] Figure 16 is a schematic flowchart of the data transmission method provided in an embodiment of this application;
[0050] Figure 17 is a schematic diagram of the routing path provided in the embodiment of this application;
[0051] Figure 18 is a flowchart illustrating the data transmission method provided in an embodiment of this application.
[0052] Figure 19 is a flowchart illustrating the data transmission method provided in an embodiment of this application;
[0053] Figure 20 is a flowchart illustrating the data transmission method provided in an embodiment of this application;
[0054] Figure 21 is a schematic diagram of the transmission rate test results provided in an embodiment of this application. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0056] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0057] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0058] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0059] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0060] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0061] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0062] 1) Access Layer: The access layer is the bottom layer of a multi-layer network architecture. It connects computing devices and provides them with initial access to the network. In this embodiment, the access layer includes multiple access switches and multiple first computing devices. Each access switch connects to at least one first computing device; that is, one access switch can connect to one or more first computing devices.
[0063] 2) Aggregation Layer: The aggregation layer is located between the access layer and the core layer. As an intermediate layer between the access layer and the core layer, it is responsible for aggregating traffic from the access layer and providing higher-level network services. In the embodiments of this application, the aggregation layer includes one or more aggregation sub-layers. Each aggregation sub-layer may include multiple aggregation switches, that is, an aggregation sub-layer includes one or more aggregation switches.
[0064] 3) Core Layer: The core layer is the top layer of the multi-layer network architecture and is responsible for data transmission at a speed greater than the speed threshold. The core layer can be used to connect different aggregation switches to ensure high-speed (transmission speed greater than the speed threshold) data transmission. In the embodiments of this application, the core layer may include one or more core sub-layers, and each core sub-layer may include one or more core switches.
[0065] 4) Switch: In this embodiment, a switch is a computer network device used to connect computing devices, thereby enabling communication between the computing devices. For example, a first access switch, a second access switch, and an aggregation switch can be used to connect a first computing device and a second computing device, thereby enabling communication between the first computing device and the second computing device.
[0066] 5) Network Interface Card (NIC): A NIC is a computer hardware device used to connect computing devices to a network, enabling the computing devices to send and receive data via wired or wireless means.
[0067] 6) Computing device: In this embodiment, the computing device may be a device including a graphics processor, which is a microprocessor that performs image and graphics-related operations within the computing device. Depending on actual usage requirements, the computing device may also include other processors.
[0068] 7) High Performance Compute (HPC): In this embodiment of the application, high performance computing refers to using the computing power of a computing cluster to solve problems in different fields. The computing cluster includes a first computing device and a second computing device. For example, the computing power of the computing cluster can be used to solve problems in fields such as scientific research, weather forecasting, artificial intelligence, and image processing.
[0069] 8) Block: In this embodiment of the application, a block is a computing unit composed of multiple devices (such as GPU servers and access switches) in a high-performance computing scenario. The computing devices in this unit can be connected through a high-speed network and can work together to process computing tasks.
[0070] 9) Cloud technology: Cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or local area network to realize the computing, storage, processing, and sharing of data.
[0071] The following problems exist in the related technologies:
[0072] Technical Issue 1: In related technologies, when the first computing device and the second computing device need to transmit data, the first computing device can randomly send a data transmission request to the switch, and then the switch can send the data transmission request to the second computing device. That is, the routing path consists of the path between the first computing device and the randomly determined switch, and the path between the randomly determined switch and the second computing device. This is equivalent to the routing path being randomly determined. The randomly determined routing path will lead to an unbalanced load on the switch, resulting in a low data transmission rate between the computing devices, that is, low efficiency in data transmission between the computing devices.
[0073] Technical Issue 2: In related technologies, for scenarios involving training artificial intelligence models, a large amount of data needs to be transmitted between computing devices. Following up on Technical Issue 1, the low efficiency of data transmission between computing devices leads to a decrease in the efficiency of training artificial intelligence models.
[0074] Technical Issue 3: In related technologies, hash functions can be used to determine the routing path for data transmission between computing devices. In some embodiments, a hash function can be used to perform a hash operation on the information of the computing devices to obtain a hash value, and the routing path can be determined based on the hash value. However, using hash functions to determine the routing path for data transmission between computing devices can lead to local hotspots, which means it can cause uneven load on the switch, resulting in a lower data transmission rate between computing devices, i.e., lower efficiency in data transmission between computing devices.
[0075] Technical Issue 4: In related technologies, when there is congestion in the routing path, the efficiency of data transmission between computing devices will be low, and the communication bandwidth will be reduced.
[0076] This application provides a data transmission method, apparatus, electronic device, computer-readable storage medium, and computer program product that can improve data transmission efficiency.
[0077] Referring to Figure 1A, which is a schematic diagram of the structure of the data transmission system provided in the embodiment of this application, the data transmission system 100 can support a data transmission application. In some embodiments, the data transmission system 100 includes a terminal 400, a server 200-1, a server 200-2 and a server 200-3, and a switch. In Figure 1A, only the first access switch 500-1, the second access switch 500-2 and the aggregation switch 600 are shown.
[0078] Server 200-1 is the first computing device, which includes a graphics processor and is equipped with at least one network card. Server 200-2 is the second computing device, which also includes a graphics processor and is equipped with at least one network card.
[0079] Server 200-3 is equipped with a Software Defined Network (SDN) controller. Terminal 400, Server 200-1, Server 200-2, and Server 200-3 are all connected via Network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both.
[0080] Server 200-1 is connected to the first access switch 500-1 via a network cable. The first access switch 500-1 is connected to the aggregation switch 600 via a network cable. The aggregation switch 600 is connected to the second access switch 500-2 via a network cable. The second access switch 500-2 is connected to server 200-2 via a network cable.
[0081] The data transmission system 100 is applied to a multi-layer network architecture, as shown in Figure 1B. Figure 1B is a schematic diagram of the multi-layer network architecture provided in this embodiment of the application. The multi-layer network architecture includes an access layer 700-1 and an aggregation layer. The access layer 700-1 includes multiple access switches. In Figure 1B, only the first access switch 500-1 and the second access switch 500-2 are shown. The first access switch 500-1 and the second access switch 500-2 belong to different blocks, that is, the first access switch 500-1 belongs to the first block 201, and the second access switch 500-2 belongs to the second block 202. The aggregation layer includes an aggregation sub-layer 700-2, which includes multiple aggregation switches. In Figure 1B, only the aggregation switch 600 is shown.
[0082] Referring again to Figure 1A, in some embodiments, when a user needs data transmission between server 200-1 and server 200-2, in response to a data transmission command triggered by the graphical interface 410-1 of terminal 400, terminal 400 can send a data transmission request generated based on the data transmission command to server 200-3.
[0083] In some embodiments, the terminal 400 can send different requests to the server 200-3 for different scenarios. The server 200-3 can determine whether data transmission is required based on the received request. For example, in an image processing scenario, in response to an image processing instruction triggered by the graphical interface 410-1 of the terminal 400, the terminal 400 can send an image processing request generated based on the image processing instruction to the server 200-3, and then the server 200-3 can determine whether data transmission is required.
[0084] When server 200-3 determines that data transmission is required, or in response to a data transmission request, server 200-3 can obtain a routing path for transmitting data to any network interface card (NIC) in server 200-1. There is a one-to-one correspondence between the routing path and the NIC. The routing path includes: a first path between the NIC and the first access switch 500-1, and a second path between the first access switch 500-1 and the aggregation switch 600.
[0085] Server 200-3 can send a routing path to the second access switch 500-2. The second access switch 500-2 is used to forward the data sent by server 200-2 to the network card corresponding to the destination address of the network card.
[0086] In the data transmission method provided in this application embodiment, any network interface card (NIC) of the first computing device has a corresponding routing path. The second computing device can send data to any NIC of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, the routing path corresponding to the NIC can be used for data transmission, which can achieve load balancing of the switch for data transmission between the first computing device and the second computing device. Furthermore, it can save the time and resources of randomly determining the routing path, thereby improving the data transmission rate and resource utilization. In other words, the data transmission method provided in this application embodiment can improve the efficiency of data transmission and improve the resource utilization of data transmission.
[0087] The following describes the electronic device provided in the embodiments of this application. The electronic device includes a first electronic device and a second electronic device. The first electronic device includes a software-defined mesh controller. The first electronic device that implements the data transmission method provided in the embodiments of this application can be a terminal, a server, or a combination of the two. The second electronic device that provides the data transmission method in the embodiments of this application can also be a switch, for example, an access switch.
[0088] The terminals can be various types of devices, such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and in-vehicle terminals. The servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.
[0089] Referring to Figures 2A and 2B, Figure 2A is a schematic diagram of the structure of a first electronic device provided in an embodiment of this application, and Figure 2B is a schematic diagram of the structure of a second electronic device provided in an embodiment of this application. The electronic devices (first electronic device and second electronic device) shown in Figures 2A and 2B include: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the electronic devices (first electronic device and second electronic device) are coupled together through a bus system 440. It is understood that the bus system 440 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 440 in Figures 2A and 2B.
[0090] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0091] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including at least one of the following: one or more speakers, one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0092] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0093] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0094] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0095] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0096] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0097] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0098] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0099] In some embodiments, the data transmission device provided in this application can be implemented in software. FIG2A shows a data transmission device 455 stored in memory 450, which can be software in the form of programs and plug-ins, including the following software modules: acquisition module 4551 and first transmission module 4552. These modules are logically related, and therefore can be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.
[0100] Figure 2B shows a data transmission device 456 stored in memory 450, which can be software in the form of programs and plug-ins, including the following software modules: a receiving module 4561 and a second transmitting module 4562. These modules are logically linked and can therefore be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.
[0101] In other embodiments, the data transmission device provided in this application can be implemented in hardware. As an example, the data transmission device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the data transmission method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0102] The first data transmission method provided in the embodiments of this application will be described below. As mentioned above, the first electronic device that implements the data transmission method provided in the embodiments of this application can be a terminal, a server, or a combination of the two.
[0103] The data transmission method provided in this application embodiment is applied to a multi-layer network architecture. To facilitate understanding of the data transmission method provided in this application embodiment, the multi-layer network architecture is described below. In the multi-layer network architecture provided in this application embodiment, the network topology connection relationship between each switch is a fat tree topology.
[0104] In some embodiments, the multi-layer network architecture includes an access layer and an aggregation layer. The aggregation layer includes at least one (or more) aggregation sublayers, the access layer includes multiple access switches, and the aggregation sublayers include multiple aggregation switches. For the case where the aggregation layer includes one aggregation sublayer, please refer to Figure 1B.
[0105] In some embodiments, the access layer includes a first access switch and a second access switch, wherein the first access switch is connected to at least one (or more) first computing devices, and the second access switch is connected to at least one (or more) second computing devices. The first and second access switches belong to different blocks. For each block, the number of computing devices in the block can be one or more, which can be set according to actual usage requirements.
[0106] Each computing device is equipped with at least one network interface card (NIC). That is, the first computing device has one or more NICs, and the second computing device has one or more NICs. The number of NICs on the first computing device can be the same as or different from the number on the second computing device; this can be configured according to actual usage requirements.
[0107] For example, the number of first computing devices can be 2, the number of second computing devices can be 1, the number of network cards set on any one of the first computing devices can be 8, and the number of network cards set on the second computing devices can be 16. That is, the number of first computing devices is different from the number of second computing devices, and the number of network cards set on the first computing devices is different from the number of network cards set on the second computing devices.
[0108] For a multi-layer network architecture, there are multiple blocks. For each block, the number of access switches is determined by the number of ports and network interface cards (NICs) on the access switches. The number of aggregation switches is determined by the number of aggregation sub-layers, the number of access switches in the access layer, and the number of ports on each access switch. When there is only one aggregation sub-layer, the number of aggregation switches equals the number of ports on the access switches in the access layer.
[0109] In some embodiments, blocks can be divided according to the number of network interface cards (NICs). For example, every 16 NICs corresponding to computing devices connected to a switch can be considered as one block. In some embodiments, blocks can also be divided according to the tasks being executed, the geographical location, or the type of graphics processor, depending on the actual usage requirements.
[0110] The number of access switches in the access layer can be the same as or different from the number of aggregation switches in an aggregation sublayer, depending on the actual usage requirements.
[0111] The following example illustrates the multi-layer network architecture provided in this application embodiment with reference to Figure 3A. Referring to Figure 3A, which is a schematic diagram of the structure of the multi-layer network architecture provided in this application embodiment, the multi-layer network architecture includes an access layer 310 and a convergence layer 320. The convergence layer 320 includes two convergence sub-layers, which can be a first convergence sub-layer 302 and a second convergence sub-layer 301.
[0112] The number of switches (access switches) in access layer 310, the number of switches (aggregation switches) in the first aggregation sublayer 302, and the number of switches (aggregation switches) in the second aggregation sublayer 301 can be the same or different, depending on the actual usage requirements.
[0113] In Figure 3A, the first aggregation sublayer 302 may include 64 aggregation switches, and aggregation switch 3011 is shown in Figure 3A. The second aggregation sublayer 301 may include 64 aggregation switches, and aggregation switch 3012 is shown in Figure 3A.
[0114] Access layer 310 may include access switches located in different blocks. The number of blocks can be 16. Figure 3A only shows the first block 3101 and the second block 3116. Each block includes 4 access switches. In Figure 3A, the first block 3101 includes 4 access switches, including the first access switch 304. The second block 3116 includes 4 access switches, including the second access switch 305.
[0115] Each access switch connects to one or more first computing devices. In Figure 3A, the first access switch 304 is connected to the first computing device 306, and the second access switch 305 is connected to the second computing device 303.
[0116] The first computing device 306 is equipped with 16 network cards, and network card 3061 is shown in Figure 3A. The second computing device 303 is equipped with 16 network cards, and network card 3031 is shown in Figure 3A. That is, the number of the first computing devices is the same as the number of the second computing devices, and the number of network cards on the first computing devices is the same as the number of network cards on the second computing devices.
[0117] In some embodiments, the multi-layer network architecture includes an access layer, an aggregation layer, and a core layer. The access layer and aggregation layer can be referred to the above description of the access layer and aggregation layer, which will not be repeated here. The core layer may include at least one (or more) core sub-layers, and the core sub-layers include multiple core switches.
[0118] The number of core sub-layers can be set according to actual usage requirements. For each core sub-layer, the number of core switches is determined by the number of aggregation switches in the aggregation sub-layers and the number of ports on each aggregation switch. The number of aggregation switches in an aggregation sub-layer can be the same as or different from the number of core switches in a core sub-layer, depending on actual usage requirements.
[0119] Referring to Figure 3B, which is a schematic diagram of the multi-layer network architecture provided in this embodiment of the application, the multi-layer network architecture includes an access layer 310, an aggregation layer 320, and a core layer. For a description of the access layer 310 and the aggregation layer 320, please refer to Figure 3A, and will not be repeated here.
[0120] The aggregation layer 320 includes two aggregation sublayers, namely a first aggregation sublayer 302 and a second aggregation sublayer 301, and the core layer includes one core sublayer 401. The number of switches (core switches) in the core sublayer 401 can be the same as or different from the number of switches (access switches) in the access layer 310, the number of switches (aggregation switches) in the first aggregation sublayer 302, and the number of switches (aggregation switches) in the second aggregation sublayer 301. In Figure 3B, the core sublayer 401 may include 64 core switches; only core switch 4011 is shown in Figure 3B.
[0121] In some embodiments, when the number of computing devices exceeds a preset threshold, a core layer can be configured to address the increased demand for communication bandwidth, thereby enabling data transmission between computing devices exceeding the preset threshold. Furthermore, the core layer can enhance the redundancy of the multi-layer network architecture, ensuring data transmission can continue even with abnormal routing paths, thus improving data transmission stability.
[0122] In some embodiments, the same block may include one or more access switches. An access switch has multiple uplink ports (i.e., second ports). An aggregation sublayer includes multiple aggregation switches. For each access switch, different uplink ports are connected to different aggregation sublayers. The uplink ports of the access switches are connected to the downlink ports of the aggregation switches.
[0123] In some embodiments, an aggregation sublayer includes multiple aggregation switches, and an aggregation switch includes multiple uplink aggregation ports. The number of aggregation sublayers may be multiple. For one aggregation switch, different uplink aggregation ports are connected to different aggregation switches in another aggregation sublayer. That is, another aggregation sublayer includes multiple aggregation switches, wherein the uplink interface of the aggregation switch in one aggregation sublayer is connected to the downlink port of the aggregation switch in another aggregation sublayer.
[0124] To facilitate understanding of the data transmission method provided in the embodiments of this application, please refer to Figure 4, which is a schematic diagram of the data transmission method provided in the embodiments of this application. The data transmission method provided in the embodiments of this application will be described below with reference to Figure 4.
[0125] Figure 4 illustrates the connection relationships between computing devices, access switches, and aggregation switches. The block can include 16 sections, with the first block 411 and the second block 412 shown in Figure 4. Each block can include one computing device and four access switches. In Figure 4, the first block 411 includes a first computing device 402, access switch one, access switch two, access switch three, and access switch four. The first computing device 402 is connected to access switches one, two, three, and four.
[0126] The second block 412 includes a second computing device 403, access switch five, access switch six, access switch seven, and access switch eight. The second computing device 403 is connected to access switches five, six, seven, and eight.
[0127] For an access switch, different ports in the access switch are connected to different aggregation switches. In Figure 4, access switch one includes 4 ports. In some embodiments, access switch one can be connected to aggregation switch one, access switch one can be connected to aggregation switch two, access switch one can be connected to aggregation switch three, and access switch one can be connected to aggregation switch four.
[0128] Access switch 2 includes 4 ports. In some embodiments, access switch 2 can be connected to aggregation switch 1, access switch 2 can be connected to aggregation switch 2, access switch 2 can be connected to aggregation switch 3, and access switch 2 can be connected to aggregation switch 4.
[0129] Access switch 3 includes 4 ports. In some embodiments, access switch 3 can be connected to aggregation switch 1, access switch 3 can be connected to aggregation switch 2, access switch 3 can be connected to aggregation switch 3, and access switch 3 can be connected to aggregation switch 4.
[0130] Access switch 4 includes 4 ports. In some embodiments, access switch 4 can be connected to aggregation switch 1, access switch 4 can be connected to aggregation switch 2, access switch 4 can be connected to aggregation switch 3, and access switch 4 can be connected to aggregation switch 4.
[0131] Access switch five includes four ports. In some embodiments, access switch five can be connected to aggregation switch one, access switch five can be connected to aggregation switch two, access switch five can be connected to aggregation switch three, and access switch five can be connected to aggregation switch four.
[0132] Access switch six includes four ports. In some embodiments, access switch six can be connected to aggregation switch one, access switch six can be connected to aggregation switch two, access switch six can be connected to aggregation switch three, and access switch six can be connected to aggregation switch four.
[0133] Access switch 7 includes 4 ports. In some embodiments, access switch 7 can be connected to aggregation switch 1, access switch 7 can be connected to aggregation switch 2, access switch 7 can be connected to aggregation switch 3, and access switch 7 can be connected to aggregation switch 4.
[0134] Access switch 8 includes 4 ports. In some embodiments, access switch 8 can be connected to aggregation switch 1, access switch 8 can be connected to aggregation switch 2, access switch 8 can be connected to aggregation switch 3, and access switch 8 can be connected to aggregation switch 4.
[0135] The path between the computing device and the access switch is the first path, and the connection between the access switch and the aggregation switch is the second path. Figure 4 shows 16 routing paths. Any of the routing paths shown in Figure 4 can be used for data transmission when needed.
[0136] The data transmission method provided in the embodiments of this application will be described below with reference to Figure 5. Referring to Figure 5, which is a schematic flowchart of the data transmission method provided in the embodiments of this application, the data transmission method provided in the embodiments of this application will be described below with reference to the steps shown in Figure 5 and taking the server as the execution subject.
[0137] In step 101, for any network interface card (NIC) in the first computing device, a routing path for transmitting data to the NIC is obtained.
[0138] In some embodiments, when a user needs to transmit data, in response to a data transmission command triggered on the terminal, the terminal can send a data transmission request to the server, and the server can then perform step 101 as described above.
[0139] In some embodiments, for scenarios requiring high-performance computing, in response to a target instruction triggered by the terminal, the terminal can send a target request to the server, so that the server can execute the above step 101. The target instruction and the target request can be requests in high-performance computing scenarios, such as model training, weather forecasting, big data processing, etc. Accordingly, the target request can be a model training request, a weather forecasting request, a data processing request, etc.
[0140] Model training, weather forecasting, and big data processing can be achieved through cloud computing. Cloud computing distributes computing tasks across a large number of computing devices, thereby enabling the acquisition of computing resources as needed. Model training, in particular, can be provided through artificial intelligence cloud services.
[0141] In some embodiments, step 101 can be implemented by obtaining a routing path for transmitting data to any network interface card (NIC) in the first computing device that needs to transmit data to the second computing device.
[0142] The routing path can be a Border Gateway Protocol (BGP) path, a protocol used to exchange routing information between different Autonomous Systems (AS). BGP is primarily used for routing and reachability information exchange between networks on the Internet and is a key technology for interconnecting different network areas. Of course, it can also be a path corresponding to other protocols; for example, the routing path can be a policy-based routing path. The specific configuration can be based on actual usage requirements.
[0143] There is a one-to-one correspondence between routing paths and network interface cards (NICs). That is, each NIC has a corresponding routing path. For example, the first computing device includes NIC 1 and NIC 2. NIC 1 corresponds to routing path 1, and NIC 2 corresponds to routing path 2.
[0144] The routing path includes a first path between the network interface card (NIC) and the first access switch in the access layer, and a second path between the first access switch and at least one aggregation switch in the aggregation sublayer. For example, referring to Figure 4, the path between the NIC of the first computing device 402 and access switch one (i.e., the first access switch) is the first path 4021, and the path between access switch one and aggregation switch one is the second path 4022. That is to say, the routing path includes the first path 4021 and the second path 4022.
[0145] Referring to Figure 6, which is a schematic flowchart of the data transmission method provided in this application embodiment, the step "obtaining the routing path for transmitting data to the network card" shown in Figure 5 will be explained below with reference to the steps shown in Figure 6. The first access switch has at least one first port (uplink port) and a second port (downlink port) corresponding to each of the first ports.
[0146] In step 1011, the first port corresponding to the network card is determined from the pre-set correspondence between candidate network cards and candidate first ports, and the path between the network card and the first port corresponding to the network card is taken as the first path.
[0147] In some embodiments, step 1011 can be implemented by confirming the pre-set correspondence between candidate network cards and candidate first ports through the topology connection relationship between the first computing device and the first access switch. The topology connection relationship between the first computing device and the first access switch can be referred to the description of FIG4.
[0148] In some embodiments, the computing devices and access switches included in a block can be obtained. Different blocks correspond to different computing devices and access switches. The number of blocks is an integer greater than 2, which can be determined according to the actual situation. For example, the first block includes a first computing device and a first access switch, the first access switch being connected to the first computing device and belonging to the access layer. The second block includes a second computing device and a second access switch, the second access switch being connected to the second computing device and belonging to the access layer. The topology connection relationship refers to the connection relationship between computing devices and access switches belonging to the same block.
[0149] For any network interface card (NIC) in the first computing device, the first port corresponding to the NIC can be determined from the pre-set correspondence between candidate NICs and candidate first ports. Thus, the path between the NIC and the first port corresponding to the NIC can be used as the first path. In other words, the first path is the path between the NIC and the first port corresponding to the NIC, and the first port corresponding to the NIC is the first port of the first access switch. In other words, the first path is the path between the NIC and the first access switch.
[0150] Referring to Figure 7, which is a schematic diagram of the routing path provided in an embodiment of this application, Figure 7 shows block 701, which includes a first computing device 702 and a first access switch 706. The first computing device 702 is equipped with multiple network interface cards (NICs), and NIC 703 is shown in Figure 7. The first access switch 706 includes multiple ports, including a first port 704.
[0151] From the pre-set correspondence between candidate network cards and candidate first ports, determine the first port 704 corresponding to network card 703. After determining the first port 704 corresponding to network card 703, the path between network card 703 and first port 704 can be used as the first path.
[0152] In other words, the first path is the path between the network interface card 703 of the first computing device 702 and the first port 704 of the first access switch 706. Or, more precisely, the first path is the path between the first computing device 702 and the first access switch 706. In this way, the correspondence between the network interface card and the port of the interface switch can be determined quickly and accurately, thus improving the utilization of computing resources.
[0153] In step 1012, the aggregation switch corresponding to the second port is determined from the pre-set correspondence between the candidate second port and the candidate aggregation switch, and the second path is determined based on the second port and the aggregation switch corresponding to the second port.
[0154] In some embodiments, step 1012 can be implemented in the following way: since there is a second port that corresponds one-to-one with the first port, the second port corresponding to the network card can be determined after the first port corresponding to the network card is determined.
[0155] For example, in Figure 7, the first access switch 706 also includes a second port 705. The first port 704 and the second port 705 correspond one-to-one. Therefore, after determining the first port 704 corresponding to the network card 703, the second port 705 corresponding to the network card 703 can be determined.
[0156] After determining the second port corresponding to the network card, the aggregation switch corresponding to the second port can be determined from the pre-set correspondence between candidate second ports and candidate aggregation switches. The pre-set correspondence between candidate second ports and candidate aggregation switches is confirmed by the topology connection relationship between the first access switch and the aggregation switch. The topology connection relationship between the first access switch and the aggregation switch can be found in the explanation of Figure 4.
[0157] After determining the aggregation switch corresponding to the second port, a second path can be determined based on the second port and its corresponding aggregation switch. In some embodiments, when the number of aggregation sublayers is one, the path between the second port and its corresponding aggregation switch can be used as the second path. In other words, the second path is the path between the second port and its corresponding aggregation switch; or, more specifically, the second path is the path between the first access switch and the aggregation switch in one aggregation sublayer.
[0158] In some embodiments, the aggregation switch corresponding to the second port includes multiple first aggregation ports (i.e., downlink aggregation ports). The first aggregation port corresponding to the second port can be determined from the pre-set correspondence between candidate second ports and candidate first aggregation ports, thereby using the path between the second port and the first aggregation port as the second path.
[0159] For example, in Figure 7, the aggregation switch 708 includes a first aggregation port 707. From a pre-set correspondence between candidate second ports and candidate first aggregation ports, the first aggregation port 707 corresponding to the second port 705 is determined. The path between the second port 705 and the first aggregation port 707 can be used as the second path. In other words, the path between the first access switch 706 and the aggregation switch 708 can be used as the second path.
[0160] For cases where the number of aggregation sublayers is an integer greater than 1, that is, when there are multiple aggregation sublayers, the aggregation switches corresponding to the second port include multiple ones, any two aggregation switches corresponding to the second port belong to different aggregation sublayers, and there is a pre-set topology connection relationship between the multiple aggregation switches corresponding to the second port.
[0161] In some embodiments, sub-paths can be determined based on the first access switch and aggregation switches belonging to different aggregation sub-layers, and then the second path can be determined based on the sub-paths. The number of sub-paths is consistent with the number of aggregation switches corresponding to the second port. Different aggregation switches corresponding to different second ports belong to different aggregation sub-layers. It can be seen that the number of sub-paths is consistent with the number of aggregation sub-layers.
[0162] The aggregation switches corresponding to the second port include a first aggregation switch and a second aggregation switch. The first aggregation switch and the second aggregation switch belong to different aggregation sub-layers. The first access switch is connected to the second aggregation switch, and the second aggregation switch is connected to the first aggregation switch.
[0163] Of course, a third aggregation switch can be configured according to actual usage requirements. This third aggregation switch belongs to a different aggregation sublayer than the first and second aggregation switches, thus determining the second path. In other words, the number of aggregation switches belonging to different aggregation sublayers can be set according to actual usage needs. This method allows for the determination of the port correspondence between aggregation switches belonging to different aggregation sublayers, enabling quick and accurate determination of the second path and improving the utilization of computing resources.
[0164] The following explains the method of "determining the second path based on the second port and the corresponding aggregation switch". The path between the second port and the second aggregation switch can be used as the first sub-path.
[0165] In some embodiments, the second aggregation switch includes multiple first aggregation ports (i.e., downlink ports of the aggregation switch). The first aggregation port corresponding to the second port can be determined from a pre-set correspondence between candidate second ports and candidate first aggregation ports, thereby using the path between the second port and the first aggregation port as the first sub-path. The first sub-path is the second path when the number of aggregation sublayers is 1. For details on determining the second path when the number of aggregation sublayers is 1, please refer to the description, which will not be repeated here.
[0166] The routing path between the second aggregation switch and the first aggregation switch is used as the second sub-path. In some embodiments, the second aggregation switch includes multiple first aggregation ports (i.e., downlink ports of the aggregation switch) and multiple second aggregation ports (i.e., uplink ports of the aggregation switch), wherein the first aggregation ports and the second aggregation ports correspond one-to-one, and the second aggregation port corresponding to the first aggregation port can be determined first.
[0167] The first aggregation switch includes multiple first aggregation ports. It can determine the first aggregation port corresponding to the second aggregation port from the pre-set correspondence between candidate first aggregation ports and candidate second aggregation ports, and thus use the path between the first aggregation port and the second aggregation port as the second sub-path. In other words, the path between the first aggregation port of the first aggregation switch and the second aggregation port of the second aggregation switch is used as the second sub-path.
[0168] After obtaining the first sub-path and the second sub-path, the second path can be determined based on the first and second sub-paths. In some embodiments, there are corresponding ports between the first and second sub-paths, wherein the corresponding ports belong to the same switch. The first and second sub-paths can be concatenated by the corresponding ports between them to determine the second path.
[0169] Referring to Figure 8, which is a schematic diagram of the routing path provided in an embodiment of this application, the following description, in conjunction with Figure 8, illustrates the method for determining the first path and the second path. Figure 8 shows block 801, which includes a first computing device 802 and a first access switch 806. The first computing device 802 is equipped with multiple network interface cards (NICs), and NIC 803 is shown in Figure 8. The first access switch 806 includes multiple ports, including a first port 804.
[0170] From the pre-set correspondence between candidate network cards and candidate first ports, the first port 804 corresponding to network card 803 is determined. After determining the first port 804 corresponding to network card 803, the path between network card 803 and first port 804 can be taken as the first path. In other words, the path between network card 803 of the first computing device 802 and the first port 804 of the first access switch 806 is the first path.
[0171] The first access switch 806 also includes a second port 805. The first port 804 and the second port 805 correspond one-to-one. After determining the first port 804 corresponding to the network card 803, the second port 805 corresponding to the network card 803 can be determined.
[0172] The second aggregation switch 808 includes a first aggregation port 807. From the pre-set correspondence between candidate second ports and candidate first aggregation ports, the first aggregation port 807 corresponding to the second port 805 is determined. The path between the second port 805 and the first aggregation port 807 can be used as the first sub-path. That is, the path between the second port 805 of the first access switch 806 and the first aggregation port 807 of the second aggregation switch 808 can be used as the first sub-path.
[0173] The second aggregation switch 808 also includes a second aggregation port 809. The first aggregation port 807 and the second aggregation port 809 have a one-to-one correspondence, allowing the determination of the second aggregation port 809 corresponding to the first aggregation port 807. The first aggregation switch 810 includes a first aggregation port 811. From a pre-set correspondence between candidate first aggregation ports and candidate second aggregation ports, the first aggregation port 811 corresponding to the second aggregation port 809 is determined, thus using the path between the second aggregation port 809 and the first aggregation port 811 as a second sub-path. In other words, the path between the second aggregation port 809 of the second aggregation switch 808 and the first aggregation port 811 of the first aggregation switch 810 can be used as a second sub-path.
[0174] The corresponding ports between the first sub-path and the second sub-path are concatenated. In Figure 8, the first sub-path is the path between the second port 805 and the first aggregation port 807, and the second sub-path is the path between the second aggregation port 809 and the first aggregation port 811.
[0175] The first aggregation port 807 corresponds to the second aggregation port 809, and both the first aggregation port 807 and the second aggregation port 809 belong to the second aggregation switch 808. The first sub-path between the second port 805 and the first aggregation port 807 can be concatenated with the second sub-path between the second aggregation port 809 and the first aggregation port 811 to determine the second path. Through the above method, the accurate first path and second path can be obtained.
[0176] In some embodiments, for a sub-path, at least two sub-target ports corresponding to the sub-paths can be determined, and then the corresponding sub-paths can be concatenated based on the sub-target ports to determine the sub-path of the concatenation interface as the corresponding path. For example, for a first sub-path and a second sub-path, the sub-target ports corresponding to the first sub-path and the second sub-path can be determined, and the first sub-path and the second sub-path can be concatenated based on the sub-target ports to obtain the concatenated sub-path, and the sub-path of the concatenation interface can be determined as the second path.
[0177] In step 1013, a routing path is determined based on the first path and the second path.
[0178] In some embodiments, step 1013 can be implemented in the following way: there are corresponding ports between the first path and the second path, and the corresponding ports belong to the same switch. The first path and the second path can be spliced based on the corresponding ports between the first path and the second path, so as to determine the routing path.
[0179] For example, in Figure 8, the second port 805 corresponds to the first port 804, and both the second port 805 and the first port 804 belong to the first access switch 806. Therefore, the first path and the second path can be spliced together to determine the routing path.
[0180] In some embodiments, the corresponding port is the target port, which is the uplink port and downlink port of the same switch. The target port in the first path and the second path can be determined. For example, referring to Figure 7, the target port can be the second port 705 and the first port 704 of the first interface switch 706.
[0181] Based on the target port, the first path and the second path are concatenated, and the concatenated path is determined as the routing path. For example, referring to Figure 7, after determining the target port, the first path and the second path can be concatenated based on the second port 705 and the first port 704 of the first interface switch 706 to obtain the target path. The target path is the path between network card 703, first port 704, second port 705 and first aggregation port 707.
[0182] By using steps 1011-1013, the number of aggregation sub-layers in the aggregation layer can be combined to accurately determine the routing path using different methods. The routing path is used for the second computing device to transmit data to the first computing device, thereby improving the accuracy of data transmission.
[0183] In some embodiments, the multi-layer network architecture further includes a core layer, which includes one or more core sub-layers, and each core sub-layer includes multiple core switches. In other words, the core layer includes multiple core switches.
[0184] When the number of core layers is 1, a first path between the network card and the first access switch in the access layer can be obtained, and a second path between the first access switch and at least one aggregation switch in the aggregation sublayer can be obtained. The methods for obtaining the first path and the second path can be found in the description of steps 1011 and 1012 shown in Figure 6, and will not be repeated here.
[0185] If the number of aggregation sublayers is 1, then the aggregation switch in the second path is the aggregation switch corresponding to the second port. If the number of aggregation sublayers is multiple, then the aggregation switch in the second path is the first aggregation switch. In other words, the aggregation sublayer to which the aggregation switch in the second path belongs is adjacent to the core layer.
[0186] In some embodiments, the target core switch corresponding to the aggregation switch in the second path can be determined from the pre-set correspondence between candidate aggregation switches and candidate core switches, and then the path between the aggregation switch in the second path and the target core switch can be used as the third path; the routing path is determined based on the first path, the second path and the third path.
[0187] In some embodiments, there are corresponding ports between the first path and the second path, and the corresponding ports belong to the same switch. The first path and the second path can be spliced based on the corresponding ports between them. Similarly, there are corresponding ports between the second path and the third path, and the corresponding ports belong to the same aggregation switch. The second path and the third path can be spliced based on the corresponding ports between them, thereby determining the routing path.
[0188] In some embodiments, the target port may include a first target port and a second target port. The first target port in the first path and the second path can be determined, and the second target port in the second path and the third path can be determined. Based on the first target port, the first path and the second path can be concatenated to obtain a first concatenated path. Based on the second target port, the first concatenated path and the third path can be concatenated to obtain a second concatenated path. The second concatenated path can be determined as the target path, which is equivalent to obtaining the target path.
[0189] When there are multiple core layers, a first path and a second path can be obtained. The methods for obtaining the first path and the second path can be found in the description of steps 1011 and 1012 shown in Figure 6, which will not be repeated here.
[0190] The core layer includes multiple core sublayers. The target core switch includes a first core switch and a second core switch. In other words, the core switch can include a first core switch and a second core switch. The first core switch and the second core switch belong to different core sublayers. The first core switch and the second core switch are connected. The second core switch is connected to the aggregation switch in the second path.
[0191] Of course, a third core switch can be configured according to actual usage requirements. This third core switch belongs to a different aggregation sublayer than the first core switch, and also to the second core switch, thus determining the third path. In other words, the number of core switches belonging to different core sublayers can be set according to actual usage requirements.
[0192] In some embodiments, the target core switch corresponding to the aggregation switch in the second path can be determined from the pre-set correspondence between candidate aggregation switches and candidate core switches. The target core switch is the second core switch.
[0193] The path between the aggregation switch and the second core switch in the second path can be designated as the fifth sub-path, and the path between the second core switch and the first core switch can be designated as the sixth sub-path. Then, based on the fifth and sixth sub-paths, the third path can be determined. The method for determining the third path is equivalent to the method for determining the second path, and will not be elaborated here. Finally, based on the first, second, and third paths, the routing path can be determined.
[0194] In some embodiments, for the fifth sub-path and the sixth sub-path, the sub-target ports corresponding to the fifth sub-path and the sixth sub-path can be determined. Based on the sub-target ports, the fifth sub-path and the sixth sub-path are concatenated to obtain the concatenated sub-path. The sub-path of the concatenation interface is determined as the third path.
[0195] In the data transmission method provided in this application embodiment, the number of aggregation sub-layers in the aggregation layer and the number of core sub-layers in the core layer can be combined to accurately determine the routing path using different methods. Specifically, the number of aggregation sub-layers is consistent with the number of sub-paths corresponding to each aggregation sub-layer; the number of sub-paths corresponding to each aggregation sub-layer is the number of sub-paths used to determine the second path. Similarly, the number of core sub-layers is consistent with the number of sub-paths corresponding to each core sub-layer; the number of sub-paths corresponding to each core sub-layer is the number of sub-paths used to determine the third path. This routing path is used for data transmission from the second computing device to the first computing device, thereby improving the accuracy of data transmission.
[0196] In step 102, the routing path is sent to the second access switch in the access layer.
[0197] In some embodiments, step 102 can be implemented in the following way: the first access switch belongs to the first block. See Figure 9. Figure 9 is a schematic flowchart of the data transmission method provided in the embodiments of this application. The steps 102 shown in Figure 5 will be described below with reference to the steps shown in Figure 9.
[0198] In step 1021, based on the first identifier of the first access switch, a second identifier that matches the first identifier is searched from the identifiers of the access switches belonging to the second block.
[0199] In some embodiments, the first identifier is a first number, the number of access switches belonging to the second block is multiple, and the identifier of the access switches belonging to the second block is a second number. Referring to Figure 10, which is a schematic flowchart of the data transmission method provided in this application embodiment, step 1021 shown in Figure 9 will be described below with reference to the steps shown in Figure 10.
[0200] In step 10211A, for each second number, the difference between the first number and the second number is determined.
[0201] In order to enable network cards with the same address corresponding to computing devices belonging to different blocks to transmit data through the same switch, thereby improving data transmission efficiency, the number of network cards in each block is the same. For each block, the network cards can be ordered, and the access switches in the block can be ordered according to the order of the network cards. The first number and the first number can be set according to the order of the access switches.
[0202] The first number is used to identify the first access switch in the first block. This first number uniquely identifies the first access switch. For example, if the first block includes the first access switch and access switch 1, the first number of the first access switch is 1. Each access switch in the second block has a second number, and these second numbers correspond one-to-one with the access switches in the second block. To determine the second number, the difference between the first number and each second number can be determined first.
[0203] In step 10212A, if the quotient of the difference and the preset third number is the target value, then the second number is used as the second identifier that matches the first identifier.
[0204] In some embodiments, the third number is the number of access switches in the first access switch's home block (i.e., the first block) corresponding to the access layer. The number of access switches in the first block can be determined based on the number of ports of the access switches and the number of network interface cards (NICs) in the first block.
[0205] The setting method of the target value will be explained below. In this embodiment, the target value is preset. The target value is related to the setting method of the first number and the second number. For access switches located at the same address in the block, if the first number corresponding to the first access switch is the same as the second number of the access switch at the corresponding address in the second block, the target value is 0.
[0206] If the first number corresponding to the first access switch is inconsistent with the second number of the access switch corresponding to the address in the second block, and the target difference between the first number and the second number corresponding to that address is consistent with the target difference between the number and the second number corresponding to other addresses, then the target value includes the absolute value of the integer corresponding to the quotient of the target difference and the third number, as well as the remainder.
[0207] If the quotient is not the target value, it means that the second number cannot be used as the second identifier that matches the first identifier. If the quotient is the target value, it means that the second number can be used as the second identifier that matches the first identifier.
[0208] If the quotient is not the target value when the target value is 0, it means that the remainder of the first number divided by the third number is different from the remainder of the second number divided by the third number. Therefore, the second number cannot be used as the second identifier that matches the first identifier.
[0209] If the quotient is the target value, it means that the remainder when the first number is divided by the third number is the same as the remainder when the second number is divided by the third number. That is, the first number and the second number are congruent modulo N, where N is the quotient of the difference and the third number. This means that the second number can be used as the second identifier that matches the first identifier.
[0210] For example, the number of access switches in the first block is 2, the first block includes the first access switch, the second block includes access switch 2 and access switch 3, the first number of the first access switch is 3, the second number of the access switch 2 is 3, and the second number of the access switch 3 is 4.
[0211] Calculate the difference between the first number and the second number of the access switch 2. If the difference is 0, the number of access switches is 2. If the quotient of the difference and the third number (the number of access switches) is 0, then the second number (3) can be used as the second identifier that matches the first identifier.
[0212] Calculate the difference between the first number and the second number of the access switch 3. The difference is -1. The number of access switches is 2. The quotient of the difference and the third number (the number of access switches) is not 0. This means that the second number (4) cannot be used as the second identifier that matches the first identifier.
[0213] For example, the target value includes an integer with an absolute value of 2 and a remainder of 2, the number of access switches in the first block is 2, the first block includes the first access switch, and the second block includes access switch 4 and access switch 5.
[0214] The first number of the first access switch is 3, the second number of the access switch 4 is 13, and the second number of the access switch 5 is 14. Calculate the difference between the first number and the second number of the access switch 4. The difference is -10. The number of access switches is 2. The quotient of the difference and the third number (the number of access switches) is 2 remainder 2. The quotient is the target value. The second number (13) can be used as the second identifier that matches the first identifier.
[0215] Calculate the difference between the first number and the second number of the access switch 8. The difference is -11. The number of access switches is 2. The quotient of the difference and the third number (the number of access switches) is 2 with a remainder of 3. The quotient is not the target value, indicating that the second number (14) cannot be used as the second identifier that matches the first identifier.
[0216] By using steps 10211A-10212A, the second identifier that matches the first identifier can be accurately found. The second identifier is used to identify the second access switch, which is equivalent to accurately identifying the second access switch.
[0217] In some embodiments, referring to FIG11, FIG11 is a schematic flowchart of the data transmission method provided in the present application. The steps 1021 shown in FIG9 will be described below with reference to the steps shown in FIG11.
[0218] In step 10211B, the target identifier corresponding to the first identifier is determined from the pre-set correspondence between candidate first identifiers and candidate target identifiers based on the first identifier of the first access switch.
[0219] In some embodiments, in order to enable network cards with the same address corresponding to computing devices belonging to different blocks to transmit data through the same switch, thereby improving the efficiency of data transmission, each block includes the same number of network cards. For two different blocks, network cards with the same address can be marked, and then a corresponding relationship can be set between the marks of the switches connecting network cards with the same address.
[0220] Step 10211B can be implemented in the following way: based on the first identifier of the first access switch, determine the target identifier corresponding to the first identifier from the pre-set correspondence between candidate first identifiers and candidate target identifiers.
[0221] The first identifier can be an identifier set by the user according to actual usage needs. In some embodiments, the first identifier can be the name of the first access switch. Correspondingly, the pre-set correspondence between the candidate first identifier and the candidate target identifier is the pre-set correspondence between the name of the candidate access switch in the first block and the target name of the candidate access switch, that is, the target identifier is the target name.
[0222] In some embodiments, the first identifier can be a string of the first access switch. Correspondingly, the pre-set correspondence between the candidate first identifier and the candidate target identifier is the pre-set correspondence between the strings of the candidate access switches in the first block and the target strings of the candidate access switches, that is, the target identifier is the target string.
[0223] In step 10212B, an identifier that matches the target identifier is found from the identifiers of the access switches belonging to the second block and used as the second identifier that matches the first identifier.
[0224] In some embodiments, in step 10212B, after determining the target identifier corresponding to the first identifier, an identifier matching the target identifier can be found from the identifiers of the access switches belonging to the second block as the second identifier matching the first identifier. Through steps 10211B-10212B, the target identifier matching the first identifier can be accurately found, and the target identifier is used to determine the second access switch, which is equivalent to accurately determining the second access switch.
[0225] In step 1022, the access switch indicated by the second identifier is designated as the second access switch, and the routing path is sent to the second access switch.
[0226] In some embodiments, the second access switch can forward data sent by the second computing device to the network interface card (NIC) corresponding to the destination address to the NIC based on a routing path, wherein the destination address is the address of the NIC on the first computing device. The second computing device is equipped with multiple NICs. In some embodiments, the second access switch can forward data sent by the NICs of the second computing device to the NIC corresponding to the destination address to the NIC based on a routing path.
[0227] In some embodiments, the second access switch can receive data from the second computing device that corresponds to the network interface card (NIC) at the destination address. The destination address may include the NIC's identifier, which may be the NIC's name, a string that uniquely identifies the NIC, or the NIC's identifier may also consist of the NIC's name and the identifier of the computing device where the NIC is located.
[0228] The second access switch can select the routing path corresponding to the network card identifier from the pre-received routing paths based on the network card identifier. The routing path includes the path between the aggregation switch and the first access switch. In order to forward the network card data through the routing path, the data of the network card corresponding to the destination address sent by the second computing device can be sent to the aggregation switch according to the connection relationship between the second access switch and the aggregation switch in the routing path.
[0229] Furthermore, the aggregation switch can send the data corresponding to the destination address of the second computing device to the first access switch according to the second path, and the first access switch can send the data corresponding to the destination address of the second computing device to the network card of the first computing device according to the first path.
[0230] To facilitate understanding of the data transmission method provided in this application embodiment, please refer to Figure 12, which is a schematic diagram of the routing path provided in this application embodiment. Figure 12 shows a first block 1210 and a second block 1220. The first block 1210 includes a first computing device 1201 and a first access switch 1204. The first computing device 1201 is equipped with multiple network interface cards (NICs), and the first NIC 1202 is shown in Figure 12. The first access switch 1204 includes multiple ports, including a first port 1203 and a second port 1205, wherein the first port 1203 and the second port 1205 correspond one-to-one.
[0231] The first network interface card 1202 is connected to the first port 1203. The first port 1203 corresponding to the first network interface card 1202 is determined from the pre-set correspondence between candidate network interface cards and candidate first ports. After determining the first port 1203 corresponding to the first network interface card 1202, the path between the first network interface card 1202 and the first port 1203 can be used as the first path.
[0232] In other words, the path between the first network card 1202 of the first computing device 1201 and the first port 1203 of the first access switch 1204 can be used as the first path. After determining the first port 1203 corresponding to the first network card 1202, the second port 1205 corresponding to the first network card 1202 can be determined.
[0233] Aggregation switch one includes a first aggregation port 1206. From a pre-set correspondence between candidate second ports and candidate first aggregation ports, the first aggregation port 1206 corresponding to the second port 1205 is determined. The path between the second port 1205 and the first aggregation port 1206 can be used as the second path. In other words, the path between the second port 1205 of the first access switch 1204 and the first aggregation port 1206 of aggregation switch one can be used as the second path.
[0234] After obtaining the first and second paths, in Figure 12, the second port 1205 corresponds to the first port 1203, and both the second port 1205 and the first port 1203 belong to the first access switch 1204. Therefore, the first and second paths can be concatenated to determine the second path. Through this method, the first and second paths can be accurately determined, and thus the routing path can be accurately determined.
[0235] In some embodiments, the first identifier of the first access switch 1204 is 1204. A correspondence between 1204 and 1212 (target identifier) is pre-set. Therefore, the target identifier (1212) corresponding to 1204 can be determined, and the access switch corresponding to 1212 in the second block 1220 can be used as the second access switch 1212.
[0236] The second access switch 1212 and the second computing device 1207 both belong to the second block 1220. The second computing device 1207 is equipped with multiple network cards. The second network card 1213 is shown in Figure 12. The second access switch 1212 includes multiple ports, including a first port 1211 and a second port 1209, wherein the first port 1211 and the second port 1209 correspond to each other.
[0237] From the pre-set correspondence between candidate network cards and candidate first ports, the first port 1211 corresponding to the second network card 1213 is determined. The address of the first network card 1202 in the first computing device 1201 is the destination address. The second computing device 1207 can send the data of the first network card 1202 corresponding to the destination address to the second access switch 1212.
[0238] In other words, the second network card 1213 can send the data of the first network card 1202 to the second access switch 1212 through the connection relationship between the second network card 1213 and the first port 1211. The first port 1211 corresponds to the second port 1209.
[0239] The second access switch 1212 can send the data of the first network card 1202 to the first aggregation switch 1 through the connection between the second port 1209 and the first aggregation port 1206. Then, the data of the first network card 1202 can be sent to the first access switch 1204 through the second path.
[0240] The first access switch 1204 can send data from the first network card 1202 to the first network card 1202 through the first path. In this way, it is possible to forward data sent by the second computing device 1207 to the first network card 1202 with the destination address corresponding to the first network card 1202 based on the routing path.
[0241] In the data transmission method provided in this application embodiment, each network card of the first computing device has a one-to-one corresponding routing path. The second computing device can send data to any network card of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, this application uses the routing path corresponding to the network card for data transmission, thereby achieving load balancing of the switch for data transmission between the first computing device and the second computing device and increasing the data transmission rate. That is, the data transmission method provided in this application embodiment can improve the efficiency of data transmission and solve the above-mentioned technical problems 1 and 3.
[0242] Furthermore, in the data transmission method provided in this application embodiment, when the second computing device in the second block sends data to the first computing device in the first block, there is no need to select the second access switch in the second block in real time, then select the aggregation switch, and then select the access switch in the first block, etc., which can save computing resources and improve the resource utilization rate of computing resources.
[0243] In some embodiments, for scenarios involving training artificial intelligence models, a large amount of data needs to be transmitted between computing devices. Since the data transmission method provided in this application uses the routing path corresponding to the network card for data transmission, it achieves load balancing of the switch for data transmission between the first and second computing devices, increasing the data transmission rate. In other words, the data transmission method provided in this application can improve data transmission efficiency, thereby improving the efficiency of training artificial intelligence models. This solves the aforementioned technical problem 2.
[0244] In the data transmission method provided in this application embodiment, a server equipped with an SDN controller can send a routing path to the access switch. This is equivalent to pre-planning a routing path for data transmission for the switch that needs to transmit data, reducing routing path conflicts during data transmission, improving the success rate of data transmission, and increasing the efficiency of data transmission.
[0245] In some embodiments, after step 102 shown in FIG5, first operating information of the first access switch and second operating information of the aggregation switch can be obtained. In some embodiments, operating information of each access switch in the access layer can be obtained.
[0246] Specifically, it can obtain the operational information of each access switch in the access layer, including first operational information. It can also obtain the operational information of each aggregation switch in the aggregation layer, which includes the operational information of aggregation switches in each aggregation sublayer, and includes second operational information of the aggregation switches. The operational information refers to the information generated by the access switches during operation.
[0247] The first operating information is described below. The first operating information includes the first port information of the first access switch. The number of first port information may include one or more. The first port information is the first link information between the ports connected to the port. In some embodiments, the first link information may be the link information between the first port and the network card and the link information between the second port and the first aggregation port. The first link information may include link status information, link bandwidth information, link latency information, etc.
[0248] The link status information can be the working status of the link formed by multiple ports, which can be active, inactive, congested, etc. The link status information can also be information indicating whether multiple ports are connected.
[0249] The bandwidth information of a link can be the data transmission rate of the link. The latency information of a link is the time required to transmit data from one port to another in the link. The status information of the link can be determined based on the bandwidth information and the latency information.
[0250] The first operational information may also include the first system information of the first access switch. This first system information may include the temperature of the first access switch, its operating time, and its packet loss rate, etc., which can be configured according to actual usage requirements. The system information represents the temperature, operating time, and packet loss rate of the access switch under operating conditions.
[0251] The operation information of the access switch in the access layer is the same as the first operation information. The second operation information may include the second port information of the aggregation switch and the second system information of the aggregation switch. The second port information may include the second link information between the ports connected to the port. The second link information may include the link status information, the link bandwidth information, the link delay information, etc.
[0252] The second system information includes the temperature of the aggregation switch, the runtime of the aggregation switch, the number of ports of the aggregation switch, etc., which can be used as an equivalent replacement for the description of the first port information, and will not be elaborated here.
[0253] After obtaining the first running information and the second running information, it can be determined whether the first running information indicates that there is an anomaly in the routing path, and it can also be determined whether the second running information indicates that there is an anomaly in the routing path.
[0254] In the case where at least one of the first and second operating information indicates that the routing path is abnormal, it is said that the operating information indicates that the routing path is operating abnormally. The operating information includes at least one of the first and second operating information. In the case where at least one of the first and second operating information indicates that the routing path is not abnormal, it is said that the operating information indicates that the routing path is operating normally. The following is an explanation with examples.
[0255] In some embodiments, regarding the first and second operational information, if the link status information indicates that the link's operating state is congested, it indicates that the routing path is abnormal, meaning the routing path is operating abnormally. If the link status information indicates that the link's operating state is active, it indicates that the routing path is not abnormal, meaning the routing path is operating normally.
[0256] Link status information indicating a lack of connection between multiple ports suggests a damaged network cable, or a line fault, which in turn indicates an abnormal routing path, meaning the routing path is malfunctioning. Conversely, link status information indicating a connection between multiple ports and that the network cable is not congested suggests that the network cable is not damaged, or the line is not faulty, which in turn indicates that the routing path is functioning normally.
[0257] If the data transmission rate indicated by the link's bandwidth information is less than a preset first transmission rate threshold, it indicates an anomaly in the routing path, meaning the routing path is malfunctioning. If the data transmission rate indicated by the link's bandwidth information is greater than or equal to the preset first transmission rate threshold, it indicates that the routing path is functioning normally.
[0258] If the link latency information indicates that the time required for transmission from one port to another on the link is greater than a preset first time threshold, it indicates that the routing path is abnormal, meaning the routing path is malfunctioning. If the link latency information indicates that the time required for transmission from one port to another on the link is less than or equal to the preset first time threshold, it indicates that the routing path is not abnormal, meaning the routing path is functioning normally.
[0259] Regarding the first system information, if the temperature of the first access switch is greater than the preset temperature threshold, it indicates that the first access switch is malfunctioning, meaning the routing path is abnormal or not operating correctly. If the temperature of the first access switch is less than or equal to the preset temperature threshold, it indicates that the first access switch is functioning correctly, meaning the routing path is operating normally.
[0260] If the runtime of the first access switch exceeds the preset runtime threshold, it indicates that the routing path is abnormal, meaning the routing path is malfunctioning. If the runtime of the first access switch is less than or equal to the preset runtime threshold, it indicates that the routing path is functioning normally, meaning the routing path is operating normally.
[0261] If the packet loss rate of the first access switch is greater than the preset packet loss rate threshold, it indicates that the routing path is abnormal, meaning the routing path is not operating correctly. If the packet loss rate of the first access switch is less than or equal to the preset packet loss rate threshold, it indicates that the routing path is not abnormal, meaning the routing path is operating normally.
[0262] If the first operating information indicates that the routing path is not abnormal, and the second operating information indicates that the routing path is not abnormal, that is, if the first operating information indicates that the routing path is operating normally, and the second operating information indicates that the routing path is operating normally, then the routing path does not need to be changed. That is, the second access switch will still forward the data sent by the second computing device to the network card corresponding to the destination address based on the routing path.
[0263] If at least one of the first and second operating information indicates that the routing path is abnormal, that is, if at least one of the following conditions exists: the first operating information indicates that the routing path is abnormal, and the second operating information indicates that the routing path is abnormal (i.e., the operating information indicates that the routing path is operating abnormally), then a new routing path for transmitting data to the network card is obtained, and the new routing path is sent to the second access switch in the access layer.
[0264] The second access switch is further configured to replace the routing path with a new routing path, and based on the new routing path, forward the data sent by the second computing device to the network interface card (NIC) corresponding to the destination address. It should be noted that the "new routing path" in this embodiment is merely used to distinguish it from the "routing path," and does not refer to the re-establishment of a routing path.
[0265] In some embodiments, a new routing path carrying a routing priority can be sent to a second access switch in the access layer, wherein the routing priority of the new routing path is higher than the routing priority of the original routing path. The second access switch can receive the new routing path with a routing priority higher than the original routing path.
[0266] In other words, the second access switch can receive two routing paths with different routing priorities, which can be a new routing path and a routing path. In some embodiments, the second access switch is also used to replace the routing path with the new routing path based on the routing priority of the new routing path.
[0267] For example, the routing priority of route path 3 can be identified as 400. A new route path (route path 4) with an identification of 500 can be sent to the second access switch. The access switch can compare the routing priorities of route path 3 and route path 4. Since 500 is greater than 400, route path 3 can be replaced with the new route path (route path 4).
[0268] In some embodiments, a new routing path carrying a pre-set replacement identifier can be sent to a second access switch in the access layer. The replacement identifier can be set according to the user's actual needs. For example, the replacement identifier may include the name of the routing path, the name of the switch in the routing path, the name of the network card in the routing path, etc., which are all reasonable.
[0269] In other words, the second access switch can receive the routing path and the new routing path carrying the replacement identifier. In some embodiments, the second access switch is also used to replace the routing path with the new routing path based on the replacement identifier.
[0270] In some embodiments, referring to FIG13, FIG13 is a schematic flowchart of the data transmission method provided in the embodiments of this application. The following describes the method of obtaining a new routing path for transmitting data to the network card in conjunction with the steps shown in FIG13.
[0271] In step 1301, a third access switch is determined from the access switches included in the block to which the first access switch belongs.
[0272] In some embodiments, the first operational information indicates an anomaly in the routing path, which may include one or more of the following: First anomaly: An anomaly exists in the first access switch. Second anomaly: An anomaly exists in the connection between the first access switch and the network interface card (NIC). Third anomaly: An anomaly exists in the connection between the first access switch and the aggregation switch.
[0273] In cases where the first operational information indicates an anomaly in the routing path, i.e., when the routing path is malfunctioning, a third access switch can be determined from the access switches included in the block to which the first access switch belongs. In some embodiments, for the second and third scenarios described above, the third access switch can be the first access switch.
[0274] For example, referring to Figure 14, which is a schematic diagram of the routing path provided in an embodiment of this application. Figure 14 follows from Figure 12. When the first operation information of the first access switch 1204 indicates that the routing path is abnormal, at least one of the second and third situations described above may exist, and the first access switch 1204 may be used as the third access switch.
[0275] In some embodiments, for the first scenario described above, the third access switch is not the first access switch. For example, the block to which the first access switch belongs includes access switch a, access switch b, and access switch c, wherein access switch a is the first access switch, and for the first scenario described above, the third access switch can be access switch b or access switch c.
[0276] In some embodiments, a third access switch can be determined based on the operation information of the access switch. In some embodiments, the access switch with the highest data transmission rate represented by the link bandwidth information in the operation information can be used as the third access switch.
[0277] In some embodiments, any access switch whose data transmission rate is less than a second transmission rate threshold can be represented by the bandwidth information of the link in the operation information as a third access switch, wherein the second transmission rate threshold is greater than the first transmission rate threshold.
[0278] In some embodiments, the access switch whose link latency information in the operational information indicates the shortest transmission time from one port in the link to another can be designated as the third access switch. In other embodiments, the access switch whose link latency information in the operational information indicates the transmission time from one port in the link to another is less than a preset second time threshold can be designated as the third access switch. Here, the second time threshold is less than a first time threshold. Of course, the third access switch can also be determined based on other operational information, and no specific limitations are made here.
[0279] In step 1302, the target network card corresponding to the third access switch is determined from the pre-set correspondence between candidate network cards and candidate access switches.
[0280] After identifying the third access switch, the target network interface card (NIC) corresponding to the third access switch can be determined from the pre-set correspondence between candidate NICs and candidate access switches. The pre-set correspondence between candidate NICs and candidate access switches is explained below.
[0281] For any computing device and access switch in any block, the network card of the computing device can be connected to a port of the access switch via a network cable, where there is a one-to-one correspondence between the network card and the interface.
[0282] For example, referring to Figure 15, which is a schematic diagram of the connection relationship between the computing device and the access switch provided in the embodiment of this application, block 1501 includes a first computing device 1502 and four access switches. Access switch one, access switch two, access switch three and access switch four are shown in Figure 15. The first computing device 1502 is equipped with 16 network cards, and the first network card 1503 and the second network card 1506 are shown in Figure 15.
[0283] Each of the four access switches includes four first ports, which can also be called downlink ports. Figure 15 only shows the first port 1504 of access switch one and the first port 1507 of access switch four. Correspondingly, each of the four access switches includes four second ports, which can also be called uplink ports.
[0284] For each network interface card (NIC), it can be connected to one of the 16 first ports of the four access switches, with a one-to-one correspondence between the NIC and the first port. Figure 15 only shows the connection between the first NIC 1503 and the first port 1504 of access switch one, and the connection between the second NIC 1506 and the first port 1507 of access switch four. The other NICs are equivalent to the first NIC 1503 and will not be described in detail here.
[0285] In other words, by analyzing the connection between the network interface card (NIC) and the first port, the correspondence between candidate NICs and candidate first ports can be determined, which is equivalent to obtaining the correspondence between candidate NICs and candidate access switches. Furthermore, from the correspondence between candidate NICs and candidate access switches, the target NIC corresponding to the third access switch can be determined.
[0286] For example, in Figure 15, the third access switch can be access switch four. Based on the correspondence between the second network card 1506 and access switch four, the target network card can be determined to be the second network card 1506. In this way, the target network card can be accurately determined.
[0287] In step 1303, the path between the target network card and the third access switch is taken as the new first path.
[0288] In some embodiments, after determining the target network interface card (NIC) and the third access switch, the path between the target NIC and the third access switch can be used as the new first path. Here, the term "new first path" in this embodiment is used only to distinguish it from "first path," and does not refer to re-establishing the first path.
[0289] The target network interface card (NIC) is connected to the new first port in the third access switch. Therefore, the path between the target NIC and the new first port can be considered the new first path. In this way, the accurate new first path can be determined. In this embodiment, "new first port" is used only to distinguish it from "first port," and does not refer to the re-creation of the first port.
[0290] In step 1304, the path between the third access switch and the aggregation switch is taken as the new second path.
[0291] In some embodiments, the path between the second port of the third access switch and the aggregation interface of the aggregation switch can be used as the new second path. In this embodiment, the term "new second path" is used only to distinguish it from "second path" and does not refer to re-establishing the second path.
[0292] If there are multiple aggregation sub-layers, the path between the second port of the third access switch and the aggregation interface of the aggregation switch can be used as the new first sub-path, and the path between the aggregation interface of the aggregation switch and the aggregation interface of the aggregation switch in another aggregation sub-layer can be used as the new second sub-path.
[0293] Then, a new second path is determined based on the new first sub-path and the new second sub-path. In this embodiment, the "new first sub-path" is only used to distinguish it from the "first sub-path," not to refer to the re-establishment of the first sub-path. Similarly, the "new second sub-path" is only used to distinguish it from the "second sub-path," not to refer to the re-establishment of the second sub-path. Equivalent substitutions can be made for the method of determining the routing path, which will not be elaborated here. In this way, an accurate new second path can be determined.
[0294] In step 1305, a new routing path is determined based on the new first path and the new second path. Step 1305 is equivalent to step 1013, and the description of step 1013 can be referred to, with equivalent substitutions, and will not be repeated here.
[0295] In some embodiments, the target network interface card (NIC) is used to forward the data of the NIC to the NIC after receiving the data of the NIC sent by the second access switch based on the new routing path. The data of the NIC corresponds to the destination address sent by the second computing device.
[0296] In some embodiments, any existing technology capable of enabling data transmission between multiple network interface cards (NICs) of the same computing device can be employed to achieve data forwarding from one NIC to another. For example, Remote Direct Memory Access (RDMA) can be used to achieve this. RDMA can improve the throughput of the computing device and reduce network communication latency. Alternatively, Peripheral Component Interconnect Express (PCIe) can also be used.
[0297] In some embodiments, regarding the method of obtaining a new routing path for transmitting data to the network interface card (NIC) shown in FIG13, in some embodiments, the second access switch can receive data from the second computing device corresponding to the NIC with the destination address, and then, according to the connection relationship between the second access switch and the aggregation switch, send the data from the second computing device to the aggregation switch with the destination address corresponding to the NIC. The aggregation switch is the aggregation switch corresponding to the new second path.
[0298] The aggregation switch can send data from the network card to the third access switch based on the new second path. The third access switch can then send data from the network card to the network card. In this way, it is possible to forward data from the second computing device to the network card corresponding to the destination address based on the new routing path.
[0299] For example, referring to Figure 14, the second network card 1213 of the second computing device 1207 can send the data of the first network card 1202 corresponding to the destination address to the third network card 1405 first, and then the third network card 1405 sends the data of the first network card 1202 to the second access switch 1212 based on the connection relationship with the first port 1406 in the second access switch 1212.
[0300] The second access switch 1212 can send data from the first network card 1202 to the second aggregation switch through the connection between the second port 1407 and the first aggregation port 1404 in the second aggregation switch. In Figure 14, the new first path is the path between the fourth network card 1401 of the first computing device 1201 and the first port 1402 of the first access switch 1204, and the new second path is the path between the second port 1403 of the first access switch 1204 and the first aggregation port 1404 in the second aggregation switch.
[0301] Aggregation switch 2 can send data from the first network interface card (NIC) 1202 to the first access switch 1204 according to the new second path. The first access switch 1204 can then send the data from the first NIC 1202 to the fourth NIC 1401 according to the new first path. The fourth NIC 1401 can then send the data from the first NIC 1202 back to the first NIC 1202. In this way, data from the second computing device corresponding to the destination address can be forwarded to the NIC based on the new routing path.
[0302] As can be seen, the data transmission method provided in this application embodiment can replace the routing path with a new routing path when there is an anomaly in the routing path, thereby ensuring the stability of data transmission. It can avoid problems such as low efficiency of data transmission between computing devices and reduced communication bandwidth caused by congestion in the routing path. Thus, it can improve the efficiency of data transmission and increase the communication bandwidth while ensuring the stability of data transmission, and can solve the above-mentioned technical problem 4.
[0303] In some embodiments, referring to FIG16, FIG16 is a schematic flowchart of the data transmission method provided in the embodiments of this application. The following describes the method of obtaining a new routing path for transmitting data to the network card in conjunction with the steps shown in FIG16.
[0304] In step 1601, when the abnormality of the routing path is caused by a failure of the aggregation switch or by a line failure between the first access switch and the aggregation switch, a third aggregation switch is determined from the aggregation switches included in the aggregation sublayer to which the aggregation switch belongs.
[0305] In the event that the second operation information indicates an abnormality in the routing path, that is, in the event that the abnormality in the routing path is caused by a fault in the aggregation switch, the abnormality in the routing path is caused by a line fault between the first access switch and the aggregation switch (first aggregation switch), or the abnormality in the routing path is caused by a line fault between the first aggregation switch and the second aggregation switch, the third aggregation switch can be determined from the aggregation switches included in the aggregation sublayer to which the aggregation switch belongs.
[0306] For example, referring to Figure 17, which is a schematic diagram of the routing path provided in the embodiment of this application, Figure 17 follows from Figure 12. The aggregation sublayer also includes aggregation switch three located in the same aggregation sublayer as aggregation switch one. If the abnormality of the routing path is caused by a fault of aggregation switch one, or by a line fault between the first access switch 1204 and aggregation switch one, the third aggregation switch can be determined from the aggregation switches included in the aggregation sublayer to which aggregation switch one belongs. The third aggregation switch is aggregation switch three.
[0307] In step 1602, a fourth path is determined based on the first access switch and the third aggregation switch.
[0308] In some embodiments, the number of aggregation sublayers is 1, and the path between the second port of the first access switch and the aggregation port of the third aggregation switch can be determined as the fourth path. For example, referring to Figure 17, the path between the second port 1703 of the first access switch 1204 and the first aggregation port 1702 of the third aggregation switch can be used as the fourth path.
[0309] In some embodiments, there are multiple aggregation sub-layers. The path between the first access switch and the third aggregation switch can be used as the third sub-path. For details on determining the fourth path when the number of aggregation sub-layers is 1, please refer to the description.
[0310] Based on the pre-set correspondence between candidate third aggregation switches and candidate fourth aggregation switches, the fourth aggregation switch corresponding to the third aggregation switch is determined. The third aggregation switch and the fourth aggregation switch belong to different aggregation sublayers.
[0311] The path between the third and fourth aggregation switches is used as the fourth sub-path. In some embodiments, the path between the aggregation port of the third and fourth aggregation switches can be used as the fourth sub-path. The fourth path is determined based on the third and fourth sub-paths. The method for determining the fourth path can be found in the description of determining the second path, and will not be repeated here.
[0312] In step 1603, the second path in the routing path is replaced with the fourth path to obtain a new routing path. In other words, the new routing path can be determined by the first path and the fourth path, and in this way, an accurate new routing path can be obtained.
[0313] In some embodiments, regarding the method of obtaining a new routing path for transmitting data to the network interface card (NIC) shown in FIG16, in some embodiments, the second access switch can receive data from the second computing device corresponding to the NIC with the destination address, and then, according to the connection relationship between the second access switch and the aggregation switch, send the data from the second computing device to the aggregation switch with the destination address corresponding to the NIC. The aggregation switch is the aggregation switch corresponding to the new second path.
[0314] The aggregation switch can send data from the network card to the first access switch based on the new second path. The first access switch can then send data from the network card to the network card. In this way, it is possible to forward data from the second computing device to the network card corresponding to the destination address based on the new routing path.
[0315] For example, referring to Figure 17, the second computing device 1207 can send data from the first network card 1202 corresponding to the destination address to the second access switch 1212. The second access switch 1212 can send the data from the first network card 1202 to the third aggregation switch through the connection between the second port 1704 and the first aggregation port 1702 in the third aggregation switch.
[0316] In Figure 17, the fourth path is the path between the first aggregation port 1702 of aggregation switch 3 and the second port 1703 of the first access switch 1204. Aggregation switch 3 can send data from the first network card 1202 to the first access switch 1204 according to the fourth path, and the first access switch 1204 can send data from the first network card 1202 back to the first network card 1202 according to the first path. In this way, data sent by the second computing device to the network card corresponding to the destination address can be forwarded to the network card based on the new routing path.
[0317] As can be seen, the data transmission method provided in this application embodiment can replace the routing path with a new routing path when there is an anomaly in the routing path, thereby ensuring the stability of data transmission. It can avoid problems such as low efficiency of data transmission between computing devices and reduced communication bandwidth caused by congestion in the routing path. Thus, it can improve the efficiency of data transmission and increase the communication bandwidth while ensuring the stability of data transmission, and can solve the above-mentioned technical problem 4.
[0318] In some embodiments, the data transmission method provided in this application can periodically execute the step "obtain first operating information of the first access switch and obtain second operating information of the aggregation switch". That is, it can periodically obtain first operating information and second operating information to determine whether the operating information changes from indicating that the routing path is abnormal to indicating that the routing path is not abnormal. In other words, it determines whether the operating information changes from indicating that the routing path is abnormally running to indicating that the routing path is running normally. The operating information corresponds to at least one of the first operating information and the second operating information.
[0319] If the operation information does not change from indicating abnormal operation of the routing path to normal operation, that is, if the operation information still indicates abnormal operation of the routing path, then the second access switch can forward the data sent by the second computing device to the network card corresponding to the destination address to the network card based on the new routing path.
[0320] If the operational information changes from indicating abnormal routing path operation to normal routing path operation, a new routing path deletion command is sent to the second access switch in the access layer, and the second access switch then deletes the new routing path. In this way, after the routing path returns to normal, the new routing path can be deleted, ensuring load balancing of the switches transmitting data between the first and second computing devices, and increasing the data transmission rate. In other words, the data transmission method provided in this application embodiment can improve data transmission efficiency.
[0321] The second data transmission method provided in the embodiments of this application will be described below. As mentioned above, the second electronic device that implements the data transmission method provided in the embodiments of this application can be a switch. In some embodiments, it can be an access switch of the access layer.
[0322] Referring to Figure 18, which is a flowchart illustrating the data transmission method provided in this application embodiment, the data transmission method provided in this application embodiment will be described below with reference to the steps shown in Figure 18. The execution subject of the data transmission method is the second access switch.
[0323] The data transmission method provided in this application embodiment is applied to a multi-layer network architecture, which includes an access layer and an aggregation layer. The aggregation layer includes at least one aggregation sub-layer. The access layer includes multiple access switches, each access switch is connected to at least one first computing device, and each first computing device is equipped with at least one network card. The aggregation sub-layer includes multiple aggregation switches. For details, please refer to the description of the first data transmission method, which will not be repeated here.
[0324] In step 1801, the second access switch in the access layer receives the routing path for transmitting data to the network card in the first computing device.
[0325] There is a one-to-one correspondence between the routing path and the network card. The routing path includes: a first path between the network card and the first access switch in the access layer, and a second path between the first access switch and at least one aggregation switch in the aggregation sublayer; the second access switch connects to at least one second computing device, and the second access switch and the first access switch belong to different blocks.
[0326] In step 1802, after receiving the data from the network card corresponding to the destination address sent by the second computing device, the data is sent to the network card based on the routing path.
[0327] For steps 1801 and 1802, please refer to the description of the first data transmission method, which will not be repeated here. In some embodiments, the second access switch is further configured to receive a new routing path, and after receiving data from the network card corresponding to the destination address sent by the second computing device, send data to the network card based on the new routing path.
[0328] In the data transmission method provided in this application embodiment, each network card of the first computing device has a one-to-one corresponding routing path. The second computing device can send data to any network card of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, this application uses the routing path corresponding to the network card for data transmission, thereby achieving load balancing of the switch for data transmission between the first computing device and the second computing device and increasing the data transmission rate. That is, the data transmission method provided in this application embodiment can improve the efficiency of data transmission.
[0329] In some embodiments, the data transmission method provided by the present application embodiments is illustrated below with reference to Figures 19-20, wherein Figure 19 is a flowchart illustrating the data transmission method provided by the present application embodiments (Figure 9), and Figure 20 is a flowchart illustrating the data transmission method provided by the present application embodiments (Figure 10).
[0330] In Figures 19-20, a first electronic device executing the data transmission method provided in this application embodiment is taken as a server, and a second electronic device executing the data transmission method provided in this application embodiment is taken as a second access switch. The first electronic device includes an SDN controller, meaning the server shown in Figures 19-20 may include an SDN controller.
[0331] Referring to Figure 19, in step 1901, for the network card in the first computing device, a routing path for transmitting data to the network card is obtained.
[0332] For step 1901, please refer to the explanation of step 101 shown in Figure 5, which will not be repeated here. Step 1901 is the same as the route path planning 2004 through topology connection relationship 2001 in Figure 20. The method of route path planning 2004 through topology connection relationship 2001 will be explained below.
[0333] By analyzing the topological connection between the first computing device and the first access switch, the first port of the first access switch connected to any network interface card (NIC) in the first computing device can be determined. For example, if the first port of the first access switch (GPULA-001) is Eth200GE1, then the downlink port of the first access switch (GPULA-001) is Eth200GE1.
[0334] The first port of the first access switch has a corresponding second port. The first port and the second port are in one-to-one correspondence. Therefore, after determining the first port connected to the network card, the second port corresponding to the first port connected to the network card can be determined. The second port is the uplink interface.
[0335] For example, the downlink port of the first access switch (GPULA-001) is Eth200GE1, and the uplink port of the first access switch (GPULA-001) is Eth200GE17, that is, the second port of the first access switch (GPULA-001) is Eth200GE17.
[0336] Then, by analyzing the topology between the first access switch and the aggregation switch, the aggregation switch connected to the first access switch can be determined. That is, the aggregation switch connected to the uplink port of the first access switch can be identified, thus obtaining route path 2005. Route path 2005 includes a first path between the network card and the first access switch, and a second path between the first access switch and the aggregation switch.
[0337] In step 1902, the routing path is sent.
[0338] Step 1902 involves sending the routing path to the second access switch. In Figure 20, after obtaining the routing path 2005, the routing path 2005 can be sent to the second access switch 2003. For details on step 1902, please refer to the explanation of step 101 shown in Figure 5, which will not be repeated here.
[0339] In step 1903, after receiving data from the network interface card (NIC) corresponding to the destination address sent by the second computing device, data is sent based on the routing path. Step 1903 means that after receiving data from the network interface card (NIC) corresponding to the destination address sent by the second computing device, data is sent to the NIC of the first computing device based on the routing path.
[0340] The following example illustrates steps 1901-1903, which involves obtaining the routing path used to transmit data to the network card. The routing path includes the first path between the network card and the first access switch. The first path can be prefixed with 1.1.1.1 / 32, which indicates the first path between the network card and the first access switch.
[0341] The routing path also includes a second path between the first access switch and the aggregation switch. This second path can be prefixed with 2.2.2.2, which indicates the second path between the first access switch and the aggregation switch. Paths with prefixes 1.1.1.1 / 32 and 2.2.2.2 can be sent to the first access switch. The routing priority of the routing path is identified by 400. After receiving data from the network interface card (NIC) corresponding to the destination address sent by the second computing device, the first access switch can send data to the NIC of the first computing device based on the routing path.
[0342] In step 1904, if the routing path is abnormal, a new routing path is obtained.
[0343] For step 1904, please refer to the corresponding descriptions in Figures 13 and 16, which will not be repeated here. In Figure 20, it can be determined whether there is an anomaly in the routing path based on the operation information 2002. If the operation information 2002 indicates that there is an anomaly in the routing path, a fault response 2006 can be initiated. The operation information 2002 includes one or more of the first operation information and the second operation information.
[0344] In step 1905, the new routing path is sent.
[0345] In Figure 20, fault response 2006 involves obtaining a new routing path and sending it to the second access switch 2003. Routing path 2005 can be the new routing path. If the operational information changes from indicating an anomaly in the routing path to indicating no anomaly, fault response 2006 can send a new routing path deletion command to the second access switch 2003.
[0346] In step 1906, after receiving the data from the network card corresponding to the destination address sent by the second computing device, data is sent based on the new routing path.
[0347] Step 1906 is to send data to the network card of the first computing device based on the new routing path after receiving the data from the network card corresponding to the destination address sent by the second computing device.
[0348] In the data transmission method provided in this application embodiment, each network card of the first computing device has a one-to-one corresponding routing path. The second computing device can send data to any network card of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, this application uses the routing path corresponding to the network card for data transmission, thereby achieving load balancing of the switch for data transmission between the first computing device and the second computing device and improving the data transmission rate. That is, the data transmission method provided in this application embodiment can improve the efficiency of data transmission.
[0349] Referring to Figure 21, which is a schematic diagram of the transmission rate test results provided by the embodiment of this application, the unit of the vertical axis in Figure 21 is GB / s. The bar corresponding to label 1 represents the data transmission rate 1 in the related technology, which is 10.49 GB / s. The bar corresponding to label 2 represents the data transmission rate 2 in this application, which is 15.11 GB / s. It can be seen that the data transmission method provided by the embodiment of this application achieves the data transmission rate.
[0350] The bar corresponding to label 3 represents the data transmission rate 3 when the routing path is abnormal in the related technology, which is 6.06 GB / s. The bar corresponding to label 4 represents the data transmission rate 4 when the routing path of this application is abnormal, which is 14.95 GB / s. It can be seen that although the abnormal routing path will lead to a decrease in the data transmission rate, the data transmission method provided in this application embodiment still achieves a higher data transmission rate than the data transmission rate in the related technology.
[0351] The following description further illustrates that the implementation of the data transmission device 455 provided in this application embodiment is an exemplary structure of a software module. The data transmission device 455 provided in this application embodiment is applied to a multi-layer network architecture, which includes an access layer and an aggregation layer. The aggregation layer includes at least one aggregation sub-layer. The access layer includes multiple access switches, each of which is connected to at least one first computing device. Each first computing device is equipped with at least one network card. The aggregation sub-layer includes multiple aggregation switches.
[0352] In some embodiments, as shown in FIG2A, the software module stored in the data transmission device 455 of the memory 450 may include:
[0353] The acquisition module 4551 is configured to acquire a routing path for transmitting data to any network card in the first computing device, wherein the routing path passes through the access layer and the aggregation layer.
[0354] The first sending module 4552 is configured to send the routing path to the second access switch in the access layer, the second access switch being connected to at least one second computing device; wherein, the second access switch is used to forward data sent by the second computing device to the network card corresponding to the destination address based on the routing path.
[0355] In some embodiments, the first access switch has at least one first port and a second port that corresponds one-to-one with the first port; the acquisition module 4551 is further configured to determine the first port corresponding to the network card from a pre-set correspondence between candidate network cards and candidate first ports, and take the path between the network card and the first port corresponding to the network card as a first path; determine the aggregation switch corresponding to the second port from a pre-set correspondence between candidate second ports and candidate aggregation switches, and determine a second path based on the second port and the aggregation switch corresponding to the second port; and determine a routing path based on the first path and the second path.
[0356] In some embodiments, the aggregation layer includes multiple aggregation sublayers; the aggregation switch corresponding to the second port includes a first aggregation switch and a second aggregation switch, the first aggregation switch and the second aggregation switch belong to different aggregation sublayers, and the first access switch is connected to the second aggregation switch;
[0357] The acquisition module 4551 is further configured to take the routing path between the second port and the second aggregation switch as the first sub-path; take the routing path between the second aggregation switch and the first aggregation switch as the second sub-path; and determine the second path based on the first sub-path and the second sub-path.
[0358] In some embodiments, the acquisition module 4551 is further configured to determine the target port in the first path and the second path; based on the target port, to concatenate the first path and the second path, and to determine the concatenated path as a routing path.
[0359] In some embodiments, the multi-layer network architecture further includes a core layer, which includes multiple core switches. The acquisition module 4551 is further configured to acquire a first path between the network interface card and a first access switch in the access layer, and acquire a second path between the first access switch and an aggregation switch in at least one aggregation sublayer; determine the target core switch corresponding to the aggregation switch in the second path from a pre-set correspondence between candidate aggregation switches and candidate core switches; take the path between the aggregation switch in the second path and the target core switch as a third path; and determine a routing path based on the first path, the second path, and the third path.
[0360] In some embodiments, the core layer includes a core sublayer, and the number of core sublayers is multiple. The target core switch includes a first core switch and a second core switch, and the first core switch and the second core switch belong to different core sublayers.
[0361] The acquisition module 4551 is further configured to take the path between the aggregation switch and the first core switch in the second path as the fifth sub-path; take the path between the first core switch and the second core switch as the sixth sub-path; and determine the third path based on the fifth sub-path and the sixth sub-path.
[0362] In some embodiments, the first access switch belongs to the first block, and the first sending module 4552 is further configured to search for a second identifier that matches the first identifier from the identifiers of access switches belonging to the second block, wherein the first block is different from the second block; and send the routing path to the second access switch, using the access switch indicated by the second identifier as the second access switch.
[0363] In some embodiments, the first identifier is a first number, the number of access switches belonging to the second block is multiple, and the identifier of the access switches belonging to the second block is a second number. The first sending module 4552 is further configured to determine, for each second number, the difference between the first number and the second number; if the quotient of the difference and a preset third number is a target value, then the second number is used as a second identifier that matches the first identifier.
[0364] In some embodiments, the first sending module 4552 is further configured to determine the target identifier corresponding to the first identifier from a pre-set correspondence between candidate first identifiers and candidate target identifiers based on the first identifier of the first access switch; and to search for an identifier that matches the target identifier from the identifiers of access switches belonging to the second block as a second identifier that matches the first identifier.
[0365] In some embodiments, the acquisition module 4551 is further configured to, after sending the routing path to the second access switch in the access layer, acquire first operating information of the first access switch and second operating information of the aggregation switch; if at least one of the first operating information and the second operating information indicates that the routing path is abnormal, acquire a new routing path for transmitting data to the network card and send the new routing path to the second access switch in the access layer; wherein, the second access switch is further configured to replace the routing path with the new routing path and, based on the new routing path, forward the data sent by the second computing device to the network card corresponding to the destination address to the network card.
[0366] In some embodiments, the acquisition module 4551 is further configured to send the new routing path carrying a routing priority to a second access switch in the access layer; wherein the routing priority of the new routing path is higher than the routing priority of the routing path; the second access switch is further configured to replace the routing path with the new routing path based on the routing priority of the new routing path.
[0367] In some embodiments, the acquisition module 4551 is further configured to: determine a third access switch from the access switches included in the block to which the first access switch belongs; determine a target network interface card (NIC) corresponding to the third access switch from a pre-set correspondence between candidate NICs and candidate access switches; take the path between the target NIC and the third access switch as a new first path; take the path between the third access switch and the aggregation switch as a new second path; determine a new routing path based on the new first path and the new second path; the target NIC is configured to forward the data of the NIC to the NIC after receiving the data of the NIC sent by the second access switch based on the new routing path.
[0368] In some embodiments, the acquisition module 4551 is further configured to, when the abnormality of the routing path is caused by a failure of the aggregation switch or by a line failure between the first access switch and the aggregation switch, determine a third aggregation switch from the aggregation switches included in the aggregation sublayer to which the aggregation switch belongs; determine a fourth path based on the first access switch and the third aggregation switch; and replace the second path in the routing path with the fourth path to obtain a new routing path.
[0369] In some embodiments, the number of aggregation sublayers is multiple; the acquisition module 4551 is further configured to take the path between the first access switch and the third aggregation switch as a third sub-path; determine the fourth aggregation switch corresponding to the third aggregation switch based on a pre-set correspondence between candidate third aggregation switches and candidate fourth aggregation switches, wherein the third aggregation switch and the fourth aggregation switch belong to different aggregation sublayers; take the path between the third aggregation switch and the fourth aggregation switch as a fourth sub-path; and determine a fourth path based on the third sub-path and the fourth sub-path.
[0370] In some embodiments, the first sending module 4552 is further configured to, after sending the new routing path to the second access switch in the access layer, if the operation information changes from indicating abnormal operation of the routing path to normal operation, send a new routing path deletion command to the second access switch in the access layer so that the second access switch deletes the new routing path.
[0371] The following description further illustrates that the implementation of the data transmission device 456 provided in this application embodiment is an exemplary structure of a software module. The data transmission device 456 provided in this application embodiment is applied to a multi-layer network architecture, which includes an access layer and an aggregation layer. The aggregation layer includes at least one aggregation sub-layer. The access layer includes multiple access switches, each of which is connected to at least one first computing device. Each first computing device is equipped with at least one network card. The aggregation sub-layer includes multiple aggregation switches.
[0372] In some embodiments, as shown in FIG2B, the software module stored in the data transmission device 455 of the memory 450 may include:
[0373] The receiving module 4561 is configured as the second access switch in the access layer, and receives the routing path for transmitting data to the network card in the first computing device;
[0374] The routing path passes through the access layer and the aggregation layer, and the routing path includes: a first path between the network card and the first access switch in the access layer, and a second path between the first access switch and the aggregation switch in the at least one aggregation sublayer; the second access switch is connected to at least one second computing device;
[0375] The second sending module 4562 is configured to send the data to the network card based on the routing path after receiving data from the network card corresponding to the destination address sent by the second computing device.
[0376] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device (a first electronic device and a second electronic device) reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the data transmission method described in this application.
[0377] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the data transmission method provided in this application, such as the data transmission method shown in FIG5. Another example is the data transmission method shown in FIG18.
[0378] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0379] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0380] As an example, computer executable instructions or computer programs may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., files that store one or more modules, subroutines, or code sections).
[0381] As an example, computer-executable instructions or computer programs may be deployed to execute on an electronic device (a first electronic device or a second electronic device), or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected by a communication network.
[0382] In summary, in the data transmission method provided by the embodiments of this application, each network card of the first computing device has a one-to-one corresponding routing path. The second computing device can send data to any network card of the first computing device based on the routing path. Compared with the method of randomly determining the routing path for data transmission, this application uses the routing path corresponding to the network card for data transmission, thereby achieving load balancing of the switch for data transmission between the first computing device and the second computing device and increasing the data transmission rate. That is, the data transmission method provided by the embodiments of this application can improve the efficiency of data transmission and solve the above-mentioned technical problems 1 and 3.
[0383] In some embodiments, for scenarios involving training artificial intelligence models, a large amount of data needs to be transmitted between computing devices. Since the data transmission method provided in this application uses the routing path corresponding to the network card for data transmission, it achieves load balancing of the switch for data transmission between the first and second computing devices, increasing the data transmission rate. In other words, the data transmission method provided in this application can improve data transmission efficiency, thereby improving the efficiency of training artificial intelligence models. This solves the aforementioned technical problem 2.
[0384] The data transmission method provided in this application embodiment can replace the routing path with a new routing path when the routing path is abnormal, thereby ensuring the stability of data transmission. It can avoid problems such as low data transmission efficiency and reduced communication bandwidth between computing devices due to routing path congestion. Thus, it can improve data transmission efficiency and increase communication bandwidth while ensuring data transmission stability, and can solve the above-mentioned technical problem 4.
[0385] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A data transmission method applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the method comprising: For any network interface card (NIC) in the first computing device, obtain a routing path for transmitting data to the NIC, wherein the routing path passes through the access layer and the aggregation layer; The routing path is sent to a second access switch in the access layer, the second access switch being connected to at least one second computing device; The second access switch is used to forward data sent by the second computing device to the network card corresponding to the destination address, based on the routing path.
2. The method according to claim 1, wherein, The first access switch has at least one first port and a second port that corresponds one-to-one with the first port; The step of obtaining the routing path for transmitting data to the network card includes: From the pre-set correspondence between candidate network cards and candidate first ports, determine the first port corresponding to the network card, and take the path between the network card and the first port corresponding to the network card as the first path; From the pre-set correspondence between candidate second ports and candidate aggregation switches, determine the aggregation switch corresponding to the second port, and based on the second port and the aggregation switch corresponding to the second port, determine the second path; Based on the first path and the second path, a routing path is determined.
3. The method according to claim 2, wherein, The aggregation layer includes multiple aggregation sublayers; the aggregation switch corresponding to the second port includes a first aggregation switch and a second aggregation switch, the first aggregation switch and the second aggregation switch belong to different aggregation sublayers, and the first access switch is connected to the second aggregation switch. The step of determining the second path based on the second port and the aggregation switch corresponding to the second port includes: The routing path between the second port and the second aggregation switch is taken as the first sub-path; The routing path between the second aggregation switch and the first aggregation switch is taken as the second sub-path; The second path is determined based on the first sub-path and the second sub-path.
4. The method according to claim 2 or 3, wherein, The step of determining the routing path based on the first path and the second path includes: Determine the target ports in the first path and the second path; Based on the target port, the first path and the second path are concatenated to determine the concatenated path as the routing path.
5. The method according to claim 1, wherein, The multi-layer network architecture also includes a core layer, which comprises multiple core switches; The step of obtaining the routing path for transmitting data to the network card includes: Obtain the first path between the network card and the first access switch in the access layer, and obtain the second path between the first access switch and the aggregation switch in the aggregation layer; From the pre-set correspondence between candidate aggregation switches and candidate core switches, determine the target core switch corresponding to the aggregation switch in the second path; The path between the aggregation switch in the second path and the target core switch is taken as the third path; A routing path is determined based on the first path, the second path, and the third path.
6. The method according to claim 5, wherein, The core layer includes a core sublayer, and there are multiple core sublayers. The target core switch includes a first core switch and a second core switch, and the first core switch and the second core switch belong to different core sublayers. The step of using the path between the aggregation switch in the second path and the target core switch as the third path includes: The path between the aggregation switch in the second path and the first core switch is taken as the fifth sub-path; The path between the first core switch and the second core switch is designated as the sixth sub-path; Based on the fifth sub-path and the sixth sub-path, the third path is determined.
7. The method according to any one of claims 1-6, wherein, The first access switch belongs to the first block; Sending the routing path to the second access switch in the access layer includes: Based on the first identifier of the first access switch, a second identifier that matches the first identifier is found from the identifiers of access switches belonging to the second block, wherein the first block and the second block are different; The access switch indicated by the second identifier is used as the second access switch, and the routing path is sent to the second access switch.
8. The method according to claim 7, wherein, The first identifier is a first number, and there are multiple access switches belonging to the second block, with the identifier of the access switch belonging to the second block being a second number. The step of searching for a second identifier that matches the first identifier from the identifiers of access switches belonging to the second block, based on the first identifier of the first access switch, includes: For each of the second numbers, determine the difference between the first number and the second number; If the quotient of the difference and the preset third number is the target value, then the second number is used as the second identifier that matches the first identifier.
9. The method according to claim 8, wherein, The step of searching for a second identifier that matches the first identifier from the identifiers of access switches belonging to the second block, based on the first identifier of the first access switch, includes: Based on the first identifier of the first access switch, the target identifier corresponding to the first identifier is determined from the pre-set correspondence between candidate first identifiers and candidate target identifiers; From the identifiers of the access switches belonging to the second block, find the identifier that matches the target identifier and use it as the second identifier that matches the first identifier.
10. The method according to any one of claims 1-9, wherein, After sending the routing path to the second access switch in the access layer, the method further includes: Obtain the first operating information of the first access switch and the second operating information of the aggregation switch; If at least one of the first operating information and the second operating information indicates that the routing path is abnormal, a new routing path for transmitting data to the network card is obtained, and the new routing path is sent to the second access switch in the access layer. The second access switch is further configured to replace the routing path with the new routing path, and based on the new routing path, forward the data sent by the second computing device to the network card corresponding to the destination address to the network card.
11. The method according to claim 10, wherein, Sending the new routing path to the second access switch in the access layer includes: Send the new routing path carrying the routing priority to the second access switch in the access layer; Wherein, the routing priority of the new routing path is higher than the routing priority of the existing routing path; The second access switch is further configured to replace the routing path with the new routing path based on the routing priority of the new routing path.
12. The method according to claim 10 or 11, wherein, The step of obtaining a new routing path for transmitting data to the network card includes: Determine the third access switch from the access switches included in the block to which the first access switch belongs; The target network card corresponding to the third access switch is determined from the pre-set correspondence between candidate network cards and candidate access switches. The path between the target network card and the third access switch is taken as the new first path; The path between the third access switch and the aggregation switch is taken as the new second path; Based on the new first path and the new second path, a new routing path is determined; The target network interface card (NIC) is used to forward the data from the NIC to the NIC after receiving the data from the NIC sent by the second access switch based on the new routing path.
13. The method according to claim 10 or 11, wherein, The step of obtaining a new routing path for transmitting data to the network card includes: When the abnormality of the routing path is caused by a failure of the aggregation switch or by a line failure between the first access switch and the aggregation switch, a third aggregation switch is determined from the aggregation switches included in the aggregation sublayer to which the aggregation switch belongs. Based on the first access switch and the third aggregation switch, a fourth path is determined; The second path in the routing path is replaced with the fourth path to obtain a new routing path.
14. The method according to claim 13, wherein, The number of aggregation sub-layers is multiple; The step of determining the fourth path based on the first access switch and the third aggregation switch includes: The path between the first access switch and the third aggregation switch is taken as the third sub-path; Based on the pre-set correspondence between candidate third aggregation switches and candidate fourth aggregation switches, the fourth aggregation switch corresponding to the third aggregation switch is determined, and the third aggregation switch and the fourth aggregation switch belong to different aggregation sublayers. The path between the third aggregation switch and the fourth aggregation switch is designated as the fourth sub-path; Based on the third sub-path and the fourth sub-path, the fourth path is determined.
15. The method according to any one of claims 10-14, wherein, After sending the new routing path to the second access switch in the access layer, the method further includes: If the operation information changes from indicating abnormal operation of the routing path to normal operation, a new routing path deletion command is sent to the second access switch in the access layer, wherein the second access switch is used to delete the new routing path.
16. A data transmission method applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the access layer including multiple access switches, each access switch connected to at least one first computing device, each first computing device being equipped with at least one network interface card (NIC), the method comprising: The second access switch in the access layer receives the routing path used to transmit data to the network card in the first computing device; The routing path passes through the access layer and the aggregation layer, and the second access switch is connected to at least one second computing device. After receiving data from the second computing device corresponding to the network card at the destination address, the data is sent to the network card based on the routing path.
17. A data transmission apparatus, the apparatus being applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the access layer including multiple access switches, each access switch being connected to at least one first computing device, each first computing device being provided with at least one network interface card (NIC), the apparatus comprising: The acquisition module is configured to acquire, for any network interface card (NIC) in the first computing device, a routing path for transmitting data to the NIC, wherein the routing path passes through the access layer and the aggregation layer; The first sending module is configured to send the routing path to a second access switch in the access layer, wherein the second access switch is connected to at least one second computing device. The second access switch is used to forward data sent by the second computing device to the network card corresponding to the destination address, based on the routing path.
18. The apparatus according to claim 17, wherein, The first access switch has at least one first port and a second port that corresponds one-to-one with the first port; The acquisition module is further configured to: determine the first port corresponding to the network card from a pre-set correspondence between candidate network cards and candidate first ports; take the path between the network card and the first port corresponding to the network card as a first path; determine the aggregation switch corresponding to the second port from a pre-set correspondence between candidate second ports and candidate aggregation switches; determine a second path based on the second port and the aggregation switch corresponding to the second port; and determine a routing path based on the first path and the second path.
19. The apparatus according to claim 17, wherein, The multi-layer network architecture also includes a core layer, which comprises multiple core switches; The acquisition module is further configured to acquire a first path between the network card and the first access switch in the access layer, and acquire a second path between the first access switch and the aggregation switch in the aggregation layer; determine the target core switch corresponding to the aggregation switch in the second path from a pre-set correspondence between candidate aggregation switches and candidate core switches; take the path between the aggregation switch in the second path and the target core switch as a third path; and determine a routing path based on the first path, the second path, and the third path.
20. The apparatus according to any one of claims 17-19, wherein, The first access switch belongs to the first block; The first sending module is further configured to, based on the first identifier of the first access switch, search for a second identifier that matches the first identifier from the identifiers of access switches belonging to the second block, wherein the first block is different from the second block; and send the routing path to the second access switch, using the access switch indicated by the second identifier as the second access switch.
21. The apparatus according to any one of claims 17-20, wherein, The acquisition module is further configured to, after sending the routing path to the second access switch in the access layer, acquire first operating information of the first access switch and second operating information of the aggregation switch; if at least one of the first operating information and the second operating information indicates that the routing path is abnormal, acquire a new routing path for transmitting data to the network card and send the new routing path to the second access switch in the access layer; wherein, the second access switch is further configured to replace the routing path with the new routing path and, based on the new routing path, forward the data sent by the second computing device to the network card corresponding to the destination address to the network card.
22. A data transmission apparatus, the apparatus being applied to a multi-layer network architecture, the multi-layer network architecture including an access layer and an aggregation layer, the access layer including multiple access switches, each access switch being connected to at least one first computing device, each first computing device being provided with at least one network interface card (NIC), the apparatus comprising: The receiving module is configured as the second access switch in the access layer, and receives the routing path used to transmit data to the network card in the first computing device; The routing path passes through the access layer and the aggregation layer, and the second access switch is connected to at least one second computing device. The second sending module is configured to, after receiving data from the network interface card (NIC) corresponding to the destination address sent by the second computing device, send the data to the NIC based on the routing path.
23. An electronic device, the electronic device comprising: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the data transmission method according to any one of claims 1 to 16.
24. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program, when executed by a processor, implement the data transmission method according to any one of claims 1 to 16.
25. A computer program product comprising computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program, when executed by a processor, implement the data transmission method according to any one of claims 1 to 16.
Citation Information
Patent Citations
A data scheduling method and a TOR switch
CN109861923A
Data forwarding method and access layer switching equipment
CN110536187A
Communication method, device and system in data center
CN114079625A
Data transmission method and device, electronic equipment, storage medium and program product
CN118764448A
Method and Apparatus for fault recovery in Fat-Tree network
KR1020150080953A