Logic tree building method, network node device, computing node device, and system

By initiating tree building requests for computing node equipment and carrying structural information, combined with the statistical mechanism of network node equipment, the poor scalability and fault reliability of logical tree establishment in traditional solutions are solved, and higher resource utilization and logical tree reliability are achieved sex.

WO2025035842A1PCT designated stage expired Publication Date: 2025-02-20HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/091376
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-14
Filing Date
2024-05-07
Publication Date
2025-02-20

AI Technical Summary

Technical Problem

In traditional solutions, the establishment of the logic tree is responsible for a specific node, which leads to poor scalability and low resource utilization, and is prone to failure of the in-network computing capabilities of the entire cluster due to single point failure and poor fault reliability.

Method used

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.

Benefits of technology

It avoids the failure of the entire logic tree due to the failure of the equipment of a single network node, improves the reliability of the logical tree established by a distributed computing cluster, reduces the reservation and occupation of resources, and improves the utilization rate of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091376_20022025_PF_FP_ABST
    Figure CN2024091376_20022025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of computers, and provides a logic tree building method, a network node device, a computing node device, and a system. The method comprises: a first network node device acquiring a first tree building request initiated by a first computing node device among a plurality of computing node devices; the first network node device updating, on the basis of the first tree building request, the value of a tree building request counter corresponding to a first logic tree in a tree building information table; and the first network node device determining a tree building result on the basis of the tree building request counter and a first threshold. According to the method, a tree building request is initiated by a computing node device at the edge, and includes structure information of nodes on a logic tree branch where the computing node device is located, and a network node device counts the number of tree building requests aggregated by corresponding nodes thereof in the logic tree, thereby reducing the impact of single-point failures, and improving the reliability of building a logic tree in a distributed computing cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Method for establishing logic tree, network node device, computing node device and system

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on August 14, 2023, with application number 202311021621.3 and application name “Method, network node device, computing node device and system for establishing a logical tree”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] 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

[0003] As data and computational scale grow, the computing power of a single compute node can no longer meet the demands of data processing. Therefore, distributed computing, which leverages the collaborative computing of multiple compute nodes, has become a trend. After computing tasks are assigned to multiple compute nodes, these nodes need to communicate the results (i.e., communication tasks). As the scale of distributed computing clusters increases, the time spent on communication tasks increases, becoming a bottleneck that limits the speed of distributed computing.

[0004] In-network computing (INC) technology enables network nodes in a distributed computing cluster to perform specific calculations on message fields while forwarding them, thereby offloading some computing tasks to the network nodes. This alleviates communication bottlenecks in distributed computing. In-network computing tasks require establishing a logical tree consisting of compute and network nodes, which is then used to aggregate data and broadcast computational results.

[0005] In traditional solutions, the establishment of a logical tree is the responsibility of a specific node, such as an aggregation manager (AM). Based on the physical topology of the distributed computing cluster, the AM establishes the logical tree in advance and reserves the corresponding resources. Before the on-line computing task begins, it allocates a subtree of the logical tree for on-line computing. However, centralized establishment of the logical tree by a specific node in advance suffers from poor scalability and low resource utilization. More importantly, a single point failure of that node can easily render the entire cluster's on-line computing capabilities ineffective, resulting in poor reliability. Therefore, improving the reliability of logical tree establishment in distributed computing clusters has become a technical problem that urgently needs to be addressed.

[0006] Summary of the Invention

[0007] An embodiment of the present application provides 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 establishment request and carries the structural information of the node on the logical tree branch where it 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 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 the distributed computing cluster in establishing the logical tree.

[0008] In a first aspect, a method for establishing a logical tree is provided, which is applied to a first network node device in a distributed computing cluster, wherein 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 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 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; 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, 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; the first network node device determines 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.

[0009] 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.

[0010] Optionally, the tree building request indicates that leaf nodes in the built logical tree have the same depth.

[0011] According to the technical solution provided by the present application, a tree-building request is initiated by the 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 the entire logical tree due to the failure of a single network node device, and improving the reliability of the distributed computing cluster in establishing the logical tree.

[0012] 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, 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, where n is a positive integer less than or equal to N.

[0013] According to the above technical solution, by indicating the number of network node devices that have passed on its 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 based on any tree building request it receives.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the value of the tree construction request counter corresponding to the first logical tree in the tree construction information table is updated according to the first tree construction request, including: when the value of the network hop number field of the first tree construction request is equal to 0, the value of the tree construction request counter is increased by 1; when the value of the network hop number field of the first tree construction request is equal to M, and M is a positive integer less than N, the value of the tree construction 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 construction request.

[0015] According to the above technical solution, the network node device can determine the type of tree building request based on the number of network hops. When the tree building request is obtained directly from a directly connected computing node device, it can be determined that the tree building request only includes the tree building request of one leaf node. When the tree building request is forwarded through 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 based only on the requests sent by the connected devices, thereby decoupling the tree building process from the topology and providing distributed tree building capabilities.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the tree establishment information table also includes a network hop count corresponding to a tree establishment request counter, and the network hop count is used to indicate the value of a network hop count field in a tree establishment request initiated by different computing node devices among multiple computing node devices that has been received by the first network node device indicated by the tree establishment request counter. According to the first tree establishment request, the value of the tree establishment request counter in the tree establishment information table is updated, including: 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.

[0017] According to the above technical solution, 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.

[0018] 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 based on 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.

[0019] According to the above technical solution, the network node device can determine the number of leaf nodes included in its 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, so that the network node device can determine whether the tree building requests of all child nodes have been collected based on the number of leaf nodes, without knowing the number of child nodes directly connected to it, so that each node in the logical tree 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.

[0020] 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 in 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.

[0021] According to the above technical solution, after the network node device collects all the tree-building requests of the 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 computational and space complexity, and improving the scalability of the logical tree.

[0022] In combination with the first aspect, in certain implementations of the first aspect, the tree establishment result is determined based on the 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 the second tree establishment success information sent by the second network node device; and forwarding the second tree establishment success information based on the path forwarded from the first tree establishment request to the first network node device.

