Node clustering method and apparatus, electronic device, and storage medium

By determining the starting node and level in the network, traversing the routing path and setting the termination condition, the problem of node clustering in networks with loops is solved, and efficient network node clustering is achieved.

CN117493638BActive Publication Date: 2026-05-29MASHANG CONSUMER FINANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MASHANG CONSUMER FINANCE CO LTD
Filing Date
2023-05-15
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively cluster network nodes in networks with complex call relationships, especially when loops exist, making it difficult to clearly define the hierarchical division and clustering of network nodes.

Method used

By determining the starting node and node level, the routing path is traversed, and during the traversal, it is determined whether the current node belongs to a determined level. The traversal termination condition is set to avoid repeatedly determining the level and improve clustering efficiency.

Benefits of technology

It achieves accurate and efficient clustering of network nodes in complex call relationship networks with loops, reducing clustering complexity and improving clustering efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117493638B_ABST
    Figure CN117493638B_ABST
Patent Text Reader

Abstract

The present disclosure provides a node clustering method and device, electronic equipment and storage medium, the method comprising: determining a plurality of routing paths according to the calling relationship between a plurality of network nodes; determining a starting node and its belonging node hierarchy from the plurality of network nodes; traversing each routing path starting from the starting node; when traversing the current routing path, determining the hierarchy of each node according to the distance between each network node and the starting node and the hierarchy of the starting node; if the hierarchy of the next node of the current node has been determined, ending the traversal and recording the path traversal result; when the traversal of the plurality of routing paths is completed, clustering the network nodes at the same hierarchy into the same cluster node group according to all the results. The method clusters the network nodes according to the data flow direction in the network, and sets the traversal end condition, which can solve the problem that node clustering cannot be achieved in the presence of a loop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a node clustering method, apparatus, electronic device, and storage medium. Background Technology

[0002] Multiple network nodes are deployed in a network, and each network node has different functions in specific applications. For example, some network nodes can be used for business processing, while others are used for routing and forwarding. In order to improve the working efficiency of network nodes, it is usually necessary to cluster the network nodes.

[0003] Network nodes of the same type can typically be used to process the same type of service. When multiple service requests are processed in parallel within the network, a suitable network node is quickly found for each service request based on the service requests that each type of network node can handle and the working status of each network node within that type, thereby improving the efficiency of service processing in the network. Therefore, how to cluster network nodes has become one of the current hot research topics. Summary of the Invention

[0004] This disclosure provides a node clustering method, apparatus, electronic device, and storage medium, which enables the clustering of network nodes based on the data flow direction in the network. In particular, it can cluster network nodes in a network with complex calling relationships, such as network links with loops.

[0005] Firstly, this disclosure provides a node clustering method, including:

[0006] Based on the node call relationships between multiple network nodes, multiple routing paths are determined, each containing at least two network nodes; at least one of the multiple routing paths contains a loop.

[0007] The starting node is determined from multiple network nodes, and the node level to which the starting node belongs is also determined; where the starting node is a common node in multiple routing paths;

[0008] Iterate through each route path starting from the initial node;

[0009] During the traversal of the current route path, the node level of each network node in the current route path is determined based on the distance between each network node and the starting node and the node level to which the starting node belongs. If the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current route path ends and the traversal result of the current route path is recorded. The traversal result includes the node level to which each network node in the current route path belongs.

[0010] When all multiple routing paths have been traversed, network nodes at the same node level are clustered into the same cluster node group based on the traversal results of each routing path.

[0011] Secondly, this disclosure provides a node clustering device, comprising:

[0012] The determination module is used to determine multiple routing paths based on the node call relationships between multiple network nodes. Each routing path contains at least two network nodes, and at least one of the multiple routing paths contains a loop.

[0013] The determination module is also used to determine the starting node from multiple network nodes and to determine the node level to which the starting node belongs; wherein the starting node is a common node in multiple routing paths;

[0014] The traversal module is used to traverse each route path starting from the starting node;

[0015] The determination module is also used to determine the node level of each network node in the current route path based on the distance between each network node in the current route path and the starting node, as well as the node level to which the starting node belongs, during the traversal of the current route path; and if the next network node of the currently traversed network node belongs to a node with a determined node level, then the traversal of the current route path ends and the traversal result of the current route path is recorded, including the node level to which each network node in the current route path belongs.

[0016] The clustering module is used to cluster network nodes at the same node level into the same cluster node group based on the traversal results of each route path when multiple route paths have been traversed.

[0017] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and at least one memory; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described node clustering method.

[0018] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above-mentioned node clustering method when executed by a processor / processing core.

