Communication method, communication network, switching node and storage medium

By introducing multi-level switching nodes into the communication network and using the target communication task ID to decouple computing resources and task binding, the problem of idle computing resources of switching nodes is solved, which improves resource utilization and reduces concurrency requirements.

CN119697254AActive Publication Date: 2025-03-25HUAWEI TECH CO LTD

Patent Information

Application Number
CN202311240886.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-22
Publication Date
2025-03-25
Estimated Expiration
2043-09-22

AI Technical Summary

Technical Problem

In high-performance computing and artificial intelligence applications, when the end-side computing node uploads data to the switching node, the computing resources of the switching node are idle for a long time, resulting in a low resource utilization rate.

Method used

By introducing multi-level switching nodes into the communication network, the target communication task ID is used to decouple the binding between computing resources and specific computing tasks, allowing the switching node to serve other computing tasks immediately after completing the current computing task, reducing the idle time of computing resources.

Benefits of technology

This improves the computing resource utilization rate on the switching node, reduces the concurrency requirements of the switching node, and avoids the problem that resources cannot be released for a long time due to single point of failure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697254A_ABST
    Figure CN119697254A_ABST
Patent Text Reader

Abstract

The invention provides a communication method, which comprises the following steps that: a plurality of first target switching nodes in a first level receive to-be-calculated data of calculation tasks with the same periodicity sent by a plurality of calculation nodes and corresponding target communication task IDs (Identity), and a plurality of communication tasks (including target communication tasks) are generated in the process of executing the calculation tasks; the plurality of first target switching nodes calculate the to-be-calculated data to obtain intermediate data; and the second target switching node calculates the intermediate data of the same target communication task ID to obtain a data calculation result, and sends the calculated data calculation result to the calculation node through the first target switching node. The switching node calculates the to-be-calculated data according to the target communication task ID, so that the calculation resources on the to-be-calculated data do not need to be bound with the calculation task, and the utilization rate of the calculation resources on the switching node can be improved. In addition, the invention also provides a corresponding communication network, a switching node and a storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a communication method, a communication network, a switching node and a storage medium. Background Art

[0002] With the development of high performance computing (HPC) and artificial intelligence (AI) technologies, many large-scale applications have emerged, and the scale of data that needs to be processed by these large-scale applications is also increasing. At present, in the process of collaboratively executing the same periodic computing task, multiple computing nodes on the end side can offload collective communication operations to switching nodes in the network, such as switches, that is, after multiple computing nodes on the end side upload data to the switching node, the switching node calculates the data, such as reducing the data, and returns the calculation results to the end side. For example, in the scenario of distributed training of artificial intelligence (AI) models, multiple devices on the end side collaboratively perform iterative training for the same AI model. In each round of training, each computing node on the end side can train the AI ​​model on the device based on a set of assigned training samples, and send the parameters in the trained AI model to the switching node in the network. Then, the switching node reduces and calculates the data uploaded by multiple computing nodes on the end side, and distributes the calculated model parameters to each computing node on the end side. In this way, each computing node on the terminal side updates the parameters in the AI ​​model according to the received model parameters, thereby completing a round of training process for the AI ​​model.

[0003] Typically, a subnet manager in a network will specify a switch node in the network for a periodic computing task (such as a model training task) and bind the computing resources on the switch node to the computing task. In this way, the switch node can use the computing resources to perform the corresponding data computing process for the computing task.

[0004] However, when the computing nodes on the end side are uploading data to the switching nodes and generating data to be uploaded (such as the end-side device training the AI ​​model to generate new model parameters), the computing resources on the switching nodes will be idle for a long time, which will result in low utilization of the computing resources on the switching nodes. Summary of the invention

[0005] In view of this, an embodiment of the present application provides a communication method for reducing the length of time that computing resources on a switching node are idle, thereby improving the utilization rate of computing resources on the switching node. The present application also provides a corresponding communication network, a switching node, a computer-readable storage medium, and a computer program product.

[0006] In a first aspect, an embodiment of the present application provides a communication method, which is applied to a communication network, wherein the communication network includes multiple levels of switching nodes, wherein the switching nodes may be, for example, devices having a data exchange function such as switches, and the multiple levels include a first level and a second level, and different switching nodes of the first level communicate with each other through switching nodes of the second level, wherein the switching nodes of the first level include multiple first target switching nodes, and the switching nodes of the second level include at least one second target switching node (the various target switching nodes described in this embodiment are used to refer to switching nodes that perform data calculations in the communication network); wherein the multiple first target switching nodes receive the same periodic computing tasks (such as model training tasks, etc.) sent by multiple computing nodes (such as GPUs, NPUs, TPUs, or AI processing chips, etc.) data to be calculated and a target communication task ID corresponding to the data to be calculated; multiple communication tasks are generated in the process of the multiple computing nodes executing the computing tasks, and the target communication task ID is used to indicate one of the multiple communication tasks, and the target communication task ID sent by each computing node is the same; then, the multiple first target switching nodes calculate the received data to be calculated to obtain intermediate data, and send the intermediate data and the target communication task ID to at least one second target switching node; at least one second target switching node calculates the received intermediate data corresponding to the same target communication task ID to obtain a data calculation result, and sends the data calculation result to the multiple first target switching nodes respectively, so that the multiple first target switching nodes respectively send the data calculation results to the multiple computing nodes that execute the computing task.

[0007] Since the first target switching node in the first level and the second target switching node in the second level calculate the data to be calculated uploaded by multiple computing nodes on the end side according to the target communication task ID, instead of calculating the data according to the identifier of the computing task, the computing resources on the target switching nodes in each level do not need to be bundled with the periodic computing tasks executed by the end side. This allows the computing resources on the target switching nodes in each level to complete the calculation according to the target communication task ID without waiting for the multiple computing nodes to upload the next batch of data to be calculated for the computing task, but can directly calculate the data uploaded by other computing nodes to execute other computing tasks, thereby reducing the length of time that the computing resources on the target switching nodes are idle, thereby improving the utilization rate of the computing resources on the target switching nodes in each level.

[0008] In a possible implementation, when multiple first target switching nodes send intermediate data and a target communication task ID to at least one second target switching node, they may first obtain indication information, where the indication information is used to indicate that the switching node that calculates the intermediate data is at least one second target switching node. For example, the indication information may be information such as an IP address or an identifier of the second target switching node. Then, the multiple first target switching nodes send the intermediate data and the target communication task ID to the at least one second target switching node. In this way, the first target switching node may determine to which or which second target switching nodes in the second level to send the intermediate data and perform corresponding calculations after obtaining the indication information, so as to obtain the final data calculation result by using the switching nodes in the second level.

[0009] In a possible implementation, when acquiring the indication information, the multiple first target switching nodes may specifically send a first on-line computing request to a first candidate switching node in the second-level switching nodes. For example, a hash operation may be used to determine the first candidate switching node in the second level and send the first on-line computing request to the node. The first on-line computing request is used to request the first candidate switching node to calculate the intermediate data. Then, the multiple first target switching nodes receive a replacement request sent by the first candidate switching node. The replacement request is used to instruct to replace the second-level switching node that processes the intermediate data. For example, the first candidate switching node may send a replacement request to the multiple first target switching nodes when the load is high. A target switching node sends a replacement request, etc.; then, multiple first target switching nodes can re-request a switching node in the second level to perform calculations, specifically sending a second on-line calculation request to the second candidate switching node in the switching nodes of the second level, and the second on-line calculation request is used to request the first candidate switching node to calculate the intermediate data; finally, multiple first target switching nodes receive the indication information sent by the second candidate switching node, and the indication information is used to instruct the second candidate switching node to calculate the intermediate data. At this time, multiple first target switching nodes can determine that the second target switching node that calculates the intermediate data is the second candidate switching node. In this way, multiple first target switching nodes can determine the second target switching node in the second level that can calculate the intermediate data by negotiating with the switching nodes in the second level, and complete the task scheduling for data calculation, so that the switching nodes of the second level can be dynamically selected in the communication network to calculate the intermediate data, and the flexibility of determining the second target switching node can be improved. Moreover, the above process does not need to be controlled by a single node, so as to avoid the problem that the computing resources on the second target switching node cannot be released for a long time due to a single point failure.

[0010] In a possible implementation, when multiple first target switching nodes obtain indication information, they may specifically receive multiple online requests sent by multiple computing nodes, and each of the multiple online requests includes the same target communication task ID. Then, multiple first target switching nodes may generate the indication information based on the target communication task ID, such as performing a hash operation on the target communication task ID, and determining which switching node in the second level to use to calculate the intermediate data based on the obtained hash value. In this way, the task scheduling for data calculation can be completed by the computing node on the end side, and there is no need for the switching node to perform the task scheduling process, thereby effectively reducing the delay in obtaining the data calculation results. Moreover, the above process does not need to be controlled by a single node, thereby avoiding the problem that the computing resources on the second target switching node cannot be released for a long time due to a single point failure.

[0011] In a possible implementation, the number of the second target switching nodes is multiple, then, when the multiple first target switching nodes send the intermediate data and the target communication task ID to at least one second target switching node, each first target switching node can specifically divide the generated intermediate data into multiple subsets, the number of the multiple subsets is the same as the number of the second target switching nodes; then, each first target switching node sends multiple subsets and the target communication task ID to multiple second target switching nodes, wherein each first target switching node sends a subset of the multiple subsets and the target communication task ID to each second target switching node. In this way, not only can the utilization rate of the computing resources on the multiple second target switching nodes be improved, but also, the above process does not need to be controlled by a single node, so as to avoid the problem that the computing resources on the multiple second target switching nodes cannot be released for a long time due to a single point failure. At the same time, multiple second target switching nodes perform on-line computing in parallel, which can not only effectively improve the efficiency of on-line computing compared to using a single switching node to perform on-line computing, but also realize the load balancing of the switching nodes.

[0012] In a possible implementation, the communication network further includes a central controller, which obtains load information, which is used to indicate the load of multiple switching nodes at the first level and multiple switching nodes at the second level in the communication network, and sends at least one identifier of a second target switching node to multiple computing nodes on the end side according to the load information, so that the multiple computing nodes send the indication information to multiple first target switching nodes, so that the multiple first target switching nodes can determine to which switching node / nodes in the second level to send intermediate data and target communication task ID according to the indication information. In this way, the intermediate controller can realize task scheduling for data calculation and reduce the requirements for computing nodes and switching nodes.

[0013] In a possible implementation, the communication network further includes a central controller, which obtains load information, which is used to indicate the loads of multiple switching nodes at the first level and multiple switching nodes at the second level in the communication network, and sends the indication information to multiple first target switching nodes based on the load information, so that the multiple first target switching nodes can determine to which switching node / s in the second level to send the intermediate data. In this way, the intermediate controller can implement task scheduling for data computing and reduce the requirements for computing nodes and switching nodes.

