Static routing planning method, device, electronic device, and storage medium

By creating a routing array in the NUMA architecture and using a graph traversal method, the problem of inter-node routing planning is solved that it is difficult to meet low latency and bandwidth balance, and an automatic routing planning scheme that meets constraints is realized, avoiding the occurrence of deadlock routing.

CN112445621BActive Publication Date: 2025-03-18HYGON INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202011383639.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-03-18
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In the non-consistent memory access (NUMA) architecture, routing planning between nodes is difficult to meet the low latency and bandwidth balance requirements in high parallel and high concurrency application scenarios, and is prone to the occurrence of deadlock routing.

Method used

By creating a routing array, based on the connection relationship between nodes and constraints (such as non-deadlock constraints), graph traversal methods (such as depth-first search) are used to automatically solve the routing planning scheme that meets the constraints.

Benefits of technology

It realizes the automatic solution to meet the constraints in the complex network topology structure, improves the efficiency and effect of routing planning, avoids the occurrence of deadlock routing, and meets the needs of low latency and bandwidth balance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112445621B_ABST
    Figure CN112445621B_ABST
Patent Text Reader

Abstract

A static route planning method, device, electronic device, and storage medium. The static route planning method includes: creating a route array according to the connection relationship between multiple nodes, wherein the route array includes multiple array elements, each array element is used to store all routes to be planned between two nodes corresponding to each array element; based on the constraint conditions, performing a graph traversal on the route array to obtain at least one route planning scheme that meets the constraint conditions. The static route planning method can automatically solve the route planning scheme that meets the constraint conditions under the network topology structure by modeling, and provides a more convenient method for obtaining route planning schemes for complex network topology structures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to a static route planning method, a static route planning device, an electronic device, and a non-transitory computer-readable storage medium. Background Art

[0002] Static routing is a fixed, unchanging routing item. Reasonable planning of static routing is of great significance to the normal operation of the network. For the Non-Uniform Memory Access (NUMA) architecture, the memory access latency within the node is the shortest, and the memory access latency across nodes is proportional to the distance between the nodes. Therefore, the reasonable planning of interconnection routing between multiple nodes plays a vital role in the access performance of the NUMA system. Summary of the invention

[0003] At least one embodiment of the present disclosure provides a static route planning method, which is applied to a topological structure including multiple nodes, comprising: creating a route array according to the connection relationship between the multiple nodes, wherein the route array includes multiple array elements, and each of the array elements is used to store all routes to be planned between two nodes corresponding to each of the array elements; based on constraints, performing a graph traversal on the route array to obtain at least one route planning scheme that satisfies the constraints.

[0004] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the routing array is created according to the connection relationship between the multiple nodes, including: creating a storage structure according to the connection relationship between the multiple nodes, wherein the storage structure is used to record the connection relationship between the multiple nodes; creating the routing array according to the storage structure.

[0005] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the storage structure is an adjacency matrix, and the adjacency matrix includes matrix elements arranged into N rows and N columns, N is a positive integer and represents the number of the multiple nodes, and the storage structure is created according to the connection relationship between the multiple nodes, including: for the i-th node and the j-th node among the multiple nodes, where i and j are positive integers and are less than or equal to N: based on the connection relationship, determining the node state between the i-th node and the j-th node; according to the node state between the i-th node and the j-th node, determining the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix.

[0006] For example, in the static route planning method provided by at least one embodiment of the present disclosure, determining the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix according to the node state between the i-th node and the j-th node, including: in response to the node state between the i-th node and the j-th node indicating that the i-th node and the j-th node are directly connected, determining the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column according to the line attribute between the i-th node and the j-th node. element; in response to the node state between the ith node and the jth node indicating that the ith node and the jth node are not directly connected, determining the value of the matrix element located at the ith row and jth column and the value of the matrix element located at the jth row and i-th column as a first value; in response to the node state between the ith node and the jth node indicating that the ith node and the jth node are the same node, determining the value of the matrix element located at the ith row and jth column and the value of the matrix element located at the jth row and i-th column in the adjacency matrix as a second value; wherein the first value and the second value are different.

[0007] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the line attributes include the line delay between the i-th node and the j-th node, and the value of the matrix element located at the i-th row and j-th column and the value of the matrix element located at the j-th row and i-th column are directly proportional to the line delay.

[0008] For example, in the static route planning method provided in at least one embodiment of the present disclosure, the route array is created according to the storage structure, including: determining all routes to be planned between any two nodes among the multiple nodes according to the storage structure; and taking all routes to be planned between any two nodes as an array element of the route array to create the route array.

[0009] For example, in the static routing planning method provided by at least one embodiment of the present disclosure, the constraint condition includes a non-deadlock constraint, and based on the constraint condition, a graph traversal is performed on the routing array to obtain at least one routing planning scheme that satisfies the constraint condition, including: sorting all the routes to be planned stored in each array element of the routing array to obtain a sorted routing array; based on the non-deadlock constraint, the graph traversal is performed on the sorted routing array to obtain the at least one routing planning scheme.

[0010] For example, in the static route planning method provided by at least one embodiment of the present disclosure, all routes to be planned stored in each array element of the route array are sorted to obtain a sorted route array, including: for the t-th array element of the route array, T weight sums corresponding to the T routes to be planned stored in the t-th array element are calculated one by one, wherein each weight sum of the T weight sums is calculated by the adjacency matrix and all nodes through which the route to be planned corresponding to each weight sum passes, and the T routes to be planned stored in the t-th array element are sorted based on the size relationship of the T weight sums to obtain the sorted t-th array element; based on all the sorted array elements, the sorted route array is determined, wherein t is a positive integer and is less than or equal to the total number of array elements of the route array, and T is a positive integer.

[0011] For example, in the static route planning method provided by at least one embodiment of the present disclosure, the graph traversal is a depth-first search, and based on the non-deadlock constraint, the sorted route array is traversed to obtain the at least one route planning scheme, including: taking each array element of the sorted route array as a search layer, and taking each to-be-planned route in each array element of the sorted route array as a search node of the search layer where each array element is located, so as to construct a route graph; performing the depth-first search on the route graph, sequentially accessing all search nodes in the route graph according to the search strategy of the depth-first search, and taking the to-be-planned routes that meet the non-deadlock constraint as planned routes, until all search nodes in the route graph are traversed to obtain all planned routes corresponding to the route graph; based on all planned routes corresponding to the route graph, obtaining the at least one route planning scheme, wherein each of the route planning schemes includes N*N planned routes, and the N*N planned routes belong to different search layers respectively, and N is a positive integer and represents the number of the multiple nodes.

[0012] For example, in the static route planning method provided by at least one embodiment of the present disclosure, the depth-first search is performed on the routing graph, all search nodes in the routing graph are visited in sequence according to the search strategy of the depth-first search, and the to-be-planned routes that satisfy the non-deadlock constraint are taken as planned routes, until all search nodes in the routing graph are traversed to obtain all planned routes corresponding to the routing graph, including: performing the depth-first search on the routing graph, judging whether the current search node currently visited and the search nodes that belong to the same search branch path as the current search node and have been visited satisfy the non-deadlock constraint, in response to satisfying the non-deadlock constraint, marking the to-be-planned route corresponding to the current search node as a planned route, and continuing to visit the next search node according to the search strategy until all search nodes in the routing graph are traversed; in response to not satisfying the non-deadlock constraint, performing pruning processing on the current search node, wherein the search branch path includes multiple to-be-planned routes determined according to the search strategy, and the multiple to-be-planned routes belong to different search layers respectively.

[0013] For example, the static routing planning method provided in at least one embodiment of the present disclosure further includes: parsing the at least one routing planning scheme to obtain a parsing result; and determining at least one target scheme in the at least one routing planning scheme according to the parsing result.

[0014] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the at least one routing planning scheme is parsed to obtain a parsing result, including: performing delay calculation on the at least one routing planning scheme respectively to obtain the average delay corresponding to the at least one routing planning scheme, wherein the parsing result includes the average delay corresponding to the at least one routing planning scheme; and determining at least one target scheme among the at least one routing planning scheme based on the parsing result, including: for the pth routing planning scheme among the at least one routing planning scheme: in response to the average delay of the pth routing planning scheme being less than a preset average delay, the pth routing planning scheme is used as a target scheme among the at least one target scheme.