[0019] According to the node clustering method provided in this disclosure, firstly, multiple routing paths are determined based on the node call relationships between multiple network nodes, each routing path containing at least two network nodes; a starting node is determined from the multiple network nodes, and the node level to which the starting node belongs is also determined. Then, each routing path is traversed starting from the starting node; wherein, during the traversal of the current routing path, the node level to which each network node in the current routing path belongs is determined based on the distance between each network node in the current routing path and the starting node, as well as the node level to which the starting node belongs; and if the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current routing path ends and the traversal result of the current routing path is recorded, the traversal result including the node level to which each network node in the current routing path belongs; when all multiple routing paths have been traversed, network nodes located at the same node level are clustered into the same cluster node group based on the traversal result of each routing path. In the above methods, the calling relationships between nodes reflect the data flow in the network. The node clustering method proposed in this application can cluster network nodes according to the data flow in the network. This clustering method can be applied to more networks and more application scenarios, ensuring the accuracy of clustering. In addition, during the clustering process of network nodes, it is necessary to determine whether the next network node of the currently traversed network node belongs to a node with a determined node level during the traversal process. If the next network node of the currently traversed network node belongs to a node with a determined node level, it means that the next network node has been traversed and the node level of the next network node has been determined. Therefore, on the one hand, to avoid repeatedly determining the level of the same network node (and the problem of inconsistency will occur due to repeated determination of the level); on the other hand, to reduce the complexity of node clustering and improve the clustering efficiency, when the next network node of the currently traversed network node belongs to a node with a determined node level, it is determined that the current path meets the traversal termination condition, and the traversal process of the current path is terminated in advance, without having to traverse the remaining network nodes under the current path. Therefore, by setting a traversal termination condition, the problem of node clustering not being possible when loops exist can be solved, and the efficiency of node clustering can be improved when there are complex call relationships, i.e., loops in the routing path.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0021] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0022] Figure 1 A flowchart illustrating a node clustering method provided in this embodiment of the disclosure;

[0023] Figure 2 A schematic diagram illustrating the node calling relationship between multiple network nodes in a network, provided as a specific example of an embodiment of this disclosure;

[0024] Figure 3 A block diagram of a node clustering device provided in an embodiment of this disclosure;

[0025] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0026] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0027] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0028] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0029] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0030] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0031] The node clustering method according to embodiments of this disclosure can be executed by electronic devices such as terminal devices or servers. Terminal devices can be in-vehicle devices, user equipment (UE), mobile devices, user terminals, terminals, cellular phones, cordless phones, personal digital assistants (PDAs), handheld devices, computing devices, in-vehicle devices, wearable devices, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Specifically, the method can be implemented by a processor calling a computer program stored in memory.

[0032] A network typically contains many network nodes with different functions. These nodes usually have certain calling relationships (determined by data flow; for example, if data flows from network node A to network node B, then network node A calls network node B). Routing paths can be generated based on these relationships, and a routing path can be represented using a directed graph, such as a Directed Acyclic Graph (DAG) or a non-DAG graph. This application considers that traversing the directed graph can divide network nodes into different levels, thereby enabling network node clustering based on these levels. This facilitates data processing of network nodes based on the clustering results.

[0033] In related technologies, it is generally possible to traverse DAGs with only unidirectional call relationships, thereby completing the hierarchical division of network nodes through traversal. However, for non-DAG graphs with complex call relationships (e.g., loops), it is difficult to determine the termination condition of the traversal, thus making it impossible to clearly define the hierarchical division of network nodes and perform node clustering. Therefore, how to cluster network nodes, especially for non-DAG graphs with complex call relationships, has become a pressing technical challenge. To address the aforementioned issues, this disclosure provides a node clustering method. This method requires determining, during traversal, whether the next node of the currently traversed network node belongs to a node with a determined node level. If the next node belongs to a node with a determined node level, it indicates that the next network node has been traversed and its node level has been determined. Therefore, on the one hand, to avoid repeatedly determining the level for the same network node (which can lead to inconsistencies), and on the other hand, to reduce the complexity of node clustering and improve efficiency, when the next node of the currently traversed network node belongs to a node with a determined node level, the current path is determined to meet the traversal termination condition, and the traversal process of the current path is terminated early, eliminating the need to traverse the remaining network nodes under the current path. Thus, by setting a traversal termination condition, the problem of not being able to achieve node clustering in the presence of cycles can be solved, and the efficiency of node clustering in non-DAG graphs with complex call relationships can be improved.

[0034] Figure 1 A flowchart illustrating a node clustering method provided in an embodiment of this disclosure. (Refer to...) Figure 1 The method includes:

[0035] Step S110: Based on the node call relationship between multiple network nodes, determine multiple routing paths, each of which contains at least two network nodes.

[0036] A node can be a workstation, client, network user, or personal computer, as well as a server, printer, or other device capable of network connectivity. Each workstation, server, terminal device, or network device—that is, a device with its own unique network address—is a network node. The entire network is composed of these many network nodes, and connecting these nodes with communication lines to form a specific geometric relationship is called computer network topology.

[0037] Data traffic is transmitted through network links in the computer topology to various network nodes. Based on the direction of data traffic transmission in the network, node calling relationships can be determined among multiple network nodes. In one optional implementation, the node calling relationships among multiple network nodes are determined in the following way:

[0038] Obtain the data traffic transmission direction between multiple network nodes; determine the node calling relationship between multiple network nodes based on the data traffic transmission direction; for example, if the data traffic transmission direction is from network node A to network node B, it means that network node A calls network node B.

[0039] After determining the node call relationships between multiple network nodes, multiple routing paths, also called node call paths, can be generated based on these relationships. Each routing path contains at least two network nodes. At least one routing path contains a loop; for example, if network node A calls network node B, network node B calls network node C, and network node C calls network node A, such a routing path contains a loop. When data traffic flows sequentially into multiple network nodes, these nodes form call relationships. These nodes, arranged in the order of data traffic flow, constitute a routing path. For example, if data traffic flows from network node A to network node B, and then to network node C, then network node A calls network node B, network node B calls network node C, and network nodes A, B, and C form a routing path.

[0040] Step S120: Determine the starting node from multiple network nodes and determine the node level to which the starting node belongs.

[0041] The starting node is a common node among multiple routing paths. The selection of the starting node and the determination of the node level to which the starting node belongs shall be determined by those skilled in the art based on the specific needs of the scenario when implementing this method, and no restrictions are imposed here.

[0042] A common node is a network node that is included in multiple routing paths. For example, if one routing path is network node A, network node B, and network node C, and another routing path is network node B, network node C, and network node E, then network node B is a common node of these two routing paths, and network node B can be selected as the starting node.

[0043] In one embodiment, if multiple network nodes share a common node, any one of these common nodes can be designated as the starting node; alternatively, a starting node can be selected from among the multiple common nodes according to pre-set selection rules. For example, the selection rule could be: selecting the common node in the shortest routing path as the starting node; or it could be: selecting the common node in the longest routing path as the starting node. This disclosure only illustrates two selection rule scenarios; the specific selection rule can be determined based on the actual application scenario, and this disclosure does not impose any specific limitations.

[0044] Step S130: Traverse each route path starting from the starting node.

[0045] In this process, multiple routing paths have been determined in step S110 based on the node call relationships between multiple network nodes. In one optional implementation, each routing path is traversed sequentially starting from the starting node according to a preset routing priority rule. When traversing each routing path according to the routing priority rule, the traversal can be performed in descending order of priority or in ascending order of priority.

[0046] The preset routing priority rules are determined by those skilled in the art based on the specific needs of the scenario when implementing this method. For example, the routing priority rules can be set such that the more nodes on a routing path, the higher the priority of being traversed, and vice versa. Alternatively, the routing priority rules can also be: the greater the I / O on a routing path, the higher the priority of being traversed, and vice versa.

[0047] Step S140: During the traversal of the current routing path, determine the node level of each network node in the current routing path based on the distance between each network node and the starting node and the node level to which the starting node belongs.

[0048] In one optional implementation, to determine the node level of each network node in the current routing path, if the node level of the starting node is 's', and the distance between the network node and the starting node is 'n', then the node level of the network node is 's+n'; where 's' and 'n' are natural numbers. The node level 's' of the starting node and the distance 'n' between the network node and the starting node are determined by those skilled in the art based on the specific requirements of the scenario when implementing this method, and are not limited here. In another optional implementation, the distance 'n' between the network node and the starting node is calculated using the number of network nodes between the network node and the starting node and a preset step size between adjacent network nodes.

[0049] For example, if the node level s of the starting node is 2, the number of network nodes between the network node and the starting node is 2, and the preset step size between adjacent network nodes is 1, then the distance n between the network node and the starting node is 3, and the node level of the network node is 5; or, for another example, if the node level s of the starting node is 1, the number of network nodes between the network node and the starting node is 3, and the preset step size between adjacent network nodes is 2, then the distance n between the network node and the starting node is 8, and the node level of the network node is 9.

[0050] Step S150: If the next network node of the currently traversed network node belongs to a node with a determined node level, then end the traversal of the current route path and record the traversal result of the current route path. The traversal result includes the node level to which each network node in the current route path belongs.