[0014] In a second aspect, the present application provides a communication network, which includes multiple levels of switching nodes, the multiple levels include a first level and a second level, different switching nodes of the first level communicate with each other through the switching nodes of the second level, the switching nodes of the first level include multiple first target switching nodes, and the switching nodes of the second level include at least one second target switching node; the multiple first target switching nodes are used to receive data to be calculated for the same periodic computing task sent by multiple computing nodes and a target communication task identification ID corresponding to the data to be calculated, wherein multiple communication tasks are generated in the process of multiple computing nodes executing computing tasks, the target communication task ID is used to indicate one of the multiple communication tasks, and the target communication task ID sent by each computing node in the multiple computing nodes is the same, the data to be calculated is calculated to obtain intermediate data, and the intermediate data and the target communication task ID are sent to at least one second target switching node; at least one second target switching node is used to receive the intermediate data and the target communication task ID, and calculate the intermediate data corresponding to the same target communication task ID to obtain data calculation results, and send the data calculation results to the multiple first target switching nodes respectively; the multiple first target switching nodes are also used to send the data calculation results to the multiple computing nodes that execute the computing tasks respectively.

[0015] In a possible implementation, the plurality of first target switching nodes are specifically used to: obtain indication information, where the indication information is used to indicate that the switching node that calculates the intermediate data is at least one second target switching node; and send the intermediate data and the communication task ID to the at least one second target switching node.

[0016] In one possible implementation, multiple first target switching nodes are specifically used to: send a first on-line computing request to a first candidate switching node in the second-level switching nodes, the first on-line computing request is used to request the first candidate switching node to calculate the intermediate data; receive a replacement request sent by the first candidate switching node, the replacement request is used to instruct the replacement of the second-level switching node that processes the intermediate data; send a second on-line computing request to a second candidate switching node in the second-level switching nodes, the second on-line computing request is used to request the first candidate switching node to calculate the intermediate data; receive indication information sent by the second candidate switching node, the indication information is used to instruct the second candidate switching node to calculate the intermediate data, the second target switching node is the second candidate switching node.

[0017] In a possible implementation, the plurality of first target switching nodes are used to: receive a plurality of online requests sent by a plurality of computing nodes, each of the plurality of online requests including a target communication task ID; and generate indication information according to the target communication task ID.

[0018] In a possible implementation, there are multiple second target switching nodes; then, each of the multiple first target switching nodes is used to: divide the generated intermediate data into multiple subsets, and the number of the multiple subsets is the same as the number of the second target switching nodes; send the multiple subsets and the target communication task ID to the multiple second target switching nodes, wherein each first target switching node sends one subset of the multiple subsets and the target communication task ID to each second target switching node.

[0019] In a possible implementation, the communication network also includes a central controller, which is used to: obtain load information, where the load information is used to indicate the load of multiple switching nodes at the first level and multiple switching nodes at the second level in the communication network; send an identifier of at least one second target switching node to multiple computing nodes based on the load information; and the multiple first target switching nodes are also used to receive indication information sent by multiple computing nodes.

[0020] In a possible implementation, the communication network also includes a central controller, which is used to: obtain load information, where the load information is used to indicate the load of multiple switching nodes at the first level and multiple switching nodes at the second level in the communication network; and send indication information to multiple first target switching nodes based on the load information.

[0021] In a third aspect, the present application provides a switching node, comprising a processor and a memory; the memory is used to store instructions, and the processor executes the instructions stored in the memory to enable the switching node to execute the communication method executed by the second target switching node in the above-mentioned first aspect or any possible implementation of the first aspect, or execute the communication method executed by the first target switching node in the above-mentioned first aspect or any possible implementation of the first aspect.

[0022] In a fourth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is executed on a switching node, the switching node executes the communication method executed by the second target switching node in the above-mentioned first aspect or any possible implementation of the first aspect, or executes the communication method executed by the first target switching node in the above-mentioned first aspect or any possible implementation of the first aspect.

[0023] In a fifth aspect, the present application provides a computer program product comprising instructions, which, when executed on at least one computing device, enables a switching node to execute the communication method executed by the second target switching node in the above-mentioned first aspect or any possible implementation of the first aspect, or to execute the communication method executed by the first target switching node in the above-mentioned first aspect or any possible implementation of the first aspect.

[0024] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of the structure of an exemplary communication network 10 provided in the present application;

[0026] Figure 2 A schematic diagram of the structure of an exemplary computing node and a switching node provided in this application;

[0027] Figure 3 A flow chart of a communication method provided by the present application;

[0028] Figure 4 A flowchart of another communication method provided by the present application;

[0029] Figure 5 A schematic diagram of selecting a second-level switching node for a first-level switching node by rehashing;

[0030] Figure 6 A flowchart of another communication method provided by the present application;

[0031] Figure 7 A flowchart of another communication method provided by the present application;

[0032] Figure 8 A schematic diagram of sending different subsets of the data to be calculated to different switching nodes in the second level;

[0033] Fig. 9 A flowchart of another communication method provided by the present application;

[0034] Fig.10 A flowchart of another communication method provided in this application. DETAILED DESCRIPTION

[0035] The scheme in the embodiments provided in this application will be described below in conjunction with the drawings in this application.

[0036] See also Figure 1 , shows a schematic diagram of the structure of a communication network provided by an embodiment of the present application. Figure 1 As shown, the communication network 10 includes multiple levels of switching nodes, and each level may include multiple switching nodes. For ease of understanding and description, Figure 1In the example, a switch node including two levels is used for explanation, wherein the first level includes 8 switch nodes and the second level includes 4 switch nodes. Each switch node in the first level can be connected to one or more computing nodes on the end side and connected to one or more switching nodes in the second level. To facilitate the explanation of the connection relationship between computing nodes and switch nodes of different levels, Figure 1 Only the connection relationship between some devices is shown in the figure. The connection relationship between the remaining devices can refer to Figure 1 And the following description for understanding.

[0037] Among them, the first-level switching nodes are used to forward data between the computing nodes on the end side and the switching nodes on the second level, including forwarding data sent by the computing nodes to the switching nodes on the second level, and forwarding data sent by the switching nodes on the second level to the computing nodes on the end side; and the switching nodes on the first level can also perform data reduction calculations for multiple computing nodes on the end side, and forward the data obtained by the reduction calculations to the switching nodes on the second level.

[0038] The second-level switching nodes are used to forward data between different switching nodes of the first level. In addition, the second-level switching nodes can also perform data reduction calculations for multiple computing nodes on the end side, such as executing allreduce calculations (i.e., reducing the data uploaded by multiple computing nodes and then distributing the results to each computing node).

[0039] As an implementation example, a switching node in the communication network 10 may have Figure 2 The architecture shown includes a software stack 300 and a chip 400 .

[0040] The software stack 300 is a set of independent components that work together to ensure the normal operation of the switch node, and can be used to cache data in the switch node, create storage permissions, create queue numbers, etc. In addition, the software stack 300 may include a driver 301, so that the software stack 301 uses the driver 301 to call the chip 400, so that the switch node performs corresponding functions (such as data forwarding functions, etc.).

[0041] Chip 400 may include a computing engine 401, a communication control unit 402, a switching architecture 403, and a routing table 404. The computing engine 401 is used to execute corresponding data computing processes, such as performing protocol calculations on data uploaded by multiple computing nodes. The communication controller 402 is used to control the communication process between the switching node and other devices (other switching nodes or computing nodes). The switching architecture 403 is used to control the opening or closing of the interface for forwarding data on the switching node, so as to enable the switching node to forward data to other devices. The routing table 404 is used to record the forwarding interface and the next-hop route, so as to determine the next-hop node for data forwarding according to the information recorded in the routing table.

[0042] Figure 1 In the communication network 10 shown, the switching nodes at each level can adopt Figure 2 Alternatively, the second-level switching nodes can adopt Figure 2 The architecture shown in FIG. 4 is a schematic diagram of a switching node in the communication network 10. The switching node in the first level may not include the computing engine 401. In practical applications, the switching node in the communication network 10 may be any device with data forwarding capability, such as a switch, a switching chip, a router, etc. The architecture adopted is not limited to Figure 2 Example shown.

[0043] Computing nodes 1 to 16 may be devices including a processor, such as a terminal or a server, and multiple computing nodes may collectively communicate with each other to collaboratively perform the same periodic computing tasks, such as distributed model training tasks. For example, a computing node may have Figure 2 The architecture shown includes a software stack 500 and a processor 600 .

[0044] The software stack 500 is a collection of independent components that work together to ensure the normal operation of the computing node, and can execute corresponding services, such as model training services. Figure 2As shown, the software stack 500 includes an application layer 501, a framework layer 502, a communication layer 503, and a driver 504. The application layer 501 is used to provide one or more services, such as users can configure services on computing nodes through the application layer. The framework layer 502, for example, can be a deep learning framework such as mindspore and tensorflow, which is used to generate communication operators and computing operators required to be executed by computing nodes according to the services in the application layer and the topology information of the communication network 10. The communication layer 503 is used to receive the communication operator sent by the framework layer 502 and convert the communication operator into a communication task (task) required to be executed by the processor 600. The communication layer 503 may include a collective communication library, such as Huawei collective communication library (HCCL). The driver 504 is used to drive the processor 600 to perform corresponding computing operations or communication operations according to the computing operators or communication operators sent by the framework layer.

[0045] The processor 600 is used to perform corresponding computing operations for the services in the application layer 501; and the processor 600 may also include a scheduler 601 and a communication controller 602, so that the communication controller 602 can communicate with the switching node of the first level under the scheduling of the scheduler 601. Exemplarily, the processor 600, for example, can be a central processing unit (CPU), a neural network processing unit (NPU), and an application-specific integrated circuit (ASIC), a programmable logic device (PLD), a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a system on chip (SoC), a software-defined infrastructure (SDI) chip, an AI processing chip, a data processing unit (DPU), and any processor or any combination thereof.

[0046] It is worth noting that Figure 2The architecture of the switching node and the computing node shown is only an exemplary description. In actual application, the switching node and the computing node may also adopt other architectures, such as including other components, etc., which is not limited to this.