[0015] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, delay calculation is performed on the at least one routing planning scheme respectively to obtain the average delay corresponding to the at least one routing planning scheme, including: determining the N*N planned routes corresponding to the p-th routing planning scheme; calculating the average delay values ​​corresponding to the N*N planned routes corresponding to the p-th routing planning scheme respectively to obtain the N*N average delay values ​​corresponding to the p-th routing planning scheme; performing addition processing on the N*N average delay values ​​corresponding to the p-th routing planning scheme to obtain the average delay corresponding to the p-th routing planning scheme.

[0016] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the average delay values ​​corresponding to the N*N planned routes corresponding to the p-th routing planning scheme are calculated respectively to obtain the N*N average delay values ​​corresponding to the p-th routing planning scheme, including: for the q-th planned route among the N*N planned routes corresponding to the p-th routing planning scheme: determining all nodes passed by the q-th route to be planned; determining a plurality of node pairs among all the nodes, wherein each node pair includes two directly connected nodes among all the nodes; obtaining the average delay values ​​corresponding to the plurality of node pairs respectively through the adjacency matrix and the plurality of communication probabilities corresponding to the plurality of node pairs respectively; performing summation processing on the average delay values ​​corresponding to the plurality of node pairs respectively to obtain the average delay value corresponding to the q-th planned route.

[0017] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the at least one routing planning scheme is parsed to obtain a parsing result, and further includes: performing bandwidth measurement calculations on the at least one routing planning scheme respectively to obtain the bandwidth distribution corresponding to the at least one routing planning scheme, wherein the parsing result also includes the bandwidth distribution corresponding to the at least one routing planning scheme; and determining at least one target scheme among the at least one routing planning scheme based on the parsing result, including: for the pth routing planning scheme: in response to the average delay of the pth routing planning scheme being less than the preset average delay and the bandwidth distribution corresponding to the pth routing planning scheme indicating balanced bandwidth distribution, taking the pth routing planning scheme as one of the at least one target schemes.

[0018] For example, the static routing planning method provided in at least one embodiment of the present disclosure also includes: in response to the execution time of the depth-first search exceeding a preset time or the at least one routing planning scheme obtained within the preset time reaches a preset number, and there is no target scheme among the preset number of routing planning schemes, then stopping the depth-first search and adjusting the traversal order of the depth-first search, and re-executing the depth-first search according to the adjusted traversal order.

[0019] For example, the static route planning method provided in at least one embodiment of the present disclosure further includes: performing the graph traversal on the route array in parallel using multiple threads with different initial traversal orders.

[0020] For example, in the static routing planning method provided in at least one embodiment of the present disclosure, the topology structure is a topology structure of a non-uniform memory access architecture.

[0021] At least one embodiment of the present disclosure provides a static route planning device, which is applied to a topological structure including multiple nodes, wherein the device includes: an array creation unit, configured to create a route array according to the connection relationship between the multiple nodes, wherein the route array includes multiple array elements, and each of the array elements is used to store all routes to be planned between two nodes corresponding to each of the array elements; a planning unit, configured to perform a graph traversal on the route array based on constraints to obtain at least one route planning scheme that meets the constraints.

[0022] At least one embodiment of the present disclosure provides an electronic device, comprising: a memory, which non-transitorily stores computer-executable instructions; and a processor, which is configured to execute the computer-executable instructions, wherein the computer-executable instructions, when executed by the processor, implement the static route planning method according to any embodiment of the present disclosure.

[0023] At least one embodiment of the present disclosure provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the static route planning method according to any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure.

[0025] Figure 1 A schematic diagram of a topology structure including deadlock routing provided for at least one embodiment of the present disclosure;

[0026] Figure 2 A schematic flow chart of a static route planning method provided for at least one embodiment of the present disclosure;

[0027] Figure 3A for Figure 2 An example flow chart of step S20 in the static route planning method shown;

[0028] Figure 3B for Figure 3A An example flow chart of step S202 in the static route planning method shown;

[0029] Figure 3C A schematic diagram of a routing diagram provided by an embodiment of the present disclosure;

[0030] Figure 3D A schematic flowchart of a depth-first search provided according to an embodiment of the present disclosure is shown;

[0031] Figure 4 A schematic flow chart of a static route planning method provided for at least one embodiment of the present disclosure;

[0032] Figure 5A A logic diagram of a static route planning method provided for at least one embodiment of the present disclosure;

[0033] Figure 5B A flowchart of a static route planning method provided for at least one embodiment of the present disclosure;

[0034] Figure 6 A schematic block diagram of a static route planning device provided in at least one embodiment of the present disclosure;

[0035] Figure 7 A schematic block diagram of an electronic device provided for at least one embodiment of the present disclosure;

[0036] Figure 8 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure;

[0037] Fig. 9 A schematic diagram of a hardware environment provided for at least one embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings of the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0039] Unless otherwise defined, the technical terms or scientific terms used in the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0040] In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some known functions and known components.

[0041] The non-uniform memory access (hereinafter referred to as NUMA) architecture includes multiple nodes (Node), each node has multiple processors and multiple memories (such as memory), and each node includes an integrated memory controller (IMC) to manage and control the memory in the node. Each processor of the NUMA architecture can access the memory of the node where the processor is located, and can also access the memory of other nodes. However, due to factors such as the distance between nodes and line properties, the processor of the NUMA architecture has the shortest access delay when accessing the memory located in the same node as the processor. When accessing the memory of a node different from the node where the processor is located (i.e., across nodes), the access delay is proportional to the distance between the nodes, that is, the farther the distance between the nodes, the longer the access delay. Therefore, the reasonable planning of the cross-node access routing of the NUMA architecture can greatly improve the application performance of the NUMA architecture.

[0042] As the number of nodes in the NUMA architecture increases, the NUMA topology becomes more and more complex. In the NUMA routing planning process, it is necessary not only to maintain the low latency advantage of the processor in the NUMA architecture when accessing the memory of the local node, but also to ensure that the processor is fully efficient when accessing the memory across nodes, so as to meet the complex application scenarios of high parallelism and high concurrency.

[0043] The routing design between any two nodes of the NUMA architecture needs to avoid deadlock. Since the routing between nodes of the NUMA architecture is complex, it is easy to cause the routing between nodes to form a loop. If every two end-to-end routes in the multiple routes included in the loop have overlapping parts, then this loop constitutes a deadlock route. For example, Figure 1 A schematic diagram of a topology structure including deadlock routing is provided for at least one embodiment of the present disclosure, such as Figure 1 As shown, the topology includes 9 nodes, namely node 0, node 1, node 2, ..., node 8. In this topology, the loop formed by routing (0,1,4), routing (1,4,7), routing (4,7,8), routing (7,8,5), routing (8,5,2) and routing (5,2,0,1) (shown by the black dotted line) is a possible deadlock path of the topology.

[0044] Conventional NUMA architecture routing planning methods usually use a combination of enumeration and experience, that is, when the NUMA network topology is known, a NUMA routing solution that satisfies the non-deadlock constraint is found. Afterwards, without violating the non-deadlock constraint, the route with larger latency is continuously adjusted based on experience so that the average latency of the obtained NUMA route is continuously reduced.

[0045] When the NUMA network topology is relatively simple, the above method can obtain a NUMA routing solution that meets the latency requirements by continuously fine-tuning the NUMA routing solution that meets the non-deadlock constraints. However, as the number of nodes in the NUMA architecture continues to increase, the NUMA network topology becomes more complex, and the difficulty of finding a NUMA routing solution that meets the non-deadlock constraints also increases. In addition, this method of obtaining routing planning solutions by combining enumeration with experience is also difficult to meet the requirements of low latency, bandwidth load balancing, etc. in complex application scenarios of cross-node memory access. On the other hand, in the process of avoiding Deadlock, the route between two nodes often requires a detour. Therefore, the existing routing planning solutions are also difficult to meet the requirements of low latency and bandwidth balance in high-concurrency application scenarios.

[0046] At least one embodiment of the present disclosure provides a static route planning method, a static route planning device, an electronic device, and a non-transient computer-readable storage medium. The static route planning method includes: creating a route array according to the connection relationship between multiple nodes, for example, the route array includes multiple array elements, each array element is used to store all routes to be planned between two nodes corresponding to each array element; based on the constraint conditions, performing a graph traversal on the route array to obtain at least one route planning scheme that meets the constraint conditions.

[0047] This static routing planning method can automatically solve the routing planning scheme that satisfies the constraints under the network topology structure, such as non-deadlock constraints, by modeling, providing a more convenient method for obtaining routing planning schemes for complex network topologies.

