Routing method and device applied to semi-regular grid network, equipment and storage medium
By performing multiple rounds of path optimization and update processing row by row in the semi-regular grid network, and optimizing the path with the neighbor node relationship of the node, the problem of low computational efficiency in the satellite communication network is solved, and communication efficiency is improved.
Patent Information
- Application Number
- CN202510808707.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-16
- Publication Date
- 2025-08-08
AI Technical Summary
The existing shortest path algorithm is incomputed in a satellite communication network with semi-regular grid structure, which is difficult to meet the needs of real-time path updates, affecting the real-time and overall performance of the communication system.
By performing multiple rounds of path optimization and update process row by row, using the structural characteristics of the semi-rule grid network, each node has four neighbor nodes: up, down, left and right, and calculates the shortest path from the source node to each node, including multiple rounds of path optimization and updates from the row where the source node is located to the up and down row by row, and updates the parent node of the target node to optimize the path distance.
It significantly reduces the delay caused by changes in network structure, improves the communication efficiency of satellite communication networks, and is suitable for large-scale semi-regular grid network scenarios.
Smart Images

Figure CN120455353A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of network topology, and in particular to routing methods, devices, equipment, and storage media applied to semi-regular grid networks. Background Art
[0002] In graph theory, the shortest path problem is a classic optimization problem. Its goal is to find a path from a source node to other nodes such that the path distance from the source node to other nodes is the shortest. Traditional shortest path algorithms, such as the highly versatile Dijkstra algorithm, gradually select the currently undetermined nodes closest to the source node, ultimately generating a shortest path tree from the source node to all nodes. The Dijkstra algorithm is versatile and applicable to any network topology. However, it is based solely on local optimal selection and does not fully utilize the topological characteristics of a specific network structure for optimization, resulting in low efficiency in generating shortest paths in some scenarios.
[0003] In specific scenarios, such as satellite communication networks, the network topology exhibits a semi-regular grid structure, with each satellite node connected to adjacent satellite nodes via weighted edges, forming a regular but dynamically changing topology. Because link weights in satellite communication networks are affected by factors such as transmission delay, bandwidth, and congestion, the network topology frequently changes, requiring frequent path updates. Existing shortest path algorithms face a heavy computational burden in such structured and dynamically changing networks, making it difficult to meet the demands of real-time path updates. Therefore, in satellite communication networks with a semi-regular grid structure, traditional shortest path algorithms have certain limitations in computational efficiency, which can affect the real-time nature and overall performance of the communication system. Summary of the Invention
[0004] Based on the above problems, the embodiments of the present application provide routing methods, devices, equipment and storage media applied to semi-regular grid networks, with the aim of improving the efficiency of shortest path calculation in semi-regular grid networks and ultimately achieving improved communication efficiency of satellite communication networks.
[0005] In a first aspect, an embodiment of the present application provides a routing method applied to a semi-regular grid network, comprising:
[0006] Obtaining network topology information of the current semi-regular grid network; the network topology information includes path distances between nodes; the nodes include source nodes and target nodes; the target nodes refer to the remaining nodes in the semi-regular grid network except the source nodes;
[0007] For the rsth row where the source node is located, determine the shortest path and distance from the source node to each target node in the rsth row according to the network topology information;
[0008] Starting from row rs-1, multiple rounds of path optimization and update are performed row by row in the direction from row rs-1 to the first row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update of the first row is completed;
[0009] Starting from row rs+1, multiple rounds of path optimization and update are performed row by row in the direction from row rs+1 to the last row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update of the last row is completed;
[0010] Among them, for the current row, the multiple rounds of path optimization update processing include changing the candidate parent node of each target node in the current row to the neighboring node of each target node in multiple rounds, calculating the current path distance from the source node through the candidate parent node of each target node to each target node, if the calculated path distance is less than the original path distance from the source node to the target node, then updating the parent node of the target node to the current candidate parent node, and updating the path distance from the source node to the target node.
[0011] In one embodiment, determining, for the rsth row where the source node is located, the shortest path and distance from the source node to each target node in the rsth row according to the network topology information includes:
[0012] For each target node on the left side of the source node in the rsth row where the source node is located, set the parent node of the target node to the right node of the target node, and update the path distance from the source node to each target node;
[0013] For each target node located to the right of the source node in the rsth row where the source node is located, the parent node of the target node is set to the left node of the target node, and the path distance from the source node to each target node is updated.
[0014] In one embodiment, the performing of multiple rounds of path optimization update processing row by row starting from row rs-1 and in a direction from row rs-1 to row 1 includes a first round of upward updating; the first round of upward updating includes:
[0015] For each target node in the current row, the parent node of the target node is set as the child node of the target node, and the path distance from the source node to the target node is updated.
[0016] In one embodiment, the performing of multiple rounds of path optimization update processing row by row starting from row rs-1 and in a direction from row rs-1 to row 1 includes a second round of upward updating; the second round of upward updating includes:
[0017] For each target node except the leftmost target node in the current row, set the candidate parent node of the target node to the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0018] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
[0019] In one embodiment, the path optimization update process of performing multiple rounds row by row starting from row rs-1 and in a direction from row rs-1 to row 1 includes a third round of upward update; the third round of upward update includes:
[0020] For each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0021] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
[0022] In one embodiment, the performing of multiple rounds of path optimization update processing row by row starting from the rs+1th row and in a direction from the rs+1th row to the last row includes a first round of downward updating; the first round of downward updating includes:
[0023] For each target node in the current row, the parent node of the target node is set as the parent node of the target node, and the path distance from the source node to the target node is updated.
[0024] In one embodiment, the performing of multiple rounds of path optimization update processing row by row starting from the rs+1th row and in a direction from the rs+1th row to the last row includes a second round of downward updating; the second round of downward updating includes:
[0025] For each target node except the leftmost target node in the current row, set the candidate parent node of the target node to the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0026] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
[0027] In one embodiment, the performing of multiple rounds of path optimization update processing row by row starting from the rs+1th row and in a direction from the rs+1th row to the last row includes a third round of downward updating; the third round of downward updating includes:
[0028] For each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0029] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
[0030] In a second aspect, an embodiment of the present application further provides a routing device applied to a semi-regular grid network, comprising:
[0031] The first module is used to obtain network topology information of the current semi-regular grid network; the network topology information includes the path distance between each node; the nodes include source nodes and target nodes; the target nodes refer to the nodes in the semi-regular grid network other than the source nodes;
[0032] The second module determines, for the rsth row where the source node is located, the shortest path and distance from the source node to each target node in the rsth row according to the network topology information;
[0033] The third module is used to perform multiple rounds of path optimization and update processing on each row starting from row rs-1 and in the direction from row rs-1 to row 1, to determine the shortest path and distance from the source node to each target node in the current row, until the path optimization and update processing of the first row is completed;
[0034] The fourth module is used to perform multiple rounds of path optimization and update processing on each row starting from the rs+1th row and in the direction from the rs+1th row to the last row, to determine the shortest path and distance from the source node to each target node in the current row, until the path optimization and update processing of the last row is completed;
[0035] Among them, for the current row, the multiple rounds of path optimization update processing include changing the candidate parent node of each target node in the current row to the neighboring node of each target node in multiple rounds, calculating the current path distance from the source node through the candidate parent node of each target node to each target node, if the calculated path distance is less than the original path distance from the source node to the target node, then updating the parent node of the target node to the current candidate parent node, and updating the path distance from the source node to the target node.
[0036] In a third aspect, an embodiment of the present application further provides a computer device, including:
[0037] CPU, memory, input and output interfaces;
[0038] The memory is a transient storage memory or a persistent storage memory;
[0039] The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform any one of the above-mentioned routing methods applied to a semi-regular grid network.
[0040] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, any one of the above-described routing methods applied to a semi-regular grid network is executed.
[0041] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0042] The embodiments of the present application fully utilize the structural characteristics of a semi-regular grid network, namely that each node has four neighboring nodes: above, below, left, and right, and the distances between neighboring nodes in a certain dimension are equal. By processing row by row, the present invention can calculate the shortest path from the source node to each node in a shorter time. It can be seen that the embodiments of the present application are suitable for large-scale scenarios that conform to a semi-regular grid network structure, such as satellite communications, and can significantly reduce the delay caused by updating the shortest path due to changes in the network structure, thereby potentially improving communication efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0044] Figure 1 A schematic diagram of a grid network structure provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a half-grid network structure provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a lengthy path provided in an embodiment of the present application;
[0047] Figure 4 A schematic diagram of the overall flow of a routing method applied to a semi-regular grid network provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of a specific implementation flow of a routing method applied to a semi-regular grid network provided in an embodiment of the present application;
[0049] Figure 6 The processing provided in the embodiment of this application is completed Figure 2 Schematic diagram of the result after the row where the source node is located;
[0050] Figure 7 A Try_to_Improve operation diagram provided in an embodiment of the present application;
[0051] Figure 8 A method for Figure 2 Schematic diagram of the process steps for performing multiple rounds of path optimization and update on the row above the source node;
[0052] Figure 9 A method corresponding to the embodiment of the present application is provided Figure 2 The shortest path diagram;
[0053] Figure 10 A schematic structural diagram of a routing device applied to a semi-regular grid network provided in an embodiment of the present application;
[0054] Figure 11 A schematic diagram of the computer device structure provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0056] In graph theory, the shortest path problem is a classic optimization problem. Its goal is to find a path from a source node to other nodes such that the path distance from the source node to other nodes is the shortest. Traditional shortest path algorithms, such as the highly versatile Dijkstra algorithm, gradually select the currently undetermined nodes closest to the source node, ultimately generating a shortest path tree from the source node to all nodes. The Dijkstra algorithm is versatile and applicable to any network topology. However, it is based solely on local optimal selection and does not fully utilize the topological characteristics of a specific network structure for optimization, resulting in low efficiency in generating shortest paths in some scenarios.
[0057] In specific scenarios, such as satellite communication networks, the network topology exhibits a semi-regular grid structure, with each satellite node connected to adjacent satellite nodes via weighted edges, forming a regular but dynamically changing topology. Because link weights in satellite communication networks are affected by factors such as transmission delay, bandwidth, and congestion, the network topology frequently changes, requiring frequent path updates. Existing shortest path algorithms face a heavy computational burden in such structured and dynamically changing networks, making it difficult to meet the demands of real-time path updates. Therefore, in satellite communication networks with a semi-regular grid structure, traditional shortest path algorithms have certain limitations in computational efficiency, which can affect the real-time nature and overall performance of the communication system.
[0058] Before further elaborating on the method, the objects and technologies that may be involved in the embodiments of the present application are first introduced.
[0059] 1. Grid network.
[0060] Grid network is a common network topology. Figure 1 , Figure 1 In the graph, each circle represents a node, and the number in the circle represents the node number. The line segment between two nodes represents the link between the two nodes, and the number on the line segment represents the length of the link.
[0061] The grid network has only one source node. Figure 1The source node is node 7. In addition, the link between the first and last rows of the grid network is disconnected (no edge connected), and the link between the first and last columns is also disconnected. Its internal nodes have four neighboring nodes, namely the upper, lower, left, and right nodes. For example, node 7 has four neighboring nodes: upper node 2, lower node 12, left node 6, and right node 8. For the nodes on the edge (in Figure 1 In the example, nodes 1-6, 10, 11, 15, 16-20) have their links disconnected, and their neighboring nodes have removed some of the nodes with disconnected links from the original four neighboring nodes. Figure 1 For node 16 in the example, since there is no link between node 1 and nodes 1 and 20, its only neighbors are node 11 above and node 17 to the right. In a general grid network, the length of a link (the distance between two neighboring nodes) can be any positive value.
[0062] 2. Semi-regular grid network.
[0063] A semi-regular grid network is a special type of grid network, characterized by the same length of links between adjacent nodes in a certain dimension. Figure 2 , the distance between neighboring nodes in the horizontal direction of this network is constant, all 5, but in the vertical direction, there is no restriction on the link distance.
[0064] The semi-regular grid network has a simple structure, is easy to implement and maintain, and has a wide range of application scenarios, such as satellite communications. The distribution of orbiting satellites in space can be simplified as a semi-regular grid network. Normally, satellites are arranged relatively evenly in longitude (horizontally) and are approximately the same distance apart. However, in latitude (vertically), due to different orbital altitudes or distribution strategies, the distances between satellites may vary significantly. In addition, each satellite usually has communication links with four neighboring satellites, which corresponds to the structural characteristics of a semi-regular grid network.
[0065] The following will explain the traditional shortest path calculation method in the prior art. The existing dynamic routing algorithm applicable to semi-regular grid networks is generally the Dijkstra algorithm. The Dijkstra algorithm is a greedy algorithm for finding the shortest path in a weighted graph. The main idea of the algorithm is to continuously select the point closest to the source node from the points that have not been added to the shortest path tree, and make it the determined shortest path point, and then update the distance from other nodes to the source node. This algorithm is universal and applicable to all scenarios for finding the shortest path. However, in networks with special structures such as semi-regular grid networks, traditional algorithms lack adaptive optimization of network structure characteristics, resulting in low efficiency in generating the shortest path. Especially when the network structure changes dynamically, it may cause a large path update delay, thereby affecting the overall efficient operation of the network.
[0066] For the network characteristics of semi-regular grid networks, please refer to Figure 3 .exist Figure 3 In the example, the shortest path from source node 7 to node 14 cannot be: 7→12→17→18→19→14. This path passes through the third row (node 12), reaches the fourth row (nodes 17 and 18), and finally returns to node 14 in the third row. Because the horizontal distances are the same, the path 7→12→17→18→19→14 has the extra lengths 12→17 and 19→14 compared to the path 7→12→13→14, and therefore is definitely not the shortest path.
[0067] Based on this, various embodiments of the present application propose a fast dynamic routing algorithm suitable for a semi-regular grid network, aiming to fully utilize the structural characteristics of the semi-regular grid network and more quickly calculate the shortest path from the source node to each node.
[0068] The following is a further detailed description of the various embodiments of the present application in conjunction with the accompanying drawings.
[0069] In a semi-regular grid network, the shape is usually rectangular. For convenience, it is assumed that the distances in the horizontal direction are equal and the following concepts are defined:
[0070] ①Height represents the number of rows, such as Figure 2 In the example, height=4.
[0071] ②width represents the number of columns, such as Figure 2 In the middle, width=5.
[0072] ③ The rsth row represents the row where the source node is located, such as Figure 2 In the example, rs = 2. Here, rs can be understood as the row index of source vertex, which means the row where the source vertex is located.
[0073] ④ The cs column represents the column where the source node is located, such as Figure 2 , cs = 2. Here, cs can be understood as the column index of source vertex, that is, the column where the source node is located.
[0074] ⑤Node (x, y) is used to represent the node at row x and column y, such as Figure 2 In , the node (2, 3) is node 8. Therefore, the source node can be represented by the node (rs, cs), such as (2, 2).
[0075] ⑥ The parent node of a node P(x, y) represents the previous node before node P in the path from the source node to node P. Figure 3In the example, the parent node of node 17 is node 12, because the path from the source node to node 17 is: 7→12→17. In this path, the previous node before reaching node 17 is node 12.
[0076] ⑦Parent(x, y) or Parent(node P) represents the parent node of node P(x, y). Figure 3 For example, Parent(4,4)=Node(4,3).
[0077] ⑧W(node P1, node P2) represents the link length between node P1 and node P2, as shown in Figure 2 In the example, W(node 6, node 11)=7.
[0078] ⑨D(x, y) or D(node P) represents the path value from the source node to the node P(x, y) calculated so far.
[0079] Based on the above definition of concepts, the following Figure 4 Provide some specific possible implementation examples. In one embodiment of the present application, the proposed routing method is based on the structural characteristics of the semi-regular grid network, and the overall process includes three main stages: data reading, path initialization, and path dynamic optimization. First, the structural data of the current semi-regular grid network is read, and the nodes and connection information therein are extracted. Subsequently, the shortest path between the nodes in the row where the source node is located (i.e., the rsth row) is determined. On this basis, dynamic planning is performed to perform row-by-row, multi-round path optimization updates from the row where the source node is located to the upper layer (rs-1th row to 1st row) and the lower layer (rs+1th row to heightth row) of the semi-regular grid network. Through this method, the shortest path and distance from the source node to all nodes in the semi-regular grid network can be finally obtained, thereby achieving efficient and stable path calculation.
[0080] The present application embodiment provides a routing method applied to a semi-regular grid network. Figure 5 , the method includes steps S501-S505.
[0081] S501: Acquire network topology information of the current semi-regular grid network.
[0082] In the embodiments of the present application, network topology information primarily includes path distances between nodes. These nodes include source nodes and destination nodes in a semi-regular grid network. Here, destination nodes refer to all other nodes in the semi-regular grid network except the source node. Path distance represents the shortest connection cost between the source node and each destination node, such as physical distance, number of hops, weight, and communication time delay.
[0083] The network topology information of the current semi-regular grid network can be obtained by referring to Figure 2 Partially related description. By obtaining network topology information, the connection relationship between the nodes of the current network structure can be grasped, which is used as the basis for subsequent path planning and data transmission. In addition, the embodiments of the present application are also applicable to situations where the network undergoes dynamic changes. For example, when the distance or status between some nodes changes, the network structure of the semi-regular grid network at the current moment can be updated by re-obtaining the network topology information, thereby recalculating the shortest path from the source node to each target node, thereby helping to improve the adaptability and stability of the current semi-regular grid network in the presence of complex changes, and ensuring efficient network communication or data scheduling.
[0084] S502: For the rsth row where the source node is located, determine the shortest path and distance from the source node to each target node in the rsth row according to the network topology information.
[0085] Please refer to Figure 6 ,exist Figure 6 In the example, the red node "7" is the source node, and the rsth row where the source node is located consists of nodes 6 to 10. Nodes 6, 8, 9, and 10 are the target nodes in the rsth row.
[0086] The network topology information (i.e. Figure 2 Based on the connection relationship between each node and its path distance in the row, step S502 of the embodiment of the present application takes node 7 as the starting point and calculates the shortest path from the source node to each target node in the same row.
[0087] The shortest path from the source node to each target node in the rsth row obtained after step S502 is as follows:
[0088] Source node 7 → node 6: the path is [7 → 6], and the distance is 5;
[0089] Source node 7 → node 8: the path is [7 → 8], and the distance is 5;
[0090] Source node 7 → node 9: The path is [7 → 8 → 9], and the distance is 5 + 5 = 10;
[0091] Source node 7 → node 10: The path is [7 → 8 → 9 → 10], and the distance is 5 + 5 + 5 = 15.
[0092] It should be noted that, for ease of understanding Figure 6 The diagram shows the calculation process of the shortest path. Arrows with directional indicators are used in the diagram. However, in actual applications, the connections between nodes in a semi-regular grid network are undirected edges and have no directionality. The arrows in the diagram are only used for auxiliary illustration and do not affect the essential logic of path calculation. Figure 7 、 Figure 8 、 Figure 9 Similarly, I will not go into details later.
[0093] S503: Starting from row rs-1, multiple rounds of path optimization and update processing are performed row by row in the direction from row rs-1 to the first row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update processing of the first row is completed.
[0094] In the embodiment of the present application, step S503 starts from the row above the row where the source node is located (row rs-1), and performs multiple rounds of path optimization and update processing row by row until the path optimization and update processing of the first row is completed, and finally determines the shortest path and distance from the source node to all target nodes in the range from row rs-1 to the first row.
[0095] For example, please refer to Figure 6 Based on the shortest paths and distances calculated in step S502 from source node 7 to all target nodes (nodes 6, 8, 9, and 10) in the same row (row rs), in step S503, the known shortest paths and distances in row rs are referenced during the multiple rounds of path optimization and update starting from row rs-1 (i.e., nodes 1 to 5).
[0096] Specifically, whenever a new path is generated from a source node to a target node A, the distance of the new path is compared with the distance of the existing path to the current target node A, and the path with the shorter distance is selected for update. This process is repeated in multiple rounds, and each round of updates may bring better results.
[0097] After completing the update of row rs-1, the process continues with row rs-2, the previous row, and repeats the above path optimization process. This process continues until the first row is processed. Finally, the shortest path and distance from the source node to all target nodes in the range from row rs-1 to row 1 are determined.
[0098] S504: Starting from the rs+1th row, multiple rounds of path optimization and update processing are performed row by row in the direction from the rs+1th row to the last row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update processing of the last row is completed.
[0099] In the embodiment of the present application, starting from the next row of the row where the source node is located (i.e., the rs+1th row), multiple rounds of path optimization and update processing are performed row by row until the path optimization and update processing of the last row is completed. Finally, the shortest path and distance from the source node to all target nodes in the range from the rs+1th row to the last row can be determined.
[0100] It should be noted that the path optimization of each row in step S503 and step S504 is not completed once, but is continuously optimized through multiple rounds of update iterations. The specific process of the multiple rounds of path optimization is as follows:
[0101] Taking the rs+1th row as an example, for the target node A in this row, the candidate parent node of node A will be set as the adjacent node of node A (that is, the node in the up, down, left, and right directions that has a connection relationship with node A) in each round.
[0102] For each candidate parent node, a new path distance is calculated from the source node to the candidate parent node and then to the current target node. If the path distance of this new path is less than the currently recorded path distance from the source node to the target node, a more optimal path has been found. The shortest path to the target node is then updated to this new path, setting the candidate parent node as the target node's new parent node. Since the candidate parent node of the target node is determined by its neighboring nodes, this can also be understood as updating the target node's parent node to the currently selected neighboring node.
[0103] Since the optimization of a target node's path may affect the next round of judgment after each path update (due to the transitive nature of the path, a target node's path may become an intermediate node in a shorter path to another target node after the path update), this path optimization and update process is performed in multiple rounds. In each round, all target nodes in the current row need to undergo path optimization processing before the next round of path optimization and update processing is performed.
[0104] In addition, it should be noted that steps S503 and S504 can be executed in parallel, that is, the path optimization update processing can be carried out simultaneously in the direction from the source node to the first row and from the source node to the last row in the semi-regular grid network, thereby accelerating the convergence speed and efficiency of the overall path optimization processing.
[0105] Based on the above examples, Figure 4 The “reading data” actually corresponds to step S501 of the embodiment of the present application, “obtaining network topology information of the current semi-regular grid network”. Figure 4 The “determine the shortest path to the nodes in the rsth row” actually corresponds to step S502 of the embodiment of the present application, “for the rsth row where the source node is located, determine the shortest path and distance from the source node to each target node in the rsth row based on the network topology information.” Similarly, Figure 4 "Dynamic programming to determine the shortest path from row rs-1 to row 1 node row by row" corresponds to step S503 of the embodiment of the present application. Figure 4The “dynamic programming to determine the shortest path from the node in row rs+1 to the node in row height row row by row” corresponds to step S504 of the embodiment of the present application.
[0106] Figure 4 The process of "dynamically programming to determine the shortest path from row rs-1 to the node in row 1 row by row" and "dynamically programming to determine the shortest path from row rs+1 to the node in row height row by row" includes multiple rounds of path optimization and update processing.
[0107] As mentioned earlier, the multi-round path optimization update process involves repeatedly changing the candidate parent node of each target node in the current row to a neighboring node of each target node, calculating the path distance from the source node to each target node through the candidate parent node of each target node, and if the calculated path distance is less than the original path distance from the source node to the target node, updating the parent node of the target node to the current candidate parent node and updating the path distance from the source node to the target node. This path optimization update process involves multiple Try_to_Improve operations, which are described below.
[0108] First, combine Figure 7 Describe the specific steps for performing a Try_to_Improve operation.
[0109] Specifically, Figure 7 In the left subgraph (a), the number "5" is marked next to the circle node 1, indicating that the distance from the source node to node 1 is 5. Figure 7 The numbers next to the nodes can be understood as weight identifiers, or they can also be understood as path cost, path distance, communication delay, etc. Similarly, the distance from the source node to node 2 is 9, the distance from the source node to node 3 is 9, the parent node of the current node 2 is node 1, the distance between node 1 and node 2 is 4, and the distance between node 3 and node 2 is 5.
[0110] In the embodiment of the present application, the Try_to_Improve operation is specifically as follows:
[0111] Try_to_Improve(source_point, des_point, candidate_parant_point)
[0112] The goal of the try_to_improve operation is to try to improve the path distance from the source node source_point to the target node des_point. The three inputs in try_to_improve are all nodes, where source_point represents the source node, des_point represents the target node, and candidate_parant_point represents the candidate parent node.
[0113] The specific execution logic of try_to_improve(source_point, des_point, candidate_parant_point) includes: when setting the parent node of the target node des_point to the candidate parent node candidate_parant_point, determine whether the path distance from the source node source_point to the target node des_point can be shortened. If the path distance is shorter, set the currently set candidate parent node candidate_parant_point as the parent node of the target node des_point, and update the distance from the source node source_point to the target node des_point to the path distance from the source node source_point through the currently selected candidate parent node candidate_parant_point to the target node des_point. If the path from the source node source_point to the target node des_point does not become shorter (that is, the path distance from the candidate parent node candidate_parant_point to the target node des_point is not less than the previously recorded path distance to the target node des_point), the parent node of the target node des_point remains unchanged (that is, the currently set candidate parent node candidate_parant_point will not be set as the parent node of the target node des_point), and the path distance from the source node to the target node also remains unchanged.
[0114] refer to Figure 7 Subgraph (b) of Figure 7 Figure (a) shows the path after executing the Try_to_Improve operation. Figure 7For example, let's execute the Try_to_Improve(source node, node 2, node 3) operation. The logic is as follows: Set node 2's candidate parent to node 3. The path distance from the source node through node 3 to node 2 is 3 + 5 = 8, which is less than the original distance from the source node through node 1 to node 2: 5 + 4 = 9. Therefore, node 2's parent is updated to the currently selected candidate parent node, node 3, and the path distance from the source node to node 2 is updated to 8.
[0115] based on Figure 5 In some specific examples, step S502 further includes step S5021 and step S5022.
[0116] For example, please refer to Figure 6 , Figure 6 Can be understood as targeting Figure 2 After executing the following steps S5021 and S5022, a schematic diagram of the shortest path from the source node to each target node in the rsth row is obtained. Steps S5021 and S5022 are specifically as follows:
[0117] S5021: For each target node on the left side of the source node in the rsth row where the source node is located, set the parent node of the target node to the right node of the target node, and update the path distance between the source node and each target node.
[0118] Specifically, for each target node located to the left of the source node in the rsth row where the source node is located, the following operations are performed in sequence from node (rs, cs-1) to node (rs, 1): set the parent node of the current target node to the right node of the target node (at this time, the shortest path to the target node has also been updated accordingly according to the parent node setting of the current target node), and calculate the path distance from the source node through the right node of the target node to finally reach the target node, which is D (the target node).
[0119] S5022: For each target node located to the right of the source node in the rsth row where the source node is located, set the parent node of the target node to the left node of the target node, and update the path distance between the source node and each target node.
[0120] Specifically, for each target node located to the right of the source node in the rsth row where the source node is located, the following operations are performed in sequence from node (rs, cs+1) to node (rs, width): the parent node of the target node is set to the left node of the target node (at this time, the shortest path to the target node has also been updated accordingly according to the parent node setting of the current target node), and the path distance from the source node through the right node of the target node to the target node is calculated, which is D (the target node).
[0121] After the above steps S5021 and S5022, the following can be obtained: Figure 6 The execution results are shown. For example, the shortest path from the source node to node 9 is source node 7 → node 8 → node 9, with a path distance of 5 + 5 = 10. Result 1 below shows the parent node information of each target node after steps S5021 and S5022, as well as the path distance from the source node through the target node's parent node to each target node.
[0122] Result 1:
[0123]
[0124] based on Figure 5 In some specific examples, step S503 of performing multi-round path optimization update processing from row rs-1 to row 1 specifically further includes step S5031 (updating the first round upward), step S5032 (updating the second round upward) and step S5033 (updating the third round upward).
[0125] For example, taking row rs-1 as an example, please refer to Figure 8 , Figure 8 Can be understood as targeting Figure 6 Schematic diagram of the shortest path from the source node to each target node in row rs-1 after executing steps S5031, S5032, and S5033 in row rs-1. Steps S5031, S5032, and S5033 are as follows:
[0126] Step S5031: For each target node in the current row, set the parent node of the target node as the child node of the target node, and update the path distance from the source node to the target node.
[0127] Combine Figure 8As can be understood from subgraph (b) in the figure, step S5031 actually sets the parent node of each target node (nodes 1 to 5) in the rs-1th row to the child node of the target node (the shortest path to the target node has also been updated accordingly based on the parent node setting of the current target node) and updates the path distance from the source node to the target node. The calculation formula for the path distance is:
[0128] D(the target node) = D(the target node's next node) + W(the target node's next node, the target node)
[0129] Based on the above result 1, after step S5031, the following result 2 can be obtained (such as Figure 8 (as shown in sub-graph (b)):
[0130]
[0131] Step S5032 (processing from left to right): for each target node in the current row except the leftmost target node, set the candidate parent node of the target node as the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; if the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, then update the parent node of the target node to the left node of the target node, and update the path distance from the source node to the target node.
[0132] Please refer to Figure 8 Specifically, based on the above result 2, the operation Try_to_Improve (source node, the target node, the left node of the target node) is performed on the target nodes (rs-1, 2), (rs-1, 3), ..., (rs-1, width) in sequence:
[0133] Try_to_Improve(node7, node2, node1)
[0134] Try_to_Improve(node7, node3, node2)
[0135] Try_to_Improve(node7, node4, node3)
[0136] Try_to_Improve(node7, node5, node4)
[0137] After the above Try_to_Improve operation, the following result 3 is obtained:
[0138]
[0139] It should be noted that since node 1 does not have a left node, the candidate parent node setting operation cannot be performed, so the Try_to_Improve operation cannot be performed in this step.
[0140] Step S5033 (processing from right to left): for each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; if the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, then update the parent node of the target node to the right node of the target node, and update the path distance from the source node to the target node.
[0141] Please refer to Figure 8 Specifically, based on the above result 3, the Try_to_Improve (source node, target node, right node of the target node) operation is performed on nodes (rs-1, width-1), (rs-1, width-2) ... (rs-1, 1) in sequence:
[0142] Try_to_Improve(node7, node4, node5)
[0143] Try_to_Improve(node7, node3, node4)
[0144] Try_to_Improve(node7, node2, node3)
[0145] Try_to_Improve(node7, node1, node2)
[0146] After the above Try_to_Improve operation, the following result 4 is obtained:
[0147]
[0148] It should be noted that since node 5 does not have a right node, the candidate parent node setting operation cannot be performed, so the Try_to_Improve operation cannot be performed in this step.
[0149] based on Figure 5In some specific examples, step S504 of performing multiple rounds of path optimization update processing from the rs+1th row to the last row specifically further includes step S5041 (downward update for the first round), step S5042 (downward update for the second round), and step S5043 (downward update for the third round). Steps S5041, S5042, and S5043 are specifically as follows:
[0150] Step S5041: For each target node in the current row, set the parent node of the target node as the parent node of the target node, and update the path distance from the source node to the target node.
[0151] Taking row rs+1 as an example, specifically, in this round of path optimization update, the parent node of each target node in row rs+1 is set to the parent node of the target node (at this time, the shortest path to the target node has also been updated accordingly based on the parent node setting of the current target node), and the path distance between the source node and the target node is updated. The calculation formula of the path distance is:
[0152] D(the target node) = D(the target node's parent node) + W(the target node's parent node, the target node)
[0153] Based on the above result 1, after step S5041, the following result 5 can be obtained:
[0154]
[0155] Step S5042 (processing from left to right): for each target node in the current row except the leftmost target node, set the candidate parent node of the target node as the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; if the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, then update the parent node of the target node to the left node of the target node, and update the path distance from the source node to the target node.
[0156] Taking the rs+1th row as an example, specifically, based on the above result 5, the operation Try_to_Improve (source node, the target node, the left node of the target node) is performed on the nodes (rs+1, 2), (rs+1, 3), ..., (rs+1, width) in sequence:
[0157] Try_to_Improve(node7, node12, node11)
[0158] Try_to_Improve(node 7, node 13, node 12)
[0159] Try_to_Improve(node 7, node 14, node 13)
[0160] Try_to_Improve(node 7, node 15, node 14)
[0161] After the above Try_to_Improve operation, the following result 6 is obtained:
[0162]
[0163] It should be noted that since node 11 does not have a left node, the candidate parent node setting operation cannot be performed, so the Try_to_Improve operation cannot be performed in this step.
[0164] Step S5043 (processing from right to left): for each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; if the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, then update the parent node of the target node to the right node of the target node, and update the path distance from the source node to the target node.
[0165] Taking the rs+1th row as an example, specifically, based on the above result 6, the operation Try_to_Improve (source node, this node, the right node of this node) is performed on the nodes (rs+1, width-1), (rs+1, width-2) ... (rs+1, 1) in sequence:
[0166] Try_to_Improve(node 7, node 14, node 15)
[0167] Try_to_Improve(node 7, node 13, node 14)
[0168] Try_to_Improve(node7, node12, node13)
[0169] Try_to_Improve(node7, node11, node12)
[0170] After the above Try_to_Improve operation, the following result 7 is obtained:
[0171]
[0172] It should be noted that since node 15 does not have a right node, the candidate parent node setting operation cannot be performed, so the Try_to_Improve operation cannot be performed in this step.
[0173] After the above steps, the shortest path in the semi-regular grid network can be obtained by reference Figure 9 , Figure 9 To correspond to Figure 2 A schematic diagram of the shortest path obtained using the routing method provided in an embodiment of the present application for a semi-regular grid network. The bold line represents the shortest path from a source node to a specific node. For example, the shortest path from source node 7 to node 16 is: 7 → 12 → 11 → 16.
[0174] In summary, it can be seen that the embodiments of the present application fully utilize the structural characteristics of the semi-regular grid network, that is, each node has four neighboring nodes: above, below, left, and right, and the distances between neighboring nodes in a certain dimension are equal. By processing row by row, the present invention can calculate the shortest path from the source node to each node in a shorter time. Applying the embodiments of the present application to large-scale scenarios that conform to the semi-regular grid network structure, such as satellite communications, can significantly reduce the delay caused by updating the shortest path due to changes in the network structure, thereby hopefully improving communication efficiency.
[0175] In order to implement the routing method applied to the semi-regular grid network of the embodiment of the present application, the embodiment of the present application also provides a routing device applied to the semi-regular grid network, such as Figure 10 As shown, the device includes:
[0176] The first module 1001 is used to obtain network topology information of the current semi-regular grid network; the network topology information includes the path distance between each node; the nodes include source nodes and target nodes; the target nodes are the nodes in the semi-regular grid network other than the source nodes;
[0177] The second module 1002 is configured to determine, for the rsth row where the source node is located, the shortest path and distance from the source node to each target node in the rsth row according to the network topology information;
[0178] The third module 1003 is configured to perform multiple rounds of path optimization and update processing on each row starting from row rs-1 and proceeding from row rs-1 to row 1, to determine the shortest path and distance from the source node to each target node in the current row, until the path optimization and update processing for the first row is completed;
[0179] The fourth module 1004 is configured to perform multiple rounds of path optimization and update processing on each row starting from the rs+1th row and proceeding from the rs+1th row to the last row, to determine the shortest path and distance from the source node to each target node in the current row, until the path optimization and update processing for the last row is completed.
[0180] Among them, for the current row, the multiple rounds of path optimization update processing include changing the candidate parent node of each target node in the current row to the neighboring node of each target node in multiple rounds, calculating the current path distance from the source node through the candidate parent node of each target node to each target node, if the calculated path distance is less than the original path distance from the source node to the target node, then updating the parent node of the target node to the current candidate parent node, and updating the path distance from the source node to the target node.
[0181] In one embodiment, the second module 1002 is specifically used to
[0182] For each target node on the left side of the source node in the rsth row where the source node is located, set the parent node of the target node to the right node of the target node, and update the path distance from the source node to each target node;
[0183] For each target node located to the right of the source node in the rsth row where the source node is located, the parent node of the target node is set to the left node of the target node, and the path distance from the source node to each target node is updated.
[0184] In one embodiment, the third module 1003 is specifically configured to: for each target node in the current row, set the parent node of the target node as the next node of the target node, and update the path distance from the source node to the target node.
[0185] In one embodiment, the third module 1003 is specifically configured to: for each target node except the leftmost target node in the current row, sequentially set the candidate parent node of the target node as the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0186] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
[0187] In one embodiment, the third module 1003 is specifically configured to: for each target node except the rightmost target node in the current row, sequentially set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0188] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
[0189] In one embodiment, the fourth module 1004 is specifically configured to: for each target node in the current row, set the parent node of the target node as the parent node of the target node, and update the path distance from the source node to the target node.
[0190] In one embodiment, the fourth module 1004 is specifically configured to: for each target node except the leftmost target node in the current row, sequentially set the candidate parent node of the target node as the left node of the target node from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0191] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
[0192] In one embodiment, the fourth module 1004 is specifically configured to: for each target node except the rightmost target node in the current row, sequentially set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node;
[0193] If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
[0194] It should be noted that the above embodiments provide a routing device for a semi-regular grid network, and only illustrate the division of the aforementioned program modules when performing shortest path calculation. In actual applications, the aforementioned processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the aforementioned processing. In addition, the routing device for a semi-regular grid network provided in the above embodiments and the routing method embodiment for a semi-regular grid network are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0195] Based on the hardware implementation of the above program modules, and in order to implement a routing method applied to a semi-regular grid network provided in an embodiment of the present application, an embodiment of the present application further provides a computer device, such as Figure 11 As shown, the computer device 1100 includes:
[0196] CPU 1101, memory 1102 and input / output interface 1103;
[0197] The memory 1102 is a temporary storage memory or a permanent storage memory;
[0198] The central processing unit 1101 is configured to communicate with the memory 1102 and execute instructions in the memory 1102 to perform any one of the above-mentioned routing methods applied to a semi-regular grid network.
[0199] Of course, in actual application, the various components in the computer device 1100 are coupled together through the bus system 1104. It can be understood that the bus system 1104 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1104 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 11 Various buses are labeled as bus system 1104.
[0200] The memory 1102 in the embodiment of the present application is used to store various types of data to support the operation of the computer device 1100. Examples of such data include: any computer program used to operate on the computer device 1100.
[0201] It is understandable that when the processor in the computer device described above executes the computer program, it can also implement the functions of the various units in the corresponding device embodiments described above, which will not be repeated here. For example, the computer program can be divided into one or more modules / units, one or more modules / units are stored in the memory and executed by the processor to complete the various embodiments of the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device. For example, the computer program can be divided into the various units in the above-mentioned computer device, and each unit can implement the specific functions described in the above-mentioned corresponding computer device.
[0202] A computer device may be a desktop computer, laptop, PDA, cloud server, or other computing device. A computer device may include, but is not limited to, a processor and memory. Those skilled in the art will appreciate that processors and memory are merely examples of computer devices and do not constitute a limitation of computer devices. Computer devices may include more or fewer components, or combinations of certain components, or different components. For example, a computer device may also include input / output devices, network access devices, buses, and the like.
[0203] The processor can be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device and connects the various parts of the entire computer device using various interfaces and lines.
[0204] The memory can be used to store computer programs and / or modules. The processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card (SMC, Smart Media Card), a secure digital (SD, Secure Digital) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0205] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, any one of the above-described routing methods applied to a semi-regular grid network is executed.
[0206] An embodiment of the present application also provides a computer program product having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, it is used to implement the routing method applied to a semi-regular grid network described in the first aspect of the embodiment of the present application or any specific implementation method of the first aspect.
[0207] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0208] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0209] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0210] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0211] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
Claims
1. A routing method applied to a semi-regular grid network, characterized in that: include: Get the network topology information of the current semi-regular grid network; The network topology information includes the path distance between each node; the nodes include source nodes and target nodes; the target nodes refer to the remaining nodes in the semi-regular grid network except the source nodes; For the rsth row where the source node is located, determine the shortest path and distance from the source node to each target node in the rsth row according to the network topology information; Starting from row rs-1, multiple rounds of path optimization and update are performed row by row in the direction from row rs-1 to the first row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update of the first row is completed; Starting from row rs+1, multiple rounds of path optimization and update are performed row by row in the direction from row rs+1 to the last row to determine the shortest path and distance from the source node to each target node in the current row until the path optimization and update of the last row is completed; Among them, for the current row, the multiple rounds of path optimization update processing include changing the candidate parent node of each target node in the current row to the neighboring node of each target node in multiple rounds, calculating the current path distance from the source node through the candidate parent node of each target node to each target node, if the calculated path distance is less than the original path distance from the source node to the target node, then updating the parent node of the target node to the current candidate parent node, and updating the path distance from the source node to the target node.
2. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The determining, for the rsth row where the source node is located, the shortest path and distance from the source node to each target node in the rsth row according to the network topology information includes: For each target node on the left side of the source node in the rsth row where the source node is located, set the parent node of the target node to the right node of the target node, and update the path distance from the source node to each target node; For each target node located to the right of the source node in the rsth row where the source node is located, the parent node of the target node is set to the left node of the target node, and the path distance from the source node to each target node is updated.
3. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row starting from row rs-1 and in a direction from row rs-1 to row 1, including a first round of upward updating. The first round of upward updating includes: For each target node in the current row, the parent node of the target node is set as the child node of the target node, and the path distance from the source node to the target node is updated.
4. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row starting from row rs-1 and in a direction from row rs-1 to row 1, including a second round of upward updating. The second round of upward updating includes: For each target node except the leftmost target node in the current row, set the candidate parent node of the target node to the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
5. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row starting from row rs-1 and in a direction from row rs-1 to row 1, including a third round of upward updating. The third round of upward updating includes: For each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
6. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row starting from the rs+1th row and in a direction from the rs+1th row to the last row, including a first round of downward updating; the first round of downward updating includes: For each target node in the current row, the parent node of the target node is set as the parent node of the target node, and the path distance from the source node to the target node is updated.
7. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row for multiple rounds starting from the rs+1th row and in a direction from the rs+1th row to the last row, including a second round of downward updating; the second round of downward updating includes: For each target node except the leftmost target node in the current row, set the candidate parent node of the target node to the left node of the target node in order from left to right, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to be the left node of the target node, and the path distance from the source node to the target node is updated.
8. The routing method applied to a semi-regular grid network according to claim 1, characterized in that: The path optimization update process is performed row by row starting from the rs+1th row and in a direction from the rs+1th row to the last row, including a third round of downward updating; the third round of downward updating includes: For each target node in the current row except the rightmost target node, set the candidate parent node of the target node as the right node of the target node in order from right to left, and calculate the path distance from the source node through the candidate parent node of the target node to the target node; If the calculated path distance from the source node to the target node is less than the original path distance from the source node to the target node, the parent node of the target node is updated to the right node of the target node, and the path distance from the source node to the target node is updated.
9. A computer device, characterized in that: include: CPU, memory and input / output interfaces; The memory is a transient storage memory or a persistent storage memory; The central processing unit is configured to communicate with the memory and execute instruction operations in the memory to perform the routing method applied to a semi-regular grid network according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the routing method applied to a semi-regular grid network according to any one of claims 1 to 8 is performed.