[0051] In one optional implementation, to determine the hierarchy of each network node in the event of a loop in the routing path, and without re-determining the hierarchy of a node encountered on a second traversal, the termination condition for the current routing path includes: if the next network node of the currently traversed network node belongs to a node with a determined hierarchy, then the traversal of the current routing path ends, and the traversal result is recorded, including the hierarchy of each network node in the current routing path. Conversely, if the current routing path does not contain a loop, the termination condition for the current routing path is that all leaf nodes in the current routing path have been traversed.

[0052] Step S160: When all multiple routing paths have been traversed, network nodes at the same node level are clustered into the same cluster node group based on the traversal results of each routing path.

[0053] The traversal result of each routing path includes the node level to which each network node in the current routing path belongs. Based on the traversal result of each routing path, the node level to which each network node belongs can be known. After determining the node level to which each network node belongs, network nodes located at the same node level can be clustered into the same cluster node group, thus obtaining multiple cluster node groups corresponding to different node levels.

[0054] Therefore, each cluster node group contains one or more network nodes at the same node level, used to cluster network nodes belonging to the same node level. For example, cluster node group 1 includes multiple network nodes at node level 1, and cluster node group 2 includes multiple network nodes at node level 2.

[0055] In this case, each cluster node group contains network nodes with the same node priority. Generating multiple cluster node groups corresponding to different node levels facilitates the subsequent unified data processing operations on network nodes with the same node priority. For example, the same data processing strategy can be assigned to each network node in the same cluster node group.

[0056] In summary, the node clustering method provided in this embodiment firstly determines multiple routing paths based on the node call relationships between multiple network nodes, with each routing path containing at least two network nodes; a starting node is determined from the multiple network nodes, and the node level to which the starting node belongs is also determined. Then, each routing path is traversed starting from the starting node; wherein, during the traversal of the current routing path, the node level to which each network node in the current routing path belongs is determined based on the distance between each network node in the current routing path and the starting node, as well as the node level to which the starting node belongs; and if the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current routing path ends and the traversal result of the current routing path is recorded, including the node level to which each network node in the current routing path belongs; when all multiple routing paths have been traversed, network nodes located at the same node level are clustered into the same cluster node group based on the traversal result of each routing path. In the above method, it is necessary to determine whether the next network node of the currently traversed network node belongs to a node with a determined node level during the traversal process. If the next network node of the currently traversed network node belongs to a node with a determined node level, it means that the next network node has been traversed and its node level has been determined. Therefore, on the one hand, to avoid repeatedly determining the level of the same network node (and the inconsistency caused by repeatedly determined levels), and on the other hand, to reduce the complexity of node clustering and improve clustering efficiency, if the next network node of the currently traversed network node belongs to a node with a determined node level, it is determined that the current path meets the traversal termination condition, and the traversal process of the current path is terminated in advance, without needing to traverse the remaining network nodes under the current path. Thus, by setting a traversal termination condition, the problem of not being able to achieve node clustering in the presence of cycles can be solved, and the efficiency of node clustering in non-DAG graphs with complex call relationships can be improved.

[0057] In an alternative implementation, after step S160 above, step S170 is further performed:

[0058] Step S170: Determine the node priority of the network nodes in each cluster node group based on the level value of the node level to which each network node belongs; and perform data processing based on the node priorities of multiple network nodes.

[0059] In one optional implementation, based on the multiple clustering node groups obtained in step S160, multiple nodes within the same clustering node group have the same priority; the smaller the level value of a node, the higher its priority, and vice versa. For example, if step S160 yields three clustering node groups corresponding to different node levels, with corresponding level values ​​of one, two, and three, then the network nodes in the clustering node group corresponding to the first node level have the highest priority, the network nodes in the clustering node group corresponding to the second node level have the next highest priority, and the network nodes in the clustering node group corresponding to the third node level have the lowest priority.

[0060] By determining the node priority of network nodes in each cluster node group, a standardized definition of data flow in networks with complex calling relationships is achieved. This allows multiple network nodes in the network to process data according to node priority, further simplifying data flow calculations in the network, reducing the computing pressure on computers, and meeting the business needs of data processing in different application scenarios.

[0061] In one optional implementation, the above node clustering method is applied to the field of network security. Data processing based on the node priorities of multiple network nodes includes: configuring a security level for each network node according to its priority, and executing a security protection policy corresponding to that security level for each network node. For example, for network nodes with higher priority, a higher security level is configured, and a stricter security protection policy (e.g., setting a higher security scanning frequency) is executed for these nodes; correspondingly, for network nodes with lower priority, a lower security level is configured, and a more lenient security protection policy (e.g., setting a lower security scanning frequency) is executed for these nodes. This satisfies the different needs of network nodes with varying security requirements, ensuring the security of network nodes with higher security requirements while reducing the cost of executing security protection policies for network nodes with lower security requirements.