[0048] The embodiments of the present disclosure are described in detail below with reference to the accompanying drawings, but the present disclosure is not limited to these specific embodiments.

[0049] Figure 2 A schematic flowchart of a static route planning method provided for at least one embodiment of the present disclosure.

[0050] For example, the static routing planning method is applied to a topology structure including multiple nodes, for example, the topology structure is a topology structure of a NUMA system, for example, the topology structure can also be a topology structure of an interconnection network system. That is to say, the static routing planning method includes but is not limited to planning static routing between nodes of a NUMA architecture, and can also be used to plan static routing between nodes of other interconnection network systems, and the present disclosure does not limit this.

[0051] For example, Figure 2 As shown, the static route planning method provided by the embodiment of the present disclosure includes steps S10 to S20. In step S10, a route array is created according to the connection relationship between multiple nodes.

[0052] For example, the routing array includes multiple array elements, each array element is used to store all routes to be planned between two nodes corresponding to each array element. For example, when the number of the multiple nodes is N, the routing array includes N*N array elements.

[0053] For example, step S10 may include: creating a storage structure according to the connection relationship between the multiple nodes; and creating a routing array according to the storage structure. For example, the storage structure is used to record the connection relationship between the multiple nodes.

[0054] For example, in some examples, the storage structure may be an adjacency list, for example, in other examples, the storage structure may be an adjacency matrix, and in the execution process of the static routing planning method, it may be designed to select a suitable storage structure by itself, and the present disclosure does not limit the specific form of the storage structure. In the embodiments of the present disclosure, the storage structure is an adjacency matrix as an example for description.

[0055] For example, the adjacency matrix includes matrix elements arranged in N rows and N columns, where N is a positive integer and represents the number of the plurality of nodes. In step S10, a storage structure is created according to the connection relationship between the plurality of nodes, including: for the i-th node and the j-th node in the plurality of nodes, where i and j are positive integers and are less than or equal to N: based on the connection relationship, determining the node state between the i-th node and the j-th node; and determining the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix according to the node state between the i-th node and the j-th node.

[0056] For example, according to the node status between the i-th node and the j-th node, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix are determined, including: in response to the node status between the i-th node and the j-th node indicating that the i-th node and the j-th node are directly connected, according to the line attribute between the i-th node and the j-th node, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column are determined to be a first value in response to the node status between the i-th node and the j-th node indicating that the i-th node and the j-th node are not directly connected; in response to the node status between the i-th node and the j-th node indicating that the i-th node and the j-th node are the same node, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix are determined to be a second value.

[0057] For example, the first value and the second value are different.

[0058] For example, the line attribute includes the line delay between the i-th node and the j-th node, and the value of the matrix element located at the i-th row and j-th column and the value of the matrix element located at the j-th row and i-th column are directly proportional to the line delay.

[0059] For example, since the connection relationship between multiple nodes is not directional, the adjacency matrix obtained by the connection relationship is a symmetric matrix. For example, in some examples, when the i-th node and the j-th node are the same node, at this time, i and j are the same, and the value of the matrix element in the i-th row and j-th column and the matrix element in the j-th row and i-th column are the same matrix element. In this case, the value of the matrix element in the i-th row and j-th column and the value of the matrix element in the j-th row and i-th column in the adjacency matrix are both the second value (for example, 0), that is, the values ​​of all matrix elements on the main diagonal of the adjacency matrix are the second value (for example, 0).

[0060] For example, in some examples, the i-th node and the j-th node are not directly connected. In this case, the value of the matrix element located at the i-th row and j-th column in the adjacency matrix and the value of the matrix element located at the j-th row and i-th column in the adjacency matrix are both the first value (for example, -1). For example, "not directly connected" here means that there is no physical direct route between the i-th node and the j-th node, and a connection needs to be established through other nodes. For example, Figure 1 As shown, node 0 and node 4 are not directly connected, and node 0 and node 7 are not directly connected.

[0061] For example, in some examples, the i-th node and the j-th node are directly connected. In this case, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix are both positive integers, and the value of the positive integer is directly proportional to the line delay between the i-th node and the j-th node, that is, the greater the line delay between the i-th node and the j-th node, the greater the value of the matrix element in the i-th row and j-th column and the value of the matrix element in the j-th row and i-th column. For example, "directly connected" here means that there is a physical direct route between the i-th node and the j-th node, for example, Figure 1 As shown, node 0 and node 1 are directly connected, and node 0 and node 2 are directly connected.

[0062] It should be noted that when the storage structure is an adjacency list, the weight used to record the connection relationship between two nodes in the adjacency list can also adopt the aforementioned method of determining the value of the matrix element of the adjacency matrix, and the present disclosure does not limit this.

[0063] For example, in some examples, in step S10, creating a routing array according to the storage structure may include: determining all routes to be planned between any two nodes among multiple nodes according to the storage structure; and using all routes to be planned between any two nodes as an array element of the routing array to create a routing array.

[0064] For example, when the topology structure includes N nodes (for example, the N nodes are node 0, node 1, node 2, node 3..., node N-1), the routing array has a total of N*N array elements, each of which is a vector type. For example, the (m*N+n)th array element of the routing array is used to store all routes to be planned between node m and node n.

[0065] For example, the first array element of the routing array stores all routes to be planned between node 0 and node 0 among multiple nodes. Since the communication between node 0 and node 0 belongs to intra-node communication, the first array element can be set to 0; for example, the second array element of the routing array stores all routes to be planned between node 0 and node 1 among multiple nodes. All routes to be planned between any two nodes can be obtained based on the storage structure. For example, in one example, according to the storage structure, it can be known that there are two possible routes between node 0 and node 1, namely route 0 and route 1. For example, route 0 is (node ​​0->node 2->node 3->node 1), and route 1 is (node ​​0->node 2->node 4->node 1). Then route 0 and route 1 are used as two routes to be planned between node 0 and node 1, and these two routes to be planned are used as the second array element of the routing array; and so on, so as to obtain all array elements of the routing array.

[0066] For example, Figure 2 As shown, in step S20, based on the constraint conditions, a graph traversal is performed on the routing array to obtain at least one routing planning solution that satisfies the constraint conditions.

[0067] Figure 3A for Figure 2 FIG. 1 is an example flow chart of step S20 in the static route planning method shown in FIG. Figure 3A As shown, an example of step S20 in the static route planning method may specifically include steps S201 and S202.

[0068] First, in step S201, all routes to be planned stored in each array element of the route array are sorted to obtain a sorted route array.

[0069] For example, after obtaining the route array, the route array is preprocessed first, that is, all the routes to be planned in each array element are sorted, so that the routes to be planned with better line properties and lower latency can be traversed first, so as to obtain a route planning solution that meets the constraints in the shortest time and reduce the execution time of the graph traversal.

[0070] For example, all routes to be planned in each array element can be sorted according to the values ​​of the matrix elements in the adjacency matrix (that is, the weights of the adjacency list). For example, step S201 may include: for the t-th array element of the routing array, respectively calculating the sum of T weights corresponding to the T routes to be planned stored in the t-th array element; sorting the T routes to be planned stored in the t-th array element based on the size relationship of the T weight sums to obtain the sorted t-th array element; based on all the sorted array elements, determining the sorted routing array. For example, the above-mentioned operation on the t-th array element is performed on all the array elements in the routing array respectively, so as to obtain all the sorted array elements, and all the sorted array elements constitute the sorted routing array.

[0071] For example, each weight sum of the T weight sums is calculated through the adjacency matrix and all nodes passed by the corresponding route to be planned, t is a positive integer and is less than or equal to the total number of array elements of the routing array, and T is a positive integer.

[0072] For example, for the ath route to be planned among T routes to be planned, when calculating the sum of the weights of the ath route to be planned, first determine all the nodes passed by the ath route to be planned; then, determine multiple node pairs among all the nodes passed by the ath route to be planned, for example, each node pair includes two directly connected nodes among all the nodes passed by the ath route to be planned; then, determine the routing weight corresponding to each node pair according to the adjacency matrix, for example, the routing weight here is the value of the matrix elements at corresponding positions in the adjacency matrix of the two directly connected nodes corresponding to each node pair, for example, in one example, a certain node pair includes the i-th node and the j-th node directly connected, and the routing weight can be the value of the matrix element in the i-th row and j-th column of the adjacency matrix or the value of the matrix element in the j-th row and i-th column; finally, add the routing weights corresponding to the multiple node pairs respectively to obtain the sum of the weights of the ath route to be planned.