[0023] According to the above technical solution, when a network node device forwards a tree establishment request to a next-hop network node device, it only needs to update the number of network hops in the tree establishment request, without updating other information in the tree establishment request or initiating a new tree establishment request, thereby improving the forwarding efficiency of the tree establishment request and improving the scalability of the logical tree.

[0024] 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 with the second network node device.

[0025] 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.

[0026] In combination with the first aspect, in certain implementations of the first aspect, the tree establishment information table also includes a sub-node mapping corresponding to a tree establishment 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 establishment requests initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree establishment request counter has received. According to the first tree establishment request, the value of the tree establishment request counter in the tree establishment information table is updated, including: determining the first port of the first network node device that receives the first tree establishment request; and when the sub-node mapping indicates that the first port has not received the tree establishment request, updating the value of the tree establishment request counter and the sub-node mapping.

[0027] 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 logical tree building.

[0028] In combination with the first aspect, in certain implementations of the first 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 the tree building request counter, which is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among the multiple computing node devices that have been received by the first network node device indicated by the tree building request counter. 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.

[0029] 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.

[0030] In combination with the first aspect, in certain implementations of the first aspect, the first tree establishment request is initiated by the first computing node device when the first network computing task begins. The method also includes: after the first network computing task is completed, the first network node device deletes the tree establishment information corresponding to the task identifier indicating the first network computing task in the tree establishment information table.

[0031] 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.

[0032] In combination with the first aspect, in some implementations of the first aspect, obtaining a first tree establishment request initiated by a first computing node device among multiple computing node devices includes: receiving the first tree establishment request sent by the first computing node device, wherein the first network node device is connected to the first computing node device.

[0033] 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.

[0034] 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 applicability of the logic tree building method.

[0035] In combination with the first aspect, in some implementations of the first aspect, obtaining a first tree establishment 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 establishment request, and the first data packet is used to transmit data of computing tasks within the network.

[0036] According to the above technical solution, by including the tree establishment 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.

[0037] In a second aspect, a method for establishing a logical tree is provided, which is applied to a 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, and the first computing node device is one of the multiple computing node devices. The method includes: the first computing node device sends a first tree establishment request to the fourth network node device, and the first tree establishment 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 as instructed by the first tree establishment request, and the first leaf node is a node corresponding to the first computing node device in the first logical tree. 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.

[0038] 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 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 in 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.

[0039] 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.

[0040] 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.

[0041] In combination with the second aspect, in certain implementations of the second aspect, sending a first tree establishment 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 establishment request, and the first data packet is used to transmit data of computing tasks within the network.

[0042] According to a third aspect, a network node device for establishing a logical tree is provided, which 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, and the network node device includes: an acquisition module for acquiring 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 for 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 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 for 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.

[0043] 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, 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, where n is a positive integer less than or equal to N.

[0044] 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 construction request is equal to 0, increase the value of the tree construction request counter by 1; when the value of the network hop number field of the first tree construction request is equal to M, and M is a positive integer less than N, increase the value of the tree construction request counter by the value of the Mth leaf node number field among the N leaf node number fields of the first tree construction request.

[0045] In combination with the third aspect, in certain implementations of the third aspect, the tree establishment information table also includes a network hop count corresponding to a tree establishment request counter, and the network hop count is used to indicate the value of the network hop count field in the tree establishment request initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree establishment request counter has received. The update module is used to: update the value of the tree establishment request counter when the value of the network hop count field in the first tree establishment request is equal to the value of the network hop count.

[0046] 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.

[0047] 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 the first tree building request forwarded 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 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.

[0048] In combination with the third aspect, in certain implementations of the third aspect, the 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 forwarded from the first tree establishment request to the first network node device.

[0049] In combination with the third aspect, in certain implementations of the third aspect, after receiving the second tree establishment 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 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.

[0050] In combination with the third aspect, in certain implementations of the third aspect, the tree establishment information table also includes a sub-node mapping corresponding to a tree establishment 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 establishment requests initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree establishment request counter has received. The update module is used to: determine the first port of the first network node device that receives the first tree establishment request; and update the value of the tree establishment request counter and the sub-node mapping when the sub-node mapping indicates that the first port has not received the tree establishment request.

[0051] 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 in-network computing performed by the first logical tree. The tree building information table also includes a task identification corresponding to the tree building request counter, which is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among the 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: 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.

[0052] In combination with the third aspect, in certain implementations of the third aspect, the first tree establishment request is initiated by the first computing node device at the beginning of the first network computing task, and the determination module is also used for: after the first network computing task is completed, the first network node device deletes the tree establishment information corresponding to the task identifier indicating the first network computing task in the tree establishment information table.

[0053] In combination with the third aspect, in some implementations of the third aspect, the acquisition module is configured to: receive a first tree establishment request sent by a first computing node device, wherein the first network node device is connected to the first computing node device.

[0054] 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, where 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.

[0055] In combination with the third aspect, in some implementations of the third aspect, the acquisition module is configured to: acquire a first data packet, where 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.

[0056] 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, 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 for sending a first tree building request to a 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 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, 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.

[0057] 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, N is a positive integer, and the nth leaf node number field in 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.

[0058] 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.

[0059] In combination with the fourth aspect, in certain implementations of the fourth aspect, the sending module is configured to: send a first tree establishment request to the fourth network node device when the first intra-network computing task starts.

[0060] In combination with the fourth aspect, in some implementations of the fourth aspect, the sending module is used to: send a first data packet to the fourth network node device, where 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.

[0061] 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.

[0062] 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 run 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.

[0063] In the 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 run 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.

[0064] Optionally, the processor may be a general-purpose processor, which may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory, which may be integrated into the processor or located independently of the processor.

[0065] 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.

[0066] In a ninth aspect, a chip is provided, which obtains instructions and executes the instructions to implement the method in the second aspect or any possible implementation of the second aspect.

[0067] 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.

[0068] 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.

[0069] In a tenth aspect, a computer program product comprising instructions is provided, which, when executed by a computing device, enables the computing device to execute the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0070] In the eleventh aspect, a computer program product comprising instructions is provided, which, when executed by a computing device, enables the computing device to execute the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0071] 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 of the first aspect.