[0062] In one optional implementation, the above node clustering method is applied to the data query domain. Data processing based on the node priorities of multiple network nodes includes: configuring a search priority for each network node according to its priority; and in query-related business, executing a search strategy corresponding to the search priority for each network node. For example, for network nodes with higher priorities, a higher search priority is configured, and a more detailed search strategy is executed for these nodes; conversely, for network nodes with lower priorities, a lower search priority is configured, and a simpler search strategy is executed. This satisfies the different needs of network nodes with different search priorities, ensuring the accuracy of search results for network nodes with higher search priorities while reducing the cost of executing search strategies for network nodes with lower search priorities.

[0063] In an optional implementation, since the calling relationships between the various network nodes in the network are determined, in order to ensure that a complete routing path can be generated between the various network nodes selected through node clustering, thereby realizing the processing of business requests, the node clustering method in the above embodiments further includes:

[0064] When a service processing request is received, M nodes that can participate in processing the service processing request are determined. The M nodes belong to multiple network nodes. According to the node clustering method provided in steps S110-S160 of the above embodiment, the M network nodes are located in one or more clustered node groups. Among them, network nodes located in the same node cluster group belong to the same node level and have the same node priority.

[0065] The system obtains the service load of each network node in the same cluster group from M network nodes, and allocates routing paths for service processing requests based on the service load of each network node and the calling relationships between nodes in the multiple network nodes. The network nodes along the routing path then collaborate to process the service processing requests. Here, service load refers to the traffic carried by a network node during service processing, and the service load of each network node changes dynamically according to the data flow of the network during service processing. Therefore, for the allocation of routing paths for service processing requests, while ensuring that there are calling relationships between network nodes at adjacent node levels, the network node with the lowest current service load in each cluster node group is selected as the network node at each node level in that routing path, so that the service processing request can achieve data flow through the most efficient routing path.

[0066] To facilitate understanding, a specific example will be used below to explain the detailed implementation of the above embodiments.

[0067] Figure 2 This diagram illustrates the node call relationships between multiple network nodes in a network provided for this specific example. Figure 2 Assuming network node 1 (hereinafter referred to as data1, other network nodes are analogous) is the starting node, and the node level of data1 is determined to be 1, the network data flow of data1 is calculated. For example, 1->5 means data1 calls data5, which also forms a simple DAG (Directed Acyclic Graph). A simple DAG is equivalent to the aforementioned routing path. If this DAG contains data1 and data5, then the level of data1 is 1, the level of data5 is 2, and the level values ​​increase in a directional manner according to the DAG, with an increment of 1.

[0068] by Figure 2 Taking the node call relationship shown as an example, multiple network nodes are network node 1 to network node 7, and each network node can be simply referred to as data. For example, network node 1 can be simply referred to as data1. Figure 2 In this context, network node 1 is represented by the number 1. According to... Figure 2 The node call relationships shown indicate multiple routing paths: data1-data5, data1-data2-data3-data4-data7, data1-data2-data3-data4-data2, data1-data2-data3-data4-data1, and data1-data2-data6. It's worth noting that a routing path can be considered a simple DAG (Directed Acyclic Graph), and traversing a routing path is essentially traversing a DAG.

[0069] based on Figure 1 The embodiment describes a scenario where, assuming data1 is determined as the starting node, the node level of the starting node data1 is 1, and the step size between adjacent node levels is 1, then... Figure 2 The process of traversing each route path can include:

[0070] (1) When traversing the DAG from data1 to data5, if data1 calls data5, and data5 does not call any other network node, then the current DAG transition ends (i.e., ...). Figure 1 As mentioned above, the current route path traversal ends. Therefore, data1 is a first-level network node (located in layer 1, and other network nodes are analogous). The distance between data1 and data5 is 1, so data5 is located in layer 2.

[0071] (2) data1 calls data2, and data2 calls two network nodes data6 and data3. Therefore, data2 is located in layer 2, and data6 and data3 are located in layer 3. Thus, the following two DAGs are generated: DAG1(data1, data2, data6) and DAG2(data1, data2, data3). Set the preset routing rules to DAG1 and DAG2.

[0072] If data6 no longer calls any other network node for DAG1, then DAG1 ends its flow. At this time, data1 is located in layer 1, data2 is located in layer 2, and data6 is located in layer 3.