[0073] For example, when the i-th node and the j-th node are directly connected, the values ​​of the matrix elements at the positions corresponding to the i-th node and the j-th node in the adjacency matrix (for example, the values ​​of the matrix elements at the corresponding positions are the values ​​of the matrix elements at the i-th row and j-th column or the values ​​of the matrix elements at the j-th row and i-th column in the adjacency matrix) are directly proportional to the line delay between the i-th node and the j-th node. Therefore, based on the size relationship of the T weight sums, the T routes to be planned stored in the t-th array element can be arranged in ascending order of the T weight sums, so that the routes to be planned with better line properties and lower delay are located in front of the array elements where they are located. Therefore, in the process of graph traversal, these routes to be planned can be first traversed to obtain the routing planning solution in the shortest time.

[0074] For example, in some embodiments, the constraint condition includes a non-deadlock constraint, that is, the at least one routing planning scheme mentioned above is a routing planning scheme that satisfies the non-deadlock constraint.

[0075] Step S202 may include: performing a graph traversal on the sorted routing array based on a non-deadlock constraint to obtain at least one routing planning solution.

[0076] For example, graph traversal may include depth first search (DFS) and breadth first search (BFS). For example, when the topology is relatively complex, the search efficiency of breadth first search is low. Compared with breadth first search, depth first search can find a routing plan that satisfies non-deadlock constraints in the shortest time, and the search efficiency is higher than breadth first search. For example, in at least one embodiment of the present disclosure, graph traversal is depth first search.

[0077] Figure 3B for Figure 3A FIG. 1 is an example flow chart of step S202 in the static route planning method shown in FIG. Figure 3B As shown, an example of step S202 in the static route planning method may specifically include steps S2021 to S2023.

[0078] In step S2021, each array element of the sorted routing array is used as a search layer, and each to-be-planned route in each array element of the sorted routing array is used as a search node of the search layer where each array element is located, so as to construct a routing graph.

[0079] In step S2022, a depth-first search is performed on the routing graph, and all search nodes in the routing graph are visited in sequence according to the depth-first search strategy, and the routes to be planned that meet the non-deadlock constraints are taken as planned routes, until all search nodes in the routing graph are traversed to obtain all planned routes corresponding to the routing graph.

[0080] In step S2023, at least one routing planning solution is obtained based on all planned routes corresponding to the routing graph.

[0081] For example, each routing planning scheme includes N*N planned routes, and the N*N planned routes belong to different search layers respectively.

[0082] Figure 3C A schematic diagram of a routing diagram provided by an embodiment of the present disclosure. Figure 3CAs shown, when the number of multiple nodes in the topological structure is N, the routing graph includes N*N search layers (search layer 0 to search layer N*N-1), which correspond to the N*N array elements of the routing array. Each search layer includes at least one search node, and each search node is a route to be planned in the array element corresponding to the search layer. For example, for the search layer (N*N-1), its corresponding array element includes (w+1) routes to be planned, which are respectively routes to be planned (Ww) to route to be planned W, that is, the search node of the search layer (N*N-1) includes routes to be planned (Ww) to route to be planned W, where W and w are positive integers, and the total number of routes to be planned in the routing array is (W+1), and w is the number of routes to be planned in the array element corresponding to the search layer (N*N-1). Figure 3C The process of constructing the routing graph in step S2021 is described.

[0083] For example, Figure 3CAs shown, for search layer 0, its corresponding array element includes a to-be-planned route 0, and the to-be-planned route 0 is used as the search node of search layer 0; for example, for search layer 1, its corresponding array element includes a to-be-planned route 1, and the to-be-planned route 1 is used as the search node of search layer 1 and a traversal relationship is established with the to-be-planned route 0; for example, for search layer 2, its corresponding array element includes a to-be-planned route 2, and the to-be-planned route 2 is used as the search node of search layer 2 and a traversal relationship is established with the to-be-planned route 1; for example, for search layer 3, its corresponding array element includes a to-be-planned route 3 and a to-be-planned route 4, and the to-be-planned route 3 and the to-be-planned route 4 are used as two search nodes of search layer 3, and are respectively associated with the to-be-planned route 1. The traversal relationship is established between the planned route 2 and the planned route 3, thereby generating two search branch paths in the search layer 3, the first search branch path of the two search branch paths in the search layer 3 includes the route 0 to be planned, the route 1 to be planned, the route 2 to be planned and the route 3 to be planned, and the second search branch path of the two search branch paths includes the route 0 to be planned, the route 1 to be planned, the route 2 to be planned and the route 4 to be planned; for example, for the search layer 4, the corresponding array element includes the route 5 to be planned, and the traversal relationship is established between the route 5 to be planned and the route 3 to be planned and the route 4 to be planned, respectively, and the first search branch path of the two search branch paths in the search layer 4 includes the route 0 to be planned, the route 1 to be planned, the route 2 to be planned and the route 4 to be planned Planning route 3 and route 5 to be planned, the second search branch path of the two search branch paths in the search layer 4 includes route 0 to be planned, route 1 to be planned, route 2 to be planned, route 4 to be planned and route 5 to be planned; for example, for search layer 5, its corresponding array elements include route 6 to be planned and route 7 to be planned, and traversal relationships are established between route 6 to be planned and route 7 to be planned and the two search nodes of search layer 4 respectively, thereby generating four search branch paths in search layer 5, wherein the first search branch path of the four search branch paths in search layer 5 includes route 0 to be planned, route 1 to be planned, route 2 to be planned, route 3 to be planned and route 5 to be planned, route 6 to be planned, and the search layer 5 The second search branch path of the four search branch paths includes route 0 to be planned, route 1 to be planned, route 2 to be planned, route 3 to be planned, route 5 to be planned, and route 7 to be planned. The third search branch path of the four search branch paths in search layer 5 includes route 0 to be planned, route 1 to be planned, route 2 to be planned, route 4 to be planned, route 5 to be planned, and route 6 to be planned. The fourth search branch path of the four search branch paths in search layer 5 includes route 0 to be planned, route 1 to be planned, route 2 to be planned, route 4 to be planned, route 5 to be planned, and route 7 to be planned. The construction process from search layer 6 to search layer (N*N-1) is the same as the above process and will not be repeated here. The above construction process is performed on all search layers to obtain a routing graph.

[0084] After the routing graph is constructed, all search nodes in the routing graph can be visited and non-deadlock constraint judged in sequence according to the search strategy of depth-first search to obtain at least one routing planning scheme that meets the non-deadlock constraint.

[0085] The search strategy of depth-first search is to search every possible branch path until it cannot go any deeper, and each node can only be visited once. For example, pruning can be used to terminate the depth-first search of the branch path where the search node that does not meet the non-deadlock constraint is located in advance, reducing unnecessary traversal processes, and obtaining a routing plan in the shortest time. For example, the pruning process here is feasibility pruning.

[0086] For example, step S2022 may include: performing a depth-first search on the routing graph to determine whether the current search node currently being visited and the search node that belongs to the same search branch path as the current search node and has been visited satisfy the non-deadlock constraint; in response to satisfying the non-deadlock constraint, marking the to-be-planned route corresponding to the current search node as a planned route, and continuing to visit the next search node according to the search strategy until all search nodes in the routing graph have been traversed; in response to not satisfying the non-deadlock constraint, performing pruning processing on the current search node.

[0087] For example, the search branch path includes multiple routes to be planned determined according to the search strategy, and the multiple routes to be planned belong to different search layers. Figure 3C In the routing graph shown, a possible search branch path (1) of the depth-first search is to traverse along the route to be planned with the number (1) all the way to the route to be planned (Ww) in the search layer (N*N-1), that is, the search branch path is: route to be planned 0->route to be planned 1->route to be planned 2->route to be planned 3->route to be planned 5->route to be planned 6->…->route to be planned (Ww).

[0088] According to the depth-first search strategy, when traversing to the search layer (N*N-1), since the end of the branch node has been reached and it cannot go deeper, it will return to the most recently visited search node in the search layer (N*N-2) to continue the depth-first search until all the search nodes in the routing graph are traversed. For example, Figure 3CThe search branch path (1) shown in the figure, when traversing along the search branch path (1) to the route to be planned (Ww) in the search layer (N*N-1), the search branch path (1) has reached the end of the branch node and cannot go deeper. At this time, it is possible to return to the search node that has been most recently visited in the search layer (N*N-2), that is, to return to the search node corresponding to the search branch path (1) in the return search layer (N*N-2), for example, the search node is the route to be planned (Wp), where p is a positive integer; then, the depth-first search is continued based on the route to be planned (Wp). For example, when the route to be planned (Wp) also forms a search branch path with the route to be planned (W-w+1) in the search layer (N*N-1), when the depth-first search is continued based on the route to be planned (Wp), the route to be planned (W-w+1) will be traversed; for another example, when the route to be planned (Wp) only forms a search branch path (1) with the route to be planned (Ww) in the search layer (N*N-1), at this time, the route to be planned (Wp) is returned to the most recently visited search node in the search layer (N*N-3) to continue the depth-first search.