[0072] 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 of the second aspect.

[0073] 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 a hard drive.

[0074] Optionally, as an implementation manner, the above-mentioned storage medium may specifically be a non-volatile storage medium. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] FIG1 is a schematic diagram showing the relationship between resource reservation and resource usage of a network node device in a traditional solution.

[0076] FIG2 is a schematic flowchart of a method for establishing a logic tree provided in an embodiment of the present application.

[0077] FIG3 is a schematic diagram of a logic tree provided in an embodiment of the present application.

[0078] FIG4 is a schematic diagram of a tree establishment request message format provided in an embodiment of the present application.

[0079] FIG5 is a schematic diagram of a tree building information table provided in an embodiment of the present application.

[0080] FIG6 is a schematic diagram of another tree building information table provided in an embodiment of the present application.

[0081] FIG7 is a schematic flowchart of another method for establishing a logic tree provided in an embodiment of the present application.

[0082] FIG8 is a schematic flow chart of establishing a logic tree in a system for establishing a logic tree provided in an embodiment of the present application.

[0083] FIG9 is a schematic diagram of the tree building time points of static tree building and dynamic tree building.

[0084] FIG10 is a schematic flow chart of another method of establishing a logic tree in the system for establishing a logic tree provided in an embodiment of the present application.

[0085] FIG11 is a schematic flowchart of another method for establishing a logic tree provided in an embodiment of the present application.

[0086] FIG12 is a schematic diagram of a process for establishing a single-layer logic tree provided in an embodiment of the present application.

[0087] FIG13 is a schematic diagram of a process for establishing a double-layer logic tree provided in an embodiment of the present application.

[0088] FIG14 is a schematic structural block diagram of a network node device for establishing a logic tree provided in an embodiment of the present application.

[0089] FIG15 is a schematic structural block diagram of a computing node device for establishing a logic tree provided in an embodiment of the present application.

[0090] FIG16 is a schematic structural block diagram of a system for establishing a logic tree provided in an embodiment of the present application.

[0091] FIG17 is a schematic structural block diagram of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0092] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0093] This application will present various aspects, embodiments, or features around systems 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 of the devices, components, modules, etc. discussed in conjunction with the figures. Furthermore, combinations of these aspects may also be used.

[0094] Additionally, in the embodiments of this application, words such as "exemplary" and "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of the word "exemplary" is intended to present concepts in a concrete manner.

[0095] In the embodiments of the present application, “corresponding” and “relevant” may sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings they intend to express are consistent.

[0096] 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 skilled in the art will 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.

[0097] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0098] In this application, "at least one" means one or more, and "more" 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 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.

[0099] To facilitate understanding, the following first introduces relevant terms and concepts that may be involved in the embodiments of this application.

[0100] 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 the message while forwarding the message, such as addition operations, thereby offloading some computing tasks that originally needed to be performed by the computing node devices to the network node devices.

[0101] 2. In-network computing task: A task based on in-network computing. Every computation or communication performed by a distributed computing cluster can be called a task. Computations performed by computing node devices in a distributed computing cluster are called computing tasks, and the communication of computational results between computing node devices through network node devices is called a communication task. If, during a communication task, the network node devices involved in the task are also responsible for performing in-network computing, then the communication task can be called an in-network computing task. Examples include a communication task in artificial intelligence (AI) training or a communication task in high-performance computing (HPC).

[0102] 3. Application: A collection of computing and communication tasks performed to achieve the same goal, such as an AI training session or an HPC session. An application may include one or more in-network computing tasks.

[0103] 4. Logical tree: A tree-like structure composed of at least some network node devices and at least some compute node devices in a distributed computer cluster, used to perform network computing tasks. Each node in the logical tree corresponds to a compute node device or a network node device, and these devices are connected according to the tree structure indicated by the logical tree. Leaf nodes of the logical tree correspond to compute node devices, and non-leaf nodes correspond to network node devices.

[0104] 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. Therefore, 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 store all model parameters. After the computing tasks are assigned to multiple computing nodes, the 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.

[0105] 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:

[0106] (1) The computing node devices and network node devices participating in the network computing first form a logical tree;

