Communication method, communication network, switching node and storage medium
By introducing a multi-level switching node structure into the communication network and using the target communication task ID for data calculation, the problem of low utilization of switching node computing resources is solved, dynamic allocation of resources and load balancing are realized, and computing efficiency is improved.
Patent Information
- Application Number
- CN202311240886.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-09-22
AI Technical Summary
In high-performance computing and artificial intelligence technologies, the utilization rate of computing resources of switching nodes is low, especially during data transmission and computation between edge computing nodes and switching nodes, the computing resources of switching nodes are idle for a long time.
By introducing a multi-level switching node structure in the communication network, data computation is performed using the target communication task ID, avoiding static resource allocation, allowing switching nodes to immediately serve other computing tasks after completing computation, and dynamically selecting switching nodes to improve resource utilization.
This improved the utilization of computing resources in the switching nodes, reduced sensitivity to single points of failure, and achieved load balancing and improved computing efficiency.
Smart Images

Figure CN119697254B_ABST
Abstract
Description
Technical Field
[0001] This 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 Technology
[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 these applications need to process is constantly increasing. Currently, when multiple computing nodes on the edge collaboratively execute the same periodic computing task, the collective communication operations can be offloaded to switching nodes in the network, such as switches. That is, multiple computing nodes on the edge upload data to the switching node, which then performs computations on the data, such as reducing the data, and returns the results to the edge. For example, in a scenario of distributed training of an artificial intelligence (AI) model, multiple edge devices collaboratively execute iterative training of the same AI model. In each round of training, each computing node on the edge can train the AI model on its device based on an allocated set of training samples and send the parameters of the trained AI model to the switching node in the network. Then, the switching node performs reduction and computation based on the data uploaded by the multiple computing nodes on the edge and distributes the calculated model parameters to each computing node on the edge. In this way, each computing node on the edge updates the parameters in the AI model based on the received model parameters, thereby completing one round of training for the AI model.
[0003] Typically, a subnet manager in a network assigns a switching node to a periodic computational task (such as model training) and binds the computational resources on that switching node to that task. This allows the switching node to utilize those resources to perform the corresponding data computations for that task.
[0004] However, during the process of the edge computing node uploading data to the switching node and generating data to be uploaded (such as the edge device training the AI model to generate new model parameters), the computing resources on the switching node will be idle for a long time, which will result in low utilization of the computing resources on the switching node. Summary of the Invention
[0005] In view of this, embodiments of this application provide a communication method for reducing the duration of idle time of computing resources on switching nodes, thereby improving the utilization rate of computing resources on switching nodes. This application also provides a corresponding communication network, switching node, computer-readable storage medium, and computer program product.
[0006] In a first aspect, embodiments of this application provide a communication method applied in a communication network. This communication network includes multiple layers of switching nodes, such as switches or other devices with data exchange capabilities. The multiple layers include a first layer and a second layer. Different switching nodes in the first layer communicate with each other through switching nodes in the second layer. The first-layer switching nodes include multiple first target switching nodes, and the second-layer switching nodes include at least one second target switching node (the various target switching nodes described in this embodiment refer to switching nodes performing data computation in the communication network). The multiple first target switching nodes receive the same periodic computational task (such as a model training task) sent by multiple computing nodes (such as GPUs, NPUs, TPUs, or AI processing chips). The multiple computing nodes generate multiple communication tasks during the execution of the computing task, and the target communication task ID is used to indicate one of the multiple communication tasks. Furthermore, the target communication task ID sent by each computing node is the same. Then, the multiple first target exchange nodes perform calculations on 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 exchange node. The at least one second target exchange node performs calculations on 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 exchange nodes respectively. Thus, the multiple first target exchange nodes send the data calculation result to the multiple computing nodes executing the computing task respectively.
[0007] Since the first target switching node in the first level and the second target switching node in the second level perform calculations on the data to be calculated uploaded by multiple computing nodes on the end side based on the target communication task ID, rather than on the data based on the identifier of the computing task, the computing resources on the target switching nodes in each level do not need to be bound to the periodic computing tasks executed on the end side. This allows the computing resources on the target switching nodes in each level to perform calculations on the data uploaded by other computing tasks directly without waiting for the multiple computing nodes to upload the next batch of data to be calculated for the same computing task after completing the calculation based on the target communication task ID. This reduces the 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 one 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. This indication information indicates that the switching node performing the calculation on the intermediate data is at least one second target switching node. For example, this indication information may be the IP address or 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, upon obtaining the indication information, the first target switching nodes can determine which one or more second target switching nodes in the second layer to send the intermediate data to and perform the corresponding calculation, so as to achieve the final data calculation result by utilizing the switching nodes in the second layer.
[0009] In one possible implementation, when multiple first target switching nodes obtain indication information, they may specifically send a first on-network computation request to a first candidate switching node in the second-level switching nodes. For example, the first candidate switching node in the second level can be determined through hash calculation and a first on-network computation request can be sent to it. This first on-network computation request is used to request the first candidate switching node to perform computation on intermediate data. Then, the multiple first target switching nodes receive a replacement request sent by the first candidate switching node. This replacement request is used to instruct the replacement of the second-level switching node processing the intermediate data. For example, the first candidate switching node can send a first on-network computation request to multiple first-level switching nodes when the load is high. First, a target switching node sends a replacement request. Then, multiple first target switching nodes can re-request a switching node in the second tier to perform computation. Specifically, they send a second on-network computation request to a second candidate switching node in the second tier, requesting the first candidate switching node to perform computation on intermediate data. Finally, the multiple first target switching nodes receive an instruction from the second candidate switching node, instructing it to perform computation on the intermediate data. At this point, the multiple first target switching nodes can determine that the second target switching node performing the computation on the intermediate data is the second candidate switching node. In this way, multiple first target switching nodes can negotiate with the switching nodes in the second tier to determine the second target switching node capable of performing computation on the intermediate data, completing the task orchestration for data computation. This allows for dynamic selection of second-tier switching nodes in the communication network to perform computation on intermediate data, improving the flexibility of determining the second target switching node. Moreover, the above process does not require control by a single node, thus avoiding the problem of computing resources on the second target switching node being unable to be released for a long time due to a single point of failure.
[0010] In one possible implementation, when multiple first target switching nodes obtain indication information, they may specifically receive multiple network requests sent by multiple computing nodes. Each of these network requests includes the same target communication task ID. The multiple first target switching nodes can then generate the indication information based on this target communication task ID, such as by performing a hash operation on the target communication task ID and determining which switching node in the second layer should be used to perform calculations on the intermediate data based on the resulting hash value. In this way, the task orchestration for data computation can be completed by the end-side computing nodes, eliminating the need for switching nodes to perform the task orchestration process, thereby effectively reducing the latency of obtaining data computation results. Furthermore, the above process does not require control by a single node, thus avoiding the problem of computing resources on the second target switching node remaining unreleased for an extended period due to a single point of failure.
[0011] In one possible implementation, there are multiple second target switching nodes. When multiple first target switching nodes send intermediate data and target communication task IDs 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 which is the same as the number of second target switching nodes. Then, each first target switching node sends multiple subsets and target communication task IDs to 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. This not only improves the utilization rate of computing resources on multiple second target switching nodes, but also avoids the problem of computing resources on multiple second target switching nodes being unable to be released for a long time due to single-point failure, as the above process does not require the control of a single node. Simultaneously, multiple second target switching nodes perform on-network computing in parallel, which, compared to using a single switching node to perform on-network computing, not only effectively improves on-network computing efficiency but also achieves load balancing among the switching nodes.
[0012] In one possible implementation, the communication network further includes a central controller that acquires load information indicating the load of multiple switching nodes at the first and second tiers of the communication network. Based on this load information, the central controller sends an identifier of at least one second target switching node to multiple computing nodes at the end sides. These computing nodes then send the indication information to multiple first target switching nodes, enabling the first target switching nodes to determine which switching nodes(s) in the second tier to send intermediate data and the target communication task ID. In this way, the intermediate controller can orchestrate tasks for data computation, reducing the requirements on computing and switching nodes.
[0013] In one possible implementation, the communication network further includes a central controller that acquires load information indicating the load of multiple switching nodes at the first and second tiers of the communication network. Based on this load information, the central controller sends the indication information to multiple first target switching nodes, enabling these nodes to determine which switching nodes(s) in the second tier to send intermediate data to. In this way, the intermediate controller can orchestrate tasks for data computation, reducing the requirements on computational and switching nodes.
[0014] Secondly, this application provides a communication network comprising multiple layers of switching nodes, including a first layer and a second layer. Different switching nodes in the first layer communicate with each other through switching nodes in the second layer. The switching nodes in the first layer include multiple first target switching nodes, and the switching nodes in the second layer include at least one second target switching node. The multiple first target switching nodes are used to receive data to be computed for the same periodic computing task and a target communication task identifier ID corresponding to the data to be computed, sent by multiple computing nodes. During the execution of the computing task, multiple communication tasks are generated by the multiple computing nodes. The target communication task ID is used to indicate one of the multiple communication tasks. Each computing node in the multiple computing nodes sends the same target communication task ID. The computing nodes perform calculations on the data to be computed to obtain intermediate data and send the intermediate data and the target communication task ID to 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, perform calculations on the intermediate data corresponding to the same target communication task ID to obtain a data calculation result, and send the data calculation result to the multiple first target switching nodes respectively. The multiple first target switching nodes are also used to send the data calculation result to the multiple computing nodes executing the computing task respectively.
[0015] In one possible implementation, multiple first target switching nodes are specifically used to: acquire indication information, which indicates that the switching node performing the calculation on the intermediate data is at least one second target switching node; and send the intermediate data and a communication task ID to at least one second target switching node.
[0016] In one possible implementation, a plurality of first target switching nodes are specifically configured to: send a first on-network computation request to a first candidate switching node among the second-level switching nodes, the first on-network computation request being used to request the first candidate switching node to perform computation on intermediate data; receive a replacement request sent by the first candidate switching node, the replacement request being used to instruct the second-level switching node processing the intermediate data to be replaced; send a second on-network computation request to a second candidate switching node among the second-level switching nodes, the second on-network computation request being used to request the first candidate switching node to perform computation on the intermediate data; and receive indication information sent by the second candidate switching node, the indication information being used to instruct the second candidate switching node to perform computation on the intermediate data, wherein the second target switching node is the second candidate switching node.
[0017] In one possible implementation, a plurality of first target switching nodes are configured to: receive a plurality of network requests sent by a plurality of computing nodes, each of the plurality of network requests including a target communication task ID; and generate indication information based on the target communication task ID.
[0018] In one 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, the number of multiple subsets being the same as the number of second target switching nodes; and 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 one possible implementation, the communication network further includes a central controller, which is configured to: acquire load information, the load information being 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; and, based on the load information, send an identifier of at least one second target switching node to multiple computing nodes; the multiple first target switching nodes are further configured to receive indication information sent by the multiple computing nodes.
[0020] In one possible implementation, the communication network further includes a central controller, which is configured to: acquire load information, the load information being 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; and send indication information to multiple first target switching nodes based on the load information.
[0021] Thirdly, this application provides a switching node, including a processor and a memory; the memory is used to store instructions, and the processor executes the instructions stored in the memory to cause the switching node to perform the communication method performed by the second target switching node in the first aspect or any possible implementation of the first aspect, or to perform the communication method performed by the first target switching node in the first aspect or any possible implementation of the first aspect.
[0022] Fourthly, this application provides a computer-readable storage medium storing instructions that, when executed on a switching node, cause the switching node to execute the communication method executed by the second target switching node in the 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 first aspect or any possible implementation of the first aspect.
[0023] Fifthly, this application provides a computer program product containing instructions that, when run on at least one computing device, causes a switching node to execute the communication method executed by the second target switching node in the 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 first aspect or any possible implementation of the first aspect.
[0024] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description
[0025] Figure 1 A schematic diagram of the structure of an exemplary communication network 10 provided in this 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 flowchart illustrating a communication method provided in this application;
[0028] Figure 4 A flowchart illustrating another communication method provided in this application;
[0029] Figure 5 A diagram illustrating how first-level exchange nodes select second-level exchange nodes through rehashing;
[0030] Figure 6 A flowchart illustrating another communication method provided in this application;
[0031] Figure 7 A flowchart illustrating another communication method provided in this application;
[0032] Figure 8 This is a diagram illustrating how different subsets of the data to be computed are sent to different exchange nodes in the second level.
[0033] Figure 9 A flowchart illustrating another communication method provided in this application;
[0034] Figure 10 A flowchart illustrating another communication method provided in this application. Detailed Implementation
[0035] The solutions in the embodiments provided in this application will now be described with reference to the accompanying drawings.
[0036] See Figure 1 The diagram illustrates a structural schematic of a communication network provided in an embodiment of this 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 1This example uses a two-tiered switching node architecture. The first tier consists of 8 switching nodes, and the second tier consists of 4 switching nodes. Each switching node in the first tier can connect to one or more compute nodes on the endpoint and also connect to one or more switching nodes in the second tier. To facilitate illustrating the connection relationships between compute nodes and switching nodes at different tiers, Figure 1 The diagram only shows the connections between some devices; the connections between the remaining devices can be found in the reference diagram. Figure 1 Please refer to the following description for further understanding.
[0037] The first-level switching node is used to forward data between the end-side computing node and the second-level switching node, including forwarding data sent by the computing node to the second-level switching node, and forwarding data sent by the second-level switching node to the end-side computing node; furthermore, the first-level switching node can also perform data reduction calculations for multiple end-side computing nodes, and forward the data obtained from the reduction calculations to the second-level switching node.
[0038] The second-level switching nodes are used to forward data between different switching nodes in 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 performing 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, the switching node in communication network 10 may have Figure 2 The architecture shown includes software stack 300 and chip 400.
[0040] The software stack 300 is a collection of independent components that work together to ensure the normal operation of the switching node. It can be used to cache data in the switching node, create storage permissions, create queue numbers, etc. Furthermore, the software stack 300 can include a driver 301, which uses the driver 301 to call the chip 400 so that the switching node can perform corresponding functions (such as data forwarding).
[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 perform corresponding data calculation processes, such as reduction 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 interfaces on the switching node used for data forwarding, 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 based on the information recorded in the routing table.
[0042] Figure 1 In the communication network 10 shown, the switching nodes at each level can all adopt... Figure 2 The architecture shown. Alternatively, the second-level switching nodes can adopt... Figure 2 The architecture shown may not include the computing engine 401 in the first-level switching nodes. In practical applications, the switching nodes in the communication network 10 can be any device with data forwarding capabilities, such as switches, switching chips, routers, etc., and their architecture is not limited to... Figure 2 Example shown.
[0043] Computing nodes 1 through 16 can all be devices including processors, such as terminals or servers. Furthermore, multiple computing nodes can engage in collective communication to collaboratively execute the same periodic computing task, such as a distributed model training task. For example, a computing node can have… Figure 2 The architecture shown includes software stack 500 and processor 600.
[0044] The software stack 500 is a collection of independent components that work together to ensure the normal operation of computing nodes. These components can perform corresponding business functions, such as model training. 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 provides one or more services, such as allowing users to configure services on computing nodes. The framework layer 502, for example, can be a deep learning framework like MindSpore or TensorFlow, and is used to generate communication operators and computation operators required by the computing nodes based on the services in the application layer and the topology information of the communication network 10. The communication layer 503 receives communication operators from the framework layer 502 and converts them into communication tasks required by the processor 600. This communication layer 503 may include a collective communication library, such as the Huawei Collective Communication Library (HCCL). The driver 504 drives the processor 600 to perform corresponding computation or communication operations based on the computation or communication operators issued by the framework layer.
[0045] Processor 600 is used to perform corresponding computational operations for the services in application layer 501; and processor 600 may also include scheduler 601 and communication controller 602, so that communication controller 602 can communicate with the first-level switching node under the scheduling of scheduler 601. Exemplarily, processor 600 may be any one of the following processors or any combination thereof: central processing unit (CPU), neural network processing unit (NPU), application-specific integrated circuit (ASIC), programmable logic device (PLD), complex programmable logical device (CPLD), field-programmable gate array (FPGA), generic array logic (GAL), system on chip (SoC), software-defined infrastructure (SDI) chip, AI processing chip, data processing unit (DPU).
[0046] It is worth noting that, Figure 2The architecture of the switching node and computing node shown is only an example. In actual applications, the switching node and computing node can also adopt other architectures, such as including other devices, etc., and there is no limitation on this.
[0047] Figure 1 The communication network 10 shown may include, in addition to multiple levels of switching nodes, other devices / equipment. For example, the communication network 10 may also include a network manager ( Figure 1 (Not shown in the diagram) The network manager can generate topology information to indicate the topology of the communication network 10. Furthermore, the network manager can perform corresponding initialization configurations for the switching nodes at each level of the communication network 10, such as configuring the hash function used by the first-level switching nodes to select the next-hop route. For example, the network manager could be a subnet manager. Alternatively, the communication network 10 may also include a central controller, which can be used to assign at least one second-level switching node in the communication network 10 to multiple computing nodes to perform protocol computation. The network manager and central controller can be deployed on a separate server, or on one or more computing nodes on the edge side. This embodiment does not limit the deployment method of the network manager and central controller.
[0048] exist Figure 1 In the communication network 10 shown, each computing node can connect to one or more switching nodes (e.g., multi-homed access). Furthermore, each computing node can have one or more communication links with the first-level switching nodes; for example, the number of communication links between computing node 1 and switching node 101 is two. Similarly, the number of communication links between the second-level switching nodes and the first-level switching nodes can also be one or more; for example, the number of communication links between switching node 101 and switching node 201 is four.
[0049] The multiple computing nodes connected to the first-level switching node can collaboratively execute the same periodic computing task. That is, these computing nodes can periodically execute a portion of the computing task and upload the data generated during that portion to the communication network. For example, when the periodic computing task is a distributed model training task, the data uploaded by the computing node can specifically be the parameters from the AI model currently trained by that computing node.
[0050] Assume that compute nodes 1 through 4 and compute nodes 9 through 12 collaboratively execute the same periodic computation task, and the second-level exchange node 201 performs computations on the data uploaded by these compute nodes. If the computational resources on the second-level exchange node 201 are allocated to this computation task, these resources will be bound to the task. During the execution of the computation task and the uploading of data by the compute nodes, the exchange node 201 will be in a state of waiting to receive the data corresponding to the computation task for an extended period. This results in the computational resources on the second-level exchange node 201 remaining idle for a long time, leading to low utilization of these resources.
[0051] Based on this, Figure 1In the communication network shown, the computing resources on the second-level switching node 201 are not fixedly allocated to specific computing tasks, thus avoiding the problem of low resource utilization caused by static allocation of computing resources. Specifically, during the collaborative execution of the same periodic computing task by computing nodes 1 to 4 and computing nodes 9 to 12, multiple communication tasks are generated. For each of these multiple communication tasks, each computing node sends the data to be computed to the switching node in the communication network to request on-network computation. For example, for the distributed model training task (i.e., the aforementioned computing task), during each iteration of model training, multiple computing nodes generate the same communication task and send the trained model parameters to the switching node in the communication network for global reduction (allreduce) computation based on this communication task. Taking the example of multiple computing nodes uploading data corresponding to one communication task (hereinafter referred to as the target communication task), computing nodes 1 to 4 can send the data to be calculated and the target communication task identifier (ID) corresponding to the data to be calculated to the first-level switching node 101, and 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. Furthermore, the data to be calculated sent by different computing nodes for the same communication task corresponds to the same communication task ID. Switching nodes 101 and 105 can respectively perform calculations on the received data to be calculated to obtain intermediate data, and forward the intermediate data and the target communication task ID to the second-level switching node 201. At this time, switching node 201 will perform calculations on 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 first-level switching nodes 101 and 105 respectively. Accordingly, exchange node 101 sends the data calculation results to computing nodes 1 to 4 that are performing the calculation task; exchange node 105 sends the data calculation results to computing nodes 9 to 12 that are performing the calculation task. In this way, computing nodes 1 to 4 and computing nodes 9 to 12 can continue to perform the periodic calculation 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 perform calculations on the data to be calculated uploaded by multiple computing nodes on the end side based on the target communication task ID, the computing resources on switching nodes 101, 105, and 201 do not need to be bound to the periodic computing tasks executed on the end side. This allows the computing resources on the switching nodes in each level to perform calculations on the data uploaded by other computing tasks directly without waiting for the multiple computing nodes to upload the next batch of data to be calculated for the same computing task after completing the calculation based on the target communication task ID. This reduces the 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 in turn reduces the concurrency requirements of the switching nodes.
[0053] That is, after switching node 201 calculates and outputs data calculation result 1 for data 1 with target communication task ID 1, while computing nodes 1 to 4 and 9 to 12 continue to execute periodic calculation tasks 1 based on data calculation result 1, switching node 201 can also calculate and output data calculation result 2 for data 2 with target communication task ID 2. This data calculation result 2 can be transmitted to computing nodes 5 to 6 and 13 to 16, so that these computing nodes can continue to execute periodic calculation tasks 2 based on data calculation result 2. In this way, the same computing resources on switching node 201 can perform parallel calculations for multiple computing tasks within a certain period of time, thereby improving the utilization rate of computing resources on switching node 201.
[0054] It is worth noting that, Figure 1 The network shown is merely an illustrative example and is not intended to limit the structure of the communication network. For example, in other possible implementations, the communication network may include more levels of switching nodes, such as third-level, fourth-level, etc., and the number of switching nodes at each level can be arbitrary; furthermore, the number and connection methods of communication links between computing nodes and switching nodes, as well as the number and connection methods of communication links between switching nodes at different levels, are not limited to... Figure 1 The example shown is illustrated. For instance, in other possible implementations, communication links may exist between different switching nodes at the same level, allowing them to communicate with each other, such as for traffic routing. Furthermore, in other possible implementations, the communication network may also include other devices, such as devices for resource management (e.g., managing communication bandwidth between different switching nodes) and devices for monitoring abnormal states.
[0055] Next, various non-limiting specific implementation methods during the communication process will be described in detail.
[0056] See Figure 3 This is a flowchart illustrating a communication method according to an embodiment of this application. This method can be applied to the above... Figure 1 The communication network 10 shown can also be applied to other possible communication networks. For ease of understanding, the following description uses an application... Figure 1 The following explanation uses the communication network 10 shown as an example. Figure 3 The communication method shown may specifically include:
[0057] S301: Multiple computing nodes send the data to be computed for the same periodic computing task and the target communication task ID corresponding to the data to be computed to multiple first target exchange nodes at the first level. During the execution of the computing task by the multiple computing nodes, multiple communication tasks are generated. The target communication task ID is used to indicate one of the communication tasks. The target communication task ID sent by each computing node is the same.
[0058] In this embodiment, multiple computing nodes can collaboratively execute the same periodic computing task, such as a distributed model training task. These multiple computing nodes can periodically execute certain stages of the computing task, and each time they execute a stage, the computing nodes generate corresponding data, hereinafter referred to as the data to be computed. Each computing node can then generate a corresponding communication task and upload the generated data to be computed to the communication network 10 based on this communication task, requesting the communication network 10 to perform on-network computing. Specifically, this can involve requesting the switching nodes in the communication network 10 to reduce the data to be computed uploaded by the multiple computing nodes, such as reducing the data to be computed based on the allreduce computing method. This reduces the transmission resources required to reduce the data to be computed on multiple computing nodes (compared to the transmission resources required for reducing the data to be computed on the edge computing nodes).
[0059] Since multiple computing nodes periodically generate multiple sets of data to be computed during the execution of periodic computing tasks, and generate corresponding communication tasks for each set of data to be computed, this embodiment uses the example of each computing node uploading data to be computed for a single communication task (hereinafter referred to as the target communication task) for ease of understanding and explanation. Each computing node can generate a target communication task ID for the data to be computed. This target communication task ID is used to instruct the computing node to send the communication task of the data to be computed to the exchange node in the communication network 10 for performing protocol computation. Furthermore, multiple computing nodes executing the same computing task generate the same target communication task ID for the data to be computed, so that the exchange node can determine the data to be computed corresponding to the same target communication task ID participating in the protocol. For example, 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, multiple computing nodes that upload data to be computed can be, for example, computing nodes 1 to 4, or computing nodes 9 to 12. Correspondingly, multiple first-target switching nodes at the first level can specifically be switching node 101 and switching node 105.
[0061] S302: Multiple first target exchange nodes in the first level perform calculations on the received data to be calculated to obtain intermediate data.
[0062] S303: Multiple first target exchange nodes send the intermediate data and the target communication task ID to at least one second target exchange node in the second layer.
[0063] In this embodiment, multiple layers of switching nodes in the communication network can reduce the data to be computed generated by multiple computing nodes. Specifically, multiple first-target switching nodes in the first layer can perform preliminary reduction calculations on the received data to be computed 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, suppose in... Figure 1 In the communication network 10 shown, the switching nodes 101 and 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 nodes 101 and 105 in the first layer can first perform preliminary reduction calculations on the received data to be calculated, and then send the calculated reduction data to the switching node 201 for final reduction calculation.
[0064] In practical implementation, multiple first-target exchange nodes can first determine the second-target exchange node among the multiple exchange nodes included in the second level, which is used to reduce the intermediate data. For example, multiple first-target exchange nodes can obtain indication information used to indicate the second-target exchange node. For ease of understanding, this embodiment provides the following five implementation examples for determining the second-target exchange node.
[0065] Example 1: Each first target exchange node can select one exchange node from multiple exchange nodes included in the second level, such as selecting one exchange node in the second level through a hash function. This first target exchange node is referred to as the first candidate exchange node. Then, the first target exchange node can send a first on-network computation request to the first candidate exchange node to request the first candidate exchange node to reduce the intermediate data. Upon receiving an instruction from the first candidate exchange node, the first target exchange node determines that the first candidate exchange node is the aforementioned second target exchange node. When receiving a change request from the first candidate exchange node, the first target exchange node can reselect one exchange node from the multiple exchange nodes included in the second level, such as changing the hash function to reselect one exchange node in the second level. This second candidate exchange node is referred to as the second candidate exchange node. Next, the first target exchange node can send a second on-network computation request to the second candidate exchange node to request the second candidate exchange node to reduce the intermediate data. Upon receiving an instruction from the second candidate exchange node, the first target exchange node determines that the second candidate exchange node is the aforementioned second target exchange node. When the first target switching node receives a replacement request from the second candidate switching node, it can refer to the above process to request other switching nodes in the second layer to reduce the intermediate data until the second target switching node is determined. In practical applications, when all switching nodes in the second layer cannot reduce the intermediate data, the first target switching node can instruct the end-side to select a computing node to perform the reduction operation on the data to be computed generated by multiple computing nodes, or it can report the failure of the on-network computing request to the computing node on the end-side.
[0066] Example 2: The second target switching node performing the reduction operation can be pre-arranged by the end-side computing nodes. This allows multiple end-side computing nodes to send multiple network access requests to multiple first-level target switching nodes. Each computing node can send one network access request to one of its connected first-level target switching nodes. The network access request received by the first-level target switching node can carry indication information for the second target switching node to perform the reduction operation on the intermediate data. Thus, each first-level target switching node can parse the received network access request, obtain the indication information, and determine the second target switching node to perform the reduction operation on the intermediate data based on this indication information.
[0067] For example, the second target switching node in the communication network 10 for computing intermediate data can be pre-arranged by the framework layer 502 or the communication layer 503 in the computing node.
[0068] Example 3: The first target switching node can identify all switching nodes in the second layer that have communication connections with the first target switching node as the second target switching node. In this case, there can be multiple second target switching nodes, that is, multiple switching nodes in the second layer can work together to complete the reduction processing of 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 diagram), the central controller can pre-program multiple computing nodes to use second target switching nodes to perform reduction operations on intermediate data, and notify the multiple computing nodes on the edge side. Then, the multiple computing nodes on the edge side can send multiple network access requests to multiple first target switching nodes at the first level. These network access requests can carry indication information for the second target switching node to perform the reduction operation on the intermediate data. In this way, each first target switching node can parse the received network access request to obtain the indication information, and thereby determine the second target switching node to perform the reduction operation on the intermediate data based on the indication information.
[0070] Example 5, Figure 1 The communication network 10 shown may also include a central controller ( Figure 1 (Not shown in the image), the central controller can identify a second target exchange node for performing reduction operations on intermediate data and notify each first target exchange node in the first level, so that each first target exchange node can know the second target exchange node performing the reduction operation.
[0071] Of course, the above-mentioned various implementations for determining the second target exchange node are only illustrative examples. In actual applications, the first target exchange node can also use other methods to determine at least one second target exchange node in the second level, and this is not limited.
[0072] After identifying the second target switching node, multiple first target switching nodes can forward intermediate data calculated based on the data to be calculated to the second target switching node. Furthermore, the first target switching nodes will also send the target communication task ID corresponding to the data to be calculated to the second target switching node. Alternatively, the first target switching node can send the intermediate data and the target communication task ID together to the second target switching node; or, the first target switching node can first send a request including the target communication task ID to the second target switching node, and after the second target switching node receives the request (indicating that the second target switching node is the device performing the calculation on the intermediate data), the first target switching node will then send the intermediate data to the second target switching node.
[0073] S304: At least one second target exchange node in the second layer performs calculations on the received intermediate data corresponding to the same target communication task ID to obtain the data calculation result.
[0074] In this embodiment, the second target switching node performs calculations on intermediate data at the communication task granularity. Specifically, the second target switching node can first determine multiple sets of intermediate data corresponding to the same target communication task ID. Each set of intermediate data originates from a first-level switching node, and the second target switching node can then perform calculations on these multiple sets of intermediate data, such as reducing the intermediate data, to generate corresponding data calculation results.
[0075] For example, suppose 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 value of the received 1, 5, -2, 3 as 7 / 4 (i.e., intermediate data), and the switching node 105 can calculate the average value of the received 8, -7, 5, 3 as 9 / 4 (i.e., intermediate data). The switching node 201 in the second level can calculate the average value of the received intermediate data 7 / 4 and 9 / 4. The calculated average value (i.e., the data calculation result) is 2.
[0076] When there are multiple second-target exchange nodes, these nodes can collaborate to complete the calculation process for the intermediate data. For example, when each first-target exchange node sends intermediate data to multiple second-target exchange nodes, it can pre-divide each piece of intermediate data into multiple subsets according to the number of second-target exchange nodes. Each first-target exchange node can then send one subset of each piece of intermediate data to one second-target exchange node, resulting in multiple subsets received by the multiple second-target exchange nodes constituting a complete set of intermediate data. Correspondingly, each second-target exchange node can perform calculations based on the multiple subsets corresponding to the multiple pieces of intermediate data and generate corresponding data calculation results. The complete data calculation result obtained by summarizing the data calculation results generated by the multiple second-target exchange nodes is then obtained.
[0077] For example, suppose the intermediate data generated by multiple first-target exchange nodes are, in order: {1, -3}, {5, -2}, {-2, -7}, {3, 4}, {8, 4}, {-7, -8}, {5, 3}, {3, 1}, and suppose there are two second-target exchange nodes, exchange node 201 and exchange node 202. Then, the multiple first-target exchange nodes can send a subset A of the intermediate data: 1, 5, -2, 3, 8, -7, 5, 3 to exchange node 201, and send a subset B of the data to be calculated: -3, -2, -7, 4, 4, -8, 3, 1 to exchange node 202. Exchange node 201 can calculate the average value of subset A of the intermediate data (i.e., the result of the data generated by exchange node 201) as 2, and exchange node 202 can calculate the average value of subset B of the intermediate data (i.e., the result of the data generated by exchange node 202) as -1. Thus, after summarizing the data calculation results generated by exchange node 201 and exchange node 202, the resulting data calculation result is {2, -1}.
[0078] S305: At least one second target exchange node sends the data calculation results to multiple first target exchange nodes respectively.
[0079] S306: Multiple first target exchange nodes send the data calculation results to multiple computing nodes that are performing the periodic computing task.
[0080] In this embodiment, after generating the data calculation result, the second target exchange node can send the data calculation result to each of the first target exchange nodes. In this way, each first target exchange node can forward the data calculation result to one or more connected computing nodes (participating in the execution of the periodic computing task) to meet the data calculation result requirements of each computing node during the execution of the computing task.
[0081] In practical applications, after receiving the data calculation result, the computing node has completed the task content for the current cycle. Therefore, the computing node can continue to execute the task content for the next cycle based on the data calculation result, and will generate new data to be calculated in the next cycle. During 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 perform calculations on data corresponding to the same target communication task ID uploaded by other computing nodes (such as computing nodes 5 to 8, etc.) and return the corresponding data calculation results to other computing nodes. Among them, the switching nodes in each level can use the same computing resources when performing calculations on data corresponding to different target communication task IDs. In this way, the time when the computing resources on the second target switching node are idle can be effectively reduced, thereby improving the utilization rate of the computing resources on the second target switching node. Within a certain period of time, the second target switching node can support the execution of on-network calculation processes for multiple parallel computing tasks, thereby indirectly reducing the concurrency requirements of the second target switching node.
[0082] The above Figure 3 The illustrated embodiment primarily describes the process by which switching nodes at each level perform calculations on data uploaded by multiple computing nodes at the granularity of communication tasks. For ease of understanding, the on-network computation process performed by the second target switching node is illustrated below using five specific scenarios.
[0083] See Figure 4 This illustrates a flowchart of another communication method. Figure 4 In the communication method shown, a second-level switching node for performing on-network computation can be selected from the communication network 10 using a rehashing method. Furthermore, in this embodiment, computing nodes 1 to 4 and computing nodes 9 to 12 are configured to collaboratively execute the same periodic computation task.
[0084] like Figure 4 As shown, the method may specifically include:
[0085] S401: Before uploading the data to be computed, compute nodes 1 to 4 and compute nodes 9 to 12 generate on-network computing requests respectively. The on-network computing request generated by each compute node includes the target communication task ID, and the on-network computing requests generated by different compute nodes include the same target communication task ID.
[0086] In this embodiment, computing nodes 1 to 4 and 9 to 12 will generate multiple communication tasks during the collaborative execution of the same periodic computing task. For each of these multiple communication tasks, each computing node will send the data to be computed to a switching node in the communication network to request the switching node to perform on-network computing. Taking the upload of data corresponding to one of the communication tasks (hereinafter referred to as the target communication task) by multiple computing nodes as an example, each computing node can first generate a target communication task ID. This target communication task ID is used to indicate the communication task that sends data to some switching nodes in the second level. The target communication task IDs generated by different computing nodes are the same, and are used to instruct the communication network 10 to compute the data to be computed uploaded by multiple computing nodes for the same communication task.
[0087] The multiple computing nodes used to perform the same computing task can be pre-specified by the user, or they can be determined by the network manager in the communication network 10. Figure 1 (Not shown) Scheduling multiple computing nodes to execute the computing task, etc., this embodiment does not limit this.
[0088] S402: Computing nodes 1 to 4 send the generated on-network computing requests to the first-level switching node 101 respectively; computing nodes 9 to 12 send the generated on-network computing requests to the first-level switching node 105 respectively.
[0089] Each computing node can send the generated on-network computing request to the first-level switching node it has connected to, such as... Figure 5 As shown.
[0090] S403: After receiving the online computing request, the switching node 101 performs a hash operation based on the target communication task ID in the online 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 online computing request, the switching node 105 performs a hash operation based on the target communication task ID in the online 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] In this configuration, exchange nodes 101 and 105 can be configured with the same multiple hash functions. These hash functions can be configured by the network manager during the initialization of each exchange node in the first layer of the communication network. Furthermore, the network manager can configure each exchange node in the first layer to select a hash function based on the same strategy to perform hash operations on the target communication task ID. Thus, for the same target communication task ID, different exchange nodes can use the same hash function to perform hash operations on the target communication task ID and obtain the same hash value.
[0093] After obtaining the hash value, the exchange node 101 can determine the exchange node to be used for calculating the intermediate data from multiple exchange nodes in the second level connected to the exchange node 101 based on the hash value (or it can be called hash selection of a second-level path).
[0094] Specifically, the second-level exchange nodes connected to exchange node 101 include exchange node 201 and exchange node 202. Exchange node 101 can perform a modulo operation on the number of second-level exchange nodes connected to it based on the hash value; that is, exchange node 101 takes the hash value modulo 2. When the remainder is 1, exchange node 101 determines that the exchange node corresponding to the hash value is exchange node 201; and when the remainder is 0, exchange node 101 determines that the exchange node corresponding to the hash value is exchange node 202. In this embodiment, the example of exchange node 201 corresponding to the hash value is used for explanation.
[0095] Following a similar approach, exchange node 105 can use the same hash value to identify the same exchange node, namely exchange node 201.
[0096] In practical applications, after the exchange nodes 101 and 105 perform hash calculation on the target communication task ID using the hash function, they can save the identifier of the hash function and the target communication task ID in a corresponding manner, such as in the form shown in Table 1 below, locally on the exchange node.
[0097] Table 1
[0098] Target Communication Task ID Hash function identifier Logo 1 Function 1 …… ……
[0099] S405: Switching node 101 and switching node 105 respectively send an on-network computing request to switching node 201 to request switching node 201 to perform calculations on intermediate data. The on-network computing request includes the target communication task ID.
[0100] like Figure 5As shown, each exchange node can send an on-network computing request to the exchange node 201 determined by hash operation.
[0101] S406: Based on the current load, switching node 201 sends a replacement request to switching node 101 and switching node 105 respectively. The replacement request is used to instruct switching node 101 and switching node 105 to replace the second-level switching node that processes the intermediate data.
[0102] As an implementation example, switch node 201 can read the number of requests currently being responded to from its internal registers, and based on this number, predict whether the total number of requests responded to simultaneously after continuing to respond to the on-network computing requests sent by switch nodes 101 / 105 exceeds the line-rate concurrency range of switch node 201. Here, line rate refers to the amount of data that a switch node's port can transmit per unit of time; typically, when responding to a request, switch node 201 can utilize some resources (such as some ports) to receive the data stream corresponding to that request, occupying a line-rate share. Line-rate concurrency refers to the number of data streams that a switch node can concurrently transmit per unit of time.
[0103] If switch node 201 predicts that the total number of requests it will respond to exceeds its supported line-rate concurrency range, it indicates that responding to the on-network computation request would cause switch node 201 to be overloaded, exceeding its capacity. In this case, switch node 201 can send replacement requests to switch nodes 101 and 105 respectively, instructing them to reselect and request other switches in the second layer to perform computations on the intermediate data.
[0104] If the total number of requests predicted by the switching node 201 does not exceed its supported line-rate concurrency range, then the switching node 201 can respond to the on-network computing requests sent by the switching nodes 101 and 105, and begin processing the intermediate data subsequently sent by the switching nodes 101 and 105.
[0105] In this embodiment, the example is taken where switching node 201 refuses to respond to the on-network computing request and sends a replacement request to switching node 101 and switching node 105.
[0106] At this time, the switching node 201 can locally record the target communication task ID parsed from the on-network computing request, the number of switching nodes in the first level participating in the request (the on-network computing requests sent include the same target communication task ID), and use a bitmap to record the first-level switching nodes currently sending requests to the switching node 201. For example, 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 using Table 2 below.
[0107] Table 2
[0108] Target Communication Task ID Number of exchange nodes participating in the request Bitmap Logo 1 Quantity X Bitmap data …… …… ……
[0109] Thus, when the number of on-network computing requests received by switch node 201 reaches the number of participating switch nodes as determined by the bitmap, the network address of the corresponding port peer can be looked up from the routing table using the bitmap. This means finding the network addresses of switch nodes 101 and 105 that sent the on-network computing requests to switch node 201. Switch node 201 can then send replacement requests to switch nodes 101 and 105 respectively based on the retrieved network addresses. Figure 5 As shown. For example, a network address can be, for instance, an Internet Protocol (IP) address, etc.
[0110] S407: After receiving the replacement request, the exchange node 101 selects a new hash function to perform a hash operation on the target communication task ID, obtains a new hash value, and determines the exchange node 202 corresponding to the new hash value from the second-level exchange nodes connected to the exchange node 101.
[0111] S408: After receiving the replacement request, the exchange node 105 selects a new hash function to perform a hash operation on the target communication task ID, obtains a new hash value, and determines the exchange node 202 corresponding to the new hash value from the second-level exchange nodes connected to the exchange node 105.
[0112] Since the same hash function is configured in exchange node 101 and exchange node 105, and the hash function is selected based on the same strategy, after exchange node 101 and exchange node 105 re-hash the target communication task ID, the exchange node selected based on the new hash value is exchange node 202.
[0113] In practice, exchange nodes 101 and 105 can reselect a hash function based on the locally stored correspondence between the hash function identifier and the target communication task ID. The selected hash function is different from the hash function indicated in Table 1. Then, exchange nodes 101 and 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 modulo operation based on the new hash value to determine exchange node 202.
[0114] Furthermore, exchange nodes 101 and 105 can also save the identifier of the hash function currently used for hash calculation and the target communication task ID, such as by recording the target communication task ID and the hash function identifier in Table 1. Thus, if a replacement request is subsequently received from exchange node 202, exchange nodes 101 and 105 can select a new hash function to perform a new hash calculation based on the hash function identifier recorded for the target communication task ID.
[0115] S409: Switching nodes 101 and 105 respectively send an on-network computation request to switching node 202 to request switching node 202 to perform computation on intermediate data. The on-network computation request includes the target communication task ID.
[0116] like Figure 5 As shown, each exchange node can send an on-network computing request to the exchange node 202, which has been re-determined through a hash operation.
[0117] S410: Based on the current load, switching node 202 sends indication information to switching node 101 and switching node 105 respectively. The indication information is used to instruct switching node 202 to perform calculations on intermediate data, that is, to instruct switching node 202 to respond to the on-network calculation requests sent by switching node 101 and switching node 105.
[0118] For example, the instruction information may be a notification message sent by the exchange node 202, or it may be other types of information, without limitation.
[0119] S411: After receiving the instruction information, exchange nodes 101 and 105 actively pull the data to be calculated from computing nodes 1 to 4 and computing nodes 9 to 12.
[0120] S412: Exchange node 101 and exchange node 105 perform calculations on the pulled data to be calculated, obtain intermediate data, and send the intermediate data to exchange node 202.
[0121] At this time, the intermediate data received by the switching node 202 from the switching nodes 101 and 105 are all intermediate data under the same communication task, that is, they correspond to the same target communication task ID.
[0122] S413: Exchange node 202 performs calculations on the received intermediate data to obtain the corresponding data calculation results, and sends the data calculation results to exchange node 101 and exchange node 105 respectively.
[0123] For example, the exchange node 202 can perform a reduction operation on the intermediate data to generate the corresponding result.
[0124] S414: 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.
[0125] In practical applications, computing nodes 1 through 4 and computing nodes 9 through 12 can continue to execute periodic computing tasks based on the received data calculation results. Furthermore, when generating new data to be calculated for this computing task, these computing nodes can, based on the aforementioned... Figure 4 The process shown involves requesting the switching nodes in communication network 10 to perform on-network computation again. When multiple computing nodes request the switching nodes in communication network 10 to perform on-network computation on the new data to be computed, the switching node performing the on-network computation in the second level may still be the aforementioned switching node 202, or it may be switching node 201. Specifically, it can be determined by switching nodes 101 and 105 again with reference to the above process.
[0126] This not only effectively reduces the time that computing resources on the switching nodes in the communication network 10 are idle, thereby improving the utilization rate of computing resources on the switching nodes, but also avoids the problem of computing resources on the switching nodes not being released for a long time due to single point of failure, as the above process does not need to be controlled by a single node. Furthermore, selecting the switching node to perform on-network computing through hashing helps to achieve load balancing among multiple second-level switching nodes in the communication network 10.
[0127] It is worth noting that, Figure 4 The execution order of the steps shown is for illustrative purposes only and is not intended to limit the scope of the invention. For example, in other possible embodiments, steps S403 and S404 may be executed in parallel, or step S404 may be executed before step S403.
[0128] The above Figure 4The illustrated embodiment primarily describes how switching nodes 101 and 105 determine the switching node 202 for performing on-network computation from the second-level switching nodes using a hash operation. In other embodiments, the switching nodes for performing on-network computation may be pre-arranged by the end-side computing nodes. The following, in conjunction with... Figure 6 This will be illustrated by example.
[0129] See Figure 6 This illustrates a flowchart of another communication method. Figure 6 In the communication method shown, computing nodes 1 to 4 and computing nodes 9 to 12 are configured to collaboratively execute the same periodic computing task.
[0130] like Figure 6 As shown, the method may specifically include:
[0131] S601: Before uploading the data to be computed, compute nodes 1 to 4 and compute nodes 9 to 12 generate a target communication task ID, wherein the switching node used to perform 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 be pre-arranged according to a unified strategy to serve as switching nodes in the communication network 10 for performing on-network computing.
[0133] As an implementation example, the communication network 10 may include a network manager. During the initialization phase of the communication network 10, the network manager can obtain the topology of the communication network 10, as well as the line-rate aggregation performance of each switching node in the second layer, such as the number of concurrent data streams that each switching node can support per unit time. It can also configure the same multiple hash functions and a selection strategy for the hash functions for each switching node in the first layer. Then, the network manager can provide the line-rate aggregation performance of each switching node in the second layer, the hash functions configured for 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 endpoint can filter the switching nodes in the second layer according to the topology of the communication network 10 and the line-rate aggregation performance requirements of the switching nodes for executing computing tasks, so as to obtain switching nodes that meet the line-rate aggregation performance requirements. Then, the computing node can create a target communication task ID, and can use the hash function and selection strategy configured for each switching node to select the appropriate hash function to perform a hash operation on the target communication task ID, obtain a hash value, and then determine the switching node to perform on-network computing from the filtering switching nodes included in the second layer based on the hash value. For ease of understanding, this embodiment uses switching node 201 performing on-network computing as an example for explanation.
[0135] Furthermore, during the collaborative execution of the same periodic computing task by computing nodes 1 to 4 and computing nodes 9 to 12, each computing node generates multiple communication tasks. For each of these multiple communication tasks, each computing node sends data to be computed to an exchange node in the communication network to request the exchange node to perform on-network computing. This embodiment illustrates this by example of multiple computing nodes uploading corresponding data to be computed for a target communication task (one of the communication tasks).
[0136] S602: Computing nodes 1 to 4 and computing nodes 9 to 12 generate on-network computing requests respectively. The on-network computing request generated by each computing node includes the target communication task ID. The on-network computing requests generated by different computing nodes include the same target communication task ID.
[0137] S603: Computing nodes 1 to 4 send the generated on-network computing requests to the first-level switching node 101 respectively; computing nodes 9 to 12 send the generated on-network computing requests to the first-level switching node 105 respectively.
[0138] S604: Switching nodes 101 and 105 parse the target communication task ID from the received on-network computing request.
[0139] S605: Switching node 101 and switching node 105 perform a hash operation on the target communication task ID to obtain indication information, which is used to instruct switching node 201 to perform calculations on intermediate data.
[0140] S606: Switching nodes 101 and 105 send an on-network computing request to switching node 201 according to the instruction information. The on-network computing request includes the target communication task ID.
[0141] S607: Switching node 201 sends confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm the execution of on-network computation.
[0142] S608: After receiving the confirmation information, exchange nodes 101 and 105 actively pull the data to be calculated from computing nodes 1 to 4 and computing nodes 9 to 12.
[0143] S609: Exchange node 101 and exchange node 105 perform calculations on the pulled data to be calculated, obtain intermediate data, and send the intermediate data to exchange node 201.
[0144] At this time, the intermediate data received by the switching node 201 from the switching nodes 101 and 105 are all intermediate data under the same communication task, that is, they correspond to the same target communication task ID.
[0145] S610: Exchange node 201 performs calculations on the received intermediate data to obtain the corresponding data calculation results, and sends the data calculation results to exchange node 101 and exchange node 105 respectively.
[0146] For example, exchange node 201 can perform a reduction operation on the intermediate data to generate the 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 steps S602 to S611 can be found in the above description. Figure 4 The relevant parts of steps S401 to S404 and steps S411 to S414 in the illustrated embodiment are described, and will not be repeated here.
[0149] In this way, not only can the time when 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 the above process does not need to be controlled by a single node, thereby avoiding the problem that the computing resources on the switching node 201 cannot be released for a long time due to a single point of failure.
[0150] The above Figure 4 as well as Figure 6 The illustrated embodiment uses a single switching node in the second layer performing an on-network computation process as an example. In other possible embodiments, multiple switching nodes in the second layer may perform on-network computation on intermediate data for the same target communication task ID. The following will discuss this further. Figure 7 This will be illustrated by example.
[0151] See Figure 7 This illustrates a flowchart of yet another communication method. Figure 7 In the communication method shown, computing nodes 1 to 4 and computing nodes 9 to 12 are configured to collaboratively execute the same periodic computing task.
[0152] like Figure 7 As shown, the method may specifically include:
[0153] S701: Before uploading the data to be computed, compute nodes 1 to 4 and compute nodes 9 to 12 generate on-network computing requests respectively. The on-network computing request generated by each compute node includes the target communication task ID, and the on-network computing requests generated by different compute nodes include the same target communication task ID.
[0154] In this embodiment, during the collaborative execution of the same periodic computing task by computing nodes 1 to 4 and computing nodes 9 to 12, each computing node generates multiple communication tasks. For each of these multiple communication tasks, each computing node sends data to be computed to an exchange node in the communication network to request the exchange node to perform on-network computing. For ease of understanding and explanation, this embodiment uses the example of multiple computing nodes uploading corresponding data to be computed for a target communication task (one of the communication tasks).
[0155] S702: Computing nodes 1 to 4 send the generated on-network computing requests to the first-level switching node 101 respectively; computing nodes 9 to 12 send the generated on-network computing requests to the first-level switching node 105 respectively.
[0156] S703: After receiving the on-network computing request, the switching node 101 generates two on-network computing requests according to the number of second-level switching nodes connected to the switching node 101, and sends the on-network computing requests to the second-level switching nodes 201 and 202 respectively. Each on-network computing request includes a target communication task ID.
[0157] S704: After receiving the on-network computing request, the switching node 105 generates two on-network computing requests based on the number of second-level switching nodes connected to the switching node 105, and sends the on-network computing requests to the second-level switching nodes 201 and 202 respectively.
[0158] In this embodiment, the first-level switching nodes 101 and 105 are both connected to the second-level switching nodes 201 and 202. After receiving an on-network computing request from an end-side computing node, switching nodes 101 and 105 can generate multiple on-network computing requests based on the number of second-level switching nodes connected to them. Each on-network computing request includes a target communication task ID, and different on-network computing requests may include the same target communication task ID. Then, switching nodes 101 and 105 can send an on-network computing request to each of the second-level switching nodes connected to them, requesting multiple switching nodes in the second level to perform on-network computing.
[0159] S705: Switching node 201 sends confirmation information to switching node 101 and switching node 105, and switching node 202 sends confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm the execution of on-network computation.
[0160] S706: After receiving the confirmation information, exchange nodes 101 and 105 actively pull the data to be computed from computing nodes 1 to 4 and computing nodes 9 to 12.
[0161] S707: Exchange node 101 performs calculations on the pulled data to be calculated, obtains intermediate data, and divides the calculated intermediate data into two subsets, namely subset A1 and subset A2, according to the number of exchange nodes in the second level connected to it; and exchange node 105 divides the calculated intermediate data into two subsets, namely subset B1 and subset B2, according to the number of exchange nodes in the second level connected to it.
[0162] In this embodiment, since on-network computing is performed using multiple switching nodes (i.e., switching node 201 and switching node 202) in the second layer, switching node 101 can divide the intermediate data generated based on the data to be computed uploaded by computing nodes 1 to 4 into two subsets, namely subset A1 and subset A2, as follows: Figure 8 As shown. For example, suppose the intermediate data generated by the exchange node 101 is {1, -3}, {5, -2}, {-2, -7}, {3, 4}, then the exchange node 101 can divide the intermediate data into subset A1{1, 5, -2, 3} and subset A2{-3, -2, -7, 4}.
[0163] Furthermore, the exchange node 105 will also divide the intermediate data generated based on the data to be computed uploaded by compute nodes 9 to 12 into two subsets, namely subset B1 and subset B2, such as... Figure 8As shown. For example, assuming that the intermediate data generated by the exchange node 105 is {8, 4}, {-7, -8}, {5, 3}, {3, 1}, then the exchange node 101 can divide the intermediate data into subset B1{8, -7, 5, 3} and subset B2{4, -8, 3, 1}.
[0164] S708: Exchange node 101 sends subset A1 to exchange node 201 and subset A2 to exchange node 202. Exchange node 105 sends subset B1 to exchange node 201 and subset B2 to exchange node 202.
[0165] At this time, the intermediate data received by switching nodes 201 and 202 are all intermediate data under the same communication task, corresponding to the same target communication task ID. Furthermore, the results calculated by switching nodes 201 and 202 based on the received intermediate data are the results calculated based on all the data uploaded by computing nodes 1 to 4 and computing nodes 9 to 12.
[0166] S709: Exchange node 201 performs calculations on the received subsets A1 and B1 to obtain the corresponding data calculation result 1, and sends the data calculation result 1 to exchange node 101 and exchange node 105 respectively; Exchange node 202 performs calculations on the received subsets A2 and B2 to obtain the corresponding data calculation result 2, and sends the data calculation result 2 to exchange node 101 and exchange node 105 respectively.
[0167] For example, exchange node 201 and exchange node 202 can perform reduction operations 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 nodes 1 to 4 respectively, and switching node 105 forwards data calculation result 1 and data calculation result 2 to computing nodes 9 to 12 respectively.
[0169] In this way, each computing node can obtain data calculation result 1 and data calculation result 2. After performing operations such as splicing data calculation result 1 and data calculation result 2, the computing node can obtain the final data calculation result it needs.
[0170] The specific implementation process of each step in this embodiment can be found in the description of the relevant steps in the foregoing embodiments, and will not be repeated here.
[0171] This not only effectively reduces the time that computing resources on switching nodes 201 and 202 are idle, thereby improving their utilization rate, but also avoids the problem of single-point failures preventing the computing resources on switching nodes 201 and 202 from being released for extended periods. Furthermore, the parallel execution of on-network computation by switching nodes 201 and 202 significantly improves on-network computation efficiency compared to using a single switching node.
[0172] The above Figure 4 , Figure 6 as well as Figure 7 In the illustrated embodiment, the switching nodes performing on-network computing in the communication network 10 are determined using a distributed orchestration approach, meaning that multiple devices (which can be end-side computing nodes or first-level switching nodes) determine the switching nodes for on-network computing. However, in other possible embodiments, a centralized orchestration approach can also be used to determine the switching nodes performing on-network computing in the communication network 10. The following will discuss this in conjunction with... Figure 9 This will be illustrated by example.
[0173] See Figure 9 This illustrates a flowchart of another communication method. Figure 9 In the communication method shown, the communication network 10 may further include a central controller ( Figure 1 (not shown in the image), and computing nodes 1 to 4 and computing nodes 9 to 12 are configured to collaboratively execute the same periodic computing task.
[0174] like Figure 9 As shown, the method may specifically include:
[0175] S901: Computing nodes 1 to 4 and 9 to 12 on the edge send resource requests to the central controller to request resources for performing on-network computing. The resource request includes the target communication task ID and the network addresses of all computing nodes participating in the same periodic computing task.
[0176] In this embodiment, during the collaborative execution of the same periodic computing task by computing nodes 1 to 4 and computing nodes 9 to 12, each computing node generates multiple communication tasks. For each of these multiple communication tasks, each computing node sends data to be computed to an exchange node in the communication network to request the exchange node to perform on-network computing. For ease of understanding and explanation, this embodiment uses the example of multiple computing nodes uploading corresponding data to be computed for a target communication task (one of the communication tasks).
[0177] For a target communication task, each computing node can generate the same target communication task ID, which is used to indicate a communication task that sends data to some exchange nodes in the second level.
[0178] Furthermore, the edge computing node can also obtain the network addresses of other computing nodes participating in the same computing task. These network addresses can be, for example, the computing node's IP address or media access control (MAC) address. For instance, the computing node can resolve 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 compute nodes can generate resource requests based on the generated target communication task ID and the network addresses of multiple compute nodes, and send these resource requests to the central controller to request resources from the central controller. Each resource request sent by a compute node to the central controller can include the same target communication task ID and the network addresses of multiple compute nodes.
[0180] S902: The central controller acquires load information, which is used to indicate the load of multiple switching nodes in the first and second tiers.
[0181] For example, the load of a switching node can be measured, for instance, by the number of requests the switching node is currently responding to, or by other means, without limitation.
[0182] In practice, the central controller can send load acquisition requests to each switching node, and each switching node can respond to the load acquisition request and report its current load.
[0183] S903: The central controller sends instruction information for the switching node 201 in the second layer to multiple computing nodes based on 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 the name of the switching node 201.
[0185] As an implementation example, the central controller can pre-obtain the topology of the communication network 10 and the line-rate aggregation performance of each switching node in the communication network 10 before receiving resource requests. For example, during the initial configuration phase of each switching node, the central controller can obtain its line-rate aggregation performance by accessing each switching node. Furthermore, the central controller can also obtain the topology of the communication network 10, such as by generating the topology through self-learning or by having the user provide the topology to the central controller.
[0186] Then, the central controller generates an aggregation tree based on load information, the topology of the communication network 10, the network addresses of multiple computing nodes, and the line-rate aggregation performance of each switching node. For example, the central controller can first determine the first-level and second-level switching nodes that can perform on-network computation on the data to be computed by multiple computing nodes based on the line-rate aggregation performance and load information of each switching node, and generate the aggregation tree by combining the network addresses of multiple computing nodes and the topology of the communication network 10. 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-network computation for multiple computing nodes. Therefore, the second-level switching node indicated by the aggregation tree is the switching node performing on-network computation. In this embodiment, it is assumed that the switching node performing on-network computation is switching node 201.
[0187] Finally, after the central controller identifies the switching node 201 that the user is performing on-network computing, it can send the identifier of the switching node 201, such as the network address of the switching node 201, to computing nodes 1 to 4 and computing nodes 9 to 12 respectively.
[0188] In practical applications, the central controller typically receives resource requests (with the same target communication task ID) from different computing nodes sequentially. Therefore, upon receiving the first resource request, the central controller can begin executing steps S902 and S903 as described above, and send the network address of switching node 201 back to the computing node that sent the resource request. Furthermore, the central controller also records the target communication task ID and the network address of switching node 201 locally. Thus, when the central controller receives resource requests from other computing nodes, it can, based on the locally stored correspondence between the target communication task ID and the network address of switching node 201, also send the network address of switching node 201 to the other computing nodes.
[0189] S904: Computing nodes 1 to 4 and computing nodes 9 to 12 on the terminal side generate on-network computing requests respectively. The on-network computing request generated by each computing node includes the target communication task ID and the indication information for the switching node 201. Furthermore, the on-network computing requests generated by different computing nodes include the same target communication task ID.
[0190] For example, the instruction information for switching node 201 may specifically be the network address of switching node 201. The computing node can write the network address of switching node 201 into the payload area of the on-network computing request.
[0191] S905: Computing nodes 1 to 4 send the generated on-network computing requests to the first-level switching node 101 respectively; computing nodes 9 to 12 send the generated on-network computing requests to the first-level switching node 105 respectively.
[0192] S906: Switching node 101 and switching node 105 respectively parse the instruction information for switching node 201 and the target communication task ID from the received on-network computing request.
[0193] S907: Switching nodes 101 and 105 respectively send an on-network computation request to switching node 201 according to the parsed instruction information, requesting switching node 201 to perform computation on intermediate data. The on-network computation request includes the target communication task ID.
[0194] S908: Switching node 201 sends confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm the execution of on-network computation.
[0195] S909: After receiving the confirmation information, exchange nodes 101 and 105 actively pull the data to be computed from computing nodes 1 to 4 and computing nodes 9 to 12.
[0196] S910: Exchange node 101 and exchange node 105 perform calculations on the data to be calculated that they pull, obtain intermediate data, and send the intermediate data to exchange node 201.
[0197] S911: Exchange node 201 performs calculations on the received intermediate data to obtain the corresponding data calculation results, and sends the data calculation results to exchange node 101 and exchange node 105 respectively.
[0198] For example, exchange node 201 can perform a reduction operation on the intermediate data to generate the corresponding result.
[0199] S912: 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.
[0200] It is worth noting that the execution order of the steps in this embodiment is not limited to... Figure 9 As illustrated in the example, in other possible embodiments, step S902 may be performed before step S901, such as the central controller periodically detecting the load of each switching node in the second layer so as to determine the switching node to perform on-network computing based on the detected load information after receiving a resource request.
[0201] In this way, not only can the idle time of computing resources on switching nodes 201 and 202 be effectively reduced, thereby improving the utilization rate of computing resources on switching nodes 201 and 202, but the above process does not need to be controlled by a single node, thereby avoiding the problem that computing resources on switching nodes 201 and 202 cannot be released for a long time due to a single point of failure.
[0202] The above Figure 9 The illustrated embodiment uses the example of an edge computing node requesting resources from a central controller for illustrative purposes. In other possible embodiments, the first-level switching node may also request resources from the central controller. The following will combine... Figure 10 This will be illustrated by example.
[0203] join Figure 10 This illustrates a flowchart of another communication method. Figure 10 In the communication method shown, the communication network 10 may further include a central controller ( Figure 1 (not shown in the image), and computing nodes 1 to 4 and computing nodes 9 to 12 are configured to collaboratively execute the same periodic computing task.
[0204] like Figure 10 As shown, the method may specifically include:
[0205] S1001: Computing nodes 1 to 4 and 9 to 12 on the end side communicate task information synchronously with the central controller.
[0206] For example, the synchronized communication task information may include the target communication task ID, etc.
[0207] In practice, after generating a communication task, the framework layer 502 or communication layer 503 in the computing node can synchronize the relevant information of the communication task to the central controller, such as through the first-level switching node it connects to. In this way, the central controller can obtain information such as the target communication task ID and determine the network address of the switching node that forwards the information, that is, the network addresses of switching node 101 and switching node 105.
[0208] In this embodiment, during the collaborative execution of the same periodic computing task by computing nodes 1 to 4 and computing nodes 9 to 12, each computing node generates multiple communication tasks. For each of these multiple communication tasks, each computing node sends data to be computed to an exchange node in the communication network to request the exchange node to perform on-network computing. For ease of understanding and explanation, this embodiment uses the example of multiple computing nodes uploading corresponding data to be computed for a target communication task (one of the communication tasks).
[0209] S1002: Computing nodes 1 to 4 and computing nodes 9 to 12 on the edge generate on-network computing requests respectively. The on-network computing request generated by each computing node includes the target communication task ID. Furthermore, the on-network computing requests generated by different computing nodes include the same target communication task ID.
[0210] S1003: Computing nodes 1 to 4 send the generated on-network computing requests to the first-level switching node 101 respectively; computing nodes 9 to 12 send the generated on-network computing requests to the first-level switching node 105 respectively.
[0211] S1004: Switching nodes 101 and 105 respectively send resource requests to the central controller to request resources for performing on-network computing. The resource request includes the target communication task ID and the network address of the switching node that sent the resource request.
[0212] S1005: The central controller acquires load information, which is used to indicate the load of multiple switching nodes in the second tier.
[0213] For example, the load of a switching node can be measured, for instance, by the number of requests the switching node is currently responding to, or by other means, without limitation.
[0214] In practice, the central controller can send load acquisition requests to each switching node in the second layer, and each switching node can respond to the load acquisition request and report its current load.
[0215] S1006: Based on the load information, the central controller sends the instruction information of the second-level switching node 201 to switching node 101 and switching node 105 respectively.
[0216] As an example of implementation, the central controller can obtain the topology of the communication network 10 and the line-rate aggregation performance of each switching node in the second layer before receiving resource requests. For example, the topology and the line-rate aggregation performance of each switching node can be obtained during the initialization phase.
[0217] Then, based on the load information, the topology of the communication network 10, the network addresses of switching nodes 101 and 15, and the line-rate aggregation performance of each switching node in the second layer, the central controller determines that the switching node performing the on-network computation is switching node 201. The load on switching node 201 after performing the on-network computation does not exceed the maximum load corresponding to the line-rate aggregation performance of switching node 201.
[0218] Finally, after the central controller identifies the switching node 201 where the user is performing on-network computation, it can send indication information of the switching node 201 to switching node 101 and switching node 105, such as sending the network address of the switching node 201.
[0219] S1007: Switching nodes 101 and 105, respectively, send an on-network computing request to switching node 201 according to the instruction information received from switching node 201, requesting switching node 201 to perform calculations on intermediate data. The on-network computing request includes the target communication task ID.
[0220] S1008: Switching node 201 sends confirmation information to switching node 101 and switching node 105 to notify switching node 101 and switching node 105 to confirm the execution of on-network computation.
[0221] S1009: After receiving the confirmation information, exchange nodes 101 and 105 actively pull the data to be computed from computing nodes 1 to 4 and computing nodes 9 to 12.
[0222] S1010: Exchange node 101 and exchange node 105 respectively perform calculations on the data to be calculated pulled, obtain intermediate data, and send the intermediate data to exchange node 201.
[0223] S1011: Exchange node 201 performs calculations on the received intermediate data to obtain the corresponding data calculation results, and sends the data calculation results to exchange node 101 and exchange node 105 respectively.
[0224] For example, exchange node 201 can perform a reduction operation on the intermediate data to generate the corresponding result.
[0225] S1012: 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.
[0226] It is worth noting that the execution order of the steps in this embodiment is not limited to... Figure 10 As illustrated in the example, in other possible embodiments, step S1005 may be performed before step S1004. For instance, the central controller may periodically detect the load of each switching node in the second layer so that, upon receiving a resource request, it can determine the switching node to perform on-network computing based on the detected load information.
[0227] in addition, Figure 10 In the illustrated embodiment, the example given is that the computing node synchronizes the communication task information to the central controller in advance. In other embodiments, the computing node may not need to synchronize the communication task information. In this case, 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 first-level switching nodes with the same target communication task ID, i.e., the network addresses of switching node 101 and switching node 105.
[0228] It should be noted that the above Figures 4 to 10 The embodiments shown are merely illustrative examples. In practical applications, other methods can be used to determine the switching node performing on-network computation. For instance, the on-network computation of the data to be computed can be implemented by combining the implementation methods of the above embodiments. For example, when combined with the above... Figure 4 as well as Figure 7 In the illustrated embodiment, exchange nodes 101 and 105 can use multiple hash functions to perform hash operations on the target communication task ID, and select multiple exchange nodes in the second layer to calculate intermediate data based on the multiple hash values (i.e., hash selection of multiple second-layer paths to send intermediate data). Before forwarding the intermediate data, exchange nodes 101 and 105 can first divide the intermediate data into multiple subsets based on the number of selected exchange nodes in the second layer, and send a subset of the intermediate data to each exchange node in the second layer selected by hashing. This allows multiple exchange nodes in the second layer to collaboratively complete the processing of the intermediate data, thereby further improving the data processing efficiency.
[0229] Alternatively, depending on the changes in the topology of the communication network 10 or the changes in the computing tasks being performed, different methods (i.e., different embodiments) can be selected to determine the switching nodes in the second layer of on-net computing.
[0230] Furthermore, this application uses a communication network 10 comprising two levels of switching nodes as an example for illustrative purposes. In actual applications, the communication network may also include three or more (including three) levels of switching nodes. In this case, the switching node performing on-network computation may be a switching node in the third level (or a higher level). The specific implementation process of selecting a switching node in the third level (or a higher level) to perform on-network computation can be found in the relevant descriptions of the foregoing embodiments, and will not be repeated here.
[0231] Furthermore, this application embodiment 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 performs the method performed by the switching node in the first level of the above embodiments, or performs the method performed by the switching node in the second level of the above embodiments.
[0232] Furthermore, embodiments of this application also provide a computer-readable storage medium storing instructions that, when executed on one or more computing devices, cause the one or more computing devices to perform the methods executed by the switching nodes in the first level of the above embodiments, or to perform the methods executed by the switching nodes in the second level of the above embodiments.
[0233] Furthermore, this application also provides a computer program product. When executed by a switching node, the switching node can execute the method performed by the switching node in the first level of the above embodiments, or execute the method performed by the switching node in the second level of the above embodiments. The computer program product can be a software installation package. 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 illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0235] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.
[0236] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0237] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as 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, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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 or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A communication method characterized by comprising: The method is applied to a communication network, the communication network comprising a plurality of hierarchical switching nodes, the plurality of hierarchical switching nodes comprising a first hierarchy and a second hierarchy, different switching nodes of the first hierarchy communicating through switching nodes of the second hierarchy, the switching nodes of the first hierarchy comprising a plurality of first target switching nodes, the switching nodes of the second hierarchy comprising at least one second target switching node; the method comprising: The plurality of first target switching nodes receives to-be-computed data of a same periodic computing task and a target communication task identifier ID corresponding to the to-be-computed data sent by a plurality of computing nodes, wherein the plurality of computing nodes generate a plurality of communication tasks in a process of executing the computing task, the target communication task ID is used to indicate one of the plurality of communication tasks, and the target communication task ID sent by each of the plurality of computing nodes is the same; The plurality of first target switching nodes performs computation on the to-be-computed data to obtain intermediate data, and sends 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 performs computation on the intermediate data corresponding to the same target communication task ID received to obtain a data computation result; The at least one second target switching node sends the data computation result to the plurality of first target switching nodes respectively; The plurality of first target switching nodes sends the data computation result to the plurality of computing nodes executing the computing task respectively.
2. The method of claim 1, wherein, The sending of the intermediate data and the target communication task ID to the at least one second target switching node comprises: The plurality of first target switching nodes obtains indication information, the indication information being used to indicate that the switching node performing computation on the intermediate data is the at least one second target switching node; The plurality of first target switching nodes sends the intermediate data and the target communication task ID to the at least one second target switching node.
3. The method of claim 2, wherein, The obtaining of the indication information by the plurality of first target switching nodes comprises: The plurality of first target switching nodes sends a first in-network computing request to a first candidate switching node in the switching nodes of the second hierarchy, the first in-network computing request being used to request the first candidate switching node to perform computation on the intermediate data; The plurality of first target switching nodes receives a replacement request sent by the first candidate switching node, the replacement request being used to indicate replacement of the switching node of the second hierarchy processing the intermediate data; The plurality of first target switching nodes sends a second in-network computing request to a second candidate switching node in the switching nodes of the second hierarchy, the second in-network computing request being used to request the first candidate switching node to perform computation on the intermediate data; The plurality of first target switching nodes receives indication information sent by the second candidate switching node, the indication information being used to indicate that the second candidate switching node performs computation on the intermediate data, and the second target switching node is the second candidate switching node.
4. The method of claim 2, wherein, The multiple first target switching nodes acquire indication information, including: The multiple first target switching nodes receive multiple in-network requests sent by the multiple computing nodes, each in-network request in the multiple in-network requests including the target communication task ID; The multiple first target switching nodes generate the indication information according to the target communication task ID.
5. The method of claim 1, wherein, The number of the second target switching nodes is multiple; The sending of the intermediate data and the target communication task ID to the at least one second target switching node includes: Each first target switching node in the multiple first target switching nodes splits the generated intermediate data into multiple subsets, the number of the multiple subsets being the same as the number of the second target switching nodes; Each first target switching node sends the multiple subsets and the target communication task ID to multiple second target switching nodes, wherein each first target switching node sends one subset in the multiple subsets and the target communication task ID to each second target switching node.
6. The method of claim 2, wherein, The communication network further includes a central controller, and the method further includes: The central controller acquires load information, the load information being used to indicate the load of multiple switching nodes in a first level and multiple switching nodes in a second level in the communication network; The central controller sends the identification 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 of claim 2, wherein, The communication network further includes a central controller, and the method further includes: The central controller acquires load information, the load information being used to indicate the load of multiple switching nodes in a first level and multiple switching nodes in 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 communications network, characterized by The communication network includes multiple levels of switching nodes, the multiple levels including a first level and a second level, different switching nodes in the first level communicating through switching nodes in the second level, the switching nodes in the first level including multiple first target switching nodes, and the switching nodes in the second level including at least one second target switching node; The multiple first target switching nodes are configured to receive to-be-computed data of a same periodic computing task and a target communication task identification ID corresponding to the to-be-computed data sent by multiple computing nodes, wherein the multiple computing nodes generate multiple communication tasks in a process of executing the computing task, the target communication task ID is used to indicate one communication task in the multiple communication tasks, the target communication task ID sent by each computing node in the multiple computing nodes is the same, the to-be-computed data is computed 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 configured to receive the intermediate data and the target communication task ID, perform calculation on the intermediate data corresponding to the same target communication task ID to obtain a data calculation result, and send the data calculation result to the plurality of first target switching nodes respectively. The plurality of first target switching nodes are further configured to send the data calculation result to the plurality of computing nodes performing the calculation task respectively.
9. The communication network of claim 8, wherein, The plurality of first target switching nodes are specifically configured to: obtain indication information, the indication information being used to indicate that the switching node performing the calculation on the intermediate data is the 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.
10. The communication network of claim 9, wherein, The plurality of first target switching nodes are specifically configured to: send a first in-network calculation request to a first candidate switching node in the second level of switching nodes, the first in-network calculation request being used to request the first candidate switching node to perform the calculation on the intermediate data; receive a replacement request sent by the first candidate switching node, the replacement request being used to indicate a replacement of the second level of switching nodes processing the intermediate data; send a second in-network calculation request to a second candidate switching node in the second level of switching nodes, the second in-network calculation request being used to request the first candidate switching node to perform the calculation on the intermediate data; receive indication information sent by the second candidate switching node, the indication information being used to indicate that the second candidate switching node performs the calculation on the intermediate data, and the second target switching node is the second candidate switching node.
11. The communication network of claim 9, wherein, The plurality of first target switching nodes are configured to: receive a plurality of in-network requests sent by the plurality of computing nodes, each in-network request in the plurality of in-network requests including the target communication task ID; and generate the indication information according to the target communication task ID.
12. The communication network of claim 8, wherein, The number of the second target switching nodes is a plurality; Each first target switching node in the plurality of first target switching nodes is configured to: divide 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; and send the plurality of subsets and the target communication task ID to the plurality of second target switching nodes, wherein each first target switching node sends one subset in the plurality of subsets and the target communication task ID to each second target switching node.
13. The communication network of claim 9, wherein, The communication network further includes a central controller, and the central controller is configured to: obtain load information, the load information being used to indicate the load of the plurality of switching nodes in the first level and the plurality of switching nodes in the second level in the communication network; send an identifier of the at least one second target switching node to the plurality of computing nodes according to the load information; and The plurality of first target switching nodes are further configured to receive the indication information sent by the plurality of computing nodes.
14. The communication network of claim 9, wherein, The communication network further includes a central controller, and the central controller is configured to: obtaining load information, the load information being used to indicate loads of a plurality of switching nodes in a first level and a plurality of switching nodes in a second level in the communication network; sending the indication information to the plurality of first target switching nodes according to the load information.
15. A switching node, characterized by comprising a processor and a memory; the memory is configured to store instructions, and the processor is configured to execute the instructions stored in the memory to cause the switching node to perform the communication method performed by the second target switching node in claims 1 to 7, or perform the communication method performed by the first target switching node in claims 1 to 7.
16. A computer-readable storage medium, characterized in that, the computer readable storage medium stores instructions, and when the instructions are run on at least one computing device, the at least one computing device is caused to perform the communication method performed by the second target switching node in claims 1 to 7, or perform the communication method performed by the first target switching node in claims 1 to 7.
Citation Information
Patent Citations
Data processing method, device and system
CN113098773A
Online computing resource scheduling method and system oriented to MLaaS service
CN116320013A