[0089] Figure 3D FIG. 4 shows a schematic flow chart of a depth-first search according to an embodiment of the present disclosure. Figure 3D As shown in the figure, traverse_routes_dfs(current,res) means to perform a depth-first search according to the parameter current and store the marked planned routes into the parameter res, where the parameter current represents the current search layer where the current search node is located, and the parameter res stores all the planned routes corresponding to a search branch path where the current search node is located. If the current search node is located in the last search layer in the routing graph and satisfies the non-deadlock constraint, then all the planned routes stored in res can be used as a routing plan and the routing plan is stored; routes_possibility is a sorted routing array, routes_possibility[cu rrent] is the array element corresponding to the current search layer, routes_possibility[current].size() represents the number of routes to be planned in the array element corresponding to the current search layer; the parameter i represents the index value of the route to be planned in the array element corresponding to the current search layer, routes_possibility[current][i] represents the i-th route to be planned in the array element corresponding to the current search layer; traverse_routes_dfs(next,res) represents the execution of depth-first search according to the parameter next, wherein the parameter next represents the next search layer traversed after the current search layer in the traversal order of the depth-first search.

[0090] For example, the following Figure 3C and Figure 3D The execution process of steps S2022-S2023 is specifically described by taking an example.

[0091] First, the parameter current is initialized to 0, that is, the current search layer is search layer 0, that is, a depth-first search is performed on search layer 0. The array element corresponding to search layer 0 only has route 0 to be planned, and route 0 to be planned is marked as a planned route and stored in res, and the judgment of search layer 1 continues.

[0092] Next, the parameter current changes to 1, that is, the current search layer is search layer 1, and the only to-be-planned route corresponding to search layer 1 is to-be-planned route 1. Route 1 to be planned is used as the current search node to determine whether the non-deadlock constraint is satisfied between the current search node and route 0 to be planned. If the non-deadlock constraint is satisfied, route 1 to be planned is marked as a planned route and saved in res, and the judgment of search layer 2 is continued; if the non-deadlock constraint is not satisfied, pruning is performed on the current search node, that is, the traversal of the routing graph is stopped. For example, in some examples, route 0 to be planned and route 1 to be planned satisfy the non-deadlock constraint, and at this time, the judgment of search layer 2 can be continued.

[0093] Next, the parameter current changes to 2, that is, the current search layer is search layer 2. The judgment process is the same as that of search layer 1. Route 2 to be planned is used as the current search node to determine whether the current search node, route 0 to be planned, and route 1 to be planned meet the non-deadlock constraint. If the non-deadlock constraint is met, route 2 to be planned is marked as a planned route and saved in res, and the judgment of search layer 3 is continued; if the non-deadlock constraint is not met, pruning is performed on the current search node, that is, the traversal of the routing graph is stopped. For example, in some examples, route 2 to be planned, route 0 to be planned, and route 1 to be planned meet the non-deadlock constraint. At this time, the judgment of search layer 3 can be continued.