[0047] Figure 1 In the communication network 10 shown, in addition to the switching nodes at multiple levels, other devices / equipment may also be included. For example, the communication network 10 may also include a network manager ( Figure 1 (not shown), the network manager can generate topology information for indicating the topological structure of the communication network 10, and the network manager can also perform corresponding initialization configurations on the switching nodes of each level in the communication network 10, such as configuring the hash function used by the switching nodes of the first level to select the next hop route. Exemplarily, the network manager can be, for example, a subnet manager (subnetmanager), etc. For another example, the communication network 10 can also include a central controller, which can be used to specify at least one second-level switching node in the communication network 10 for multiple computing nodes to perform protocol calculations. In addition, the network manager and the central controller can be deployed in an independent server, or can be deployed on one or more computing nodes on the end side. This embodiment does not limit the deployment method of the network manager and the central controller.

[0048] exist Figure 1 In the communication network 10 shown, each computing node can access one switching node, or can access multiple switching nodes (such as multi-homing access, etc.). In addition, the communication link between each computing node and the first-level switching node can be one or more, such as the number of communication links between computing node 1 and switching node 101 is 2, etc. The communication link between the second-level switching node and the first-level switching node can also be one or more, such as the number of communication links between switching node 101 and switching node 201 is 4, etc.

[0049] The multiple computing nodes connected to the first-level switching nodes can collaboratively perform the same periodic computing task, that is, the multiple computing nodes can periodically perform some of the task stages in the computing task, and upload the data to be calculated generated by executing the part of the task stage to the communication network. For example, when the periodic computing task is specifically a distributed model training task, the data to be calculated uploaded by the computing node can specifically be the parameters in the AI ​​model currently trained by the computing node.

[0050] Assume that computing nodes 1 to 4 and computing nodes 9 to 12 cooperate to perform the same periodic computing task, and the second-level switching node 201 will calculate the data to be calculated uploaded by these computing nodes. At this time, if the computing resources on the second-level switching node 201 are allocated to the computing task, the computing resources will be bound to the computing task. Then, in the process of the computing node executing the computing task and uploading the data to be calculated, the switching node 201 is in a state of waiting to receive the data corresponding to the computing task for a long time, which makes the computing resources on the second-level switching node 201 idle for a long time, resulting in low utilization of the computing resources on the switching node 201.

[0051] Based on this, Figure 1In the communication network shown, the computing resources on the second-level switching node 201 will not be fixedly allocated to specific computing tasks, so as to avoid the problem of low resource utilization caused by static allocation of computing resources. In specific implementation, computing nodes 1 to 4 and computing nodes 9 to 12 will generate multiple communication tasks in the process of collaboratively executing the same periodic computing task. For each of the multiple communication tasks, each computing node will send the data to be calculated to the switching node in the communication network to request the switching node to perform on-line calculations. For example, for distributed model training tasks (i.e., the above-mentioned computing tasks), in each round of iterative training of the model, multiple computing nodes will generate the same communication task, and send the trained model parameters to the switching node in the communication network for global reduction (allreduce) calculation according to the communication task. Taking the case where multiple computing nodes upload data corresponding to one of the communication tasks (hereinafter referred to as the target communication task) as an example, computing nodes 1 to 4 can send the data to be calculated and the target communication task identification (Identity, ID) corresponding to the data to be calculated to the first-level switching node 101, computing nodes 9 to 12 can send the data to be calculated and the target communication task ID corresponding to the data to be calculated to the first-level switching node 105, and the data to be calculated sent by different computing nodes for the same communication task corresponds to the same communication task ID. The switching node 101 and the switching node 105 can respectively calculate the received data to be calculated, obtain intermediate data, and forward the intermediate data and the target communication task ID to the switching node 201 of the second level. At this time, the switching node 201 will calculate the received intermediate data corresponding to the same target communication task ID, obtain the data calculation result, and send the data calculation result to the switching node 101 and the switching node 105 of the first layer respectively. Correspondingly, switching node 101 sends the data calculation results to computing nodes 1 to 4 that execute the computing task respectively; switching node 105 sends the data calculation results to computing nodes 9 to 12 that execute the computing task respectively, so that computing nodes 1 to 4, and computing nodes 9 to 12 can continue to execute the periodic computing task based on the received data calculation results.

[0052] Since the switching nodes 101 and 105 in the first level, and the switching node 201 in the second level all calculate the data to be calculated uploaded by multiple computing nodes on the end side according to the target communication task ID, the computing resources on the switching nodes 101, 105 and 201 do not need to be bundled with the periodic computing tasks executed on the end side. This allows the computing resources on the switching nodes in each level to complete the calculation according to the target communication task ID without waiting for the multiple computing nodes to upload the next batch of data to be calculated for the computing task, but can directly calculate the data uploaded by other computing nodes to perform other computing tasks. This can reduce the length of time that the computing resources on the switching nodes are idle, thereby improving the utilization rate of the computing resources on the switching nodes, which is to reduce the concurrency requirements of the switching nodes in disguise.

[0053] That is, after the switch node 201 performs calculations for data 1 with target communication task ID 1 and outputs data calculation result 1, while computing nodes 1 to 4 and computing nodes 9 to 12 continue to perform periodic computing task 1 according to the data calculation result 1, the switch node 201 can perform calculations for data 2 with target communication task ID 2 and output data calculation result 2, and the data calculation result 2 can be transmitted to computing nodes 5 to 6 and computing nodes 13 to 16, so that these computing nodes continue to perform periodic computing task 2 according to the data calculation result 2. In this way, the same computing resource on the switch node 201 can perform computing processes for multiple computing tasks in parallel within a period of time, thereby improving the utilization rate of the computing resources on the switch node 201.

[0054] It is worth noting that Figure 1 The network shown is only an exemplary description and is not intended to limit the structure of the communication network. For example, in other possible implementations, the communication network may include more layers of switching nodes, such as the third layer, the fourth layer, etc. The number of switching nodes at each layer may be any number; and the number and connection method of the communication links between the computing nodes and the switching nodes, and the number and connection method of the communication links between the switching nodes at different layers are not limited to Figure 1 For example, in other possible implementations, communication links may exist between different switching nodes at the same level, so that different switching nodes at the same level may communicate with each other, such as performing traffic detours. For example, in other possible implementations, the communication network may further include other devices, such as devices for resource management (such as managing the communication bandwidth between different switching nodes, etc.), devices for abnormal status monitoring, etc.

[0055] Next, various non-limiting specific implementations of the communication process are described in detail.

[0056] See also Figure 3 , is a flow chart of a communication method in an embodiment of the present application. The method can be applied to the above Figure 1 The communication network 10 shown in FIG. 1 may also be applied to other possible communication networks. Figure 1 The communication network 10 shown is used as an example for explanation. Figure 3 The communication method shown may specifically include:

[0057] S301: Multiple computing nodes send data to be calculated of the same periodic computing task and a target communication task ID corresponding to the data to be calculated to multiple first target switching nodes of the first level, wherein multiple communication tasks are generated in the process of multiple computing nodes executing the computing task, and the target communication task ID is used to indicate one of the communication tasks, and the target communication task ID sent by each computing node is the same.

[0058] In this embodiment, multiple computing nodes can collaborate to perform the same periodic computing task, such as a distributed model training task, etc. The multiple computing nodes can periodically execute part of the task stages in the computing task, and each time the part of the task stage is executed, the computing node will generate corresponding data, hereinafter referred to as data to be calculated. Then, each computing node can generate a corresponding communication task, and upload the generated data to be calculated to the communication network 10 based on the communication task, so as to request the communication network 10 to perform on-line computing, which can be specifically requesting the switching node in the communication network 10 to reduce the data to be calculated uploaded by multiple computing nodes, such as reducing the data to be calculated based on the allreduce computing method. In this way, the transmission resources required to reduce the data to be calculated on multiple computing nodes can be reduced (compared to the transmission resources required to reduce the data to be calculated by the computing nodes on the end side).

[0059] Since multiple computing nodes will periodically generate multiple copies of data to be calculated in the process of executing periodic computing tasks, and generate corresponding communication tasks for each copy of data to be calculated, for ease of understanding and explanation, this embodiment is described by taking each computing node uploading data to be calculated for a communication task (hereinafter referred to as a target communication task) as an example. Each computing node can generate a target communication task ID for the data to be calculated, and the target communication task ID is used to indicate that the computing node sends the communication task of the data to be calculated to the switching node used to perform the protocol calculation in the communication network 10. In addition, the target communication task ID generated by multiple computing nodes executing the same computing task for the data to be calculated is the same, so that the switching node can determine the data to be calculated corresponding to the same target communication task ID participating in the protocol. Exemplarily, the target communication task ID can be generated by the framework layer 502 or the communication layer 503 in the computing node.

[0060] exist Figure 1 In the communication network shown, the multiple computing nodes uploading the data to be computed may be, for example, computing nodes 1 to 4 and computing nodes 9 to 12. Correspondingly, the multiple first target switching nodes of the first level may specifically be switching node 101 and switching node 105.

[0061] S302: The plurality of first target switching nodes in the first level calculate the received data to be calculated to obtain intermediate data.

[0062] S303: The plurality of first target switching nodes send the intermediate data and the target communication task ID to at least one second target switching node in the second layer.

[0063] In this embodiment, the data to be calculated generated by multiple computing nodes can be reduced by the switching nodes of multiple layers in the communication network. Among them, the multiple first target switching nodes in the first layer can perform preliminary reduction calculations on the received data to be calculated and generate intermediate data. Then, each first target switching node forwards the generated intermediate data and the corresponding target communication task ID to one or more switching nodes in the second layer to complete further reduction calculations on the intermediate data. For example, assuming that Figure 1 In the communication network 10 shown, the switching node 101 and the switching node 105 in the first layer and the switching node 201 in the second layer perform reduction calculations on the data to be calculated. The switching node 101 and the switching node 105 in the first layer can first perform preliminary reduction calculations on the received data to be calculated, and send the calculated reduced data to the switching node 201 for final reduction calculations.

[0064] In specific implementation, the multiple first target switching nodes may first determine the second target switching node for reducing the intermediate data among the multiple switching nodes included in the second level. For example, the multiple first target switching nodes may obtain indication information for indicating the second target switching node. For ease of understanding, this embodiment provides the following five examples for determining the second target switching node.

[0065] Example 1: Each first target switching node can select a switching node from a plurality of switching nodes included in the second level, such as selecting a switching node in the second level through a hash function, etc., hereinafter referred to as the first candidate switching node. Then, the first target switching node can send a first on-line computing request to the first candidate switching node to request the first candidate switching node to reduce the intermediate data, and when receiving the indication information sent by the first candidate switching node, the first target switching node determines that the first candidate switching node is the above-mentioned second target switching node. When receiving the replacement request sent by the first candidate switching node, the first target switching node can reselect a switching node from a plurality of switching nodes included in the second level, such as replacing the hash function to reselect a switching node in the second level, hereinafter referred to as the second candidate switching node. Then, the first target switching node can send a second on-line computing request to the second candidate switching node to request the second candidate switching node to reduce the intermediate data, and when receiving the indication information sent by the second candidate switching node, the first target switching node determines that the second candidate switching node is the above-mentioned second target switching node. When receiving the replacement request sent by the second candidate switching node, the first target switching node can refer to the above process and request other switching nodes in the second level to reduce the intermediate data until the second target switching node is determined. In actual application, when all the switching nodes in the second level cannot reduce the intermediate data, the first target switching node can instruct the end side to select a computing node to perform the operation of reducing the data to be calculated generated by multiple computing nodes, or can feedback the failure of the network calculation request to the computing node on the end side.

[0066] Example 2: The second target switching node that performs the reduction operation can be pre-arranged by the computing node on the end side, so that multiple computing nodes on the end side can send multiple online requests to multiple first target switching nodes of the first level, wherein each computing node can send an online request to a first target switching node to which it is connected. The online request received by the first target switching node may carry indication information for indicating the second target switching node that performs the reduction operation on the intermediate data. In this way, each first target switching node can parse the received online request to obtain the indication information, and then determine the second target switching node that performs the reduction on the intermediate data according to the indication information.

[0067] Exemplarily, the second target switching node for computing the intermediate data in the communication network 10 may be pre-arranged by the framework layer 502 or the communication layer 503 in the computing node.

[0068] Example three, the first target switching node can determine all switching nodes in the second level that have communication connections with the first target switching node as second target switching nodes. In this case, the number of second target switching nodes can be multiple, that is, the multiple switching nodes in the second level can collaborate to complete the protocol processing for the intermediate data.

[0069] Example 4: Figure 1 The communication network 10 shown may also include a central controller ( Figure 1 (not shown in the figure), the central controller can pre-arrange the second target switching node for performing the reduction operation on the intermediate data for the multiple computing nodes, and notify the multiple computing nodes on the end side. Then, the multiple computing nodes on the end side can send multiple online requests to the multiple first target switching nodes of the first level, and the online request can carry indication information for indicating the second target switching node for performing the reduction operation on the intermediate data. In this way, each first target switching node can parse the received online request to obtain the indication information, and then determine the second target switching node for reducing the intermediate data according to the indication information.

[0070] Example 5: Figure 1 The communication network 10 shown may also include a central controller ( Figure 1 (not shown), the central controller can determine the second target switching node for performing the reduction operation on the intermediate data, and notify it to each first target switching node in the first level, so that each first target switching node can know the second target switching node that performs the reduction operation.

[0071] Of course, the above-mentioned multiple implementations of determining the second target switching node are only some exemplary descriptions. In actual application, the first target switching node may also use other methods to determine at least one second target switching node in the second level, and this is not limited.

[0072] After determining the second target switching node, the plurality of first target switching nodes may forward the intermediate data calculated according to the data to be calculated to the second target switching node, and the first target switching node may also send the target communication task ID corresponding to the data to be calculated to the second target switching node. The first target switching node may send the intermediate data and the target communication task ID together to the second target switching node; or the first target switching node may first send a request including the target communication task ID to the second target switching node, and when the second target switching node receives the request (indicating that the second target switching node is a device for calculating the intermediate data), the first target switching node may then send the intermediate data to the second target switching node.

[0073] S304: At least one second target switching node in the second level calculates the received intermediate data corresponding to the same target communication task ID to obtain a data calculation result.

[0074] In this embodiment, the second target switching node calculates the intermediate data with the communication task as the granularity. In specific implementation, the second target switching node can first determine multiple copies of intermediate data corresponding to the same target communication task ID, each copy of the intermediate data comes from a first-level switching node, so that the second target switching node can calculate the multiple copies of the intermediate data, such as reducing the multiple copies of the intermediate data, to generate corresponding data calculation results.

[0075] For example, assuming that the data to be calculated sent by computing nodes 1 to 4 and computing nodes 9 to 12 are: 1, 5, -2, 3, 8, -7, 5, 3, respectively, then the switching node 101 in the first level can calculate the average of the received 1, 5, -2, 3 as 7 / 4 (i.e., intermediate data), and the switching node 105 can calculate the average of the received 8, -7, 5, 3 as 9 / 4 (i.e., intermediate data); and the switching node 201 in the second level can calculate the average of the received intermediate data 7 / 4 and 9 / 4, and the calculated average value (i.e., the data calculation result) is 2.

[0076] Wherein, when the number of the second target exchange nodes is multiple, the multiple second target exchange nodes can collaboratively complete the calculation process for the intermediate data. For example, when each first target exchange node sends the intermediate data to multiple second target exchange nodes, it can pre-divide each intermediate data into multiple subsets according to the number of second target exchange nodes, so that each first target exchange node can send a subset of each intermediate data to a second target exchange node, so that the multiple subsets received by the multiple second target exchange nodes are a complete intermediate data. Correspondingly, each second target exchange node can perform calculations based on the multiple subsets corresponding to the multiple intermediate data, and generate corresponding data calculation results. Wherein, by summarizing the data calculation results generated by the multiple second target exchange nodes respectively, the complete data calculation results obtained by calculating the multiple intermediate data can be obtained.

[0077] For example, assuming that the intermediate data generated by the plurality of first target switching nodes are: {1, -3}, {5, -2}, {-2, -7}, {3, 4}, {8, 4}, {-7, -8}, {5, 3}, {3, 1}, and assuming that the number of the second target switching nodes is 2, which are the switching node 201 and the switching node 202. Then, the plurality of first target switching nodes can send the subset A of the intermediate data: 1, 5, -2, 3, 8, -7, 5, 3 to the switching node 201, and send the subset B of the nodes to be calculated: -3, -2, -7, 4, 4, -8, 3, 1 to the switching node 202. The switching node 201 can calculate the average value of the subset A of the intermediate data (that is, the data calculation result generated by the switching node 201) as 2, and the switching node 202 can calculate the average value of the subset B of the intermediate data (that is, the data calculation result generated by the switching node 202) as -1. In this way, after the data calculation results generated by the switching node 201 and the switching node 202 are aggregated, the obtained data calculation result is {2, -1}.

[0078] S305: At least one second target switching node sends data calculation results to multiple first target switching nodes respectively.

[0079] S306: The multiple first target switching nodes respectively send the data calculation results to the multiple computing nodes that execute the periodic computing task.

[0080] In this embodiment, after generating the data calculation result, the second target switching node may send the data calculation result to each first target switching node. In this way, each first target switching node may forward the data calculation result to one or more connected computing nodes (participating in executing the periodic computing task) to meet the needs of each computing node for the data calculation result in the process of executing the computing task.

[0081] In actual application, after receiving the data calculation result, the computing node executes the task content of the computing task in the current cycle, so the computing node can continue to execute the task content in the next cycle according to the data calculation result, and generate new data to be calculated in the next cycle. In the process of the computing node generating new data to be calculated and uploading the new data to be calculated to the communication network 10, the first target switching node and the second target switching node can calculate the data corresponding to the same target communication task ID uploaded by other computing nodes (such as computing nodes 5 to computing nodes 8, etc.), and return the corresponding data calculation results to other computing nodes. Among them, when the switching nodes in each level calculate the data corresponding to different target communication task IDs, the same computing resources can be used. In this way, the length of time that the computing resources on the second target switching node are in an idle state can be effectively reduced, so that the utilization rate of the computing resources on the second target switching node can be improved. In a period of time, the second target switching node can support the execution of the online computing process for multiple parallel computing tasks, so that the concurrency requirements of the second target switching node can be reduced in disguise.

[0082] Above Figure 3 In the illustrated embodiment, the process of computing the data to be computed uploaded by multiple computing nodes at the communication task granularity is mainly introduced. For ease of understanding, the following is an exemplary description of the online computing process performed by the second target switching node in combination with five specific scenarios.

[0083] See also Figure 4 , shows a flow chart of another communication method. Figure 4 In the communication method shown, the second-level switching node for performing the on-line computing can be selected from the communication network 10 by rehashing. In addition, in this embodiment, computing nodes 1 to 4 and computing nodes 9 to 12 are set to collaboratively perform the same periodic computing task.

[0084] like Figure 4 As shown, the method may specifically include:

[0085] S401: Before uploading the data to be calculated, computing nodes 1 to 4 and computing nodes 9 to 12 respectively generate on-line computing requests, and the on-line computing requests generated by each computing node include a target communication task ID, and the on-line computing requests generated by different computing nodes include the same target communication task ID.

[0086] In this embodiment, multiple communication tasks will be generated in the process of computing nodes 1 to 4 and computing nodes 9 to 12 in the collaborative execution of the same periodic computing task. For each of the multiple communication tasks, each computing node will send the data to be calculated to the switching node in the communication network to request the switching node to perform online calculations. Taking the data corresponding to one of the communication tasks (hereinafter referred to as the target communication task) uploaded by multiple computing nodes as an example, each computing node can first generate a target communication task ID, which is used to indicate the communication task of sending data to some switching nodes in the second level. The target communication task IDs generated by different computing nodes are the same, which are used to instruct the communication network 10 to calculate the data to be calculated uploaded by multiple computing nodes of the same communication task.

[0087] The multiple computing nodes used to execute the same computing task may be pre-specified by the user, or may be configured by a network manager ( Figure 1 (not shown) scheduling multiple computing nodes to execute the computing task, etc., which is not limited in this embodiment.

[0088] S402: Computing nodes 1 to 4 respectively send the generated on-line computing requests to the first-level switching node 101; computing nodes 9 to 12 respectively send the generated on-line computing requests to the first-level switching node 105.

[0089] Among them, each computing node can send the generated online computing request to the first-level switching node it is connected to, such as Figure 5 shown.

[0090] S403: After receiving the on-line computing request, the switching node 101 performs a hash operation according to the target communication task ID in the on-line computing request to obtain a hash value, and determines the switching node 201 corresponding to the hash value from the second-level switching nodes connected to the switching node 101.

[0091] S404: After receiving the on-line computing request, the switching node 105 performs a hash operation according to the target communication task ID in the on-line computing request to obtain a hash value, and determines the switching node 201 corresponding to the hash value from the second-level switching nodes connected to the switching node 105.

[0092] Among them, the switching node 101 and the switching node 105 can be configured with the same multiple hash functions, and the multiple hash functions can be configured by the network manager when initializing each switching node of the first level in the communication network; and the network manager can also configure each switching node of the first level to select a hash function based on the same strategy to perform a hash operation on the target communication task ID. In this way, for the same target communication task ID, different switching nodes can use the same hash function to perform a hash operation on the target communication task ID and obtain the same hash value.

[0093] After obtaining the hash value, the switch node 101 can determine the switch node for calculating the intermediate data from multiple switch nodes of the second layer connected to the switch node 101 according to the hash value (or it can be called hash selection of a second-layer path).

[0094] Specifically, the second-level switching nodes connected to the switching node 101 include the switching node 201 and the switching node 202. Then, the switching node 101 can perform a modulo operation on the number of the second-level switching nodes connected to the switching node 101 according to the hash value, that is, the switching node 101 performs a modulo operation on 2 according to the hash value. When the remainder is 1, the switching node 101 can determine that the switching node corresponding to the hash value is the switching node 201; and when the remainder is 0, the switching node 101 can determine that the switching node corresponding to the hash value is the switching node 202. In this embodiment, the switching node corresponding to the hash value is the switching node 201 as an example for description.

[0095] Referring to the above similar manner, the switch node 105 can use the same hash value to determine the same switch node, that is, the switch node 201.

[0096] In actual application, after performing a hash operation on the target communication task ID using a hash function, the switch node 101 and the switch node 105 may store the identifier of the hash function and the target communication task ID in correspondence, such as in the form of the following Table 1 locally in the switch node.

[0097] Table 1

[0098] Target communication task ID Hash function identification Logo 1 Function 1 …… ……

[0099] S405: Switching node 101 and switching node 105 respectively send an on-line computing request to switching node 201 to request switching node 201 to compute the intermediate data. The on-line computing request includes a target communication task ID.

[0100] like Figure 5As shown, each switching node may send an on-network computing request to the switching node 201 determined by the hash operation.

[0101] S406: The switch node 201 sends a replacement request to the switch node 101 and the switch node 105 respectively according to the current load. The replacement request is used to instruct the switch node 101 and the switch node 105 to replace the second-level switch node that processes the intermediate data.

[0102] As an implementation example, the switching node 201 can read the number of requests currently being responded to from an internal register, and based on the number of requests currently being responded to, predict whether the total number of requests being responded to simultaneously exceeds the line rate concurrency range of the switching node 201 after continuing to respond to the on-line computing requests sent by the switching node 101 / switching node 105. The line rate refers to the amount of data that can be transmitted by the port of the switching node in a unit time. Usually, when responding to a request, the switching node 201 can use part of the resources (such as part of the port) to receive the data stream corresponding to the request and occupy a line rate share. Line rate concurrency refers to the number of data streams that can be transmitted concurrently by the switching node in a unit time.

[0103] If the switch node 201 predicts that the total number of requests to be responded to exceeds the line speed concurrency range it supports, it means that if the switch node 201 responds to the online computing request, the load of the switch node 201 will be too large, which exceeds the range that the switch node 201 can bear. At this time, the switch node 201 can send a replacement request to the switch node 101 and the switch node 105 respectively, so as to instruct the switch node 101 and the switch node 105 to reselect and request other switch nodes in the second layer to calculate the intermediate data.

[0104] If switch node 201 predicts that the total number of requests to be responded to does not exceed the line speed concurrency range it supports, switch node 201 can respond to the on-line computing requests sent by switch node 101 and switch node 105, and start processing the intermediate data subsequently sent by switch node 101 and switch node 105.

[0105] In this embodiment, the example in which the switch node 201 refuses to respond to the on-line computing request and sends a replacement request to the switch node 101 and the switch node 105 is used for description.

[0106] At this time, the switching node 201 can locally record the target communication task ID parsed from the on-line computing request, the number of first-level switching nodes participating in the request (the sent on-line computing request includes the same target communication task ID), and use a bitmap to record the first-level switching nodes currently sent to the switching node 201. Exemplarily, the switching node 201 can record the target communication task ID, the number of first-level switching nodes participating in the request, and the bitmap through the following Table 2.

[0107] Table 2

[0108] Target communication task ID The number of exchange nodes participating in the request Bitmap Logo 1 Quantity X Bitmap Data …… …… ……

[0109] In this way, when it is determined through the bitmap that the number of on-line computing requests received by the switching node 201 reaches the number of switching nodes participating in the request, the network address of the corresponding port peer can be searched from the routing table through the bitmap, that is, the network address of the switching node 101 and the switching node 105 that send the on-line computing request to the switching node 201, so that the switching node 201 can send a replacement request to the switching node 101 and the switching node 105 respectively according to the queried network address, such as Figure 5 As shown. Exemplarily, the network address may be, for example, an Internet Protocol (IP) address.

[0110] S407: After receiving the replacement request, the switching node 101 selects a new hash function to perform a hash operation on the target communication task ID to obtain a new hash value, and determines the switching node 202 corresponding to the new hash value from the second-level switching nodes connected to the switching node 101.

[0111] S408: After receiving the replacement request, the switching node 105 selects a new hash function to perform a hash operation on the target communication task ID to obtain a new hash value, and determines the switching node 202 corresponding to the new hash value from the second-level switching nodes connected to the switching node 105.

[0112] Since the same hash function is configured in the switch node 101 and the switch node 105 and the hash function is selected based on the same strategy, after the switch node 101 and the switch node 105 re-hash the target communication task ID, the switch node selected based on the new hash value is the switch node 202 .

[0113] In specific implementation, the switching node 101 and the switching node 105 can reselect the hash function according to the correspondence between the locally stored hash function identifier and the target communication task ID, and the selected hash function is different from the hash function indicated in Table 1. Then, the switching node 101 and the switching node 105 can perform a hash operation on the target communication task ID based on the reselected hash function to obtain a new hash value, and perform a remainder operation based on the new hash value, so as to determine the switching node 202 according to the value obtained by the remainder.

[0114] Furthermore, the switching node 101 and the switching node 105 may also store the identifier of the hash function currently used for the hash operation in correspondence with the target communication task ID, such as continuing to record the target communication task ID and the identifier of the hash function in Table 1. In this way, if a replacement request is subsequently received from the switching node 202, the switching node 101 and the switching node 105 may reselect a new hash function to perform a new hash operation based on the identifier of the hash function recorded for the target communication task ID.

[0115] S409: The switch node 101 and the switch node 105 respectively send an on-line computing request to the switch node 202 to request the switch node 202 to compute the intermediate data. The on-line computing request includes the target communication task ID.

[0116] like Figure 5 As shown, each switch node may send an on-line calculation request to the switch node 202 re-determined by the hash operation.

[0117] S410: Switching node 202 sends indication information to switching node 101 and switching node 105 respectively according to the current load. The indication information is used to instruct switching node 202 to calculate the intermediate data, that is, to instruct switching node 202 to respond to the on-line calculation requests sent by switching node 101 and switching node 105.

[0118] Exemplarily, the indication information may be, for example, notification information sent by the switching node 202, or may be other types of information, which is not limited thereto.

[0119] S411: After receiving the instruction information, the switch node 101 and the switch node 105 actively pull the data to be calculated from the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0120] S412 : the switch node 101 and the switch node 105 calculate the pulled data to be calculated, obtain intermediate data, and send the intermediate data to the switch node 202 .

[0121] At this time, the intermediate data sent by the switching nodes 101 and 105 and received by the switching node 202 are all intermediate data under the same communication task, that is, corresponding to the same target communication task ID.

[0122] S413: The switch node 202 calculates the received intermediate data to obtain corresponding data calculation results, and sends the data calculation results to the switch node 101 and the switch node 105 respectively.

[0123] Exemplarily, the switch node 202 may perform a reduction operation on the intermediate data to generate a corresponding result.

[0124] S414: Switching node 101 forwards the data calculation results to computing node 1 to computing node 4 respectively, and switching node 105 forwards the data calculation results to computing node 9 to computing node 12 respectively.

[0125] In actual application, computing nodes 1 to 4 and computing nodes 9 to 12 can continue to perform periodic computing tasks based on the received data calculation results. In addition, when generating new data to be calculated for the computing task, these computing nodes can Figure 4 In the process shown, the switching node in the communication network 10 is requested to perform the on-line calculation again. When multiple computing nodes request the switching node in the communication network 10 to perform the on-line calculation on the new data to be calculated again, the switching node that performs the on-line calculation in the second level may still be the above-mentioned switching node 202, or may be the switching node 201, which may be re-determined by the switching node 101 and the switching node 105 with reference to the above-mentioned process.

[0126] In this way, not only can the idle time of computing resources on the switching nodes in the communication network 10 be effectively reduced, thereby improving the utilization rate of computing resources on the switching nodes, but also the above process does not need to be controlled by a single node, thereby avoiding the problem that computing resources on the switching nodes cannot be released for a long time due to a single point of failure. In addition, the switching node for performing on-line computing is selected by hashing, which helps to achieve load balancing for multiple second-level switching nodes in the communication network 10.

[0127] It is worth noting that Figure 4 The execution order of each step shown is only an exemplary description and is not intended to be limiting. For example, in other possible embodiments, step S403 and step S404 may be executed in parallel, or step S404 may be executed before step S403.

[0128] Above Figure 4In the embodiment shown, the switch node 101 and the switch node 105 are mainly introduced to determine the switch node 202 for performing the on-line computing from the switch nodes of the second layer by means of hash operation. In other embodiments, the switch node for performing the on-line computing may also be pre-arranged by the computing node on the terminal side. Figure 6 This is explained by way of example.

[0129] See also Figure 6 , shows a flow chart of another communication method. Figure 6 In the communication method shown, it is assumed that computing nodes 1 to 4 and computing nodes 9 to 12 cooperate to perform the same periodic computing task.

[0130] like Figure 6 As shown, the method may specifically include:

[0131] S601: Before uploading the data to be calculated, computing nodes 1 to 4 and computing nodes 9 to 12 generate a target communication task ID, wherein the switching node for performing on-network computing in the second level determined based on the target communication task ID is switching node 201.

[0132] In this embodiment, computing nodes 1 to 4 and computing nodes 9 to 12 on the end side can pre-arrange switching nodes in the communication network 10 for performing on-network computing according to a unified strategy.

[0133] As an implementation example, the communication network 10 may include a network manager. In the initialization phase of the communication network 10, the network manager may obtain the topology of the communication network 10, and the line-speed aggregation performance of each switching node in the second layer, such as obtaining the number of concurrently transmitted data streams that each switching node can support in transmitting data per unit time, and configure the same multiple hash functions and the selection strategy for the hash function for each switching node in the first layer. Then, the network manager may provide the line-speed aggregation performance of each switching node in the second layer, the hash function configured to each switching node in the first layer, the selection strategy, and the topology of the communication network 10 to each computing node on the end side.

[0134] In this way, each computing node on the end side can filter the switching nodes in the second level according to the topological structure of the communication network 10 and the requirements of the line speed aggregation performance of the switching nodes for executing the computing tasks, so as to obtain the switching nodes that meet the line speed aggregation performance requirements. Then, the computing node can create a target communication task ID, and can use the hash function and selection strategy configured by each switching node to select a corresponding hash function to perform a hash operation on the target communication task ID to obtain a hash value, thereby determining the switching node for performing on-line computing from the switching nodes included in the filtered second level according to the hash value. For ease of understanding, this embodiment is described by taking the switching node 201 performing on-line computing as an example.

[0135] Furthermore, when computing nodes 1 to 4 and computing nodes 9 to 12 are collaboratively executing the same periodic computing task, each computing node generates multiple communication tasks. For each of the multiple communication tasks, each computing node sends the data to be calculated to the switching node in the communication network to request the switching node to perform online calculations. In this embodiment, multiple computing nodes uploading corresponding data to be calculated for a target communication task (one of the communication tasks) is used as an example for explanation.

[0136] S602: Computing nodes 1 to 4 and computing nodes 9 to 12 respectively generate on-line computing requests. The on-line computing request generated by each computing node includes a target communication task ID. The on-line computing requests generated by different computing nodes include the same target communication task ID.

[0137] S603: Computing nodes 1 to 4 respectively send the generated on-line computing requests to the first-level switching node 101; computing nodes 9 to 12 respectively send the generated on-line computing requests to the first-level switching node 105.

[0138] S604: Switching node 101 and switching node 105 parse the received on-line computing request to obtain a target communication task ID.

[0139] S605: The switch node 101 and the switch node 105 perform a hash operation on the target communication task ID to obtain indication information, where the indication information is used to instruct the switch node 201 to calculate the intermediate data.

[0140] S606: The switch node 101 and the switch node 105 send an on-line computing request to the switch node 201 according to the instruction information. The on-line computing request includes the target communication task ID.

[0141] S607: The switch node 201 feeds back confirmation information to the switch node 101 and the switch node 105 to notify the switch node 101 and the switch node 105 to confirm the execution of the on-network computing.

[0142] S608: After receiving the confirmation information, the switch node 101 and the switch node 105 actively pull the data to be calculated from the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0143] S609 : the switch node 101 and the switch node 105 calculate the pulled data to be calculated, obtain intermediate data, and send the intermediate data to the switch node 201 .

[0144] At this time, the intermediate data sent by the switching nodes 101 and 105 and received by the switching node 201 are all intermediate data under the same communication task, that is, corresponding to the same target communication task ID.

[0145] S610: The switch node 201 calculates the received intermediate data to obtain corresponding data calculation results, and sends the data calculation results to the switch node 101 and the switch node 105 respectively.

[0146] Exemplarily, the switch node 201 may perform a reduction operation on the intermediate data to generate a corresponding result.

[0147] S611: Switching node 101 forwards the data calculation results to computing nodes 1 to 4 respectively, and switching node 105 forwards the data calculation results to computing nodes 9 to 12 respectively.

[0148] The specific implementation process of step S602 to step S611 can be found in the above Figure 4 The description of the relevant parts of steps S401 to S404 and steps S411 to S414 in the illustrated embodiment will not be repeated here.

[0149] In this way, not only can the length of time that the computing resources on the switching node 201 are idle be effectively reduced, thereby improving the utilization rate of the computing resources on the switching node 201, but also the above process does not need to be controlled by a single node, thereby avoiding the problem of single point failure causing the computing resources on the switching node 201 to be unable to be released for a long time.

[0150] Above Figure 4 as well as Figure 6 In the embodiment shown, the on-line computing process is performed by a switching node in the second layer as an example. In other possible embodiments, multiple switching nodes in the second layer may perform on-line computing for the intermediate data of the same target communication task ID. Figure 7 This is explained by way of example.

[0151] See also Figure 7 , shows a flow chart of another communication method. Figure 7 In the communication method shown, it is assumed that computing nodes 1 to 4 and computing nodes 9 to 12 cooperate to perform the same periodic computing task.

[0152] like Figure 7 As shown, the method may specifically include:

[0153] S701: Before uploading the data to be calculated, computing nodes 1 to 4 and computing nodes 9 to 12 respectively generate on-line computing requests, and the on-line computing requests generated by each computing node include a target communication task ID, and the on-line computing requests generated by different computing nodes include the same target communication task ID.

[0154] In this embodiment, when computing nodes 1 to 4 and computing nodes 9 to 12 are collaboratively executing the same periodic computing task, each computing node generates multiple communication tasks. For each of the multiple communication tasks, each computing node sends the data to be calculated to the switching node in the communication network to request the switching node to perform online calculations. For ease of understanding and explanation, this embodiment is described by taking multiple computing nodes uploading corresponding data to be calculated for a target communication task (one of the communication tasks) as an example.

[0155] S702: Computing nodes 1 to 4 respectively send the generated on-line computing requests to the first-level switching node 101; computing nodes 9 to 12 respectively send the generated on-line computing requests to the first-level switching node 105.

[0156] S703: After receiving the on-line computing request, the switching node 101 generates two on-line computing requests according to the number of the second-level switching nodes connected to the switching node 101, and sends the on-line computing requests to the second-level switching node 201 and the switching node 202 respectively, wherein each on-line computing request includes a target communication task ID.

[0157] S704: After receiving the on-line computing request, the switch node 105 generates two on-line computing requests according to the number of the second-level switch nodes connected to the switch node 105, and sends the on-line computing requests to the second-level switch nodes 201 and 202 respectively.

[0158] In this embodiment, the switching nodes 101 and 105 of the first level are connected to the switching nodes 201 and 202 of the second level. Then, after receiving the on-line computing request sent by the computing node on the end side, the switching nodes 101 and 105 can generate multiple on-line computing requests according to the number of the switching nodes of the second level connected thereto, each of which includes a target communication task ID, and the target communication task IDs included in different on-line computing requests are the same. Then, the switching nodes 101 and 105 can send an on-line computing request to each switching node in the second level connected thereto, so as to request multiple switching nodes in the second level to perform on-line computing.

[0159] S705: Switching node 201 feeds back confirmation information to switching node 101 and switching node 105, and switching node 202 feeds back confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm execution of the on-network computing.

[0160] S706: After receiving the confirmation information, the switch node 101 and the switch node 105 actively pull the data to be calculated from the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0161] S707: The switching node 101 calculates the pulled data to be calculated to obtain intermediate data, and divides the calculated intermediate data into two subsets, namely subset A1 and subset A2, according to the number of switching nodes in the second level connected to it; and the switching node 105 divides the calculated intermediate data into two subsets, namely subset B1 and subset B2, according to the number of switching nodes in the second level connected to it.

[0162] In this embodiment, since multiple switching nodes in the second level (i.e., switching node 201 and switching node 202) are used to perform on-network computing, switching node 101 can divide the intermediate data generated according to the data to be calculated uploaded by computing node 1 to computing node 4 into two subsets, namely subset A1 and subset A2. Figure 8 For example, assuming that the intermediate data generated by the switching node 101 is {1, -3}, {5, -2}, {-2, -7}, {3, 4}, then the switching node 101 can divide the intermediate data into subset A1 {1, 5, -2, 3} and subset A2 {-3, -2, -7, 4}.

[0163] In addition, the switching node 105 also divides the intermediate data generated according to the data to be calculated uploaded by the computing node 9 to the computing node 12 into two subsets, namely, subset B1 and subset B2. Figure 8For example, assuming that the intermediate data generated by the switching node 105 is {8, 4}, {-7, -8}, {5, 3}, {3, 1}, then the switching node 101 can divide the intermediate data into a subset B1 {8, -7, 5, 3} and a subset B2 {4, -8, 3, 1}.

[0164] S708 : Switching node 101 sends subset A1 to switching node 201 and sends subset A2 to switching node 202 ; switching node 105 sends subset B1 to switching node 201 and sends subset B2 to switching node 202 .

[0165] At this time, the intermediate data received by the switching node 201 and the switching node 202 are all intermediate data under the same communication task, corresponding to the same target communication task ID. In addition, the results calculated by the switching node 201 and the switching node 202 based on the received intermediate data are the results calculated based on all the data uploaded by the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0166] S709: Switching node 201 calculates the received subsets A1 and B1 to obtain corresponding data calculation results 1, and sends the data calculation results 1 to switching node 101 and switching node 105 respectively; switching node 202 calculates the received subsets A2 and B2 to obtain corresponding data calculation results 2, and sends the data calculation results 2 to switching node 101 and switching node 105 respectively.