[0073] As DAG2 continues to flow, data3 calls data4, so data4 is located at layer 4. The original DAG2 is updated to DAG2(data1, data2, data3, data4). Continuing downwards, data4 calls the three network nodes data7, data2, and data1. Based on DAG2, the following three DAGs are obtained: DAG3(data1, data2, data3, data4, data7), DAG4(data1, data2, data3, data4, data2), and DAG5(data1, data2, data3, data4, data1). The preset routing rules are set to DAG3, DAG4, and DAG5.

[0074] For DAG3, if data7 no longer calls any other network node, then DAG3 ends its flow. At this time, data1 is located in layer 1, data2 is located in layer 2, data3 is located in layer 3, data4 is located in layer 4, and data7 is located in layer 5.

[0075] For DAG4, by reverse checking, we can see that data2 already exists in DAG4 and has been defined as a second-level network node. Therefore, DAG4 ends its flow, and all network nodes in DAG4 have defined levels. data2 is still located in level 2.

[0076] For DAG5, a reverse check reveals that data1 already exists in DAG5 and has been defined as a first-level network node. Therefore, DAG5 ends its flow, and all network nodes in DAG5 have defined levels, with data1 still located in level 1.

[0077] In summary, based on the traversal results of all routing paths, the network contains network nodes belonging to five node levels, namely ( Figure 2(As shown in the right-hand diagram): First-level network node data1, second-level network nodes data2 and data5, third-level network nodes data3 and data6, fourth-level network node data4, and fifth-level network node data7. These network nodes at the same node level are clustered into a single cluster group, resulting in multiple cluster groups corresponding to five different node levels. The node priorities within these groups decrease sequentially according to their hierarchical numerical values, allowing data processing to be performed based on node priority. This method identifies the routing relationships and directionality of network nodes and categorizes and aggregates hierarchical relationships, thus standardizing the definition of data flow methods between network nodes. It can be applied to data processing, transaction planning, optimal path finding, data compression, and other data processing scenarios, providing a reliable and analyzable basis for data flow calculations during data processing in these applications.

[0078] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0079] Figure 3 This is a block diagram of a node clustering device provided in an embodiment of this disclosure. (Refer to...) Figure 3 The node clustering device 30 includes:

[0080] The determination module 31 is used to determine multiple routing paths based on the node call relationship between multiple network nodes, and each routing path contains at least two network nodes;

[0081] The determination module 31 is also used to determine the starting node from multiple network nodes and to determine the node level to which the starting node belongs; wherein the starting node is a common node in multiple routing paths;

[0082] Traversal module 32 is used to traverse each route path starting from the starting node;

[0083] The determination module 31 is also used to determine the node level of each network node in the current routing path based on the distance between each network node in the current routing path and the starting node and the node level to which the starting node belongs during the traversal of the current routing path; and if the next network node of the currently traversed network node belongs to a node with a determined node level, then the traversal of the current routing path ends and the traversal result of the current routing path is recorded, including the node level to which each network node in the current routing path belongs.

[0084] Clustering module 33 is used to cluster network nodes at the same node level into the same cluster node group based on the traversal results of each route path when multiple route paths have been traversed.

[0085] Optionally, the node clustering device 30 further includes a processing module 34 for:

[0086] When a business processing request is received, M nodes that can participate in processing the business processing request are determined; the M nodes belong to multiple network nodes.

[0087] Obtain the service load of each network node in the same cluster among M network nodes, and allocate routing paths for service processing requests based on the service load of each network node and the calling relationship between nodes in multiple network nodes. The network nodes in the routing path then cooperate to process the service processing requests.

[0088] Optionally, the processing module 34 is also used for:

[0089] Based on the level value of the node hierarchy to which each network node belongs, determine the node priority of the network nodes contained in each cluster node group;

[0090] Data processing is performed based on the node priorities of multiple network nodes; multiple nodes in the same cluster have the same priority; the smaller the node level value, the higher the node priority.

[0091] Optionally, the determining module 31 is also used for:

[0092] Obtain the direction of traffic transmission between multiple network nodes;

[0093] The node calling relationship between multiple network nodes is determined based on the direction of traffic transmission.

[0094] Add the network node to the node call path.

[0095] Optionally, if the node clustering device 30 is applied in the field of network security, then the processing module 34 is specifically used for:

[0096] Configure the security level of each network node according to its node priority, and execute the corresponding security protection policy for each network node.

[0097] Optionally, if the node clustering device 30 is applied to the data query field, then the processing module 34 is specifically used for:

[0098] Configure the search priority for each network node based on its node priority;

[0099] In query-related services, a search strategy corresponding to the search priority is executed for each network node.

[0100] Optionally, module 31 is specifically used for:

[0101] If the node level of the starting node is s, and the distance between the network node and the starting node is n, then the node level of the network node is s+n; where s and n are both natural numbers.

[0102] The specific structure and working principle of each of the above modules can be found in the description of the corresponding part of the method embodiment, and will not be repeated here.

[0103] This disclosure also provides an electronic device, which includes: at least one processor; and at least one memory; wherein the memory stores one or more computer programs that can be executed by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the above-described node clustering method. Figure 4 This is a block diagram of an electronic device provided according to an embodiment of the present disclosure. (Refer to...) Figure 4 The electronic device 50 includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by at least one processor 501, and the one or more computer programs are executed by at least one processor 501 to enable at least one processor 501 to perform the above-described node clustering method.

[0104] This disclosure also provides a computer-readable storage medium, which may be volatile or non-volatile, storing a computer program thereon. When executed by a processor core, the computer program implements the aforementioned node clustering method, specifically including:

[0105] Based on the node call relationships between multiple network nodes, multiple routing paths are determined, and each routing path contains at least two network nodes;

[0106] The starting node is determined from multiple network nodes, and the node level to which the starting node belongs is also determined; where the starting node is a common node in multiple routing paths;

[0107] Iterate through each route path starting from the initial node;

[0108] During the traversal of the current route path, the node level of each network node in the current route path is determined based on the distance between each network node and the starting node and the node level to which the starting node belongs. If the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current route path ends and the traversal result of the current route path is recorded. The traversal result includes the node level to which each network node in the current route path belongs.

[0109] When all multiple routing paths have been traversed, network nodes at the same node level are clustered into the same cluster node group based on the traversal results of each routing path.

[0110] The processor is also used to perform:

[0111] When a business processing request is received, M nodes that can participate in processing the business processing request are determined; the M nodes belong to multiple network nodes.

[0112] Obtain the service load of each network node in the same cluster among M network nodes, and allocate routing paths for service processing requests based on the service load of each network node and the calling relationship between nodes in multiple network nodes. The network nodes in the routing path then cooperate to process the service processing requests.

[0113] After clustering network nodes at the same node level into the same cluster node group based on the traversal results of each routing path, the processor is further used to:

[0114] Based on the level value of the node hierarchy to which each network node belongs, determine the node priority of the network nodes contained in each cluster node group;

[0115] Data processing is performed based on the node priorities of multiple network nodes; multiple nodes in the same cluster have the same priority; the smaller the node level value, the higher the node priority.

[0116] Before determining multiple routing paths based on node call relationships among multiple network nodes, the processor is also used to:

[0117] Obtain the direction of traffic transmission between multiple network nodes;

[0118] The node calling relationship between multiple network nodes is determined based on the direction of traffic transmission.

[0119] When node clustering methods are applied to the field of network security, data processing is performed based on the node priorities of multiple network nodes, including:

[0120] Configure the security level of each network node according to its node priority, and execute the corresponding security protection policy for each network node.

[0121] When the node clustering method is applied to the data query domain, the processor performs the following steps when processing data based on the node priority of multiple network nodes:

[0122] Configure the search priority for each network node based on its node priority;

[0123] In query-related services, a search strategy corresponding to the search priority is executed for each network node.

[0124] When the processor determines the node level of each network node in the current routing path based on the distance between each network node and the starting node and the node level to which the starting node belongs, it performs the following steps:

[0125] If the node level of the starting node is s, and the distance between the network node and the starting node is n, then the node level of the network node is s+n; where s and n are both natural numbers.

[0126] In summary, the node clustering method implemented by the computer program stored on the aforementioned computer-readable storage medium firstly determines multiple routing paths based on the node calling relationships between multiple network nodes, with each routing path containing at least two network nodes; then, a starting node is determined from the multiple network nodes, and the node level to which the starting node belongs is also determined. Next, each routing path is traversed starting from the starting node; during the traversal of the current routing path, the node level to which each network node in the current routing path belongs is determined based on the distance between each network node in the current routing path and the starting node, as well as the node level to which the starting node belongs; and if the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current routing path ends, and the traversal result of the current routing path is recorded, including the node level to which each network node in the current routing path belongs; when all multiple routing paths have been traversed, network nodes at the same node level are clustered into the same cluster node group based on the traversal result of each routing path. In the above method, it is necessary to determine whether the next network node of the currently traversed network node belongs to a node with a determined node level during the traversal process. If the next network node of the currently traversed network node belongs to a node with a determined node level, it means that the next network node has been traversed and its node level has been determined. Therefore, on the one hand, to avoid repeatedly determining the level of the same network node (and the inconsistency caused by repeatedly determined levels), and on the other hand, to reduce the complexity of node clustering and improve clustering efficiency, if the next network node of the currently traversed network node belongs to a node with a determined node level, it is determined that the current path meets the traversal termination condition, and the traversal process of the current path is terminated in advance, without needing to traverse the remaining network nodes under the current path. Thus, by setting a traversal termination condition, the problem of not being able to achieve node clustering in the presence of cycles can be solved, and the efficiency of node clustering in non-DAG graphs with complex call relationships can be improved.