[0107] (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;

[0108] (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.

[0109] This process offloads some of the computing tasks on the edge computing node devices to the network node devices, reducing the load on the computing node devices. Furthermore, compared to the traditional method of exchanging data between computing node devices via network node devices, this 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. This improves communication efficiency and saves data bandwidth.

[0110] 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: first, determining 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 converges to the network node device corresponding to the same root node; second, reserving resources. In-network computing requires the cache resources and connection resources of the network node devices. Therefore, the composition of the logic tree means that the participating network node devices have reserved the required cache resources for the network node devices and maintained the status information of the connections required for in-network computing.

[0111] Traditional solutions typically use centralized static allocation to establish a logical tree. This is the responsibility of a specific node, such as the aggregation manager (AM). The AM obtains the physical topology of the current distributed computing cluster from the subnet manager (SM). After establishing the logical tree, it notifies all devices corresponding to the nodes of the logical tree. The specific process is as follows:

[0112] (1) The SM sends the physical topology to the AM. The AM establishes connections between the aggregation node (AN) modules of the network node devices based on the topology and records the relevant connection information on the AN.

[0113] (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;

[0114] (3) Before an in-network computing task is started, application information needs to be sent to the AM;

[0115] (4) AM determines a subtree from the resource tree based on the application information as the logical tree for the current computing task in the network, and notifies the relevant network node devices to reserve resources;

[0116] (5) After the resource reservation is successful, the AM notifies the computing node device that is a leaf node of the ID information and topology information of the logical tree, so that the computing node device can determine the data forwarding path based on the ID of the logical tree.

[0117] The above centralized static tree building method has two problems.

[0118] On the one hand, static allocation requires pre-reservation of resources, resulting in low resource utilization. A single application contains multiple serial in-network computing tasks. Static allocation requires pre-reserving resources for all communication tasks in the application, preventing time-series tasks from reusing the same resources, resulting in low spatial resource utilization. Figure 1 shows a schematic diagram of the relationship between resource reservations and resource usage for a network node device in this example. Assume that the total resource volume of a network node device is M. t1 to t4 represent four of N serial in-network computing tasks in a single application, each requiring 1 resource. With static allocation, the network node device needs to reserve N resources for these N in-network computing tasks. Therefore, a single network node device can only accommodate M / N applications, resulting in a maximum resource utilization of M / N during a single communication, resulting in a spatial resource utilization of M / N. However, in reality, serial in-network computing tasks can reuse the same resources, resulting in a resource requirement of 1 per unit time for a single application. A single network node device can actually accommodate a maximum of M applications. In addition, as shown in Figure 1, 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, four tasks occupy the same amount of resources as five tasks.

[0119] On the other hand, centralized tree construction suffers from poor scalability and single-point failure resilience. Centralized tree construction's logical tree allocation involves tree traversal operations, and the computational and spatial complexity of tree traversal increases with cluster size, resulting in poor scalability of the logical tree. More importantly, if the node responsible for tree construction fails or shuts down, the entire cluster's in-network computing capabilities become ineffective. Furthermore, if the node responsible for tree construction fails or shuts down, the resources reserved for in-network computing by network node devices cannot be released, potentially causing problems such as memory leaks and poor reliability. Therefore, improving the reliability of logical tree construction in distributed computing clusters has become a pressing technical issue.

[0120] In view of this, in order to address the problem of poor reliability of centralized tree construction, 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 construction request and carries the structural information of the node on the logical tree branch where it is located in the tree construction request. The network node device counts the number of tree construction 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 construction 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 the distributed computing cluster in establishing the logical tree.

[0121] FIG2 shows a schematic flow chart of a method for establishing a logic tree provided in an embodiment of the present application. 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 centralize the data of each computing node device in the multiple computing node devices to the network node device via a path connected to the distributed computing cluster.

[0122] A network node device is a device with message forwarding capabilities in a distributed computing cluster, including but not limited to switches or routers. 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 is able to 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 this application.

[0123] A 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 aforementioned processors, or computing devices that include at least one of the aforementioned processors, in some embodiments, xPU is also used to represent the computing node devices described in the embodiments of this application.

[0124] As shown in FIG2 , the method includes the following steps.

[0125] S210: The first network node device obtains a first tree establishment request initiated by a first computing node device among multiple computing node devices.

[0126] 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 among all ancestor nodes in the first logical tree, wherein the first logical tree is a tree structure established by the distributed computing cluster as instructed 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.

[0127] Optionally, the tree building request may include a network hop number field and at least one leaf node number field.

[0128] 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 receives the tree-building request. Taking the first tree-building request initiated by the first computing node device and received 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 that the first tree-building request passes through from the first computing node device to the first network node device. Therefore, the first tree-building request received by the first network node device may not be sent directly from the first computing node device to the first network node device.

[0129] In some 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 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.

[0130] 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. 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.

[0131] Similarly, when a computing node device initiates a tree establishment request, the network hop count field in the tree establishment request sent by the computing node device is always 0. If the tree establishment request does not reach a network node device and needs to be forwarded, the network node device increments the value of the network node field in the tree establishment request by 1 and then sends it out. The above method enables each network node device that receives a tree establishment request to directly determine the level of its corresponding node in the logical tree based on the value of the network hop count field in the tree establishment request. Therefore, the tree establishment method of the embodiment of the present application is applicable to network node devices at any level, thereby improving the scope of application of the logical tree establishment method.

[0132] 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 initiated the tree building request. Taking the first tree building request as an example, it may 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 in the first logical tree of the first leaf node, where n is a positive integer less than or equal to N.

[0133] It should be understood that the number of leaf nodes of the above-mentioned 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 shows a schematic diagram of a logic tree. Taking the logic tree shown in Figure 3 as an example, the depth of the logic tree is 3. For leaf node 1, it includes 3 ancestor nodes, namely ancestor node 1, ancestor node 2 and ancestor node 3, among which 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 logic tree. For ancestor node 1, its height is 1, and it is directly connected to leaf node 1 and leaf node 2, so its number of leaf nodes is 2. For ancestor node 2, its height is 2, and it is directly connected to two child nodes. 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. Therefore, 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, namely leaf node 1 to leaf node 8.

[0134] Optionally, the tree creation request may also include a task identification field to indicate the in-network computing task to be executed by the logical tree. Based on the task identification field in the tree creation request, the network node device can distinguish the logical trees used for different in-network computing tasks, thereby allowing the network node device to simultaneously create trees for multiple in-network computing tasks. The specific implementation method is described in detail below.

[0135] Figure 4 is a schematic diagram of a tree building request message provided by an embodiment of the present application. The tree building request message shown in Figure 4 is applicable to a logic tree of a specific structure, that is, the leaf nodes in the logic tree to be established have the same depth, and the depth of the logic tree to be established is less than or equal to 2. As shown in Figure 4, 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 logic tree to be established is less than or equal to 2, that is, the nodes other than the leaf nodes in the logic 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 represents the number of leaf nodes aggregated by the parent node of the leaf node that initiates the tree building request, and the GlobalLeaf field represents the total number of leaf nodes in the logic tree to be established.

[0136] S220: The first network node device updates the value of the tree establishment request counter corresponding to the first logical tree in the tree establishment information table according to the first tree establishment request.

[0137] For example, in step S220, the first network node device can count the number of tree building requests it has received from leaf nodes based on 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 non-duplicate leaf nodes with the same height in the first logical tree and received by the first network node device.

[0138] 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 the computing node devices corresponding to the leaf nodes aggregated in the tree building request.

[0139] As described in S210, if the value of the Network Hop Count field is 0, it indicates that the node corresponding to the network node device is directly connected to a leaf node in the logical tree. Therefore, the network node device can determine that the tree establishment request is a non-aggregated tree establishment request, which includes only a tree establishment request from a leaf node. In this case, the value of the tree establishment request counter corresponding to the logical tree in the tree establishment information table is increased by 1, indicating that the current network node device has successfully collected another tree establishment request from a leaf node.

[0140] 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, which aggregates the tree building requests from at least one 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 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, which means that the network node device is the M+1th network node device that receives the tree building request, so the height of its 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. Successfully receiving the tree-building request indicates that the ancestor node with a height of M has successfully collected all the tree-building requests from 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 the leaf nodes of one of its child nodes.

[0141] Through the above scheme, the network node device can count the number of tree building requests received from leaf nodes based only on 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.

[0142] Optionally, the tree information table maintained by the network node device may also include a network hop count corresponding to the tree request counter, which is used to indicate the value of the network hop count field in the received tree request counted by the tree request counter. Specifically, the tree information table may include multiple entries, each entry includes a tree request counter and a network hop count, and the network hop count corresponding to the tree request counter refers to the network hop count recorded under the same entry as the tree request counter. In this case, after the network node device obtains the tree request, it first compares the value of the network hop count field in the obtained tree request with the value of the network hop count of the corresponding logical tree in the tree information table. If the value of the network hop count field in the tree request is the same as the value of the recorded network hop count, the tree 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 count field, and the tree request counter in the new entry is assigned an initial value.

[0143] 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.

[0144] Optionally, in the case where the tree establishment request includes an identification field, the tree establishment information table maintained by the network node device may also include a task identification corresponding to the tree establishment request counter, which is used to indicate the value of the task identification field in the received tree establishment request counted by the tree establishment request counter. In this case, after the network node device obtains the tree establishment request, it first compares the value of the task identification field in the obtained tree establishment request with the value of the task identification in the recorded entry in the tree establishment information table. If the value of the task identification field in the tree establishment request is the same as the value of the recorded task identification, the tree establishment 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 establishment request counter in the new entry is assigned an initial value.

[0145] 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 task identifier stored under the same entry in the tree information table. Similar expressions appearing below also represent the same meaning and will not be repeated here.

[0146] 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.

[0147] 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.

[0148] 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 logical tree building.

[0149] Figure 5 is a schematic diagram of a tree building information table provided by an embodiment of the present application. As shown in Figure 5, the tree building information table can record the task identifier (TaskID), the number of network hops (Hop), the child node mapping (Bitmap) and the tree building request counter (counter). As shown in Figure 5, the tree building information table can include multiple entries, each of which records the above information separately, and each entry is independent of each other. Taking the first entry in Figure 5 as an example, it records the tree building requests gathered in the network node device corresponding to a node with a height of 1 in the logical tree with TaskID 0001. The child node mapping uses 4 bits to map the 4 ports connected to the network node device and other devices respectively. 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 represent 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. A counter of 3 indicates that the two tree building requests received from the above two devices aggregate the tree building requests initiated by the computing node devices corresponding to the three leaf nodes.

[0150] S230: The first network node device determines a tree establishment result according to the tree establishment request counter and the first threshold.

[0151] For example, in step S230, the first network node device can determine the tree building progress of the nodes in the logical tree corresponding to the first network node by counting the number of tree building requests initiated by the computing node device corresponding to the received, non-duplicate leaf nodes of the same height as counted by the tree building request counter.

[0152] 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. Therefore, the first threshold represents the number of leaf nodes of the node corresponding to the first network node device in the first logical tree.

[0153] 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 subtree with the node corresponding to the first network node device as the root node in the first logical tree is completed.

[0154] When the value of the new tree request counter is greater than the first threshold, the first network node device can determine that an error occurs in the tree building process, and therefore discards the newly obtained message, interrupts the tree building, and deletes the tree building information corresponding to the first tree building request.

[0155] 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.

[0156] 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 indicates 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 its child nodes without knowing the number of its directly connected child nodes. In other words, 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.

[0157] In some possible implementations, the network node device can also compare the total number of leaf nodes included in the logical tree to be established indicated by the tree establishment request with the value counted by the tree establishment 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 further determine whether it is necessary to continue forwarding the tree establishment request to the next-hop network node device. Specifically, taking the first tree establishment 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 establishment request as a second threshold, where the second threshold represents the total number of leaf nodes in the first logical tree.

[0158] When the value of the new tree creation request counter is equal to the second threshold value, 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. Therefore, 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.

[0159] 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 obtained message, interrupts the tree building, and deletes the tree building information corresponding to the first tree building request.

[0160] If the value of the tree creation 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 creation requests from its corresponding node, it sends the aggregated tree creation 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 creation result fed back by the second network node device.

[0161] Specifically, when the value of the new tree creation 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 creation request it obtains by 1, and sends the first tree creation request with the updated value of the network hop number field to the second network node device. After receiving the first tree creation request, the second network node device can continue to create a logical tree according to the method provided in the embodiment of the present application, and if the logical tree is successfully created, a tree creation success message can be sent to the first network node device. After receiving the tree creation success message from the second network node device, the first network node device can determine that the first logical tree is successfully created, and therefore can continue to forward the tree creation success message to the child node according to the path forwarded to the first network node device based on the first tree creation request.

[0162] 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, it 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 computational and space complexity, and improving the scalability of the logical tree.

[0163] 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 to 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.

[0164] Figure 6 is a schematic diagram of another tree building information table provided in an embodiment of the present application. Compared with the tree building information table shown in Figure 5, the tree building information table shown in Figure 6 records the parent node mapping (Bitmap) in addition to the task identifier (TaskID), network hop count (Hop), child node mapping (Bitmap) and tree building request counter (counter). 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 respectively. 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 by 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 converged to the next-hop network node device through the three ports.

[0165] 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.

[0166] The above description of the method for establishing a logical tree provided by the embodiment of the present application in conjunction with Figures 2 to 6 illustrates the method performed by the network node device. For the computing node device, the embodiment of the present application also provides a corresponding method for establishing a logical tree, which is described in detail below in conjunction with Figure 7.

[0167] FIG7 is a schematic flow chart illustrating another method for establishing a logic tree according to an embodiment of the present application. Optionally, the method may be executed by a first computing node device in a distributed computing cluster. The method illustrated in FIG7 may correspond to the method illustrated in FIG2 , and thus, for further details, reference may be made to the description of the method illustrated in FIG2 above, and will not be repeated here.

[0168] As shown in FIG7 , the method includes the following steps.

[0169] S710: The first computing node device sends a first tree establishment request to the fourth network node device.

[0170] For example, in step S710, the first computing node device can proactively 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 among all ancestor nodes in the first logical tree, wherein the first logical tree is a tree structure that the first tree building request indicates the distributed computing cluster to establish, and the first leaf node is the node corresponding to the first computing node device in the first logical tree.

[0171] Optionally, the first tree establishment request may have the same fields as the first tree establishment request in the method shown in Figure 2. In the first tree establishment request sent by the first computing node device, the value of the network hop count field is 0.

[0172] It should be understood that the fourth network node device is a network node device in the distributed cluster that is directly connected to the first computing node device, and the first tree establishment request sent by the first computing node device is directly received by the fourth network node device. Therefore, the fourth network node device can be the same network node device as the first network node device in the method shown in Figure 2, or it can be a different network node device from the first network node device.

[0173] Through the technical solution of the embodiment of the present application, the computing node device on the end side independently 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 the entire logical tree due to the failure of a single network node device, and improving the reliability of the distributed computing cluster in establishing the logical tree.

[0174] Figure 8 shows a schematic flow chart of establishing a logical tree for a system comprising compute node devices and network node devices according to an embodiment of the present application. As shown in Figure 8 , xPU 1 and xPU 2 are two compute node devices in the system, and leaf switches 1, leaf switches 2, and spine switch 1 are three network node devices in the system. Leaf switches and spine switches are two types of network node devices.

[0175] xPU 1 and xPU 2 each send a tree establishment request to its directly connected leaf switch 1 and leaf switch 2. Alternatively, xPU 1 and xPU 2 may send a tree establishment request according to the method shown in FIG7 .

[0176] Leaf switch 1 and leaf switch 2 each receive a tree-building request sent by the computing node device directly connected to it, and count the number of tree-building requests collected 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 under 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 counts the number of tree-building requests collected from the computing node devices corresponding to the leaf nodes in the logical tree based on the tree-building requests aggregated by the leaf switch. 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 establish a logical tree according to the method shown in Figure 2.

[0177] 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.

[0178] In some possible implementations, the first logical tree established by xPU 1, xPU 2, leaf switch 1, leaf switch 2, and spine switch 1 in Figure 8 can be a logical tree used to execute a first intra-network computing task. Optionally, xPU 1 and xPU 2 can initiate a tree establishment request at the start of the first intra-network computing task. After the first intra-network computing task completes, leaf switch 1, leaf switch 2, and spine switch 1 can each delete the establishment information of the first logical tree from their respective tree establishment tables, thereby freeing up resources on network node devices.

[0179] The above solution decouples 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. Figure 9 shows a schematic diagram of the establishment time point of static and dynamic tree establishment.

[0180] As shown on the left side of Figure 9, traditional solutions use a static tree construction method to establish a logical tree. The application shown in Figure 9 is AI model training, which can include time nodes such as network initialization, model loading, and model operation. Model operation 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. However, because static tree construction is centrally controlled by a unified tree construction node, the tree construction time point is at network initialization, and resources are released after the model operation is completed. As a result, the resources of the network node devices are occupied throughout the AI ​​model training application process.

[0181] The right side of Figure 9 illustrates the dynamic tree-building method provided by an embodiment of the present application. Because the tree-building process is completely controlled by the computing and network node devices involved in constructing the logical tree, and does not require topology information, there's no need to reserve resources at the start of the application. The tree-building process begins at the start of each communication task, and the resources used for the current tree-building process are released upon completion. The logical tree for the next communication task is then rebuilt at the start of the next communication task.

[0182] 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.

[0183] In some possible implementations, the tree establishment request and tree establishment results can be sent along with the data packets of the current intra-network computing task. In this case, FIG10 shows another schematic flow chart of establishing a logical tree in a system for establishing a logical tree composed of computing node devices and network node devices provided in an embodiment of the present application. As shown in FIG10 , the difference from the process shown in FIG8 is that the tree establishment request and tree establishment results sent between xPU 1, xPU 2, leaf switch 1, leaf switch 2, and spine switch 1 are included in the data communication packets.

[0184] Specifically, as mentioned above, the in-network computing task requires that the data required for in-network computing be concentrated from the computing node devices corresponding to the leaf nodes to the network node devices corresponding to the root node. After the network node devices corresponding to the root node calculate and obtain the calculation result data, the calculation 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 that is required for in-network computing and is gathered to the network node devices. The network node device corresponding to the root node performs in-network computing while building the tree. After the tree is successfully built and the calculation result data is obtained, the calculation 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 tree building success information, the next level network node device can also determine that the logical tree is successfully built when it receives the calculation result data, and can therefore continue to transmit the calculation result data according to the structure of the successfully established logical tree. By analogy, the tree building success information can eventually reach the computing node device together with the calculation result data.

[0185] Through the above solution, 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.

[0186] FIG11 is a schematic diagram of the overall process of the method for establishing a logic tree provided by an embodiment of the present application, 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. The process shown in FIG11 is described in detail below with reference to two specific embodiments.

[0187] Figure 12 is a schematic diagram of a single-layer logical tree established based on a top-on-rack switch (ToR) in Example 1. The left side of Figure 12 shows the structure of the logical tree to be established, and the right side shows the mapping relationship between the network node devices and computing node devices determined based on the logical tree to be established. The ToR is a network node device, and w1, w2, and w3 represent three computing node devices. The tree establishment process is as follows.

[0188] In step 1, the compute node device initiates a tree establishment request. w1, w2, and w3 obtain the ToR address from the configuration file and then send a tree establishment request to the ToR. In the tree establishment request message sent by w1, w2, and w3, the network hop count field value is Hop = 0, the aggregation leaf node field value is AggLeaf = 3, and the global leaf node field value is GlobalLeaf = 3.

[0189] Step 2: The network node device receives the tree establishment request and performs the following processing:

[0190] Sub-step 1: Parse the tree creation request message and use the value of the Task Identifier field in the tree creation request to query the tree creation information table to determine whether a relevant tree creation entry exists. If the relevant tree creation entry exists, the network hop count value in the relevant tree creation entry is checked to see if it matches the network hop count field in the tree creation request. If so, the tree creation request counter for that tree creation entry continues counting. If not, a new tree creation entry is created. If the tree creation entry does not exist, a new tree creation entry is also created. When creating a new tree creation entry, the values ​​of the Task Identifier field and the network hop count field in the tree creation request are recorded in the new tree entry, and the tree creation request counter and child node mapping are initialized to all zeros.

[0191] Sub-step 2: Establish the inbound port of the request message.

[0192] Sub-step three: Determine whether the tree establishment request message is a duplicate message. Based on the determined inbound port of the tree establishment request message, determine the bit mapped to that port in the child node mapping. If the value of that bit in the child node mapping indicates that the port has received the tree establishment request message, the current message is a duplicate message, discarded, and subsequent steps are not performed. If the value of that bit in the child node mapping indicates that the port has not received the tree establishment request message, the value of that bit in the child node mapping is updated.

[0193] Sub-step 4: Update the tree request counter. If the Network Hop Count field in the tree request has a value of Hop = 0, the request is a non-convergent tree request, and the counter is incremented by 1. If the Network Hop Count field in the tree request has a value of Hop > 0, the request is a convergent tree request, and the counter is incremented by the value of the Aggregate Leaf field in the request, AggLeaf = 3.

[0194] Sub-step five compares the relationship between the value of the tree building request counter and the number of leaf nodes of the node to determine whether all tree building requests from all child nodes have been collected. First, determine the number of leaf nodes included in the ToR corresponding node based on the tree building request type. 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 aggregate leaf node field AggLeaf; if the value of the network node number field Hop>0, it is a converged tree building request, and the number of leaf nodes included in the ToR corresponding node is equal to the value of the aggregate 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 temporarily do not proceed to the subsequent steps; if it is greater than, the message is an error, 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 the child nodes and continues to the subsequent steps.

[0195] Sub-step six: Compare the value of the tree request counter with the value of the global leaf node field GlobalLeaf in the tree request to determine whether the current ToR is the root node of the task tree. If the value of the tree request counter is less than the value of the global leaf node field GlobalLeaf, the current ToR is not the root node and continues to actively send tree request to the upper-level network node device; if the value of the tree request counter is greater than the value of the global leaf node field GlobalLeaf, the message is an error, the message is discarded, the tree information is deleted, and the subsequent steps are terminated; if the value of the tree request counter is equal to the value of the global leaf node field GlobalLeaf, the current ToR is the root node and the tree is successfully established, and the tree success information is sent to the child node according to the path port indicated by the child node mapping.

[0196] 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 calculation data processing process. After the calculation is completed, the tree establishment information is deleted, freeing up the resources of the network node device.

[0197] Figure 13 is a schematic diagram of Example 2, which uses the spine switch as the root node to establish a two-layer logical tree. The left side of Figure 13 is a structural diagram of the logical tree to be established, and the right side is the mapping relationship between the network topology of network node devices and computing node devices determined according to 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 construction process is as follows.

[0198] In step 1, the compute node device initiates a tree establishment request. w1, w2, and w3 obtain the address of ToR 1 from the configuration file, and w4, w5, and w6 obtain the address of ToR 2 from the configuration file. They then send a tree establishment request to the ToR. In the tree establishment request message sent by w1, w2, w3, w4, w5, and w6, the network hop count field value is Hop = 0, the aggregation leaf node field value is AggLeaf = 3, and the global leaf node field value is GlobalLeaf = 6.

[0199] Step 2: ToR 1 and ToR 2 receive their respective tree establishment requests and process them separately. The processing flow can refer to step 2 in embodiment 1 and will not be repeated here.

[0200] 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, it determines that it is not the root node because GlobalLeaf=6, 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 request 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.

[0201] Step 4: The spine receives the tree establishment request and processes it. The spine processes the tree establishment request in the same way as the ToR. You can also refer to the detailed description of step 2 in Example 1, which will not be repeated here.

[0202] In step 5, ToR 1 and ToR 2 receive the successful tree establishment information from the spine, determine the port that received the successful tree establishment information, record it as the parent node mapping, and continue to pass the successful tree establishment information to the child nodes, completing the tree establishment process. After receiving the successful tree establishment information, the compute node device enters the network calculation data processing process. After the calculation is complete, the tree establishment information is deleted, freeing up network node device resources.

[0203] In summary, the method for establishing a logical tree provided in the embodiments of the present application enables distributed dynamic tree establishment. Compared to centralized static tree establishment, this method overcomes single points of failure and eliminates the need for pre-reserved resources, thereby improving the reliability of logical tree establishment in distributed computing clusters and reducing the utilization of network node device resources.

[0204] The above description of the method embodiment of establishing a logic tree provided by the present application is described in conjunction with FIG. 2 to FIG. 13 . The following description of the device embodiment of establishing a logic tree provided by the present application is described in conjunction with FIG. 14 to FIG. 17 .

[0205] FIG14 shows a schematic structural block diagram of a network node device 1400 for establishing a logic tree according to an embodiment of the present application. As shown in FIG14 , the network node device 1400 includes: an acquisition module 1410 , an update module 1420 , and a determination module 1430 .

[0206] 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 a 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.

[0207] 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, N is a positive integer, and the nth leaf node number field in 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, where n is a positive integer less than or equal to N.

[0208] Optionally, the acquisition module 1410 is specifically configured to receive a first tree establishment request sent by a first computing node device, wherein the first network node device is connected to the first computing node device.

[0209] Optionally, the acquisition module 1410 is specifically used to receive a first tree building request sent by a third network node device, where 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 the network node device connected to the third network node device.

[0210] Optionally, the acquisition module 1410 is specifically configured to acquire a first data packet, where 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.

[0211] Specifically, the update 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. 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 that the first network node device has received.

[0212] Optionally, the update module 1420 is specifically used to increase the value of the tree request counter by 1 when the value of the network hop number field of the first tree request is equal to 0; and to increase the value of the tree request counter by the value of the Mth leaf node number field among the N leaf node number fields of the first tree request when the value of the network hop number field of the first tree request is equal to M, and M is a positive integer less than N.

[0213] Optionally, the tree information table also includes a network hop count corresponding to a tree request counter, and the network hop count is used to indicate the value of a network hop count field in a tree request initiated by different computing node devices among multiple computing node devices that the first network node device indicated by the tree request counter has received. The update module 1420 is specifically used to update the value of the tree request counter when the value of the network hop count field in the first tree request is equal to the value of the network hop count.

[0214] Optionally, the tree building information table also includes a child node mapping corresponding to the tree building request counter, and the child 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 that receives the first tree building request; when the child node mapping indicates that the first port has not received the tree building request, the value of the tree building request counter and the child node mapping are updated.

[0215] 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, which is used to indicate the value of the task identification field in the tree building requests initiated by different computing node devices among the 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.

[0216] Specifically, the determination module 1430 is configured to determine a tree building result according to a 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.

[0217] 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 for receiving other tree building requests to determine the tree building result.

[0218] Optionally, when the value of the new tree request counter is equal to the first threshold, the determination module 1430 is also used to forward the first tree building success information according to the path of the first tree building request forwarded to the first network node device when the value of the new tree request counter is equal to the 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 in 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.

[0219] 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.

[0220] 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.

[0221] Optionally, the first tree establishment request is initiated by the first computing node device when the first network computing task starts. The determination module 1430 is also used by the first network node device to delete the tree establishment information corresponding to the task identifier indicating the first network computing task in the tree establishment information table after the first network computing task is completed.

[0222] The above modules can be implemented by software or hardware. For example, the implementation of the determination module 1430 will be described below, 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.

[0223] As an example of a software functional unit, the module 1430 can be determined to include code running on a computing instance. The computing instance can include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance can be one or more. For example, the module 1430 can be determined to 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 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 one data center or multiple geographically close data centers. Typically, a region can include multiple AZs.

[0224] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.

[0225] As an example of a hardware functional unit, determination module 1430 may include at least one computing device, such as a server. Alternatively, determination module 1430 may be 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.

[0226] The multiple computing devices included in determination module 1430 can be distributed in the same region or in different regions. The multiple computing devices included in determination module 1430 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in determination module 1430 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.

[0227] 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 steps 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.

[0228] FIG15 shows a schematic structural block diagram of a computing node device 1500 for establishing a logic tree according to an embodiment of the present application. As shown in FIG15 , the computing node device 1500 includes: a sending module 1510 .

[0229] 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.

[0230] 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 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 in 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.

[0231] 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.

[0232] Optionally, the sending module 1510 is specifically configured to send a first tree establishment request to the fourth network node device when the first intra-network computing task starts.

[0233] Optionally, the sending module 1510 is specifically configured to send a first data packet to the fourth network node device, where the first data packet includes a first tree establishment request, and the first data packet is used to transmit data of a computing task within the network.

[0234] The sending module 1510 may also be implemented by software or hardware.

[0235] Figure 16 shows a schematic structural block diagram of a system 1600 for establishing a logic tree provided in an embodiment of the present application. As shown in Figure 16, the system includes at least one network node device and multiple computing node devices. The network node device included in the system can be, for example, the network node device 1400 shown in Figure 14, which can implement the method for establishing a logic tree provided in an embodiment of the present application. The computing node device included in the system can be, for example, the computing node device 1500 shown in Figure 15, which can implement the method for establishing a logic tree provided in an embodiment of the present application.

[0236] This application also provides a computing device 100. As shown in FIG17 , computing device 100 includes a bus 102, a processor 104, a memory 106, and a communication interface 108. Processor 104, memory 106, and communication interface 108 communicate with each other via bus 102. Computing device 100 may be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in computing device 100.

[0237] Bus 102 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG17 shows only one line, but this does not imply a single bus or type of bus. Bus 102 may include a path for transmitting information between various components of computing device 100 (e.g., memory 106, processor 104, and communication interface 108).

[0238] The processor 104 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0239] The memory 106 may include volatile memory, such as random access memory (RAM). The memory 106 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0240] Memory 106 stores executable program code. Processor 104 executes the executable program code to implement the functions of the aforementioned acquisition module, update module, and determination module, or to implement the functions of the aforementioned sending module, thereby implementing the aforementioned method for establishing a logic tree. In other words, memory 106 stores instructions for executing the aforementioned method for establishing a logic tree.

[0241] 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.

[0242] 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.

[0243] Embodiments of the present application also provide a computer program product containing instructions. This computer program product can be software or a program product containing instructions that can be executed on a computing device or stored on any available medium. When executed on at least one computing device, this computer program product causes the at least one computing device to execute the aforementioned method for establishing a logic tree.

[0244] 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 a 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 that instruct the computing device to perform the above-mentioned management. The various technical features can be arbitrarily combined. In order to make the description concise, not all possible combinations of the various technical features in the above embodiments are 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.

[0245] 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, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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, determining the tree establishment result according to the tree establishment result of the second network node device, wherein the second network node device is one of the at least one network node device and the first network node device A network node device connected to the 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 building 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, 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, and the first logical tree is the first building The tree request indicates a logical tree established by the distributed computing cluster, wherein the first leaf node is a node corresponding to the first computing node device in the first logical tree, and the fourth network node device is a network node device among the at least one network node device connected to the first computing 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

Patent Citations

  • Method for establishing logic tree, network node equipment, computing node equipment and system

    CN119493652A

  • Clustering-type data network building and transmitting method for energy source monitoring

    CN104581901A

  • Aggregation tree building method, aggregation data collecting and transmitting method and node of aggregation tree

    CN104661185A

  • Novel cloud data center resource distribution method based on network sensing

    CN105430058A

  • Control message processing method, device, equipment and system in integrated communication system

    CN113835873A