[0167] Exemplarily, the switch node 201 and the switch node 202 may perform a reduction operation on the received intermediate data to generate corresponding results.

[0168] S710: Switching node 101 forwards data calculation result 1 and data calculation result 2 to computing node 1 to computing node 4 respectively, and switching node 105 forwards data calculation result 1 and data calculation result 2 to computing node 9 to computing node 12 respectively.

[0169] In this way, each computing node can obtain data computing result 1 and data computing result 2, so that after the computing node performs operations such as splicing on data computing result 1 and data computing result 2, it can obtain the final data computing result it needs.

[0170] For the specific implementation process of each step in this embodiment, reference can be made to the description of the relevant steps in the aforementioned embodiment, which will not be repeated here.

[0171] In this way, not only can the idle time of the computing resources on the switching nodes 201 and 202 be effectively reduced, thereby improving the utilization of the computing resources on the switching nodes 201 and 202, but also the above process does not need to be controlled by a single node, thereby avoiding the problem that the computing resources on the switching nodes 201 and 202 cannot be released for a long time due to a single point of failure. At the same time, the switching nodes 201 and 202 perform online computing in parallel, which can effectively improve the efficiency of online computing compared to using a single switching node to perform online computing.

[0172] Above Figure 4 , Figure 6 as well as Figure 7 In the embodiment shown, the switching nodes that perform on-line computing in the communication network 10 are determined in a distributed orchestration manner, that is, the switching nodes that perform on-line computing in the communication network 10 are determined by multiple devices (which may be computing nodes on the end side or switching nodes at the first level). In other possible embodiments, the switching nodes that perform on-line computing in the communication network 10 may also be determined in a centralized orchestration manner. Fig. 9 This is explained by way of example.