[0127] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described node clustering method.

[0128] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0129] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable program instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0130] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0131] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0132] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0133] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0134] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0135] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0136] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0137] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A node clustering method, characterized in that, include: Based on the node call relationships between multiple network nodes, multiple routing paths are determined, and each routing path contains at least two network nodes; At least one of the multiple routing paths contains a loop; A starting node is determined from the plurality of network nodes, and the node level to which the starting node belongs is determined; wherein, the starting node is a common node in the plurality of routing paths; Traverse each route path starting from the starting node; During the traversal of the current route path, the node level of each network node in the current route path is determined based on the distance between each network node in the current route path and the starting node, as well as the node level to which the starting node belongs. If the next network node of the currently traversed network node belongs to a node with a determined node level, the traversal of the current route path ends and the traversal result of the current route path is recorded. The traversal result includes the node level to which each network node in the current route path belongs. When all multiple routing paths have been traversed, network nodes at the same node level are clustered into the same cluster node group based on the traversal results of each routing path.

2. The method according to claim 1, characterized in that, The method further includes: When a service processing request is received, M nodes that can participate in processing the service processing request are determined; the M nodes belong to the plurality of network nodes. The service load of each network node in the same cluster group among the M network nodes is obtained, and a routing path is allocated to the service processing request according to the service load of each network node and the calling relationship between the nodes in the multiple network nodes. The service processing request is then processed by each network node in the routing path.

3. The method according to claim 1, characterized in that, After clustering network nodes at the same node level into the same cluster node group based on the traversal results of each routing path, the method further includes: Based on the level value of the node hierarchy to which each network node belongs, determine the node priority of the network nodes contained in each cluster node group; Data processing is performed based on the node priorities of the multiple network nodes; multiple nodes located in the same cluster of nodes have the same priority; the smaller the level value of the node hierarchy, the higher the node priority.

4. The method according to claim 1, characterized in that, Before determining multiple routing paths based on node call relationships among multiple network nodes, the process also includes: Obtain the direction of traffic transmission between multiple network nodes; The node calling relationship between the multiple network nodes is determined based on the direction of traffic transmission.

5. The method according to claim 3, characterized in that, When the node clustering method is applied to the field of network security, the data processing based on the node priority of the multiple network nodes includes: Based on the node priority of each network node, configure the security level of each network node, and execute the security protection policy corresponding to the security level for each network node.

6. The method according to claim 3, characterized in that, When the node clustering method is applied to the data query domain, the data processing based on the node priority of the multiple network nodes includes: Configure the search priority for each network node based on its node priority; In query-related services, a search strategy corresponding to the search priority is executed for each network node.

7. The method according to any one of claims 1-6, characterized in that, Determining the node level of each network node in the current routing path based on the distance between each network node in the current routing path and the starting node, and the node level to which the starting node belongs, includes: If the node level of the starting node is s, and the distance between the network node and the starting node is n, then the node level of the network node is s+n; where s and n are both natural numbers.

8. A node clustering device, characterized in that, include: The determination module is used to determine multiple routing paths based on the node call relationships between multiple network nodes, and each routing path contains at least two network nodes; At least one of the multiple routing paths contains a loop; The determining module is further configured to determine a starting node from the plurality of network nodes and determine the node level to which the starting node belongs; wherein the starting node is a common node in the plurality of routing paths; The traversal module is used to traverse each route path starting from the starting node; The determining module is further configured to, during the traversal of the current routing path, determine the node level of each network node in the current routing path based on the distance between each network node in the current routing path and the starting node, as well as the node level to which the starting node belongs; and if the next network node of the currently traversed network node belongs to a node with a determined node level, then the traversal of the current routing path is terminated and the traversal result of the current routing path is recorded, the traversal result including the node level to which each network node in the current routing path belongs; The clustering module is used to cluster network nodes at the same node level into the same cluster node group based on the traversal results of each route path when multiple route paths have been traversed.

9. An electronic device, characterized in that, include: At least one processor; and at least one memory; wherein, The memory stores one or more computer programs that are executed by the at least one processor, such that the at least one processor is able to perform the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method as described in any one of claims 1-7.