[0094] Next, the parameter current changes to 3, that is, the current search layer is search layer 3, which includes two routes to be planned ( Figure 3C The first route to be planned in the array element corresponding to the search layer 3, that is, the route to be planned 3, is used as the current search node. Since the search branch path where the route to be planned 3 is located includes Figure 3CIn the search branch path (1) composed of the to-be-planned route with number (1), first determine whether the to-be-planned route 3 and the search nodes (to-be-planned route 0, to-be-planned route 1, to-be-planned route 2) that have been visited in the search branch path (1) where the to-be-planned route 3 is located meet the non-deadlock constraint. If the non-deadlock constraint is met, mark the to-be-planned route 3 as a planned route and save it in res, and continue to execute the judgment on the search layer 4; if the non-deadlock constraint is not met, perform pruning on the current search node, that is, stop the subsequent search for the search branch path (1) composed of the to-be-planned route with number (1), and execute i++, so that the second to-be-planned route in the array element corresponding to the search layer 3, that is, the to-be-planned route 4 is used as the current search node to perform the above process, and the repeated parts will not be repeated. For example, in some examples, the to-be-planned route 3 and the to-be-planned route 0, the to-be-planned route 1, and the to-be-planned route 2 meet the non-deadlock constraint. At this time, the judgment on the search layer 4 can be continued.

[0095] Next, the parameter current is changed to 4. First, the route 5 to be planned in the search branch path (1), that is, the route 5 to be planned with number (1) in the search layer 4, is used as the current search node. Since the search branch path where the current search node is located is Figure 3C In the search branch path (1) composed of the to-be-planned routes with number (1), it is determined whether the non-deadlock constraint is satisfied between the current search node and the search nodes (to-be-planned route 0, to-be-planned route 1, to-be-planned route 2, to-be-planned route 3) that have been visited in the search branch path (1) where the current search node is located. Subsequent processing is performed based on the determination result. The specific process is as described above and will not be repeated here.

[0096] According to the above method, for example, if Figure 3C In the above example, all the routes with the number (1) from search layer 0 to search layer (N*N-2) are marked as planned routes and stored in res, and the parameter current becomes (N*N-1). That is, when traversing to search layer (N*N-1), if the current search node is the route (Ww) with the number (1), it is determined that the current search node belongs to the same search branch path (that is, Figure 3C Whether the search branch path (1) composed of the to-be-planned route with the number (1) in the search branch path (1) and the search nodes that have been visited meet the non-deadlock constraint. For example, if the non-deadlock constraint is met, the to-be-planned route (Ww) is marked as a planned route and saved in res. At this time, since the end of the search branch path (1) has been traversed, the N*N planned routes stored in res are stored as a routing planning scheme, and the subsequent traversal is continued according to the search strategy.

[0097] After obtaining at least one routing plan, a delay analysis may be performed on the routing plan to select a target plan whose average delay meets the requirements from the routing plan. Figure 4 As shown, the static route planning method provided by at least one embodiment of the present disclosure may further include steps S30-S40.

[0098] In step S30, at least one routing planning solution is parsed to obtain a parsing result.

[0099] In step S40, at least one target solution in at least one routing planning solution is determined according to the analysis result.

[0100] For example, step S30 may include: performing delay calculation on at least one routing planning scheme respectively to obtain the average delay corresponding to at least one routing planning scheme, for example, the analysis result includes the average delay corresponding to at least one routing planning scheme; and, at this time, step S40 may include: for the pth routing planning scheme among at least one routing planning scheme: in response to the average delay of the pth routing planning scheme being less than the preset average delay, the pth routing planning scheme is used as one of the target schemes among at least one target scheme.

[0101] For example, taking the pth routing planning scheme as an example, performing delay calculation on at least one routing planning scheme respectively to obtain the average delay corresponding to at least one routing planning scheme respectively may include: determining the N*N planned routes corresponding to the pth routing planning scheme; calculating the average delay values ​​corresponding to the N*N planned routes corresponding to the pth routing planning scheme respectively to obtain the N*N average delay values ​​corresponding to the pth routing planning scheme; performing addition processing on the N*N average delay values ​​corresponding to the pth routing planning scheme to obtain the average delay corresponding to the pth routing planning scheme.

[0102] For example, respectively calculating the average delay values ​​corresponding to the N*N planned routes corresponding to the p-th routing planning scheme to obtain the N*N average delay values ​​corresponding to the p-th routing planning scheme may include: for the q-th planned route among the N*N planned routes corresponding to the p-th routing planning scheme: determining all nodes passed by the q-th route to be planned; determining multiple node pairs among all the nodes passed by the q-th route to be planned, for example, each node pair includes two directly connected nodes among all the nodes passed by the q-th route to be planned; obtaining the average delay values ​​corresponding to the multiple node pairs through the adjacency matrix and the multiple communication probabilities corresponding to the multiple node pairs; performing summation processing on the average delay values ​​corresponding to the multiple node pairs to obtain the average delay value corresponding to the q-th planned route.

[0103] For example, obtaining the average delay values ​​corresponding to the multiple node pairs respectively through the adjacency matrix and the multiple communication probabilities corresponding to the multiple node pairs may include: for the bth node pair among the multiple node pairs, determining the values ​​of the matrix elements corresponding to the two nodes corresponding to the bth node pair in the adjacency matrix, for example, in one example, the bth node pair includes the i-th node and the j-th node directly connected, and the values ​​of the matrix elements corresponding to the two nodes corresponding to the b-th node pair in the adjacency matrix may be the values ​​of the matrix elements in the i-th row and j-th column of the adjacency matrix or the values ​​of the matrix elements in the j-th row and i-th column; multiplying the values ​​of the matrix elements corresponding to the b-th node pair by the communication probability corresponding to the b-th node pair to obtain the average delay value corresponding to the b-th node pair, for example, the communication probability corresponding to the b-th node pair is the probability value of communication occurring between the two nodes corresponding to the b-th node pair obtained based on experience, for example, 60%.

[0104] For example, the preset average delay may be determined based on experience.

[0105] In addition, since the amount of data communication between processes and threads in high-parallel and high-concurrency application scenarios is huge in many cases, data transmission across nodes must inevitably consider how the communication bandwidth can not exceed the upper limit and how the bandwidth can be evenly distributed.

[0106] Therefore, step S30 may also include: performing bandwidth measurement calculations on at least one routing planning scheme respectively to obtain the bandwidth distribution corresponding to at least one routing planning scheme, for example, the analysis result also includes the bandwidth distribution corresponding to at least one routing planning scheme; and, at this time, step S40 may include: for the pth routing planning scheme: in response to the average delay of the pth routing planning scheme being less than the preset average delay and the bandwidth distribution corresponding to the pth routing planning scheme indicating that the bandwidth distribution is balanced, the pth routing planning scheme is used as one of the at least one target schemes.

[0107] For example, the bandwidth distribution may include whether the bandwidth peak exceeds the maximum limit of the line bandwidth, bandwidth variance, bandwidth average, etc. The bandwidth peak, bandwidth variance, and bandwidth average are used as the basis for measuring the bandwidth performance of the routing planning solution (for example, whether the bandwidth distribution is balanced, etc.).

[0108] When the number of nodes in the topological structure is large, it takes a long time to obtain the target solution through depth-first search. Therefore, the traversal order of the depth-first search can be adjusted in time through annealing processing to obtain a routing planning solution that meets the requirements as soon as possible within a limited time.

[0109] The static routing planning scheme provided by at least one embodiment of the present disclosure also includes: in response to the execution time of the depth-first search exceeding the preset time or at least one routing planning scheme obtained within the preset time reaches a preset number, and the target scheme does not exist among the preset number of routing planning schemes, the depth-first search is stopped and the traversal order of the depth-first search is adjusted, and the depth-first search is re-executed according to the adjusted traversal order.

[0110] For example, at least one routing plan obtained during the execution of the depth-first search can be parsed, and the parsing result can be used as one of the conditions for stopping the depth-first search. For example, if at least one routing plan obtained during the execution of the depth-first search reaches a preset number, and there is no target plan among the preset number of routing plans, the depth-first search can be stopped directly without waiting for the execution time to exceed the preset time, the traversal order can be adjusted, and the depth-first search can be re-executed according to the adjusted traversal order; for example, when the execution time of the depth-first search exceeds the preset time, the depth-first search based on the current traversal order can be stopped, the traversal order can be adjusted, and the depth-first search can be re-executed according to the adjusted traversal order, and the at least one routing plan obtained can be parsed to determine the target plan in the at least one routing plan. In other words, the depth-first search and the parsing of the routing plan can be executed in parallel or sequentially, and the present disclosure does not limit this.

[0111] For example, the traversal order refers to Figure 3C The arrangement order of the search layers in the routing graph shown, adjusting the traversal order of the depth-first search may be adjusting the arrangement order of the search layers, for example, the current traversal order may be search layer 0->search layer 1->search layer 2->…->search layer (N*N-1), and the adjusted traversal order may be search layer (N*N-1)->search layer 0->search layer 1->…->search layer (N*N-2).

[0112] For example, to speed up the iteration sequence, the static route planning method provided by at least one embodiment of the present disclosure further includes: using multiple threads to perform graph traversal of the route array in parallel using different initial traversal orders. For example, hundreds of threads can be started at the same time according to design requirements to perform graph traversal of the route array at the same time, and each thread has a different initial traversal order, so as to obtain the target solution in the shortest possible time.

[0113] Figure 5A A logic diagram of a static route planning method provided by at least one embodiment of the present disclosure. Figure 5AAs shown, first, the topological structure of the static route to be planned is simplified and abstracted, that is, the connection relationship between multiple nodes in the topological structure is determined, so as to create a routing array according to the connection relationship between multiple nodes; then, the routing array is subjected to a depth-first search based on non-deadlock constraints to obtain at least one routing planning scheme that satisfies the non-deadlock constraints; then, at least one routing planning scheme is parsed and sorted, for example, at least one routing planning scheme is parsed separately to obtain the parsing result of each routing planning scheme, for example, the parsing result includes the average delay and bandwidth distribution corresponding to each routing planning scheme, and the target scheme is determined according to the parsing result of each routing planning scheme and sorted according to the parsing result, so as to perform subsequent processing. In addition, when static routing planning is performed on the topological structure, N threads can be established as needed, each thread has a different initial traversal order of depth-first search, and each thread executes the above process synchronously, so as to obtain the target scheme in the shortest time.

[0114] Figure 5B A flowchart of a static route planning method provided by at least one embodiment of the present disclosure is Figure 5A The specific execution flow of the static routing planning method in each thread is shown.

[0115] like Figure 5B As shown, first, a storage structure is created according to the connection relationship of multiple nodes in the topological structure. For the specific process, please refer to the related description of creating a storage structure according to the connection relationship between the multiple nodes in step S10, which will not be repeated here; then, a routing array is created according to the storage structure, and the routing array is sorted to obtain a processed routing array. The specific process is as described in step S201, which will not be repeated here; then, a graph traversal is performed on the sorted routing array, that is, a depth-first search. The specific process is as described in step S202, which will not be repeated here; then, at least one routing planning scheme obtained by the depth-first search is parsed to determine a target scheme in at least one routing planning scheme. The specific process is as described in steps S30 and S40, which will not be repeated here, and when the depth-first search meets certain conditions, the round of traversal is stopped. For example, the stopping condition can be that the execution time of the depth-first search exceeds the preset time or at least one routing planning scheme obtained within the preset time reaches a preset number, and there is no target scheme among the preset number of routing planning schemes; then, the traversal order is adjusted, and the depth-first search is re-executed according to the adjusted traversal order.

[0116] Corresponding to the above-mentioned static route planning method, at least one embodiment of the present disclosure further provides a static route planning device. Figure 6 A schematic block diagram of a static route planning device provided for at least one embodiment of the present disclosure.

[0117] For example, Figure 6 As shown, the static route planning device 600 includes: an array creation unit 601 and a planning unit 602 .

[0118] The array creation unit 601 is configured to create a routing array according to the connection relationship between multiple nodes. For example, the routing array includes multiple array elements, each array element is used to store all routes to be planned between two nodes corresponding to each array element.

[0119] The planning unit 602 is configured to perform a graph traversal on the routing array based on the constraint conditions to obtain at least one routing planning solution that meets the constraint conditions.

[0120] For example, the array creation unit 601 and the planning unit 602 include codes and programs stored in a memory; the processor can execute the codes and programs to implement some or all of the functions of the array creation unit 601 and the planning unit 602 as described above. For example, the array creation unit 601 and the planning unit 602 can be dedicated hardware devices used to implement some or all of the functions of the array creation unit 601 and the planning unit 602 as described above. For example, the array creation unit 601 and the planning unit 602 can be a circuit board or a combination of multiple circuit boards, used to implement the functions described above. In an embodiment of the present application, the circuit board or the combination of multiple circuit boards may include: (1) one or more processors; (2) one or more non-temporary memories connected to the processor; and (3) firmware stored in the memory that can be executed by the processor.

[0121] It should be noted that the array creation unit 601 is used to implement Figure 2 In step S10 shown, the planning unit 602 is used to implement Figure 2 The step S20 shown. Therefore, the specific description of the array creation unit 601 can refer to the embodiment of the static route planning method described above. Figure 2 For the description of step S10 shown in FIG. 1 and the specific description of the planning unit 602, reference can be made to the embodiment of the static route planning method described above. Figure 2 The relevant description of step S20 is shown. In addition, the static route planning device can achieve the technical effect similar to the above-mentioned static route planning method, which will not be described in detail here.

[0122] At least one embodiment of the present disclosure further provides an electronic device, Figure 7 A schematic block diagram of an electronic device provided for at least one embodiment of the present disclosure.

[0123] For example, Figure 7As shown, the electronic device includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004. The processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004. The components such as the processor 1001, the communication interface 1002, and the memory 1003 can also communicate with each other through a network connection. The present disclosure does not limit the type and function of the network.

[0124] For example, the memory 1003 is used to store computer executable instructions non-transiently. When the processor 1001 is used to run the computer executable instructions, the computer executable instructions are executed by the processor 1001 to implement the static route planning method according to any of the above embodiments. The specific implementation of each step of the static route planning method and the related explanation content can be referred to the embodiment of the static route planning method, which will not be repeated here.

[0125] For example, the implementation manner in which the processor 1001 executes the program stored in the memory 1003 to implement the static route planning method is the same as the implementation manner mentioned in the embodiment of the aforementioned static route planning method, and will not be repeated here.

[0126] For example, the communication bus 1004 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industrial Standard Architecture (EISA) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0127] For example, the communication interface 1002 is used to implement communication between the electronic device and other devices.

[0128] For example, the processor 1001 and the memory 1003 may be arranged on a server side (or a cloud side).

[0129] For example, the processor 1001 can control other components in the electronic device to perform the desired functions. The processor 1001 can be a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The central processing unit (CPU) can be an X86 or ARM architecture, etc.

[0130] For example, the memory 1003 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer executable instructions may be stored on the computer-readable storage medium, and the processor 1001 may run the computer executable instructions to implement various functions of the electronic device. Various applications and various data may also be stored in the storage medium.

[0131] For example, for a detailed description of the process of the electronic device executing static route planning, reference may be made to the relevant description in the embodiment of the static route planning method, and the repeated parts will not be repeated.

[0132] Figure 8 A schematic diagram of a non-transitory computer-readable storage medium provided for at least one embodiment of the present disclosure. Figure 8 As shown, one or more computer executable instructions 1101 may be non-temporarily stored on the storage medium 1100. For example, when the computer executable instructions 1101 are executed by a processor, one or more steps in the static route planning method described above may be executed.

[0133] For example, the storage medium 1100 may be applied to the above-mentioned electronic device and / or the static route planning device 1400. For example, the storage medium 1100 may include the memory 1003 in the electronic device.

[0134] For example, the description of the storage medium 1100 may refer to the description of the memory in the embodiment of the electronic device, and the repeated parts will not be repeated.

[0135] Fig. 9 A schematic diagram of a hardware environment provided for at least one embodiment of the present disclosure is shown. The electronic device provided by the present disclosure can be applied in an Internet system.

[0136] use Fig. 9The computer system provided in can implement the functions of the static route planning device and / or electronic device involved in the present disclosure. Such computer systems may include personal computers, laptops, tablets, mobile phones, personal digital assistants, smart glasses, smart watches, smart rings, smart helmets and any smart portable devices or wearable devices. The specific system in this embodiment uses a functional block diagram to explain a hardware platform including a user interface. This computer device may be a general-purpose computer device or a computer device with a specific purpose. Both computer devices can be used to implement the static route planning device and / or electronic device in this embodiment. The computer system may include any components that implement the information required to implement the static route planning currently described. For example, the computer system can be implemented by a computer device through its hardware devices, software programs, firmware and combinations thereof. For convenience, Fig. 9 Only one computer device is drawn in the figure, but the relevant computer functions of the information required to implement static route planning described in this embodiment can be implemented in a distributed manner by a group of similar platforms to disperse the processing load of the computer system.

[0137] like Fig. 9 As shown, the computer system may include a communication port 250, connected to which is a network for realizing data communication. For example, the computer system can send and receive information and data through the communication port 250, that is, the communication port 250 can realize wireless or wired communication between the computer system and other electronic devices to exchange data. The computer system may also include a processor group 220 (i.e., the processor described above) for executing program instructions. The processor group 220 may be composed of at least one processor (e.g., a CPU). The computer system may include an internal communication bus 210. The computer system may include different forms of program storage units and data storage units (i.e., the memory or storage medium described above), such as a hard disk 270, a read-only memory (ROM) 230, and a random access memory (RAM) 240, which can be used to store various data files used for computer processing and / or communication, and possible program instructions executed by the processor group 220. The computer system may also include an input / output component 260, which is used to realize input / output data flow between the computer system and other components (e.g., a user interface 280, etc.).

[0138] Typically, the following devices can be connected to the input / output component 260: input devices including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices including, for example, a magnetic tape, a hard disk, etc.; and a communication interface.

[0139] Although Fig. 9 A computer system having various devices is shown, but it should be understood that the computer system is not required to have all of the devices shown, and the computer system may alternatively have more or fewer devices.

[0140] There are a few points to note about this disclosure:

[0141] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure, and other structures may refer to the general design.

[0142] (2) For the sake of clarity, the thickness and size of layers or structures are exaggerated in the drawings used to describe the embodiments of the present invention. It is understood that when an element such as a layer, film, region, or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element, or there may be intervening elements.

[0143] (3) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.

[0144] The above description is only a specific implementation of the present disclosure, but the protection scope of the present disclosure is not limited thereto. The protection scope of the present disclosure shall be based on the protection scope of the claims.

Claims

1. A static routing planning method, applied to a topology structure including a plurality of nodes, wherein: The method comprises: Creating a routing array according to the connection relationship between the multiple nodes, wherein the routing array includes multiple array elements, each of which is used to store all routes to be planned between two nodes corresponding to each array element; Based on the constraint conditions, performing a graph traversal on the routing array to obtain at least one routing planning scheme that satisfies the constraint conditions; Wherein, the constraint condition includes a non-deadlock constraint, and based on the constraint condition, the routing array is graph traversed to obtain at least one routing planning scheme that satisfies the constraint condition, including: Taking each array element as a unit, sorting all the routes to be planned stored in each array element of the routing array to obtain a sorted routing array; wherein in the sorted routing array, all the routes to be planned stored in each array element are arranged in order from low to high according to line delay; and Based on the non-deadlock constraint, performing the graph traversal on the sorted routing array to obtain the at least one routing planning solution, wherein performing the graph traversal on the sorted routing array includes performing multiple graph traversals on the sorted routing array with different initial traversal orders; The graph traversal is a depth-first search, Based on the non-deadlock constraint, performing a graph traversal on the sorted routing array to obtain the at least one routing planning solution includes: Taking each array element of the sorted routing array as a search layer, taking each to-be-planned route in each array element of the sorted routing array as a search node of the search layer where each array element is located, so as to construct a routing graph; Performing the depth-first search on the routing graph, sequentially accessing all search nodes in the routing graph according to the search strategy of the depth-first search, taking the to-be-planned routes that satisfy the non-deadlock constraint as the planned routes, until all search nodes in the routing graph are traversed to obtain all planned routes corresponding to the routing graph; Based on all the planned routes corresponding to the routing graph, obtaining the at least one routing planning solution, Each of the routing planning schemes includes N*N planned routes, the N*N planned routes belong to different search layers respectively, and N is a positive integer and represents the number of the multiple nodes.

2. The method according to claim 1, wherein: Creating the routing array according to the connection relationship between the multiple nodes includes: Creating a storage structure according to the connection relationship between the multiple nodes, wherein the storage structure is used to record the connection relationship between the multiple nodes; The routing array is created according to the storage structure.

3. The method according to claim 2, wherein: The storage structure is an adjacency matrix, the adjacency matrix includes matrix elements arranged in N rows and N columns, N is a positive integer and represents the number of the plurality of nodes, Creating the storage structure according to the connection relationship between the multiple nodes includes: For the i-th node and the j-th node in the plurality of nodes, where i and j are positive integers and are less than or equal to N: Based on the connection relationship, determining a node state between the i-th node and the j-th node; According to the node status between the i-th node and the j-th node, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix are determined.

4. The method according to claim 3, wherein: Determining, according to the node state between the i-th node and the j-th node, the value of the matrix element located in the i-th row and j-th column and the value of the matrix element located in the j-th row and i-th column in the adjacency matrix, comprising: In response to a node state between the i-th node and the j-th node indicating that the i-th node and the j-th node are directly connected, determining a value of a matrix element located at the i-th row and j-th column and a value of a matrix element located at the j-th row and i-th column according to a line attribute between the i-th node and the j-th node; In response to a node state between the ith node and the jth node indicating that the ith node and the jth node are not directly connected, determining a value of a matrix element located at the ith row and jth column and a value of a matrix element located at the jth row and ith column to be a first value; In response to a node state between the ith node and the jth node indicating that the ith node and the jth node are the same node, determining a value of a matrix element located at the ith row and jth column and a value of a matrix element located at the jth row and ith column in the adjacency matrix as a second value; The first value and the second value are different.

5. The method according to claim 4, wherein: The line attributes include a line delay between the i-th node and the j-th node, The value of the matrix element located at the i-th row and j-th column and the value of the matrix element located at the j-th row and i-th column are directly proportional to the line delay.

6. The method according to claim 2, wherein: Creating the routing array according to the storage structure includes: Determine all routes to be planned between any two nodes among the multiple nodes according to the storage structure; All routes to be planned between any two nodes are taken as an array element of the route array to create the route array.

7. The method according to claim 3, wherein: Sorting all the routes to be planned stored in each array element of the route array to obtain a sorted route array, including: For the t-th array element of the routing array, T weight sums corresponding to the T routes to be planned stored in the t-th array element are calculated respectively, wherein each weight sum of the T weight sums is calculated by the adjacency matrix and all nodes passed by the routes to be planned corresponding to each weight sum, Sorting the T routes to be planned stored in the t-th array element based on the magnitude relationship of the T weight sums to obtain a sorted t-th array element; Based on all the sorted array elements, determining the sorted routing array, Wherein, t is a positive integer and is less than or equal to the total number of array elements of the routing array, and T is a positive integer.

8. The method according to claim 3, wherein: The depth-first search is performed on the routing graph, all search nodes in the routing graph are accessed in sequence according to the search strategy of the depth-first search, and the routes to be planned that satisfy the non-deadlock constraint are taken as planned routes, until all search nodes in the routing graph are traversed to obtain all planned routes corresponding to the routing graph, including: Performing the depth-first search on the routing graph to determine whether the non-deadlock constraint is satisfied between the currently visited search node and the visited search nodes that belong to the same search branch path as the current search node, In response to satisfying the non-deadlock constraint, marking the to-be-planned route corresponding to the current search node as a planned route, and continuing to access the next search node according to the search strategy until all search nodes in the routing graph are traversed; In response to not satisfying the non-deadlock constraint, performing pruning processing on the current search node, The search branch path includes a plurality of routes to be planned determined according to the search strategy, and the plurality of routes to be planned belong to different search layers respectively.

9. The method according to claim 3, further comprising: Parsing the at least one routing planning scheme to obtain a parsing result; At least one target solution in the at least one routing planning solution is determined according to the parsing result.

10. The method according to claim 9, wherein: Parsing the at least one routing planning solution to obtain a parsing result includes: Performing delay calculation on the at least one routing plan respectively to obtain an average delay corresponding to the at least one routing plan, wherein the analysis result includes the average delay corresponding to the at least one routing plan; and Determining at least one target solution in the at least one routing planning solution according to the parsing result includes: For the pth routing plan in the at least one routing plan: In response to the average delay of the p-th routing planning solution being less than a preset average delay, the p-th routing planning solution is used as one of the at least one target solution.

11. The method according to claim 10, wherein: Performing delay calculation on the at least one routing planning scheme respectively to obtain an average delay corresponding to the at least one routing planning scheme respectively includes: Determine N*N planned routes corresponding to the p-th routing planning scheme; Respectively calculating the average delay values ​​corresponding to the N*N planned routes corresponding to the p-th routing planning scheme, so as to obtain the N*N average delay values ​​corresponding to the p-th routing planning scheme; Perform a summation process on the N*N average delay values ​​corresponding to the p-th routing planning scheme to obtain the average delay corresponding to the p-th routing planning scheme.

12. The method according to claim 11, wherein: Respectively calculating the average delay values ​​corresponding to the N*N planned routes corresponding to the p-th routing planning scheme to obtain the N*N average delay values ​​corresponding to the p-th routing planning scheme, including: For the qth planned route among the N*N planned routes corresponding to the pth routing planning solution: Determine all nodes that the qth route to be planned passes through; Determine a plurality of node pairs among all the nodes, wherein each node pair includes two directly connected nodes among all the nodes; Obtaining average delay values ​​corresponding to the plurality of node pairs respectively through the adjacency matrix and the plurality of communication probabilities corresponding to the plurality of node pairs respectively; The average delay values ​​corresponding to the multiple node pairs are summed up to obtain the average delay value corresponding to the qth planned route.

13. The method according to claim 10, wherein: Parsing the at least one routing planning solution to obtain a parsing result further includes: Perform bandwidth measurement calculations on the at least one routing plan respectively to obtain bandwidth distribution conditions corresponding to the at least one routing plan respectively, wherein the analysis result also includes bandwidth distribution conditions corresponding to the at least one routing plan respectively; and Determining at least one target solution in the at least one routing planning solution according to the parsing result includes: For the pth routing plan: In response to the average delay of the pth routing planning scheme being less than the preset average delay and the bandwidth distribution corresponding to the pth routing planning scheme indicating balanced bandwidth distribution, the pth routing planning scheme is used as one of the at least one target scheme.

14. The method according to any one of claims 9 to 13, further comprising: In response to the execution time of the depth-first search exceeding a preset time or the at least one routing planning scheme obtained within the preset time reaches a preset number, and there is no target scheme among the preset number of routing planning schemes, the depth-first search is stopped and the traversal order of the depth-first search is adjusted, and the depth-first search is re-executed according to the adjusted traversal order.

15. The method according to any one of claims 1 to 13, further comprising: The graph traversal is performed on the routing array in parallel by using multiple threads with different initial traversal orders.

16. The method according to any one of claims 1 to 13, wherein: The topology structure is a topology structure of a non-uniform memory access architecture.

17. A static route planning device, applied to a topological structure including a plurality of nodes, wherein: The device comprises: An array creation unit, configured to create a routing array according to the connection relationship between the plurality of nodes, wherein the routing array includes a plurality of array elements, each of the array elements being used to store all routes to be planned between two nodes corresponding to each of the array elements; A planning unit, configured to perform a graph traversal on the routing array based on the constraint conditions to obtain at least one routing planning scheme that satisfies the constraint conditions; Wherein, the planning unit is configured as follows: Taking each array element as a unit, sorting all the routes to be planned stored in each array element of the routing array to obtain a sorted routing array; wherein in the sorted routing array, all the routes to be planned stored in each array element are arranged in order from low to high according to line delay; and Based on the non-deadlock constraint, performing the graph traversal on the sorted routing array to obtain the at least one routing planning scheme, wherein performing the graph traversal on the sorted routing array includes performing multiple graph traversals on the sorted routing array with different initial traversal orders; The graph traversal is a depth-first search, Based on the non-deadlock constraint, performing a graph traversal on the sorted routing array to obtain the at least one routing planning solution includes: Taking each array element of the sorted routing array as a search layer, taking each to-be-planned route in each array element of the sorted routing array as a search node of the search layer where each array element is located, so as to construct a routing graph; Performing the depth-first search on the routing graph, sequentially accessing all search nodes in the routing graph according to the search strategy of the depth-first search, taking the to-be-planned routes that satisfy the non-deadlock constraint as the planned routes, until all search nodes in the routing graph are traversed to obtain all planned routes corresponding to the routing graph; Based on all the planned routes corresponding to the routing graph, obtaining the at least one routing planning solution, Each of the routing planning schemes includes N*N planned routes, the N*N planned routes belong to different search layers respectively, and N is a positive integer and represents the number of the multiple nodes.

18. An electronic device comprising: A memory non-transitorily stores computer executable instructions; a processor configured to execute the computer executable instructions, Wherein, when the computer executable instructions are executed by the processor, the static route planning method according to any one of claims 1-16 is implemented.

19. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the static route planning method according to any one of claims 1-16 is implemented.

Citation Information

Patent Citations

  • QoS-based Ad Hoc network adaptive node speed multi-path routing method

    CN101980565A

  • AGV shortest path planning method, device and computer readable storage medium

    CN111832844A

  • Dynamic multi-strategy end-to-end routing calculation method and system applied to PTN

    CN111935011A