[0173] See also Fig. 9 , shows a flow chart of another communication method. Fig. 9 In the communication method shown, the communication network 10 may also include a central controller ( Figure 1 (not shown), and set computing nodes 1 to 4 and computing nodes 9 to 12 to collaboratively perform the same periodic computing task.

[0174] like Fig. 9 As shown, the method may specifically include:

[0175] S901: Computing nodes 1 to 4 and computing nodes 9 to 12 on the end side send resource requests to the central controller to apply to the central controller for resources to perform online computing. The resource request includes the target communication task ID and the network addresses of all computing nodes participating in the execution of the same periodic computing task.

[0176] In this embodiment, when computing nodes 1 to 4 and computing nodes 9 to 12 are collaboratively executing the same periodic computing task, each computing node generates multiple communication tasks. For each of the multiple communication tasks, each computing node sends the data to be calculated to the switching node in the communication network to request the switching node to perform online calculations. For ease of understanding and explanation, this embodiment is described by taking multiple computing nodes uploading corresponding data to be calculated for a target communication task (one of the communication tasks) as an example.

[0177] For the target communication task, each computing node may generate the same target communication task ID, and the target communication task ID is used to indicate the communication task of sending data to some switching nodes in the second level.

[0178] In addition, the computing node on the terminal side can also obtain the network addresses of other computing nodes participating in the same computing task, and the network address can be, for example, the IP address of the computing node, or the media access control (MAC) address, etc. For example, the computing node can parse the network addresses of multiple computing nodes participating in the computing task from the configuration file provided by the user to the application layer 501.

[0179] Then, the computing node can generate a resource request according to the generated target communication task ID and the network addresses of the multiple computing nodes obtained, and send the resource request to the central controller to request resources from the central controller. The resource request sent by each computing node to the central controller can include the same target communication task ID and the network addresses of the multiple computing nodes.

[0180] S902: The central controller obtains load information, where the load information is used to indicate the loads of multiple switching nodes in the first layer and the second layer.

[0181] Exemplarily, the load of the switching node may be measured by, for example, the number of requests currently responded to by the switching node, or may be measured by other methods, which are not limited thereto.

[0182] In specific implementation, the central controller may send a load acquisition request to each switching node, so that each switching node may respond to the load acquisition request and feed back the current load of the switching node.

[0183] S903: The central controller sends indication information for the switching node 201 in the second layer to multiple computing nodes according to the load information.

[0184] The indication information of the switching node 201 may be, for example, the network address of the switching node 201, or may be information such as the name of the switching node 201.

[0185] As an implementation example, the central controller may obtain the topology of the communication network 10 and the line-speed aggregation performance of each switching node in the communication network 10 in advance before receiving a resource request. For example, during the initialization configuration stage of each switching node, the central controller may obtain the line-speed aggregation performance of each switching node by accessing the switching node, and the central controller may also obtain the topology of the communication network 10, such as by generating the topology through self-learning, or by providing the topology to the central controller by a user.

[0186] Then, the central controller generates an aggregation tree based on the load information, the topological structure of the communication network 10, the network addresses of multiple computing nodes, and the line speed aggregation performance of each switching node. For example, the central controller can first determine the first-level switching nodes and the second-level switching nodes that can currently perform on-line calculations on the data to be calculated sent by multiple computing nodes based on the line speed aggregation performance of each switching node and the load information of each switching node, and generate the aggregation tree in combination with the network addresses of multiple computing nodes and the topological structure of the communication network 10. Among them, the generated aggregation tree can indicate the data interaction relationship between the multiple computing nodes, some switching nodes in the first level, and some switching nodes in the second level when the communication network 10 performs on-line calculations for multiple computing nodes, so that the second-level switching nodes indicated by the aggregation tree are the switching nodes that perform on-line calculations. In this embodiment, it is assumed that the switching node that performs on-line calculations is the switching node 201.

[0187] Finally, after determining the switching node 201 where the user performs online computing, the central controller can send the identification of the switching node 201 to computing nodes 1 to 4 and computing nodes 9 to 12 respectively, such as sending the network address of the switching node 201.

[0188] In actual application, the central controller usually receives resource requests (with the same target communication task ID) sent by different computing nodes one after another. Therefore, when the central controller receives the first resource request, it can start to execute the above steps S902 and S903, and feedback the network address of the switching node 201 to the computing node that sent the resource request. In addition, the central controller will also record the target communication task ID and the network address of the switching node 201 locally. In this way, when the central controller receives resource requests sent by other computing nodes, it can send the network address of the switching node 201 to other computing nodes according to the correspondence between the target communication task ID and the network address of the switching node 201 stored locally.

[0189] S904: The computing nodes 1 to 4 and 9 to 12 on the end side respectively generate on-line computing requests, and the on-line computing request generated by each computing node includes a target communication task ID and indication information for the switching node 201, and the on-line computing requests generated by different computing nodes include the same target communication task ID.

[0190] Exemplarily, the indication information for the switching node 201 may specifically be the network address of the switching node 201. The computing node may write the network address of the switching node 201 into the payload area in the network computing request.

[0191] S905: Computing nodes 1 to 4 respectively send the generated on-line computing requests to the first-level switching node 101; computing nodes 9 to 12 respectively send the generated on-line computing requests to the first-level switching node 105.

[0192] S906: The switch node 101 and the switch node 105 respectively parse the received on-line computing request to obtain the instruction information for the switch node 201 and the target communication task ID.

[0193] S907: The switch node 101 and the switch node 105 respectively send an on-line computing request to the switch node 201 according to the parsed indication information to request the switch node 201 to compute the intermediate data. The on-line computing request includes the target communication task ID.

[0194] S908: The switch node 201 feeds back confirmation information to the switch node 101 and the switch node 105 to notify the switch node 101 and the switch node 105 to confirm the execution of the on-network computing.

[0195] S909: After receiving the confirmation information, the switch node 101 and the switch node 105 actively pull the data to be calculated from the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0196] S910 : the switch node 101 and the switch node 105 respectively calculate the data to be calculated that they have pulled, obtain intermediate data, and send the intermediate data to the switch node 201 .

