Method for establishing logic tree, network node equipment, computing node equipment and system
By initiating a tree-building request for computing node equipment and carrying structural information, combined with the statistical mechanism of network node equipment, the problems of poor scalability, low resource utilization and poor single-point failure reliability of distributed computing clusters when establishing logical trees are solved, and the problem of poor scalability of distributed computing clusters is realized. Higher reliability and resource utilization.
Patent Information
- Application Number
- CN202311021621.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2025-02-21
AI Technical Summary
The existing distributed computing clusters have problems such as poor scalability, low resource utilization and poor single-point failure reliability when establishing logical trees.
By initiating a tree-building request by the computing node device on the end side, and carrying the structure information of the nodes on the logical tree branch in the tree-building request, the network node device counts the number of tree-building requests that have been aggregated in the corresponding nodes in the logical tree. , so that each network node device only handles the tree creation request forwarded by connected devices.
It avoids the failure of the entire logic tree due to the failure of the equipment of a single network node, and improves the reliability and resource utilization rate of the logical tree established by a distributed computing cluster.
Smart Images

Figure CN119493652A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of distributed computing, and more specifically, to a method for establishing a logic tree, a network node device, a computing node device, and a system. Background Art
[0002] As the scale of data and computing grows, the computing power of a single computing node can no longer meet the computing needs of data processing. Therefore, distributed computing that uses multiple computing nodes to collaborate has become a trend. After computing tasks are assigned to multiple computing nodes, multiple computing nodes need to communicate the computing results (i.e., communication tasks). As the scale of distributed computing clusters increases, the time proportion of communication tasks is gradually increasing, gradually becoming a bottleneck problem that limits the speed of distributed computing.
[0003] In-network computing (INC) technology enables network node devices responsible for forwarding messages in a distributed computing cluster to perform specific calculations on the fields in the message while forwarding, thereby offloading some computing tasks to network node devices, which can alleviate the communication bottleneck problem in distributed computing. To perform in-network computing tasks, it is necessary to first establish a logical tree consisting of computing node devices and network node devices, so as to use the logical tree to aggregate data and broadcast the calculation results.
[0004] In traditional solutions, the establishment of the logic tree is the responsibility of a specific node, such as an aggregation manager (AM). AM establishes the logic tree in advance and reserves corresponding resources based on the physical topology of the distributed computing cluster, and allocates a subtree of the logic tree to the online computing task for online computing before the online computing task begins. However, the centralized establishment of the logic tree in advance by a specific node has poor scalability and low resource utilization, and more importantly, it is easy to cause the entire cluster's in-network computing power to fail when a single point failure of the node occurs, resulting in poor reliability. Therefore, how to improve the reliability of the distributed computing cluster to establish the logic tree has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a method, a network node device, a computing node device and a system for establishing a logical tree. The computing node device on the end side initiates a tree establishment request and carries the structural information of the node on the logical tree branch where the computing node device is located in the tree establishment request. The network node device counts the number of tree establishment requests that have been aggregated for the corresponding node in the logical tree, so that each network node device only needs to process the tree establishment request forwarded by the connected device, thereby avoiding the failure of a single network node device causing the failure of the entire logical tree, and improving the reliability of the distributed computing cluster in establishing the logical tree.
[0006] In a first aspect, a method for establishing a logical tree is provided, the method being applied to a first network node device in a distributed computing cluster, the distributed computing cluster comprising a plurality of computing node devices and at least one network node device, the first network node device being one of the at least one network node device, the method comprising: the first network node device obtaining a first tree building request initiated by a first computing node device among the plurality of computing node devices, the first tree building request being used to indicate the number of leaf nodes of each ancestor node of a first leaf node among all ancestor nodes in the first logical tree, the first logical tree being a logical tree established by the distributed computing cluster indicated by the first tree building request, the first leaf node being a node corresponding to the first computing node device in the first logical tree; the first network node device updating the value of a tree building request counter corresponding to the first logical tree in a tree building information table according to the first tree building request, the tree building request counter being used to indicate the number of tree building requests initiated by different computing node devices among the plurality of computing node devices that the first network node device has received; the first network node device determining a tree building result according to the tree building request counter and a first threshold, wherein the first threshold is the number of leaf nodes of the ancestor node of the first leaf node corresponding to the first network node device.
[0007] Optionally, at least one network node device may include but is not limited to a switch or router with in-network computing capabilities, and multiple computing node devices may include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU) or a neural processing unit (NPU), and the logic tree is a structure used to perform in-network computing.
[0008] Optionally, the tree building request indicates that leaf nodes in the built logical tree have the same depth.
[0009] According to the technical solution provided by the present application, a tree building request is initiated by a computing node device on the end side, and the structural information of the node on the logical tree branch where its corresponding node is located is carried in the tree building request. The network node device counts the number of tree building requests that have been aggregated for its corresponding node in the logical tree, so that each network node device only needs to process the tree building requests forwarded by the connected device, thereby avoiding the failure of a single network node device causing the failure of the entire logical tree, and improving the reliability of establishing the logical tree in the distributed computing cluster.
[0010] In combination with the first aspect, in certain implementations of the first aspect, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0011] According to the above technical solution, by indicating the number of network node devices that have passed through the forwarding path in the tree building request, the network node device that obtains the tree building request can determine the level of its corresponding node in the logical tree, and the tree building request also indicates the number of leaf nodes included in each level of ancestor nodes on the branch where the leaf node corresponding to the computing node device that initiated the request is located, so that the network node device can confirm the number of leaf nodes contained in its corresponding node in the logical tree according to any tree building request it receives.
[0012] In combination with the first aspect, in certain implementations of the first aspect, the value of the tree building request counter corresponding to the first logical tree in the tree building information table is updated according to the first tree building request, including: when the value of the network hop number field of the first tree building request is equal to 0, the value of the tree building request counter is increased by 1; when the value of the network hop number field of the first tree building request is equal to M, and M is a positive integer less than N, the value of the tree building request counter is increased by the value of the Mth leaf node number field among the N leaf node number fields of the first tree building request.
[0013] According to the above technical solution, the network node device can determine the type of tree building request according to the number of network hops. When the tree building request is directly obtained from a directly connected computing node device, it can be determined that the tree building request only includes a tree building request of a leaf node. When the tree building request is forwarded by other network node devices, it can be determined that the tree building request aggregates the tree building requests from at least one leaf node, so that the network node device can count the number of tree building requests received from leaf nodes only based on the requests sent by the connected devices, thereby decoupling the tree building process from the topology and providing distributed tree building capabilities.
[0014] In combination with the first aspect, in certain implementations of the first aspect, the tree building information table also includes a network hop count corresponding to a tree building request counter, and the network hop count is used to indicate the value of a network hop count field in a tree building request initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received. According to the first tree building request, the value of the tree building request counter in the tree building information table is updated, including: when the value of the network hop count field in the first tree building request is equal to the value of the network hop count, the value of the tree building request counter is updated.
[0015] According to the above technical scheme, by recording the number of network hops in the received tree building request in the tree building information table, the network node device can determine whether the different tree building requests received indicate that the network node device corresponds to the nodes at the same level in the logical tree. In the case where multiple tree building requests indicate nodes at different levels in the logical tree, the number of tree building requests received by the nodes at each level is counted separately, so that the nodes at different levels in the established logical tree can be mapped to the same network node device.
[0016] In combination with the first aspect, in certain implementations of the first aspect, the first threshold is equal to the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request, K is the value of the network hop number field of the first tree building request, K is a positive integer less than N, and the tree building result is determined according to the tree building request counter and the first tree building request, including: when the value of the new tree building request counter is equal to the first threshold, determining that the first logical tree is completed on the node corresponding to the first network node device; when the value of the new tree building request counter is greater than the first threshold, deleting the tree building information corresponding to the first tree building request; when the value of the new tree building request counter is less than the first threshold, waiting to receive other tree building requests to determine the tree building result.
[0017] According to the above technical solution, the network node device can determine the number of leaf nodes included in the corresponding node in the logical tree based on the information in the tree building request, and compare it with the number of tree building requests received from the leaf nodes counted by the tree building request counter. This enables the network node device to determine whether all the tree building requests of the child nodes have been collected based on the number of leaf nodes, without knowing the number of child nodes directly connected to it. This makes it possible for each node in the logical tree to complete the tree building only by sensing the leaf node information it includes, thereby solving the problem of global topology dependency of tree building.
[0018] In combination with the first aspect, in certain implementations of the first aspect, when the value of the new tree request counter is equal to the first threshold, the method also includes: when the value of the new tree request counter is equal to the second threshold, forwarding the first tree building success information according to the path of forwarding the first tree building request to the first network node device, wherein the second threshold is the total number of leaf nodes in the first logical tree, and the second threshold is equal to the value of the Nth leaf node number field among the N leaf node number fields of the first tree building request; when the value of the new tree request counter is greater than the second threshold, deleting the tree building information corresponding to the first tree building request; when the value of the new tree request counter is less than the first threshold, determining the tree building result according to the tree building result of the second network node device, wherein the second network node device is a network node device connected to the first network node device among at least one network node device.
[0019] According to the above technical scheme, after the network node device collects the tree building requests of all child nodes of its corresponding node in the logical tree, the network node device can determine whether the node corresponding to the network node device is the root node of the logical tree by comparing the number of leaf nodes contained in its corresponding node with the total number of leaf nodes contained in the logical tree reflected in the tree building request information. For non-root nodes, the tree building request can continue to be forwarded to the next-hop network node device, so that the network node device only needs to be responsible for determining whether to forward the tree building request to the next-hop network node device during the tree building process, and does not need to know the complete structure of the logical tree, so that the tree building process does not require tree traversal, saving calculation and space complexity, and improving the scalability of the logical tree.
[0020] In combination with the first aspect, in certain implementations of the first aspect, a tree establishment result is determined based on a tree establishment result of the second network node device, including: increasing the value of the network hop number field of the first tree establishment request by 1 to update the first tree establishment request; sending the updated first tree establishment request to the second network node device; receiving second tree establishment success information sent by the second network node device; and forwarding the second tree establishment success information based on the path of the first tree establishment request forwarded to the first network node device.
[0021] According to the above technical solution, when a network node device forwards a tree building request to a next-hop network node device, it only needs to update the number of network hops in the tree building request, without updating other information in the tree building request or initiating a new tree building request, thereby improving the forwarding efficiency of the tree building request and improving the scalability of the logical tree.
[0022] In combination with the first aspect, in certain implementations of the first aspect, after receiving the second tree establishment success information sent by the second network node device, the method also includes: adding a parent node mapping corresponding to the tree establishment request counter in the tree establishment information table, and the parent node mapping is used to indicate the port information used by the first network node device to connect to the second network node device.
[0023] According to the above technical solution, after receiving the tree establishment success information fed back by the next-hop network node device, the network node device can establish a mapping relationship between the path in the logical tree and the physical connection path between devices by recording the port connected to the parent node, thereby ensuring that the logical tree can be used normally during the task.
[0024] In combination with the first aspect, in certain implementations of the first aspect, the tree building information table also includes a sub-node mapping corresponding to a tree building request counter, the sub-node mapping being used to indicate a port in at least one port of the first network node device for receiving tree building requests initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received, and updating the value of the tree building request counter in the tree building information table according to the first tree building request, including: determining the first port at which the first network node device receives the first tree building request; and updating the value of the tree building request counter and the sub-node mapping when the sub-node mapping indicates that the first port has not received the tree building request.
[0025] According to the above technical solution, the network node device can determine whether the newly received tree building request has been counted by recording the port that has received the tree building request during the tree building process, thereby avoiding statistical errors caused by repeated tree building requests and improving the accuracy of building a logical tree.
[0026] In combination with the first aspect, in certain implementations of the first aspect, the first tree building request also includes a task identification field, the task identification field is used to indicate the first in-network computing task for the first logical tree to perform in-network computing, the tree building information table also includes a task identification corresponding to the tree building request counter, the task identification is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among multiple computing node devices that have been received by the first network node device indicated by the tree building request counter, and according to the first tree building request, the value of the tree building request counter in the tree building information table is updated, including: when the value of the task identification field in the first tree building request is equal to the value of the task identification, the value of the tree building request counter is updated.
[0027] According to the above technical solution, by carrying the task identifier in the tree building request and recording the task identifier of the received tree building request in the tree building information table of the network node device, a mapping relationship between the logical tree and the in-network computing task can be established, so that the network node device can distinguish the logical trees used for different in-network computing tasks, thereby allowing the network node device to build trees for multiple in-network computing tasks at the same time, thereby improving resource utilization.
[0028] In combination with the first aspect, in certain implementations of the first aspect, the first tree building request is initiated by the first computing node device when the first network computing task starts, and the method also includes: after the first network computing task is completed, the first network node device deletes the tree building information corresponding to the task identifier indicating the first network computing task in the tree building information table.
[0029] According to the above technical solution, the computing node device sends a tree building request at the beginning of the computing task in the network to start building the tree, and releases the resources occupied by the logical tree after the computing task in the network is completed, so that the logical tree is dynamically established following the task, thereby eliminating the need to reserve resources in advance and occupy resources for a long time, thereby improving resource utilization.
[0030] In combination with the first aspect, in some implementations of the first aspect, obtaining a first tree building request initiated by a first computing node device among multiple computing node devices includes: receiving the first tree building request sent by the first computing node device, wherein the first network node device is connected to the first computing node device.
[0031] In combination with the first aspect, in certain implementations of the first aspect, obtaining a first tree building request initiated by a first computing node device among multiple computing node devices includes: receiving a first tree building request sent by a third network node device, the third network node device is a network node device among at least one network node device connected to the first network node device, and the first tree building request is received by the third network node device from the first computing node device or a network node device connected to the third network node device.
[0032] According to the above technical solution, any network node device on the tree building request forwarding path can process the tree building request in the same way, thereby improving the application scope of the logic tree building method.
[0033] In combination with the first aspect, in some implementations of the first aspect, obtaining a first tree building request initiated by a first computing node device among multiple computing node devices includes: obtaining a first data packet, the first data packet including the first tree building request, and the first data packet is used to transmit data of computing tasks within the network.
[0034] According to the above technical solution, by including the tree building request in the data message of the normal computing task in the network, the establishment of the logical tree can be completed along the way without the need for additional message transmission, thereby saving the signaling overhead of establishing the logical tree.
[0035] In a second aspect, a method for establishing a logical tree is provided, the method being applied to a first computing node device in a distributed computing cluster, the distributed computing cluster comprising a plurality of computing node devices and at least one network node device, the first computing node device being one of the plurality of computing node devices, the method comprising: the first computing node device sending a first tree building request to a fourth network node device, the first tree building request being used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, the first logical tree being a logical tree established by the distributed computing cluster as indicated by the first tree building request, the first leaf node being a node corresponding to the first computing node device in the first logical tree, and the fourth network node device being a network node device connected to the first computing node device among the at least one network node device.
[0036] In combination with the second aspect, in certain implementations of the second aspect, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices that have been passed on the forwarding path of the first tree building request. The value of the network hop number field in the first tree building request sent by the first computing node device to the fourth network node device is 0. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0037] In combination with the second aspect, in some implementations of the second aspect, the first tree building request includes a task identification field, and the task identification field is used to indicate a first in-network computing task for in-network computing to be executed by the first logical tree.
[0038] In combination with the second aspect, in some implementations of the second aspect, sending the first tree establishment request to the fourth network node device includes: sending the first tree establishment request to the fourth network node device when the first in-network computing task starts.
[0039] In combination with the second aspect, in some implementations of the second aspect, sending a first tree building request to a fourth network node device includes: sending a first data packet to the fourth network node device, the first data packet including the first tree building request, the first data packet being used to transmit data of computing tasks within the network.
[0040] In a third aspect, a network node device for establishing a logical tree is provided, the network node device is the first network node device in a distributed computing cluster, the distributed computing cluster includes multiple computing node devices and at least one network node device, the first network node device is one of the at least one network node device, the network node device includes: an acquisition module, used to acquire a first tree building request initiated by a first computing node device among the multiple computing node devices, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, and the first leaf node is the node corresponding to the first computing node device in the first logical tree; an update module, used to update the value of a tree building request counter corresponding to the first logical tree in a tree building information table according to the first tree building request, the tree building request counter is used to indicate the number of tree building requests initiated by different computing node devices among the multiple computing node devices that the first network node device has received; a determination module, used to determine a tree building result according to the tree building request counter and a first threshold, wherein the first threshold is the number of leaf nodes of the ancestor node of the first leaf node corresponding to the first network node device.
[0041] In combination with the third aspect, in certain implementations of the third aspect, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0042] In combination with the third aspect, in certain implementations of the third aspect, the update module is used to: when the value of the network hop number field of the first tree building request is equal to 0, increase the value of the tree building request counter by 1; when the value of the network hop number field of the first tree building request is equal to M, and M is a positive integer less than N, increase the value of the tree building request counter by the value of the Mth leaf node number field among the N leaf node number fields of the first tree building request.
[0043] In combination with the third aspect, in certain implementations of the third aspect, the tree building information table also includes a network hop count corresponding to a tree building request counter, and the network hop count is used to indicate the value of a network hop count field in a tree building request initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received. The update module is used to: update the value of the tree building request counter when the value of the network hop count field in the first tree building request is equal to the value of the network hop count.
[0044] In combination with the third aspect, in certain implementations of the third aspect, the first threshold is equal to the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request, K is the value of the network hop number field of the first tree building request, K is a positive integer less than N, and the determination module is used to: when the value of the new tree request counter is equal to the first threshold, determine that the first logical tree is completed on the node corresponding to the first network node device; when the value of the new tree request counter is greater than the first threshold, delete the tree building information corresponding to the first tree building request; when the value of the new tree request counter is less than the first threshold, wait for receiving other tree building requests to determine the tree building result.
[0045] In combination with the third aspect, in certain implementations of the third aspect, when the value of the new tree request counter is equal to the first threshold, the determination module is also used to: when the value of the new tree request counter is equal to the second threshold, forward the first tree building success information according to the path of forwarding the first tree building request to the first network node device, wherein the second threshold is the total number of leaf nodes in the first logical tree, and the second threshold is equal to the value of the Nth leaf node number field among the N leaf node number fields of the first tree building request; when the value of the new tree request counter is greater than the second threshold, delete the tree building information corresponding to the first tree building request; when the value of the new tree request counter is less than the first threshold, determine the tree building result according to the tree building result of the second network node device, wherein the second network node device is a network node device connected to the first network node device among at least one network node device.
[0046] In combination with the third aspect, in certain implementations of the third aspect, a determination module is used to: increase the value of the network hop number field of the first tree establishment request by 1 to update the first tree establishment request; send the updated first tree establishment request to the second network node device; receive the second tree establishment success information sent by the second network node device; and forward the second tree establishment success information according to the path of forwarding the first tree establishment request to the first network node device.
[0047] In combination with the third aspect, in certain implementations of the third aspect, after receiving the second tree building success information sent by the second network node device, the determination module is also used to: add a parent node mapping corresponding to the tree building request counter in the tree building information table, and the parent node mapping is used to indicate the port information used by the first network node device to connect to the second network node device.
[0048] In combination with the third aspect, in certain implementations of the third aspect, the tree building information table also includes a sub-node mapping corresponding to a tree building request counter, the sub-node mapping being used to indicate a port in at least one port of the first network node device for receiving tree building requests initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received, and an update module being used to: determine the first port of the first network node device that receives the first tree building request; and update the value of the tree building request counter and the sub-node mapping when the sub-node mapping indicates that the first port has not received the tree building request.
[0049] In combination with the third aspect, in certain implementations of the third aspect, the first tree building request also includes a task identification field, which is used to indicate the first in-network computing task for the first logical tree to perform in-network computing. The tree building information table also includes a task identification corresponding to a tree building request counter, and the task identification is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among multiple computing node devices that have been received by the first network node device indicated by the tree building request counter. The update module is used to: when the value of the task identification field in the first tree building request is equal to the value of the task identification, update the value of the tree building request counter.
[0050] In combination with the third aspect, in certain implementations of the third aspect, the first tree building request is initiated by the first computing node device when the first network computing task starts, and the determination module is also used for: after the first network node device completes the first network computing task, deleting the tree building information corresponding to the task identifier indicating the first network computing task in the tree building information table.
[0051] In combination with the third aspect, in some implementations of the third aspect, the acquisition module is used to: receive a first tree building request sent by a first computing node device, wherein the first network node device is connected to the first computing node device.
[0052] In combination with the third aspect, in certain implementations of the third aspect, the acquisition module is used to: receive a first tree building request sent by a third network node device, the third network node device is a network node device among at least one network node device connected to the first network node device, and the first tree building request is received by the third network node device from the first computing node device or a network node device connected to the third network node device.
[0053] In combination with the third aspect, in some implementations of the third aspect, the acquisition module is used to: acquire a first data packet, the first data packet includes a first tree building request, and the first data packet is used to transmit data of a computing task within the network.
[0054] In a fourth aspect, a computing node device for establishing a logical tree is provided, wherein the computing node device is the first computing node device in a distributed computing cluster, wherein the distributed computing cluster includes multiple computing node devices and at least one network node device, wherein the first computing node device is one of the multiple computing node devices, and wherein the computing node device includes: a sending module, used to send a first tree building request to a fourth network node device, wherein the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, wherein the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, wherein the first leaf node is the node corresponding to the first computing node device in the first logical tree, and wherein the fourth network node device is a network node device connected to the first computing node device among the at least one network node device.
[0055] In combination with the fourth aspect, in certain implementations of the fourth aspect, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices that have been passed through on the forwarding path of the first tree building request. The value of the network hop number field in the first tree building request sent by the first computing node device to the fourth network node device is 0. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0056] In combination with the fourth aspect, in some implementations of the fourth aspect, the first tree building request includes a task identification field, and the task identification field is used to indicate a first in-network computing task for in-network computing to be executed by the first logical tree.
[0057] In combination with the fourth aspect, in some implementations of the fourth aspect, the sending module is used to: send a first tree building request to a fourth network node device when the first in-network computing task starts.
[0058] In combination with the fourth aspect, in some implementations of the fourth aspect, the sending module is used to: send a first data message to a fourth network node device, the first data message includes a first tree building request, and the first data message is used to transmit data of a computing task within the network.
[0059] In a fifth aspect, a system for establishing a logical tree is provided, comprising at least one network node device and multiple computing node devices, wherein the at least one network node device is used to execute the method in the first aspect or any possible implementation of the first aspect, and the multiple computing node devices are used to execute the method in the second aspect or any possible implementation of the second aspect.
[0060] In a sixth aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call and execute the instructions from the memory, so that the computing device executes the method in the first aspect or any possible implementation of the first aspect.
[0061] In a seventh aspect, a computing device is provided, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call and execute the instructions from the memory, so that the computing device executes the method in the second aspect or any possible implementation of the second aspect.
[0062] Optionally, the processor may be a general-purpose processor, which may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, the processor may be a general-purpose processor, which is implemented by reading software code stored in a memory, which may be integrated in the processor or may be located outside the processor and exist independently.
[0063] In an eighth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0064] In a ninth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method in the above-mentioned second aspect or any possible implementation manner of the second aspect.
[0065] Optionally, as an implementation, the chip includes a processor and a data interface, and the processor reads instructions stored in the memory through the data interface to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect.
[0066] Optionally, as an implementation method, the chip may also include a memory, in which instructions are stored, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to execute the method in the above-mentioned first aspect or any possible implementation method of the first aspect.
[0067] In a tenth aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device, the computing device executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0068] In the eleventh aspect, a computer program product comprising instructions is provided. When the instructions are executed by a computing device, the computing device executes the method in the above-mentioned second aspect or any possible implementation manner of the second aspect.
[0069] In the twelfth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes the method in the above-mentioned first aspect or any possible implementation manner of the first aspect.
[0070] In the thirteenth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes the method in the above-mentioned second aspect or any possible implementation manner of the second aspect.
[0071] By way of example, these computer-readable storage media include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), Flash memory, electrically EPROM (EEPROM), and hard drive.
[0072] Optionally, as an implementation manner, the above-mentioned storage medium may specifically be a non-volatile storage medium. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a schematic diagram of the relationship between resource reservation and resource usage of network node devices in traditional solutions.
[0074] Figure 2 It is a schematic flowchart of a method for establishing a logic tree provided in an embodiment of the present application.
[0075] Figure 3 It is a schematic diagram of a logic tree provided in an embodiment of the present application.
[0076] Figure 4 It is a schematic diagram of a tree establishment request message format provided in an embodiment of the present application.
[0077] Figure 5 It is a schematic diagram of a tree building information table provided in an embodiment of the present application.
[0078] Figure 6 It is a schematic diagram of another tree building information table provided in an embodiment of the present application.
[0079] Figure 7 It is a schematic flowchart of another method for establishing a logic tree provided in an embodiment of the present application.
[0080] Figure 8 The system for establishing a logic tree provided in an embodiment of the present application is a schematic flowchart of establishing a logic tree.
[0081] Fig. 9 It is a schematic diagram of the tree building time points of static tree building and dynamic tree building.
[0082] Fig.10 This is another schematic flow chart of establishing a logic tree in the system for establishing a logic tree provided in an embodiment of the present application.
[0083] Fig.11 It is a schematic flowchart of another method for establishing a logic tree provided in an embodiment of the present application.
[0084] Fig.12 It is a schematic diagram of a process of establishing a single-layer logic tree provided in an embodiment of the present application.
[0085] Fig.13 It is a schematic diagram of a process of establishing a double-layer logic tree provided in an embodiment of the present application.
[0086] Fig.14 It is a schematic structural block diagram of a network node device for establishing a logical tree provided in an embodiment of the present application.
[0087] Fig.15 It is a schematic structural block diagram of a computing node device for establishing a logic tree provided in an embodiment of the present application.
[0088] Fig.16 It is a schematic structural block diagram of a system for establishing a logic tree provided in an embodiment of the present application.
[0089] Fig.17 It is a schematic structural block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0090] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0091] The present application will present various aspects, embodiments or features around a system including multiple devices, components, modules, etc. It should be understood and appreciated that each system may include additional devices, components, modules, etc., and / or may not include all devices, components, modules, etc. discussed in conjunction with the figures. In addition, combinations of these schemes may also be used.
[0092] In addition, in the embodiments of the present application, words such as "exemplary" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0093] In the embodiments of the present application, "corresponding (corresponding, relevant)" and "corresponding (corresponding)" can sometimes be used interchangeably. It should be pointed out that when the distinction between them is not emphasized, the meanings they intend to express are consistent.
[0094] The network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are equally applicable to similar technical problems.
[0095] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0096] In the present application, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: including the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0097] To facilitate understanding, relevant terms and concepts that may be involved in the embodiments of the present application are first introduced below.
[0098] 1. In-network computing (INC): In-network computing is a technology that enables network node devices in a distributed computing cluster to perform specific calculations on fields in messages, such as addition, while forwarding messages, thereby offloading part of the computing tasks that originally needed to be performed by the computing node devices to the network node devices.
[0099] 2. In-network computing task: A task based on in-network computing. Every calculation or communication performed by a distributed computing cluster can be called a task, where the calculation performed by the computing node devices in the distributed computing cluster is called a computing task, and the communication of the calculation results between computing node devices through network node devices is called a communication task. If the network node devices participating in the communication task are also responsible for in-network computing during the communication task, then the communication task can be called an in-network computing task, such as a communication task in artificial intelligence (AI) training or a communication task in high performance computing (HPC).
[0100] 3. Application: A collection of computing and communication tasks performed to achieve the same purpose, such as an AI training or an HPC. An application may include one or more in-network computing tasks.
[0101] 4. Logical tree: A tree structure composed of at least some network node devices and at least some computing node devices in a distributed computer group, used to perform computing tasks within the network. Each node in the logical tree corresponds to a computing node device or a network node device, and these devices are connected according to the tree structure indicated by the logical tree, where the leaf nodes of the logical tree correspond to computing node devices, and non-leaf nodes correspond to network node devices.
[0102] With the growth of data scale and computing scale, the computing power of a single computing node can no longer meet the computing needs of data processing, so distributed computing that uses multiple computing nodes to collaborate has become a trend. For example, a large-scale AI model may currently require 8 graphics processing units (GPUs) to fully handle all model parameters. After the computing tasks are assigned to multiple computing nodes, multiple computing nodes need to communicate the computing results (i.e., communication tasks). As the scale of distributed computing clusters increases, the time proportion of communication tasks is gradually increasing, and it has gradually become a bottleneck problem that limits the speed of distributed computing.
[0103] In-network computing technology can alleviate the communication bottleneck problem in distributed computing and speed up distributed computing by offloading some computing tasks to network node devices with in-network computing capabilities. The calculation process is as follows:
[0104] (1) The computing node devices and network node devices participating in the network computing first form a logical tree;
[0105] (2) The leaf nodes of the logic tree aggregate all the data to the root node of the logic tree according to the connection path of the logic tree;
[0106] (3) After the network node device corresponding to the root node completes the calculation, it broadcasts the calculation results to the computing node devices corresponding to the leaf nodes according to the connection path of the logic tree.
[0107] The above process transfers part of the computing tasks on the end-side computing node device to the network node device, which can reduce the load on the computing node device. In addition, compared with the traditional method of exchanging data between computing node devices through network node devices, the above process reduces the number of data transmissions, reducing the number of communications from O(logN) to O(1), where N is the number of leaf nodes in the logic tree, thereby improving communication efficiency and saving data bandwidth.
[0108] It can be seen that the execution of each in-network computing task requires the establishment of a corresponding logic tree. The role of the logic tree includes two aspects: one is to determine the route. When the computing node device knows the composition of the logic tree, it can ensure that the data on the computing node devices corresponding to different leaf nodes converge to the network node device corresponding to the same root node; the second is to reserve resources. In-network computing requires the cache resources and connection resources of the network node device. Therefore, the composition of the logic tree means that the network node devices participating in the composition have reserved the required cache resources for the network node devices and maintained the status information of the connection required for in-network computing.
[0109] In traditional solutions, centralized static allocation is generally used to establish a logical tree. The establishment of the logical tree is the responsibility of a specific node, such as an aggregation manager (AM). AM needs to obtain the physical topology of the current distributed computing cluster from the subnet manager (SM). After establishing the logical tree, it notifies the devices corresponding to all nodes of the relevant information of the logical tree. The specific process is as follows:
[0110] (1) SM sends the physical topology to AM. AM establishes connections between aggregation node (AN) modules of network node devices based on the topology and records relevant connection information on AN.
[0111] (2) After all connections between ANs are established, a resource tree is formed on the AM, including all network node devices and computing node devices that can be used for in-network computing;
[0112] (3) Before an in-network computing task is started, application information needs to be sent to the AM;
[0113] (4) AM determines a subtree from the resource tree based on the application information as the logical tree of the current computing task in the network, and notifies the relevant network node devices to reserve resources;
[0114] (5) After the resource reservation is successful, the AM notifies the computing node devices that are leaf nodes of the ID information and topology information of the logical tree, so that the computing node devices can determine the data forwarding path based on the ID of the logical tree.
[0115] The above centralized static tree building method has two problems.
[0116] On the one hand, static allocation causes resources to be reserved in advance, resulting in low resource utilization. In a single application, there are multiple serial in-network computing tasks. When static allocation is used, resources need to be reserved in advance for all communication tasks in the application, making it impossible for time-serial tasks to reuse the same resources, resulting in low space resource utilization. Figure 1The example shown is a schematic diagram of the relationship between resource reservation and resource usage of a network node device. Assume that the total amount of resources of the network node device is M. t1 to t4 are 4 of the N serial in-network computing tasks in a single application. Each task requires 1 resource. When statically allocated, the network node device needs to reserve N resources for N in-network computing tasks. Then, a single network node device can only accommodate M / N applications, so that at most M / N resources are used in a single communication, and the space resource utilization is M / N. However, in reality, serial in-network computing tasks can reuse the same resources, so that the amount of resources required per unit time for a single application is 1, and a single network node device can actually accommodate a maximum of M applications. In addition, if Figure 1 As shown, multiple serial tasks in a single application do not occur continuously. Assuming that the communication time: idle time = 4:1, then from the time dimension, 4 tasks occupy the same amount of resources as 5 tasks.
[0117] On the other hand, centralized tree building has poor scalability and the ability to cope with single-point failures. The logical tree allocation of centralized tree building involves tree traversal operations. The computational complexity and spatial complexity of traversing the tree increase with the size of the cluster, resulting in poor scalability of the logical tree. More importantly, when the node responsible for tree building fails or shuts down, the computing power of the entire cluster will be invalidated; and when the node responsible for tree building fails or shuts down, the resources reserved by the network node device for in-network computing cannot be released, which may cause problems such as memory leaks and poor reliability. Therefore, how to improve the reliability of distributed computing clusters to establish logical trees has become a technical problem that needs to be solved urgently.
[0118] In view of this, in order to address the problem of poor reliability of centralized tree building, the embodiments of the present application provide a method, network node device, computing node device and system for establishing a logical tree. The computing node device on the end side initiates a tree building request and carries the structural information of the node on the logical tree branch where it is located in the tree building request. The network node device counts the number of tree building requests that have been aggregated for the corresponding node in the logical tree, so that each network node device only needs to process the tree building requests forwarded by the connected device, thereby avoiding the failure of a single network node device causing the failure of the entire logical tree, and improving the reliability of establishing the logical tree in the distributed computing cluster.
[0119] Figure 2A schematic flow chart of a method for establishing a logic tree provided by an embodiment of the present application is shown. Optionally, the method can be performed by a first network node device in a distributed computing cluster. The distributed computing cluster includes multiple computing node devices and at least one network node device, and the first network node device is one of the at least one network node device. The at least one network node device includes at least one network node device that can concentrate the data of each computing node device in the multiple computing node devices to the network node device through a path connected to the distributed computing cluster.
[0120] A network node device is a device with a message forwarding function in a distributed computing cluster, including but not limited to a switch or a router. Optionally, the network node device may also have certain computing and cache resources, and provide functions such as reading, writing, deleting, updating, and adding stored data. In other words, the network node device can provide in-network computing capabilities. In other embodiments, the network node device that provides in-network computing capabilities may also be called an in-network computing switch, but it should be understood that it refers to the same device as the network node device mentioned in the embodiments of the present application.
[0121] The computing node device is a device responsible for executing computing tasks in a distributed computing cluster, including but not limited to at least one of the following: a central processing unit (CPU), a graphics processing unit (GPU), a tensor processing unit (TPU), an intelligent processing unit (IPU), a neural processing unit (NPU), etc. Since most computing node devices are at least one of the above processors, or computing devices including at least one of the above processors, in some implementations, xPU is also used to represent the computing node device mentioned in the embodiments of the present application.
[0122] like Figure 2 As shown, the method includes the following steps.
[0123] S210: The first network node device obtains a first tree building request initiated by a first computing node device among multiple computing node devices.
[0124] For example, in step S210, the first network node device can obtain a tree building request initiated by the first computing node device. Specifically, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, wherein the first logical tree is a tree structure established by the distributed computing cluster indicated by the first tree building request, and the first leaf node is a leaf node corresponding to the first computing node device in the first logical tree.
[0125] Optionally, the tree building request may include a network hop number field and at least one leaf node number field.
[0126] The network hop count field is used to indicate the number of network node devices that the tree building request passes through before being forwarded from the computing node device that initiated the tree building request to the network node device that currently obtains the tree building request. Taking the first tree building request initiated by the first computing node device obtained by the first network node device as an example, the network hop count field indicates the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. Therefore, the first tree building request obtained by the first network node device may not be sent directly by the first computing node device to the first network node device.
[0127] In some possible implementations, when the value of the network node entry field in the first tree building request received by the first network node device is equal to 0, the first network node device directly receives the first tree building request sent by the first computing node device. That is, the first network node device is directly connected to the first node device in the cluster, and the node corresponding to the first network node device in the logical tree is the parent node of the first leaf node corresponding to the first computing node device in the logical tree.
[0128] In some other possible implementations, when the value of the network node entry number field in the first tree building request received by the first network node device is greater than 0, the first tree building request received by the first network node device is sent by other network node devices, such as a third network node device connected to the first network node device in the cluster. Specifically, after the third network node device obtains the first tree building request, it increases the value of the network hop number field in the first tree building request by 1, and forwards the first tree building request with the updated network hop number field to the first network node device. Among them, the first tree building request obtained by the third network node device may also be sent directly by the first computing node device, or obtained from other connected network node devices.
[0129] By analogy, when the computing node device initiates a tree building request, the network hop number field in the tree building request sent by the computing node device is all 0. If the tree building request does not reach a network node device and needs to be forwarded, the network node device will add 1 to the value of the network node field in the tree building request and then send it out. The above method enables each network node device that receives the tree building request to directly determine the level of its corresponding node in the logical tree according to the network hop number field value in the tree building request. Therefore, the tree building method of the embodiment of the present application is applicable to network node devices of any level to improve the scope of application of the logical tree building method.
[0130] At least one leaf node number field is used to indicate the number of leaf nodes owned by each ancestor of the leaf node corresponding to the computing node device that initiates the tree building request. Taking the first tree building request as an example, it can include N leaf node number fields, where N is the height of the root node in the first logical tree, N is a positive integer, and the nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0131] It should be understood that the number of leaf nodes of the above ancestor node refers to the number of leaf nodes included in the subtree with the ancestor node as the root node. The node height refers to the path length from the leaf node to the node. Figure 3 A schematic diagram of a logic tree is shown. Figure 3 The logical tree shown is used as an example to illustrate that the depth of the logical tree is 3. For leaf node 1, it includes 3 ancestor nodes, namely ancestor node 1, ancestor node 2 and ancestor node 3, wherein ancestor node 1 can also be called the parent node of leaf node 1, and ancestor node 3 is also the root node of the logical tree. For ancestor node 1, its height is 1, and it is directly connected to leaf node 1 and leaf node 2, so the number of its leaf nodes is 2. For ancestor node 2, its height is 2, and it is directly connected to two child nodes, and the two child nodes are respectively connected to leaf node 1 and leaf node 2, as well as leaf node 3 and leaf node 4, so the number of leaf nodes of ancestor node 2 is 4. For ancestor node 3, its height is 3, and so on, the number of its leaf nodes is 8, which are leaf nodes 1 to leaf node 8.
[0132] Optionally, the tree building request may also include a task identification field to indicate the in-network computing task that the logical tree is used to execute. Based on the task identification field in the tree building request, the network node device can distinguish the logical trees used for different in-network computing tasks, thereby allowing the network node device to build trees for multiple in-network computing tasks at the same time. The specific implementation method is described in detail below.
[0133] Figure 4 It is a schematic diagram of a tree establishment request message provided in an embodiment of the present application. Figure 4 The tree building request message shown is applicable to a logical tree of a specific structure, that is, the leaf nodes in the logical tree to be built have the same depth, and the depth of the logical tree to be built is less than or equal to 2. Figure 4 As shown, the tree building request message includes a task identifier (TaskID) field, an aggregation leaf node (AggLeaf) field, a global leaf node (GlobalLeaf) field, and a network hop count (Hop) field. Since the depth of the logical tree to be established is less than or equal to 2, that is, the nodes other than the leaf nodes in the logical tree can only be root nodes or parent nodes directly connected to the leaf nodes, the leaf node number field can be simplified to the AggLeaf field and the GlobalLeaf field. Among them, the AggLeaf field indicates the number of leaf nodes aggregated by the parent node of the leaf node that initiates the tree building request, and the GlobalLeaf field indicates the total number of leaf nodes in the logical tree to be established.
[0134] S220: The first network node device updates the value of the tree building request counter corresponding to the first logical tree in the tree building information table according to the first tree building request.
[0135] For example, in step S220, the first network node device can count the number of tree building requests it has received from leaf nodes according to the first tree building request. Specifically, the first network node device maintains a tree building information table, which includes a tree building request counter corresponding to the first logical tree, for recording the number of tree building requests initiated by the computing node devices corresponding to the non-repetitive and highly identical leaf nodes in the first logical tree that the first network node device has received.
[0136] In some possible implementations, the network node device can identify the type of the tree building request based on the value of the network hop count field in the received tree building request, thereby determining the number of tree building requests from computing node devices corresponding to leaf nodes aggregated in the tree building request.
[0137] As described in S210, when the value of the network hop number field is equal to 0, it means that the node corresponding to the network node device is directly connected to the leaf node in the logical tree. Therefore, the network node device can determine that the tree building request is a non-aggregate tree building request, which only includes a tree building request for a leaf node. In this case, the value of the tree building request counter corresponding to the logical tree in the tree building information table increases by 1, indicating that the current network node device has successfully collected a tree building request from a leaf node.
[0138] As described in S210, when the value of the network hop number field is greater than 0, it means that the node corresponding to the network node device is not directly connected to the leaf node in the logical tree. Therefore, the network node device can determine that the tree building request is an aggregated tree building request, in which the tree building requests from at least one leaf node are aggregated. In this case, the value of the tree building request counter corresponding to the logical tree in the tree building information table increases by m, where m is the value of the Mth leaf node number field among the N leaf node number fields of the tree building request, and M is the value of the network hop number field in the tree building request. The value of the network hop number field is M, indicating that the network node device is the M+1th network node device that receives the tree building request, so the height of the corresponding node in the logical tree is M+1, indicating that the network node device to which the tree building request is sent is equivalent to an ancestor node with a leaf node height of M in the logical tree. The successful receipt of the tree building request indicates that the ancestor node with a height of M has successfully collected the tree building requests from all its leaf nodes, and reported the aggregated results to the ancestor node with a height of M+1 connected to it, which is equivalent to the current network node successfully receiving the tree building requests from all leaf nodes of one of its child nodes.
[0139] Through the above scheme, the network node device can count the number of tree building requests received from leaf nodes only according to the requests sent by the connected devices, thereby providing a basis for decoupling the topology of the tree building process and having the ability of distributed tree building.
[0140] Optionally, the tree building information table maintained by the network node device may also include a network hop number corresponding to the tree building request counter, which is used to indicate the value of the network hop number field in the received tree building request counted by the tree building request counter. Specifically, the tree building information table may include multiple entries, each entry includes a tree building request counter and a network hop number, and the network hop number corresponding to the tree building request counter refers to the network hop number recorded under the same entry as the tree building request counter. In this case, after the network node device obtains the tree building request, it first compares the value of the network hop number field in the obtained tree building request with the value of the network hop number of the corresponding logical tree in the tree building information table. If the value of the network hop number field in the tree building request is the same as the value of the recorded network hop number, the tree building request counter in the corresponding entry is updated according to the above method; otherwise, a new entry is created to record the value of the network hop number field, and the tree building request counter in the new entry is assigned an initial value.
[0141] Since the logical tree is a virtual structure, it does not necessarily have a one-to-one correspondence with physical devices, that is, the same network node device may correspond to multiple nodes at different levels in the unified logical tree. In this case, the value of the network hop number field in the tree building request received by the network node device may be different and needs to be counted separately. Therefore, through the above scheme, the network node device can determine whether the different tree building requests received indicate that the network node device corresponds to the nodes at the same level in the logical tree. In the case where multiple tree building requests indicate nodes at different levels in the logical tree, the number of tree building requests received by the nodes at each level is counted separately, so that the established logical tree has the ability to map nodes at different levels to the same network node device.
[0142] Optionally, in the case where the tree building request includes an identification field, the tree building information table maintained by the network node device may also include a task identification corresponding to the tree building request counter, which is used to indicate the value of the task identification field in the received tree building request counted by the tree building request counter. In this case, after the network node device obtains the tree building request, it first compares the value of the task identification field in the obtained tree building request with the value of the task identification in the recorded entry in the tree building information table. If the value of the task identification field in the tree building request is the same as the value of the recorded task identification, the tree building request counter in the corresponding entry is updated according to the above method; otherwise, a new entry is created to record the value of the task identification field, and the tree building request counter in the new entry is assigned an initial value.
[0143] It should be understood that the meaning of the correspondence between the tree request counter and the task identifier is the same as the meaning of the correspondence between the tree request counter and the number of network hops in the previous text, that is, the tree request counter and the task identifier stored in the same entry in the tree information table. Similar expressions appearing below also represent the same meaning and will not be repeated here.
[0144] Through the above scheme, the network node device can establish a mapping relationship between the logical tree and the in-network computing tasks, so that the network node device can distinguish the logical trees used for different in-network computing tasks, thereby allowing the network node device to build trees for multiple in-network computing tasks at the same time, thereby improving resource utilization.
[0145] Optionally, the tree building information table maintained by the network node device may also include a sub-node mapping corresponding to a tree building request counter, which is used to indicate a port in at least one port of the network node device for receiving received tree building requests. Specifically, the above-mentioned received tree building requests refer to the tree building requests counted by the corresponding tree building request counter. In this case, after the network node device obtains the tree building request, it first determines the port through which the device sending the tree building request is connected to the network node device, and searches for the sub-node mapping under the corresponding entry in the tree building information table to determine whether a tree building request for the same logical tree has been received through the port. If the sub-node mapping indicates that the corresponding port has not received a tree building request for the same logical tree, the tree building request counter in the corresponding entry is updated according to the above method; otherwise, it indicates that the message is a repeatedly sent message, and the message is discarded without updating the tree building request counter.
[0146] Through the above solution, the network node device can determine whether the newly received tree building request has been counted, thereby avoiding statistical errors caused by repeated tree building requests and improving the accuracy of building a logical tree.
[0147] Figure 5 Schematic diagram of a tree building information table provided in an embodiment of the present application. Figure 5 As shown in , the tree building information table can record the task ID (TaskID), network hop count (Hop), child node mapping (Bitmap) and tree building request counter (counter). Figure 5 As shown, the tree building information table may include multiple entries, each of which records the above information, and each entry is independent of each other. Figure 5 Taking the first entry in as an example, it records the tree-building requests aggregated in the network node device corresponding to a node with a height of 1 in the logical tree with TaskID 0001. The sub-node mapping maps the four ports connected to the network node device and other devices through 4 bits. For example, a bit value of 0 can represent that the port has not received a tree-building request, and a bit value of 1 can represent that the port has received a tree-building request. Taking 1001 in the figure as an example, it can indicate that the network node device has received a tree-building request from the device connected to the first port, and a tree-building request from the device connected to the fourth port. Counter equal to 3 means that the two tree-building requests received from the above two devices have aggregated the tree-building requests initiated by the computing node devices corresponding to the three leaf nodes.
[0148] S230: The first network node device determines a tree establishment result according to a tree establishment request counter and a first threshold.
[0149] For example, in step S230, the first network node device can determine the progress of node building in the logical tree corresponding to the first network node by calculating the number of tree building requests initiated by the corresponding computing node device according to the received, non-duplicate leaf nodes of the same height counted by the tree building request counter.
[0150] In some possible implementations, the network node device can compare the number of leaf nodes included in the node corresponding to the network node device indicated by the tree building request with the value counted by the tree building request counter to determine whether the node corresponding to the network node device has collected all the tree building requests for the leaf nodes it includes. Specifically, taking the first tree building request obtained by the first network node device as an example, the first network node device can use the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request as the first threshold, where K is the value of the network hop number field of the first tree building request, so the first threshold represents the number of leaf nodes of the corresponding node of the first network node device in the first logical tree.
[0151] When the value of the new tree request counter is equal to the first threshold, the first network node device can determine that the tree building requests of all its child nodes have been collected, that is, the construction of the subtree with the node corresponding to the first network node device as the root node in the first logical tree is completed.
[0152] When the value of the new tree creation request counter is greater than the first threshold, the first network node device can determine that an error occurs in the tree creation process, and therefore discards the newly acquired message, interrupts the tree creation, and deletes the tree creation information corresponding to the first tree creation request.
[0153] When the value of the new tree request counter is greater than the first threshold, the first network node device can determine that the tree building requests of all its child nodes have not been collected, and continue to wait for tree building requests sent by other devices, and repeat the above counting and judgment process after obtaining new tree building requests until the tree building is successful or an error is found.
[0154] Through the above scheme, the network node device counts the number of tree building requests from leaf nodes that its corresponding node has collected. When the number of tree building requests collected from leaf nodes is the same as the number of leaf nodes it should include, it means that the subtree structure with the node corresponding to the network node device as the root node is complete. Therefore, the network node device can determine that it has collected all the tree building requests sent by all child nodes without knowing the number of its directly connected child nodes, that is, the network node device only needs to perceive the leaf node information it includes to complete the tree building, thereby solving the global topology dependency problem of tree building.
[0155] In some possible implementations, the network node device can also compare the total number of leaf nodes contained in the logical tree to be established indicated by the tree building request with the value counted by the tree building request counter to determine whether the corresponding node of the network node device corresponds to the root node of the logical tree to be established, and then determine whether it is necessary to continue forwarding the tree building request to the next-hop network node device. Specifically, taking the first tree building request obtained by the first network node device as an example, the first network node device can use the value of the Nth leaf node number field among the N leaf node number fields of the first tree building request as the second threshold, and the second threshold represents the total number of leaf nodes in the first logical tree.
[0156] When the value of the new tree creation request counter is equal to the second threshold, the first network node device can determine that its corresponding node is the root node of the first logical tree. The successful establishment of the root node means that the entire first logical tree is successfully established, so the first network node device forwards the first tree establishment success information according to the path forwarded by the first tree establishment request to the first network node device. Optionally, the first network node device can send the tree establishment success information to the child nodes connected to it through these ports according to the child node mapping recorded in the tree establishment information table and the ports indicated by the child node mapping that have received the tree establishment information.
[0157] When the value of the new tree request counter is greater than the second threshold, the first network node device can determine that an error occurs in the tree building process, and therefore discards the newly acquired message, interrupts the tree building, and deletes the tree building information corresponding to the first tree building request.
[0158] When the value of the new tree request counter is less than the second threshold, the first network node device can determine that its corresponding node is not the root node of the first logical tree. Therefore, after the first network node device collects all the tree building requests of the child nodes at its corresponding node, it sends the aggregated tree building requests to other network node devices, such as the second network node device connected to the first network node device in the cluster, and waits for the tree building result fed back by the second network node device.
[0159] Specifically, when the value of the new tree building request counter is less than the second threshold value, the first network node device increases the value of the network hop number field in the first tree building request it obtains by 1, and sends the first tree building request with the updated value of the network hop number field to the second network node device. After receiving the first tree building request, the second network node device can continue to build a logical tree according to the method provided in the embodiment of the present application, and if the logical tree is successfully built, it can send a tree building success message to the first network node device. After receiving the tree building success message from the second network node device, the first network node device can determine that the first logical tree is successfully built, and can therefore continue to forward the tree building success message to the child nodes according to the path forwarded from the first tree building request to the first network node device.
[0160] Through the above scheme, after the network node device collects the tree building requests of all child nodes of its corresponding node in the logical tree, by comparing the number of leaf nodes contained in its corresponding node with the total number of leaf nodes contained in the logical tree reflected in the tree building request information, it can determine whether the node corresponding to the network node device is the root node of the logical tree. For non-root nodes, it can continue to forward the tree building request to the next-hop network node device, so that the network node device only needs to be responsible for determining whether to forward the tree building request to the next-hop network node device during the tree building process, and does not need to know the complete structure of the logical tree, so that the tree building process does not require tree traversal, saving calculation and space complexity, and improving the scalability of the logical tree.
[0161] Optionally, for the network node devices corresponding to the non-root nodes of the logical tree, the maintained tree building information table may also include a parent node mapping corresponding to the tree building request counter, which is used to indicate the port through which the network node device corresponding to the parent node of its corresponding node in the logical tree is connected to the network node device. Taking the above-mentioned first network node device as an example, the tree building success information it receives is sent by the second network node device, so the node corresponding to the second network node device in the logical tree is the parent node of the node corresponding to the first network node device. After receiving the tree building success information sent by the second network node device, the first network node device may add a parent node mapping to the corresponding entry in the tree building information table to indicate the port that received the tree building success information.
[0162] Figure 6 is a schematic diagram of another tree building information table provided in an embodiment of the present application. Figure 5 Compared with the tree building information table shown in Figure 6 In addition to the task ID (TaskID), network hop count (Hop), child node mapping (Bitmap) and tree building request counter (counter), the tree building information table also records the parent node mapping (Bitmap). The parent node mapping and child node mapping also use 4 bits to map the 4 ports connected to the network node device and other devices. The value of the third bit in the parent node mapping is 1, indicating that the tree building success information received by the network device is sent through the network node device connected to it through its third port. During the use of the logical tree, the data received by the network node device is aggregated to the next-hop network node device through the three ports.
[0163] Through the above scheme, the network node device records the port connected to the parent node, and can establish a mapping relationship between the path in the logical tree and the physical connection path between devices, thereby ensuring that the logical tree can be used normally during the task.
[0164] Combination of the above Figures 2 to 6The method for establishing a logical tree provided by the embodiment of the present application is described. For the computing node device, the embodiment of the present application also provides a corresponding method for establishing a logical tree. Figure 7 Specific instructions.
[0165] Figure 7 A schematic flow chart of another method for establishing a logic tree provided by an embodiment of the present application is shown. Optionally, the method may be executed by a first computing node device in a distributed computing cluster. Optionally, Figure 7 The method shown can be used with Figure 2 The method shown in the figure corresponds to that in the previous section, so the specific description of the description can be found in the previous section. Figure 2 The description of the method shown will not be repeated here.
[0166] like Figure 7 As shown, the method includes the following steps.
[0167] S710: The first computing node device sends a first tree establishment request to the fourth network node device.
[0168] For example, in step S710, the first computing node device can actively initiate a first tree building request. Specifically, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, wherein the first logical tree is a tree structure established by the distributed computing cluster indicated by the first tree building request, and the first leaf node is a node corresponding to the first computing node device in the first logical tree.
[0169] Optionally, the first tree building request can be combined with the above Figure 2 The first tree building request in the method shown has the same fields. In the first tree building request sent by the first computing node device, the value of the network hop count field is 0.
[0170] It should be understood that the fourth network node device is a network node device directly connected to the first computing node device in the distributed cluster, and the first tree building request sent by the first computing node device is directly received by the fourth network node device. Figure 2 The first network node device in the method shown is the same network node device, and may also be a different network node device from the first network node device.
[0171] Through the technical solution of the embodiment of the present application, the computing node device on the end side autonomously initiates a tree building request, and carries the structural information of the node on the logical tree branch where its corresponding node is located in the tree building request. The network node device counts the number of tree building requests that have been aggregated for its corresponding node in the logical tree, so that each network node device only needs to process the tree building requests forwarded by the connected device, thereby avoiding the failure of a single network node device causing the failure of the entire logical tree, and improving the reliability of establishing the logical tree of the distributed computing cluster.
[0172] Figure 8 FIG. 1 is a schematic flow chart showing a system for establishing a logical tree composed of a computing node device and a network node device provided in an embodiment of the present application. Figure 8 As shown, xPU 1 and xPU 2 are two computing node devices in the system, leaf switch 1, leaf switch 2 and spine switch 1 are three network node devices in the system, wherein leaf switch and spine switch are two types of network node devices.
[0173] xPU 1 and xPU 2 each send a tree building request to its directly connected leaf switch 1 and leaf switch 2. Optionally, xPU 1 and xPU 2 can respectively Figure 7 The method shown sends a tree building request.
[0174] Leaf switch 1 and leaf switch 2 each receive tree building requests sent by the computing node devices directly connected to them, and count the number of collected tree building requests from the computing node devices corresponding to the leaf nodes in the logical tree. After the leaf switch collects the tree building requests of all leaf nodes included in the corresponding node in its logical tree, it aggregates the collected tree building requests and forwards them to the spine switch. Spine switch 1 corresponds to the root node of the logical tree, and based on the tree building requests aggregated by the leaf switch, it counts the number of collected tree building requests from the computing node devices corresponding to the leaf nodes in the logical tree. After spine switch 1 collects the tree building requests of all leaf nodes in the logical tree to be established, it confirms that the tree building is successful, otherwise the tree building fails. Optionally, leaf switch 1, leaf switch 2 and spine switch 1 can respectively Figure 2 The method shown builds a logical tree.
[0175] After spine switch 1 determines the tree building result, spine switch 1 sends the tree building result to xPU 1 and xPU 2 respectively via leaf switch 1 and leaf switch 2 according to the path where the tree building request converges to spine switch 1.
[0176] In some possible implementations, Figure 8The first logical tree established by xPU 1, xPU 2, leaf switch 1, leaf switch 2 and spine switch 1 may be a logical tree for executing the first intra-network computing task. Optionally, xPU 1 and xPU 2 may initiate a tree establishment request at the beginning of the first intra-network computing task. And after the first intra-network computing task is completed, leaf switch 1, leaf switch 2 and spine switch 1 may respectively delete the establishment information of the first logical tree in their respective tree establishment information tables, thereby releasing the resources of the network node device.
[0177] The above solution unbinds the establishment of the logic tree from the application and transforms it into a dynamic establishment based on the task, thereby optimizing the time point for establishing the logic tree. Fig. 9 A schematic diagram of tree building time points for static tree building and dynamic tree building is shown.
[0178] like Fig. 9 As shown on the left, the traditional solution uses a static tree building method to build a logical tree. Fig. 9 The application shown in is AI model training, which can include time nodes such as network initialization, model loading, and model operation. The model runtime specifically includes multiple computing tasks and multiple communication tasks. In-network computing technology enables network node devices in communication tasks to undertake certain computing tasks, but because static tree building is centrally controlled by a unified tree building node, the tree building time point is at network initialization, and resources are released after the model runs, so that the resources of network node devices are occupied during the entire AI model training application process.
[0179] Fig. 9 The right side shows the dynamic tree building method provided by the embodiment of the present application. Since the tree building process is completely controlled by the computing node devices and network node devices involved in forming the logical tree, and the tree building process does not need to obtain topology information, it is not necessary to reserve resources at the beginning of the application. The tree building time point is the beginning of each communication task, and the resources used for this tree building can be released when the communication task ends, and the logical tree used for the next communication task can be established at the beginning of the next communication task.
[0180] Therefore, through the above scheme, the computing node device sends a tree building request at the beginning of the computing task in the network, starts to build the tree, and releases the resources occupied by the logical tree after the computing task in the network is completed, so that the logical tree is dynamically established following the task, thereby eliminating the need to reserve resources in advance and occupy resources for a long time, thereby improving resource utilization.
[0181] In some possible implementations, the tree building request and the tree building result may be sent together with the data message of the current in-network computing task. Fig.10 FIG. 2 shows another schematic flow chart of establishing a logic tree in a system for establishing a logic tree composed of a computing node device and a network node device provided in an embodiment of the present application. Fig.10As shown, Figure 8 The difference between the processes shown is that the tree building request and tree building result sent between xPU 1, xPU 2, leaf switch 1, leaf switch 2 and spine switch 1 are included in the data communication message.
[0182] Specifically, as mentioned above, the in-network computing task needs to concentrate the data required for in-network computing from the computing node devices corresponding to the leaf nodes to the network node devices corresponding to the root nodes. After the network node devices corresponding to the root nodes calculate and obtain the computing result data, the computing result data is broadcast to the computing node devices corresponding to the leaf nodes. Therefore, the tree building request can be included in the data message from the computing node devices required for in-network computing to the network node devices. The network node devices corresponding to the root node build the tree while performing in-network computing. After the tree is successfully built and the computing result data is obtained, the computing result data message is sent to the next level network node device according to the successfully established logical tree. And because the message carries the successful tree building information, the next level network node device can also determine that the logical tree is successfully established when receiving the computing result data, so it can continue to transmit the computing result data according to the structure of the successfully established logical tree. By analogy, the successful tree building information can eventually reach the computing node device together with the computing result data.
[0183] Through the above scheme, the tree establishment request is included in the data message of the normal computing task in the network, so that the establishment of the logical tree can be completed along the way without the need for additional message transmission, thereby saving the signaling overhead of establishing the logical tree.
[0184] Fig.11 A schematic diagram of the overall process of the method for establishing a logic tree provided by the embodiment of the present application is provided when the depth of the logic tree to be established is less than or equal to 2 and the leaf nodes have the same depth. Fig.11 The process shown is described in detail.
[0185] Fig.12 This is a schematic diagram of establishing a single-layer logic tree based on a top-on-rack switch (ToR) in Example 1. Fig.12 The left side is the structure diagram of the logical tree to be established, and the right side is the mapping relationship between the network node device and the computing node device according to the logical tree to be established. Among them, ToR is a network node device, and w1, w2, and w3 represent three computing node devices. The tree building process is as follows.
[0186] Step 1: The computing node device initiates a tree building request. w1, w2, and w3 can obtain the address of the ToR through the configuration file and send a tree building request to the ToR. In the tree building request message sent by w1, w2, and w3, the value of the network hop number field is Hop=0, the value of the aggregation leaf node field is AggLeaf=3, and the value of the global leaf node field is GlobalLeaf=3.
[0187] Step 2: The network node device receives the tree establishment request and performs the following processing:
[0188] Sub-step 1: parse the tree building request message, and use the value of the task identification field in the tree building request to query the tree building information table to determine whether there is a related tree building entry. If the related tree building entry exists, query whether the value of the network hop count in the related tree building entry is the same as the value of the network hop count field in the tree building request. If they are the same, continue counting based on the tree building request counter of the tree building entry. If they are different, create a new tree building entry. If the tree building entry does not exist, create a new tree building entry. In the case of creating a new tree building entry, the value of the task identification field and the value of the network hop count field in the tree building request are recorded in the new tree entry, and the tree building request counter and the child node mapping are initialized to all 0.
[0189] Sub-step 2: Establish an inbound port for the request message.
[0190] Sub-step three, determine whether the tree establishment request message is a duplicate message. According to the determined inbound port of the tree establishment request message, determine the bit mapped by the port in the child node mapping. If the value of the bit in the child node mapping indicates that the port has received the tree establishment request message, the current message is a duplicate message, and the current message is discarded without performing subsequent steps; if the value of the bit in the child node mapping indicates that the port has not received the tree establishment request message, the value of the bit in the child node mapping is updated.
[0191] Sub-step 4: Update the tree request counter. If the value of the network hop count field in the tree request is Hop=0, the tree request is a non-aggregate tree request, and the value of the tree request counter is increased by 1; if the value of the network hop count field in the tree request is Hop>0, the tree request is an aggregate tree request, and the value of the tree request counter is increased by the value of the aggregate leaf node field in the tree request, AggLeaf=3.
[0192] Sub-step five, compare the relationship between the value of the tree building request counter and the number of leaf nodes of the node to determine whether the tree building requests from all child nodes have been collected. First, according to the type of tree building request, determine the number of leaf nodes included in the ToR corresponding node. If the value of the network node number field Hop=0, it is a non-aggregate tree building request, and the number of leaf nodes included in the ToR corresponding node is equal to the value of the aggregation leaf node field AggLeaf; if the value of the network node number field Hop>0, it is a convergence tree building request, and the number of leaf nodes included in the ToR corresponding node is equal to the value of the aggregation leaf node field GlobalLeaf. Then compare the relationship between the value of the tree building request counter and the number of leaf nodes included in the ToR corresponding node. If it is less than, continue to wait for other tree building requests and do not proceed to subsequent steps for the time being; if it is greater than, the message is wrong, the message is discarded and the tree building information is deleted, and the subsequent steps are terminated; if it is equal, the current ToR has collected all the tree building requests from child nodes and continues to subsequent steps.
[0193] Sub-step six, compare the value of the tree building request counter with the value of the global leaf node field GlobalLeaf in the tree building request to determine whether the current ToR is the root node of the task tree. If the value of the tree building request counter is less than the value of the global leaf node field GlobalLeaf, the current ToR is not the root node, and the tree building request continues to be actively sent to the high-level network node device; if the value of the tree building request counter is greater than the value of the global leaf node field GlobalLeaf, the message is wrong, the message is discarded and the tree building information is deleted, and the subsequent steps are terminated; if the value of the tree building request counter is equal to the value of the global leaf node field GlobalLeaf, the current ToR is the root node and the tree building is successful, and the tree building success information is sent to the child node according to the path port indicated by the child node mapping.
[0194] Since the logical tree to be established in this embodiment is a single-layer tree, that is, a logical tree with a depth of 1, AggLeaf = GlobalLeaf. After the ToR collects all the tree establishment requests, the tree establishment process ends. After the computing node device receives the successful tree establishment information, it enters the network computing data processing process. After the calculation is completed, the tree establishment information is deleted to release the resources of the network node device.
[0195] Fig.13 This is a schematic diagram of Example 2, which is a two-layer logic tree established with the spine switch (spine) as the root node. Fig.13 The left side is the structure diagram of the logical tree to be established, and the right side is the mapping relationship between the network node device and the computing node device according to the network topology of the logical tree to be established. Among them, ToR is a network node device, spine is a higher-level network node device in the topology structure, and w1 to w6 represent six computing node devices. The tree building process is as follows.
[0196] Step 1: The computing node device initiates a tree building request. w1, w2, and w3 can obtain the address of ToR 1 through the configuration file, and w4, w5, and w6 can obtain the address of ToR 2 through the configuration file, thereby sending a tree building request to the ToR. In the tree building request message sent by w1, w2, w3, w4, w5, and w6, the value of the network hop number field is Hop=0, the value of the aggregation leaf node field is AggLeaf=3, and the value of the global leaf node field is GlobalLeaf=6.
[0197] Step 2: ToR 1 and ToR 2 receive their own tree building requests and process them respectively. The processing flow can refer to step 2 in embodiment 1, which will not be repeated here.
[0198] In step three, ToR 1 and ToR 2 send tree building requests to the spine respectively. The difference from embodiment 1 is that after ToR collects all three tree building requests, since GlobalLeaf=6, it is determined that it is not the root node, so it continues to send tree building requests to the spine at a higher level. The address of the spine can be obtained by ToR through the configuration file or through out-of-band communication. Before sending the tree building request, ToR will also update the value of the network hop number field in the tree building request and increase it by 1. Therefore, in the tree building requests sent by ToR 1 and ToR 2 to the spine, the value of the network hop number field is Hop=1, the value of the aggregation leaf node field is AggLeaf=3, and the value of the global leaf node field is GlobalLeaf=6.
[0199] Step 4: Spine receives the tree building request and processes it. The method for spine to process the tree building request is the same as that for ToR, and the specific description of step 2 in embodiment 1 can also be referred to, which will not be repeated here.
[0200] Step 5: ToR 1 and ToR 2 receive the successful establishment information sent by the spine, determine the port that receives the successful establishment information, record it as the parent node mapping, and continue to pass the successful establishment information to the child node, and the establishment process ends. After the computing node device receives the successful establishment information, it enters the network computing data processing process, deletes the establishment information after the calculation is completed, and releases the resources of the network node device.
[0201] In summary, the method for establishing a logic tree provided in the embodiment of the present application can realize distributed dynamic tree building. Compared with centralized static tree building, on the one hand, it can overcome single point failures, and on the other hand, it does not require resources to be reserved in advance, which can improve the reliability of distributed computing clusters to establish logic trees and reduce the utilization rate of network node device resources.
[0202] Combination of the above Figures 2 to 13 The method embodiment of establishing a logic tree provided by the present application is described below. Figures 14 to 17, an embodiment of the device for establishing a logic tree provided in this application is described.
[0203] Fig.14 FIG. 1 shows a schematic structural block diagram of a network node device 1400 for establishing a logic tree provided in an embodiment of the present application. Fig.14 As shown, the network node device 1400 includes: an acquisition module 1410, an update module 1420, and a determination module 1430.
[0204] Specifically, the acquisition module 1410 is used to obtain a first tree building request initiated by a first computing node device among multiple computing node devices, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node among all ancestor nodes in the first logical tree, the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, and the first leaf node is the node corresponding to the first computing node device in the first logical tree.
[0205] Optionally, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0206] Optionally, the acquisition module 1410 is specifically configured to receive a first tree building request sent by a first computing node device, wherein the first network node device is connected to the first computing node device.
[0207] Optionally, the acquisition module 1410 is specifically used to receive a first tree building request sent by a third network node device, the third network node device is a network node device among at least one network node device connected to the first network node device, and the first tree building request is received by the third network node device from the first computing node device or a network node device connected to the third network node device.
[0208] Optionally, the acquisition module 1410 is specifically used to acquire a first data message, where the first data message includes a first tree building request, and the first data message is used to transmit data of a computing task within the network.
[0209] Specifically, the updating module 1420 is used to update the value of the tree building request counter corresponding to the first logical tree in the tree building information table according to the first tree building request, and the tree building request counter is used to indicate the number of tree building requests initiated by different computing node devices among multiple computing node devices received by the first network node device.
[0210] Optionally, the update module 1420 is specifically used to increase the value of the tree building request counter by 1 when the value of the network hop number field of the first tree building request is equal to 0; and to increase the value of the tree building request counter by the value of the Mth leaf node number field among the N leaf node number fields of the first tree building request when the value of the network hop number field of the first tree building request is equal to M, where M is a positive integer less than N.
[0211] Optionally, the tree building information table also includes a network hop count corresponding to a tree building request counter, and the network hop count is used to indicate the value of a network hop count field in a tree building request initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received. The update module 1420 is specifically used to update the value of the tree building request counter when the value of the network hop count field in the first tree building request is equal to the value of the network hop count.
[0212] Optionally, the tree building information table also includes a sub-node mapping corresponding to the tree building request counter, and the sub-node mapping is used to indicate a port in at least one port of the first network node device for receiving tree building requests initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree building request counter has received. The update module 1420 is specifically used to determine the first port of the first network node device for receiving the first tree building request; when the sub-node mapping indicates that the first port has not received the tree building request, the value of the tree building request counter and the sub-node mapping are updated.
[0213] Optionally, the first tree building request also includes a task identification field, which is used to indicate the first in-network computing task for the first logical tree to perform in-network computing. The tree building information table also includes a task identification corresponding to the tree building request counter, and the task identification is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among multiple computing node devices that have been received by the first network node device indicated by the tree building request counter. The update module 1420 is specifically used to update the value of the tree building request counter when the value of the task identification field in the first tree building request is equal to the value of the task identification.
[0214] Specifically, the determination module 1430 is used to determine the tree building result according to the tree building request counter and a first threshold, wherein the first threshold is the number of leaf nodes of the ancestor node of the first leaf node corresponding to the first network node device.
[0215] Optionally, the first threshold is equal to the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request, K is the value of the network hop number field of the first tree building request, and K is a positive integer less than N. The determination module 1430 is specifically used to determine that the first logical tree is completed on the node corresponding to the first network node device when the value of the new tree request counter is equal to the first threshold; when the value of the new tree request counter is greater than the first threshold, delete the tree building information corresponding to the first tree building request; when the value of the new tree request counter is less than the first threshold, wait to receive other tree building requests to determine the tree building result.
[0216] Optionally, when the value of the new tree request counter is equal to a first threshold, the determination module 1430 is also used to forward the first tree building success information according to the path of forwarding the first tree building request to the first network node device when the value of the new tree request counter is equal to a second threshold, wherein the second threshold is the total number of leaf nodes in the first logical tree, and the second threshold is equal to the value of the Nth leaf node number field among the N leaf node number fields of the first tree building request; when the value of the new tree request counter is greater than the second threshold, delete the tree building information corresponding to the first tree building request; when the value of the new tree request counter is less than the first threshold, determine the tree building result according to the tree building result of the second network node device, wherein the second network node device is a network node device connected to the first network node device among at least one network node device.
[0217] Optionally, the determination module 1430 is specifically used to increase the value of the network hop number field of the first tree establishment request by 1 to update the first tree establishment request; send the updated first tree establishment request to the second network node device; receive the second tree establishment success information sent by the second network node device; and forward the second tree establishment success information according to the path forwarded from the first tree establishment request to the first network node device.
[0218] Optionally, after receiving the second tree establishment success information sent by the second network node device, the determination module 1430 is also used to add a parent node mapping corresponding to the tree establishment request counter in the tree establishment information table, and the parent node mapping is used to indicate the port information used by the first network node device to connect to the second network node device.
[0219] Optionally, the first tree building request is initiated by the first computing node device when the first network computing task starts. The determination module 1430 is also used for the first network node device to delete the tree building information corresponding to the task identifier indicating the first network computing task in the tree building information table after the first network computing task is completed.
[0220] Among them, the above modules can be implemented by software or by hardware. Exemplarily, the implementation of the determination module 1430 is introduced by taking the determination module 1430 as an example. Similarly, the implementation of the acquisition module 1410 and the update module 1420 can refer to the implementation of the determination module 1430.
[0221] As an example of a software functional unit, the module 1430 can include code running on a computing instance. Among them, the computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance can be one or more. For example, the module 1430 can include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region can include multiple AZs.
[0222] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0223] As an example of a hardware functional unit, the determination module 1430 may include at least one computing device, such as a server, etc. Alternatively, the determination module 1430 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0224] The multiple computing devices included in the determination module 1430 may be distributed in the same region or in different regions. The multiple computing devices included in the determination module 1430 may be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the determination module 1430 may be distributed in the same VPC or in multiple VPCs. The multiple computing devices may be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0225] It should be noted that, in other embodiments, the acquisition module 1410, the update module 1420 and the determination module 1430 can be used to execute any step in the above-mentioned method of establishing a logical tree, and the steps that the acquisition module 1410, the update module 1420 and the determination module 1430 are responsible for implementing can be specified as needed. The full functions of the network node device 1400 are realized by respectively implementing different steps in the above-mentioned method of establishing a logical tree through the acquisition module 1410, the update module 1420 and the determination module 1430.
[0226] Fig.15 FIG. 1 shows a schematic structural block diagram of a computing node device 1500 for establishing a logic tree provided in an embodiment of the present application. Fig.15 As shown, the computing node device 1500 includes: a sending module 1510 .
[0227] Specifically, the sending module 1510 is used to send a first tree building request to the fourth network node device, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node among all ancestor nodes in the first logical tree, the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, the first leaf node is the node corresponding to the first computing node device in the first logical tree, and the fourth network node device is a network node device connected to the first computing node device among at least one network node device.
[0228] Optionally, the first tree building request includes a network hop number field, which is used to indicate the number of network node devices that have been passed on the forwarding path of the first tree building request. The value of the network hop number field in the first tree building request sent by the first computing node device to the fourth network node device is 0. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, and N is a positive integer. The nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
[0229] Optionally, the first tree building request includes a task identification field, and the task identification field is used to indicate a first in-network computing task of the in-network computing to be executed by the first logical tree.
[0230] Optionally, the sending module 1510 is specifically configured to send a first tree building request to the fourth network node device when the first intra-network computing task starts.
[0231] Optionally, the sending module 1510 is specifically used to send a first data message to the fourth network node device, where the first data message includes a first tree building request, and the first data message is used to transmit data of a computing task within the network.
[0232] The sending module 1510 may also be implemented by software or hardware.
[0233] Fig.16 FIG. 1 shows a schematic structural block diagram of a system 1600 for establishing a logic tree provided in an embodiment of the present application. Fig.16 As shown, the system includes at least one network node device and multiple computing node devices. The network node device included in the system may be, for example, Fig.14 The network node device 1400 shown in the figure can implement the method for establishing a logical tree provided in the embodiment of the present application. The computing node device included in the system can be, for example, Fig.15 The computing node device 1500 shown in the figure can implement the method for establishing a logical tree provided in the embodiment of the present application.
[0234] The present application also provides a computing device 100. Fig.17 As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.
[0235] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.17 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).
[0236] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0237] The memory 106 may include a volatile memory, such as a random access memory (RAM). The memory 106 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0238] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the acquisition module, the update module, and the determination module, or implement the function of the sending module, thereby implementing the method for establishing the logic tree. That is, the memory 106 stores instructions for executing the method for establishing the logic tree.
[0239] The communication interface 108 uses a command distribution module such as, but not limited to, a network interface card, a transceiver, etc. to implement communication between the computing device 100 and other devices or a communication network.
[0240] An embodiment of the present application further provides a chip, which includes a processor and a data interface. The processor reads instructions stored in a memory through the data interface to execute the above-mentioned method for establishing a logic tree.
[0241] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the above method for establishing a logic tree.
[0242] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by the computing device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid-state hard disk), etc. The computer-readable storage medium includes instructions, and the instructions instruct the computing device to perform the above-mentioned management. The various technical features can be combined arbitrarily. In order to make the description concise, all possible combinations of the various technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0243] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for establishing a logic tree, characterized in that: The method is applied to a first network node device in a distributed computing cluster, the distributed computing cluster includes multiple computing node devices and at least one network node device, the first network node device is one of the at least one network node device, and the method includes: The first network node device obtains a first tree building request initiated by a first computing node device among the multiple computing node devices, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node in all ancestor nodes in the first logical tree, the first logical tree is a logical tree established by the distributed computing cluster indicated by the first tree building request, and the first leaf node is a node corresponding to the first computing node device in the first logical tree; The first network node device updates, according to the first tree building request, a value of a tree building request counter corresponding to the first logical tree in a tree building information table, wherein the tree building request counter is used to indicate the number of tree building requests initiated by different computing node devices among the multiple computing node devices and received by the first network node device; The first network node device determines a tree building result according to the tree building request counter and a first threshold, wherein the first threshold is the number of leaf nodes of the ancestor node of the first leaf node corresponding to the first network node device.
2. The method according to claim 1, characterized in that The first tree building request includes a network hop number field, and the network hop number field is used to indicate the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, N is a positive integer, and the nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
3. The method according to claim 2, characterized in that The updating, according to the first tree building request, a value of a tree building request counter corresponding to the first logical tree in the tree building information table includes: When the value of the network hop count field of the first tree establishment request is equal to 0, increasing the value of the tree establishment request counter by 1; When the value of the network hop number field of the first tree building request is equal to M, and M is a positive integer less than N, the value of the tree building request counter is increased by the value of the Mth leaf node number field among the N leaf node number fields of the first tree building request.
4. The method according to claim 2 or 3, characterized in that: The tree establishment information table also includes a network hop number corresponding to the tree establishment request counter, and the network hop number is used to indicate a value of a network hop number field in a tree establishment request initiated by different computing node devices among the multiple computing node devices and received by the first network node device indicated by the tree establishment request counter. The updating of the value of the tree establishment request counter in the tree establishment information table according to the first tree establishment request includes: When the value of the network hop count field of the first tree establishment request is equal to the value of the network hop count, the value of the tree establishment request counter is updated.
5. The method according to any one of claims 2 to 4, characterized in that The first threshold is equal to the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request, K is the value of the network hop number field of the first tree building request, and K is a positive integer less than N. The determining the tree building result according to the tree building request counter and the first threshold includes: When the value of the new tree request counter is equal to the first threshold, determining that the first logical tree is built on the node corresponding to the first network node device; When the value of the new tree creation request counter is greater than the first threshold, deleting the tree creation information corresponding to the first tree creation request; When the value of the new tree creation request counter is less than the first threshold, wait for receiving other tree creation requests to determine the tree creation result.
6. The method according to claim 5, characterized in that When the value of the new tree request counter is equal to the first threshold, the method further includes: When the value of the new tree creation request counter is equal to a second threshold, forwarding first tree creation success information according to the path of forwarding the first tree creation request to the first network node device, wherein the second threshold is the total number of leaf nodes in the first logical tree, and the second threshold is equal to the value of the Nth leaf node number field in the N leaf node number fields of the first tree creation request; When the value of the new tree creation request counter is greater than the second threshold, deleting the tree creation information corresponding to the first tree creation request; When the value of the new tree request counter is less than the first threshold, the tree building result is determined according to the tree building result of a second network node device, wherein the second network node device is a network node device connected to the first network node device among the at least one network node device.
7. The method according to claim 6, characterized in that The determining the tree establishment result according to the tree establishment result of the second network node device includes: Increasing the value of the network hop count field of the first tree creation request by 1 to update the first tree creation request; Sending an updated first tree establishment request to the second network node device; Receiving second tree establishment success information sent by the second network node device; The second tree building success information is forwarded according to the path through which the first tree building request is forwarded to the first network node device.
8. The method according to claim 7, characterized in that After receiving the second tree establishment success information sent by the second network node device, the method further includes: A parent node mapping corresponding to the tree building request counter is added to the tree building information table, where the parent node mapping is used to indicate port information used by the first network node device to connect to the second network node device.
9. The method according to any one of claims 1 to 8, characterized in that The tree establishment information table also includes a sub-node mapping corresponding to the tree establishment request counter, the sub-node mapping is used to indicate a port in at least one port of the first network node device for receiving a tree establishment request initiated by different computing node devices among the multiple computing node devices that the first network node device has received indicated by the tree establishment request counter, and updating the value of the tree establishment request counter in the tree establishment information table according to the first tree establishment request includes: Determine a first port on which the first network node device receives the first tree building request; In a case where the child node mapping indicates that the first port has not received the tree establishment request, the value of the tree establishment request counter and the child node mapping are updated.
10. The method according to any one of claims 1 to 9, characterized in that The first tree building request also includes a task identification field, the task identification field is used to indicate a first in-network computing task for in-network computing to be performed by the first logical tree, the tree building information table also includes a task identification corresponding to the tree building request counter, the task identification is used to indicate the value of the task identification field in the tree building request initiated by different computing node devices among the multiple computing node devices and received by the first network node device indicated by the tree building request counter, and updating the value of the tree building request counter in the tree building information table according to the first tree building request includes: When the value of the task identifier field of the first tree building request is equal to the value of the task identifier, the value of the tree building request counter is updated.
11. The method according to claim 10, characterized in that The first tree building request is initiated by the first computing node device when the first intra-network computing task starts. The method further includes: After the first in-network computing task is completed, the first network node device deletes the tree building information corresponding to the task identifier indicating the first in-network computing task in the tree building information table.
12. The method according to any one of claims 1 to 11, characterized in that The obtaining of a first tree building request initiated by a first computing node device among the multiple computing node devices includes: The first tree building request sent by the first computing node device is received, wherein the first network node device is connected to the first computing node device.
13. The method according to any one of claims 1 to 11, characterized in that The obtaining of a first tree building request initiated by a first computing node device among the multiple computing node devices includes: Receive the first tree building request sent by a third network node device, wherein the third network node device is a network node device connected to the first network node device among the at least one network node device, and the first tree building request is received by the third network node device from the first computing node device or a network node device connected to the third network node device.
14. The method according to any one of claims 1 to 13, characterized in that The obtaining of a first tree building request initiated by a first computing node device among the multiple computing node devices includes: A first data packet is obtained, where the first data packet includes the first tree building request, and the first data packet is used to transmit data of a computing task within the network.
15. A method for establishing a logic tree, characterized in that: The method is applied to a first computing node device in a distributed computing cluster, the distributed computing cluster includes multiple computing node devices and at least one network node device, the first computing node device is one of the multiple computing node devices, and the method includes: The first computing node device sends a first tree building request to the fourth network node device, the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node among all ancestor nodes in the first logical tree, the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, the first leaf node is the node corresponding to the first computing node device in the first logical tree, and the fourth network node device is a network node device connected to the first computing node device among the at least one network node device.
16. The method according to claim 15, characterized in that The first tree building request includes a network hop number field, where the network hop number field is used to indicate the number of network node devices that have been passed through on the forwarding path of the first tree building request. The value of the network hop number field in the first tree building request sent by the first computing node device to the fourth network node device is 0. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, N is a positive integer, and the nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
17. The method according to claim 15 or 16, characterized in that The first tree building request includes a task identification field, and the task identification field is used to indicate a first in-network computing task for in-network computing to be executed by the first logical tree.
18. The method according to claim 17, characterized in that The sending a first tree establishment request to the fourth network node device includes: When the first in-network computing task starts, a first tree establishment request is sent to the fourth network node device.
19. The method according to any one of claims 15 to 18, characterized in that The sending a first tree establishment request to the fourth network node device includes: A first data packet is sent to the fourth network node device, wherein the first data packet includes the first tree building request, and the first data packet is used to transmit data of a computing task within the network.
20. A network node device for establishing a logical tree, characterized in that: The network node device is a first network node device in a distributed computing cluster, the distributed computing cluster includes multiple computing node devices and at least one network node device, the first network node device is one of the at least one network node device, and the network node device includes: an acquisition module, configured to acquire a first tree building request initiated by a first computing node device among the multiple computing node devices, wherein the first tree building request is used to indicate the number of leaf nodes of each ancestor node of a first leaf node among all ancestor nodes in a first logical tree, wherein the first logical tree is a logical tree established by the distributed computing cluster as indicated by the first tree building request, and the first leaf node is a node corresponding to the first computing node device in the first logical tree; an updating module, configured to update, according to the first tree building request, a value of a tree building request counter corresponding to the first logical tree in a tree building information table, wherein the tree building request counter is used to indicate the number of tree building requests initiated by different computing node devices among the multiple computing node devices and received by the first network node device; The determination module is used to determine the tree building result according to the tree building request counter and a first threshold, wherein the first threshold is the number of leaf nodes of the ancestor node of the first leaf node corresponding to the first network node device.
21. The network node device according to claim 20, characterized in that: The first tree building request includes a network hop number field, and the network hop number field is used to indicate the number of network node devices other than the first network node device on the forwarding path through which the first tree building request is forwarded from the first computing node device to the first network node device. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, N is a positive integer, and the nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
22. The network node device according to claim 21, characterized in that: The update module is used to: When the value of the network hop count field of the first tree establishment request is equal to 0, increasing the value of the tree establishment request counter by 1; When the value of the network hop number field of the first tree building request is equal to M, and M is a positive integer less than N, the value of the tree building request counter is increased by the value of the Mth leaf node number field among the N leaf node number fields of the first tree building request.
23. The network node device according to claim 21 or 22, characterized in that: The tree building information table also includes a network hop number corresponding to the tree building request counter, where the network hop number is used to indicate a value of a network hop number field in a tree building request initiated by different computing node devices among the multiple computing node devices and received by the first network node device indicated by the tree building request counter. The updating module is used to: When the value of the network hop count field of the first tree establishment request is equal to the value of the network hop count, the value of the tree establishment request counter is updated.
24. The network node device according to any one of claims 21 to 23, characterized in that: The first threshold is equal to the value of the K+1th leaf node number field among the N leaf node number fields of the first tree building request, K is the value of the network hop number field of the first tree building request, K is a positive integer less than N, and the determining module is used to: When the value of the new tree request counter is equal to the first threshold, determining that the first logical tree is built on the node corresponding to the first network node device; When the value of the new tree creation request counter is greater than the first threshold, deleting the tree creation information corresponding to the first tree creation request; When the value of the new tree creation request counter is less than the first threshold, wait for receiving other tree creation requests to determine the tree creation result.
25. The network node device according to claim 24, characterized in that: When the value of the new tree request counter is equal to the first threshold, the determining module is further used to: When the value of the new tree creation request counter is equal to a second threshold, forwarding first tree creation success information according to the path of forwarding the first tree creation request to the first network node device, wherein the second threshold is the total number of leaf nodes in the first logical tree, and the second threshold is equal to the value of the Nth leaf node number field in the N leaf node number fields of the first tree creation request; When the value of the new tree creation request counter is greater than the second threshold, deleting the tree creation information corresponding to the first tree creation request; When the value of the new tree request counter is less than the first threshold, the tree building result is determined according to the tree building result of a second network node device, wherein the second network node device is a network node device connected to the first network node device among the at least one network node device.
26. The network node device according to claim 25, characterized in that: The determining module is used to: Increasing the value of the network hop count field of the first tree creation request by 1 to update the first tree creation request; Sending an updated first tree establishment request to the second network node device; Receiving second tree establishment success information sent by the second network node device; The second tree building success information is forwarded according to the path through which the first tree building request is forwarded to the first network node device.
27. The network node device according to claim 26, characterized in that: After receiving the second tree establishment success information sent by the second network node device, the determining module is further used to: A parent node mapping corresponding to the tree building request counter is added to the tree building information table, where the parent node mapping is used to indicate port information used by the first network node device to connect to the second network node device.
28. The network node device according to any one of claims 20 to 27, characterized in that: The tree building information table also includes a sub-node mapping corresponding to the tree building request counter, the sub-node mapping is used to indicate a port in at least one port of the first network node device for receiving tree building requests initiated by different computing node devices among the multiple computing node devices that the first network node device has received as indicated by the tree building request counter, and the updating module is used to: Determine a first port on which the first network node device receives the first tree building request; In a case where the child node mapping indicates that the first port has not received the tree establishment request, the value of the tree establishment request counter and the child node mapping are updated.
29. The network node device according to any one of claims 20 to 28, characterized in that: The first tree building request further includes a task identification field, the task identification field is used to indicate a first in-network computing task for in-network computing to be performed by the first logical tree, the tree building information table further includes a task identification corresponding to the tree building request counter, the task identification is used to indicate the value of the task identification field in the tree building request initiated by different computing node devices among the multiple computing node devices and received by the first network node device indicated by the tree building request counter, and the updating module is used to: When the value of the task identifier field of the first tree building request is equal to the value of the task identifier, the value of the tree building request counter is updated.
30. The network node device according to claim 29, characterized in that: The first tree building request is initiated by the first computing node device when the first intra-network computing task starts, and the determining module is further used for: After the first in-network computing task is completed, the first network node device deletes the tree building information corresponding to the task identifier indicating the first in-network computing task in the tree building information table.
31. The network node device according to any one of claims 20 to 30, characterized in that: The acquisition module is used to: The first tree building request sent by the first computing node device is received, wherein the first network node device is connected to the first computing node device.
32. The network node device according to any one of claims 20 to 30, characterized in that: The acquisition module is used to: Receive the first tree building request sent by a third network node device, wherein the third network node device is a network node device connected to the first network node device among the at least one network node device, and the first tree building request is received by the third network node device from the first computing node device or a network node device connected to the third network node device.
33. The network node device according to any one of claims 20 to 32, characterized in that: The acquisition module is used to: A first data packet is obtained, where the first data packet includes the first tree building request, and the first data packet is used to transmit data of a computing task within the network.
34. A computing node device for establishing a logic tree, characterized in that: The computing node device is a first computing node device in a distributed computing cluster, the distributed computing cluster includes multiple computing node devices and at least one network node device, the first computing node device is one of the multiple computing node devices, and the computing node device includes: A sending module is used to send a first tree building request to a fourth network node device, wherein the first tree building request is used to indicate the number of leaf nodes of each ancestor node of the first leaf node among all ancestor nodes in the first logical tree, the first logical tree is the logical tree established by the distributed computing cluster indicated by the first tree building request, the first leaf node is the node corresponding to the first computing node device in the first logical tree, and the fourth network node device is a network node device connected to the first computing node device among the at least one network node device.
35. The computing node device according to claim 34, characterized in that: The first tree building request includes a network hop number field, where the network hop number field is used to indicate the number of network node devices that have been passed through on the forwarding path of the first tree building request. The value of the network hop number field in the first tree building request sent by the first computing node device to the fourth network node device is 0. The first tree building request also includes N leaf node number fields, where N is the height of the root node in the first logical tree, N is a positive integer, and the nth leaf node number field among the N leaf node number fields is used to indicate the number of leaf nodes of the ancestor node with a height of n of the first leaf node in the first logical tree, and n is a positive integer less than or equal to N.
36. The computing node device according to claim 34 or 35, characterized in that: The first tree building request includes a task identification field, and the task identification field is used to indicate a first in-network computing task for in-network computing to be executed by the first logical tree.
37. The computing node device according to claim 36, characterized in that: The sending module is used for: When the first in-network computing task starts, a first tree establishment request is sent to the fourth network node device.
38. The computing node device according to any one of claims 34 to 37, characterized in that: The sending module is used for: A first data packet is sent to the fourth network node device, wherein the first data packet includes the first tree building request, and the first data packet is used to transmit data of a computing task within the network.
39. A system for establishing a logic tree, characterized in that: It comprises at least one network node device and a plurality of computing node devices, wherein the at least one network node device is used to execute the method as claimed in any one of claims 1 to 14, and the plurality of computing node devices are used to execute the method as claimed in any one of claims 15 to 19.
40. A computing device, characterized in that The method comprises a processor and a memory, wherein the processor is configured to execute instructions stored in the memory, so that the computing device executes the method according to any one of claims 1 to 14, or executes the method according to any one of claims 15 to 19.
41. A computer-readable storage medium, characterized in that The method comprises computer program instructions, which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 14, or to perform the method according to any one of claims 15 to 19.
Citation Information
Cited By
Logic tree building method, network node device, computing node device, and system
EP4745772A1
Logic tree building method, network node device, computing node device, and system
WO2025035842A1