[0197] S911: the switch node 201 calculates the received intermediate data to obtain corresponding data calculation results, and sends the data calculation results to the switch node 101 and the switch node 105 respectively.

[0198] Exemplarily, the switch node 201 may perform a reduction operation on the intermediate data to generate a corresponding result.

[0199] S912: Switching node 101 forwards the data calculation results to computing node 1 to computing node 4 respectively, and switching node 105 forwards the data calculation results to computing node 9 to computing node 12 respectively.

[0200] It is worth noting that the execution order of each step in this embodiment is not limited to Fig. 9 As shown in the example, in other possible embodiments, step S902 may be performed before step S901, such as the central controller may periodically detect the load of each switching node in the second level, so that after receiving a resource request, the switching node for performing on-network computing is determined based on the load information obtained by the detection.

[0201] In this way, not only can the length of time that the computing resources on the switching nodes 201 and 202 are idle be effectively reduced, thereby improving the utilization rate of the computing resources on the switching nodes 201 and 202, but also the above process does not need to be controlled by a single node, thereby avoiding the problem of single point failure causing the computing resources on the switching nodes 201 and 202 to be unable to be released for a long time.

[0202] Above Fig. 9 In the embodiment shown, the computing node on the terminal side requests resources from the central controller as an example for illustrative description. In other possible embodiments, the switching node at the first level may also request resources from the central controller. Fig.10 This is explained by way of example.

[0203] join Fig.10 , shows a flow chart of another communication method. Fig.10 In the communication method shown, the communication network 10 may also include a central controller ( Figure 1 (not shown), and set computing nodes 1 to 4 and computing nodes 9 to 12 to collaboratively perform the same periodic computing task.

[0204] like Fig.10 As shown, the method may specifically include:

[0205] S1001: Computing nodes 1 to 4 and computing nodes 9 to 12 on the end side synchronize communication task information to the central controller.

[0206] Exemplarily, the synchronized communication task information may include a target communication task ID and the like.

[0207] In specific implementation, after generating a communication task, the framework layer 502 or the communication layer 503 in the computing node can synchronize the relevant information of the communication task to the central controller, such as synchronizing the information to the central controller through the first-level switching node to which it is connected. In this way, the central controller can obtain information such as the target communication task ID, and can determine the network address of the switching node that forwards the information, that is, the network address of the switching node 101 and the switching node 105.

[0208] In this embodiment, when computing nodes 1 to 4 and computing nodes 9 to 12 are collaboratively executing the same periodic computing task, each computing node generates multiple communication tasks. For each of the multiple communication tasks, each computing node sends the data to be calculated to the switching node in the communication network to request the switching node to perform online calculations. For ease of understanding and explanation, this embodiment is described by taking multiple computing nodes uploading corresponding data to be calculated for a target communication task (one of the communication tasks) as an example.

[0209] S1002: Computing nodes 1 to 4 and computing nodes 9 to 12 on the end side respectively generate on-line computing requests, and the on-line computing request generated by each computing node includes a target communication task ID, and the on-line computing requests generated by different computing nodes include the same target communication task ID.

[0210] S1003: Computing nodes 1 to 4 respectively send the generated on-line computing requests to the first-level switching node 101; computing nodes 9 to 12 respectively send the generated on-line computing requests to the first-level switching node 105.

[0211] S1004: Switching node 101 and switching node 105 respectively send resource requests to the central controller to apply for resources for executing on-network computing. The resource request includes a target communication task ID and a network address of the switching node sending the resource request.

[0212] S1005: The central controller obtains load information, where the load information is used to indicate the loads of multiple switching nodes in the second layer.

[0213] Exemplarily, the load of the switching node may be measured by, for example, the number of requests currently responded to by the switching node, or may be measured by other methods, which are not limited thereto.

[0214] In specific implementation, the central controller may send a load acquisition request to each switching node in the second layer, so that each switching node may respond to the load acquisition request and feed back the current load of the switching node.

[0215] S1006: The central controller sends indication information of the switching node 201 in the second level to the switching node 101 and the switching node 105 respectively according to the load information.

[0216] As an implementation example, the central controller can obtain the topology structure of the communication network 10 and the line speed aggregation performance of each switching node in the second layer in advance before receiving the resource request, such as obtaining the topology structure and the line speed aggregation performance of each switching node in the initialization phase.

[0217] Then, the central controller determines that the switching node that performs the on-line calculation is the switching node 201 according to the load information, the topological structure of the communication network 10, the network addresses of the switching nodes 101 and 15, and the line-speed aggregation performance of each switching node in the second level. The load of the switching node 201 after performing the on-line calculation does not exceed the maximum load corresponding to the line-speed aggregation performance of the switching node 201.

[0218] Finally, after determining the switch node 201 where the user performs on-line computing, the central controller may send indication information of the switch node 201 to the switch node 101 and the switch node 105 respectively, such as sending the network address of the switch node 201.

[0219] S1007: Switching node 101 and switching node 105 respectively send an on-line computing request to switching node 201 according to the received instruction information of switching node 201, so as to request switching node 201 to compute the intermediate data, and the on-line computing request includes the target communication task ID.

[0220] S1008: Switching node 201 feeds back confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm execution of the on-network computing.

[0221] S1009: After receiving the confirmation information, the switch node 101 and the switch node 105 actively pull the data to be calculated from the computing nodes 1 to 4 and the computing nodes 9 to 12.

[0222] S1010 : the switch node 101 and the switch node 105 respectively calculate the pulled data to be calculated, obtain intermediate data, and send the intermediate data to the switch node 201 .

[0223] S1011: the switch node 201 calculates the received intermediate data to obtain corresponding data calculation results, and sends the data calculation results to the switch node 101 and the switch node 105 respectively.

[0224] Exemplarily, the switch node 201 may perform a reduction operation on the intermediate data to generate a corresponding result.

[0225] S1012: Switching node 101 forwards the data calculation results to computing node 1 to computing node 4 respectively, and switching node 105 forwards the data calculation results to computing node 9 to computing node 12 respectively.

[0226] It is worth noting that the execution order of each step in this embodiment is not limited to Fig.10 As shown in the example, in other possible embodiments, step S1005 may be executed before step S1004, such as the central controller may periodically detect the load of each switching node in the second level, so that after receiving a resource request, the switching node for performing on-network computing is determined based on the load information obtained by the detection.

[0227] in addition, Fig.10 In the illustrated embodiment, the example of computing nodes synchronizing the communication task information to the central controller in advance is used for explanation. In other embodiments, the computing nodes may not synchronize the communication task information. At this time, the resource requests sent to the central controller by the switching node 101 and the switching node 105 respectively may include not only the target communication task ID, but also the network addresses of all the first-level switching nodes for forwarding the same target communication task ID, that is, the network address of the switching node 101 and the network address of the switching node 105.

[0228] It should be noted that the above Figures 4 to 10 The embodiments shown are only for illustrative purposes. In actual applications, other methods may be used to determine the switch node for performing on-line computing. For example, the on-line computing of the data to be computed may be implemented in combination with the implementation methods of the above embodiments. Figure 4 as well as Figure 7 In the embodiment shown, the switching node 101 and the switching node 105 can use multiple hash functions to perform hash operations on the target communication task ID respectively, and select multiple switching nodes in the second layer according to the multiple hash values ​​to calculate the intermediate data (that is, the hash selects multiple second-layer paths to send the intermediate data). At this time, before forwarding the intermediate data, the switching node 101 and the switching node 105 can first divide the intermediate data into multiple subsets according to the number of switching nodes in the selected second layer, and send a subset of the intermediate data to each switching node in the second layer selected by hashing, so that the multiple switching nodes in the second layer can cooperate to complete the processing of the intermediate data, thereby further improving the data processing effect.

[0229] Alternatively, according to changes in the topology of the communication network 10 or changes in the computing tasks being performed, different methods (ie, different embodiments) may be selected to determine the switching nodes executed in the second level of the network computing.

[0230] Moreover, in the present application, the communication network 10 includes two levels of switching nodes as an example for illustrative explanation. In actual application, the communication network may also include more than three (including three) levels of switching nodes. In this case, the switching nodes that perform on-line computing may be switching nodes in the third level (or higher level). The specific implementation process of selecting to use the switching nodes in the third level (or higher level) to perform on-line computing can be described in the relevant parts of the aforementioned embodiments, which will not be repeated here.

[0231] In addition, an embodiment of the present application also provides a switching node, including a processor and a memory; wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory so that the switching node executes the method executed by the switching node in the first level in the above-mentioned embodiments, or executes the method executed by the switching node in the second level in the above-mentioned embodiments.

[0232] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on one or more computing devices, the one or more computing devices execute the method executed by the switching node in the first level in the above-mentioned embodiments, or execute the method executed by the switching node in the second level in the above-mentioned embodiments.

[0233] In addition, the embodiment of the present application further provides a computer program product, and when the computer program product is executed by a switching node, the switching node can execute the method executed by the switching node in the first level in the above embodiments, or execute the method executed by the switching node in the second level in the above embodiments. The computer program product can be a software installation package, and when any of the aforementioned communication methods is required, the computer program product can be downloaded and executed on a computer.

[0234] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0235] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances. This is just a way of distinguishing objects with the same attributes when describing the embodiments of this application.

[0236] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0237] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0238] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A communication method, characterized in that: The method is applied to a communication network, the communication network includes multiple levels of switching nodes, the multiple levels include a first level and a second level, different switching nodes of the first level communicate with each other through the switching nodes of the second level, the switching nodes of the first level include multiple first target switching nodes, and the switching nodes of the second level include at least one second target switching node; the method includes: The multiple first target switching nodes receive data to be calculated of the same periodic computing task sent by multiple computing nodes, and a target communication task identification ID corresponding to the data to be calculated, wherein multiple communication tasks are generated in the process of the multiple computing nodes executing the computing task, the target communication task ID is used to indicate one of the multiple communication tasks, and the target communication task ID sent by each computing node in the multiple computing nodes is the same; The plurality of first target switching nodes calculate the data to be calculated to obtain intermediate data, and send the intermediate data and the target communication task ID to the at least one second target switching node; The at least one second target switching node calculates the received intermediate data corresponding to the same target communication task ID to obtain a data calculation result; The at least one second target switching node sends the data calculation result to the plurality of first target switching nodes respectively; The multiple first target switching nodes respectively send the data calculation results to the multiple computing nodes that execute the computing tasks.

2. The method according to claim 1, characterized in that The sending the intermediate data and the target communication task ID to the at least one second target switching node comprises: The multiple first target switching nodes acquire indication information, where the indication information is used to indicate that the switching node that calculates the intermediate data is the at least one second target switching node; The plurality of first target switching nodes send the intermediate data and the target communication task ID to the at least one second target switching node.

3. The method according to claim 2, characterized in that The multiple first target switching nodes obtain indication information, including: The multiple first target switching nodes send a first on-line computing request to a first candidate switching node among the switching nodes of the second level, where the first on-line computing request is used to request the first candidate switching node to compute the intermediate data; The multiple first target switching nodes receive a replacement request sent by the first candidate switching node, where the replacement request is used to instruct to replace the second-level switching node that processes the intermediate data; The multiple first target switching nodes send a second on-line computing request to a second candidate switching node in the switching nodes of the second level, where the second on-line computing request is used to request the first candidate switching node to compute the intermediate data; The multiple first target switching nodes receive indication information sent by the second candidate switching node, where the indication information is used to instruct the second candidate switching node to calculate the intermediate data, and the second target switching node is the second candidate switching node.

4. The method according to claim 2, characterized in that: The multiple first target switching nodes obtain indication information, including: The plurality of first target switching nodes receive a plurality of online requests sent by a plurality of computing nodes, each of the plurality of online requests including the target communication task ID; The plurality of first target switching nodes generate the indication information according to the target communication task ID.

5. The method according to claim 1, characterized in that The number of the second target switching nodes is multiple; The sending the intermediate data and the target communication task ID to the at least one second target switching node comprises: Each of the plurality of first target switching nodes divides the generated intermediate data into a plurality of subsets, the number of the plurality of subsets being the same as the number of the second target switching nodes; Each of the first target switching nodes sends the multiple subsets and the target communication task ID to multiple of the second target switching nodes, wherein each of the first target switching nodes sends one subset of the multiple subsets and the target communication task ID to each of the second target switching nodes.

6. The method according to claim 2, characterized in that The communication network further includes a central controller, and the method further includes: The central controller acquires load information, where the load information is used to indicate the loads of a plurality of switching nodes at a first level and a plurality of switching nodes at a second level in the communication network; The central controller sends the identifier of the at least one second target switching node to the multiple computing nodes according to the load information; The multiple computing nodes send the indication information to the multiple first target switching nodes.

7. The method according to claim 2, characterized in that The communication network further includes a central controller, and the method further includes: The central controller acquires load information, where the load information is used to indicate the loads of a plurality of switching nodes at a first level and a plurality of switching nodes at a second level in the communication network; The central controller sends the indication information to the multiple first target switching nodes according to the load information.

8. A communication network, characterized in that: The communication network includes multiple levels of switching nodes, the multiple levels include a first level and a second level, different switching nodes of the first level communicate with each other through the switching nodes of the second level, the switching nodes of the first level include multiple first target switching nodes, and the switching nodes of the second level include at least one second target switching node; The multiple first target switching nodes are used to receive data to be calculated for the same periodic computing task sent by multiple computing nodes and target communication task identification IDs corresponding to the data to be calculated, wherein multiple communication tasks are generated in the process of the multiple computing nodes executing the computing tasks, the target communication task ID is used to indicate one of the multiple communication tasks, the target communication task ID sent by each computing node in the multiple computing nodes is the same, the data to be calculated is calculated to obtain intermediate data, and the intermediate data and the target communication task ID are sent to the at least one second target switching node; The at least one second target switching node is used to receive the intermediate data and the target communication task ID, calculate the intermediate data corresponding to the same target communication task ID, obtain data calculation results, and send the data calculation results to the multiple first target switching nodes respectively; The multiple first target switching nodes are further used to send the data calculation results to the multiple computing nodes that execute the computing tasks respectively.

9. The communication network according to claim 8, characterized in that The multiple first target switching nodes are specifically used for: Acquire indication information, where the indication information is used to indicate that the switching node that calculates the intermediate data is the at least one second target switching node; The intermediate data and the communication task ID are sent to the at least one second target switching node.

10. The communication network according to claim 9, characterized in that The multiple first target switching nodes are specifically used for: Sending a first on-line computing request to a first candidate switching node in the switching nodes of the second level, wherein the first on-line computing request is used to request the first candidate switching node to compute the intermediate data; receiving a replacement request sent by the first candidate switching node, the replacement request being used to instruct replacement of the second-level switching node that processes the intermediate data; Sending a second on-line computing request to a second candidate switching node in the switching nodes of the second level, wherein the second on-line computing request is used to request the first candidate switching node to compute the intermediate data; Indication information sent by the second candidate switching node is received, where the indication information is used to instruct the second candidate switching node to calculate the intermediate data, and the second target switching node is the second candidate switching node.

11. The communication network according to claim 9, characterized in that The multiple first target switching nodes are used to: Receiving multiple online requests sent by multiple computing nodes, each of the multiple online requests including the target communication task ID; The indication information is generated according to the target communication task ID.

12. The communication network according to claim 8, characterized in that The number of the second target switching nodes is multiple; Each of the plurality of first target switching nodes is configured to: Dividing the generated intermediate data into a plurality of subsets, the number of the plurality of subsets being the same as the number of the second target switching nodes; The plurality of subsets and the target communication task ID are sent to a plurality of the second target switching nodes, wherein each of the first target switching nodes sends one subset of the plurality of subsets and the target communication task ID to each of the second target switching nodes.

13. The communication network according to claim 9, characterized in that The communication network further includes a central controller, wherein the central controller is configured to: Acquire load information, where the load information is used to indicate the load of multiple switching nodes at a first level and multiple switching nodes at a second level in the communication network; Sending, according to the load information, an identifier of the at least one second target switching node to the plurality of computing nodes; The multiple first target switching nodes are further used to receive the indication information sent by the multiple computing nodes.

14. The communication network according to claim 9, characterized in that The communication network further includes a central controller, wherein the central controller is configured to: Acquire load information, where the load information is used to indicate the load of multiple switching nodes at a first level and multiple switching nodes at a second level in the communication network; The indication information is sent to the multiple first target switching nodes according to the load information.

15. A switching node, characterized in that: including a processor and a memory; The memory is used to store instructions, and the processor executes the instructions stored in the memory to enable the switching node to execute the communication method executed by the second target switching node as claimed in claims 1 to 7, or to execute the communication method executed by the first target switching node as claimed in claims 1 to 7.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions which, when executed on at least one computing device, cause the at least one computing device to execute the communication method executed by the second target switching node as claimed in claims 1 to 7, or to execute the communication method executed by the first target switching node as claimed in claims 1 to 7.

Citation Information

Patent Citations

  • Data processing method, device and system

    CN113098773A

  • Distributed training task scheduling method, system and device for intelligent computing

    CN115248728A

  • Online computing resource scheduling method and system oriented to MLaaS service

    CN116320013A

  • Distributed cooperative training control method, system, device and equipment and storage medium

    CN116644803A

  • Software-Defined Tensor Streaming Multiprocessor for Large-Scale Machine Learning

    US20230161621A1

Cited By

  • Communication method, communication network, switching node, and storage medium

    EP4757295A1

  • Communication method, communication network, switching node, and storage medium

    WO2025060479A1